not-bulma 2.0.13 → 2.0.15

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.
@@ -1,7 +1,7 @@
1
- var notBulma=function(e){"use strict";var t=Array.isArray,n=Array.prototype.indexOf,i=Array.from,r=Object.defineProperty,o=Object.getOwnPropertyDescriptor,s=Object.getOwnPropertyDescriptors,a=Object.prototype,l=Array.prototype,u=Object.getPrototypeOf,c=Object.isExtensible;function d(e){return"function"==typeof e}const f=()=>{};function h(e){return e()}function v(e){for(var t=0;t<e.length;t++)e[t]()}function g(){var e,t;return{promise:new Promise((n,i)=>{e=n,t=i}),resolve:e,reject:t}}const p=16,m=32,y=64,b=128,k=1024,$=2048,_=4096,w=8192,I=16384,O=32768,A=65536,S=1<<17,C=1<<19,E=256,L=512,T=32768,x=1<<21,N=1<<22,F=1<<23,U=Symbol("$state"),P=Symbol("legacy props"),M=Symbol(""),D=Symbol("proxy path"),R=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function j(e){{const t=new Error(`lifecycle_outside_component\n\`${e}(...)\` can only be used during component initialisation\nhttps://svelte.dev/e/lifecycle_outside_component`);throw t.name="Svelte error",t}}function V(){{const e=new Error("bind_invalid_checkbox_value\nUsing `bind:value` together with a checkbox input is not allowed. Use `bind:checked` instead\nhttps://svelte.dev/e/bind_invalid_checkbox_value");throw e.name="Svelte error",e}}function z(e){{const t=new Error(`lifecycle_legacy_only\n\`${e}(...)\` cannot be used in runes mode\nhttps://svelte.dev/e/lifecycle_legacy_only`);throw t.name="Svelte error",t}}const W="[!",B={},q=Symbol(),H=Symbol("filename");var G="font-weight: bold",K="font-weight: normal";function J(e){console.warn("%c[svelte] hydration_mismatch\n%cHydration failed because the initial UI does not match what was rendered on the server\nhttps://svelte.dev/e/hydration_mismatch",G,K)}function Y(e){console.warn(`%c[svelte] state_proxy_equality_mismatch\n%cReactive \`$state(...)\` proxies and the values they proxy have different identities. Because of this, comparisons with \`${e}\` will produce unexpected results\nhttps://svelte.dev/e/state_proxy_equality_mismatch`,G,K)}let Q,Z=!1;function X(e){Z=e}function ee(e){if(null===e)throw J(),B;return Q=e}function te(){return ee(jt(Q))}function ne(e){if(Z){if(null!==jt(Q))throw J(),B;Q=e}}function ie(e=1){if(Z){for(var t=e,n=Q;t--;)n=jt(n);Q=n}}function re(e=!0){for(var t=0,n=Q;;){if(8===n.nodeType){var i=n.data;if("]"===i){if(0===t)return n;t-=1}else"["!==i&&i!==W||(t+=1)}var r=jt(n);e&&n.remove(),n=r}}function oe(e){if(!e||8!==e.nodeType)throw J(),B;return e.data}function se(e){return e===this.v}function ae(e,t){return e!=e?t==t:e!==t||null!==e&&"object"==typeof e||"function"==typeof e}function le(e){return!ae(e,this.v)}let ue=!1;function ce(e){console.warn(`%c[svelte] state_snapshot_uncloneable\n%c${e?`The following properties cannot be cloned with \`$state.snapshot\` — the return value contains the originals:\n\n${e}`:"Value cannot be cloned with `$state.snapshot` — the original value was returned"}\nhttps://svelte.dev/e/state_snapshot_uncloneable`,"font-weight: bold","font-weight: normal")}const de=[];function fe(e,t=!1,n=!1){if(!t){const t=[],i=he(e,new Map,"",t,null,n);if(1===t.length&&""===t[0])ce();else if(t.length>0){const e=t.length>10?t.slice(0,7):t.slice(0,10),n=t.length-e.length;let i=e.map(e=>`- <value>${e}`).join("\n");n>0&&(i+=`\n- ...and ${n} more`),ce(i)}return i}return he(e,new Map,"",de,null,n)}function he(e,n,i,r,o=null,s=!1){if("object"==typeof e&&null!==e){var l=n.get(e);if(void 0!==l)return l;if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);if(t(e)){var c=Array(e.length);n.set(e,c),null!==o&&n.set(o,c);for(var d=0;d<e.length;d+=1){var f=e[d];d in e&&(c[d]=he(f,n,`${i}[${d}]`,r,null,s))}return c}if(u(e)===a){for(var h in c={},n.set(e,c),null!==o&&n.set(o,c),e)c[h]=he(e[h],n,`${i}.${h}`,r,null,s);return c}if(e instanceof Date)return structuredClone(e);if("function"==typeof e.toJSON&&!s)return he(e.toJSON(),n,`${i}.toJSON()`,r,e)}if(e instanceof EventTarget)return e;try{return structuredClone(e)}catch(t){return r.push(i),e}}function ve(e,t){return e.label=t,ge(e.v,t),e}function ge(e,t){return e?.[D]?.(t),e}let pe=null;function me(e){pe=e}let ye=null;function be(e){ye=e}let ke=null;function $e(e){ke=e}function _e(e){return Ce("getContext").get(e)}function we(e,t){return Ce("setContext").set(e,t),t}function Ie(e){return Ce("hasContext").has(e)}function Oe(e,t=!1,n){pe={p:pe,i:!1,c:null,e:null,s:e,x:null,l:ue&&!t?{s:null,u:null,$:[]}:null},pe.function=n,ke=n}function Ae(e){var t=pe,n=t.e;if(null!==n)for(var i of(t.e=null,n))en(i);return void 0!==e&&(t.x=e),t.i=!0,pe=t.p,ke=pe?.function??null,e??{}}function Se(){return!ue||null!==pe&&null===pe.l}function Ce(e){return null===pe&&j(e),pe.c??=new Map(function(e){let t=e.p;for(;null!==t;){const e=t.c;if(null!==e)return e;t=t.p}return null}(pe)||void 0)}let Ee=[];function Le(){var e=Ee;Ee=[],v(e)}function Te(e){if(0===Ee.length&&!Be){var t=Ee;queueMicrotask(()=>{t===Ee&&Le()})}Ee.push(e)}function xe(){for(;Ee.length>0;)Le()}const Ne=new WeakMap;function Fe(e){var t=An;if(null===t)return wn.f|=F,e;if(e instanceof Error&&!Ne.has(e)&&Ne.set(e,function(e,t){const n=o(e,"message");if(n&&!n.configurable)return;var i=Ft?" ":"\t",r=`\n${i}in ${t.fn?.name||"<unknown>"}`,s=t.ctx;for(;null!==s;)r+=`\n${i}in ${s.function?.[H].split("/").pop()}`,s=s.p;return{message:e.message+`\n${r}\n`,stack:e.stack?.split("\n").filter(e=>!e.includes("svelte/src/internal")).join("\n")}}(e,t)),0===(t.f&O)){if(0===(t.f&b))throw!t.parent&&e instanceof Error&&Pe(e),e;t.b.error(e)}else Ue(e,t)}function Ue(e,t){for(;null!==t;){if(0!==(t.f&b))try{return void t.b.error(e)}catch(t){e=t}t=t.parent}throw e instanceof Error&&Pe(e),e}function Pe(e){const t=Ne.get(e);t&&(r(e,"message",{value:t.message}),r(e,"stack",{value:t.stack}))}const Me=new Set;let De=null,Re=null,je=null,Ve=[],ze=null,We=!1,Be=!1;class qe{committed=!1;current=new Map;previous=new Map;#e=new Set;#t=new Set;#n=0;#i=0;#r=null;#o=[];#s=[];skipped_effects=new Set;is_fork=!1;process(e){Ve=[],Re=null,this.apply();var t={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const n of e)this.#a(n,t);this.is_fork||this.#l(),this.#i>0||this.is_fork?(this.#u(t.effects),this.#u(t.render_effects),this.#u(t.block_effects)):(Re=this,De=null,Ye(t.render_effects),Ye(t.effects),Re=null,this.#r?.resolve()),je=null}#a(e,t){e.f^=k;for(var n=e.first;null!==n;){var i=n.f,r=!!(96&i),o=r&&0!==(i&k)||0!==(i&w)||this.skipped_effects.has(n);if(0!==(n.f&b)&&n.b?.is_pending()&&(t={parent:t,effect:n,effects:[],render_effects:[],block_effects:[]}),!o&&null!==n.fn){r?n.f^=k:4&i?t.effects.push(n):Rn(n)&&(0!==(n.f&p)&&t.block_effects.push(n),Bn(n));var s=n.first;if(null!==s){n=s;continue}}var a=n.parent;for(n=n.next;null===n&&null!==a;)a===t.effect&&(this.#u(t.effects),this.#u(t.render_effects),this.#u(t.block_effects),t=t.parent),n=a.next,a=a.parent}}#u(e){for(const t of e){(0!==(t.f&$)?this.#o:this.#s).push(t),Yn(t,k)}}capture(e,t){this.previous.has(e)||this.previous.set(e,t),this.current.set(e,e.v),je?.set(e,e.v)}activate(){De=this}deactivate(){De=null,je=null}flush(){if(this.activate(),Ve.length>0){if(Ge(),null!==De&&De!==this)return}else 0===this.#n&&this.process([]);this.deactivate()}discard(){for(const e of this.#t)e(this);this.#t.clear()}#l(){if(0===this.#i){for(const e of this.#e)e();this.#e.clear()}0===this.#n&&this.#c()}#c(){if(Me.size>1){this.previous.clear();var e=je,t=!0,n={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const e of Me){if(e===this){t=!1;continue}const i=[];for(const[n,r]of this.current){if(e.current.has(n)){if(!t||r===e.current.get(n))continue;e.current.set(n,r)}i.push(n)}if(0===i.length)continue;const r=[...e.current.keys()].filter(e=>!this.current.has(e));if(r.length>0){const t=new Set,o=new Map;for(const e of i)Qe(e,r,t,o);if(Ve.length>0){De=e,e.apply();for(const t of Ve)e.#a(t,n);Ve=[],e.deactivate()}}}De=null,je=e}this.committed=!0,Me.delete(this)}increment(e){this.#n+=1,e&&(this.#i+=1)}decrement(e){this.#n-=1,e&&(this.#i-=1),this.revive()}revive(){for(const e of this.#o)Yn(e,$),et(e);for(const e of this.#s)Yn(e,_),et(e);this.#o=[],this.#s=[],this.flush()}oncommit(e){this.#e.add(e)}ondiscard(e){this.#t.add(e)}settled(){return(this.#r??=g()).promise}static ensure(){if(null===De){const e=De=new qe;Me.add(De),Be||qe.enqueue(()=>{De===e&&e.flush()})}return De}static enqueue(e){Te(e)}apply(){}}function He(e){var t=Be;Be=!0;try{var n;for(e&&(null!==De&&Ge(),n=e());;){if(xe(),0===Ve.length&&(De?.flush(),0===Ve.length))return ze=null,n;Ge()}}finally{Be=t}}function Ge(){var e=bn;We=!0;try{var t=0;for(kn(!0);Ve.length>0;){var n=qe.ensure();if(t++>1e3){var i=new Map;for(const e of n.current.keys())for(const[t,n]of e.updated??[]){var r=i.get(t);r||(r={error:n.error,count:0},i.set(t,r)),r.count+=n.count}for(const e of i.values())console.error(e.error);Ke()}n.process(Ve),vt.clear()}}finally{We=!1,kn(e),ze=null}}function Ke(){try{!function(){{const e=new Error("effect_update_depth_exceeded\nMaximum update depth exceeded. This typically indicates that an effect reads and writes the same piece of state\nhttps://svelte.dev/e/effect_update_depth_exceeded");throw e.name="Svelte error",e}}()}catch(e){r(e,"stack",{value:""}),Ue(e,ze)}}let Je=null;function Ye(e){var t=e.length;if(0!==t){for(var n=0;n<t;){var i=e[n++];if(!(24576&i.f)&&Rn(i)&&(Je=new Set,Bn(i),null===i.deps&&null===i.first&&null===i.nodes_start&&(null===i.teardown&&null===i.ac?fn(i):i.fn=null),Je?.size>0)){vt.clear();for(const e of Je){if(24576&e.f)continue;const t=[e];let n=e.parent;for(;null!==n;)Je.has(n)&&(Je.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){const n=t[e];24576&n.f||Bn(n)}}Je.clear()}}Je=null}}function Qe(e,t,n,i){if(!n.has(e)&&(n.add(e),null!==e.reactions))for(const r of e.reactions){const e=r.f;2&e?Qe(r,t,n,i):4194320&e&&0===(e&$)&&Xe(r,t,i)&&(Yn(r,$),et(r))}}function Ze(e,t){if(null!==e.reactions)for(const n of e.reactions){const e=n.f;2&e?Ze(n,t):0!==(e&S)&&(Yn(n,$),t.add(n))}}function Xe(e,t,n){const i=n.get(e);if(void 0!==i)return i;if(null!==e.deps)for(const i of e.deps){if(t.includes(i))return!0;if(2&i.f&&Xe(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function et(e){for(var t=ze=e;null!==t.parent;){var n=(t=t.parent).f;if(We&&t===An&&0!==(n&p))return;if(96&n){if(0===(n&k))return;t.f^=k}}Ve.push(t)}function tt(e){let t,n=0,i=mt(0);return ve(i,"createSubscriber version"),()=>{null===wn||In||(Hn(i),rn(()=>(0===n&&(t=Kn(()=>e(()=>Ot(i)))),n+=1,()=>{Te(()=>{n-=1,0===n&&(t?.(),t=void 0,Ot(i))})})))}}class nt{parent;#n=!1;#d;#f=Z?Q:null;#h;#v;#g;#p=null;#m=null;#y=null;#b=null;#k=null;#$=0;#_=0;#w=!1;#I=null;#O=tt(()=>(this.#I=mt(this.#$),ve(this.#I,"$effect.pending()"),()=>{this.#I=null}));constructor(e,t,n){this.#d=e,this.#h=t,this.#v=n,this.parent=An.b,this.#n=!!this.#h.pending,this.#g=sn(()=>{if(An.b=this,Z){const e=this.#f;te();8===e.nodeType&&e.data===W?this.#A():this.#S()}else{var e=this.#C();try{this.#p=an(()=>n(e))}catch(e){this.error(e)}this.#_>0?this.#E():this.#n=!1}return()=>{this.#k?.remove()}},589952),Z&&(this.#d=Q)}#S(){try{this.#p=an(()=>this.#v(this.#d))}catch(e){this.error(e)}this.#n=!1}#A(){const e=this.#h.pending;e&&(this.#m=an(()=>e(this.#d)),qe.enqueue(()=>{var e=this.#C();this.#p=this.#L(()=>(qe.ensure(),an(()=>this.#v(e)))),this.#_>0?this.#E():(hn(this.#m,()=>{this.#m=null}),this.#n=!1)}))}#C(){var e=this.#d;return this.#n&&(this.#k=Dt(),this.#d.before(this.#k),e=this.#k),e}is_pending(){return this.#n||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#h.pending}#L(e){var t=An,n=wn,i=pe;Sn(this.#g),On(this.#g),me(this.#g.ctx);try{return e()}catch(e){return Fe(e),null}finally{Sn(t),On(n),me(i)}}#E(){const e=this.#h.pending;null!==this.#p&&(this.#b=document.createDocumentFragment(),this.#b.append(this.#k),yn(this.#p,this.#b)),null===this.#m&&(this.#m=an(()=>e(this.#d)))}#T(e){this.has_pending_snippet()?(this.#_+=e,0===this.#_&&(this.#n=!1,this.#m&&hn(this.#m,()=>{this.#m=null}),this.#b&&(this.#d.before(this.#b),this.#b=null))):this.parent&&this.parent.#T(e)}update_pending_count(e){this.#T(e),this.#$+=e,this.#I&&_t(this.#I,this.#$)}get_effect_pending(){return this.#O(),Hn(this.#I)}error(e){var t=this.#h.onerror;let n=this.#h.failed;if(this.#w||!t&&!n)throw e;this.#p&&(cn(this.#p),this.#p=null),this.#m&&(cn(this.#m),this.#m=null),this.#y&&(cn(this.#y),this.#y=null),Z&&(ee(this.#f),ie(),ee(re()));var i=!1,r=!1;const o=()=>{i?console.warn("%c[svelte] svelte_boundary_reset_noop\n%cA `<svelte:boundary>` `reset` function only resets the boundary the first time it is called\nhttps://svelte.dev/e/svelte_boundary_reset_noop",G,K):(i=!0,r&&function(){{const e=new Error("svelte_boundary_reset_onerror\nA `<svelte:boundary>` `reset` function cannot be called while an error is still being handled\nhttps://svelte.dev/e/svelte_boundary_reset_onerror");throw e.name="Svelte error",e}}(),qe.ensure(),this.#$=0,null!==this.#y&&hn(this.#y,()=>{this.#y=null}),this.#n=this.has_pending_snippet(),this.#p=this.#L(()=>(this.#w=!1,an(()=>this.#v(this.#d)))),this.#_>0?this.#E():this.#n=!1)};var s=wn;try{On(null),r=!0,t?.(e,o),r=!1}catch(e){Ue(e,this.#g&&this.#g.parent)}finally{On(s)}n&&Te(()=>{this.#y=this.#L(()=>{qe.ensure(),this.#w=!0;try{return an(()=>{n(this.#d,()=>e,()=>o)})}catch(e){return Ue(e,this.#g.parent),null}finally{this.#w=!1}})})}}function it(e,t,n,i){const r=Se()?st:lt;if(0!==n.length||0!==e.length){var o=De,s=An,a=function(){var e=An,t=wn,n=pe,i=De,r=ye;return function(o=!0){Sn(e),On(t),me(n),o&&i?.activate(),be(r)}}();e.length>0?Promise.all(e).then(()=>{a();try{return l()}finally{o?.deactivate(),rt()}}):l()}else i(t.map(r));function l(){Promise.all(n.map(e=>function(e){let t=An;null===t&&function(){{const e=new Error("async_derived_orphan\nCannot create a `$derived(...)` with an `await` expression outside of an effect tree\nhttps://svelte.dev/e/async_derived_orphan");throw e.name="Svelte error",e}}();var n=t.b,i=void 0,r=mt(q),o=!wn,s=new Map;return function(e){Qt(4718592,e,!0)}(()=>{var t=g();i=t.promise;try{Promise.resolve(e()).then(t.resolve,t.reject).then(()=>{a===De&&a.committed&&a.deactivate(),rt()})}catch(e){t.reject(e),rt()}var a=De;if(o){var l=!n.is_pending();n.update_pending_count(1),a.increment(l),s.get(a)?.reject(R),s.delete(a),s.set(a,t)}const u=(e,t=void 0)=>{if(a.activate(),t)t!==R&&(r.f|=F,_t(r,t));else{0!==(r.f&F)&&(r.f^=F),_t(r,e);for(const[e,t]of s){if(s.delete(e),e===a)break;t.reject(R)}}o&&(n.update_pending_count(-1),a.decrement(l))};t.promise.then(u,e=>u(null,e||"unknown"))}),Zt(()=>{for(const e of s.values())e.reject(R)}),r.f|=N,new Promise(e=>{function t(n){function o(){n===i?e(r):t(i)}n.then(o,o)}t(i)})}(e))).then(e=>{a();try{i([...t.map(r),...e])}catch(e){0===(s.f&I)&&Ue(e,s)}o?.deactivate(),rt()}).catch(e=>{Ue(e,s)})}}function rt(){Sn(null),On(null),me(null),be(null)}const ot=new Set;function st(e){var t=2050,n=null!==wn&&2&wn.f?wn:null;null===An||null!==n&&0!==(n.f&E)?t|=E:An.f|=C;return{ctx:pe,deps:null,effects:null,equals:se,f:t,fn:e,reactions:null,rv:0,v:q,wv:0,parent:n??An,ac:null}}function at(e){const t=st(e);return En(t),t}function lt(e){const t=st(e);return t.equals=le,t}function ut(e){var t=e.effects;if(null!==t){e.effects=null;for(var n=0;n<t.length;n+=1)cn(t[n])}}let ct=[];function dt(e){var t,n=An;Sn(function(e){for(var t=e.parent;null!==t;){if(!(2&t.f))return t;t=t.parent}return null}(e));{let i=ht;gt(new Set);try{ct.includes(e)&&function(){{const e=new Error("derived_references_self\nA derived value cannot reference itself recursively\nhttps://svelte.dev/e/derived_references_self");throw e.name="Svelte error",e}}(),ct.push(e),e.f&=-32769,ut(e),t=Vn(e)}finally{Sn(n),gt(i),ct.pop()}}return t}function ft(e){var t=dt(e);(e.equals(t)||(e.v=t,e.wv=Dn()),$n)||(null!==je?je.set(e,e.v):Yn(e,!Mn&&0===(e.f&E)||null===e.deps?k:_))}let ht=new Set;const vt=new Map;function gt(e){ht=e}let pt=!1;function mt(e,t){return{f:0,v:e,reactions:null,equals:se,rv:0,wv:0}}function yt(e,t){const n=mt(e);return En(n),n}function bt(e,t=!1,n=!0){const i=mt(e);return t||(i.equals=le),ue&&n&&null!==pe&&null!==pe.l&&(pe.l.s??=[]).push(i),i}function kt(e,t){return $t(e,Kn(()=>Hn(e))),t}function $t(e,t,n=!1){null!==wn&&(!In||0!==(wn.f&S))&&Se()&&4325394&wn.f&&!Cn?.includes(e)&&function(){{const e=new Error("state_unsafe_mutation\nUpdating state inside `$derived(...)`, `$inspect(...)` or a template expression is forbidden. If the value should not be reactive, declare it without `$state`\nhttps://svelte.dev/e/state_unsafe_mutation");throw e.name="Svelte error",e}}();let i=n?Ct(t):t;return ge(i,e.label),_t(e,i)}function _t(e,t){if(!e.equals(t)){var n=e.v;$n?vt.set(e,t):vt.set(e,n),e.v=t;var i=qe.ensure();if(i.capture(e,n),null!==An){const t=function(e){const t=Error.stackTraceLimit;Error.stackTraceLimit=1/0;let n=Error();Error.stackTraceLimit=t;const i=n.stack;if(!i)return null;const o=i.split("\n"),s=["\n"];for(let e=0;e<o.length;e++){const t=o[e],n=t.replaceAll("\\","/");if("Error"!==t){if(t.includes("validate_each_keys"))return null;n.includes("svelte/src/internal")||n.includes("node_modules/.vite")||s.push(t)}}return 1===s.length?null:(r(n,"stack",{value:s.join("\n")}),r(n,"name",{value:e}),n)}("updated at");if(null!==t){e.updated??=new Map;let n=e.updated.get(t.stack);n||(n={error:t,count:0},e.updated.set(t.stack,n)),n.count++}}null!==An&&(e.set_during_effect=!0),2&e.f&&(0!==(e.f&$)&&dt(e),Yn(e,0===(e.f&E)?k:_)),e.wv=Dn(),At(e,$),!Se()||null===An||0===(An.f&k)||96&An.f||(null===xn?function(e){xn=e}([e]):xn.push(e)),!i.is_fork&&ht.size>0&&!pt&&wt()}return t}function wt(){pt=!1;const e=Array.from(ht);for(const t of e)0!==(t.f&k)&&Yn(t,_),Rn(t)&&Bn(t);ht.clear()}function It(e,t=1){var n=Hn(e),i=1===t?n++:n--;return $t(e,n),i}function Ot(e){$t(e,e.v+1)}function At(e,t){var n=e.reactions;if(null!==n)for(var i=Se(),r=n.length,o=0;o<r;o++){var s=n[o],a=s.f;if(i||s!==An)if(0===(a&S)){var l=0===(a&$);l&&Yn(s,t),2&a?0===(a&T)&&(s.f|=T,At(s,_)):l&&(0!==(a&p)&&null!==Je&&Je.add(s),et(s))}else ht.add(s)}}const St=/^[a-zA-Z_$][a-zA-Z_$0-9]*$/;function Ct(e){if("object"!=typeof e||null===e||U in e)return e;const n=u(e);if(n!==a&&n!==l)return e;var i=new Map,r=t(e),s=yt(0),c=Un,d=e=>{if(Un===c)return e();var t=wn,n=Un;On(null),Pn(c);var i=e();return On(t),Pn(n),i};r&&(i.set("length",yt(e.length)),e=new Proxy(e,{get(e,t,n){var i=Reflect.get(e,t,n);return xt.has(t)?function(...e){pt=!0;var t=i.apply(this,e);return wt(),t}:i}}));var f="";let h=!1;function v(e){if(!h){h=!0,ve(s,`${f=e} version`);for(const[e,t]of i)ve(t,Et(f,e));h=!1}}return new Proxy(e,{defineProperty(e,t,n){"value"in n&&!1!==n.configurable&&!1!==n.enumerable&&!1!==n.writable||function(){{const e=new Error("state_descriptors_fixed\nProperty descriptors defined on `$state` objects must contain `value` and always be `enumerable`, `configurable` and `writable`.\nhttps://svelte.dev/e/state_descriptors_fixed");throw e.name="Svelte error",e}}();var r=i.get(t);return void 0===r?r=d(()=>{var e=yt(n.value);return i.set(t,e),"string"==typeof t&&ve(e,Et(f,t)),e}):$t(r,n.value,!0),!0},deleteProperty(e,t){var n=i.get(t);if(void 0===n){if(t in e){const e=d(()=>yt(q));i.set(t,e),Ot(s),ve(e,Et(f,t))}}else $t(n,q),Ot(s);return!0},get(t,n,r){if(n===U)return e;if(n===D)return v;var s=i.get(n),a=n in t;if(void 0!==s||a&&!o(t,n)?.writable||(s=d(()=>{var e=yt(Ct(a?t[n]:q));return ve(e,Et(f,n)),e}),i.set(n,s)),void 0!==s){var l=Hn(s);return l===q?void 0:l}return Reflect.get(t,n,r)},getOwnPropertyDescriptor(e,t){var n=Reflect.getOwnPropertyDescriptor(e,t);if(n&&"value"in n){var r=i.get(t);r&&(n.value=Hn(r))}else if(void 0===n){var o=i.get(t),s=o?.v;if(void 0!==o&&s!==q)return{enumerable:!0,configurable:!0,value:s,writable:!0}}return n},has(e,t){if(t===U)return!0;var n=i.get(t),r=void 0!==n&&n.v!==q||Reflect.has(e,t);if((void 0!==n||null!==An&&(!r||o(e,t)?.writable))&&(void 0===n&&(n=d(()=>{var n=yt(r?Ct(e[t]):q);return ve(n,Et(f,t)),n}),i.set(t,n)),Hn(n)===q))return!1;return r},set(e,t,n,a){var l=i.get(t),u=t in e;if(r&&"length"===t)for(var c=n;c<l.v;c+=1){var h=i.get(c+"");void 0!==h?$t(h,q):c in e&&(h=d(()=>yt(q)),i.set(c+"",h),ve(h,Et(f,c)))}void 0===l?u&&!o(e,t)?.writable||(ve(l=d(()=>yt(void 0)),Et(f,t)),$t(l,Ct(n)),i.set(t,l)):(u=l.v!==q,$t(l,d(()=>Ct(n))));var v=Reflect.getOwnPropertyDescriptor(e,t);if(v?.set&&v.set.call(a,n),!u){if(r&&"string"==typeof t){var g=i.get("length"),p=Number(t);Number.isInteger(p)&&p>=g.v&&$t(g,p+1)}Ot(s)}return!0},ownKeys(e){Hn(s);var t=Reflect.ownKeys(e).filter(e=>{var t=i.get(e);return void 0===t||t.v!==q});for(var[n,r]of i)r.v===q||n in e||t.push(n);return t},setPrototypeOf(){!function(){{const e=new Error("state_prototype_fixed\nCannot set prototype of `$state` object\nhttps://svelte.dev/e/state_prototype_fixed");throw e.name="Svelte error",e}}()}})}function Et(e,t){return"symbol"==typeof t?`${e}[Symbol(${t.description??""})]`:St.test(t)?`${e}.${t}`:/^\d+$/.test(t)?`${e}[${t}]`:`${e}['${t}']`}function Lt(e){try{if(null!==e&&"object"==typeof e&&U in e)return e[U]}catch{}return e}function Tt(e,t){return Object.is(Lt(e),Lt(t))}const xt=new Set(["copyWithin","fill","pop","push","reverse","shift","sort","splice","unshift"]);var Nt,Ft,Ut,Pt;function Mt(){if(void 0===Nt){Nt=window,Ft=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Ut=o(t,"firstChild").get,Pt=o(t,"nextSibling").get,c(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),c(n)&&(n.__t=void 0),e.__svelte_meta=null,function(){const e=Array.prototype,t=Array.__svelte_cleanup;t&&t();const{indexOf:n,lastIndexOf:i,includes:r}=e;e.indexOf=function(e,t){const i=n.call(this,e,t);if(-1===i)for(let n=t??0;n<this.length;n+=1)if(Lt(this[n])===e){Y("array.indexOf(...)");break}return i},e.lastIndexOf=function(e,t){const n=i.call(this,e,t??this.length-1);if(-1===n)for(let n=0;n<=(t??this.length-1);n+=1)if(Lt(this[n])===e){Y("array.lastIndexOf(...)");break}return n},e.includes=function(e,t){const n=r.call(this,e,t);if(!n)for(let t=0;t<this.length;t+=1)if(Lt(this[t])===e){Y("array.includes(...)");break}return n},Array.__svelte_cleanup=()=>{e.indexOf=n,e.lastIndexOf=i,e.includes=r}}()}}function Dt(e=""){return document.createTextNode(e)}function Rt(e){return Ut.call(e)}function jt(e){return Pt.call(e)}function Vt(e,t){if(!Z)return Rt(e);var n=Rt(Q);if(null===n)n=Q.appendChild(Dt());else if(t&&3!==n.nodeType){var i=Dt();return n?.before(i),ee(i),i}return ee(n),n}function zt(e,t=!1){if(!Z){var n=Rt(e);return n instanceof Comment&&""===n.data?jt(n):n}if(t&&3!==Q?.nodeType){var i=Dt();return Q?.before(i),ee(i),i}return Q}function Wt(e,t=1,n=!1){let i=Z?Q:e;for(var r;t--;)r=i,i=jt(i);if(!Z)return i;if(n&&3!==i?.nodeType){var o=Dt();return null===i?r?.after(o):i.before(o),ee(o),o}return ee(i),i}function Bt(e){e.textContent=""}function qt(e,t){if(t){const t=document.body;e.autofocus=!0,Te(()=>{document.activeElement===t&&e.focus()})}}let Ht=!1;function Gt(){Ht||(Ht=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function Kt(e){var t=wn,n=An;On(null),Sn(null);try{return e()}finally{On(t),Sn(n)}}function Jt(e,t,n,i=n){e.addEventListener(t,()=>Kt(n));const r=e.__on_r;e.__on_r=r?()=>{r(),i(!0)}:()=>i(!0),Gt()}function Yt(e){null===An&&null===wn&&function(e){{const t=new Error(`effect_orphan\n\`${e}\` can only be used inside an effect (e.g. during component initialisation)\nhttps://svelte.dev/e/effect_orphan`);throw t.name="Svelte error",t}}(e),null!==wn&&0!==(wn.f&E)&&null===An&&function(){{const e=new Error("effect_in_unowned_derived\nEffect cannot be created inside a `$derived` value that was not itself created inside an effect\nhttps://svelte.dev/e/effect_in_unowned_derived");throw e.name="Svelte error",e}}(),$n&&function(e){{const t=new Error(`effect_in_teardown\n\`${e}\` cannot be used inside an effect cleanup function\nhttps://svelte.dev/e/effect_in_teardown`);throw t.name="Svelte error",t}}(e)}function Qt(e,t,n,i=!0){for(var r=An;null!==r&&0!==(r.f&S);)r=r.parent;null!==r&&0!==(r.f&w)&&(e|=w);var o={ctx:pe,deps:null,nodes_start:null,nodes_end:null,f:e|$,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(o.component_function=ke,n)try{Bn(o),o.f|=O}catch(s){throw cn(o),s}else null!==t&&et(o);if(i){var s=o;if(n&&null===s.deps&&null===s.teardown&&null===s.nodes_start&&s.first===s.last&&0===(s.f&C)&&(s=s.first,0!==(e&p)&&0!==(e&A)&&null!==s&&(s.f|=A)),null!==s&&(s.parent=r,null!==r&&function(e,t){var n=t.last;null===n?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}(s,r),null!==wn&&2&wn.f&&0===(e&y))){var a=wn;(a.effects??=[]).push(s)}}return o}function Zt(e){const t=Qt(8,null,!1);return Yn(t,k),t.teardown=e,t}function Xt(e){Yt("$effect"),r(e,"name",{value:"$effect"});var t=An.f;if(!(!wn&&0!==(t&m)&&0===(t&O)))return en(e);var n=pe;(n.e??=[]).push(e)}function en(e){return Qt(1048580,e,!1)}function tn(e){return Qt(4,e,!1)}function nn(e,t){var n={effect:null,ran:!1,deps:e};pe.l.$.push(n),n.effect=rn(()=>{e(),n.ran||(n.ran=!0,Kn(t))})}function rn(e,t=0){return Qt(8|t,e,!0)}function on(e,t=[],n=[],i=[]){it(i,t,n,t=>{Qt(8,()=>e(...t.map(Hn)),!0)})}function sn(e,t=0){var n=Qt(p|t,e,!0);return n.dev_stack=ye,n}function an(e,t=!0){return Qt(524320,e,!0,t)}function ln(e){var t=e.teardown;if(null!==t){const e=$n,n=wn;_n(!0),On(null);try{t.call(null)}finally{_n(e),On(n)}}}function un(e,t=!1){var n=e.first;for(e.first=e.last=null;null!==n;){const e=n.ac;null!==e&&Kt(()=>{e.abort(R)});var i=n.next;0!==(n.f&y)?n.parent=null:cn(n,t),n=i}}function cn(e,t=!0){var n=!1;(t||262144&e.f)&&null!==e.nodes_start&&null!==e.nodes_end&&(dn(e.nodes_start,e.nodes_end),n=!0),un(e,t&&!n),Wn(e,0),Yn(e,I);var i=e.transitions;if(null!==i)for(const e of i)e.stop();ln(e);var r=e.parent;null!==r&&null!==r.first&&fn(e),e.component_function=null,e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=e.ac=null}function dn(e,t){for(;null!==e;){var n=e===t?null:jt(e);e.remove(),e=n}}function fn(e){var t=e.parent,n=e.prev,i=e.next;null!==n&&(n.next=i),null!==i&&(i.prev=n),null!==t&&(t.first===e&&(t.first=i),t.last===e&&(t.last=n))}function hn(e,t,n=!0){var i=[];gn(e,i,!0),vn(i,()=>{n&&cn(e),t&&t()})}function vn(e,t){var n=e.length;if(n>0){var i=()=>--n||t();for(var r of e)r.out(i)}else t()}function gn(e,t,n){if(0===(e.f&w)){if(e.f^=w,null!==e.transitions)for(const i of e.transitions)(i.is_global||n)&&t.push(i);for(var i=e.first;null!==i;){var r=i.next;gn(i,t,!!(0!==(i.f&A)||0!==(i.f&m)&&0!==(e.f&p))&&n),i=r}}}function pn(e){mn(e,!0)}function mn(e,t){if(0!==(e.f&w)){e.f^=w,0===(e.f&k)&&(Yn(e,$),et(e));for(var n=e.first;null!==n;){var i=n.next;mn(n,!!(0!==(n.f&A)||0!==(n.f&m))&&t),n=i}if(null!==e.transitions)for(const n of e.transitions)(n.is_global||t)&&n.in()}}function yn(e,t){for(var n=e.nodes_start,i=e.nodes_end;null!==n;){var r=n===i?null:jt(n);t.append(n),n=r}}let bn=!1;function kn(e){bn=e}let $n=!1;function _n(e){$n=e}let wn=null,In=!1;function On(e){wn=e}let An=null;function Sn(e){An=e}let Cn=null;function En(e){null!==wn&&(null===Cn?Cn=[e]:Cn.push(e))}let Ln=null,Tn=0,xn=null;let Nn=1,Fn=0,Un=Fn;function Pn(e){Un=e}let Mn=!1;function Dn(){return++Nn}function Rn(e){var t=e.f;if(0!==(t&$))return!0;if(0!==(t&_)){var n=e.deps,i=0!==(t&E);if(2&t&&(e.f&=-32769),null!==n){var r,o,s=0!==(t&L),a=i&&null!==An&&!Mn,l=n.length;if((s||a)&&(null===An||0===(An.f&I))){var u=e,c=u.parent;for(r=0;r<l;r++)o=n[r],!s&&o?.reactions?.includes(u)||(o.reactions??=[]).push(u);s&&(u.f^=L),a&&null!==c&&0===(c.f&E)&&(u.f^=E)}for(r=0;r<l;r++)if(Rn(o=n[r])&&ft(o),o.wv>e.wv)return!0}i&&(null===An||Mn)||Yn(e,k)}return!1}function jn(e,t,n=!0){var i=e.reactions;if(null!==i&&!Cn?.includes(e))for(var r=0;r<i.length;r++){var o=i[r];2&o.f?jn(o,t,!1):t===o&&(n?Yn(o,$):0!==(o.f&k)&&Yn(o,_),et(o))}}function Vn(e){var t=Ln,n=Tn,i=xn,r=wn,o=Mn,s=Cn,a=pe,l=In,u=Un,c=e.f;Ln=null,Tn=0,xn=null,Mn=0!==(c&E)&&(In||!bn||null===wn),wn=96&c?null:e,Cn=null,me(e.ctx),In=!1,Un=++Fn,null!==e.ac&&(Kt(()=>{e.ac.abort(R)}),e.ac=null);try{e.f|=x;var d=(0,e.fn)(),f=e.deps;if(null!==Ln){var h;if(Wn(e,Tn),null!==f&&Tn>0)for(f.length=Tn+Ln.length,h=0;h<Ln.length;h++)f[Tn+h]=Ln[h];else e.deps=f=Ln;if(!Mn||2&c&&null!==e.reactions)for(h=Tn;h<f.length;h++)(f[h].reactions??=[]).push(e)}else null!==f&&Tn<f.length&&(Wn(e,Tn),f.length=Tn);if(Se()&&null!==xn&&!In&&null!==f&&!(6146&e.f))for(h=0;h<xn.length;h++)jn(xn[h],e);return null!==r&&r!==e&&(Fn++,null!==xn&&(null===i?i=xn:i.push(...xn))),0!==(e.f&F)&&(e.f^=F),d}catch(e){return Fe(e)}finally{e.f^=x,Ln=t,Tn=n,xn=i,wn=r,Mn=o,Cn=s,me(a),In=l,Un=u}}function zn(e,t){let i=t.reactions;if(null!==i){var r=n.call(i,e);if(-1!==r){var o=i.length-1;0===o?i=t.reactions=null:(i[r]=i[o],i.pop())}}null===i&&2&t.f&&(null===Ln||!Ln.includes(t))&&(Yn(t,_),768&t.f||(t.f^=L),ut(t),Wn(t,0))}function Wn(e,t){var n=e.deps;if(null!==n)for(var i=t;i<n.length;i++)zn(e,n[i])}function Bn(e){var t=e.f;if(0===(t&I)){Yn(e,k);var n=An,i=bn;An=e,bn=!0;var r=ke;$e(e.component_function);var o=ye;be(e.dev_stack??ye);try{0!==(t&p)?function(e){for(var t=e.first;null!==t;){var n=t.next;0===(t.f&m)&&cn(t),t=n}}(e):un(e),ln(e);var s=Vn(e);e.teardown="function"==typeof s?s:null,e.wv=Nn}finally{bn=i,An=n,$e(r),be(o)}}}async function qn(){await Promise.resolve(),He()}function Hn(e){var t=!!(2&e.f);if(null===wn||In){if(t&&null===e.deps&&null===e.effects){var n=e,i=n.parent;null!==i&&0===(i.f&E)&&(n.f^=E)}}else if(!(null!==An&&0!==(An.f&I))&&!Cn?.includes(e)){var r=wn.deps;if(0!==(wn.f&x))e.rv<Fn&&(e.rv=Fn,null===Ln&&null!==r&&r[Tn]===e?Tn++:null===Ln?Ln=[e]:Mn&&Ln.includes(e)||Ln.push(e));else{(wn.deps??=[]).push(e);var o=e.reactions;null===o?e.reactions=[wn]:o.includes(wn)||o.push(wn)}}if(ot.delete(e),$n){if(vt.has(e))return vt.get(e);if(t){var s=(n=e).v;return(0===(n.f&k)&&null!==n.reactions||Gn(n))&&(s=dt(n)),vt.set(n,s),s}}else if(t){if(n=e,je?.has(n))return je.get(n);Rn(n)&&ft(n)}if(je?.has(e))return je.get(e);if(0!==(e.f&F))throw e.v;return e.v}function Gn(e){if(e.v===q)return!0;if(null===e.deps)return!1;for(const t of e.deps){if(vt.has(t))return!0;if(2&t.f&&Gn(t))return!0}return!1}function Kn(e){var t=In;try{return In=!0,e()}finally{In=t}}const Jn=-7169;function Yn(e,t){e.f=e.f&Jn|t}function Qn(e){if("object"==typeof e&&e&&!(e instanceof EventTarget))if(U in e)Zn(e);else if(!Array.isArray(e))for(let t in e){const n=e[t];"object"==typeof n&&n&&U in n&&Zn(n)}}function Zn(e,t=new Set){if(!("object"!=typeof e||null===e||e instanceof EventTarget||t.has(e))){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{Zn(e[n],t)}catch(e){}const n=u(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const t=s(n);for(let n in t){const i=t[n].get;if(i)try{i.call(e)}catch(e){}}}}}const Xn=/\r/g;function ei(e){return e.endsWith("capture")&&"gotpointercapture"!==e&&"lostpointercapture"!==e}const ti=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function ni(e){return ti.includes(e)}const ii={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function ri(e){return e=e.toLowerCase(),ii[e]??e}const oi=["touchstart","touchmove"];function si(e){return oi.includes(e)}const ai=["textarea","script","style","title"];const li=new Set,ui=new Set;function ci(e,t,n,i={}){function r(e){if(i.capture||vi.call(t,e),!e.cancelBubble)return Kt(()=>n?.call(this,e))}return e.startsWith("pointer")||e.startsWith("touch")||"wheel"===e?Te(()=>{t.addEventListener(e,r,i)}):t.addEventListener(e,r,i),r}function di(e,t,n,i,r){var o={capture:i,passive:r},s=ci(e,t,n,o);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&Zt(()=>{t.removeEventListener(e,s,o)})}function fi(e){for(var t=0;t<e.length;t++)li.add(e[t]);for(var n of ui)n(e)}let hi=null;function vi(e){var t=this,n=t.ownerDocument,i=e.type,o=e.composedPath?.()||[],s=o[0]||e.target;hi=e;var a=0,l=hi===e&&e.__root;if(l){var u=o.indexOf(l);if(-1!==u&&(t===document||t===window))return void(e.__root=t);var c=o.indexOf(t);if(-1===c)return;u<=c&&(a=u)}if((s=o[a]||e.target)!==t){r(e,"currentTarget",{configurable:!0,get:()=>s||n});var d=wn,f=An;On(null),Sn(null);try{for(var h,v=[];null!==s;){var g=s.assignedSlot||s.parentNode||s.host||null;try{var p=s["__"+i];null==p||s.disabled&&e.target!==s||p.call(s,e)}catch(e){h?v.push(e):h=e}if(e.cancelBubble||g===t||null===g)break;s=g}if(h){for(let e of v)queueMicrotask(()=>{throw e});throw h}}finally{e.__root=t,delete e.currentTarget,On(d),Sn(f)}}}function gi(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","\x3c!----\x3e"),t.content}function pi(e,t){var n=An;null===n.nodes_start&&(n.nodes_start=e,n.nodes_end=t)}function mi(e,t){var n,i=!!(1&t),r=!!(2&t),o=!e.startsWith("<!>");return()=>{if(Z)return pi(Q,null),Q;void 0===n&&(n=gi(o?e:"<!>"+e),i||(n=Rt(n)));var t=r||Ft?document.importNode(n,!0):n.cloneNode(!0);i?pi(Rt(t),t.lastChild):pi(t,t);return t}}function yi(e=""){if(!Z){var t=Dt(e+"");return pi(t,t),t}var n=Q;return 3!==n.nodeType&&(n.before(n=Dt()),ee(n)),pi(n,n),n}function bi(){if(Z)return pi(Q,null),Q;var e=document.createDocumentFragment(),t=document.createComment(""),n=Dt();return e.append(t,n),pi(t,n),e}function ki(e,t){if(Z)return An.nodes_end=Q,void te();null!==e&&e.before(t)}let $i=!0;function _i(e){$i=e}function wi(e,t){var n=null==t?"":"object"==typeof t?t+"":t;n!==(e.__t??=e.nodeValue)&&(e.__t=n,e.nodeValue=n+"")}function Ii(e,t){return Ai(e,t)}const Oi=new Map;function Ai(e,{target:t,anchor:n,props:r={},events:o,context:s,intro:a=!0}){Mt();var l=new Set,u=e=>{for(var n=0;n<e.length;n++){var i=e[n];if(!l.has(i)){l.add(i);var r=si(i);t.addEventListener(i,vi,{passive:r});var o=Oi.get(i);void 0===o?(document.addEventListener(i,vi,{passive:r}),Oi.set(i,1)):Oi.set(i,o+1)}}};u(i(li)),ui.add(u);var c=void 0,d=function(e){qe.ensure();const t=Qt(524352,e,!0);return(e={})=>new Promise(n=>{e.outro?hn(t,()=>{cn(t),n(void 0)}):(cn(t),n(void 0))})}(()=>{var i=n??t.appendChild(Dt());return function(e,t,n){new nt(e,t,n)}(i,{pending:()=>{}},t=>{s&&(Oe({}),pe.c=s);if(o&&(r.$$events=o),Z&&pi(t,null),$i=a,c=e(t,r)||{},$i=!0,Z&&(An.nodes_end=Q,null===Q||8!==Q.nodeType||"]"!==Q.data))throw J(),B;s&&Ae()}),()=>{for(var e of l){t.removeEventListener(e,vi);var r=Oi.get(e);0===--r?(document.removeEventListener(e,vi),Oi.delete(e)):Oi.set(e,r)}ui.delete(u),i!==n&&i.parentNode?.removeChild(i)}});return Si.set(c,d),c}let Si=new WeakMap;function Ci(e,t){const n=Si.get(e);return n?(Si.delete(e),n(t)):(U in e?console.warn("%c[svelte] state_proxy_unmount\n%cTried to unmount a state proxy, rather than a component\nhttps://svelte.dev/e/state_proxy_unmount",G,K):console.warn("%c[svelte] lifecycle_double_unmount\n%cTried to unmount a component that was not mounted\nhttps://svelte.dev/e/lifecycle_double_unmount",G,K),Promise.resolve())}class Ei{anchor;#x=new Map;#N=new Map;#F=new Map;#U=!0;constructor(e,t=!0){this.anchor=e,this.#U=t}#c=()=>{var e=De;if(this.#x.has(e)){var t=this.#x.get(e),n=this.#N.get(t);if(n)pn(n);else{var i=this.#F.get(t);i&&(this.#N.set(t,i.effect),this.#F.delete(t),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),n=i.effect)}for(const[t,n]of this.#x){if(this.#x.delete(t),t===e)break;const i=this.#F.get(n);i&&(cn(i.effect),this.#F.delete(n))}for(const[e,i]of this.#N){if(e===t)continue;const r=()=>{if(Array.from(this.#x.values()).includes(e)){var t=document.createDocumentFragment();yn(i,t),t.append(Dt()),this.#F.set(e,{effect:i,fragment:t})}else cn(i);this.#N.delete(e)};this.#U||!n?hn(i,r,!1):r()}}};#P=e=>{this.#x.delete(e);const t=Array.from(this.#x.values());for(const[e,n]of this.#F)t.includes(e)||(cn(n.effect),this.#F.delete(e))};ensure(e,t){var n=De;!t||this.#N.has(e)||this.#F.has(e)||this.#N.set(e,an(()=>t(this.anchor)));this.#x.set(n,e),Z&&(this.anchor=Q),this.#c()}}function Li(e,t,n=!1){Z&&te();var i=new Ei(e);function r(t,n){if(Z){if(t===(oe(e)===W)){var r=re();return ee(r),i.anchor=r,X(!1),i.ensure(t,n),void X(!0)}}i.ensure(t,n)}sn(()=>{var e=!1;t((t,n=!0)=>{e=!0,r(n,t)}),e||r(!1,null)},n?A:0)}let Ti=null;function xi(e){Ti=e}function Ni(e,t){return t}function Fi(e,n,r,o,s,a=null){var l=e,u={flags:n,items:new Map,first:null};if(!!(4&n)){var c=e;l=Z?ee(Rt(c)):c.appendChild(Dt())}Z&&te();var d,f,h=null,v=!1,g=new Map,p=lt(()=>{var e=r();return t(e)?e:null==e?[]:i(e)});function m(){!function(e,t,n,r,o,s,a,l,u){var c,d,f,h,v,g,p=!!(8&a),m=!!(3&a),y=t.length,b=n.items,k=n.first,$=k,_=null,I=[],O=[];if(p)for(g=0;g<y;g+=1)h=l(f=t[g],g),void 0!==(v=b.get(h))&&(v.a?.measure(),(d??=new Set).add(v));for(g=0;g<y;g+=1)if(h=l(f=t[g],g),void 0!==(v=b.get(h))){if(m&&Ui(v,f,g,a),0!==(v.e.f&w)&&(pn(v.e),p&&(v.a?.unfix(),(d??=new Set).delete(v))),v!==$){if(void 0!==c&&c.has(v)){if(I.length<O.length){var A,S=O[0];_=S.prev;var C=I[0],E=I[I.length-1];for(A=0;A<I.length;A+=1)Mi(I[A],S,o);for(A=0;A<O.length;A+=1)c.delete(O[A]);Di(n,C.prev,E.next),Di(n,_,C),Di(n,E,S),$=S,_=E,g-=1,I=[],O=[]}else c.delete(v),Mi(v,$,o),Di(n,v.prev,v.next),Di(n,v,null===_?n.first:_.next),Di(n,_,v),_=v;continue}for(I=[],O=[];null!==$&&$.k!==h;)0===($.e.f&w)&&(c??=new Set).add($),O.push($),$=$.next;if(null===$)continue;v=$}I.push(v),_=v,$=v.next}else{var L=r.get(h);if(void 0!==L){r.delete(h),b.set(h,L);var T=_?_.next:$;Di(n,_,L),Di(n,L,T),Mi(L,T,o),_=L}else{_=Pi($?$.e.nodes_start:o,n,_,null===_?n.first:_.next,f,h,g,s,a,u)}b.set(h,_),I=[],O=[],$=_.next}if(null!==$||void 0!==c){for(var x=void 0===c?[]:i(c);null!==$;)0===($.e.f&w)&&x.push($),$=$.next;var N=x.length;if(N>0){var F=4&a&&0===y?o:null;if(p){for(g=0;g<N;g+=1)x[g].a?.measure();for(g=0;g<N;g+=1)x[g].a?.fix()}!function(e,t,n){for(var i=e.items,r=[],o=t.length,s=0;s<o;s++)gn(t[s].e,r,!0);var a=o>0&&0===r.length&&null!==n;if(a){var l=n.parentNode;Bt(l),l.append(n),i.clear(),Di(e,t[0].prev,t[o-1].next)}vn(r,()=>{for(var n=0;n<o;n++){var r=t[n];a||(i.delete(r.k),Di(e,r.prev,r.next)),cn(r.e,!a)}})}(n,x,F)}}p&&Te(()=>{if(void 0!==d)for(v of d)v.a?.apply()});for(var U of(e.first=n.first&&n.first.e,e.last=_&&_.e,r.values()))cn(U.e);r.clear()}(f,d,u,g,l,s,n,o,r),null!==a&&(0===d.length?h?pn(h):h=an(()=>a(l)):null!==h&&hn(h,()=>{h=null}))}sn(()=>{f??=An;var e=(d=Hn(p)).length;if(v&&0===e)return;v=0===e;let t=!1;Z&&(oe(l)===W!==(0===e)&&(ee(l=re()),X(!1),t=!0));if(Z){for(var i,c=null,g=0;g<e;g++){if(8===Q.nodeType&&"]"===Q.data){l=Q,t=!0,X(!1);break}var y=d[g],b=o(y,g);i=Pi(Q,u,c,null,y,b,g,s,n,r),u.items.set(b,i),c=i}e>0&&ee(re())}Z?0===e&&a&&(h=an(()=>a(l))):m();t&&X(!0),Hn(p)}),Z&&(l=Q)}function Ui(e,t,n,i){1&i&&_t(e.v,t),2&i?_t(e.i,n):e.i=n}function Pi(e,t,n,i,r,o,s,a,l,u,c){var d=Ti,f=!!(1&l),h=f?!(16&l)?bt(r,!1,!1):mt(r):r,v=2&l?mt(s):s;f&&(h.trace=()=>{var e="number"==typeof v?s:v.v;u()[e]});var g={i:v,v:h,k:o,a:null,e:null,prev:n,next:i};Ti=g;try{if(null===e)document.createDocumentFragment().append(e=Dt());return g.e=an(()=>a(e,h,v,u),Z),g.e.prev=n&&n.e,g.e.next=i&&i.e,null===n?c||(t.first=g):(n.next=g,n.e.next=g.e),null!==i&&(i.prev=g,i.e.prev=g.e),g}finally{Ti=d}}function Mi(e,t,n){for(var i=e.next?e.next.e.nodes_start:n,r=t?t.e.nodes_start:n,o=e.e.nodes_start;null!==o&&o!==i;){var s=jt(o);r.before(o),o=s}}function Di(e,t,n){null===t?e.first=n:(t.next=n,t.e.next=n&&n.e),null!==n&&(n.prev=t,n.e.prev=t&&t.e)}function Ri(e,t,n){if(!t||t===function(e){let t=5381,n=(e=e.replace(Xn,"")).length;for(;n--;)t=(t<<5)-t^e.charCodeAt(n);return(t>>>0).toString(36)}(String(n??"")))return;let i;const r=e.__svelte_meta?.loc;r?i=`near ${r.file}:${r.line}:${r.column}`:ke?.[H]&&(i=`in ${ke[H]}`),function(e){console.warn(`%c[svelte] hydration_html_changed\n%c${e?`The value of an \`{@html ...}\` block ${e} changed between server and client renders. The client value will be ignored in favour of the server value`:"The value of an `{@html ...}` block changed between server and client renders. The client value will be ignored in favour of the server value"}\nhttps://svelte.dev/e/hydration_html_changed`,G,K)}(function(e){return e?.replace(/\//g,"/​")}(i))}function ji(e,t,n=!1,i=!1,r=!1){var o=e,s="";on(()=>{var e=An;if(s!==(s=t()??"")){if(null!==e.nodes_start&&(dn(e.nodes_start,e.nodes_end),e.nodes_start=e.nodes_end=null),""!==s){if(Z){for(var a=Q.data,l=te(),u=l;null!==l&&(8!==l.nodeType||""!==l.data);)u=l,l=jt(l);if(null===l)throw J(),B;return r||Ri(l.parentNode,a,s),pi(Q,u),void(o=ee(l))}var c=s+"";n?c=`<svg>${c}</svg>`:i&&(c=`<math>${c}</math>`);var d=gi(c);if((n||i)&&(d=Rt(d)),pi(Rt(d),d.lastChild),n||i)for(;Rt(d);)o.before(Rt(d));else o.before(d)}}else Z&&te()})}function Vi(e,t,n,i,r){Z&&te();var o=t.$$slots?.[n],s=!1;!0===o&&(o=t["default"===n?"children":n],s=!0),void 0===o?null!==r&&r(e):o(e,s?()=>i:i)}function zi(e,t,...n){var i=new Ei(e);sn(()=>{const e=t()??null;null==e&&function(){{const e=new Error("invalid_snippet\nCould not `{@render}` snippet due to the expression being `null` or `undefined`. Consider using optional chaining `{@render snippet?.()}`\nhttps://svelte.dev/e/invalid_snippet");throw e.name="Svelte error",e}}(),i.ensure(e,e&&(t=>e(t,...n)))},A)}function Wi(e,t,n){Z&&te();var i=new Ei(e);sn(()=>{var e=t()??null;i.ensure(e,e&&(t=>n(t,e)))},A)}function Bi(e,t,n,i,r,o){let s=Z;Z&&te();var a=null;Z&&1===Q.nodeType&&(a=Q,te());var l=Z?Q:e,u=Ti,c=new Ei(l,!1);sn(()=>{const e=t()||null;var n="svg"===e?"http://www.w3.org/2000/svg":null;return null===e?(c.ensure(null,null),void _i(!0)):(c.ensure(e,t=>{var r,o=Ti;if(xi(u),e){if(pi(a=Z?a:n?document.createElementNS(n,e):document.createElement(e),a),i){Z&&(r=e,ai.includes(r))&&a.append(document.createComment(""));var s=Z?Rt(a):a.appendChild(Dt());Z&&(null===s?X(!1):ee(s)),i(a,s)}An.nodes_end=a,t.before(a)}xi(o),Z&&ee(t)}),_i(!0),()=>{e&&_i(!1)})},A),Zt(()=>{_i(!0)}),s&&(X(!0),ee(l))}function qi(e,t){var n,i=void 0;sn(()=>{i!==(i=t())&&(n&&(cn(n),n=null),i&&(n=an(()=>{tn(()=>i(e))})))})}function Hi(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=Hi(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function Gi(e){return"object"==typeof e?function(){for(var e,t,n=0,i="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=Hi(e))&&(i&&(i+=" "),i+=t);return i}(e):e??""}const Ki=[..." \t\n\r\f \v\ufeff"];function Ji(e,t=!1){var n=t?" !important;":";",i="";for(var r in e){var o=e[r];null!=o&&""!==o&&(i+=" "+r+": "+o+n)}return i}function Yi(e){return"-"!==e[0]||"-"!==e[1]?e.toLowerCase():e}function Qi(e,t,n,i,r,o){var s=e.__className;if(Z||s!==n||void 0===s){var a=function(e,t,n){var i=null==e?"":""+e;if(t&&(i=i?i+" "+t:t),n)for(var r in n)if(n[r])i=i?i+" "+r:r;else if(i.length)for(var o=r.length,s=0;(s=i.indexOf(r,s))>=0;){var a=s+o;0!==s&&!Ki.includes(i[s-1])||a!==i.length&&!Ki.includes(i[a])?s=a:i=(0===s?"":i.substring(0,s))+i.substring(a+1)}return""===i?null:i}(n,i,o);Z&&a===e.getAttribute("class")||(null==a?e.removeAttribute("class"):t?e.className=a:e.setAttribute("class",a)),e.__className=n}else if(o&&r!==o)for(var l in o){var u=!!o[l];null!=r&&u===!!r[l]||e.classList.toggle(l,u)}return o}function Zi(e,t={},n,i){for(var r in n){var o=n[r];t[r]!==o&&(null==n[r]?e.style.removeProperty(r):e.style.setProperty(r,o,i))}}function Xi(e,t,n,i){var r=e.__style;if(Z||r!==t){var o=function(e,t){if(t){var n,i,r="";if(Array.isArray(t)?(n=t[0],i=t[1]):n=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var o=!1,s=0,a=!1,l=[];n&&l.push(...Object.keys(n).map(Yi)),i&&l.push(...Object.keys(i).map(Yi));var u=0,c=-1;const t=e.length;for(var d=0;d<t;d++){var f=e[d];if(a?"/"===f&&"*"===e[d-1]&&(a=!1):o?o===f&&(o=!1):"/"===f&&"*"===e[d+1]?a=!0:'"'===f||"'"===f?o=f:"("===f?s++:")"===f&&s--,!a&&!1===o&&0===s)if(":"===f&&-1===c)c=d;else if(";"===f||d===t-1){if(-1!==c){var h=Yi(e.substring(u,c).trim());l.includes(h)||(";"!==f&&d++,r+=" "+e.substring(u,d).trim()+";")}u=d+1,c=-1}}}return n&&(r+=Ji(n)),i&&(r+=Ji(i,!0)),""===(r=r.trim())?null:r}return null==e?null:String(e)}(t,i);Z&&o===e.getAttribute("style")||(null==o?e.removeAttribute("style"):e.style.cssText=o),e.__style=t}else i&&(Array.isArray(i)?(Zi(e,n?.[0],i[0]),Zi(e,n?.[1],i[1],"important")):Zi(e,n,i));return i}function er(e,n,i=!1){if(e.multiple){if(null==n)return;if(!t(n))return void console.warn("%c[svelte] select_multiple_invalid_value\n%cThe `value` property of a `<select multiple>` element should be an array, but it received a non-array value. The selection will be kept as is.\nhttps://svelte.dev/e/select_multiple_invalid_value",G,K);for(var r of e.options)r.selected=n.includes(tr(r))}else{for(r of e.options){if(Tt(tr(r),n))return void(r.selected=!0)}i&&void 0===n||(e.selectedIndex=-1)}}function tr(e){return"__value"in e?e.__value:e.value}const nr=Symbol("class"),ir=Symbol("style"),rr=Symbol("is custom element"),or=Symbol("is html");function sr(e){if(Z){var t=!1,n=()=>{if(!t){if(t=!0,e.hasAttribute("value")){var n=e.value;lr(e,"value",null),e.value=n}if(e.hasAttribute("checked")){var i=e.checked;lr(e,"checked",null),e.checked=i}}};e.__on_r=n,Te(n),Gt()}}function ar(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function lr(e,t,n,i){var r=cr(e);Z&&(r[t]=e.getAttribute(t),"src"===t||"srcset"===t||"href"===t&&"LINK"===e.nodeName)?i||function(e,t,n){if("srcset"===t&&function(e,t){var n=vr(e.srcset),i=vr(t);return i.length===n.length&&i.every(([e,t],i)=>t===n[i][1]&&(hr(n[i][0],e)||hr(e,n[i][0])))}(e,n))return;if(hr(e.getAttribute(t)??"",n))return;!function(e,t,n){console.warn(`%c[svelte] hydration_attribute_changed\n%cThe \`${e}\` attribute on \`${t}\` changed its value between server and client renders. The client value, \`${n}\`, will be ignored in favour of the server value\nhttps://svelte.dev/e/hydration_attribute_changed`,G,K)}(t,e.outerHTML.replace(e.innerHTML,e.innerHTML&&"..."),String(n))}(e,t,n??""):r[t]!==(r[t]=n)&&("loading"===t&&(e[M]=n),null==n?e.removeAttribute(t):"string"!=typeof n&&fr(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function ur(e,t,n=[],i=[],r=[],o,s=!1,a=!1){it(r,n,i,n=>{var i=void 0,r={},l="SELECT"===e.nodeName,u=!1;if(sn(()=>{var c=t(...n.map(Hn)),d=function(e,t,n,i,r=!1,o=!1){if(Z&&r&&"INPUT"===e.tagName){var s=e;("checkbox"===s.type?"defaultChecked":"defaultValue")in n||sr(s)}var a=cr(e),l=a[rr],u=!a[or];let c=Z&&l;c&&X(!1);var d=t||{},f="OPTION"===e.tagName;for(var h in t)h in n||(n[h]=null);n.class?n.class=Gi(n.class):(i||n[nr])&&(n.class=null),n[ir]&&(n.style??=null);var v=fr(e);for(const k in n){let $=n[k];if(f&&"value"===k&&null==$)e.value=e.__value="",d[k]=$;else if("class"!==k)if("style"!==k){var g=d[k];if($!==g||void 0===$&&e.hasAttribute(k)){d[k]=$;var p=k[0]+k[1];if("$$"!==p)if("on"===p){const _={},w="$$"+k;let I=k.slice(2);var m=ni(I);if(ei(I)&&(I=I.slice(0,-7),_.capture=!0),!m&&g){if(null!=$)continue;e.removeEventListener(I,d[w],_),d[w]=null}if(null!=$)if(m)e[`__${I}`]=$,fi([I]);else{function O(e){d[k].call(this,e)}d[w]=ci(I,e,O,_)}else m&&(e[`__${I}`]=void 0)}else if("style"===k)lr(e,k,$);else if("autofocus"===k)qt(e,Boolean($));else if(l||"__value"!==k&&("value"!==k||null==$))if("selected"===k&&f)ar(e,$);else{var y=k;u||(y=ri(y));var b="defaultValue"===y||"defaultChecked"===y;if(null!=$||l||b)b||v.includes(y)&&(l||"string"!=typeof $)?(e[y]=$,y in a&&(a[y]=q)):"function"!=typeof $&&lr(e,y,$,o);else if(a[k]=null,"value"===y||"checked"===y){let A=e;const S=void 0===t;if("value"===y){let C=A.defaultValue;A.removeAttribute(y),A.defaultValue=C,A.value=A.__value=S?C:null}else{let E=A.defaultChecked;A.removeAttribute(y),A.defaultChecked=E,A.checked=!!S&&E}}else e.removeAttribute(k)}else e.value=e.__value=$}}else Xi(e,$,t?.[ir],n[ir]),d[k]=$,d[ir]=n[ir];else Qi(e,"http://www.w3.org/1999/xhtml"===e.namespaceURI,$,i,t?.[nr],n[nr]),d[k]=$,d[nr]=n[nr]}return c&&X(!0),d}(e,i,c,o,s,a);u&&l&&"value"in c&&er(e,c.value);for(let e of Object.getOwnPropertySymbols(r))c[e]||cn(r[e]);for(let t of Object.getOwnPropertySymbols(c)){var f=c[t];"@attach"!==t.description||i&&f===i[t]||(r[t]&&cn(r[t]),r[t]=an(()=>qi(e,()=>f))),d[t]=f}i=d}),l){var c=e;tn(()=>{er(c,i.value,!0),function(e){var t=new MutationObserver(()=>{er(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),Zt(()=>{t.disconnect()})}(c)})}u=!0})}function cr(e){return e.__attributes??={[rr]:e.nodeName.includes("-"),[or]:"http://www.w3.org/1999/xhtml"===e.namespaceURI}}var dr=new Map;function fr(e){var t,n=e.getAttribute("is")||e.nodeName,i=dr.get(n);if(i)return i;dr.set(n,i=[]);for(var r=e,o=Element.prototype;o!==r;){for(var a in t=s(r))t[a].set&&i.push(a);r=u(r)}return i}function hr(e,t){return e===t||new URL(e,document.baseURI).href===new URL(t,document.baseURI).href}function vr(e){return e.split(",").map(e=>e.trim().split(" ").filter(Boolean))}const gr={tick:e=>requestAnimationFrame(e),now:()=>performance.now(),tasks:new Set};function pr(){const e=gr.now();gr.tasks.forEach(t=>{t.c(e)||(gr.tasks.delete(t),t.f())}),0!==gr.tasks.size&&gr.tick(pr)}function mr(e,t){Kt(()=>{e.dispatchEvent(new CustomEvent(t))})}function yr(e){if("float"===e)return"cssFloat";if("offset"===e)return"cssOffset";if(e.startsWith("--"))return e;const t=e.split("-");return 1===t.length?t[0]:t[0]+t.slice(1).map(e=>e[0].toUpperCase()+e.slice(1)).join("")}function br(e){const t={},n=e.split(";");for(const e of n){const[n,i]=e.split(":");if(!n||void 0===i)break;t[yr(n.trim())]=i.trim()}return t}const kr=e=>e;function $r(e,t,n,i){var r,o,s,a=!!(4&e),l=t.inert,u=t.style.overflow;function c(){return Kt(()=>r??=n()(t,i?.()??{},{direction:"both"}))}var d={is_global:a,in(){t.inert=l,mr(t,"introstart"),o=_r(t,c(),s,1,()=>{mr(t,"introend"),o?.abort(),o=r=void 0,t.style.overflow=u})},out(e){t.inert=!0,mr(t,"outrostart"),s=_r(t,c(),o,0,()=>{mr(t,"outroend"),e?.()})},stop:()=>{o?.abort(),s?.abort()}},f=An;if((f.transitions??=[]).push(d),$i){var h=a;if(!h){for(var v=f.parent;v&&0!==(v.f&A);)for(;(v=v.parent)&&0===(v.f&p););h=!v||0!==(v.f&O)}h&&tn(()=>{Kn(()=>d.in())})}}function _r(e,t,n,i,r){var o=1===i;if(d(t)){var s,a=!1;return Te(()=>{if(!a){var l=t({direction:o?"in":"out"});s=_r(e,l,n,i,r)}}),{abort:()=>{a=!0,s?.abort()},deactivate:()=>s.deactivate(),reset:()=>s.reset(),t:()=>s.t()}}if(n?.deactivate(),!t?.duration)return r(),{abort:f,deactivate:f,reset:f,t:()=>i};const{delay:l=0,css:u,tick:c,easing:h=kr}=t;var v=[];if(o&&void 0===n&&(c&&c(0,1),u)){var g=br(u(0,1));v.push(g,g)}var p=()=>1-i,m=e.animate(v,{duration:l,fill:"forwards"});return m.onfinish=()=>{m.cancel();var o=n?.t()??1-i;n?.abort();var s=i-o,a=t.duration*Math.abs(s),l=[];if(a>0){var d=!1;if(u)for(var f=Math.ceil(a/(1e3/60)),v=0;v<=f;v+=1){var g=o+s*h(v/f),y=br(u(g,1-g));l.push(y),d||="hidden"===y.overflow}d&&(e.style.overflow="hidden"),p=()=>{var e=m.currentTime;return o+s*h(e/a)},c&&function(e){let t;0===gr.tasks.size&&gr.tick(pr),new Promise(n=>{gr.tasks.add(t={c:e,f:n})})}(()=>{if("running"!==m.playState)return!1;var e=p();return c(e,1-e),!0})}(m=e.animate(l,{duration:a,fill:"forwards"})).onfinish=()=>{p=()=>i,c?.(i,1-i),r()}},{abort:()=>{m&&(m.cancel(),m.effect=null,m.onfinish=f)},deactivate:()=>{r=f},reset:()=>{0===i&&c?.(1,0)},t:()=>p()}}function wr(e,t,n=t){var i=new WeakSet;Jt(e,"input",async r=>{"checkbox"===e.type&&V();var o=r?e.defaultValue:e.value;if(o=Or(e)?Ar(o):o,n(o),null!==De&&i.add(De),await qn(),o!==(o=t())){var s=e.selectionStart,a=e.selectionEnd,l=e.value.length;if(e.value=o??"",null!==a){var u=e.value.length;s===a&&a===l&&u>l?(e.selectionStart=u,e.selectionEnd=u):(e.selectionStart=s,e.selectionEnd=Math.min(a,u))}}}),(Z&&e.defaultValue!==e.value||null==Kn(t)&&e.value)&&(n(Or(e)?Ar(e.value):e.value),null!==De&&i.add(De)),rn(()=>{"checkbox"===e.type&&V();var n=t();if(e===document.activeElement){var r=Re??De;if(i.has(r))return}Or(e)&&n===Ar(e.value)||("date"!==e.type||n||e.value)&&n!==e.value&&(e.value=n??"")})}function Ir(e,t,n=t){Jt(e,"change",t=>{var i=t?e.defaultChecked:e.checked;n(i)}),(Z&&e.defaultChecked!==e.checked||null==Kn(t))&&n(e.checked),rn(()=>{var n=t();e.checked=Boolean(n)})}function Or(e){var t=e.type;return"number"===t||"range"===t}function Ar(e){return""===e?null:+e}function Sr(e,t){return e===t||e?.[U]===t}function Cr(e={},t,n,i){return tn(()=>{var r,o;return rn(()=>{r=o,o=i?.()||[],Kn(()=>{e!==n(...o)&&(t(e,...o),r&&Sr(n(...r),e)&&t(null,...r))})}),()=>{Te(()=>{o&&Sr(n(...o),e)&&t(null,...o)})}}),e}function Er(e){return function(...t){return t[0].preventDefault(),e?.apply(this,t)}}function Lr(e=!1){const t=pe,n=t.l.u;if(!n)return;let i=()=>Qn(t.s);if(e){let e=0,n={};const r=st(()=>{let i=!1;const r=t.s;for(const e in r)r[e]!==n[e]&&(n[e]=r[e],i=!0);return i&&e++,e});i=()=>Hn(r)}var o;n.b.length&&(o=()=>{Tr(t,i),v(n.b)},Yt("$effect.pre"),r(o,"name",{value:"$effect.pre"}),Qt(1048584,o,!0)),Xt(()=>{const e=Kn(()=>n.m.map(h));return()=>{for(const t of e)"function"==typeof t&&t()}}),n.a.length&&Xt(()=>{Tr(t,i),v(n.a)})}function Tr(e,t){if(e.l.s)for(const t of e.l.s)Hn(t);t()}function xr(e,n){var i=e.$$events?.[n.type],r=t(i)?i.slice():null==i?[]:[i];for(var o of r)o.call(this,n)}function Nr(e,t,n){if(null==e)return t(void 0),f;const i=Kn(()=>e.subscribe(t,n));return i.unsubscribe?()=>i.unsubscribe():i}const Fr=[];function Ur(e,t=f){let n=null;const i=new Set;function r(t){if(ae(e,t)&&(e=t,n)){const t=!Fr.length;for(const t of i)t[1](),Fr.push(t,e);if(t){for(let e=0;e<Fr.length;e+=2)Fr[e][0](Fr[e+1]);Fr.length=0}}}function o(t){r(t(e))}return{set:r,update:o,subscribe:function(s,a=f){const l=[s,a];return i.add(l),1===i.size&&(n=t(r,o)||f),s(e),()=>{i.delete(l),0===i.size&&n&&(n(),n=null)}}}}let Pr=!1,Mr=Symbol();function Dr(e,t,n){const i=n[t]??={store:null,source:bt(void 0),unsubscribe:f};if(i.source.label=t,i.store!==e&&!(Mr in n))if(i.unsubscribe(),i.store=e??null,null==e)i.source.v=void 0,i.unsubscribe=f;else{var r=!0;i.unsubscribe=Nr(e,e=>{r?i.source.v=e:$t(i.source,e)}),r=!1}return e&&Mr in n?function(e){let t;return Nr(e,e=>t=e)(),t}(e):Hn(i.source)}function Rr(){const e={};return[e,function(){Zt(()=>{for(var t in e){e[t].unsubscribe()}r(e,Mr,{enumerable:!1,value:!0})})}]}function jr(e,t=1){const n=e();return e(n+t),n}const Vr={get(e,t){if(!e.exclude.includes(t))return e.props[t]},set:(e,t)=>(function(e){{const t=new Error(`props_rest_readonly\nRest element properties of \`$props()\` such as \`${e}\` are readonly\nhttps://svelte.dev/e/props_rest_readonly`);throw t.name="Svelte error",t}}(`${e.name}.${String(t)}`),!1),getOwnPropertyDescriptor(e,t){if(!e.exclude.includes(t))return t in e.props?{enumerable:!0,configurable:!0,value:e.props[t]}:void 0},has:(e,t)=>!e.exclude.includes(t)&&t in e.props,ownKeys:e=>Reflect.ownKeys(e.props).filter(t=>!e.exclude.includes(t))};function zr(e,t,n){return new Proxy({props:e,exclude:t,name:n,other:{},to_proxy:[]},Vr)}const Wr={get(e,t){if(!e.exclude.includes(t))return Hn(e.version),t in e.special?e.special[t]():e.props[t]},set(e,t,n){if(!(t in e.special)){var i=An;try{Sn(e.parent_effect),e.special[t]=Gr({get[t](){return e.props[t]}},t,4)}finally{Sn(i)}}return e.special[t](n),It(e.version),!0},getOwnPropertyDescriptor(e,t){if(!e.exclude.includes(t))return t in e.props?{enumerable:!0,configurable:!0,value:e.props[t]}:void 0},deleteProperty:(e,t)=>(e.exclude.includes(t)||(e.exclude.push(t),It(e.version)),!0),has:(e,t)=>!e.exclude.includes(t)&&t in e.props,ownKeys:e=>Reflect.ownKeys(e.props).filter(t=>!e.exclude.includes(t))};function Br(e,t){return new Proxy({props:e,exclude:t,special:{},version:mt(0),parent_effect:An},Wr)}const qr={get(e,t){let n=e.props.length;for(;n--;){let i=e.props[n];if(d(i)&&(i=i()),"object"==typeof i&&null!==i&&t in i)return i[t]}},set(e,t,n){let i=e.props.length;for(;i--;){let r=e.props[i];d(r)&&(r=r());const s=o(r,t);if(s&&s.set)return s.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let i=e.props[n];if(d(i)&&(i=i()),"object"==typeof i&&null!==i&&t in i){const e=o(i,t);return e&&!e.configurable&&(e.configurable=!0),e}}},has(e,t){if(t===U||t===P)return!1;for(let n of e.props)if(d(n)&&(n=n()),null!=n&&t in n)return!0;return!1},ownKeys(e){const t=[];for(let n of e.props)if(d(n)&&(n=n()),n){for(const e in n)t.includes(e)||t.push(e);for(const e of Object.getOwnPropertySymbols(n))t.includes(e)||t.push(e)}return t}};function Hr(...e){return new Proxy({props:e},qr)}function Gr(e,t,n,i){var r,s,a=!ue||!!(2&n),l=!!(8&n),u=!!(16&n),c=i,d=!0,f=()=>(d&&(d=!1,c=u?Kn(i):i),c);if(l){var h=U in e||P in e;r=o(e,t)?.set??(h&&t in e?n=>e[t]=n:void 0)}var v,g=!1;if(l?[s,g]=function(e){var t=Pr;try{return Pr=!1,[e(),Pr]}finally{Pr=t}}(()=>e[t]):s=e[t],void 0===s&&void 0!==i&&(s=f(),r&&(a&&function(e){{const t=new Error(`props_invalid_value\nCannot do \`bind:${e}={undefined}\` when \`${e}\` has a fallback value\nhttps://svelte.dev/e/props_invalid_value`);throw t.name="Svelte error",t}}(t),r(s))),v=a?()=>{var n=e[t];return void 0===n?f():(d=!0,n)}:()=>{var n=e[t];return void 0!==n&&(c=void 0),void 0===n?c:n},a&&!(4&n))return v;if(r){var p=e.$$legacy;return function(e,t){return arguments.length>0?(a&&t&&!p&&!g||r(t?v():e),e):v()}}var m=!1,y=(1&n?st:lt)(()=>(m=!1,v()));y.label=t,l&&Hn(y);var b=An;return function(e,t){if(arguments.length>0){const n=t?Hn(y):a&&l?Ct(e):e;return $t(y,n),m=!0,void 0!==c&&(c=n),e}return $n&&m||0!==(b.f&I)?y.v:Hn(y)}}{function Nv(e){if(!(e in globalThis)){let t;Object.defineProperty(globalThis,e,{configurable:!0,get:()=>{if(void 0!==t)return t;!function(e){{const t=new Error(`rune_outside_svelte\nThe \`${e}\` rune is only available inside \`.svelte\` and \`.svelte.js/ts\` files\nhttps://svelte.dev/e/rune_outside_svelte`);throw t.name="Svelte error",t}}(e)},set:e=>{t=e}})}}Nv("$state"),Nv("$effect"),Nv("$derived"),Nv("$inspect"),Nv("$props"),Nv("$bindable")}function Kr(e){null===pe&&j("onMount"),ue&&null!==pe.l?Zr(pe).m.push(e):Xt(()=>{const t=Kn(e);if("function"==typeof t)return t})}function Jr(e){null===pe&&j("onDestroy"),Kr(()=>()=>Kn(e))}function Yr(){const e=pe;return null===e&&j("createEventDispatcher"),(n,i,r)=>{const o=e.s.$$events?.[n];if(o){const s=t(o)?o.slice():[o],a=function(e,t,{bubbles:n=!1,cancelable:i=!1}={}){return new CustomEvent(e,{detail:t,bubbles:n,cancelable:i})}(n,i,r);for(const t of s)t.call(e.x,a);return!a.defaultPrevented}return!0}}function Qr(e){null===pe&&j("afterUpdate"),null===pe.l&&z("afterUpdate"),Zr(pe).a.push(e)}function Zr(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}var Xr=Object.freeze({__proto__:null,afterUpdate:Qr,beforeUpdate:function(e){null===pe&&j("beforeUpdate"),null===pe.l&&z("beforeUpdate"),Zr(pe).b.push(e)},createContext:function(){const e={};return[()=>(Ie(e)||function(){{const e=new Error("missing_context\nContext was not set in a parent component\nhttps://svelte.dev/e/missing_context");throw e.name="Svelte error",e}}(),_e(e)),t=>we(e,t)]},createEventDispatcher:Yr,createRawSnippet:function(e){return(t,...n)=>{var i,r=e(...n);Z?(i=Q,te()):(null===jt(i=Rt(gi(r.render().trim())))&&1===i.nodeType||console.warn("%c[svelte] invalid_raw_snippet_render\n%cThe `render` function passed to `createRawSnippet` should return HTML for a single element\nhttps://svelte.dev/e/invalid_raw_snippet_render",G,K),t.before(i));const o=r.setup?.(i);pi(i,i),"function"==typeof o&&Zt(o)}},flushSync:He,fork:function(e){!function(){{const e=new Error("experimental_async_fork\nCannot use `fork(...)` unless the `experimental.async` compiler option is `true`\nhttps://svelte.dev/e/experimental_async_fork");throw e.name="Svelte error",e}}(),null!==De&&function(){{const e=new Error("fork_timing\nCannot create a fork inside an effect or when state changes are pending\nhttps://svelte.dev/e/fork_timing");throw e.name="Svelte error",e}}();var t=qe.ensure();t.is_fork=!0;var n=!1,i=t.settled();for(var[r,o]of(He(e),t.previous))r.v=o;return{commit:async()=>{if(n)await i;else{for(var[e,r]of(Me.has(t)||function(){{const e=new Error("fork_discarded\nCannot commit a fork that was already discarded\nhttps://svelte.dev/e/fork_discarded");throw e.name="Svelte error",e}}(),n=!0,t.is_fork=!1,t.current))e.v=r;He(()=>{var e=new Set;for(var n of t.current.keys())Ze(n,e);gt(e),wt()}),t.revive(),await i}},discard:()=>{!n&&Me.has(t)&&(Me.delete(t),t.discard())}}},getAbortSignal:function(){return null===wn&&function(){{const e=new Error("get_abort_signal_outside_reaction\n`getAbortSignal()` can only be called inside an effect or derived\nhttps://svelte.dev/e/get_abort_signal_outside_reaction");throw e.name="Svelte error",e}}(),(wn.ac??=new AbortController).signal},getAllContexts:function(){return Ce("getAllContexts")},getContext:_e,hasContext:Ie,hydrate:function(e,t){Mt(),t.intro=t.intro??!1;const n=t.target,i=Z,r=Q;try{for(var o=Rt(n);o&&(8!==o.nodeType||"["!==o.data);)o=jt(o);if(!o)throw B;X(!0),ee(o);const i=Ai(e,{...t,anchor:o});return X(!1),i}catch(i){if(i instanceof Error&&i.message.split("\n").some(e=>e.startsWith("https://svelte.dev/e/")))throw i;return i!==B&&console.warn("Failed to hydrate: ",i),!1===t.recover&&function(){{const e=new Error("hydration_failed\nFailed to hydrate the application\nhttps://svelte.dev/e/hydration_failed");throw e.name="Svelte error",e}}(),Mt(),Bt(n),X(!1),Ii(e,t)}finally{X(i),ee(r)}},mount:Ii,onDestroy:Jr,onMount:Kr,setContext:we,settled:function(){return qe.ensure().settled()},tick:qn,unmount:Ci,untrack:Kn});function eo(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function to(e,t,n){return t=fo(t),go(e,vo()?Reflect.construct(t,n||[],fo(e).constructor):t.apply(e,n))}function no(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function io(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function ro(e,t){return e.get(eo(e,t))}function oo(e,t,n){no(e,t),t.set(e,n)}function so(e,t,n){return e.set(eo(e,t),n),n}function ao(e,t){no(e,t),t.add(e)}function lo(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,mo(i.key),i)}}function uo(e,t,n){return t&&lo(e.prototype,t),n&&lo(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function co(e,t,n){return(t=mo(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function fo(e){return fo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},fo(e)}function ho(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&po(e,t)}function vo(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(vo=function(){return!!e})()}function go(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function po(e,t){return po=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},po(e,t)}function mo(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}"undefined"!=typeof window&&((window.__svelte??={}).v??=new Set).add("5");const yo=Object.freeze({checkbox:function(e,t=void 0){return"object"==typeof t&&Object.hasOwn(t,"checked")&&Object.hasOwn(t,"unchecked")?e.checked?t.checked:t.unchecked:Object.hasOwn(e,"value")&&void 0!==e.value?!!e.checked&&e.value:e.checked}});let bo=function(){function e(){io(this,e)}return uo(e,null,[{key:"inputValuesExtractors",get:function(){return yo}},{key:"extractValueFromInput",value:function(t,n=void 0){return t?Object.hasOwn(e.inputValuesExtractors,t.type)?e.inputValuesExtractors[t.type](t,n):t.value:n}},{key:"onInput",value:function(t,n,i=void 0,r={}){if("function"==typeof n)return function(o){"function"==typeof o?.preventDefault&&o?.preventDefault();const s=e.extractValueFromInput(o?.currentTarget,i);return n({field:t,value:s},o,r)}}},{key:"isEnterEvent",value:function(e){return"Enter"===e.key&&!e.altKey&&!e.ctrlKey&&!e.shiftKey}},{key:"onlyOnEnter",value:function(t){return function(n){return!e.isEnterEvent(n)||t(n)}}},{key:"isMobile",value:function(){const e=window.matchMedia||window.msMatchMedia;if(e){let t="(pointer:coarse)";if(arguments.length){t=`only screen and (max-width: ${"boolean"==typeof arguments[0]?this.MOBILE_WIDTH_BREAK_POINT:arguments[0]}px)`}return e(t).matches}return!1}},{key:"removeBodyScroll",value:function(){document.body.classList.add(this.SCROLL_DISABLER_CLASS)}},{key:"restoreBodyScroll",value:function(){document.body.classList.remove(this.SCROLL_DISABLER_CLASS)}},{key:"formatPhone",value:function(e,t=this.FILLER){const n=[1,2,2,2,3,3,3,4,4,5,5];let i=e.replace(/\D/g,"");if(i.length>11){let e=i.length-11;for(;e>0;)e--,n.unshift(1)}let r=["","","","",""];Array.from(i).forEach(function(e,t){let i=n[t];r[i-1]=r[i-1]+e});const o=n.reduce(function(e,t){return void 0===e[t]?e[t]=1:e[t]+=1,e},{});for(let e in r){let n=o[parseInt(e)+1]-r[e].length;for(;n>0;)r[e]=r[e]+t,n--}return`+${r[0]} (${r[1]}) ${r[2]}-${r[3]}-${r[4]}`}},{key:"setMoneySign",value:function(e){this.MONEY_SIGN=e}},{key:"formatPrice",value:function(e){let t=Math.floor(e/100),n=e%100;return`${this.MONEY_SIGN}${t.toString()}.${n.toString()}`}},{key:"formatLocaleDatetime",value:function(e,t={date:!0,time:!0}){const n=e.toLocaleDateString(window.navigator.language),i=e.toLocaleTimeString(window.navigator.language);return t.date&&t.time?`${n} ${i}`:t.date&&!t.time?n:i}},{key:"tryFormatLocaleDateTime",value:function(t,n={date:!0,time:!0}){if("string"==typeof t||"number"==typeof t){const i=new Date(t);return e.formatLocaleDatetime(i,n)}return"object"==typeof t?e.formatLocaleDatetime(t,n):""}},{key:"formatTimestamp",value:function(e,t=0){let n=60*((new Date).getTimezoneOffset()-t)*1e3;return new Date(parseInt(e)-n).toLocaleString(window.navigator.language)}},{key:"declOfNum",value:function(e,t){let n=(e=Math.abs(e)%100)%10;return e>10&&e<20?t[2]:n>1&&n<5?t[1]:1==n?t[0]:t[2]}},{key:"humanizedTimeDiff",value:function(e){let t,n=(new Date).getTime(),i=Math.round((n-e)/1e3);if(i<60)return t=this.declOfNum(i,this.TIME.SECONDS),`${i} ${t} назад`;if(i<3600){let e=Math.floor(i/60);return t=this.declOfNum(e,this.TIME.MINUTES),`${e} ${t} назад`}{let e=Math.floor(i/3600);return t=this.declOfNum(e,this.TIME.HOURS),`${e} ${t} назад`}}},{key:"stylesObjectToString",value:function(e={}){if("object"!=typeof e)return"";Object.keys(e).map(function(t){return`${t}: ${e.prop};`}).join("")}},{key:"stringOrNumber",value:function(e){return["string","number"].indexOf(typeof e)>-1}},{key:"stringsOfNumbers",value:function(e){return e.every(this.stringOrNumber)}}])}();co(bo,"CLEAR_MACRO","__CLEAR__"),co(bo,"ERROR_DEFAULT","Что пошло не так."),co(bo,"DEFAULT_REDIRECT_TIMEOUT",3e3),co(bo,"CLASS_OK","is-success"),co(bo,"CLASS_ERR","is-danger"),co(bo,"SCROLL_DISABLER_CLASS","remove-scroll"),co(bo,"FILLER","_"),co(bo,"SCROLL_OPTIONS",{top:0,behavior:"smooth"}),co(bo,"MOBILE_WIDTH_BREAK_POINT",760),co(bo,"MONEY_SIGN","&#8381;"),co(bo,"TIME",{SECONDS:["секунду","секунды","секунд"],MINUTES:["минуту","минуты","минут"],HOURS:["час","часа","часов"]});var ko=mi("<div><!></div>");function $o(e,t){let n=Gr(t,"class",3,""),i=zr(t,["$$slots","$$events","$$legacy","class","children"]);var r=ko();ur(r,()=>({class:`block ${n()??""}`,...i})),zi(Vt(r),()=>t.children??f),ne(r),ki(e,r)}var _o=mi("<div><!></div>");function wo(e,t){Oe(t,!0);let n=Gr(t,"id",3,""),i=Gr(t,"class",3,""),r=Gr(t,"role",3,"button"),o=Gr(t,"tabIndex",3,0),s=Gr(t,"onclick",3,()=>!0);const a=t.onkeyup??(s()?bo.onlyOnEnter(s()):void 0);var l=_o();l.__click=function(...e){s()?.apply(this,e)},l.__keyup=a,zi(Vt(l),()=>t.children??f),ne(l),on(()=>{lr(l,"id",n()),Qi(l,1,`box ${i()??""} `),lr(l,"role",r()),lr(l,"tabindex",o())}),ki(e,l),Ae()}fi(["click","keyup"]);var Io=mi("<div><!></div>");function Oo(e,t){Oe(t,!0);let n=Gr(t,"id",3,""),i=Gr(t,"class",3,""),r=Gr(t,"role",3,"button"),o=Gr(t,"tabIndex",3,0),s=Gr(t,"onclick",3,()=>!0);const a=t.onkeyup??(s()?bo.onlyOnEnter(s()):void 0);var l=Io();l.__click=function(...e){s()?.apply(this,e)},l.__keyup=a,zi(Vt(l),()=>t.children??f),ne(l),on(()=>{lr(l,"id",n()),Qi(l,1,`content ${i()??""}`),lr(l,"role",r()),lr(l,"tabindex",o())}),ki(e,l),Ae()}fi(["click","keyup"]);var Ao=mi("<div><!></div>");function So(e,t){Oe(t,!0);let n=Gr(t,"class",3,""),i=Gr(t,"preventDefault",3,!0),r=Gr(t,"click",3,!0),o=Gr(t,"enter",3,!0),s=zr(t,["$$slots","$$events","$$legacy","class","preventDefault","click","enter","callback","children"]);const a=e=>{i()&&e.preventDefault(),t.callback(e)},l=e=>{i()&&e.preventDefault(),e&&"Enter"==e.key&&t.callback(e)};var u=Ao();ur(u,()=>({class:n(),role:"button",tabindex:"0",onkeyup:o()?l:void 0,onclick:r()?a:void 0,...s})),zi(Vt(u),()=>t.children),ne(u),ki(e,u),Ae()}var Co=Object.freeze({__proto__:null,UIBlock:$o,UIBlockInnerVertical:function(e,t){Oe(t,!0);let n=Gr(t,"id",3,""),i=Gr(t,"class",3,""),r=Gr(t,"role",3,"button"),o=Gr(t,"tabIndex",3,0),s=Gr(t,"onclick",3,()=>!0),a=yt("block-inner-vertical");Xt(()=>{$t(a,`block-inner-vertical ${i()}`)});const l=t.onkeyup??(s()?bo.onlyOnEnter(s()):void 0);$o(e,{get id(){return n()},get class(){return Hn(a)},get onclick(){return s()},get onkeyup(){return l},get role(){return r()},get tabIndex(){return o()},children:(e,n)=>{var i=bi();zi(zt(i),()=>t.children??f),ki(e,i)},$$slots:{default:!0}}),Ae()},UIBox:wo,UIClickableDiv:So,UIContent:Oo});function Eo(e={}){const t={get:function(e,t){return Object.hasOwn(e,t)?Reflect.get(...arguments):t}};return new Proxy(e,t)}const Lo=function(){const e=Ur(Eo());return{subscribe:e.subscribe,update:e.update,set:function(t){e.set(Eo(t))},reset:function(){return e.set(Eo())}}}();function To(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var xo,No={exports:{}};
1
+ var notBulma=function(e){"use strict";"undefined"!=typeof window&&((window.__svelte??={}).v??=new Set).add("5");const t=Symbol();var n=!1,i=Array.isArray,r=Array.prototype.indexOf,o=Array.from,s=Object.defineProperty,a=Object.getOwnPropertyDescriptor,l=Object.getOwnPropertyDescriptors,u=Object.prototype,c=Array.prototype,d=Object.getPrototypeOf,f=Object.isExtensible;function h(e){return"function"==typeof e}const g=()=>{};function p(e){return e()}function v(e){for(var t=0;t<e.length;t++)e[t]()}function m(){var e,t;return{promise:new Promise((n,i)=>{e=n,t=i}),resolve:e,reject:t}}const y=16,k=32,b=64,_=128,w=1024,O=2048,$=4096,S=8192,I=16384,A=32768,C=65536,E=1<<17,L=1<<19,T=256,x=512,F=32768,N=1<<21,M=1<<23,P=Symbol("$state"),U=Symbol("legacy props"),R=Symbol(""),D=new class extends Error{name="StaleReactionError";message="The reaction that called `getAbortSignal()` was re-run or destroyed"};function j(e){throw new Error("https://svelte.dev/e/lifecycle_outside_component")}function W(e){return e===this.v}function B(e,t){return e!=e?t==t:e!==t||null!==e&&"object"==typeof e||"function"==typeof e}function V(e){return!B(e,this.v)}let z=!1;const q=[];function H(e,t=!1,n=!1){return G(e,new Map,"",q,null,n)}function G(e,t,n,r,o=null,s=!1){if("object"==typeof e&&null!==e){var a=t.get(e);if(void 0!==a)return a;if(e instanceof Map)return new Map(e);if(e instanceof Set)return new Set(e);if(i(e)){var l=Array(e.length);t.set(e,l),null!==o&&t.set(o,l);for(var c=0;c<e.length;c+=1){var f=e[c];c in e&&(l[c]=G(f,t,n,r,null,s))}return l}if(d(e)===u){for(var h in l={},t.set(e,l),null!==o&&t.set(o,l),e)l[h]=G(e[h],t,n,r,null,s);return l}if(e instanceof Date)return structuredClone(e);if("function"==typeof e.toJSON&&!s)return G(e.toJSON(),t,n,r,e)}if(e instanceof EventTarget)return e;try{return structuredClone(e)}catch(t){return e}}let K=null;function J(e){K=e}function Y(e){return ne().get(e)}function Q(e,t){return ne().set(e,t),t}function X(e){return ne().has(e)}function Z(e,t=!1,n){K={p:K,i:!1,c:null,e:null,s:e,x:null,l:z&&!t?{s:null,u:null,$:[]}:null}}function ee(e){var t=K,n=t.e;if(null!==n)for(var i of(t.e=null,n))gt(i);return void 0!==e&&(t.x=e),t.i=!0,K=t.p,e??{}}function te(){return!z||null!==K&&null===K.l}function ne(e){return null===K&&j(),K.c??=new Map(function(e){let t=e.p;for(;null!==t;){const e=t.c;if(null!==e)return e;t=t.p}return null}(K)||void 0)}let ie=[];function re(){var e=ie;ie=[],v(e)}function oe(e){if(0===ie.length&&!ve){var t=ie;queueMicrotask(()=>{t===ie&&re()})}ie.push(e)}function se(){for(;ie.length>0;)re()}function ae(e){var t=jt;if(null===t)return Ut.f|=M,e;if(0===(t.f&A)){if(0===(t.f&_))throw e;t.b.error(e)}else le(e,t)}function le(e,t){for(;null!==t;){if(0!==(t.f&_))try{return void t.b.error(e)}catch(t){e=t}t=t.parent}throw e}const ue=new Set;let ce=null,de=null,fe=null,he=[],ge=null,pe=!1,ve=!1;class me{committed=!1;current=new Map;previous=new Map;#e=new Set;#t=new Set;#n=0;#i=0;#r=null;#o=[];#s=[];skipped_effects=new Set;is_fork=!1;process(e){he=[],de=null,this.apply();var t={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const n of e)this.#a(n,t);this.is_fork||this.#l(),this.#i>0||this.is_fork?(this.#u(t.effects),this.#u(t.render_effects),this.#u(t.block_effects)):(de=this,ce=null,_e(t.render_effects),_e(t.effects),de=null,this.#r?.resolve()),fe=null}#a(e,t){e.f^=w;for(var n=e.first;null!==n;){var i=n.f,r=!!(96&i),o=r&&0!==(i&w)||0!==(i&S)||this.skipped_effects.has(n);if(0!==(n.f&_)&&n.b?.is_pending()&&(t={parent:t,effect:n,effects:[],render_effects:[],block_effects:[]}),!o&&null!==n.fn){r?n.f^=w:4&i?t.effects.push(n):Zt(n)&&(0!==(n.f&y)&&t.block_effects.push(n),on(n));var s=n.first;if(null!==s){n=s;continue}}var a=n.parent;for(n=n.next;null===n&&null!==a;)a===t.effect&&(this.#u(t.effects),this.#u(t.render_effects),this.#u(t.block_effects),t=t.parent),n=a.next,a=a.parent}}#u(e){for(const t of e){(0!==(t.f&O)?this.#o:this.#s).push(t),dn(t,w)}}capture(e,t){this.previous.has(e)||this.previous.set(e,t),this.current.set(e,e.v),fe?.set(e,e.v)}activate(){ce=this}deactivate(){ce=null,fe=null}flush(){if(this.activate(),he.length>0){if(ye(),null!==ce&&ce!==this)return}else 0===this.#n&&this.process([]);this.deactivate()}discard(){for(const e of this.#t)e(this);this.#t.clear()}#l(){if(0===this.#i){for(const e of this.#e)e();this.#e.clear()}0===this.#n&&this.#c()}#c(){if(ue.size>1){this.previous.clear();var e=fe,t=!0,n={parent:null,effect:null,effects:[],render_effects:[],block_effects:[]};for(const e of ue){if(e===this){t=!1;continue}const i=[];for(const[n,r]of this.current){if(e.current.has(n)){if(!t||r===e.current.get(n))continue;e.current.set(n,r)}i.push(n)}if(0===i.length)continue;const r=[...e.current.keys()].filter(e=>!this.current.has(e));if(r.length>0){const t=new Set,o=new Map;for(const e of i)we(e,r,t,o);if(he.length>0){ce=e,e.apply();for(const t of he)e.#a(t,n);he=[],e.deactivate()}}}ce=null,fe=e}this.committed=!0,ue.delete(this)}increment(e){this.#n+=1,e&&(this.#i+=1)}decrement(e){this.#n-=1,e&&(this.#i-=1),this.revive()}revive(){for(const e of this.#o)dn(e,O),$e(e);for(const e of this.#s)dn(e,$),$e(e);this.#o=[],this.#s=[],this.flush()}oncommit(e){this.#e.add(e)}ondiscard(e){this.#t.add(e)}settled(){return(this.#r??=m()).promise}static ensure(){if(null===ce){const e=ce=new me;ue.add(ce),ve||me.enqueue(()=>{ce===e&&e.flush()})}return ce}static enqueue(e){oe(e)}apply(){}}function ye(){var e=Ft;pe=!0;try{var t=0;for(Nt(!0);he.length>0;){var i=me.ensure();if(t++>1e3)n,ke();i.process(he),Pe.clear()}}finally{pe=!1,Nt(e),ge=null}}function ke(){try{!function(){throw new Error("https://svelte.dev/e/effect_update_depth_exceeded")}()}catch(e){le(e,ge)}}let be=null;function _e(e){var t=e.length;if(0!==t){for(var n=0;n<t;){var i=e[n++];if(!(24576&i.f)&&Zt(i)&&(be=new Set,on(i),null===i.deps&&null===i.first&&null===i.nodes_start&&(null===i.teardown&&null===i.ac?It(i):i.fn=null),be?.size>0)){Pe.clear();for(const e of be){if(24576&e.f)continue;const t=[e];let n=e.parent;for(;null!==n;)be.has(n)&&(be.delete(n),t.push(n)),n=n.parent;for(let e=t.length-1;e>=0;e--){const n=t[e];24576&n.f||on(n)}}be.clear()}}be=null}}function we(e,t,n,i){if(!n.has(e)&&(n.add(e),null!==e.reactions))for(const r of e.reactions){const e=r.f;2&e?we(r,t,n,i):4194320&e&&0===(e&O)&&Oe(r,t,i)&&(dn(r,O),$e(r))}}function Oe(e,t,n){const i=n.get(e);if(void 0!==i)return i;if(null!==e.deps)for(const i of e.deps){if(t.includes(i))return!0;if(2&i.f&&Oe(i,t,n))return n.set(i,!0),!0}return n.set(e,!1),!1}function $e(e){for(var t=ge=e;null!==t.parent;){var n=(t=t.parent).f;if(pe&&t===jt&&0!==(n&y))return;if(96&n){if(0===(n&w))return;t.f^=w}}he.push(t)}function Se(e){let t,n=0,i=Re(0);return()=>{null===Ut||Rt||(an(i),yt(()=>(0===n&&(t=un(()=>e(()=>qe(i)))),n+=1,()=>{oe(()=>{n-=1,0===n&&(t?.(),t=void 0,qe(i))})})))}}class Ie{parent;#n=!1;#d;#f=null;#h;#g;#p;#v=null;#m=null;#y=null;#k=null;#b=null;#_=0;#w=0;#O=!1;#$=null;#S=Se(()=>(this.#$=Re(this.#_),()=>{this.#$=null}));constructor(e,t,n){this.#d=e,this.#h=t,this.#g=n,this.parent=jt.b,this.#n=!!this.#h.pending,this.#p=bt(()=>{jt.b=this;var e=this.#I();try{this.#v=_t(()=>n(e))}catch(e){this.error(e)}return this.#w>0?this.#A():this.#n=!1,()=>{this.#b?.remove()}},589952)}#C(){try{this.#v=_t(()=>this.#g(this.#d))}catch(e){this.error(e)}this.#n=!1}#E(){const e=this.#h.pending;e&&(this.#m=_t(()=>e(this.#d)),me.enqueue(()=>{var e=this.#I();this.#v=this.#L(()=>(me.ensure(),_t(()=>this.#g(e)))),this.#w>0?this.#A():(At(this.#m,()=>{this.#m=null}),this.#n=!1)}))}#I(){var e=this.#d;return this.#n&&(this.#b=et(),this.#d.before(this.#b),e=this.#b),e}is_pending(){return this.#n||!!this.parent&&this.parent.is_pending()}has_pending_snippet(){return!!this.#h.pending}#L(e){var t=jt,n=Ut,i=K;Wt(this.#p),Dt(this.#p),J(this.#p.ctx);try{return e()}catch(e){return ae(e),null}finally{Wt(t),Dt(n),J(i)}}#A(){const e=this.#h.pending;null!==this.#v&&(this.#k=document.createDocumentFragment(),this.#k.append(this.#b),xt(this.#v,this.#k)),null===this.#m&&(this.#m=_t(()=>e(this.#d)))}#T(e){this.has_pending_snippet()?(this.#w+=e,0===this.#w&&(this.#n=!1,this.#m&&At(this.#m,()=>{this.#m=null}),this.#k&&(this.#d.before(this.#k),this.#k=null))):this.parent&&this.parent.#T(e)}update_pending_count(e){this.#T(e),this.#_+=e,this.#$&&Ve(this.#$,this.#_)}get_effect_pending(){return this.#S(),an(this.#$)}error(e){var t=this.#h.onerror;let n=this.#h.failed;if(this.#O||!t&&!n)throw e;this.#v&&($t(this.#v),this.#v=null),this.#m&&($t(this.#m),this.#m=null),this.#y&&($t(this.#y),this.#y=null);var i=!1,r=!1;const o=()=>{i?console.warn("https://svelte.dev/e/svelte_boundary_reset_noop"):(i=!0,r&&function(){throw new Error("https://svelte.dev/e/svelte_boundary_reset_onerror")}(),me.ensure(),this.#_=0,null!==this.#y&&At(this.#y,()=>{this.#y=null}),this.#n=this.has_pending_snippet(),this.#v=this.#L(()=>(this.#O=!1,_t(()=>this.#g(this.#d)))),this.#w>0?this.#A():this.#n=!1)};var s=Ut;try{Dt(null),r=!0,t?.(e,o),r=!1}catch(e){le(e,this.#p&&this.#p.parent)}finally{Dt(s)}n&&oe(()=>{this.#y=this.#L(()=>{me.ensure(),this.#O=!0;try{return _t(()=>{n(this.#d,()=>e,()=>o)})}catch(e){return le(e,this.#p.parent),null}finally{this.#O=!1}})})}}function Ae(e,n,i,r){const o=te()?Ee:Te;if(0!==i.length||0!==e.length){var s=ce,a=jt,l=function(){var e=jt,t=Ut,n=K,i=ce;return function(r=!0){Wt(e),Dt(t),J(n),r&&i?.activate()}}();e.length>0?Promise.all(e).then(()=>{l();try{return u()}finally{s?.deactivate(),Ce()}}):u()}else r(n.map(o));function u(){Promise.all(i.map(e=>function(e){let n=jt;null===n&&function(){throw new Error("https://svelte.dev/e/async_derived_orphan")}();var i=n.b,r=void 0,o=Re(t),s=!Ut,a=new Map;return function(e){dt(4718592,e,!0)}(()=>{var t=m();r=t.promise;try{Promise.resolve(e()).then(t.resolve,t.reject).then(()=>{n===ce&&n.committed&&n.deactivate(),Ce()})}catch(e){t.reject(e),Ce()}var n=ce;if(s){var l=!i.is_pending();i.update_pending_count(1),n.increment(l),a.get(n)?.reject(D),a.delete(n),a.set(n,t)}const u=(e,t=void 0)=>{if(n.activate(),t)t!==D&&(o.f|=M,Ve(o,t));else{0!==(o.f&M)&&(o.f^=M),Ve(o,e);for(const[e,t]of a){if(a.delete(e),e===n)break;t.reject(D)}}s&&(i.update_pending_count(-1),n.decrement(l))};t.promise.then(u,e=>u(null,e||"unknown"))}),ft(()=>{for(const e of a.values())e.reject(D)}),new Promise(e=>{function t(n){function i(){n===r?e(o):t(r)}n.then(i,i)}t(r)})}(e))).then(e=>{l();try{r([...n.map(o),...e])}catch(e){0===(a.f&I)&&le(e,a)}s?.deactivate(),Ce()}).catch(e=>{le(e,a)})}}function Ce(){Wt(null),Dt(null),J(null)}function Ee(e){var n=2050,i=null!==Ut&&2&Ut.f?Ut:null;null===jt||null!==i&&0!==(i.f&T)?n|=T:jt.f|=L;return{ctx:K,deps:null,effects:null,equals:W,f:n,fn:e,reactions:null,rv:0,v:t,wv:0,parent:i??jt,ac:null}}function Le(e){const t=Ee(e);return Vt(t),t}function Te(e){const t=Ee(e);return t.equals=V,t}function xe(e){var t=e.effects;if(null!==t){e.effects=null;for(var n=0;n<t.length;n+=1)$t(t[n])}}function Fe(e){var t,n=jt;Wt(function(e){for(var t=e.parent;null!==t;){if(!(2&t.f))return t;t=t.parent}return null}(e));try{e.f&=-32769,xe(e),t=tn(e)}finally{Wt(n)}return t}function Ne(e){var t=Fe(e);(e.equals(t)||(e.v=t,e.wv=Xt()),Mt)||(null!==fe?fe.set(e,e.v):dn(e,!Qt&&0===(e.f&T)||null===e.deps?w:$))}let Me=new Set;const Pe=new Map;let Ue=!1;function Re(e,t){return{f:0,v:e,reactions:null,equals:W,rv:0,wv:0}}function De(e,t){const n=Re(e);return Vt(n),n}function je(e,t=!1,n=!0){const i=Re(e);return t||(i.equals=V),z&&n&&null!==K&&null!==K.l&&(K.l.s??=[]).push(i),i}function We(e,t){return Be(e,un(()=>an(e))),t}function Be(e,t,n=!1){return null!==Ut&&(!Rt||0!==(Ut.f&E))&&te()&&4325394&Ut.f&&!Bt?.includes(e)&&function(){throw new Error("https://svelte.dev/e/state_unsafe_mutation")}(),Ve(e,n?Ge(t):t)}function Ve(e,t){if(!e.equals(t)){var n=e.v;Mt?Pe.set(e,t):Pe.set(e,n),e.v=t;var i=me.ensure();i.capture(e,n),2&e.f&&(0!==(e.f&O)&&Fe(e),dn(e,0===(e.f&T)?w:$)),e.wv=Xt(),He(e,O),!te()||null===jt||0===(jt.f&w)||96&jt.f||(null===Ht?function(e){Ht=e}([e]):Ht.push(e)),!i.is_fork&&Me.size>0&&!Ue&&function(){Ue=!1;const e=Array.from(Me);for(const t of e)0!==(t.f&w)&&dn(t,$),Zt(t)&&on(t);Me.clear()}()}return t}function ze(e,t=1){var n=an(e),i=1===t?n++:n--;return Be(e,n),i}function qe(e){Be(e,e.v+1)}function He(e,t){var n=e.reactions;if(null!==n)for(var i=te(),r=n.length,o=0;o<r;o++){var s=n[o],a=s.f;if(i||s!==jt){var l=0===(a&O);l&&dn(s,t),2&a?0===(a&F)&&(s.f|=F,He(s,$)):l&&(0!==(a&y)&&null!==be&&be.add(s),$e(s))}}}function Ge(e){if("object"!=typeof e||null===e||P in e)return e;const n=d(e);if(n!==u&&n!==c)return e;var r=new Map,o=i(e),s=De(0),l=Jt,f=e=>{if(Jt===l)return e();var t=Ut,n=Jt;Dt(null),Yt(l);var i=e();return Dt(t),Yt(n),i};return o&&r.set("length",De(e.length)),new Proxy(e,{defineProperty(e,t,n){"value"in n&&!1!==n.configurable&&!1!==n.enumerable&&!1!==n.writable||function(){throw new Error("https://svelte.dev/e/state_descriptors_fixed")}();var i=r.get(t);return void 0===i?i=f(()=>{var e=De(n.value);return r.set(t,e),e}):Be(i,n.value,!0),!0},deleteProperty(e,n){var i=r.get(n);if(void 0===i){if(n in e){const e=f(()=>De(t));r.set(n,e),qe(s)}}else Be(i,t),qe(s);return!0},get(n,i,o){if(i===P)return e;var s=r.get(i),l=i in n;if(void 0!==s||l&&!a(n,i)?.writable||(s=f(()=>De(Ge(l?n[i]:t))),r.set(i,s)),void 0!==s){var u=an(s);return u===t?void 0:u}return Reflect.get(n,i,o)},getOwnPropertyDescriptor(e,n){var i=Reflect.getOwnPropertyDescriptor(e,n);if(i&&"value"in i){var o=r.get(n);o&&(i.value=an(o))}else if(void 0===i){var s=r.get(n),a=s?.v;if(void 0!==s&&a!==t)return{enumerable:!0,configurable:!0,value:a,writable:!0}}return i},has(e,n){if(n===P)return!0;var i=r.get(n),o=void 0!==i&&i.v!==t||Reflect.has(e,n);if((void 0!==i||null!==jt&&(!o||a(e,n)?.writable))&&(void 0===i&&(i=f(()=>De(o?Ge(e[n]):t)),r.set(n,i)),an(i)===t))return!1;return o},set(e,n,i,l){var u=r.get(n),c=n in e;if(o&&"length"===n)for(var d=i;d<u.v;d+=1){var h=r.get(d+"");void 0!==h?Be(h,t):d in e&&(h=f(()=>De(t)),r.set(d+"",h))}void 0===u?c&&!a(e,n)?.writable||(Be(u=f(()=>De(void 0)),Ge(i)),r.set(n,u)):(c=u.v!==t,Be(u,f(()=>Ge(i))));var g=Reflect.getOwnPropertyDescriptor(e,n);if(g?.set&&g.set.call(l,i),!c){if(o&&"string"==typeof n){var p=r.get("length"),v=Number(n);Number.isInteger(v)&&v>=p.v&&Be(p,v+1)}qe(s)}return!0},ownKeys(e){an(s);var n=Reflect.ownKeys(e).filter(e=>{var n=r.get(e);return void 0===n||n.v!==t});for(var[i,o]of r)o.v===t||i in e||n.push(i);return n},setPrototypeOf(){!function(){throw new Error("https://svelte.dev/e/state_prototype_fixed")}()}})}function Ke(e){try{if(null!==e&&"object"==typeof e&&P in e)return e[P]}catch{}return e}function Je(e,t){return Object.is(Ke(e),Ke(t))}var Ye,Qe,Xe,Ze;function et(e=""){return document.createTextNode(e)}function tt(e){return Xe.call(e)}function nt(e){return Ze.call(e)}function it(e,t){return tt(e)}function rt(e,t=!1){var n=tt(e);return n instanceof Comment&&""===n.data?nt(n):n}function ot(e,t=1,n=!1){let i=e;for(;t--;)i=nt(i);return i}function st(e,t){if(t){const t=document.body;e.autofocus=!0,oe(()=>{document.activeElement===t&&e.focus()})}}let at=!1;function lt(e){var t=Ut,n=jt;Dt(null),Wt(null);try{return e()}finally{Dt(t),Wt(n)}}function ut(e,t,n,i=n){e.addEventListener(t,()=>lt(n));const r=e.__on_r;e.__on_r=r?()=>{r(),i(!0)}:()=>i(!0),at||(at=!0,document.addEventListener("reset",e=>{Promise.resolve().then(()=>{if(!e.defaultPrevented)for(const t of e.target.elements)t.__on_r?.()})},{capture:!0}))}function ct(e){null===jt&&null===Ut&&function(){throw new Error("https://svelte.dev/e/effect_orphan")}(),null!==Ut&&0!==(Ut.f&T)&&null===jt&&function(){throw new Error("https://svelte.dev/e/effect_in_unowned_derived")}(),Mt&&function(){throw new Error("https://svelte.dev/e/effect_in_teardown")}()}function dt(e,t,n,i=!0){var r=jt;null!==r&&0!==(r.f&S)&&(e|=S);var o={ctx:K,deps:null,nodes_start:null,nodes_end:null,f:e|O,first:null,fn:t,last:null,next:null,parent:r,b:r&&r.b,prev:null,teardown:null,transitions:null,wv:0,ac:null};if(n)try{on(o),o.f|=A}catch(s){throw $t(o),s}else null!==t&&$e(o);if(i){var s=o;if(n&&null===s.deps&&null===s.teardown&&null===s.nodes_start&&s.first===s.last&&0===(s.f&L)&&(s=s.first,0!==(e&y)&&0!==(e&C)&&null!==s&&(s.f|=C)),null!==s&&(s.parent=r,null!==r&&function(e,t){var n=t.last;null===n?t.last=t.first=e:(n.next=e,e.prev=n,t.last=e)}(s,r),null!==Ut&&2&Ut.f&&0===(e&b))){var a=Ut;(a.effects??=[]).push(s)}}return o}function ft(e){const t=dt(8,null,!1);return dn(t,w),t.teardown=e,t}function ht(e){ct();var t=jt.f;if(!(!Ut&&0!==(t&k)&&0===(t&A)))return gt(e);var n=K;(n.e??=[]).push(e)}function gt(e){return dt(1048580,e,!1)}function pt(e){return ct(),dt(1048584,e,!0)}function vt(e){return dt(4,e,!1)}function mt(e,t){var n={effect:null,ran:!1,deps:e};K.l.$.push(n),n.effect=yt(()=>{e(),n.ran||(n.ran=!0,un(t))})}function yt(e,t=0){return dt(8|t,e,!0)}function kt(e,t=[],n=[],i=[]){Ae(i,t,n,t=>{dt(8,()=>e(...t.map(an)),!0)})}function bt(e,t=0){return dt(y|t,e,!0)}function _t(e,t=!0){return dt(524320,e,!0,t)}function wt(e){var t=e.teardown;if(null!==t){const e=Mt,n=Ut;Pt(!0),Dt(null);try{t.call(null)}finally{Pt(e),Dt(n)}}}function Ot(e,t=!1){var n=e.first;for(e.first=e.last=null;null!==n;){const e=n.ac;null!==e&&lt(()=>{e.abort(D)});var i=n.next;0!==(n.f&b)?n.parent=null:$t(n,t),n=i}}function $t(e,t=!0){var n=!1;(t||262144&e.f)&&null!==e.nodes_start&&null!==e.nodes_end&&(St(e.nodes_start,e.nodes_end),n=!0),Ot(e,t&&!n),rn(e,0),dn(e,I);var i=e.transitions;if(null!==i)for(const e of i)e.stop();wt(e);var r=e.parent;null!==r&&null!==r.first&&It(e),e.next=e.prev=e.teardown=e.ctx=e.deps=e.fn=e.nodes_start=e.nodes_end=e.ac=null}function St(e,t){for(;null!==e;){var n=e===t?null:nt(e);e.remove(),e=n}}function It(e){var t=e.parent,n=e.prev,i=e.next;null!==n&&(n.next=i),null!==i&&(i.prev=n),null!==t&&(t.first===e&&(t.first=i),t.last===e&&(t.last=n))}function At(e,t,n=!0){var i=[];Et(e,i,!0),Ct(i,()=>{n&&$t(e),t&&t()})}function Ct(e,t){var n=e.length;if(n>0){var i=()=>--n||t();for(var r of e)r.out(i)}else t()}function Et(e,t,n){if(0===(e.f&S)){if(e.f^=S,null!==e.transitions)for(const i of e.transitions)(i.is_global||n)&&t.push(i);for(var i=e.first;null!==i;){var r=i.next;Et(i,t,!!(0!==(i.f&C)||0!==(i.f&k)&&0!==(e.f&y))&&n),i=r}}}function Lt(e){Tt(e,!0)}function Tt(e,t){if(0!==(e.f&S)){e.f^=S,0===(e.f&w)&&(dn(e,O),$e(e));for(var n=e.first;null!==n;){var i=n.next;Tt(n,!!(0!==(n.f&C)||0!==(n.f&k))&&t),n=i}if(null!==e.transitions)for(const n of e.transitions)(n.is_global||t)&&n.in()}}function xt(e,t){for(var n=e.nodes_start,i=e.nodes_end;null!==n;){var r=n===i?null:nt(n);t.append(n),n=r}}let Ft=!1;function Nt(e){Ft=e}let Mt=!1;function Pt(e){Mt=e}let Ut=null,Rt=!1;function Dt(e){Ut=e}let jt=null;function Wt(e){jt=e}let Bt=null;function Vt(e){null!==Ut&&(null===Bt?Bt=[e]:Bt.push(e))}let zt=null,qt=0,Ht=null;let Gt=1,Kt=0,Jt=Kt;function Yt(e){Jt=e}let Qt=!1;function Xt(){return++Gt}function Zt(e){var t=e.f;if(0!==(t&O))return!0;if(0!==(t&$)){var n=e.deps,i=0!==(t&T);if(2&t&&(e.f&=-32769),null!==n){var r,o,s=0!==(t&x),a=i&&null!==jt&&!Qt,l=n.length;if((s||a)&&(null===jt||0===(jt.f&I))){var u=e,c=u.parent;for(r=0;r<l;r++)o=n[r],!s&&o?.reactions?.includes(u)||(o.reactions??=[]).push(u);s&&(u.f^=x),a&&null!==c&&0===(c.f&T)&&(u.f^=T)}for(r=0;r<l;r++)if(Zt(o=n[r])&&Ne(o),o.wv>e.wv)return!0}i&&(null===jt||Qt)||dn(e,w)}return!1}function en(e,t,n=!0){var i=e.reactions;if(null!==i&&!Bt?.includes(e))for(var r=0;r<i.length;r++){var o=i[r];2&o.f?en(o,t,!1):t===o&&(n?dn(o,O):0!==(o.f&w)&&dn(o,$),$e(o))}}function tn(e){var t=zt,n=qt,i=Ht,r=Ut,o=Qt,s=Bt,a=K,l=Rt,u=Jt,c=e.f;zt=null,qt=0,Ht=null,Qt=0!==(c&T)&&(Rt||!Ft||null===Ut),Ut=96&c?null:e,Bt=null,J(e.ctx),Rt=!1,Jt=++Kt,null!==e.ac&&(lt(()=>{e.ac.abort(D)}),e.ac=null);try{e.f|=N;var d=(0,e.fn)(),f=e.deps;if(null!==zt){var h;if(rn(e,qt),null!==f&&qt>0)for(f.length=qt+zt.length,h=0;h<zt.length;h++)f[qt+h]=zt[h];else e.deps=f=zt;if(!Qt||2&c&&null!==e.reactions)for(h=qt;h<f.length;h++)(f[h].reactions??=[]).push(e)}else null!==f&&qt<f.length&&(rn(e,qt),f.length=qt);if(te()&&null!==Ht&&!Rt&&null!==f&&!(6146&e.f))for(h=0;h<Ht.length;h++)en(Ht[h],e);return null!==r&&r!==e&&(Kt++,null!==Ht&&(null===i?i=Ht:i.push(...Ht))),0!==(e.f&M)&&(e.f^=M),d}catch(e){return ae(e)}finally{e.f^=N,zt=t,qt=n,Ht=i,Ut=r,Qt=o,Bt=s,J(a),Rt=l,Jt=u}}function nn(e,t){let n=t.reactions;if(null!==n){var i=r.call(n,e);if(-1!==i){var o=n.length-1;0===o?n=t.reactions=null:(n[i]=n[o],n.pop())}}null===n&&2&t.f&&(null===zt||!zt.includes(t))&&(dn(t,$),768&t.f||(t.f^=x),xe(t),rn(t,0))}function rn(e,t){var n=e.deps;if(null!==n)for(var i=t;i<n.length;i++)nn(e,n[i])}function on(e){var t=e.f;if(0===(t&I)){dn(e,w);var n=jt,i=Ft;jt=e,Ft=!0;try{0!==(t&y)?function(e){for(var t=e.first;null!==t;){var n=t.next;0===(t.f&k)&&$t(t),t=n}}(e):Ot(e),wt(e);var r=tn(e);e.teardown="function"==typeof r?r:null,e.wv=Gt}finally{Ft=i,jt=n}}}async function sn(){await Promise.resolve(),function(){var e=ve;ve=!0;try{for(;;){if(se(),0===he.length&&(ce?.flush(),0===he.length))return void(ge=null);ye()}}finally{ve=e}}()}function an(e){var t=!!(2&e.f);if(null===Ut||Rt){if(t&&null===e.deps&&null===e.effects){var n=e,i=n.parent;null!==i&&0===(i.f&T)&&(n.f^=T)}}else if(!(null!==jt&&0!==(jt.f&I))&&!Bt?.includes(e)){var r=Ut.deps;if(0!==(Ut.f&N))e.rv<Kt&&(e.rv=Kt,null===zt&&null!==r&&r[qt]===e?qt++:null===zt?zt=[e]:Qt&&zt.includes(e)||zt.push(e));else{(Ut.deps??=[]).push(e);var o=e.reactions;null===o?e.reactions=[Ut]:o.includes(Ut)||o.push(Ut)}}if(Mt){if(Pe.has(e))return Pe.get(e);if(t){var s=(n=e).v;return(0===(n.f&w)&&null!==n.reactions||ln(n))&&(s=Fe(n)),Pe.set(n,s),s}}else if(t){if(n=e,fe?.has(n))return fe.get(n);Zt(n)&&Ne(n)}if(fe?.has(e))return fe.get(e);if(0!==(e.f&M))throw e.v;return e.v}function ln(e){if(e.v===t)return!0;if(null===e.deps)return!1;for(const t of e.deps){if(Pe.has(t))return!0;if(2&t.f&&ln(t))return!0}return!1}function un(e){var t=Rt;try{return Rt=!0,e()}finally{Rt=t}}const cn=-7169;function dn(e,t){e.f=e.f&cn|t}function fn(e){if("object"==typeof e&&e&&!(e instanceof EventTarget))if(P in e)hn(e);else if(!Array.isArray(e))for(let t in e){const n=e[t];"object"==typeof n&&n&&P in n&&hn(n)}}function hn(e,t=new Set){if(!("object"!=typeof e||null===e||e instanceof EventTarget||t.has(e))){t.add(e),e instanceof Date&&e.getTime();for(let n in e)try{hn(e[n],t)}catch(e){}const n=d(e);if(n!==Object.prototype&&n!==Array.prototype&&n!==Map.prototype&&n!==Set.prototype&&n!==Date.prototype){const t=l(n);for(let n in t){const i=t[n].get;if(i)try{i.call(e)}catch(e){}}}}}const gn=new Set,pn=new Set;function vn(e,t,n,i={}){function r(e){if(i.capture||bn.call(t,e),!e.cancelBubble)return lt(()=>n?.call(this,e))}return e.startsWith("pointer")||e.startsWith("touch")||"wheel"===e?oe(()=>{t.addEventListener(e,r,i)}):t.addEventListener(e,r,i),r}function mn(e,t,n,i,r){var o={capture:i,passive:r},s=vn(e,t,n,o);(t===document.body||t===window||t===document||t instanceof HTMLMediaElement)&&ft(()=>{t.removeEventListener(e,s,o)})}function yn(e){for(var t=0;t<e.length;t++)gn.add(e[t]);for(var n of pn)n(e)}let kn=null;function bn(e){var t=this,n=t.ownerDocument,i=e.type,r=e.composedPath?.()||[],o=r[0]||e.target;kn=e;var a=0,l=kn===e&&e.__root;if(l){var u=r.indexOf(l);if(-1!==u&&(t===document||t===window))return void(e.__root=t);var c=r.indexOf(t);if(-1===c)return;u<=c&&(a=u)}if((o=r[a]||e.target)!==t){s(e,"currentTarget",{configurable:!0,get:()=>o||n});var d=Ut,f=jt;Dt(null),Wt(null);try{for(var h,g=[];null!==o;){var p=o.assignedSlot||o.parentNode||o.host||null;try{var v=o["__"+i];null==v||o.disabled&&e.target!==o||v.call(o,e)}catch(e){h?g.push(e):h=e}if(e.cancelBubble||p===t||null===p)break;o=p}if(h){for(let e of g)queueMicrotask(()=>{throw e});throw h}}finally{e.__root=t,delete e.currentTarget,Dt(d),Wt(f)}}}function _n(e){var t=document.createElement("template");return t.innerHTML=e.replaceAll("<!>","\x3c!----\x3e"),t.content}function wn(e,t){var n=jt;null===n.nodes_start&&(n.nodes_start=e,n.nodes_end=t)}function On(e,t){var n,i=!!(1&t),r=!!(2&t),o=!e.startsWith("<!>");return()=>{void 0===n&&(n=_n(o?e:"<!>"+e),i||(n=tt(n)));var t=r||Qe?document.importNode(n,!0):n.cloneNode(!0);i?wn(tt(t),t.lastChild):wn(t,t);return t}}function $n(e=""){var t=et(e+"");return wn(t,t),t}function Sn(){var e=document.createDocumentFragment(),t=document.createComment(""),n=et();return e.append(t,n),wn(t,n),e}function In(e,t){null!==e&&e.before(t)}function An(e){return e.endsWith("capture")&&"gotpointercapture"!==e&&"lostpointercapture"!==e}const Cn=["beforeinput","click","change","dblclick","contextmenu","focusin","focusout","input","keydown","keyup","mousedown","mousemove","mouseout","mouseover","mouseup","pointerdown","pointermove","pointerout","pointerover","pointerup","touchend","touchmove","touchstart"];function En(e){return Cn.includes(e)}const Ln={formnovalidate:"formNoValidate",ismap:"isMap",nomodule:"noModule",playsinline:"playsInline",readonly:"readOnly",defaultvalue:"defaultValue",defaultchecked:"defaultChecked",srcobject:"srcObject",novalidate:"noValidate",allowfullscreen:"allowFullscreen",disablepictureinpicture:"disablePictureInPicture",disableremoteplayback:"disableRemotePlayback"};function Tn(e){return e=e.toLowerCase(),Ln[e]??e}const xn=["touchstart","touchmove"];function Fn(e){return xn.includes(e)}let Nn=!0;function Mn(e){Nn=e}function Pn(e,t){var n=null==t?"":"object"==typeof t?t+"":t;n!==(e.__t??=e.nodeValue)&&(e.__t=n,e.nodeValue=n+"")}function Un(e,t){return function(e,{target:t,anchor:n,props:i={},events:r,context:s,intro:l=!0}){!function(){if(void 0===Ye){Ye=window,Qe=/Firefox/.test(navigator.userAgent);var e=Element.prototype,t=Node.prototype,n=Text.prototype;Xe=a(t,"firstChild").get,Ze=a(t,"nextSibling").get,f(e)&&(e.__click=void 0,e.__className=void 0,e.__attributes=null,e.__style=void 0,e.__e=void 0),f(n)&&(n.__t=void 0)}}();var u=new Set,c=e=>{for(var n=0;n<e.length;n++){var i=e[n];if(!u.has(i)){u.add(i);var r=Fn(i);t.addEventListener(i,bn,{passive:r});var o=Rn.get(i);void 0===o?(document.addEventListener(i,bn,{passive:r}),Rn.set(i,1)):Rn.set(i,o+1)}}};c(o(gn)),pn.add(c);var d=void 0,h=function(e){me.ensure();const t=dt(524352,e,!0);return(e={})=>new Promise(n=>{e.outro?At(t,()=>{$t(t),n(void 0)}):($t(t),n(void 0))})}(()=>{var o=n??t.appendChild(et());return function(e,t,n){new Ie(e,t,n)}(o,{pending:()=>{}},t=>{s&&(Z({}),K.c=s);r&&(i.$$events=r),Nn=l,d=e(t,i)||{},Nn=!0,s&&ee()}),()=>{for(var e of u){t.removeEventListener(e,bn);var i=Rn.get(e);0===--i?(document.removeEventListener(e,bn),Rn.delete(e)):Rn.set(e,i)}pn.delete(c),o!==n&&o.parentNode?.removeChild(o)}});return Dn.set(d,h),d}(e,t)}const Rn=new Map;let Dn=new WeakMap;function jn(e,t){const n=Dn.get(e);return n?(Dn.delete(e),n(t)):Promise.resolve()}class Wn{anchor;#x=new Map;#F=new Map;#N=new Map;#M=!0;constructor(e,t=!0){this.anchor=e,this.#M=t}#c=()=>{var e=ce;if(this.#x.has(e)){var t=this.#x.get(e),n=this.#F.get(t);if(n)Lt(n);else{var i=this.#N.get(t);i&&(this.#F.set(t,i.effect),this.#N.delete(t),i.fragment.lastChild.remove(),this.anchor.before(i.fragment),n=i.effect)}for(const[t,n]of this.#x){if(this.#x.delete(t),t===e)break;const i=this.#N.get(n);i&&($t(i.effect),this.#N.delete(n))}for(const[e,i]of this.#F){if(e===t)continue;const r=()=>{if(Array.from(this.#x.values()).includes(e)){var t=document.createDocumentFragment();xt(i,t),t.append(et()),this.#N.set(e,{effect:i,fragment:t})}else $t(i);this.#F.delete(e)};this.#M||!n?At(i,r,!1):r()}}};#P=e=>{this.#x.delete(e);const t=Array.from(this.#x.values());for(const[e,n]of this.#N)t.includes(e)||($t(n.effect),this.#N.delete(e))};ensure(e,t){var n=ce;!t||this.#F.has(e)||this.#N.has(e)||this.#F.set(e,_t(()=>t(this.anchor)));this.#x.set(n,e),this.#c()}}function Bn(e,t,...n){var i=new Wn(e);bt(()=>{const e=t()??null;i.ensure(e,e&&(t=>e(t,...n)))},C)}function Vn(e){null===K&&j(),z&&null!==K.l?Hn(K).m.push(e):ht(()=>{const t=un(e);if("function"==typeof t)return t})}function zn(){const e=K;return null===e&&j(),(t,n,r)=>{const o=e.s.$$events?.[t];if(o){const s=i(o)?o.slice():[o],a=function(e,t,{bubbles:n=!1,cancelable:i=!1}={}){return new CustomEvent(e,{detail:t,bubbles:n,cancelable:i})}(t,n,r);for(const t of s)t.call(e.x,a);return!a.defaultPrevented}return!0}}function qn(e){null===K&&j(),null===K.l&&function(){throw new Error("https://svelte.dev/e/lifecycle_legacy_only")}(),Hn(K).a.push(e)}function Hn(e){var t=e.l;return t.u??={a:[],b:[],m:[]}}function Gn(e,t,n=!1){var i=new Wn(e);function r(e,t){i.ensure(e,t)}bt(()=>{var e=!1;t((t,n=!0)=>{e=!0,r(n,t)}),e||r(!1,null)},n?C:0)}let Kn=null;function Jn(e){Kn=e}function Yn(e,t){return t}function Qn(e,t,n,r,s,a=null){var l=e,u={flags:t,items:new Map,first:null};!(4&t)||(l=e.appendChild(et()));var c,d,f=null,h=!1,g=new Map,p=Te(()=>{var e=n();return i(e)?e:null==e?[]:o(e)});function v(){!function(e,t,n,i,r,s,a,l,u){var c,d,f,h,g,p,v=!!(8&a),m=!!(3&a),y=t.length,k=n.items,b=n.first,_=b,w=null,O=[],$=[];if(v)for(p=0;p<y;p+=1)h=l(f=t[p],p),void 0!==(g=k.get(h))&&(g.a?.measure(),(d??=new Set).add(g));for(p=0;p<y;p+=1)if(h=l(f=t[p],p),void 0!==(g=k.get(h))){if(m&&Xn(g,f,p,a),0!==(g.e.f&S)&&(Lt(g.e),v&&(g.a?.unfix(),(d??=new Set).delete(g))),g!==_){if(void 0!==c&&c.has(g)){if(O.length<$.length){var I,A=$[0];w=A.prev;var C=O[0],E=O[O.length-1];for(I=0;I<O.length;I+=1)ei(O[I],A,r);for(I=0;I<$.length;I+=1)c.delete($[I]);ti(n,C.prev,E.next),ti(n,w,C),ti(n,E,A),_=A,w=E,p-=1,O=[],$=[]}else c.delete(g),ei(g,_,r),ti(n,g.prev,g.next),ti(n,g,null===w?n.first:w.next),ti(n,w,g),w=g;continue}for(O=[],$=[];null!==_&&_.k!==h;)0===(_.e.f&S)&&(c??=new Set).add(_),$.push(_),_=_.next;if(null===_)continue;g=_}O.push(g),w=g,_=g.next}else{var L=i.get(h);if(void 0!==L){i.delete(h),k.set(h,L);var T=w?w.next:_;ti(n,w,L),ti(n,L,T),ei(L,T,r),w=L}else{w=Zn(_?_.e.nodes_start:r,n,w,null===w?n.first:w.next,f,h,p,s,a,u)}k.set(h,w),O=[],$=[],_=w.next}if(null!==_||void 0!==c){for(var x=void 0===c?[]:o(c);null!==_;)0===(_.e.f&S)&&x.push(_),_=_.next;var F=x.length;if(F>0){var N=4&a&&0===y?r:null;if(v){for(p=0;p<F;p+=1)x[p].a?.measure();for(p=0;p<F;p+=1)x[p].a?.fix()}!function(e,t,n){for(var i=e.items,r=[],o=t.length,s=0;s<o;s++)Et(t[s].e,r,!0);var a=o>0&&0===r.length&&null!==n;if(a){var l=n.parentNode;l.textContent="",l.append(n),i.clear(),ti(e,t[0].prev,t[o-1].next)}Ct(r,()=>{for(var n=0;n<o;n++){var r=t[n];a||(i.delete(r.k),ti(e,r.prev,r.next)),$t(r.e,!a)}})}(n,x,N)}}v&&oe(()=>{if(void 0!==d)for(g of d)g.a?.apply()});for(var M of(e.first=n.first&&n.first.e,e.last=w&&w.e,i.values()))$t(M.e);i.clear()}(d,c,u,g,l,s,t,r,n),null!==a&&(0===c.length?f?Lt(f):f=_t(()=>a(l)):null!==f&&At(f,()=>{f=null}))}bt(()=>{d??=jt;var e=(c=an(p)).length;h&&0===e||(h=0===e,v(),an(p))})}function Xn(e,t,n,i){1&i&&Ve(e.v,t),2&i?Ve(e.i,n):e.i=n}function Zn(e,t,n,i,r,o,s,a,l,u,c){var d=Kn,f=!!(1&l)?!(16&l)?je(r,!1,!1):Re(r):r,h=2&l?Re(s):s,g={i:h,v:f,k:o,a:null,e:null,prev:n,next:i};Kn=g;try{if(null===e)document.createDocumentFragment().append(e=et());return g.e=_t(()=>a(e,f,h,u),false),g.e.prev=n&&n.e,g.e.next=i&&i.e,null===n?c||(t.first=g):(n.next=g,n.e.next=g.e),null!==i&&(i.prev=g,i.e.prev=g.e),g}finally{Kn=d}}function ei(e,t,n){for(var i=e.next?e.next.e.nodes_start:n,r=t?t.e.nodes_start:n,o=e.e.nodes_start;null!==o&&o!==i;){var s=nt(o);r.before(o),o=s}}function ti(e,t,n){null===t?e.first=n:(t.next=n,t.e.next=n&&n.e),null!==n&&(n.prev=t,n.e.prev=t&&t.e)}function ni(e,t,n=!1,i=!1,r=!1){var o=e,s="";kt(()=>{var e=jt;if(s!==(s=t()??"")&&(null!==e.nodes_start&&(St(e.nodes_start,e.nodes_end),e.nodes_start=e.nodes_end=null),""!==s)){var r=s+"";n?r=`<svg>${r}</svg>`:i&&(r=`<math>${r}</math>`);var a=_n(r);if((n||i)&&(a=tt(a)),wn(tt(a),a.lastChild),n||i)for(;tt(a);)o.before(tt(a));else o.before(a)}})}function ii(e,t,n,i,r){var o=t.$$slots?.[n],s=!1;!0===o&&(o=t["default"===n?"children":n],s=!0),void 0===o?null!==r&&r(e):o(e,s?()=>i:i)}function ri(e,t,n){var i=new Wn(e);bt(()=>{var e=t()??null;i.ensure(e,e&&(t=>n(t,e)))},C)}function oi(e,t){var n,i=void 0;bt(()=>{i!==(i=t())&&(n&&($t(n),n=null),i&&(n=_t(()=>{vt(()=>i(e))})))})}function si(e){var t,n,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e)){var r=e.length;for(t=0;t<r;t++)e[t]&&(n=si(e[t]))&&(i&&(i+=" "),i+=n)}else for(n in e)e[n]&&(i&&(i+=" "),i+=n);return i}function ai(e){return"object"==typeof e?function(){for(var e,t,n=0,i="",r=arguments.length;n<r;n++)(e=arguments[n])&&(t=si(e))&&(i&&(i+=" "),i+=t);return i}(e):e??""}const li=[..." \t\n\r\f \v\ufeff"];function ui(e,t=!1){var n=t?" !important;":";",i="";for(var r in e){var o=e[r];null!=o&&""!==o&&(i+=" "+r+": "+o+n)}return i}function ci(e){return"-"!==e[0]||"-"!==e[1]?e.toLowerCase():e}function di(e,t,n,i,r,o){var s=e.__className;if(s!==n||void 0===s){var a=function(e,t,n){var i=null==e?"":""+e;if(t&&(i=i?i+" "+t:t),n)for(var r in n)if(n[r])i=i?i+" "+r:r;else if(i.length)for(var o=r.length,s=0;(s=i.indexOf(r,s))>=0;){var a=s+o;0!==s&&!li.includes(i[s-1])||a!==i.length&&!li.includes(i[a])?s=a:i=(0===s?"":i.substring(0,s))+i.substring(a+1)}return""===i?null:i}(n,i,o);null==a?e.removeAttribute("class"):t?e.className=a:e.setAttribute("class",a),e.__className=n}else if(o&&r!==o)for(var l in o){var u=!!o[l];null!=r&&u===!!r[l]||e.classList.toggle(l,u)}return o}function fi(e,t={},n,i){for(var r in n){var o=n[r];t[r]!==o&&(null==n[r]?e.style.removeProperty(r):e.style.setProperty(r,o,i))}}function hi(e,t,n,i){if(e.__style!==t){var r=function(e,t){if(t){var n,i,r="";if(Array.isArray(t)?(n=t[0],i=t[1]):n=t,e){e=String(e).replaceAll(/\s*\/\*.*?\*\/\s*/g,"").trim();var o=!1,s=0,a=!1,l=[];n&&l.push(...Object.keys(n).map(ci)),i&&l.push(...Object.keys(i).map(ci));var u=0,c=-1;const t=e.length;for(var d=0;d<t;d++){var f=e[d];if(a?"/"===f&&"*"===e[d-1]&&(a=!1):o?o===f&&(o=!1):"/"===f&&"*"===e[d+1]?a=!0:'"'===f||"'"===f?o=f:"("===f?s++:")"===f&&s--,!a&&!1===o&&0===s)if(":"===f&&-1===c)c=d;else if(";"===f||d===t-1){if(-1!==c){var h=ci(e.substring(u,c).trim());l.includes(h)||(";"!==f&&d++,r+=" "+e.substring(u,d).trim()+";")}u=d+1,c=-1}}}return n&&(r+=ui(n)),i&&(r+=ui(i,!0)),""===(r=r.trim())?null:r}return null==e?null:String(e)}(t,i);null==r?e.removeAttribute("style"):e.style.cssText=r,e.__style=t}else i&&(Array.isArray(i)?(fi(e,n?.[0],i[0]),fi(e,n?.[1],i[1],"important")):fi(e,n,i));return i}function gi(e,t,n=!1){if(e.multiple){if(null==t)return;if(!i(t))return void console.warn("https://svelte.dev/e/select_multiple_invalid_value");for(var r of e.options)r.selected=t.includes(pi(r))}else{for(r of e.options){if(Je(pi(r),t))return void(r.selected=!0)}n&&void 0===t||(e.selectedIndex=-1)}}function pi(e){return"__value"in e?e.__value:e.value}const vi=Symbol("class"),mi=Symbol("style"),yi=Symbol("is custom element"),ki=Symbol("is html");function bi(e,t){var n=Si(e);n.value!==(n.value=t??void 0)&&(e.value!==t||0===t&&"PROGRESS"===e.nodeName)&&(e.value=t??"")}function _i(e,t){var n=Si(e);n.checked!==(n.checked=t??void 0)&&(e.checked=t)}function wi(e,t){t?e.hasAttribute("selected")||e.setAttribute("selected",""):e.removeAttribute("selected")}function Oi(e,t,n,i){var r=Si(e);r[t]!==(r[t]=n)&&("loading"===t&&(e[R]=n),null==n?e.removeAttribute(t):"string"!=typeof n&&Ai(e).includes(t)?e[t]=n:e.setAttribute(t,n))}function $i(e,n,i=[],r=[],o=[],s,a=!1,l=!1){Ae(o,i,r,i=>{var r=void 0,o={},u="SELECT"===e.nodeName,c=!1;if(bt(()=>{var d=n(...i.map(an)),f=function(e,n,i,r){var o=Si(e),s=o[yi],a=!o[ki],l=n||{},u="OPTION"===e.tagName;for(var c in n)c in i||(i[c]=null);i.class?i.class=ai(i.class):(r||i[vi])&&(i.class=null),i[mi]&&(i.style??=null);var d=Ai(e);for(const m in i){let y=i[m];if(u&&"value"===m&&null==y)e.value=e.__value="",l[m]=y;else if("class"!==m)if("style"!==m){var f=l[m];if(y!==f||void 0===y&&e.hasAttribute(m)){l[m]=y;var h=m[0]+m[1];if("$$"!==h)if("on"===h){const k={},b="$$"+m;let _=m.slice(2);var g=En(_);if(An(_)&&(_=_.slice(0,-7),k.capture=!0),!g&&f){if(null!=y)continue;e.removeEventListener(_,l[b],k),l[b]=null}if(null!=y)if(g)e[`__${_}`]=y,yn([_]);else{function w(e){l[m].call(this,e)}l[b]=vn(_,e,w,k)}else g&&(e[`__${_}`]=void 0)}else if("style"===m)Oi(e,m,y);else if("autofocus"===m)st(e,Boolean(y));else if(s||"__value"!==m&&("value"!==m||null==y))if("selected"===m&&u)wi(e,y);else{var p=m;a||(p=Tn(p));var v="defaultValue"===p||"defaultChecked"===p;if(null!=y||s||v)v||d.includes(p)&&(s||"string"!=typeof y)?(e[p]=y,p in o&&(o[p]=t)):"function"!=typeof y&&Oi(e,p,y);else if(o[m]=null,"value"===p||"checked"===p){let O=e;const $=void 0===n;if("value"===p){let S=O.defaultValue;O.removeAttribute(p),O.defaultValue=S,O.value=O.__value=$?S:null}else{let I=O.defaultChecked;O.removeAttribute(p),O.defaultChecked=I,O.checked=!!$&&I}}else e.removeAttribute(m)}else e.value=e.__value=y}}else hi(e,y,n?.[mi],i[mi]),l[m]=y,l[mi]=i[mi];else di(e,"http://www.w3.org/1999/xhtml"===e.namespaceURI,y,r,n?.[vi],i[vi]),l[m]=y,l[vi]=i[vi]}return l}(e,r,d,s,a,l);c&&u&&"value"in d&&gi(e,d.value);for(let e of Object.getOwnPropertySymbols(o))d[e]||$t(o[e]);for(let t of Object.getOwnPropertySymbols(d)){var h=d[t];"@attach"!==t.description||r&&h===r[t]||(o[t]&&$t(o[t]),o[t]=_t(()=>oi(e,()=>h))),f[t]=h}r=f}),u){var d=e;vt(()=>{gi(d,r.value,!0),function(e){var t=new MutationObserver(()=>{gi(e,e.__value)});t.observe(e,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["value"]}),ft(()=>{t.disconnect()})}(d)})}c=!0})}function Si(e){return e.__attributes??={[yi]:e.nodeName.includes("-"),[ki]:"http://www.w3.org/1999/xhtml"===e.namespaceURI}}var Ii=new Map;function Ai(e){var t,n=e.getAttribute("is")||e.nodeName,i=Ii.get(n);if(i)return i;Ii.set(n,i=[]);for(var r=e,o=Element.prototype;o!==r;){for(var s in t=l(r))t[s].set&&i.push(s);r=d(r)}return i}const Ci={tick:e=>requestAnimationFrame(e),now:()=>performance.now(),tasks:new Set};function Ei(){const e=Ci.now();Ci.tasks.forEach(t=>{t.c(e)||(Ci.tasks.delete(t),t.f())}),0!==Ci.tasks.size&&Ci.tick(Ei)}function Li(e,t){lt(()=>{e.dispatchEvent(new CustomEvent(t))})}function Ti(e){if("float"===e)return"cssFloat";if("offset"===e)return"cssOffset";if(e.startsWith("--"))return e;const t=e.split("-");return 1===t.length?t[0]:t[0]+t.slice(1).map(e=>e[0].toUpperCase()+e.slice(1)).join("")}function xi(e){const t={},n=e.split(";");for(const e of n){const[n,i]=e.split(":");if(!n||void 0===i)break;t[Ti(n.trim())]=i.trim()}return t}const Fi=e=>e;function Ni(e,t,n,i){var r,o,s,a=!!(4&e),l=t.inert,u=t.style.overflow;function c(){return lt(()=>r??=n()(t,i?.()??{},{direction:"both"}))}var d={is_global:a,in(){t.inert=l,Li(t,"introstart"),o=Mi(t,c(),s,1,()=>{Li(t,"introend"),o?.abort(),o=r=void 0,t.style.overflow=u})},out(e){t.inert=!0,Li(t,"outrostart"),s=Mi(t,c(),o,0,()=>{Li(t,"outroend"),e?.()})},stop:()=>{o?.abort(),s?.abort()}},f=jt;if((f.transitions??=[]).push(d),Nn){var h=a;if(!h){for(var g=f.parent;g&&0!==(g.f&C);)for(;(g=g.parent)&&0===(g.f&y););h=!g||0!==(g.f&A)}h&&vt(()=>{un(()=>d.in())})}}function Mi(e,t,n,i,r){var o=1===i;if(h(t)){var s,a=!1;return oe(()=>{if(!a){var l=t({direction:o?"in":"out"});s=Mi(e,l,n,i,r)}}),{abort:()=>{a=!0,s?.abort()},deactivate:()=>s.deactivate(),reset:()=>s.reset(),t:()=>s.t()}}if(n?.deactivate(),!t?.duration)return r(),{abort:g,deactivate:g,reset:g,t:()=>i};const{delay:l=0,css:u,tick:c,easing:d=Fi}=t;var f=[];if(o&&void 0===n&&(c&&c(0,1),u)){var p=xi(u(0,1));f.push(p,p)}var v=()=>1-i,m=e.animate(f,{duration:l,fill:"forwards"});return m.onfinish=()=>{m.cancel();var o=n?.t()??1-i;n?.abort();var s=i-o,a=t.duration*Math.abs(s),l=[];if(a>0){var f=!1;if(u)for(var h=Math.ceil(a/(1e3/60)),g=0;g<=h;g+=1){var p=o+s*d(g/h),y=xi(u(p,1-p));l.push(y),f||="hidden"===y.overflow}f&&(e.style.overflow="hidden"),v=()=>{var e=m.currentTime;return o+s*d(e/a)},c&&function(e){let t;0===Ci.tasks.size&&Ci.tick(Ei),new Promise(n=>{Ci.tasks.add(t={c:e,f:n})})}(()=>{if("running"!==m.playState)return!1;var e=v();return c(e,1-e),!0})}(m=e.animate(l,{duration:a,fill:"forwards"})).onfinish=()=>{v=()=>i,c?.(i,1-i),r()}},{abort:()=>{m&&(m.cancel(),m.effect=null,m.onfinish=g)},deactivate:()=>{r=g},reset:()=>{0===i&&c?.(1,0)},t:()=>v()}}function Pi(e,t,n=t){var i=new WeakSet;ut(e,"input",async r=>{var o=r?e.defaultValue:e.value;if(o=Ri(e)?Di(o):o,n(o),null!==ce&&i.add(ce),await sn(),o!==(o=t())){var s=e.selectionStart,a=e.selectionEnd,l=e.value.length;if(e.value=o??"",null!==a){var u=e.value.length;s===a&&a===l&&u>l?(e.selectionStart=u,e.selectionEnd=u):(e.selectionStart=s,e.selectionEnd=Math.min(a,u))}}}),null==un(t)&&e.value&&(n(Ri(e)?Di(e.value):e.value),null!==ce&&i.add(ce)),yt(()=>{var n=t();if(e===document.activeElement){var r=de??ce;if(i.has(r))return}Ri(e)&&n===Di(e.value)||("date"!==e.type||n||e.value)&&n!==e.value&&(e.value=n??"")})}function Ui(e,t,n=t){ut(e,"change",t=>{var i=t?e.defaultChecked:e.checked;n(i)}),null==un(t)&&n(e.checked),yt(()=>{var n=t();e.checked=Boolean(n)})}function Ri(e){var t=e.type;return"number"===t||"range"===t}function Di(e){return""===e?null:+e}function ji(e,t){return e===t||e?.[P]===t}function Wi(e={},t,n,i){return vt(()=>{var i,r;return yt(()=>{i=r,r=[],un(()=>{e!==n(...r)&&(t(e,...r),i&&ji(n(...i),e)&&t(null,...i))})}),()=>{oe(()=>{r&&ji(n(...r),e)&&t(null,...r)})}}),e}function Bi(e){return function(...t){return t[0].preventDefault(),e?.apply(this,t)}}function Vi(e,t){if(e.l.s)for(const t of e.l.s)an(t);t()}function zi(e,t){var n=e.$$events?.[t.type],r=i(n)?n.slice():null==n?[]:[n];for(var o of r)o.call(this,t)}function qi(e,t,n){if(null==e)return t(void 0),g;const i=un(()=>e.subscribe(t,n));return i.unsubscribe?()=>i.unsubscribe():i}const Hi=[];function Gi(e,t=g){let n=null;const i=new Set;function r(t){if(B(e,t)&&(e=t,n)){const t=!Hi.length;for(const t of i)t[1](),Hi.push(t,e);if(t){for(let e=0;e<Hi.length;e+=2)Hi[e][0](Hi[e+1]);Hi.length=0}}}function o(t){r(t(e))}return{set:r,update:o,subscribe:function(s,a=g){const l=[s,a];return i.add(l),1===i.size&&(n=t(r,o)||g),s(e),()=>{i.delete(l),0===i.size&&n&&(n(),n=null)}}}}let Ki=!1,Ji=Symbol();function Yi(e,t,n){const i=n[t]??={store:null,source:je(void 0),unsubscribe:g};if(i.store!==e&&!(Ji in n))if(i.unsubscribe(),i.store=e??null,null==e)i.source.v=void 0,i.unsubscribe=g;else{var r=!0;i.unsubscribe=qi(e,e=>{r?i.source.v=e:Be(i.source,e)}),r=!1}return e&&Ji in n?function(e){let t;return qi(e,e=>t=e)(),t}(e):an(i.source)}function Qi(){const e={};return[e,function(){ft(()=>{for(var t in e){e[t].unsubscribe()}s(e,Ji,{enumerable:!1,value:!0})})}]}const Xi={get(e,t){if(!e.exclude.includes(t))return e.props[t]},set:(e,t)=>!1,getOwnPropertyDescriptor(e,t){if(!e.exclude.includes(t))return t in e.props?{enumerable:!0,configurable:!0,value:e.props[t]}:void 0},has:(e,t)=>!e.exclude.includes(t)&&t in e.props,ownKeys:e=>Reflect.ownKeys(e.props).filter(t=>!e.exclude.includes(t))};function Zi(e,t,n){return new Proxy({props:e,exclude:t},Xi)}const er={get(e,t){if(!e.exclude.includes(t))return an(e.version),t in e.special?e.special[t]():e.props[t]},set(e,t,n){if(!(t in e.special)){var i=jt;try{Wt(e.parent_effect),e.special[t]=rr({get[t](){return e.props[t]}},t,4)}finally{Wt(i)}}return e.special[t](n),ze(e.version),!0},getOwnPropertyDescriptor(e,t){if(!e.exclude.includes(t))return t in e.props?{enumerable:!0,configurable:!0,value:e.props[t]}:void 0},deleteProperty:(e,t)=>(e.exclude.includes(t)||(e.exclude.push(t),ze(e.version)),!0),has:(e,t)=>!e.exclude.includes(t)&&t in e.props,ownKeys:e=>Reflect.ownKeys(e.props).filter(t=>!e.exclude.includes(t))};function tr(e,t){return new Proxy({props:e,exclude:t,special:{},version:Re(0),parent_effect:jt},er)}const nr={get(e,t){let n=e.props.length;for(;n--;){let i=e.props[n];if(h(i)&&(i=i()),"object"==typeof i&&null!==i&&t in i)return i[t]}},set(e,t,n){let i=e.props.length;for(;i--;){let r=e.props[i];h(r)&&(r=r());const o=a(r,t);if(o&&o.set)return o.set(n),!0}return!1},getOwnPropertyDescriptor(e,t){let n=e.props.length;for(;n--;){let i=e.props[n];if(h(i)&&(i=i()),"object"==typeof i&&null!==i&&t in i){const e=a(i,t);return e&&!e.configurable&&(e.configurable=!0),e}}},has(e,t){if(t===P||t===U)return!1;for(let n of e.props)if(h(n)&&(n=n()),null!=n&&t in n)return!0;return!1},ownKeys(e){const t=[];for(let n of e.props)if(h(n)&&(n=n()),n){for(const e in n)t.includes(e)||t.push(e);for(const e of Object.getOwnPropertySymbols(n))t.includes(e)||t.push(e)}return t}};function ir(...e){return new Proxy({props:e},nr)}function rr(e,t,n,i){var r,o,s=!z||!!(2&n),l=!!(8&n),u=!!(16&n),c=i,d=!0,f=()=>(d&&(d=!1,c=u?un(i):i),c);if(l){var h=P in e||U in e;r=a(e,t)?.set??(h&&t in e?n=>e[t]=n:void 0)}var g,p=!1;if(l?[o,p]=function(e){var t=Ki;try{return Ki=!1,[e(),Ki]}finally{Ki=t}}(()=>e[t]):o=e[t],void 0===o&&void 0!==i&&(o=f(),r&&(s&&function(){throw new Error("https://svelte.dev/e/props_invalid_value")}(),r(o))),g=s?()=>{var n=e[t];return void 0===n?f():(d=!0,n)}:()=>{var n=e[t];return void 0!==n&&(c=void 0),void 0===n?c:n},s&&!(4&n))return g;if(r){var v=e.$$legacy;return function(e,t){return arguments.length>0?(s&&t&&!v&&!p||r(t?g():e),e):g()}}var m=!1,y=(1&n?Ee:Te)(()=>(m=!1,g()));l&&an(y);var k=jt;return function(e,t){if(arguments.length>0){const n=t?an(y):s&&l?Ge(e):e;return Be(y,n),m=!0,void 0!==c&&(c=n),e}return Mt&&m||0!==(k.f&I)?y.v:an(y)}}function or(e){pt(()=>{e();var t=jt;0!==(t.f&O)&&(console.warn("https://svelte.dev/e/legacy_recursive_reactive_block"),dn(t,$))})}function sr(){const e=K;return null===e&&j(),t=>n=>{const r=e.s.$$events?.[t];if(r){const t=i(r)?r.slice():[r];for(const i of t)i.call(e.x,n);return!n.defaultPrevented}return!0}}var ar=On('<div role="button"><!></div>');function lr(e,t){Z(t,!0);const n=sr(),i=zn();let r=rr(t,"id",3,""),o=rr(t,"classes",3,"");var s=ar(),a=Le(()=>n("click"));s.__click=function(...e){an(a)?.apply(this,e)},s.__keyup=()=>i("click"),Bn(it(s),()=>t.children??g),kt(()=>{Oi(s,"id",r()),di(s,1,`block ${o()??""}`)}),In(e,s),ee()}yn(["click","keyup"]);var ur=On('<div role="button"><!></div>');function cr(e,t){Z(t,!0);const n=sr(),i=zn();let r=rr(t,"id",3,""),o=rr(t,"classes",3,"");var s=ur(),a=Le(()=>n("click"));s.__click=function(...e){an(a)?.apply(this,e)},s.__keyup=()=>i("click"),Bn(it(s),()=>t.children??g),kt(()=>{Oi(s,"id",r()),di(s,1,`box ${o()??""} `)}),In(e,s),ee()}yn(["click","keyup"]);var dr=On('<div role="button" tabindex="0"><!></div>');function fr(e,t){Z(t,!0);const n=sr(),i=zn();let r=rr(t,"id",3,""),o=rr(t,"classes",3,"");var s=dr(),a=Le(()=>n("click"));s.__click=function(...e){an(a)?.apply(this,e)},s.__keyup=()=>i("click"),Bn(it(s),()=>t.children??g),kt(()=>{Oi(s,"id",r()),di(s,1,`content ${o()??""}`)}),In(e,s),ee()}yn(["click","keyup"]);var hr=Object.freeze({__proto__:null,UIBlock:lr,UIBlockInnerVertical:function(e,t){Z(t,!0);let n,i=rr(t,"id",15,""),r=rr(t,"classes",3,"");or(()=>{n=`block-inner-vertical ${r()}`}),lr(e,{get id(){return i()},set id(e){i(e)},get classes(){return n},set classes(e){n=e},children:(e,n)=>{var i=Sn();Bn(rt(i),()=>t.children??g),In(e,i)},$$slots:{default:!0}}),ee()},UIBox:cr,UIContent:fr});function gr(e={}){const t={get:function(e,t){return Object.hasOwn(e,t)?Reflect.get(...arguments):t}};return new Proxy(e,t)}const pr=function(){const{subscribe:e,set:t,update:n}=Gi(gr());return{subscribe:e,update:n,set:function(e){t(gr(e))},reset:function(){return t(gr())}}}();function vr(e,t,n){if("function"==typeof e?e===t:e.has(t))return arguments.length<3?t:n;throw new TypeError("Private element is not present on this object")}function mr(e,t,n){return t=Ar(t),Lr(e,Er()?Reflect.construct(t,n||[],Ar(e).constructor):t.apply(e,n))}function yr(e,t){if(t.has(e))throw new TypeError("Cannot initialize the same private elements twice on an object")}function kr(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function br(e,t){return e.get(vr(e,t))}function _r(e,t,n){yr(e,t),t.set(e,n)}function wr(e,t,n){return e.set(vr(e,t),n),n}function Or(e,t){yr(e,t),t.add(e)}function $r(e,t){for(var n=0;n<t.length;n++){var i=t[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(e,xr(i.key),i)}}function Sr(e,t,n){return t&&$r(e.prototype,t),n&&$r(e,n),Object.defineProperty(e,"prototype",{writable:!1}),e}function Ir(e,t,n){return(t=xr(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Ar(e){return Ar=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},Ar(e)}function Cr(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&Tr(e,t)}function Er(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(Er=function(){return!!e})()}function Lr(e,t){if(t&&("object"==typeof t||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}function Tr(e,t){return Tr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},Tr(e,t)}function xr(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,t);if("object"!=typeof i)return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}function Fr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Nr,Mr={exports:{}};
2
2
  /*!
3
3
  * EventEmitter v5.2.9 - git.io/ee
4
4
  * Unlicense - http://unlicense.org/
5
5
  * Oliver Caldwell - https://oli.me.uk/
6
6
  * @preserve
7
- */var Fo,Uo,Po,Mo,Do,Ro=(xo||(xo=1,Fo=No,function(e){function t(){}var n=t.prototype,i=e.EventEmitter;function r(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function o(e){return function(){return this[e].apply(this,arguments)}}function s(e){return"function"==typeof e||e instanceof RegExp||!(!e||"object"!=typeof e)&&s(e.listener)}n.getListeners=function(e){var t,n,i=this._getEvents();if(e instanceof RegExp)for(n in t={},i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n]);else t=i[e]||(i[e]=[]);return t},n.flattenListeners=function(e){var t,n=[];for(t=0;t<e.length;t+=1)n.push(e[t].listener);return n},n.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&((t={})[e]=n),t||n},n.addListener=function(e,t){if(!s(t))throw new TypeError("listener must be a function");var n,i=this.getListenersAsObject(e),o="object"==typeof t;for(n in i)i.hasOwnProperty(n)&&-1===r(i[n],t)&&i[n].push(o?t:{listener:t,once:!1});return this},n.on=o("addListener"),n.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},n.once=o("addOnceListener"),n.defineEvent=function(e){return this.getListeners(e),this},n.defineEvents=function(e){for(var t=0;t<e.length;t+=1)this.defineEvent(e[t]);return this},n.removeListener=function(e,t){var n,i,o=this.getListenersAsObject(e);for(i in o)o.hasOwnProperty(i)&&-1!==(n=r(o[i],t))&&o[i].splice(n,1);return this},n.off=o("removeListener"),n.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},n.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},n.manipulateListeners=function(e,t,n){var i,r,o=e?this.removeListener:this.addListener,s=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(i=n.length;i--;)o.call(this,t,n[i]);else for(i in t)t.hasOwnProperty(i)&&(r=t[i])&&("function"==typeof r?o.call(this,i,r):s.call(this,i,r));return this},n.removeEvent=function(e){var t,n=typeof e,i=this._getEvents();if("string"===n)delete i[e];else if(e instanceof RegExp)for(t in i)i.hasOwnProperty(t)&&e.test(t)&&delete i[t];else delete this._events;return this},n.removeAllListeners=o("removeEvent"),n.emitEvent=function(e,t){var n,i,r,o,s=this.getListenersAsObject(e);for(o in s)if(s.hasOwnProperty(o))for(n=s[o].slice(0),r=0;r<n.length;r++)!0===(i=n[r]).once&&this.removeListener(e,i.listener),i.listener.apply(this,t||[])===this._getOnceReturnValue()&&this.removeListener(e,i.listener);return this},n.trigger=o("emitEvent"),n.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},n.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},n._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},n._getEvents=function(){return this._events||(this._events={})},t.noConflict=function(){return e.EventEmitter=i,t},Fo.exports?Fo.exports=t:e.EventEmitter=t}("undefined"!=typeof window?window:No.exports||{})),No.exports),jo=To(Ro);var Vo,zo=(Do||(Do=1,Mo=function(){if(Po)return Uo;Po=1;const e=".",t=":",n="::",i="()";return Uo=class{static get SUB_PATH_START(){return"{"}static get SUB_PATH_END(){return"}"}static get PATH_SPLIT(){return e}static get PATH_START_OBJECT(){return t}static get PATH_START_HELPERS(){return n}static get FUNCTION_MARKER(){return i}static get MAX_DEEP(){return 10}static findNextSubPath(e){let t="",n=!1;for(let i=0;i<e.length;i++)if("{"===e[i])n=!0,t="";else{if("}"===e[i]&&n)return t;t+=e[i]}return n?t:null}static replaceSubPath(e,t,n){let i="{"+t+"}",r=0;for(;e.indexOf(i)>-1&&r<10;)e=e.replace(i,n),r++;return e}static parseSubs(e,t,i){let r,o=this.findNextSubPath(e),s=0;for(;o&&(r=this.getValueByPath(o.indexOf(n)>-1?i:t,o,t,i),e=this.replaceSubPath(e,o,r),s++,!(s>10));)o=this.findNextSubPath(e);return e}static get(e,i,r=void 0){switch(e){case t:return i;case n:return r}return e=this.parseSubs(e,i,r),this.getValueByPath(e.indexOf(n)>-1?r:i,e,i,r)}static set(e,t,i,r=void 0){3===arguments.length&&(r=i,i=void 0);let o,s=this.findNextSubPath(e),a=0;for(;s&&(o=this.getValueByPath(s.indexOf(n)>-1?i:t,s,t,i),e=this.replaceSubPath(e,s,o),!(a>10));)s=this.findNextSubPath(e),a++;this.setValueByPath(t,e,r),t.isRecord&&this.normilizePath(e).length>1&&t.__isActive&&t.trigger("change",t,e,r)}static unset(e,t,n){this.set(e,t,n,null)}static parsePathStep(e,r,o){let s=null;if(0===e.indexOf(n)&&o){if(s=e.replace(n,""),s.indexOf(i)!==s.length-2)return o[s];if(s=s.replace(i,""),Object.prototype.hasOwnProperty.call(o,s))return o[s](r,void 0)}else if(0===e.indexOf(t)&&r){if(s=e.replace(t,""),s.indexOf(i)!==s.length-2)return r[s];if(s=s.replace(i,""),Object.prototype.hasOwnProperty.call(r,s))return r[s](r,void 0)}return e}static parsePath(t,n,i){Array.isArray(t)||(t=t.split(e));for(var r=0;r<t.length;r++)t[r]=this.parsePathStep(t[r],n,i);return t}static normilizePath(n){if(Array.isArray(n))return n;for(;n.indexOf(t)>-1;)n=n.replace(t,"");return n.split(e)}static ifFullSubPath(e,t){if(e.length<t.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}static getValueByPath(e,t,n,r){let o=(t=this.normilizePath(t)).shift(),s=o.indexOf(i)>-1;if(s&&(o=o.replace(i,"")),("object"==typeof e||"function"==typeof e)&&null!=e&&void 0!==e[o]&&null!==e[o]){let i=s?e[o]({item:n,helpers:r}):e[o];return t.length>0?this.getValueByPath(i,t,n,r):i}}static setValueByPath(e,t,n){let i=(t=this.normilizePath(t)).shift();t.length>0?(Object.prototype.hasOwnProperty.call(e,i)||(e[i]={}),this.setValueByPath(e[i],t,n)):e[i]=n}static join(){return Array.prototype.slice.call(arguments).join(e)}},Uo}()),Mo),Wo=To(zo);let Bo=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===qo}(e)}(e)};var qo="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function Ho(e,t){return(!t||!1!==t.clone)&&Bo(e)?Ko((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function Go(e,t,n){return e.concat(t).map(function(e){return Ho(e,n)})}function Ko(e,t,n){const i=Array.isArray(t);if(i===Array.isArray(e)){if(i){return((n||{arrayMerge:Go}).arrayMerge||Go)(e,t,n)}return function(e,t,n){const i={};return Bo(e)&&Object.keys(e).forEach(function(t){i[t]=Ho(e[t],n)}),Object.keys(t).forEach(function(r){Bo(t[r])&&e[r]?i[r]=Ko(e[r],t[r],n):i[r]=Ho(t[r],n)}),i}(e,t,n)}return Ho(t,n)}Ko.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return Ko(e,n,t)},{})};let Jo=function(){function e(){io(this,e)}return uo(e,null,[{key:"isError",value:function(e){return e instanceof Error||Object.hasOwn(e,"status")&&"error"===e.status}},{key:"mute",value:function(){e.ENV_TYPE="production"}},{key:"pad",value:function(e){return e<10?"0"+e:e}},{key:"getTodayDate",value:function(){let e=new Date;return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()}},{key:"objHas",value:function(e,t){return Object.hasOwn(e,t)}},{key:"copyObj",value:function(e){return JSON.parse(JSON.stringify(e))}},{key:"partCopyObj",value:function(e,t){let n=Object.keys(e).reduce(function(n,i){return t.includes(i)&&(n[i]=e[i]),n},{});return JSON.parse(JSON.stringify(n))}},{key:"compareTwoArrays",value:function(e,t){return e.length===t.length&&e.every(function(e,n){return e===t[n]})}},{key:"isFunc",value:function(e){return"function"==typeof e}},{key:"isAsync",value:function(e){return"AsyncFunction"===e.constructor.name}},{key:"executeObjectFunction",value:async function(t,n,i){if(t){const r=Wo.get(":"+n,t);if(e.isFunc(r))return e.isAsync(r)?await r(...i):r(...i)}}},{key:"mapBind",value:function(e,t,n){n.forEach(function(n){"function"==typeof e[n]&&(t[n]=e[n].bind(e))})}},{key:"isClass",value:function(e){return/^\s*class/.test(e.toString())}},{key:"detectType",value:function(t){return"function"!=typeof t?typeof t:e.isClass(t)?"class":"function"}},{key:"isArray",value:function(e){return"object"==typeof e&&e instanceof Array}},{key:"localIsoDate",value:function(t){return(t=t||new Date).getFullYear()+"-"+e.pad(t.getMonth()+1)+"-"+e.pad(t.getDate())+"T"+e.pad(t.getHours())+":"+e.pad(t.getMinutes())+":"+e.pad(t.getSeconds())}},{key:"getToday",value:function(){let t=new Date;return t.getFullYear()+"-"+e.pad(t.getMonth()+1)+"-"+e.pad(t.getDate())}},{key:"backlogAdd",value:function(t,n="log"){!0===e.get("backlog")&&e.backlog.push({msg:t,type:n})}},{key:"dumpBacklog",value:function(){for(;e.backlog.length;){let t=e.backlog.shift();window[e.LOG][t.type](...t.msg)}}},{key:"logMsg",value:function(){let t=e.localIsoDate();window[e.LOG].log(`[${t}]: `,...arguments),e.backlogAdd([`[${t}]: `,...arguments],"log")}},{key:"log",value:function(){e.logMsg(...arguments)}},{key:"createLogger",value:function(t){return{log:e.genLogMsg(t),error:e.genLogError(t),debug:e.genLogDebug(t),report:e.report}}},{key:"genLogMsg",value:function(t){return function(){let n=e.localIsoDate();window[e.LOG].log(`[${n}]: ${t}::`,...arguments),e.backlogAdd([`[${n}]: ${t}::`,...arguments],"log")}}},{key:"isDev",value:function(){return e.ENV_TYPE===e.DEV_ENV}},{key:"debug",value:function(){return e.isDev()?e.logMsg(...arguments):e.NOOP}},{key:"genLogDebug",value:function(t){return e.isDev()?e.genLogMsg(t):e.NOOP}},{key:"error",value:function(){e.logError(...arguments)}},{key:"logError",value:function(){let t=e.localIsoDate();window[e.LOG].error(`[${t}]: `,...arguments),e.backlogAdd([`[${t}]: `,...arguments],"error")}},{key:"genLogError",value:function(t){return function(){let n=e.localIsoDate();window[e.LOG].error(`[${n}]: ${t}::`,...arguments),e.backlogAdd([`[${n}]: ${t}::`,...arguments],"error")}}},{key:"report",value:function(t){if(e.getApp()){let n=e.getApp().getService("nsErrorReporter");n&&n.report(t).catch(e.error)}else e.get("production")||e.error(...arguments)}},{key:"trace",value:function(){e.get("production")||e.trace(...arguments)}},{key:"trimBackslash",value:function(e){return 0===e.indexOf("/")&&(e=e.substring(1)),"/"===e[e.length-1]&&(e=e.substring(0,e.length-1)),e}},{key:"buildURL",value:function({prefix:t,module:n,model:i,id:r,action:o}={prefix:"",module:"",model:"",id:"",action:""}){let s=["/"];return t&&s.push(encodeURIComponent(e.trimBackslash(t))),n&&s.push(encodeURIComponent(e.trimBackslash(n))),i&&s.push(encodeURIComponent(e.trimBackslash(i))),r&&s.push(encodeURIComponent(e.trimBackslash(r))),o&&s.push(encodeURIComponent(e.trimBackslash(o))),s=s.filter(function(e){return""!==e}),s.join("/").replace(/\/\//g,"/")}},{key:"capitalizeFirstLetter",value:function(e){return e.charAt(0).toUpperCase()+e.slice(1)}},{key:"lowerFirstLetter",value:function(e){return e.charAt(0).toLowerCase()+e.slice(1)}},{key:"strLengthCap",value:function(e,t=50,n="..."){return"string"==typeof e&&e.length>t?e.substr(0,t)+n:e}},{key:"escapeHtml",value:function(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}},{key:"startApp",value:function(e){document.addEventListener("DOMContentLoaded",e)}},{key:"getApp",value:function(){return e.get("app")}},{key:"extendAppConfig",value:function(t,n){return e.deepMerge(t,n)}},{key:"absorbModule",value:function(){let t,n,i={};1==arguments.length?(i={...arguments[0]},Object.hasOwnProperty.call(arguments[0],"defaultConf")&&(t=arguments[0].defaultConf,delete i.defaultConf),Object.hasOwnProperty.call(arguments[0],"mod")&&(n=arguments[0].mod,delete i.mod)):(e.log("WARNING: absorbModule format obsoleted, use object {defaultConf, mod, services, uis, wsc, etc}"),t=arguments[0],n=arguments[1],arguments.length>2&&(i.services=arguments[2]),arguments.length>3&&(i.uis=arguments[3]),arguments.length>4&&(i.wcs=arguments[4]));for(let r in n)"manifest"!==r?"function"==typeof e.get(`absorb.${r}`)?(Object.hasOwn(i,r)||(i[r]={},e.log(`WARNING: no accamulator object provided for '${r}' collection`)),e.get(`absorb.${r}`)(i[r],n[r])):0===r.indexOf("nc")?(Object.hasOwn(t,"controllers")||(t.controllers={}),t.controllers[r]=n[r]):(Object.hasOwn(window,"notEnv")||(window.notEnv={}),window.notEnv[r]=n[r]):t=e.extendAppConfig(t,n.manifest);return t}},{key:"defineIfNotExists",value:function(e,t,n){Object.hasOwn(e,t)||(e[t]=n)}},{key:"register",value:function(t,n){e.registry[t]=n}},{key:"get",value:function(t){return Object.hasOwn(e.registry,t)?e.registry[t]:null}},{key:"moveItem",value:function(e,t,n){const i=function(t){return t<e.length&&t>-1};i(n)&&i(t)&&e.splice(n,0,e.splice(t,1)[0])}},{key:"stripProxy",value:function(t){if(null!=t&&t.isProxy){t=Array.isArray(t)?Array.from(t):Object.assign({},t);for(let n in t)Object.hasOwn(t,n)&&(t[n]=e.stripProxy(t[n]))}return t}},{key:"pipe",value:function(e,t){let n;for(let i of t)n=i(n||e);return n}},{key:"getAPI",value:function(t){return e.getManager()?.getAPI(t)??null}},{key:"setManager",value:function(t){e.MANAGER=t}},{key:"getManager",value:function(){return e.MANAGER}},{key:"getJSON",value:function(e){return fetch(e).then(function(e){return e.json()})}},{key:"wait",value:function(e){return new Promise(function(t){setTimeout(t,1e3*e)})}},{key:"registerWidgetEvents",value:function(t){e.getApp()&&Object.keys(t).forEach(function(n){e.getApp().on(n,t[n])})}},{key:"navigate",value:function(t){e.getApp()&&e.getApp().getWorking("router").navigate(t)}},{key:"select",value:function(t,n,i){return t&&"object"==typeof t&&e.objHas(t,n)&&void 0!==t[n]&&null!==t[n]?t[n]:i}}])}();function Yo(e,t,n){Object.hasOwn(e,t)||(e[t]={connection:{},router:{routes:{}},messenger:{}});let i=e[t];if(Object.hasOwn(n,"router")&&Object.hasOwn(n.router,"routes"))for(let e in n.router.routes)Object.hasOwn(i.router.routes,e)||(i.router.routes[e]={}),Object.assign(i.router.routes[e],{...n.router.routes[e]});Object.hasOwn(n,"messenger")&&Object.assign(i.messenger,{...n.messenger}),Object.hasOwn(n,"connection")&&Object.assign(i.connection,{...n.connection});for(let e of["name","getToken","logger","identity","credentials"])Object.hasOwn(n,e)&&(i[e]=n[e])}Vo=Jo,co(Jo,"MANAGER",null),co(Jo,"LOG","console"),co(Jo,"deepMerge",Ko),co(Jo,"TZ_OFFSET",(new Date).getTimezoneOffset()/60*-1),co(Jo,"DEV_ENV","production"),co(Jo,"ENV_TYPE",window.NOT_ENV_TYPE??Vo.DEV_ENV),co(Jo,"NOOP",function(){}),co(Jo,"backlog",[]),co(Jo,"registry",{}),Jo.register("absorb.wsc",function(e,t){if(e)for(let n in t)Yo(e,n,t[n])}),Jo.register("absorb.services",function(e,t){if(e)for(let n in t)Object.hasOwn(e,n)&&Jo.logError(`services property duplication ${n}`),e[n]=t[n]}),Jo.register("absorb.uis",function(e,t){if(e)for(let n in t)Object.hasOwn(e,n)&&Jo.logError(`uis property duplication ${n}`),e[n]=t[n]}),Jo.register("absorb.uis",function(e,t){if(e)for(let n in t)Object.hasOwn(e,n)&&Jo.logError(`fields property duplication ${n}`),e[n]=t[n]});let Qo=function(e){function t(){var e;io(this,t),(e=to(this,t)).dict={},e.helpers={};let n=e.restoreFromStorage();return n&&e.set(n),e}return ho(t,e),uo(t,[{key:"format",value:function(e,t){return Wo.parseSubs(e,t,this.helpers)}},{key:"say",value:function(e,t=!1){try{if(Jo.objHas(this.dict,e)){let n=this.dict[e],i="";return i=t?this.format(n,t):n,i}throw new Error(`Unknown locale phrase: ${e}`)}catch(t){return Jo.debug(t),e}}},{key:"set",value:function(e){Lo.set(e),this.saveToStorage(e),this.dict=Object.assign({},{...e}),this.emit("change")}},{key:"saveToStorage",value:function(e){if(window.localStorage)try{return window.localStorage.setItem("dictionary",JSON.stringify(e))}catch(e){return Jo.debug(e),!1}return!1}},{key:"restoreFromStorage",value:function(){if(window.localStorage)try{let e=window.localStorage.getItem("dictionary");if(e){return JSON.parse(e)}return!1}catch(e){return Jo.debug(e),!1}return!1}},{key:"vocabulary",value:function(){return Lo}}])}(jo);var Zo=new Qo;const Xo=Zo.say.bind(Zo);var es=mi("<span> </span>");function ts(e,t){Oe(t,!0);const[n,i]=Rr();let r=Gr(t,"id",3,"tagId"),o=Gr(t,"title",7,"tag"),s=Gr(t,"color",3,"info"),a=Gr(t,"size",3,"normal"),l=Gr(t,"padding",3,"normal"),u=Gr(t,"bold",3,!1),c=Gr(t,"right",3,!1),d=Gr(t,"left",3,!1),f=Gr(t,"top",3,!1),h=Gr(t,"bottom",3,!1),v=Gr(t,"class",3,""),g=Gr(t,"events",23,()=>({})),p=Gr(t,"register",19,()=>Jo.registerWidgetEvents.bind(Jo)),m=Gr(t,"onUpdate",3,e=>{Object.hasOwn(e,"title")&&o(e.title)}),y=Gr(t,"vars",19,()=>({})),b=Gr(t,"role",3,"button"),k=Gr(t,"tabIndex",3,"0"),$=at(()=>c()||d()||f()||h()),_=at(()=>!c()&&!d()&&Hn($)),w=at(()=>!h()&&!f()&&Hn($));function I(){return`tag-${r()}:update`}let O=yt("");Kr(()=>{Object.hasOwn(g(),I())||(g()[I()]=m()),p()(g())}),Xt(()=>{$t(O,Object.keys(fe(y())).map(e=>`${e}: ${y()[e]};`).join(""),!0)});var A=bi(),S=zt(A),C=e=>{var i=es();let g;i.__keydown=function(...e){(t.action?t.action:void 0)?.apply(this,e)},i.__click=function(...e){(t.action?t.action:void 0)?.apply(this,e)};var p=Vt(i,!0);ne(i),on(()=>{lr(i,"role",b()),lr(i,"tabindex",k()),lr(i,"id",`tag-${r()??""}`),g=Qi(i,1,`\n tag\n ${"normal"!==l()?`is-padded-${l()}`:""}\n is-${a()??""}\n is-${s()??""} \n ${v()??""}`,null,g,{"is-clickable":t.action,"has-text-weight-bold":u(),"is-vertical-centered":Hn(w),"is-horizontal-centered":Hn(_),"is-sided":Hn($),"is-sided-right":c(),"is-sided-left":d(),"is-sided-top":f(),"is-sided-bottom":h()}),Xi(i,Hn(O)),wi(p,Dr(Lo,"$LOCALE",n)[o()])}),ki(e,i)};Li(S,e=>{o()&&e(C)}),ki(e,A),Ae(),i()}function ns(e,t){let n=Gr(t,"LC_TRUE",3,"not-node:booleans_true"),i=Gr(t,"LC_FALSE",3,"not-node:booleans_false"),r=Gr(t,"inverted",3,!1);const o={title:i(),color:r()?"success":"danger"},s={title:n(),color:r()?"danger":"success"};let a=at(()=>t.value?s:o);ts(e,Hr(()=>Hn(a)))}fi(["keydown","click"]);var is=mi('<span class="label"> <!></span>');function rs(e,t){Oe(t,!0);let n=Gr(t,"values",19,()=>[]),i=Gr(t,"inverted",3,!1),r=Gr(t,"componentConstructor",3,ns),o=yt(Ct([]));Kr(()=>{"boolean"==typeof n()?$t(o,[{value:n()}],!0):Array.isArray(n())&&(n().every(e=>"boolean"==typeof e)?$t(o,n().map(e=>({value:e})),!0):$t(o,[...n()],!0))});var s=bi(),a=zt(s),l=e=>{var n=bi();Fi(zt(n),17,()=>Hn(o),Ni,(e,n,o)=>{var s=bi(),a=zt(s),l=e=>{var i=bi();zi(zt(i),()=>t.itemRenderer,()=>Hn(n),()=>o),ki(e,i)},u=e=>{var t=bi(),o=zt(t);{let e=at(()=>i()||Hn(n).inverted);Wi(o,r,(t,i)=>{i(t,Hr(()=>Hn(n),{get inverted(){return Hn(e)}}))})}ki(e,t)};Li(a,e=>{t.itemRenderer?e(l):e(u,!1)}),ki(e,s)}),ki(e,n)};Li(a,e=>{Hn(o).length&&e(l)}),ki(e,s),Ae()}var os=mi('<span role="button" tabindex="0"><i></i></span>'),ss=mi('<span class="icon is-small is-right is-clickable is-vertical-middle" role="button" tabindex="0"><i></i></span>'),as=mi("<span> </span> <!> <!>",1);fi(["click","keydown"]);var ls=mi("<span> </span>");function us(e,t){Oe(t,!0);let n=Gr(t,"id",3,"tagId"),i=Gr(t,"state",15,"light"),r=Gr(t,"size",3,"normal"),o=Gr(t,"labels",19,()=>({black:"black",dark:"dark",light:"light",white:"white",primary:"primary",link:"link",info:"info",success:"success",warning:"warning",danger:"danger"})),s=Gr(t,"class",3,"mx-1"),a=Gr(t,"padding",3,"normal"),l=Gr(t,"bold",3,!1),u=Gr(t,"right",3,!1),c=Gr(t,"left",3,!1),d=Gr(t,"top",3,!1),f=Gr(t,"bottom",3,!1),h=Gr(t,"events",31,()=>Ct({})),v=Gr(t,"register",19,()=>Jo.registerWidgetEvents.bind(Jo)),g=Gr(t,"onUpdate",3,e=>{Object.hasOwn(e,"state")&&i(e.state)});function p(){return`indicator-${n()}:update`}Kr(()=>{Object.hasOwn(h(),p())||h(h()[p()]=g(),!0),v()(h())});let m=at(()=>u()||c()||d()||f());var y=ls();let b;var k=Vt(y,!0);ne(y),on(()=>{b=Qi(y,1,`tag is-${r()??""} ${"normal"!==a()?`is-padded-${a()}`:""} is-${i()??""} ${s()??""}`,null,b,{"has-text-weight-bold":l(),"is-sided":Hn(m),"is-sided-right":u(),"is-sided-left":c(),"is-sided-top":d(),"is-sided-bottom":f()}),wi(k,o()[i()])}),ki(e,y),Ae()}var cs=mi('<span class="title"> </span>'),ds=mi("<div><!></div>");function fs(e,t){Oe(t,!0);const[n,i]=Rr();let r,o=Gr(t,"loading",7,!1),s=Gr(t,"size",3,"container"),a=Gr(t,"title",3,"Waiting...");Kr(()=>{t.ttl&&(r=setTimeout(()=>{o(!1),t.onreject()},t.ttl))}),Jr(()=>{r&&clearTimeout(r)});var l=bi(),u=zt(l),c=e=>{var i=ds();let r;var l=Vt(i),u=e=>{var n=bi();zi(zt(n),()=>t.children??f),ki(e,n)},c=e=>{var t=cs(),i=Vt(t,!0);ne(t),on(()=>wi(i,Dr(Lo,"$LOCALE",n)[a()])),ki(e,t)};Li(l,e=>{t.children?e(u):e(c,!1)}),ne(i),on(()=>r=Qi(i,1,Gi("page"===s()?"pageloader":"containerloader"),null,r,{"is-active":o()})),ki(e,i)};Li(u,e=>{"hidden"!==s()&&e(c)}),ki(e,l),Ae(),i()}var hs=mi("<option> </option>");function vs(e,t){Oe(t,!0);const[n,i]=Rr();var r=hs(),o=Vt(r,!0);ne(r);var s={};on(()=>{ar(r,t.selected),wi(o,Dr(Lo,"$LOCALE",n)[t.title]),s!==(s=t.value)&&(r.value=(r.__value=t.value)??"")}),ki(e,r),Ae(),i()}var gs=mi('<span class="mr-2"> </span>'),ps=mi('<span class="mr-2"> </span>'),ms=mi("<div><select><!><!></select></div>");function ys(e,t){Oe(t,!0);const n=()=>Dr(Lo,"$LOCALE",i),[i,r]=Rr();let o=Gr(t,"value",15,""),s=Gr(t,"variants",19,()=>[]);Gr(t,"placeholder",3,"");let a=Gr(t,"emptyValueTitle",3,"no-selection"),l=Gr(t,"emptyValueEnabled",3,!0),u=Gr(t,"emptyValue",3,""),c=Gr(t,"fieldname",3,"select"),d=Gr(t,"required",3,!0),f=Gr(t,"readonly",3,!1),h=Gr(t,"valid",3,!0),v=Gr(t,"class",3,""),g=Gr(t,"onchange",3,()=>!0),p=zr(t,["$$slots","$$events","$$legacy","value","variants","placeholder","emptyValueTitle","emptyValueEnabled","emptyValue","fieldname","required","readonly","size","color","loading","valid","class","onchange"]),m=yt(Ct([]));function y(e){return!!o()&&o()==e.id}function b(e){const t={field:c(),value:e.currentTarget.value};var n;(function(e){if(Array.isArray(e)&&Array.isArray(o())){if(Jo.compareTwoArrays(o(),e))return!0}else if(e===o())return!0;return!1})(t.value)||((n=t.value)===bo.CLEAR_MACRO?o(""):o(n),g()(t))}Xt(()=>{$t(m,Array.isArray(s())?s().filter(y):[],!0)});let k=at(()=>!h());Kr(()=>{f()||o()||l()&&s().length&&(o(s()[0].id),g()({field:c(),value:s()[0].id}))});var $=bi(),_=zt($),w=e=>{var t=bi(),i=zt(t),r=e=>{var t=bi();Fi(zt(t),17,()=>Hn(m),Ni,(e,t)=>{var i=gs(),r=Vt(i,!0);ne(i),on(()=>wi(r,n()[Hn(t).title])),ki(e,i)}),ki(e,t)},s=e=>{var t=bi(),i=zt(t),r=e=>{var t=ps(),i=Vt(t,!0);ne(t),on(()=>wi(i,n()[a()])),ki(e,t)};Li(i,e=>{l()&&e(r)},!0),ki(e,t)};Li(i,e=>{o()?e(r):e(s,!1)}),ki(e,t)},I=e=>{var n=ms(),i=Vt(n);ur(i,()=>({id:`form-field-select-${c()??""}`,name:c(),oninput:b,onblur:b,readonly:f(),required:d(),invalid:Hn(k),size:t.size,...p}));var r=Vt(i),h=e=>{vs(e,{get value(){return u()},get title(){return a()}})};Li(r,e=>{l()&&e(h)}),Fi(Wt(r),17,s,e=>e.id,(e,t)=>{{let n=at(()=>o()==Hn(t).id);vs(e,{get value(){return Hn(t).id},get selected(){return Hn(n)},get title(){return Hn(t).title}})}}),ne(i),ne(n),on(()=>Qi(n,1,`select ${t.loading?"is-loading":""} ${t.size?`is-${t.size}`:""} ${t.color?`is-${t.color}`:""} ${v()??""}`)),ki(e,n)};Li(_,e=>{f()?e(w):e(I,!1)}),ki(e,$),Ae(),r()}var bs=mi('<span class="icon"><i></i></span>'),ks=mi("<span> </span>"),$s=mi('<span class="icon"><i></i></span>'),_s=mi("<!> <!> <!>",1),ws=mi("<button><!></button>");function Is(e,t){Oe(t,!0);const n=()=>Dr(Lo,"$LOCALE",i),[i,r]=Rr();let o=Gr(t,"title",3,""),s=Gr(t,"light",3,!1),a=Gr(t,"loading",3,!1),l=Gr(t,"raised",3,!1),u=Gr(t,"outlined",3,!1),c=Gr(t,"inverted",3,!1),d=Gr(t,"rounded",3,!1),f=Gr(t,"disabled",3,!1),h=Gr(t,"state",3,""),v=Gr(t,"type",3,""),g=Gr(t,"color",3,""),p=Gr(t,"size",3,""),m=Gr(t,"style",3,""),y=Gr(t,"class",3,""),b=Gr(t,"icon",3,!1),k=Gr(t,"iconSide",3,"right"),$=Gr(t,"onclick",3,()=>!0),_=Gr(t,"action",3,()=>!0);var w=ws();w.__click=function(e){return e.stopPropagation(),$()&&$()({event:e,value:t.value}),_()&&_()(e,t.value)};var I=Vt(w),O=e=>{var n=bi();zi(zt(n),()=>t.children),ki(e,n)},A=e=>{var t=bi(),i=zt(t),r=e=>{var t=_s(),i=zt(t),r=e=>{var t=bs(),n=Vt(t);ne(t),on(()=>Qi(n,1,`fas fa-${b()??""} ${p()?`is-${p()}`:""}`)),ki(e,t)};Li(i,e=>{"left"===k()&&e(r)});var s=Wt(i,2),a=e=>{var t=ks(),i=Vt(t,!0);ne(t),on(()=>wi(i,n()[o()])),ki(e,t)};Li(s,e=>{o()&&e(a)});var l=Wt(s,2),u=e=>{var t=$s(),n=Vt(t);ne(t),on(()=>Qi(n,1,`fas fa-${b()??""} ${p()?`is-${p()}`:""}`)),ki(e,t)};Li(l,e=>{"right"===k()&&e(u)}),ki(e,t)},s=e=>{var t=yi();on(()=>wi(t,n()[o()])),ki(e,t)};Li(i,e=>{b()?e(r):e(s,!1)},!0),ki(e,t)};Li(I,e=>{t.children?e(O):e(A,!1)}),ne(w),on(()=>{w.disabled=f(),lr(w,"type",v()?v():""),Xi(w,m()),Qi(w,1,`\n button\n ${y()??""}\n ${h()?`is-${h()}`:""}\n ${c()?"is-inverted":""}\n ${u()?"is-outlined":""}\n ${l()?"is-raised":""}\n ${d()?"is-rounded":""}\n ${s()?"is-light":""}\n ${a()?"is-loading":""}\n ${g()?`is-${g()}`:""}\n ${p()?`is-${p()}`:""}\n `)}),ki(e,w),Ae(),r()}fi(["click"]);var Os=mi("<button></button>");function As(e,t){Oe(t,!0);let n=Gr(t,"ariaLabel",3,"delete button");Gr(t,"light",3,!1),Gr(t,"loading",3,!1),Gr(t,"raised",3,!1),Gr(t,"outlined",3,!1),Gr(t,"inverted",3,!1),Gr(t,"rounded",3,!1);let i=Gr(t,"disabled",3,!1);Gr(t,"state",3,""),Gr(t,"color",3,"");let r=Gr(t,"size",3,""),o=Gr(t,"style",3,""),s=Gr(t,"class",3,""),a=Gr(t,"onclick",3,()=>!0);var l=Os();l.__click=function(e){e.stopPropagation(),a()&&a()({event:e,value:t.value})},on(()=>{lr(l,"aria-label",n()),l.disabled=i(),Xi(l,o()),Qi(l,1,`\n delete\n ${s()??""} \n ${r()?`is-${r()}`:""}\n `)}),ki(e,l),Ae()}fi(["click"]);var Ss=mi("<div></div>");function Cs(e,t){Oe(t,!0);let n=Gr(t,"values",19,()=>[]),i=Gr(t,"centered",3,!1),r=Gr(t,"right",3,!1),o=Gr(t,"class",3,""),s=Gr(t,"buttonComponent",3,Is),a=Gr(t,"action",3,()=>!0),l=Gr(t,"onclick",3,()=>!0),u=yt(Ct([]));Xt(()=>{$t(u,n().map(e=>(isNaN(e.id)&&(e.id=Math.round(100*Math.random())),e)),!0)});var c=Ss();let d;Fi(c,21,()=>Hn(u),e=>e.id,(e,t,n)=>{var i=bi();Wi(zt(i),s,(e,n)=>{n(e,Hr({get action(){return a()},get onclick(){return l()}},()=>Hn(t),{get value(){return Hn(t).value},set value(e){Hn(t).value=e}}))}),ki(e,i)}),ne(c),on(()=>d=Qi(c,1,`buttons has-addons ${o()??""}`,null,d,{"is-right":r(),"is-centered":i()})),ki(e,c),Ae()}var Es=mi('<div><div class="column"><!></div> <div class="column"><!></div> <div class="column"><!></div></div>');function Ls(e,t){let n=Gr(t,"class",3,""),i=Gr(t,"left",19,()=>[]),r=Gr(t,"center",19,()=>[]),o=Gr(t,"right",19,()=>[]);var s=Es(),a=Vt(s);Cs(Vt(a),{get values(){return i()}}),ne(a);var l=Wt(a,2);Cs(Vt(l),{get values(){return r()},centered:!0}),ne(l);var u=Wt(l,2);Cs(Vt(u),{get values(){return o()},right:!0}),ne(u),ne(s),on(()=>Qi(s,1,`columns ${n()??""}`)),ki(e,s)}function Ts(e,t){Oe(t,!0);let n=Gr(t,"title",3,""),i=Gr(t,"light",3,!1),r=Gr(t,"loading",3,!1),o=Gr(t,"raised",3,!1),s=Gr(t,"outlined",3,!1),a=Gr(t,"inverted",3,!1),l=Gr(t,"rounded",3,!1),u=Gr(t,"disabled",3,!1),c=Gr(t,"state",3,""),d=Gr(t,"type",3,""),f=Gr(t,"color",3,""),h=Gr(t,"size",3,""),v=Gr(t,"class",3,""),g=Gr(t,"icon",3,!1),p=Gr(t,"iconSide",3,"right"),m=Gr(t,"uiOff",3,()=>({color:""})),y=Gr(t,"uiOn",3,()=>({color:"success"})),b=Gr(t,"action",3,()=>!_()),k=Gr(t,"onclick",3,()=>{}),$=Gr(t,"onchange",3,()=>{}),_=Gr(t,"selected",15,!1),w=yt(Ct({title:n(),light:i(),loading:r(),raised:o(),outlined:s(),inverted:a(),rounded:l(),disabled:u(),type:d(),color:f(),size:h(),class:v(),icon:g(),iconSide:p(),value:t.value})),I=yt(void 0);function O(){if(Hn(I)){const e=_()?y()(t.value,_()):m()(t.value,_());Object.keys(e).forEach(t=>{Hn(w)[t]=e[t]}),$t(w,Hn(w),!0)}}Kr(()=>{O()}),Xt(()=>{void 0!==_()&&O()});var A={updateUI:O};return Cr(Is(e,Hr(()=>Hn(w),{get state(){return c()},onclick:function(e){_(b()(e,t.value,_())),O(),k()({value:t.value,selected:_()}),$()({value:t.value,selected:_()})}})),e=>$t(I,e,!0),()=>Hn(I)),Ae(A)}var xs=mi("<div></div>");function Ns(e,t){Oe(t,!0);const n={};function i(e){n[e.id].updateUI()}let r=Gr(t,"values",23,()=>[]),o=Gr(t,"centered",3,!1),s=Gr(t,"right",3,!1),a=Gr(t,"class",3,""),l=Gr(t,"buttonComponent",3,Ts),u=Gr(t,"buttonProps",19,()=>({})),c=Gr(t,"action",3,(e,t,n)=>{const i=m();if(i===h()&&n)return n;if(i===v()&&!0!==n)return n;const r=g.findIndex(e=>e.value===t);let o=n;if(r>-1){o=!o;const e=m()+(o?1:-1);return h()&&e<h()&&y(e,r),v()&&v()<e&&b(e,r),o}return o}),d=Gr(t,"onclick",3,()=>!0),f=Gr(t,"onchange",3,()=>!0),h=Gr(t,"min",3,0),v=Gr(t,"max",3,100),g=Ct(r());function p(){r(fe(g));const e=r().filter(e=>e.selected),t=e.map(e=>e.id),n=t.length;f()&&f()({values:r(),selected:e,selectedIds:t,selectedCount:n})}function m(){return g.filter(e=>e.selected).length}function y(e,t){let n=h()-e;if(n){for(let e in g)if(e!==t&&!g[e].selected&&(g[e].selected=!0,i(g[e]),n--,!n))break;p()}}function b(e,t){let n=e-v();if(n){for(let e in g)if(e!==t&&g[e].selected&&(g[e].selected=!1,i(g[e]),n--,!n))break;p()}}Kr(()=>{const e=m();h()&&e<h()&&y(e,-1)});var k={selectAll:function(){g.forEach((e,t)=>{g[t].selected=!0,i(e)}),p()},deselectAll:function(){g.forEach((e,t)=>{g[t].selected=!1,i(e)}),p()},addToHistory:function(e){},countSelected:m,toggleFirstSuited:function(e){const t=g.findIndex(t=>!e==t.selected);t>-1&&(g[t].selected=e,i(g[t]))},selectUpToMin:y,deselectDownToMin:b,updateUI:function(){Object.keys(n).forEach(e=>{n[e]&&n[e].updateUI&&n[e].updateUI()})}},$=xs();return Fi($,23,()=>g,e=>e.id,(e,t,i)=>{const r=at(l);var o=bi();Wi(zt(o),()=>Hn(r),(e,r)=>{Cr(r(e,Hr({get action(){return c()}},()=>Hn(t),u,{get onclick(){return d()},onchange:p,get selected(){return g[Hn(i)].selected},set selected(e){g[Hn(i)].selected=e}})),(e,t)=>n[t.id]=e,e=>n?.[e.id],()=>[Hn(t)])}),ki(e,o)}),ne($),on(()=>Qi($,1,`buttons has-addons ${o()?"is-centered":""} ${s()?"is-right":""} ${a()??""}`)),ki(e,$),Ae(k)}var Fs=Object.freeze({__proto__:null,UIButton:Is,UIButtonClose:As,UIButtonSwitch:Ts,UIButtons:Cs,UIButtonsRow:Ls,UIButtonsSwitchers:Ns}),Us=mi("<div><!></div>");function Ps(e,t){let n=Gr(t,"grouped",3,!1),i=Gr(t,"addons",3,!1),r=Gr(t,"multiline",3,!1),o=Gr(t,"class",3,""),s=zr(t,["$$slots","$$events","$$legacy","grouped","addons","multiline","class","children"]);var a=Us();ur(a,()=>({class:`field ${o()??""}`,...s,[nr]:{"has-addons":i(),"is-grouped":n(),"is-multiline":r()}})),zi(Vt(a),()=>t.children),ne(a),ki(e,a)}var Ms=mi("<p><!></p>");function Ds(e,t){let n=Gr(t,"class",3,""),i=Gr(t,"hasIconsLeft",3,!1),r=Gr(t,"hasIconsRight",3,!1),o=zr(t,["$$slots","$$events","$$legacy","class","hasIconsLeft","hasIconsRight","children"]);var s=Ms();ur(s,()=>({class:`control ${n()??""}`,...o,[nr]:{"has-icons-left":i(),"has-icons-right":r()}})),zi(Vt(s),()=>t.children??f),ne(s),ki(e,s)}var Rs=mi("<!> <!>",1);var js=mi("<progress> </progress>");var Vs=mi("<div><!> <!></div> <!>",1);function zs(e,t){Oe(t,!0);let n=Gr(t,"id",3,"taggedValueId"),i=Gr(t,"actions",19,()=>[]),r=Gr(t,"class",3,""),o=Gr(t,"actionsGroupContructor",3,Cs),s=Gr(t,"actionsGroupProps",19,()=>({})),a=Gr(t,"readonly",3,!1);var l=Vs(),u=zt(l),c=Vt(u),d=e=>{ts(e,Hr(()=>t.title))};Li(c,e=>{t.title&&e(d)});var f=Wt(c,2),h=e=>{ts(e,Hr(()=>t.value))};Li(f,e=>{t.value&&e(h)}),ne(u);var v=Wt(u,2),g=e=>{var t=bi();Wi(zt(t),o,(e,t)=>{t(e,Hr({get values(){return i()}},s))}),ki(e,t)};Li(v,e=>{!a()&&i()&&i().length&&e(g)}),on(()=>{Qi(u,1,`tags has-addons ${r()??""}`),lr(u,"id",n())}),ki(e,l),Ae()}function Ws(e){const t=e-1;return t*t*t+1}function Bs(e,{from:t,to:n},i={}){var{delay:r=0,duration:o=e=>120*Math.sqrt(e),easing:s=Ws}=i,a=getComputedStyle(e),l="none"===a.transform?"":a.transform,[u,c]=a.transformOrigin.split(" ").map(parseFloat);u/=e.clientWidth,c/=e.clientHeight;var d=function(e){if("currentCSSZoom"in e)return e.currentCSSZoom;var t=e,n=1;for(;null!==t;)n*=+getComputedStyle(t).zoom,t=t.parentElement;return n}(e),f=e.clientWidth/n.width/d,h=e.clientHeight/n.height/d,v=t.left+t.width*u,g=t.top+t.height*c,p=n.left+n.width*u,m=n.top+n.height*c,y=(v-p)*f,b=(g-m)*h,k=t.width/n.width,$=t.height/n.height;return{delay:r,duration:"function"==typeof o?o(Math.sqrt(y*y+b*b)):o,easing:s,css:(e,t)=>`transform: ${l} translate(${t*y}px, ${t*b}px) scale(${e+t*k}, ${e+t*$});`}}ue=!0;const qs=e=>e;function Hs(e,{delay:t=0,duration:n=400,easing:i=qs}={}){const r=+getComputedStyle(e).opacity;return{delay:t,duration:n,easing:i,css:e=>"opacity: "+e*r}}var Gs=mi('<option selected class="svelte-wl7m3y"> </option>'),Ks=mi('<option selected class="svelte-wl7m3y"> </option>'),Js=mi('<div class="tags has-addons svelte-wl7m3y"><span class="tag svelte-wl7m3y"> </span> <span class="tag is-delete svelte-wl7m3y"></span></div>'),Ys=mi("<div><!></div>"),Qs=mi('<span class="autocomplete-clear-button svelte-wl7m3y"><!></span>'),Zs=mi("<div><!></div>"),Xs=mi('<div class="autocomplete-list-item-no-results svelte-wl7m3y"> </div>'),ea=mi("<!> <!> <!>",1),ta=mi('<div class="autocomplete-list-item-loading svelte-wl7m3y"><!></div>'),na=mi('<div class="autocomplete-list-item-create svelte-wl7m3y"><!></div>'),ia=mi('<div class="autocomplete-list-item-no-results svelte-wl7m3y"><!></div>'),ra=mi('<div><select class="svelte-wl7m3y"><!></select> <div class="input-container svelte-wl7m3y"><!> <input/> <!></div> <div><!></div></div>');function oa(e,t){const n=Br(t,["children","$$slots","$$events","$$legacy"]),i=Br(n,["highlightFilter","items","searchFunction","labelFieldName","keywordsFieldName","valueFieldName","labelFunction","keywordsFunction","valueFunction","keywordsCleanFunction","textCleanFunction","beforeChange","onChange","onFocus","onBlur","onCreate","selectFirstIfEmpty","minCharactersToSearch","maxItemsToShowInList","multiple","create","ignoreAccents","matchAllKeywords","sortByMatchedKeywords","itemFilterFunction","itemSortFunction","lock","delay","localFiltering","localSorting","cleanUserText","lowercaseKeywords","closeOnBlur","orderableSelection","hideArrow","showClear","clearText","showLoadingIndicator","noResultsText","loadingText","moreItemsText","createText","placeholder","className","inputClassName","inputId","name","selectName","selectId","title","html5autocomplete","autocompleteOffValue","readonly","dropdownClassName","disabled","noInputStyles","required","debug","tabindex","selectedItem","value","highlightedItem","text"]);Oe(t,!1);const r=bt(),s=bt(),a=bt(),l=bt();let u=Gr(t,"items",28,()=>[]),c=Gr(t,"searchFunction",8,!1),d=Gr(t,"labelFieldName",8,void 0),f=Gr(t,"keywordsFieldName",24,d),h=Gr(t,"valueFieldName",8,void 0),v=Gr(t,"labelFunction",8,function(e){return null==e?"":d()?e[d()]:e}),g=Gr(t,"keywordsFunction",8,function(e){return null==e?"":f()?e[f()]:v()(e)}),p=Gr(t,"valueFunction",8,function(e,t=!1){return null==e?e:!E()||t?h()?e[h()]:e:e.map(e=>h()?e[h()]:e)}),m=Gr(t,"keywordsCleanFunction",8,function(e){return e}),y=Gr(t,"textCleanFunction",8,function(e){return e}),b=Gr(t,"beforeChange",8,function(e,t){return!0}),$=Gr(t,"onChange",8,function(e){}),w=Gr(t,"onFocus",8,function(){}),I=Gr(t,"onBlur",8,function(){}),O=Gr(t,"onCreate",8,function(e){ve()&&console.log("onCreate: "+e)}),A=Gr(t,"selectFirstIfEmpty",8,!1),S=Gr(t,"minCharactersToSearch",8,1),C=Gr(t,"maxItemsToShowInList",8,0),E=Gr(t,"multiple",8,!1),L=Gr(t,"create",8,!1),T=Gr(t,"ignoreAccents",8,!0),x=Gr(t,"matchAllKeywords",8,!0),N=Gr(t,"sortByMatchedKeywords",8,!1),F=Gr(t,"itemFilterFunction",8,void 0),U=Gr(t,"itemSortFunction",8,void 0),P=Gr(t,"lock",8,!1),M=Gr(t,"delay",8,0),D=Gr(t,"localFiltering",8,!0),R=Gr(t,"localSorting",8,!0),j=Gr(t,"cleanUserText",8,!0),V=Gr(t,"lowercaseKeywords",8,!0),z=Gr(t,"closeOnBlur",8,!1),W=Gr(t,"orderableSelection",8,!1),B=Gr(t,"hideArrow",8,!1),q=Gr(t,"showClear",8,!1),H=Gr(t,"clearText",8,"&#10006;"),G=Gr(t,"showLoadingIndicator",8,!1),K=Gr(t,"noResultsText",8,"No results found"),J=Gr(t,"loadingText",8,"Loading results..."),Y=Gr(t,"moreItemsText",8,"items not shown"),Q=Gr(t,"createText",8,"Not found, add anyway?"),Z=Gr(t,"placeholder",8,void 0),X=Gr(t,"className",8,void 0),ee=Gr(t,"inputClassName",8,void 0),te=Gr(t,"inputId",8,void 0),ie=Gr(t,"name",8,void 0),re=Gr(t,"selectName",8,void 0),oe=Gr(t,"selectId",8,void 0),se=Gr(t,"title",8,void 0),ae=Gr(t,"html5autocomplete",8,void 0),le=Gr(t,"autocompleteOffValue",8,"off"),ue=Gr(t,"readonly",8,void 0),ce=Gr(t,"dropdownClassName",8,void 0),de=Gr(t,"disabled",8,!1),fe=Gr(t,"noInputStyles",8,!1),he=Gr(t,"required",8,null),ve=Gr(t,"debug",8,!1),ge=Gr(t,"tabindex",8,0),me=Gr(t,"selectedItem",28,()=>E()?[]:void 0),ye=Gr(t,"value",12,void 0),be=Gr(t,"highlightedItem",12,void 0);const ke="sautocomplete-"+Math.floor(1e3*Math.random());let $e,_e=bt(),we=bt(),Ie=bt(),Se=bt(!1),Ce=bt(!1),Ee=bt(-1),Le=Gr(t,"text",12,void 0),Te=bt(0),xe=bt(),Ne=[],Fe=0,Ue=0,Pe=bt(!1);function Me(e,t){let n=function(e,t){if("function"!=typeof e)return void console.error("Not a function: "+e+", argument: "+t);let n;try{n=e(t)}catch(n){console.warn("Error executing Autocomplete function on value: "+t+" function: "+e)}return n}(e,t);return null==n&&(n=""),"string"!=typeof n&&(n=n.toString()),n}function De(e){return Me(v(),e)}function Re(e){const t=Me(g(),e);let n=Me(m(),t);return n=V()?n.toLowerCase().trim():n,T()&&(n=dt(n)),ve()&&console.log("Extracted keywords: '"+n+"' from item: "+JSON.stringify(e)),n}function je(){let e;ve()&&(e="Autocomplete prepare list "+(te()?`(id: ${te()})`:""),console.time(e),console.log("Prepare items to search"),console.log("items: "+JSON.stringify(u()))),Array.isArray(u())||(console.warn("Autocomplete items / search function did not return array but",u()),u([]));const t=u()?u().length:0;Ne=new Array(t),t>0&&u().forEach((e,t)=>{const n=function(e){return{keywords:D()?Re(e):[],label:De(e),item:e}}(e);void 0===n&&console.log("Undefined item for: ",e),Ne[t]=n}),$t(xe,Ne),ve()&&(console.log(Ne.length+" items to search"),console.timeEnd(e))}function Ve(e,t){if(!e)return 0;const n=e.keywords;let i=0;return t.forEach(e=>{n.includes(e)&&i++}),i}async function ze(){let e;ve()&&(e="Autocomplete search "+(te()?`(id: ${te()})`:""),console.time(e),console.log("Searching user entered text: '"+Le()+"'"));let t=function(e){if(null==e)return"";if(!j())return e;const t=e.replace(/[&/\\#,+()$~%.'":*?<>{}]/g," ").trim(),n=Me(y(),t);return V()?n.toLowerCase().trim():n.trim()}(Le());if(S()>1&&t.length<S()&&(t=""),$t(Te,t.length),ve()&&console.log("Changed user entered text '"+Le()+"' into '"+t+"'"),""===t&&(c()?(u([]),ve()&&console.log("User entered text is empty clear list of items")):($t(xe,Ne),ve()&&console.log("User entered text is empty set the list of items to all items")),st()))ve()&&console.timeEnd(e);else{if(c()){Fe+=1;const e=Fe;if($t(Ce,!0),"AsyncGeneratorFunction"===c().constructor.name){for await(const n of c()(t,C())){if(e<Ue)return!1;e>Ue&&u([]),Ue=e,u([...u(),...n]),We(t)}Ue<e&&(Ue=e,u([]),We(t))}else{let n=await c()(t,C());if(e<Ue)return!1;Ue=e,u(n),We(t)}$t(Ce,!1)}else We(t);ve()&&(console.timeEnd(e),console.log("Search found "+Hn(xe).length+" items"))}}function We(e){je();const t=(T()?dt(e):e).split(/\s+/g).filter(e=>""!==e);let n;D()?(n=F()?Ne.filter(e=>F()(e.item,t)):Ne.filter(e=>function(e,t){const n=Ve(e,t);return x()?n>=t.length:n>0}(e,t)),R()&&(U()?n=n.sort((e,n)=>U()(e.item,n.item,t)):N()&&(n=n.sort((e,n)=>function(e,t,n){return Ve(t,n)-Ve(e,n)}(e,n,t))))):n=Ne;const i=ct(t,"label");return $t(xe,n.map(i)),st(),!0}function Be(e){let t;if(ve()&&console.log("createdItem",e),void 0!==e){je(),$t(xe,Ne);let n=nt(e,Hn(xe));n<=0&&(u([e]),je(),$t(xe,Ne),n=0),n>=0&&($t(Ee,n),t=Hn(xe)[Hn(Ee)])}return t}function qe(e){if(ve()&&console.log("selectListItem",e),void 0===e&&L()){const t=O()(Le());if(void 0!==t){if("function"==typeof t.then)return t.then(e=>{if(void 0!==e){const t=Be(e);void 0!==t&&qe(t)}}),!0;e=Be(t)}}if(void 0===e)return ve()&&console.log("listItem is undefined. Can not select."),!1;if(Hn(l))return!0;const t=e.item;return b()(me(),t)&&(E()?me()?me().includes(t)?me(me().filter(e=>e!==t)):me([...me(),t]):me([t]):(me(void 0),me(t))),!0}function He(){ve()&&console.log("selectItem",Hn(Ee));qe(Hn(xe)[Hn(Ee)])?(ve()&&console.log("selectListItem true, closing"),rt(),E()&&(Le(""),Hn(_e).focus())):ve()&&console.log("selectListItem false, not closing")}function Ge(){ve()&&console.log("up"),it(),Hn(Ee)>0&&It(Ee,-1),Je()}function Ke(){ve()&&console.log("down"),it(),Hn(Ee)<Hn(xe).length-1&&It(Ee),Je()}function Je(){ve()&&console.log("highlight");const e=".selected";ve()&&console.log("Seaching DOM element: "+e+" in "+Hn(we));const t=Hn(we)&&Hn(we).querySelector(e);t?"function"==typeof t.scrollIntoViewIfNeeded?(ve()&&console.log("Scrolling selected item into view"),t.scrollIntoViewIfNeeded()):"function"===t.scrollIntoView?(ve()&&console.log("Scrolling selected item into view"),t.scrollIntoView()):ve()&&console.warn("Could not scroll selected item into view, scrollIntoViewIfNeeded not supported"):ve()&&console.warn("Selected item not found to scroll into view")}function Ye(e){ve()&&console.log("onListItemClick"),qe(e)&&(rt(),E()&&(Le(""),Hn(_e).focus()))}function Qe(e){ve()&&console.log("unselectItem",e),me(me().filter(t=>t!==e)),Hn(_e).focus()}function Ze(){ze()&&($t(Ee,0),it())}function Xe(e){ve()&&console.log("onEsc"),e.stopPropagation(),Hn(Se)&&(Hn(_e).focus(),rt())}function et(e){ve()&&console.log("onBackspace"),Qe(me()[me().length-1])}function tt(){if(ve()&&console.log("resetListToAllItemsAndOpen"),c()&&!Ne.length?ze():Le()||$t(xe,Ne),it(),me()){ve()&&console.log("Searching currently selected item: "+JSON.stringify(me()));const e=nt(me(),Hn(xe));e>=0&&($t(Ee,e),Je())}}function nt(e,t){ve()&&console.log("Finding index for item",e);let n=-1;for(let i=0;i<t.length;i++){const r=t[i];if(void 0!==r){if(ve()&&console.log("Item "+i+": "+JSON.stringify(r)),e===r.item){n=i;break}}else ve()&&console.log(`listItem ${i} is undefined. Skipping.`)}return ve()&&(n>=0?console.log("Found index for item: "+n):console.warn("Not found index for item: "+e)),n}function it(){ve()&&console.log("open"),Hn(l)||ot()||($t(Pe,!0),$t(Se,!0))}function rt(){ve()&&console.log("close"),$t(Se,!1),$t(Ce,!1),!Le()&&A()&&($t(Ee,0),He())}function ot(){return S()>0&&Hn(Te)<S()&&(c()||Hn(Te)>0)}function st(){return!!ot()&&(rt(),!0)}function ut(){ve()&&console.log("clear"),Le(""),me(E()?[]:void 0),setTimeout(()=>{Hn(_e).focus()})}function ct(e,t){return n=>{let i=n[t];const r=Object.assign({highlighted:void 0},n);r.highlighted=i;const o=i.toLowerCase(),s=T()?dt(o):o;if(e&&e.length){const t=[];for(let n=0;n<e.length;n++){let i=e[n];T()&&(i=dt(i));const r=i.length;let o=0;do{if(o=s.indexOf(i,o),o>=0){let e=o+r;t.push([o,e]),o=e}}while(-1!==o)}if(t.length>0){const e=new Set;for(let n=0;n<t.length;n++){const i=t[n],r=i[0],s=i[1],a=o.substring(r,s);e.add(a)}for(let t of e){if("b"===t)continue;const e=new RegExp("("+t+")","ig"),n=r.highlighted.replace(e,"<b>$1</b>");r.highlighted=n}}}return r}}function dt(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function ft(e){return!!me()&&(E()?me().includes(e):e===me())}Qr(()=>{Hn(Pe)&&function(){const{height:e}=window.visualViewport,{bottom:t,height:n}=Hn(Ie).getBoundingClientRect(),{height:i}=Hn(we).getBoundingClientRect();kt(we,Hn(we).style.top=t+i>e?`-${n+i}px`:"0px")}(),$t(Pe,!1)});let ht=bt(!1);function vt(e,t){W()&&(e.preventDefault(),$t(ht,t))}function gt(e,t){if(W()){e.preventDefault(),$t(ht,!1);let n=parseInt(e.dataTransfer.getData("source"));n!=t&&function(e,t){let n=[...me()];e<t?(n.splice(t+1,0,n[e]),n.splice(e,1)):(n.splice(t,0,n[e]),n.splice(e+1,1));me(n)}(n,t)}}var pt;nn(()=>(Qn(u()),Qn(c())),()=>{u(),c()||je()}),nn(()=>Qn(me()),()=>{me(),ye(p()(me())),me()&&!E()&&Le(De(me())),$t(xe,Ne),$()(me())}),nn(()=>(Hn(xe),Hn(Ee)),()=>{be(Hn(xe)&&Hn(Ee)&&Hn(Ee)>=0&&Hn(Ee)<Hn(xe).length?Hn(xe)[Hn(Ee)].item:null)}),nn(()=>(Hn(Se),Qn(u()),Hn(Te)),()=>{$t(r,Hn(Se)&&(u()&&u().length>0||Hn(Te)>0))}),nn(()=>(Qn(E()),Qn(me())),()=>{$t(s,E()&&me()&&me().length>0||!E()&&me())}),nn(()=>(Qn(q()),Qn(P()),Qn(E()),Hn(s)),()=>{$t(a,q()||(P()||E())&&Hn(s))}),nn(()=>(Qn(P()),Hn(s)),()=>{$t(l,P()&&Hn(s))}),pt=pe,rn(()=>{for(var e of pt.l.$){e.deps();var t=e.effect;0!==(t.f&k)&&Yn(t,_),Rn(t)&&Bn(t),e.ran=!1}});var mt={highlightFilter:ct};Lr();var yt=ra();let _t;di("click",Nt,function(e){ve()&&console.log("onDocumentClick"),e.composedPath().some(e=>e.classList&&e.classList.contains(ke))?(ve()&&console.log("onDocumentClick inside"),Je()):(ve()&&console.log("onDocumentClick outside"),rt())}),di("scroll",Nt,()=>$t(Pe,!0));var wt=Vt(yt),Ot=Vt(wt),At=e=>{var t=Gs(),n=Vt(t,!0);ne(t);var i={};on((e,r)=>{wi(n,e),i!==(i=r)&&(t.value=(t.__value=r)??"")},[()=>(Qn(me()),Kn(()=>De(me()))),()=>(Qn(p()),Qn(me()),Kn(()=>p()(me(),!0)))]),ki(e,t)},St=e=>{var t=bi(),n=zt(t),i=e=>{var t=bi();Fi(zt(t),1,me,Ni,(e,t)=>{var n=Ks(),i=Vt(n,!0);ne(n);var r={};on((e,t)=>{wi(i,e),r!==(r=t)&&(n.value=(n.__value=t)??"")},[()=>(Hn(t),Kn(()=>De(Hn(t)))),()=>(Qn(p()),Hn(t),Kn(()=>p()(Hn(t),!0)))]),ki(e,n)}),ki(e,t)};Li(n,e=>{E()&&Hn(s)&&e(i)},!0),ki(e,t)};Li(Ot,e=>{!E()&&Hn(s)?e(At):e(St,!1)}),ne(wt);var Ct=Wt(wt,2),Et=Vt(Ct),Lt=e=>{var n=bi();Fi(zt(n),11,me,e=>p()(e,!0),(e,n,i)=>{var r=Ys();let o;lr(r,"draggable",!0);var s=Vt(r);{let e=lt(()=>(Hn(n),Kn(()=>De(Hn(n)))));Vi(s,t,"tag",{get label(){return Hn(e)},get item(){return Hn(n)},unselectItem:Qe},e=>{var t=Js(),i=Vt(t),r=Vt(i,!0);ne(i);var o=Wt(i,2),s=at(()=>Qe(Hn(n)));ne(t),on(e=>wi(r,e),[()=>(Hn(n),Kn(()=>De(Hn(n))))]),di("click",o,Er(function(...e){Hn(s)?.apply(this,e)})),di("keypress",o,Er(e=>{"Enter"==e.key&&Qe(Hn(n))})),ki(e,t)})}ne(r),on(()=>o=Qi(r,1,"svelte-wl7m3y",null,o,{"is-active":Hn(ht)===Hn(i)})),function(e,t,n){var i,r,o,s=Ti,a=null;s.a??={element:e,measure(){i=this.element.getBoundingClientRect()},apply(){if(o?.abort(),r=this.element.getBoundingClientRect(),i.left!==r.left||i.right!==r.right||i.top!==r.top||i.bottom!==r.bottom){const e=t()(this.element,{from:i,to:r},n?.());o=_r(this.element,e,void 0,1,()=>{o?.abort(),o=void 0})}},fix(){if(!e.getAnimations().length){var{position:t,width:n,height:r}=getComputedStyle(e);if("absolute"!==t&&"fixed"!==t){var o=e.style;a={position:o.position,width:o.width,height:o.height,transform:o.transform},o.position="absolute",o.width=n,o.height=r;var s=e.getBoundingClientRect();if(i.left!==s.left||i.top!==s.top){var l=`translate(${i.left-s.left}px, ${i.top-s.top}px)`;o.transform=o.transform?`${o.transform} ${l}`:l}}}},unfix(){if(a){var t=e.style;t.position=a.position,t.width=a.width,t.height=a.height,t.transform=a.transform}}},s.a.element=e}(r,()=>Bs,()=>({duration:200})),$r(3,r,()=>Hs,()=>({duration:200})),di("dragstart",r,e=>function(e,t){W()&&e.dataTransfer.setData("source",t)}(e,Hn(i))),di("dragover",r,e=>vt(e,Hn(i))),di("dragleave",r,e=>(Hn(i),void(W()&&$t(ht,!1)))),di("drop",r,e=>gt(e,Hn(i))),ki(e,r)}),ki(e,n)};Li(Et,e=>{E()&&Hn(s)&&e(Lt)});var Tt=Wt(Et,2);ur(Tt,()=>({type:"text",class:`${(ee()?ee():"")??""} ${fe()?"":"input autocomplete-input"}`,id:te()?te():"",autocomplete:ae()?"on":le(),placeholder:Z(),name:ie(),disabled:de(),required:he(),title:se(),readonly:ue()||Hn(l),tabindex:ge(),...i}),void 0,void 0,void 0,"svelte-wl7m3y",!0),Cr(Tt,e=>$t(_e,e),()=>Hn(_e));var xt=Wt(Tt,2),Ft=e=>{var t=Qs();ji(Vt(t),H),ne(t),di("click",t,ut),di("keypress",t,e=>{"Enter"==e.key&&ut()}),ki(e,t)};Li(xt,e=>{Hn(a)&&e(Ft)}),ne(Ct),Cr(Ct,e=>$t(Ie,e),()=>Hn(Ie));var Ut=Wt(Ct,2),Pt=Vt(Ut),Mt=e=>{var n=ea(),i=zt(n);Vi(i,t,"dropdown-header",{get nbItems(){return Hn(xe),Kn(()=>Hn(xe).length)},get maxItemsToShowInList(){return C()}},null);var r=Wt(i,2);Fi(r,1,()=>Hn(xe),Ni,(e,n,i)=>{var r=bi(),o=zt(r),s=e=>{var r=Zs();let o;Vi(Vt(r),t,"item",{get item(){return Hn(n),Kn(()=>Hn(n).item)},get label(){return Hn(n),Kn(()=>Hn(n).highlighted?Hn(n).highlighted:Hn(n).label)}},e=>{var t=bi(),i=zt(t),r=e=>{var t=bi();ji(zt(t),()=>(Hn(n),Kn(()=>Hn(n).highlighted))),ki(e,t)},o=e=>{var t=bi();ji(zt(t),()=>(Hn(n),Kn(()=>Hn(n).label))),ki(e,t)};Li(i,e=>{Hn(n),Kn(()=>Hn(n).highlighted)?e(r):e(o,!1)}),ki(e,t)}),ne(r),on(e=>o=Qi(r,1,"autocomplete-list-item svelte-wl7m3y",null,o,e),[()=>({selected:i===Hn(Ee),confirmed:ft(Hn(n).item)})]),di("click",r,()=>Ye(Hn(n))),di("keypress",r,e=>{"Enter"==e.key&&Ye(Hn(n))}),di("pointerenter",r,()=>{$t(Ee,i)}),ki(e,r)};Li(o,e=>{Hn(n)&&(C()<=0||i<C())&&e(s)}),ki(e,r)}),Vi(Wt(r,2),t,"dropdown-footer",{get nbItems(){return Hn(xe),Kn(()=>Hn(xe).length)},get maxItemsToShowInList(){return C()}},e=>{var t=bi(),n=zt(t),i=e=>{var t=bi(),n=zt(t),i=e=>{var t=Xs(),n=Vt(t);ne(t),on(()=>wi(n,`...${Hn(xe),Qn(C()),Kn(()=>Hn(xe).length-C())??""}\n ${Y()??""}`)),ki(e,t)};Li(n,e=>{Y()&&e(i)}),ki(e,t)};Li(n,e=>{Qn(C()),Hn(xe),Kn(()=>C()>0&&Hn(xe).length>C())&&e(i)}),ki(e,t)}),ki(e,n)},Dt=e=>{var n=bi(),i=zt(n),r=e=>{var n=ta();Vi(Vt(n),t,"loading",{get loadingText(){return J()}},e=>{var t=yi();on(()=>wi(t,J())),ki(e,t)}),ne(n),ki(e,n)},o=e=>{var n=bi(),i=zt(n),r=e=>{var n=na();Vi(Vt(n),t,"create",{get createText(){return Q()}},e=>{var t=yi();on(()=>wi(t,Q())),ki(e,t)}),ne(n),di("click",n,He),di("keypress",n,e=>{"Enter"==e.key&&He()}),ki(e,n)},o=e=>{var n=bi(),i=zt(n),r=e=>{var n=ia();Vi(Vt(n),t,"no-results",{get noResultsText(){return K()}},e=>{var t=yi();on(()=>wi(t,K())),ki(e,t)}),ne(n),ki(e,n)};Li(i,e=>{K()&&e(r)},!0),ki(e,n)};Li(i,e=>{L()?e(r):e(o,!1)},!0),ki(e,n)};Li(i,e=>{Hn(Ce)&&J()?e(r):e(o,!1)},!0),ki(e,n)};return Li(Pt,e=>{Hn(xe),Kn(()=>Hn(xe)&&Hn(xe).length>0)?e(Mt):e(Dt,!1)}),ne(Ut),Cr(Ut,e=>$t(we,e),()=>Hn(we)),ne(yt),on(()=>{_t=Qi(yt,1,`${(X()?X():"")??""} autocomplete select is-fullwidth ${ke}`,"svelte-wl7m3y",_t,{"hide-arrow":B()||!u().length,"is-multiple":E(),"show-clear":Hn(a),"is-loading":G()&&Hn(Ce)}),lr(wt,"name",re()),lr(wt,"id",oe()),wt.multiple=E(),Qi(Ut,1,`${(ce()?ce():"")??""} autocomplete-list ${Hn(r)?"":"hidden"}\n is-fullwidth`,"svelte-wl7m3y")}),wr(Tt,Le),di("input",Tt,function(e){ve()&&console.log("onInput"),Le(e.target.value),$e&&clearTimeout($e),M()?$e=setTimeout(Ze,M()):Ze()}),di("focus",Tt,function(){ve()&&console.log("onFocus"),w()(),tt()}),di("blur",Tt,function(){ve()&&console.log("onBlur"),z()&&rt(),I()()}),di("keydown",Tt,function(e){ve()&&console.log("onKeyDown");let t=e.key;"Tab"===t&&e.shiftKey&&(t="ShiftTab");const n={Tab:Hn(Se)?rt:null,ShiftTab:Hn(Se)?rt:null,ArrowDown:Ke.bind(this),ArrowUp:Ge.bind(this),Escape:Xe.bind(this),Backspace:E()&&Hn(s)&&!Le()?et.bind(this):null}[t];"function"==typeof n&&n(e)}),di("click",Tt,function(){ve()&&console.log("onInputClick"),tt()}),di("keypress",Tt,function(e){ve()&&console.log("onKeyPress"),"Enter"===e.key&&function(e){Hn(Se)&&(e.preventDefault(),He())}(e)}),di("dragover",Tt,e=>vt(e,me().length-1)),di("drop",Tt,e=>gt(e,me().length-1)),ki(e,yt),function(e,t,n){var i=o(e,t);i&&i.set&&(e[t]=n,Zt(()=>{e[t]=null}))}(t,"highlightFilter",ct),Ae(mt)}var sa=mi("<p> </p>"),aa=mi("<input/>");function la(e,t){Oe(t,!0);const[n,i]=Rr();let r=Gr(t,"value",15,""),o=Gr(t,"placeholder",3,""),s=Gr(t,"fieldname",3,"textfield"),a=Gr(t,"required",3,!0),l=Gr(t,"disabled",3,!1),u=Gr(t,"size",3,"normal"),c=Gr(t,"readonly",3,!1),d=Gr(t,"valid",3,!0),f=Gr(t,"class",3,""),h=zr(t,["$$slots","$$events","$$legacy","value","placeholder","fieldname","required","disabled","size","readonly","valid","color","class"]),v=at(()=>!d());const g={};if("function"==typeof t.onchange){const e=bo.onInput(s(),t.onchange);g.onchange=e,g.oninput=e}var p=bi(),m=zt(p),y=e=>{var t=sa(),n=Vt(t,!0);ne(t),on(()=>wi(n,r())),ki(e,t)},b=e=>{var i=aa();ur(i,()=>({id:`form-field-textfield-${s()??""}`,class:`input ${u()?`is-${u()}`:""} ${t.color?`is-${t.color}`:""} ${f()??""}`,type:"text",name:s(),invalid:Hn(v),disabled:l(),required:a(),readonly:c(),placeholder:Dr(Lo,"$LOCALE",n)[o()],autocomplete:s(),"aria-controls":`input-field-helper-${s()??""}`,"aria-describedby":`input-field-helper-${s()??""}`,...g,...h}),void 0,void 0,void 0,void 0,!0),wr(i,r),ki(e,i)};Li(m,e=>{c()?e(y):e(b,!1)}),ki(e,p),Ae(),i()}var ua=mi("<p> </p>");var ca=mi("<input/>");var da=mi("<label><!></label>");function fa(e,t){Oe(t,!0);const[n,i]=Rr();let r=Gr(t,"label",3,"label"),o=Gr(t,"class",3,"");var s=da(),a=Vt(s),l=e=>{var n=bi();zi(zt(n),()=>t.children),ki(e,n)},u=e=>{var t=yi();on(()=>wi(t,r()?Dr(Lo,"$LOCALE",n)[r()]:"")),ki(e,t)};Li(a,e=>{t.children?e(l):e(u,!1)}),ne(s),on(()=>{Qi(s,1,`label ${o()??""}`),lr(s,"for",t.for)}),ki(e,s),Ae(),i()}var ha=mi("<input/> ",1);function va(e,t){Oe(t,!0);const[n,i]=Rr();let r=Gr(t,"value",15,!1),o=Gr(t,"label",3,"checkbox"),s=Gr(t,"fieldname",3,"checkbox"),a=Gr(t,"required",3,!0),l=Gr(t,"readonly",3,!1),u=Gr(t,"disabled",3,!1),c=Gr(t,"valid",3,!0),d=Gr(t,"class",3,""),f=Gr(t,"labelClass",3,"checkbox"),h=Gr(t,"reactOn",19,()=>["onchange","oninput"]),v=zr(t,["$$slots","$$events","$$legacy","value","label","fieldname","required","readonly","disabled","valid","class","labelClass","reactOn"]),g=at(()=>!c());const p=`form-field-checkbox-${s()}`,m={};if("function"==typeof t.onchange){const e=bo.onInput(s(),t.onchange,void 0,{id:t?.id});h().forEach(t=>m[t]=e)}fa(e,{get class(){return f()},get disabled(){return u()},get for(){return p},children:(e,t)=>{var i=bi(),c=zt(i),f=e=>{ns(e,{get LC_TRUE(){return o()},get LC_FALSE(){return o()},get value(){return r()}})},h=e=>{var t=ha(),i=zt(t);ur(i,()=>({id:p,class:d(),type:"checkbox",name:s(),required:a(),readonly:l(),invalid:Hn(g),disabled:u(),"aria-controls":`input-field-helper-${s()??""}`,"aria-describedby":`input-field-helper-${s()??""}`,...m,...v}),void 0,void 0,void 0,void 0,!0);var c=Wt(i);on(()=>wi(c,` ${Dr(Lo,"$LOCALE",n)[o()]??""}`)),Ir(i,r),ki(e,t)};Li(c,e=>{l()?e(f):e(h,!1)}),ki(e,i)},$$slots:{default:!0}}),Ae(),i()}var ga=mi("<p><time> </time></p>"),pa=mi("<input/>");var ma=mi("<p> </p>"),ya=mi("<input/>");var ba=mi("<p> </p>"),ka=mi("<input/>");var $a=mi('<input type="hidden"/>');var _a=mi("<p> </p>"),wa=mi("<textarea></textarea>");function Ia(e,t){Oe(t,!0);const[n,i]=Rr();let r=Gr(t,"value",15,""),o=Gr(t,"placeholder",3,""),s=Gr(t,"fieldname",3,"textarea"),a=Gr(t,"rows",3,10),l=Gr(t,"required",3,!0),u=Gr(t,"readonly",3,!1),c=Gr(t,"disabled",3,!1),d=Gr(t,"reactOn",19,()=>["onblur"]),f=Gr(t,"valid",3,!0),h=Gr(t,"class",3,""),v=zr(t,["$$slots","$$events","$$legacy","value","placeholder","fieldname","rows","size","color","required","readonly","disabled","reactOn","valid","class"]),g=at(()=>!f());const p={};if("function"==typeof t.onchange){const e=bo.onInput(s(),t.onchange);d().forEach(t=>p[t]=e)}var m=bi(),y=zt(m),b=e=>{var t=_a(),n=Vt(t,!0);ne(t),on(()=>wi(n,r())),ki(e,t)},k=e=>{var i,d=wa();i=d,Z&&null!==Rt(i)&&Bt(i),ur(d,()=>({id:`form-field-textarea-${s()??""}`,class:`textarea ${t.size?`is-${t.size}`:""} ${t.color?`is-${t.color}`:""} ${h()??""}`,name:s(),invalid:Hn(g),disabled:c(),required:l(),readonly:u(),placeholder:Dr(Lo,"$LOCALE",n)[o()],rows:a(),"aria-controls":`input-field-helper-${s()??""}`,"aria-describedby":`input-field-helper-${s()??""}`,...p,...v})),wr(d,r),ki(e,d)};Li(y,e=>{u()?e(b):e(k,!1)}),ki(e,m),Ae(),i()}var Oa=new WeakMap;let Aa=function(){return uo(function e(t){io(this,e),oo(this,Oa,{}),t instanceof e&&this.import(t.getContent())},[{key:"add",value:function(e,t,n="replace"){this.contains(e)?"replace"===n?ro(Oa,this)[e]=t:"add"===n&&(ro(Oa,this)[e]=Object.assign(ro(Oa,this)[e],t)):ro(Oa,this)[e]=t}},{key:"get",value:function(e){return ro(Oa,this)[e]}},{key:"contains",value:function(e){return Object.hasOwn(ro(Oa,this),e)}},{key:"import",value:function(e,t="replace"){for(let n in e)this.add(n,e[n],t)}},{key:"isEmpty",value:function(){return 0===Object.keys(ro(Oa,this)).length}},{key:"getContent",value:function(){return{...ro(Oa,this)}}}])}();const Sa=new Aa,Ca=new Aa,Ea=new Aa;var La=mi("<!> <!>",1);function Ta(e,t){Oe(t,!0);const n=()=>Dr(Lo,"$LOCALE",i),[i,r]=Rr();let o=Gr(t,"id",19,()=>`title-${Math.random()}`),s=Gr(t,"title",3,""),a=Gr(t,"size",3,1),l=Gr(t,"spaced",3,!1),u=Gr(t,"align",3,"left");let c=at(()=>t.subsize?t.subsize:parseInt(a())<6?parseInt(a())+1:a()),d=at(()=>l()?"has-text-justified":""),f=at(()=>`<h${a()} id="${o()}" style="text-align: ${u()};" class="title ${Hn(d)} is-${a()}">${n()[s()]}</h${a()}>`),h=at(()=>`<h${Hn(c)} id="${o()}" style="text-align: ${u()};" class="subtitle is-${Hn(c)}">${n()[t.subtitle]}</h${Hn(c)}>`);var v={scrollToTop:(e=bo.SCROLL_OPTIONS)=>{setTimeout(()=>{document.getElementById(o()).scrollIntoView(e)},100)}},g=La(),p=zt(g),m=e=>{var t=bi();ji(zt(t),()=>Hn(f)),ki(e,t)};Li(p,e=>{s()&&e(m)});var y=Wt(p,2),b=e=>{var t=bi();ji(zt(t),()=>Hn(h)),ki(e,t)};Li(y,e=>{t.subtitle&&e(b)}),ki(e,g);var k=Ae(v);return r(),k}function xa(e,t){let n=Gr(t,"title",3,"not-node:empty_list_placeholder"),i=Gr(t,"size",3,4),r=Gr(t,"align",3,"center"),o=zr(t,["$$slots","$$events","$$legacy","title","size","align"]);Ta(e,Hr({get title(){return n()},get size(){return i()},get align(){return r()}},()=>o))}var Na=mi('<span class="icon"><i></i></span>'),Fa=mi("<span> </span>"),Ua=mi("<!> <!> <!> <!>",1),Pa=mi(" <!>",1),Ma=mi("<a><!></a>");function Da(e,t){Oe(t,!0);const n=()=>Dr(Lo,"$LOCALE",i),[i,r]=Rr(),o=e=>{var n=Na(),i=Vt(n);ne(n),on(()=>Qi(i,1,`fas fa-${t.icon??""} ${$()?`is-${$()}`:""}`)),ki(e,n)};let s=Gr(t,"title",3,""),a=Gr(t,"url",3,""),l=Gr(t,"href",3,""),u=Gr(t,"target",3,"_blank"),c=Gr(t,"light",3,!1),d=Gr(t,"loading",3,!1),h=Gr(t,"raised",3,!1),v=Gr(t,"outlined",3,!1),g=Gr(t,"inverted",3,!1),p=Gr(t,"rounded",3,!1),m=Gr(t,"button",3,!0),y=Gr(t,"state",3,""),b=Gr(t,"type",3,""),k=Gr(t,"color",3,""),$=Gr(t,"size",3,""),_=Gr(t,"class",3,""),w=Gr(t,"iconSide",3,"right");var I=Ma();let O;I.__click=function(...e){(t.action||t.onclick)?.apply(this,e)};var A=Vt(I),S=e=>{var i=Ua(),r=zt(i),a=e=>{o(e)};Li(r,e=>{"left"===w()&&e(a)});var l=Wt(r,2),u=e=>{var t=Fa(),i=Vt(t,!0);ne(t),on(()=>wi(i,n()[s()])),ki(e,t)};Li(l,e=>{s()&&e(u)});var c=Wt(l,2);zi(c,()=>t.children??f);var d=Wt(c,2),h=e=>{o(e)};Li(d,e=>{"right"===w()&&e(h)}),ki(e,i)},C=e=>{var i=Pa(),r=zt(i,!0);zi(Wt(r),()=>t.children??f),on(()=>wi(r,n()[s()])),ki(e,i)};Li(A,e=>{t.icon?e(S):e(C,!1)}),ne(I),on(()=>{lr(I,"href",a()||l()),lr(I,"target",u()),lr(I,"download",t.download),lr(I,"rel",t.rel),O=Qi(I,1,`${_()??""} ${y()?`is-${y()}`:""} ${k()?`is-${k()}`:""} ${b()?`is-${b()}`:""} ${$()?`is-${$()}`:""}`,null,O,{button:m(),"is-light":c(),"is-inverted":g(),"is-outlined":v(),"is-raised":h(),"is-rounded":p(),"is-loading":d()})}),ki(e,I),Ae(),r()}fi(["click"]);var Ra=mi('<div><p class="control"><!></p></div>'),ja=mi("<div><!></div>");function Va(e,t){const n=e=>{var t=bi();Fi(zt(t),17,i,e=>e.id,(e,t)=>{Da(e,Hr(()=>Hn(t),l))}),ki(e,t)};let i=Gr(t,"values",19,()=>[]),r=Gr(t,"class",3,""),o=Gr(t,"centered",3,!1),s=Gr(t,"right",3,!1),a=Gr(t,"joined",3,!0),l=Gr(t,"itemsProps",19,()=>({}));var u=bi(),c=zt(u),d=e=>{var t=Ra();let i;var a=Vt(t),l=Vt(a);n(l),ne(a),ne(t),on(()=>i=Qi(t,1,`field has-addons ${r()??""}`,null,i,{"is-centered":o(),"is-right":s()})),ki(e,t)},f=e=>{var t=ja();let i;var a=Vt(t);n(a),ne(t),on(()=>i=Qi(t,1,`buttons ${r()??""}`,null,i,{"is-centered":o(),"is-right":s()})),ki(e,t)};Li(c,e=>{a()?e(d):e(f,!1)}),ki(e,u)}var za=mi("<!> <!>",1),Wa=mi('<figure class="image is-64x64"><img class="is-rounded"/></figure>'),Ba=mi('<div class="list-item-controls"><!> <!></div>'),qa=mi("<div><!> <!> <!></div>");function Ha(e,t){Oe(t,!0);const n=e=>{var n=za(),i=zt(n),r=e=>{var n=bi();zi(zt(n),()=>t.titleRenderer,()=>$),ki(e,n)},o=e=>{var n=bi(),i=zt(n),r=e=>{{let n=at(()=>k(t.onclickTitle));So(e,{class:"list-item-title",get callback(){return Hn(n)},children:(e,n)=>{var i=bi(),r=zt(i),o=e=>{var t=bi();Wi(zt(t),v,(e,t)=>{t(e,Hr(()=>Hn(O),g,{onchange:onchange}))}),ki(e,t)},s=e=>{var n=yi();on(()=>wi(n,t.title)),ki(e,n)};Li(r,e=>{v()?e(o):e(s,!1)}),ki(e,i)},$$slots:{default:!0}})}};Li(i,e=>{t.title&&e(r)},!0),ki(e,n)};Li(i,e=>{t.titleRenderer?e(r):e(o,!1)});var s=Wt(i,2),a=e=>{var n=bi();zi(zt(n),()=>t.descriptionRenderer,()=>$),ki(e,n)},l=e=>{var n=bi(),i=zt(n),r=e=>{{let n=at(()=>k(t.onclickDescription));So(e,{class:"list-item-description",get callback(){return Hn(n)},children:(e,n)=>{var i=bi(),r=zt(i),o=e=>{var n=bi();Wi(zt(n),()=>t.descriptionComponent,(e,n)=>{n(e,Hr(()=>Hn(A),p,{onchange:onchange,get onclick(){return t.onclick}}))}),ki(e,n)},s=e=>{var n=yi();on(()=>wi(n,t.description)),ki(e,n)};Li(r,e=>{t.descriptionComponent?e(o):e(s,!1)}),ki(e,i)},$$slots:{default:!0}})}};Li(i,e=>{t.description&&e(r)},!0),ki(e,n)};Li(s,e=>{t.descriptionRenderer?e(a):e(l,!1)}),ki(e,n)};let i=Gr(t,"actions",19,()=>[]),r=Gr(t,"links",19,()=>[]),o=Gr(t,"listActions",19,()=>[]),s=Gr(t,"listLinks",19,()=>[]),a=Gr(t,"class",3,""),l=Gr(t,"commonClass",3,""),u=Gr(t,"image",3,""),c=Gr(t,"index",19,()=>-1),d=Gr(t,"first",3,!1),f=Gr(t,"last",3,!1),h=Gr(t,"listItemContentComponentProps",19,()=>({})),v=Gr(t,"titleComponent",3,Ta),g=Gr(t,"titleComponentProps",19,()=>({size:6})),p=Gr(t,"descriptionComponentProps",19,()=>({}));function m(){t.onclick&&t.onclick(t.value)}Gr(t,"imageComponentProps",19,()=>({}));let y=yt(Ct([])),b=yt(Ct([]));const k=e=>()=>{e&&(m(),e&&e(t.value))};Xt(()=>{$t(y,[...i(),...o()].map((e,n)=>({...e,id:n,action:e.action?()=>e.action(t.value):void 0})),!0),$t(b,[...r(),...s()].map((e,t)=>(e.id=t,e)),!0)});const $={title:t.title,description:t.description,image:u(),value:t.value,index:c()},_={role:"button",tabindex:"0",onclick:m,onkeyup:e=>{e&&"Enter"==e.key&&m()}},w=t.onclick?_:{};let I=yt(Ct({})),O=yt(Ct({})),A=yt(Ct({}));Xt(()=>{"object"==typeof u()?$t(I,{...u()},!0):$t(I,{image:u()},!0)}),Xt(()=>{"object"==typeof t.title?$t(O,{...t.title},!0):$t(O,{title:t.title},!0)}),Xt(()=>{"object"==typeof t.description?$t(A,{...t.description},!0):$t(A,{description:t.description},!0)});var S=qa();ur(S,()=>({...w,class:`list-item ${a()??""} ${l()??""} list-item-at-${c()}`,[nr]:{"is-clickable":t.onclick,"list-item-last":f(),"list-item-first":d(),"list-item-odd":c()%2==1,"list-item-even":c()%2==0}}));var C=Vt(S),E=e=>{var n=bi(),i=zt(n),r=e=>{var n=bi();zi(zt(n),()=>t.imageRenderer,()=>$),ki(e,n)},o=e=>{{let n=at(()=>k(t.onclickImage));So(e,{class:"list-item-image",get callback(){return Hn(n)},children:(e,n)=>{var i=bi(),r=zt(i),o=e=>{var n=bi();Wi(zt(n),()=>t.imageComponent,(e,t)=>{t(e,Hr(()=>Hn(I)))}),ki(e,n)},s=e=>{var n=Wa(),i=Vt(n);ne(n),on(()=>{lr(i,"src",u()),lr(i,"alt",t.title?t.title?.title||t.title:u())}),ki(e,n)};Li(r,e=>{t.imageComponent?e(o):e(s,!1)}),ki(e,i)},$$slots:{default:!0}})}};Li(i,e=>{t.imageRenderer?e(r):e(o,!1)}),ki(e,n)};Li(C,e=>{u()&&e(E)});var L=Wt(C,2),T=e=>{var i=bi();Wi(zt(i),()=>t.listItemContentComponent,(e,t)=>{t(e,Hr(h,{children:(e,t)=>{n(e)},$$slots:{default:!0}}))}),ki(e,i)},x=e=>{{let i=at(()=>k(t.onclickContent));So(e,{class:"list-item-content",get callback(){return Hn(i)},children:(e,t)=>{n(e)},$$slots:{default:!0}})}};Li(L,e=>{t.listItemContentComponent?e(T):e(x,!1)});var N=Wt(L,2),F=e=>{var t=Ba(),n=Vt(t),i=e=>{Cs(e,{get values(){return Hn(y)},right:!0})};Li(n,e=>{Hn(y)&&Hn(y).length&&e(i)});var r=Wt(n,2),o=e=>{Va(e,{get values(){return Hn(b)},right:!0})};Li(r,e=>{Hn(b)&&Hn(b).length&&e(o)}),ne(t),ki(e,t)};Li(N,e=>{(Hn(y)&&Hn(y).length||Hn(b)&&Hn(b).length)&&e(F)}),ne(S),ki(e,S),Ae()}function Ga(e,t){Oe(t,!0);let n=Gr(t,"idFieldName",3,"id"),i=Gr(t,"items",19,()=>[]),r=Gr(t,"actions",19,()=>[]),o=Gr(t,"links",19,()=>[]),s=Gr(t,"itemClass",3,""),a=Gr(t,"listItemContentComponentProps",19,()=>({})),l=Gr(t,"listItemComponent",3,Ha),u=Gr(t,"listItemComponentProps",19,()=>({})),c=Gr(t,"titleComponent",3,Ta),d=Gr(t,"titleComponentProps",19,()=>({size:6})),f=Gr(t,"descriptionComponentProps",19,()=>({})),h=Gr(t,"imageComponentProps",19,()=>({}));var v=bi(),g=zt(v),p=e=>{var v=bi();Fi(zt(v),19,i,e=>e[n()],(e,n,v)=>{var g=bi(),p=zt(g),m=e=>{var i=bi();zi(zt(i),()=>t.listItemRenderer,()=>Hn(n),()=>Hn(v)),ki(e,i)},y=e=>{var n=bi(),g=zt(n);{let e=at(()=>0===Hn(v)),n=at(()=>Hn(v)===i().length-1);Wi(g,l,(l,g)=>{g(l,Hr(u,{get listItemContentComponent(){return t.listItemContentComponent},get listItemContentComponentProps(){return a()},get titleRenderer(){return t.titleRenderer},get titleComponent(){return c()},get titleComponentProps(){return d()},get descriptionRenderer(){return t.descriptionRenderer},get descriptionComponent(){return t.descriptionComponent},get descriptionComponentProps(){return f()},get imageRenderer(){return t.imageRenderer},get imageComponent(){return t.imageComponent},get imageComponentProps(){return h()}},()=>i()[Hn(v)],{get listActions(){return r()},get listLinks(){return o()},get value(){return i()[Hn(v)].value},get commonClass(){return s()},get index(){return Hn(v)},get first(){return Hn(e)},get last(){return Hn(n)},get onclick(){return t.onclick},get onclickContent(){return t.onclickContent},get onclickDescription(){return t.onclickDescription},get onclickImage(){return t.onclickImage},get onclickTitle(){return t.onclickTitle}}))})}ki(e,n)};Li(p,e=>{t.listItemRenderer?e(m):e(y,!1)}),ki(e,g)}),ki(e,v)};Li(g,e=>{i()&&e(p)}),ki(e,v),Ae()}var Ka=mi("<div><!></div>");function Ja(e,t){Oe(t,!0);let n=Gr(t,"class",3,""),i=Gr(t,"items",19,()=>[]),r=Gr(t,"actions",19,()=>[]),o=Gr(t,"links",19,()=>[]),s=Gr(t,"actionsVisible",3,!1),a=Gr(t,"itemsHoverable",3,!1),l=Gr(t,"overflowEllipsis",3,!1),u=Gr(t,"hiddenImages",3,!1),c=Gr(t,"itemClass",3,""),d=Gr(t,"idFieldName",3,"id"),f=Gr(t,"emptyListPlaceholderComponent",3,xa),h=Gr(t,"emptyListPlaceholderComponentProps",19,()=>({})),v=Gr(t,"listItemContentComponentProps",19,()=>({})),g=Gr(t,"listItemComponent",3,Ha),p=Gr(t,"listItemComponentProps",19,()=>({})),m=Gr(t,"titleComponent",3,Ta),y=Gr(t,"titleComponentProps",19,()=>({size:6})),b=Gr(t,"descriptionComponentProps",19,()=>({})),k=Gr(t,"imageComponentProps",19,()=>({}));var $=bi(),_=zt($),w=e=>{var f=Ka();let h;Ga(Vt(f),{get items(){return i()},get itemClass(){return c()},get listItemContentComponent(){return t.listItemContentComponent},get listItemContentComponentProps(){return v()},get listItemRenderer(){return t.listItemRenderer},get listItemComponent(){return g()},get listItemComponentProps(){return p()},get idFieldName(){return d()},get titleRenderer(){return t.titleRenderer},get titleComponent(){return m()},get titleComponentProps(){return y()},get descriptionRenderer(){return t.descriptionRenderer},get descriptionComponent(){return t.descriptionComponent},get descriptionComponentProps(){return b()},get imageRenderer(){return t.imageRenderer},get imageComponent(){return t.imageComponent},get imageComponentProps(){return k()},get actions(){return r()},get links(){return o()},get onchange(){return t.onchange},get onclick(){return t.onclick},get onclickContent(){return t.onclickContent},get onclickDescription(){return t.onclickDescription},get onclickImage(){return t.onclickImage},get onclickTitle(){return t.onclickTitle}}),ne(f),on(()=>{Xi(f,t.itemLength?`--length: ${t.itemLength};`:""),h=Qi(f,1,`list ${n()??""}`,null,h,{"has-visible-pointer-controls":s(),"has-hoverable-list-items":a(),"has-overflow-ellipsis":l(),"has-hidden-images":u()})}),ki(e,f)},I=e=>{var n=bi(),i=zt(n),r=e=>{var n=bi();zi(zt(n),()=>t.emptyListRenderer,h),ki(e,n)},o=e=>{var t=bi();Wi(zt(t),f,(e,t)=>{t(e,Hr(h))}),ki(e,t)};Li(i,e=>{t.emptyListRenderer?e(r):e(o,!1)},!0),ki(e,n)};Li(_,e=>{i().length?e(w):e(I,!1)}),ki(e,$),Ae()}var Ya=mi("<!> <!>",1);var Qa=mi("<div><!></div>");function Za(e,t){let n=Gr(t,"class",3,""),i=Gr(t,"narrow",3,!1),r=zr(t,["$$slots","$$events","$$legacy","class","size","narrow","children"]);var o=Qa();ur(o,()=>({class:`column ${n()??""} ${t.size?`is-${t.size}`:""}`,...r,[nr]:{"is-narrow":i()}})),zi(Vt(o),()=>t.children??f),ne(o),ki(e,o)}var Xa=mi("<div><!></div>");function el(e,t){let n=Gr(t,"class",3,""),i=zr(t,["$$slots","$$events","$$legacy","class","children"]);var r=Xa();ur(r,()=>({class:`columns ${n()??""}`,...i})),zi(Vt(r),()=>t.children??f),ne(r),ki(e,r)}var tl=mi("<div><!></div>");function nl(e,t){let n=Gr(t,"id",3,""),i=Gr(t,"title",3,""),r=Gr(t,"class",3,""),o=Gr(t,"role",3,"button"),s=Gr(t,"tabIndex",3,"0"),a=Gr(t,"widescreen",3,!1),l=Gr(t,"fullhd",3,!1),u=Gr(t,"maxDesktop",3,!1),c=Gr(t,"maxWidescreen",3,!1),d=Gr(t,"fluid",3,!1);var h=tl();let v;h.__click=function(...e){t.onclick?.apply(this,e)},h.__keyup=function(...e){t.onkeyup?.apply(this,e)},zi(Vt(h),()=>t.children??f),ne(h),on(()=>{lr(h,"id",n()),lr(h,"title",i()),v=Qi(h,1,`container ${r()??""}`,null,v,{"is-widescreen":a(),"is-fullhd":l(),"is-max-desktop":u(),"is-max-widescreen":c(),"is-fluid":d()}),lr(h,"role",o()),lr(h,"tabindex",s())}),ki(e,h)}fi(["click","keyup"]);var il=mi("<footer><!></footer>");var rl=mi("<section><!></section>");fi(["click","keyup"]);var ol=mi('<nav class="level"><div class="level-left"><!></div> <div class="level-right"><!></div></nav>');var sl=Object.freeze({__proto__:null,UIColumn:Za,UIColumns:el,UIContainer:nl,UIFooter:function(e,t){let n=Gr(t,"id",3,""),i=Gr(t,"class",3,"");var r=il();zi(Vt(r),()=>t.children??f),ne(r),on(()=>{lr(r,"id",n()),Qi(r,1,`footer ${i()??""} `)}),ki(e,r)},UILevel:function(e,t){var n=ol(),i=Vt(n);zi(Vt(i),()=>t.left??f),ne(i);var r=Wt(i,2);zi(Vt(r),()=>t.right??f),ne(r),ne(n),ki(e,n)},UILevelItem:function(e,t){let n=Gr(t,"tag",3,"div");var i=bi();Bi(zt(i),n,0,(e,n)=>{var i=bi(),r=zt(i),o=e=>{var n=bi();zi(zt(n),()=>t.children??f),ki(e,n)},s=e=>{};Li(r,e=>{t.children?e(o):e(s,!1)}),ki(n,i)}),ki(e,i)},UISection:function(e,t){let n=Gr(t,"id",3,""),i=Gr(t,"class",3,""),r=Gr(t,"role",3,"button"),o=Gr(t,"tabIndex",3,"0");var s=rl();s.__click=function(...e){t.onclick?.apply(this,e)},s.__keyup=function(...e){t.onkeyup?.apply(this,e)},zi(Vt(s),()=>t.children??f),ne(s),on(()=>{lr(s,"id",n()),Qi(s,1,`section ${i()??""}`),lr(s,"role",r()),lr(s,"tabindex",o())}),ki(e,s)}}),al=mi("<p> </p>"),ll=mi("<input/>");function ul(e,t){Oe(t,!0);const[n,i]=Rr();let r=Gr(t,"value",15,0),o=Gr(t,"placeholder",3,"0.0"),s=Gr(t,"min",3,0),a=Gr(t,"max",3,100),l=Gr(t,"step",3,1),u=Gr(t,"fieldname",3,"number"),c=Gr(t,"required",3,!0),d=Gr(t,"disabled",3,!1),f=Gr(t,"readonly",3,!1),h=Gr(t,"valid",3,!0),v=Gr(t,"class",3,""),g=zr(t,["$$slots","$$events","$$legacy","value","placeholder","min","max","step","fieldname","color","size","required","disabled","readonly","valid","class"]),p=at(()=>!h());const m={};if("function"==typeof t.onchange){const e=bo.onInput(u(),t.onchange);m.onchange=e,m.oninput=e}var y=bi(),b=zt(y),k=e=>{var t=al(),n=Vt(t,!0);ne(t),on(()=>wi(n,r())),ki(e,t)},$=e=>{var i=ll();ur(i,()=>({id:`form-field-number-${u()??""}`,class:`input ${t.size?`is-${t.size}`:""} ${t.color?`is-${t.color}`:""} ${v()??""}`,type:"number",name:u(),invalid:Hn(p),disabled:d(),required:c(),readonly:f(),min:s(),max:a(),step:l(),placeholder:Dr(Lo,"$LOCALE",n)[o()],autocomplete:u(),"aria-controls":`input-field-helper-${u()??""}`,"aria-describedby":`input-field-helper-${u()??""}`,...m,...g}),void 0,void 0,void 0,void 0,!0),wr(i,r),ki(e,i)};Li(b,e=>{f()?e(k):e($,!1)}),ki(e,y),Ae(),i()}var cl=mi("<!> <!> <!>",1),dl=mi("<!> <!> <!>",1),fl=mi("<!> <!> <!>",1);var hl=mi("<input/>");var vl=mi("<figure><img/></figure>"),gl=mi("<a><!></a>");function pl(e,t){const n=e=>{var n=vl();let c;var d=Vt(n);d.__click=function(...e){l()?.apply(this,e)},d.__keyup=function(...e){u()?.apply(this,e)},ne(n),on(e=>{c=Qi(n,1,`image ${a()??""} ${e??""}`,null,c,{"is-contained":o(),"is-covered":s(),"is-clickable":l()&&!1!==t.pointable||t.pointable}),Xi(n,(t.width?`width: ${t.width};`:"")+(t.height?`height: ${t.height};`:"")),lr(d,"alt",t.alt||t.title),lr(d,"title",t.title),lr(d,"src",t.url||t.image),lr(d,"crossorigin",i())},[()=>t.width||t.height?"":isNaN(r())?`is-${r()}`:`is-${r()}x${r()}`]),ki(e,n)};let i=Gr(t,"cors",3,"anonymous"),r=Gr(t,"size",3,64),o=Gr(t,"contained",3,!1),s=Gr(t,"covered",3,!1),a=Gr(t,"class",3,""),l=Gr(t,"onclick",3,void 0),u=Gr(t,"onkeyup",3,void 0);var c=bi(),d=zt(c),f=e=>{var i=gl();i.__click=function(...e){l()?.apply(this,e)};var r=Vt(i);n(r),ne(i),on(()=>{lr(i,"href",t.urlFull),lr(i,"title",t.title||t.alt)}),ki(e,i)},h=e=>{n(e)};Li(d,e=>{t.urlFull?e(f):e(h,!1)}),ki(e,c)}fi(["click","keyup"]);var ml=mi("<p> </p>"),yl=mi("<option></option>"),bl=mi("<datalist></datalist>"),kl=mi("<input/> <output> </output> <!>",1);var $l=mi('<span class="mr-2"> </span>'),_l=mi('<span class="mr-2"> </span>'),wl=mi("<div><select><!><!></select></div>");const Il={SHORT:500,NORMAL:1500,LONG:5e3},Ol=1500;var Al=mi('<!> <input/> <label class="label"><!></label>',1);var Sl=mi('<div class="switch-list-item"><input/> <!></div>');var Cl=mi('<button aria-label="delete button" class="delete is-small"></button>'),El=mi("<span> <!></span>"),Ll=mi('<div class="select is-small"><select><!><!></select></div> <!>',1),Tl=mi("<!> <!>",1);fi(["click"]);var xl=mi("<p> </p>"),Nl=mi("<input/>");var Fl=Object.freeze({__proto__:null,UIAutocomplete:function(e,t){Oe(t,!0);const[n,i]=Rr();let r=Gr(t,"value",15),o=Gr(t,"placeholder",3,""),s=Gr(t,"fieldname",3,"autocomplete"),a=Gr(t,"disabled",3,!1),l=Gr(t,"readonly",3,!1),u=Gr(t,"required",3,!1),c=Gr(t,"valid",3,!0),d=Gr(t,"onchange",3,()=>!0),f=zr(t,["$$slots","$$events","$$legacy","value","placeholder","fieldname","disabled","readonly","required","valid","onchange"]),h=at(()=>!c());function v(e){d()&&d()({value:fe(e),field:s()})}var g=bi(),p=zt(g),m=e=>{{let t=at(()=>r()?r().title:"");la(e,Hr({get value(){return Hn(t)},get fieldname(){return s()},get placeholder(){return o()}},()=>f))}},y=e=>{var t=bi(),i=zt(t),s=e=>{var t=ua(),n=Vt(t,!0);ne(t),on(()=>wi(n,r()?r()?.title??"":"")),ki(e,t)},a=e=>{oa(e,Hr({onChange:v,get placeholder(){return Dr(Lo,"$LOCALE",n)[o()]},get valid(){return c()},get invalid(){return Hn(h)},get required(){return u()}},()=>f,{get selectedItem(){return r()},set selectedItem(e){r(e)}}))};Li(i,e=>{l()?e(s):e(a,!1)},!0),ki(e,t)};Li(p,e=>{a()?e(m):e(y,!1)}),ki(e,g),Ae(),i()},UICheckbox:va,UICheckboxList:function(e,t){Oe(t,!0);let n=Gr(t,"value",27,()=>Ct([])),i=Gr(t,"variants",19,()=>[]),r=Gr(t,"fieldname",3,"checkbox-list"),o=zr(t,["$$slots","$$events","$$legacy","value","variants","fieldname"]);function s(e,i,o){o&&(e.value?n().includes(o.id)||n().push(o.id):n().includes(o.id)&&n().splice(n().indexOf(o.id),1),t?.onchange({field:r(),value:fe(n())},i,o))}var a=bi();Fi(zt(a),17,i,e=>e.id,(e,t)=>{{let i=at(()=>`${r()}-${Hn(t).id}`),a=at(()=>n().includes(Hn(t).id));va(e,Hr(()=>o,()=>Hn(t),{get fieldname(){return Hn(i)},get value(){return Hn(a)},onchange:s}))}}),ki(e,a),Ae()},UIColor:function(e,t){Oe(t,!0);const[n,i]=Rr();let r=Gr(t,"value",15,""),o=Gr(t,"placeholder",3,""),s=Gr(t,"fieldname",3,"color"),a=Gr(t,"disabled",3,!1),l=Gr(t,"required",3,!0),u=Gr(t,"readonly",3,!1),c=Gr(t,"valid",3,!0),d=Gr(t,"class",3,""),f=zr(t,["$$slots","$$events","$$legacy","value","placeholder","fieldname","size","color","disabled","required","readonly","valid","class"]),h=at(()=>!c());const v={};if("function"==typeof t.onchange){const e=Sv.onInput(s(),t.onchange);v.onchange=e,v.oninput=e}var g=ca();ur(g,()=>({id:`form-field-color-${s()??""}`,class:`input ${t.size?`is-${t.size}`:""} ${t.color?`is-${t.color}`:""} ${d()??""}`,type:"color",name:s(),invalid:Hn(h),required:l(),readonly:u(),disabled:a(),placeholder:Dr(Lo,"$LOCALE",n)[o()],autocomplete:s(),"aria-controls":`input-field-helper-${s()??""}`,"aria-describedby":`input-field-helper-${s()??""}`,...v,...f}),void 0,void 0,void 0,void 0,!0),wr(g,r),ki(e,g),Ae(),i()},UIControl:Ds,UIDate:function(e,t){Oe(t,!0);const[n,i]=Rr();let r=Gr(t,"value",31,()=>Ct(new Date)),o=Gr(t,"placeholder",3,""),s=Gr(t,"fieldname",3,"datetime"),a=Gr(t,"pattern",3,"d{4}-d{2}-d{2}"),l=Gr(t,"required",3,!0),u=Gr(t,"disabled",3,!1),c=Gr(t,"readonly",3,!1),d=Gr(t,"valid",3,!0),f=Gr(t,"class",3,""),h=zr(t,["$$slots","$$events","$$legacy","value","placeholder","fieldname","color","size","pattern","required","disabled","readonly","valid","class"]);Kr(()=>{r()instanceof Date?r(r().toISOString().split("T")[0]):r().indexOf("T")>0&&r(r().split("T")[0])});let v=at(()=>!d());const g={};if("function"==typeof t.onchange){const e=bo.onInput(s(),t.onchange);g.onchange=e,g.oninput=e}var p=bi(),m=zt(p),y=e=>{var t=ga(),n=Vt(t),i=Vt(n,!0);ne(n),ne(t),on(e=>{lr(n,"datetime",r()),wi(i,e)},[()=>bo.tryFormatLocaleDateTime(r())]),ki(e,t)},b=e=>{var i=pa();ur(i,()=>({id:`form-field-date-${s()??""}`,class:`input ${t.size?`is-${t.size}`:""} ${t.color?`is-${t.color}`:""} ${f()??""}`,type:"date",name:s(),invalid:Hn(v),required:l(),readonly:c(),disabled:u(),placeholder:Dr(Lo,"$LOCALE",n)[o()],pattern:a(),autocomplete:s(),"aria-controls":`input-field-helper-${s()??""}`,"aria-describedby":`input-field-helper-${s()??""}`,...g,...h}),void 0,void 0,void 0,void 0,!0),wr(i,r),ki(e,i)};Li(m,e=>{c()?e(y):e(b,!1)}),ki(e,p),Ae(),i()},UIDatetimeInTZ:function(e,t){function n(e,t=!1){return e.split(".")[0]+(t?"":"Z")}function i(e,t=!1){return e.slice(0,e.lastIndexOf(":"))+(t?"":"Z")}function r(e,t){try{const r=new Date(o(e)).getTime(),s=-6e4*t;if(b(r+s)){const e=new Date(r+s);return i(n(e.toISOString(),!0),!0)}}catch{return}}function o(e){return e&&"Z"!==e.at(-1)?e+"Z":e}Oe(t,!0);let s=Gr(t,"fieldname",3,"datetimeInTZ"),a=Gr(t,"value",31,()=>Ct(i(n((new Date).toISOString())))),l=Gr(t,"timezoneOffset",3,0);Gr(t,"human",3,!0);let u,c=Gr(t,"required",3,!1),d=Gr(t,"disabled",3,!1),f=Gr(t,"readonly",3,!1),h=Gr(t,"valid",3,!0),v=Gr(t,"class",3,""),g=Gr(t,"onchange",3,()=>!0),p=zr(t,["$$slots","$$events","$$legacy","fieldname","value","timezoneOffset","human","color","size","required","disabled","readonly","valid","class","onchange"]),m=yt(void 0);const y=e=>{b(e)&&(u=Hn(m),$t(m,e,!0))};Kr(()=>{y(r(a(),l()))});const b=e=>{try{return new Date(e),!0}catch{return!1}};function k(e){return e.currentTarget.value&&Hn(m)&&b(Hn(m))?(a()!==r(Hn(m),-l())&&(y(Hn(m)),a(o(r(Hn(m),-l()))),g()({field:s(),value:fe(a())})),!0):($t(m,u,!0),!1)}let $=at(()=>!h());var _=bi(),w=zt(_),I=e=>{var n=bi(),i=zt(n),r=e=>{var t=ma(),n=Vt(t,!0);ne(t),on(e=>wi(n,e),[()=>{return e=Hn(m),bo.tryFormatLocaleDateTime(e);var e}]),ki(e,t)},o=e=>{var n=ya();ur(n,()=>({id:`form-field-datetime-in-timezone-${s()??""}`,class:`input ${t.size?`is-${t.size}`:""} ${t.color?`is-${t.color}`:""} ${v()??""}`,type:"datetime-local",name:s(),invalid:Hn($),disabled:d(),required:c(),readonly:f(),autocomplete:s(),onchange:k,onblur:k,oninput:k,"aria-controls":`input-field-helper-${s()??""}`,"aria-describedby":`input-field-helper-${s()??""}`,...p}),void 0,void 0,void 0,void 0,!0),wr(n,()=>Hn(m),e=>$t(m,e)),ki(e,n)};Li(i,e=>{f()?e(r):e(o,!1)}),ki(e,n)};Li(w,e=>{Hn(m)&&e(I)}),ki(e,_),Ae()},UIEmail:function(e,t){Oe(t,!0);const[n,i]=Rr();let r=Gr(t,"value",15,""),o=Gr(t,"placeholder",3,""),s=Gr(t,"fieldname",3,"email"),a=Gr(t,"required",3,!0),l=Gr(t,"readonly",3,!1),u=Gr(t,"disabled",3,!1),c=Gr(t,"valid",3,!0),d=Gr(t,"class",3,""),f=zr(t,["$$slots","$$events","$$legacy","value","placeholder","fieldname","color","size","required","readonly","disabled","valid","class"]),h=at(()=>!c());const v={};if("function"==typeof t.onchange){const e=bo.onInput(s(),t.onchange);v.onchange=e,v.oninput=e}var g=bi(),p=zt(g),m=e=>{var t=ba(),n=Vt(t,!0);ne(t),on(()=>wi(n,r())),ki(e,t)},y=e=>{var i=ka();ur(i,()=>({id:`form-field-email-${s()??""}`,class:`input ${t.size?`is-${t.size}`:""} ${t.color?`is-${t.color}`:""} ${d()??""}`,type:"email",name:s(),invalid:Hn(h),required:a(),readonly:l(),disabled:u(),placeholder:Dr(Lo,"$LOCALE",n)[o()],autocomplete:s(),"aria-controls":`input-field-helper-${s()??""}`,"aria-describedby":`input-field-helper-${s()??""}`,...v,...f}),void 0,void 0,void 0,void 0,!0),wr(i,r),ki(e,i)};Li(p,e=>{l()?e(m):e(y,!1)}),ki(e,g),Ae(),i()},UIField:Ps,UIHidden:function(e,t){Oe(t,!0);let n=Gr(t,"value",15,""),i=Gr(t,"fieldname",3,"hidden"),r=Gr(t,"required",3,!0),o=Gr(t,"readonly",3,!1),s=zr(t,["$$slots","$$events","$$legacy","value","fieldname","required","readonly"]);var a=$a();sr(a),on(()=>{lr(a,"id",`form-field-hidden-${i()??""}`),a.required=r(),a.readOnly=o(),lr(a,"name",i()),lr(a,"others",s)}),wr(a,n),ki(e,a),Ae()},UIJSONArea:function(e,t){Oe(t,!0);let n,i=Gr(t,"value",31,()=>Ct({})),r=Gr(t,"fieldname",3,"jsonarea"),o=Gr(t,"valid",15,!0),s=Gr(t,"onchange",3,()=>!0),a=Gr(t,"onerror",3,()=>{}),l=Gr(t,"reactOn",19,()=>["onblur"]),u=Gr(t,"colorValid",3,"success"),c=Gr(t,"colorInvalid",3,"danger"),d=Gr(t,"validationDelay",3,1e3),f=zr(t,["$$slots","$$events","$$legacy","value","fieldname","valid","onchange","onerror","reactOn","colorValid","colorInvalid","validationDelay"]),h=yt("{}");Kr(()=>{try{$t(h,JSON.stringify(fe(i()),null,4),!0)}catch{$t(h,"{}")}});let v=at(()=>o()?u():c());Ia(e,Hr({get fieldname(){return r()},onchange:function(e){const{value:t}=e;n&&clearTimeout(n),n=setTimeout(()=>{!function(e){try{i(JSON.parse(e)),o(!0),s()({field:r(),value:fe(i())})}catch(e){o(!1),a()(e)}}(t)},d())},get reactOn(){return l()},get valid(){return o()},get color(){return Hn(v)}},()=>f,{get value(){return Hn(h)},set value(e){$t(h,e,!0)}})),Ae()},UILabel:fa,UIListOfModels:function(e,t){Oe(t,!0);let n=Gr(t,"value",23,()=>[]),i=Gr(t,"placeholder",3,""),r=Gr(t,"fieldname",3,"selectFromModel"),o=Gr(t,"required",3,!0),s=Gr(t,"readonly",3,!1);Gr(t,"multiple",3,!1),Gr(t,"size",3,8);let a=Gr(t,"valid",3,!0),l=Gr(t,"modelName",3,""),u=Gr(t,"actionName",3,""),c=Gr(t,"actionFilter",19,()=>({})),d=Gr(t,"actionSorter",19,()=>({})),f=Gr(t,"actionPager",19,()=>({})),h=Gr(t,"actionSearch",3,void 0),v=Gr(t,"optionId",3,":_id"),g=Gr(t,"optionTitle",3,":title"),p=Gr(t,"selectorUI",3,"UISelectFromModelOnDemandInline"),m=Gr(t,"selectorUIProps",19,()=>({})),y=Gr(t,"itemUI",3,"UIListItem"),b=Gr(t,"itemUIProps",19,()=>({})),k=Gr(t,"transformValueItemToListItem",3,e=>e?{id:e._id,title:e.title,description:e.description,value:e}:void 0),$=yt(Ct([]));const _=e=>Array.isArray(e)?e.map(k()):[],w=e=>n().findIndex(t=>t.id===e.id),I=[{action(e){const t=w(e);if(t>-1){const e=[...n()];Jo.moveItem(e,t,t-1),n(e),$t($,_(n()),!0)}},title:"",icon:"arrow-up",color:"normal"},{action:e=>{const t=w(e);if(t>-1){const e=[...n()];Jo.moveItem(e,t,t+1),n(e),$t($,_(n()),!0)}},title:"",icon:"arrow-down",color:"normal"},{action:e=>{const t=w(e);t>-1&&(n().splice(t,1),$t($,_(n()),!0))},title:"",icon:"trash",color:"danger"}];var O=Ya(),A=zt(O);{let e=at(()=>Sa.get(y()));Ja(A,Hr({get listItemComponent(){return Hn(e)}},b,{get items(){return Hn($)},get actions(){return I}}))}var S=Wt(A,2),C=e=>{const t=at(()=>Sa.get(p()));var s=bi();Wi(zt(s),()=>Hn(t),(e,t)=>{t(e,Hr(m,{get modelName(){return l()},get actionName(){return u()},get actionFilter(){return c()},get actionSorter(){return d()},get actionPager(){return f()},get actionSearch(){return h()},get optionId(){return v()},get optionTitle(){return g()},get placeholder(){return i()},get fieldname(){return r()},get required(){return o()},multiple:!1,get valid(){return a()},onresolve:e=>function(e){Array.isArray(fe(n()))||n([]),n().push(e),$t($,_(n()),!0)}(e.value)}))}),ki(e,s)};Li(S,e=>{s()||e(C)}),ki(e,O),Ae()},UINamedNumbersList:function(e,t){Oe(t,!0);let n=Gr(t,"fieldname",3,"numbers_list"),i=Gr(t,"value",23,()=>({})),r=Gr(t,"defaultItemTitle",3,""),o=Gr(t,"defaultItemValue",3,0),s=Gr(t,"label",3,"named numbers list"),a=Gr(t,"labelSize",3,5),l=Gr(t,"placeholder",3,"new item"),u=Gr(t,"readonly",3,!1),c=Gr(t,"disabled",3,!1);Gr(t,"required",3,!0),Gr(t,"valid",3,!0);let d=Gr(t,"onchange",3,()=>!0),f=Gr(t,"class",3,"");const h=()=>({id:r(),number:o()});let v=yt(Ct(h()));const g=()=>Object.keys(i()).map(e=>({id:e,title:e,number:i()[e]}));let p=yt(Ct(g()));var m=fl(),y=zt(m);Ta(y,{get title(){return s()},get size(){return a()}});var b=Wt(y,2);Fi(b,17,()=>Hn(p),e=>e.id,(e,t)=>{el(e,{get class(){return f()},get disabled(){return c()},children:(e,r)=>{var o=cl(),s=zt(o);Za(s,{classes:"is-6",children:(e,n)=>{ie();var i=yi();on(()=>wi(i,Hn(t).title)),ki(e,i)},$$slots:{default:!0}});var a=Wt(s,2);Za(a,{classes:"is-4",children:(e,n)=>{ie();var i=yi();on(()=>wi(i,Hn(t).number)),ki(e,i)},$$slots:{default:!0}});var l=Wt(a,2),c=e=>{Za(e,{classes:"is-2",children:(e,r)=>{Is(e,{icon:"minus",action:()=>{return e=Hn(t).id,void(Jo.objHas(i(),e)&&(delete i()[e],i(i()),$t(p,g(),!0),d()({value:i(),field:n()})));var e}})},$$slots:{default:!0}})};Li(l,e=>{u()||e(c)}),ki(e,o)},$$slots:{default:!0}})});var k=Wt(b,2),$=e=>{el(e,{get class(){return f()},children:(e,t)=>{var r=dl(),o=zt(r);Za(o,{classes:"is-6",children:(e,t)=>{la(e,{get placeholder(){return l()},required:!1,get value(){return Hn(v).id},set value(e){Hn(v).id=e}})},$$slots:{default:!0}});var s=Wt(o,2);Za(s,{classes:"is-4",children:(e,t)=>{ul(e,{get value(){return Hn(v).number},set value(e){Hn(v).number=e}})},$$slots:{default:!0}}),Za(Wt(s,2),{classes:"is-2",children:(e,t)=>{Is(e,{icon:"plus",action:()=>function(){const e=Hn(v).id.trim(),t=parseInt(Hn(v).number);!e||""===e||isNaN(t)||Jo.objHas(i(),e)||(i()[e]=t),$t(p,g(),!0),d()({value:fe(i()),field:n()}),$t(v,h(),!0)}()})},$$slots:{default:!0}}),ki(e,r)},$$slots:{default:!0}})};Li(k,e=>{u()||e($)}),ki(e,m),Ae()},UINumber:ul,UIPassword:function(e,t){Oe(t,!0);const[n,i]=Rr();let r=Gr(t,"value",15,""),o=Gr(t,"placeholder",3,""),s=Gr(t,"fieldname",3,"password"),a=Gr(t,"required",3,!0),l=Gr(t,"readonly",3,!1),u=Gr(t,"disabled",3,!1),c=Gr(t,"valid",3,!0),d=Gr(t,"class",3,""),f=zr(t,["$$slots","$$events","$$legacy","value","placeholder","fieldname","color","size","required","readonly","disabled","valid","class"]),h=at(()=>!c());const v={};if("function"==typeof t.onchange){const e=bo.onInput(s(),t.onchange);v.onchange=e,v.oninput=e}var g=hl();ur(g,()=>({id:`form-field-password-${s()??""}`,class:`input ${t.size?`is-${t.size}`:""} ${t.color?`is-${t.color}`:""} ${d()??""}`,type:"password",name:s(),invalid:Hn(h),required:a(),readonly:l(),disabled:u(),placeholder:Dr(Lo,"$LOCALE",n)[o()],autocomplete:s(),"aria-controls":`input-field-helper-${s()??""}`,"aria-describedby":`input-field-helper-${s()??""}`,...v,...f}),void 0,void 0,void 0,void 0,!0),wr(g,r),ki(e,g),Ae(),i()},UIRadioButtons:function(e,t){Oe(t,!0);let n=Gr(t,"fieldname",3,"radio-buttons"),i=Gr(t,"variants",19,()=>[]),r=Gr(t,"value",7),o=Gr(t,"buttonProps",19,()=>({})),s=Gr(t,"titleComponent",3,Ta),a=Gr(t,"titleComponentProps",19,()=>({size:5})),l=Gr(t,"imageComponent",3,pl),u=Gr(t,"imageComponentProps",19,()=>({covered:!0})),c=Gr(t,"descriptionComponent",3,Cs),d=Gr(t,"descriptionComponentProps",19,()=>({})),f=Gr(t,"listComponent",3,Ja),h=Gr(t,"listComponentProps",19,()=>({})),v=Gr(t,"returnVariant",3,!1);Gr(t,"getUIItem",3,e=>k.find(t=>t.value===e));let g=Gr(t,"UIItemHasValue",3,(e,t)=>e.value==t),p=Gr(t,"getDefaultItemSublime",3,()=>i()[0].value),m=Gr(t,"uiOn",3,e=>(e.color="success",e)),y=Gr(t,"uiOff",3,e=>(e.color="",e)),b=Gr(t,"onchange",3,()=>!0);Kr(()=>{k=i().map(e=>({...o(),...e})),$t($,[{id:0,title:t.title,image:t.image,description:{values:k}}],!0),function(){if(i().length>0)if(void 0===r()){w(p()())}else I({on:r()})}()});let k=[],$=yt(Ct([]));const _=()=>(fe(r()),i().find(e=>e.value===r()));function w(e){let t={on:void 0,off:void 0};void 0!==r()&&(t.off=r()),void 0!==e&&(t.on=e),r(e),I(t),b()({field:n(),value:v()?_():fe(r())})}function I(e){for(let t in k)void 0!==e.off&&g()(k[t],e.off)&&(k[t]=y()(k[t])),void 0!==e.on&&g()(k[t],e.on)&&(k[t]=m()(k[t]));Hn($)[0].description.values=k}const O=at(f);var A=bi(),S=zt(A);{let e=at(()=>({...d(),action(e,t){w(t)}}));Wi(S,()=>Hn(O),(t,n)=>{n(t,Hr(h,{get items(){return Hn($)},get titleComponent(){return s()},get titleComponentProps(){return a()},get descriptionComponent(){return c()},get descriptionComponentProps(){return Hn(e)},get imageComponent(){return l()},get imageComponentProps(){return u()}}))})}ki(e,A),Ae()},UIRange:function(e,t){Oe(t,!0);const[n,i]=Rr();let r=Gr(t,"value",15,10),o=Gr(t,"min",3,0),s=Gr(t,"max",3,100),a=Gr(t,"step",3,1),l=Gr(t,"tickmarks",3,!1),u=Gr(t,"placeholder",3,""),c=Gr(t,"fieldname",3,"range"),d=Gr(t,"required",3,!0),f=Gr(t,"disabled",3,!1),h=Gr(t,"readonly",3,!1),v=Gr(t,"valid",3,!0),g=Gr(t,"class",3,""),p=zr(t,["$$slots","$$events","$$legacy","value","min","max","step","tickmarks","placeholder","fieldname","color","size","required","disabled","readonly","valid","class"]),m=at(()=>!v());const y={};if("function"==typeof t.onchange){const e=bo.onInput(c(),t.onchange);y.onchange=e,y.oninput=e}var b=bi(),k=zt(b),$=e=>{var t=ml(),n=Vt(t,!0);ne(t),on(()=>wi(n,r())),ki(e,t)},_=e=>{var i=kl(),v=zt(i);ur(v,()=>({id:`form-field-range-${c()??""}`,class:`input big-number slider has-output ${t.size?`is-${t.size}`:""} ${t.color?`is-${t.color}`:""} ${g()??""}`,type:"range",name:c(),min:o(),max:s(),step:a(),list:`form-field-range-${c()??""}-tickmarks`,invalid:Hn(m),disabled:f(),required:d(),readonly:h(),placeholder:Dr(Lo,"$LOCALE",n)[u()],autocomplete:c(),"aria-controls":`input-field-helper-${c()??""}`,"aria-describedby":`input-field-helper-${c()??""}`,...y,...p}),void 0,void 0,void 0,void 0,!0);var b=Wt(v,2),k=Vt(b,!0);ne(b);var $=Wt(b,2),_=e=>{var t=bl();Fi(t,21,l,Ni,(e,t)=>{var n=yl(),i={};on(()=>{lr(n,"label",Hn(t).label),i!==(i=Hn(t).value)&&(n.value=(n.__value=Hn(t).value)??"")}),ki(e,n)}),ne(t),on(()=>lr(t,"id",`form-field-range-${c()??""}-tickmarks`)),ki(e,t)};Li($,e=>{Array.isArray(l())&&l().length&&e(_)}),on(()=>{lr(b,"for",`form-field-range-${c()??""}`),wi(k,r())}),wr(v,r),ki(e,i)};Li(k,e=>{h()?e($):e(_,!1)}),ki(e,b),Ae(),i()},UISelect:ys,UISelectFromModel:function(e,t){Oe(t,!0);let n=Gr(t,"modelName",3,""),i=Gr(t,"actionName",3,""),r=Gr(t,"actionFilter",19,()=>({})),o=Gr(t,"actionSorter",19,()=>({})),s=Gr(t,"actionPager",19,()=>({})),a=Gr(t,"actionSearch",3,void 0),l=Gr(t,"optionId",3,":_id"),u=Gr(t,"optionTitle",3,":title"),c=Gr(t,"disabled",3,!1),d=Gr(t,"apiModelGetter",3,(e,t,n,i,r)=>Jo.getApp().getModel(e).setFilter(t).setSorter(n).setPager(i).setSearch(r)),f=Gr(t,"apiRequest",3,(e,t)=>e["$"+t]()),h=Gr(t,"returnVariant",3,!1),v=Gr(t,"class",3,""),g=Gr(t,"onchange",3,()=>!0),p=Gr(t,"onerror",3,()=>{}),m=zr(t,["$$slots","$$events","$$legacy","value","modelName","actionName","actionFilter","actionSorter","actionPager","actionSearch","optionId","optionTitle","disabled","apiModelGetter","apiRequest","returnVariant","class","onchange","onerror"]),y=yt(!1),b=yt(Ct([])),k=[],$=at(()=>c()||!Hn(y));Kr(async()=>{if(n()&&i()&&r()){const e=await f()(d()(n(),r(),o(),s(),a()),i());Jo.isError(e)?($t(y,!1),p()(e.errors||[e.message])):(k=e.result,$t(b,k.map(e=>({id:Wo.get(l(),e),title:Wo.get(u(),e)})),!0),$t(y,!0))}});{let n=at(()=>!Hn(y));ys(e,Hr({get value(){return t.value},get variants(){return Hn(b)},get class(){return v()},get disabled(){return Hn($)},onchange:function(e){h()?g()({...e,value:Hn(b).find(t=>t.id===e.value)}):g()(e)},get loading(){return Hn(n)}},()=>m))}Ae()},UISelectMultiple:function(e,t){Oe(t,!0);const n=()=>Dr(Lo,"$LOCALE",i),[i,r]=Rr();let o=Gr(t,"value",23,()=>[]),s=Gr(t,"variants",19,()=>[]);Gr(t,"placeholder",3,"");let a=Gr(t,"emptyValueTitle",3,"no-selection"),l=Gr(t,"emptyValueEnabled",3,!0),u=Gr(t,"fieldname",3,"select-multiple"),c=Gr(t,"required",3,!0),d=Gr(t,"readonly",3,!1),f=Gr(t,"rows",3,8),h=Gr(t,"valid",3,!0),v=Gr(t,"class",3,""),g=Gr(t,"onchange",3,()=>!0),p=zr(t,["$$slots","$$events","$$legacy","value","variants","placeholder","emptyValueTitle","emptyValueEnabled","emptyValue","fieldname","required","readonly","rows","color","size","valid","class","onchange"]),m=fe(o());function y(e){return s().find(t=>t.id==e)}function b(){const e=void 0===t.emptyValue?bo.CLEAR_MACRO:t.emptyValue;return o().filter(t=>t!==e).map(y)}function k(e){let t=function(e){return Array.from(e.selectedOptions).map(e=>void 0!==e.__value?e.__value:e.value)}(e.currentTarget);t.includes(bo.CLEAR_MACRO)&&(t=[]);const n=t;o(t),Jo.compareTwoArrays(n,m)||(m=n,g()({value:n,field:u(),variants:b()}))}let $=at(()=>o()&&Array.isArray(o())?b(o()):[]),_=at(()=>!h()),w=at(()=>[t.size,t.color].filter(e=>e).map(e=>`is-${e}`).join(" "));var I=bi(),O=zt(I),A=e=>{var t=bi(),i=zt(t),r=e=>{var t=bi();Fi(zt(t),17,()=>Hn($),Ni,(e,t)=>{var i=$l(),r=Vt(i,!0);ne(i),on(()=>wi(r,n()[Hn(t).title])),ki(e,i)}),ki(e,t)},s=e=>{var t=bi(),i=zt(t),r=e=>{var t=_l(),i=Vt(t,!0);ne(t),on(()=>wi(i,n()[a()])),ki(e,t)};Li(i,e=>{l()&&e(r)},!0),ki(e,t)};Li(i,e=>{o()&&Array.isArray(o())&&o().length?e(r):e(s,!1)}),ki(e,t)},S=e=>{var n=wl(),i=Vt(n);ur(i,()=>({multiple:"true",id:`form-field-select-${u()??""}`,name:u(),oninput:k,onchange:k,onblur:k,value:o(),readonly:d(),required:c(),invalid:Hn(_),size:f(),...p}));var r=Vt(i),h=e=>{{let n=at(()=>void 0===t.emptyValue?bo.CLEAR_MACRO:t.emptyValue);vs(e,{get value(){return Hn(n)},get title(){return a()}})}};Li(r,e=>{l()&&e(h)}),Fi(Wt(r),17,s,e=>e.id,(e,t)=>{vs(e,{get value(){return Hn(t).id},get title(){return Hn(t).title}})}),ne(i),ne(n),on(()=>Qi(n,1,`select is-multiple ${Hn(w)??""} ${v()??""} `)),ki(e,n)};Li(O,e=>{d()?e(A):e(S,!1)}),ki(e,I),Ae(),r()},UISelectOption:vs,UISwitch:function(e,t){Oe(t,!0);const n=()=>Dr(Lo,"$LOCALE",i),[i,r]=Rr();let o=Gr(t,"value",15,!1),s=Gr(t,"label",3,""),a=Gr(t,"hideLabel",3,!1),l=Gr(t,"placeholder",3,""),u=Gr(t,"fieldname",3,"switch"),c=Gr(t,"required",3,!0),d=Gr(t,"readonly",3,!1),f=Gr(t,"disabled",3,!1),h=Gr(t,"reactOn",19,()=>["onblur","oninput"]),v=Gr(t,"valid",3,!0),g=Gr(t,"class",3,""),p=zr(t,["$$slots","$$events","$$legacy","value","label","hideLabel","placeholder","fieldname","size","color","required","readonly","disabled","reactOn","valid","class"]),m=at(()=>!v());const y={};if("function"==typeof t.onchange){const e=bo.onInput(u(),t.onchange);h().forEach(t=>y[t]=e)}var b=bi(),k=zt(b),$=e=>{ns(e,{get LC_TRUE(){return s()},get LC_FALSE(){return s()},get value(){return o()}})},_=e=>{var i=Al(),r=zt(i),h=e=>{ns(e,{value:!1})};Li(r,e=>{s()||a()||e(h)});var v=Wt(r,2);ur(v,()=>({id:`form-field-switch-${u()??""}`,class:`switch ${t.size?`is-${t.size}`:""} ${t.color?`is-${t.color}`:""} ${g()??""}`,type:"checkbox",name:u(),placeholder:n()[l()],disabled:f(),required:c(),readonly:d(),invalid:Hn(m),"aria-controls":`input-field-helper-${u()??""}`,"aria-describedby":`input-field-helper-${u()??""}`,...y,...p}),void 0,void 0,void 0,void 0,!0);var b=Wt(v,2),k=Vt(b),$=e=>{var t=bi(),i=zt(t),r=e=>{var t=yi();on(()=>wi(t,n()[s()])),ki(e,t)},o=e=>{ns(e,{value:!1})};Li(i,e=>{s()?e(r):e(o,!1)}),ki(e,t)};Li(k,e=>{a()||e($)}),ne(b),on(()=>lr(b,"for",`form-field-switch-${u()??""}`)),Ir(v,o),ki(e,i)};Li(k,e=>{d()?e($):e(_,!1)}),ki(e,b),Ae(),r()},UISwitchList:function(e,t){Oe(t,!0);let n=Gr(t,"value",31,()=>Ct([])),i=Gr(t,"variants",19,()=>[]),r=Gr(t,"fieldname",3,"switch"),o=Gr(t,"required",3,!0),s=Gr(t,"readonly",3,!1),a=Gr(t,"disabled",3,!1),l=Gr(t,"reactOn",19,()=>["onblur","oninput"]),u=Gr(t,"valid",3,!0),c=Gr(t,"class",3," is-rounded "),d=Gr(t,"onchange",3,()=>!0),f=zr(t,["$$slots","$$events","$$legacy","value","variants","fieldname","required","readonly","disabled","reactOn","valid","class","onchange"]),h=at(()=>!u());const v={};if("function"==typeof f.onchange){const e=bo.onInput(r(),function(e,t){const i=t.target.id.split("-variant-").at(-1);t.target.checked?function(e){n().includes(e)||(n().push(e),n(n()))}(i):function(e){n().includes(e)&&(n().splice(n().indexOf(e),1),n(n()))}(i);let o={field:r(),value:fe(n())};return d()(o),!0});l().forEach(t=>v[t]=e)}var g=bi(),p=zt(g),m=e=>{var t=bi(),r=zt(t),o=e=>{var t=yi();on(e=>wi(t,e),[()=>i().filter(e=>n().includes(e.id)).map(e=>e.title).join(", ")]),ki(e,t)};Li(r,e=>{n()&&e(o)}),ki(e,t)},y=e=>{var t=bi();Fi(zt(t),17,i,e=>e.id,(e,t)=>{var i=Sl(),l=Vt(i);ur(l,e=>({type:"checkbox",class:`switch ${c()??""} ${Hn(t).type?`is-${Hn(t).type}`:""}`,id:`form-field-switch-${r()??""}-variant-${Hn(t).id??""}`,checked:e,name:r(),disabled:a(),required:o(),readonly:s(),invalid:Hn(h),"aria-controls":`input-field-helper-${r()??""}-variant-${Hn(t).id??""}`,"aria-describedby":`input-field-helper-${r()??""}-variant-${Hn(t).id??""}`,...v,...f}),[()=>n().includes(Hn(t).id)],void 0,void 0,void 0,!0),fa(Wt(l,2),{class:"label",get for(){return`form-field-switch-${r()??""}-variant-${Hn(t).id??""}`},get label(){return Hn(t).title}}),ne(i),ki(e,i)}),ki(e,t)};Li(p,e=>{s()?e(m):e(y,!1)}),ki(e,g),Ae()},UITagSelect:function(e,t){Oe(t,!0);const[n,i]=Rr();Kr(()=>{s(s().filter(p)),s()});let r=Gr(t,"LC_ADD",3,"not-node:add_label"),o=Gr(t,"LC_SELECT_FROM_LIST",3,"not-node:select_from_list_label"),s=Gr(t,"value",31,()=>Ct([])),a=Gr(t,"variants",19,()=>[]),l=Gr(t,"fieldname",3,"tag"),u=Gr(t,"readonly",3,!1);Gr(t,"valid",3,!0);let c=Gr(t,"beforeAdd",3,()=>!0),d=Gr(t,"getItemId",3,e=>e.id),f=Gr(t,"getItemTitle",3,e=>e.title),h=Gr(t,"getItemType",3,e=>e?.type??"info"),v=Gr(t,"buildItem",3,e=>({id:d()(e),title:f()(e),type:h()(e)})),g=Gr(t,"class",3,"");function p(e){return a().find(t=>d()(t)==e)}function m(){t.onchange({field:l(),value:s()})}function y(e){e&&e.preventDefault();let t=e.currentTarget.dataset.id;return s().includes(t)&&(s().splice(s().indexOf(t),1),s(s()),m()),!1}function b(e){e&&e.preventDefault();let t=e.currentTarget.parentNode.querySelector("select").value;const n=p(t);return!!n&&(!!c()(n,a())&&(t&&-1===s().indexOf(t)&&(s().push(t),s(s()),m()),!1))}let k=at(()=>s().map(p).filter(e=>e).map(v()));el(e,{get class(){return g()},children:(e,t)=>{var i=Tl(),s=zt(i);Za(s,{children:(e,t)=>{var i=bi();Fi(zt(i),17,()=>Hn(k),e=>e.id,(e,t)=>{var i=El(),r=Vt(i),o=Wt(r),s=e=>{var n=Cl();n.__click=y,on(()=>lr(n,"data-id",Hn(t).id)),ki(e,n)};Li(o,e=>{u()||e(s)}),ne(i),on(()=>{Qi(i,1,`mx-1 tag is-${Hn(t).type??""}`),wi(r,`${Dr(Lo,"$LOCALE",n)[Hn(t).title]??""} `)}),ki(e,i)}),ki(e,i)},$$slots:{default:!0}});var l=Wt(s,2),c=e=>{Za(e,{children:(e,t)=>{var n=Ll(),i=zt(n),s=Vt(i),l=Vt(s);vs(l,{value:-1,selected:!0,get title(){return o()}}),Fi(Wt(l),17,a,Ni,(e,t)=>{vs(e,{get value(){return Hn(t).id},get title(){return Hn(t).title}})}),ne(s),ne(i),Is(Wt(i,2),{color:"primary",size:"small",action:b,get title(){return r()}}),ki(e,n)},$$slots:{default:!0}})};Li(l,e=>{u()||e(c)}),ki(e,i)},$$slots:{default:!0}}),Ae(),i()},UITelephone:function(e,t){Oe(t,!0);const[n,i]=Rr();let r=Gr(t,"value",15,""),o=Gr(t,"placeholder",3,"+7 987 654-32-10"),s=Gr(t,"pattern",3,"\\+[0-9]{1,3}\\s+[0-9]{3}\\s+[0-9]{3}-[0-9]{2}-[0-9]{2}"),a=Gr(t,"fieldname",3,"telephone"),l=Gr(t,"required",3,!0),u=Gr(t,"disabled",3,!1),c=Gr(t,"readonly",3,!1),d=Gr(t,"valid",3,!0),f=Gr(t,"class",3,""),h=zr(t,["$$slots","$$events","$$legacy","value","placeholder","pattern","fieldname","required","disabled","readonly","color","size","valid","class"]),v=at(()=>!d());const g={};if("function"==typeof t.onchange){const e=bo.onInput(a(),t.onchange);g.onchange=e,g.oninput=e}var p=bi(),m=zt(p),y=e=>{var t=xl(),n=Vt(t,!0);ne(t),on(()=>wi(n,r())),ki(e,t)},b=e=>{var i=Nl();ur(i,()=>({id:`form-field-telephone-${a()??""}`,class:`input ${t.size?`is-${t.size}`:""} ${t.color?`is-${t.color}`:""} ${f()??""}`,type:"tel",name:a(),pattern:s(),invalid:Hn(v),required:l(),readonly:c(),disabled:u(),placeholder:Dr(Lo,"$LOCALE",n)[o()],autocomplete:a(),"aria-controls":`input-field-helper-${a()??""}`,"aria-describedby":`input-field-helper-${a()??""}`,...g,...h}),void 0,void 0,void 0,void 0,!0),wr(i,r),ki(e,i)};Li(m,e=>{c()?e(y):e(b,!1)}),ki(e,p),Ae(),i()},UITextarea:Ia,UITextfield:la});var Ul=mi("<span> </span> ",1),Pl=mi("<p><!></p>");function Ml(e,t){Oe(t,!0);const[n,i]=Rr();let r=Gr(t,"errors",19,()=>[]),o=Gr(t,"show",3,!1),s=Gr(t,"class",3,""),a=Gr(t,"id",3,"errors-list");var l=bi(),u=zt(l),c=e=>{var t=Pl(),i=Vt(t),l=e=>{var t=bi();Fi(zt(t),17,r,Ni,(e,t,i)=>{var o=Ul(),s=zt(o),a=Vt(s,!0);ne(s);var l=Wt(s,1,!0);on(()=>{wi(a,Dr(Lo,"$LOCALE",n)[Hn(t)]),wi(l,i<r().length-1?", ":"")}),ki(e,o)}),ki(e,t)},u=e=>{ki(e,yi(" "))};Li(i,e=>{o()?e(l):e(u,!1)}),ne(t),on(()=>{Qi(t,1,`help ${s()??""}`),lr(t,"id",a())}),ki(e,t)};Li(u,e=>{Array.isArray(r())&&r().length&&e(c)}),ki(e,l),Ae(),i()}var Dl=mi("<p><strong> </strong> <small>@</small> <strong> </strong></p>"),Rl=mi('<article class="media"><figure class="media-left"><p class="image is-32x32"><img/></p></figure> <div class="media-content"><!></div></article>');var jl=mi("<span><span><i></i> <span> </span></span></span>"),Vl=mi("<span><i></i></span>");function zl(e,t){Oe(t,!0);const[n,i]=Rr();let r=Gr(t,"title",3,""),o=Gr(t,"font",3,""),s=Gr(t,"side",3,""),a=Gr(t,"size",3,""),l=Gr(t,"pointable",3,!1);var u=bi(),c=zt(u),d=e=>{var t=jl(),i=Vt(t),s=Vt(i),u=Wt(s,2),c=Vt(u,!0);ne(u),ne(i),ne(t),on(()=>{Qi(t,1,"icon-text "+(l()?"is-clickable":"")),Qi(i,1,"icon "+(a()?`is-${a()}`:"")),Qi(s,1,`is-title-icon fas\n fa-${o()??""}\n ${"medium"==a()?"fa-lg":""}\n ${"large"==a()?"fa-2x":""}\n `),wi(c,Dr(Lo,"$LOCALE",n)[r()])}),ki(e,t)},f=e=>{var t=Vl(),n=Vt(t);ne(t),on(()=>{Qi(t,1,`\n ${l()?"is-clickable":""}\n ${s()?`is-${s()}`:""}\n icon ${a()?`is-${a()}`:""} ${"medium"==a()?"fa-lg":""}\n${"large"==a()?"fa-2x":""}`),Qi(n,1,`fas fa-${o()??""}`)}),ki(e,t)};Li(c,e=>{r()?e(d):e(f,!1)}),ki(e,u),Ae(),i()}var Wl=mi("<!> <!>",1);function Bl(e,t){Oe(t,!0);let n=Gr(t,"placeholder",3,"not-node:field_search_placeholder"),i=Gr(t,"term",15,""),r=Gr(t,"fieldname",3,"searchTermInput"),o=Gr(t,"icon",3,"search"),s=Gr(t,"iconSide",3,"left"),a=Gr(t,"size",3,"normal"),l=Gr(t,"required",3,!1),u=zr(t,["$$slots","$$events","$$legacy","placeholder","term","fieldname","icon","iconSide","size","required"]),c=at(()=>o()&&"left"===s()),d=at(()=>o()&&"right"===s());el(e,{role:"none",children:(e,t)=>{Za(e,{role:"none",children:(e,t)=>{Ps(e,{children:(e,t)=>{Ds(e,{get hasIconsLeft(){return Hn(c)},get hasIconsRight(){return Hn(d)},children:(e,t)=>{var c=Wl(),d=zt(c);la(d,Hr({get placeholder(){return n()},get fieldname(){return r()},get required(){return l()},get size(){return a()},role:"searchbox"},()=>u,{get value(){return i()},set value(e){i(e)}}));var f=Wt(d,2),h=e=>{zl(e,{get font(){return o()},get side(){return s()}})};Li(f,e=>{o()&&e(h)}),ki(e,c)},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}})},$$slots:{default:!0}}),Ae()}var ql=Object.freeze({__proto__:null,UIBoolean:ns,UIBooleanLabeled:function(e,t){Oe(t,!0);const[n,i]=Rr();let r=Gr(t,"inverted",3,!1);var o=is(),s=Vt(o);ns(Wt(s),{get value(){return t.value},get inverted(){return r()}}),ne(o),on(()=>wi(s,`${Dr(Lo,"$LOCALE",n)[t.label]??""}: `)),ki(e,o),Ae(),i()},UIBooleans:rs,UICensored:function(e,t){Oe(t,!0);let n=Gr(t,"hidden",15,!0),i=Gr(t,"showable",3,!0),r=Gr(t,"copiable",3,!0),o=Gr(t,"copyIcon",3,"copy"),s=Gr(t,"showIcon",3,"eye"),a=Gr(t,"hideIcon",3,"eye-slash"),l=Gr(t,"maxLength",3,20),u=Gr(t,"shadowClass",3,"has-background-primary-90"),c=Gr(t,"tooltip",3,!0),d=Gr(t,"tooltipTTL",3,2e3),f=Gr(t,"tooltipText",3,"Скопировано в буфер"),h=Gr(t,"tooltipClass",3,"has-tooltip-info"),v=Gr(t,"value",3,"");function g(){n(!n())}let p=yt(!1),m=at(()=>c()&&Hn(p)),y=yt(void 0);async function b(){try{await navigator.clipboard.writeText(v()),c()&&($t(p,!0),Hn(y).dataset.tooltip=f(),setTimeout(()=>{$t(p,!1),Hn(y).removeAttribute("data-tooltip")},d()))}catch(e){t.onerror&&t.onerror(e)}}var k=as(),$=zt(k),_=Vt($,!0);ne($);var w=Wt($,2),I=e=>{var t=os();t.__click=b,t.__keydown=b;var n=Vt(t);ne(t),Cr(t,e=>$t(y,e),()=>Hn(y)),on(()=>{Qi(t,1,"icon is-small is-right is-clickable "+(Hn(m)?` ${h()} `:"")+" is-vertical-middle"),Qi(n,1,`fas fa-${o()??""}`)}),ki(e,t)};Li(w,e=>{r()&&e(I)});var O=Wt(w,2),A=e=>{var t=ss();t.__click=g,t.__keydown=g;var i=Vt(t);ne(t),on(()=>Qi(i,1,`fas fa-${(n()?s():a())??""}`)),ki(e,t)};Li(O,e=>{i()&&e(A)}),on(()=>{Qi($,1,(n()?"is-censored "+u():"")+" is-vertical-middle "),Xi($,`display:inline-block; width: ${l()}rem; height: var(--bulma-size-medium); overflow-x:hidden;`),wi(_,n()?"":v())}),ki(e,k),Ae()},UIErrorsList:Ml,UIIndicator:us,UILoader:fs,UIProgress:function(e,t){let n=Gr(t,"max",3,100),i=Gr(t,"color",3,""),r=Gr(t,"size",3,""),o=Gr(t,"class",3,"");var s=js(),a=Vt(s);ne(s),on(()=>{Qi(s,1,`\n progress\n ${o()??""}\n ${i()?`is-${i()}`:""}\n ${r()?`is-${r()}`:""}`),function(e,t){var n=cr(e);n.value!==(n.value=t??void 0)&&(e.value!==t||0===t&&"PROGRESS"===e.nodeName)&&(e.value=t??"")}(s,t.value),lr(s,"max",n()),wi(a,`${t.value??""}%`)}),ki(e,s)},UISelectFromModelOnDemandInline:function(e,t){Oe(t,!0);let n,i=Gr(t,"variants",23,()=>[]),r=Gr(t,"loaded",7,!1),o=Gr(t,"placeholder",3,"empty select item"),s=Gr(t,"fieldname",3,"selectFromModel"),a=Gr(t,"modelName",3,""),l=Gr(t,"actionName",3,""),u=Gr(t,"actionFilter",19,()=>({})),c=Gr(t,"actionSorter",19,()=>({})),d=Gr(t,"actionPager",19,()=>({})),f=Gr(t,"actionSearch",3,void 0),h=Gr(t,"apiModelGetter",3,(e,t,n,i,r)=>Jo.getApp().getModel(e).setFilter(t).setSorter(n).setPager(i).setSearch(r)),v=Gr(t,"apiRequest",3,(e,t)=>e["$"+t]()),g=Gr(t,"optionId",3,":_id"),p=Gr(t,"optionTitle",3,":title"),m=Gr(t,"required",3,!0),y=Gr(t,"readonly",3,!1),b=Gr(t,"valid",3,!0),k=Gr(t,"onreject",3,()=>!1),$=Gr(t,"onresolve",3,()=>!0),_=Gr(t,"onerror",3,()=>!0),w=at(()=>!r()),I=yt("hidden"),O=[];function A({value:e}){n=O.length>i().length?O.find(t=>Wo.get(g(),t)==e):i().find(t=>t.id==e)}Kr(async()=>{if(a()&&l()&&u()){const e=await v()(h()(a(),u(),c(),d(),f()),l());Jo.isError(e)?(r(!1),_()(e.errors||[e.message])):(O=e.result,i(O.map(e=>({id:Wo.get(g(),e),title:Wo.get(p(),e)}))),r(!0))}});const S={add:{color:"primary",icon:"plus",action(){$t(I,"show")}},resolve:{icon:"check",color:"primary",action(){$t(I,"hidden"),$()({field:s(),value:fe(n)})}},reject:{icon:"xmark",color:"danger",action(){$t(I,"hidden"),k()()}}};var C=bi(),E=zt(C),L=e=>{Is(e,Hr(()=>S.add))},T=e=>{var n=bi(),r=zt(n),a=e=>{Ps(e,{addons:!0,children:(e,n)=>{var r=Rs(),a=zt(r);Ds(a,{children:(e,n)=>{ys(e,{get value(){return t.value},get variants(){return i()},get placeholder(){return o()},get fieldname(){return s()},get required(){return m()},get readonly(){return y()},get disabled(){return Hn(w)},get size(){return t.size},get color(){return t.color},get valid(){return b()},onchange:A})},$$slots:{default:!0}}),Ds(Wt(a,2),{children:(e,t)=>{{let t=at(()=>[S.resolve,S.reject]);Cs(e,{get values(){return Hn(t)}})}},$$slots:{default:!0}}),ki(e,r)},$$slots:{default:!0}})};Li(r,e=>{"show"==Hn(I)&&e(a)},!0),ki(e,n)};Li(E,e=>{"hidden"===Hn(I)?e(L):e(T,!1)}),ki(e,C),Ae()},UISelectFromModelWithSearchModal:function(e,t){Oe(t,!0);let n=Gr(t,"value",15),i=Gr(t,"icon",3,"search"),r=Gr(t,"fieldname",3,""),o=Gr(t,"readonly",3,!1),s=Gr(t,"serviceName",3,""),a=Gr(t,"serviceOpenSelectorMethod",3,"openSelector"),l=Gr(t,"serviceLoadDataMethod",3,"loadData"),u=Gr(t,"modelData",15,null),c=Gr(t,"loading",15,!1),d=Gr(t,"selectedModelTitleFormatter",3,e=>`${e._id}`),f=Gr(t,"serviceGetter",3,e=>{if(!e)throw new Error("serviceName is not set");return Jo.getApp().getService(e)}),h=Gr(t,"loadingLabel",3,"not-node:loading_label"),v=Gr(t,"isEmptyLabel",3,"not-node:field_value_is_empty_placeholder"),g=Gr(t,"onchange",3,()=>!0),p=Gr(t,"openSelectorButtonProps",19,()=>({})),m=Gr(t,"resetButtonProps",19,()=>({})),y=Gr(t,"emptyButtonProps",19,()=>({})),b=Gr(t,"valueButtonProps",19,()=>({}));function k(){if(!a())throw new Error("serviceOpenSelectorMethod is not set");f()(s())[a()]().then(e=>(n(e._id),u(e),n())).then(e=>{g()({field:r(),value:e,data:u()})}).catch(e=>{Jo.report(e)})}Kr(()=>{!async function(){try{!u()&&n()&&(c(!0),u(await getService()[l()](n())))}catch(e){Jo.report(e)}finally{c(!1)}}()});const $=[{id:1,action:k,icon:i(),color:"warning",...p()},{id:2,action:function(){n(void 0),u(null),g()({field:r(),value:n()})},icon:"times",color:"danger",...m()}];function _(){return c()?{disabled:!0,loading:c(),title:h()}:u()?{disabled:o(),action:k,title:d()(u()),...b()}:{disabled:!0,title:v(),...y()}}let w=yt(Ct([]));Xt(()=>{n()?$t(w,[_(),...o()?[]:$],!0):$t(w,[_(),...o()?[]:[$[0]]],!0)}),Ds(e,{children:(e,t)=>{Cs(e,{get values(){return Hn(w)},class:"is-no-flex-wrap"})},$$slots:{default:!0}}),Ae()},UIShowOneFromList:function(e,t){Oe(t,!0);const n=e=>e[o()]===t.id;let i=Gr(t,"values",19,()=>[]),r=Gr(t,"active",31,()=>Ct({})),o=Gr(t,"idFieldName",3,"_id"),s=Gr(t,"filter",3,n);Xt(()=>{r(Array.isArray(i())&&i().length&&void 0!==t.id?i().find(s()||n):void 0)});var a=bi(),l=zt(a),u=e=>{var n=bi(),i=zt(n),o=e=>{var n=bi();zi(zt(n),()=>t.component,r),ki(e,n)},s=e=>{var n=bi(),i=zt(n),o=e=>{var n=bi();Wi(zt(n),()=>t.UIComponent,(e,t)=>{t(e,Hr(r))}),ki(e,n)};Li(i,e=>{t.UIComponent&&e(o)},!0),ki(e,n)};Li(i,e=>{t.component?e(o):e(s,!1)}),ki(e,n)},c=e=>{var n=bi(),i=zt(n),r=e=>{var n=bi(),i=zt(n),r=e=>{var n=bi();zi(zt(n),()=>t.placeholder,()=>t.placeholderProps),ki(e,n)},o=e=>{var n=bi(),i=zt(n),r=e=>{var n=bi();Wi(zt(n),()=>t.UIPlaceholder,(e,n)=>{n(e,Hr(()=>t.placeholderProps))}),ki(e,n)};Li(i,e=>{t.UIPlaceholder&&e(r)},!0),ki(e,n)};Li(i,e=>{t.placeholder?e(r):e(o,!1)}),ki(e,n)};Li(i,e=>{t.UIPlaceholder&&e(r)},!0),ki(e,n)};Li(l,e=>{r()?e(u):e(c,!1)}),ki(e,a),Ae()},UISimpleSearchInput:Bl,UITag:ts,UITagValue:zs,UITagValueList:function(e,t){Oe(t,!0);let n=Gr(t,"values",19,()=>[]),i=Gr(t,"grouped",3,!0),r=Gr(t,"multiline",3,!0);var o=bi(),s=zt(o),a=e=>{Ps(e,{get grouped(){return i()},get multiline(){return r()},children:(e,t)=>{var i=bi();Fi(zt(i),17,n,Ni,(e,t)=>{Ds(e,{children:(e,n)=>{zs(e,Hr(()=>Hn(t)))},$$slots:{default:!0}})}),ki(e,i)},$$slots:{default:!0}})};Li(s,e=>{n().length&&e(a)}),ki(e,o),Ae()},UITitle:Ta,UIUserCard:function(e,t){Oe(t,!0);let n=Gr(t,"id",3,"userCard"),i=Gr(t,"image",3,"https://bulma.io/images/placeholders/32x32.png"),r=Gr(t,"username",7,"John Doe"),o=Gr(t,"role",7,"admin"),s=Gr(t,"events",23,()=>({})),a=Gr(t,"register",19,()=>Jo.registerWidgetEvents.bind(Jo)),l=Gr(t,"onUpdate",3,e=>{Object.hasOwn(e,"username")&&r(e.username),Object.hasOwn(e,"role")&&o(e.role)});function u(){return`usercard-${n()}`}function c(){return`${u()}:update`}Kr(()=>{Object.hasOwn(s(),c())||(s()[c()]=l()),a()(s())});var d={getCompId:u,getStandartUpdateEventName:c},f=Rl(),h=Vt(f),v=Vt(h),g=Vt(v);ne(v),ne(h);var p=Wt(h,2);return Oo(Vt(p),{children:(e,t)=>{var n=Dl(),i=Vt(n),s=Vt(i,!0);ne(i);var a=Wt(i,4),l=Vt(a,!0);ne(a),ne(n),on(()=>{wi(s,r()),wi(l,o())}),ki(e,n)},$$slots:{default:!0}}),ne(p),ne(f),on(e=>{lr(f,"id",e),lr(g,"src",i()),lr(g,"alt",r())},[u]),ki(e,f),Ae(d)}});function Hl(e,t){Oe(t,!0);let n=Gr(t,"id",3,"generic-field"),i=Gr(t,"class",3,""),r=yt(Ct([])),o=yt(!0);Xt(()=>{$t(r,[...Array.isArray(t.errors)?t.errors:[],...Array.isArray(t.formErrors)?t.formErrors:[]],!0),$t(o,t.inputStarted&&t.validated&&!t.valid,!0)}),Ml(e,{get show(){return Hn(o)},get errors(){return Hn(r)},get class(){return i()},get id(){return n()}}),Ae()}var Gl=mi('<span class="is-tag-container"><!> <!></span>');var Kl=mi("<div><!></div>");var Jl=mi('<span class="icon"><!></span>'),Yl=mi("<figure><img/></figure>");function Ql(e,t){let n=Gr(t,"title",3,""),i=Gr(t,"size",3,""),r=Gr(t,"font",3,""),o=Gr(t,"svg",3,""),s=Gr(t,"src",3,"");var a=bi(),l=zt(a),u=e=>{zl(e,{get font(){return r()},get size(){return i()},get title(){return n()}})},c=e=>{var i=bi(),r=zt(i),a=e=>{var t=Jl();ji(Vt(t),o),ne(t),ki(e,t)},l=e=>{var i=bi(),r=zt(i),o=e=>{var i=Yl(),r=Vt(i);ne(i),on(()=>{Qi(i,1,`image ${t.width&&t.height?`is-${t.width}x${t.height}`:""} `),lr(r,"src",s()),lr(r,"title",n()),lr(r,"alt",n()),lr(r,"width",t.width),lr(r,"height",t.height)}),ki(e,i)};Li(r,e=>{s()&&e(o)},!0),ki(e,i)};Li(r,e=>{o()?e(a):e(l,!1)},!0),ki(e,i)};Li(l,e=>{r()?e(u):e(c,!1)}),ki(e,a)}var Zl=Object.freeze({__proto__:null,UIIcon:Ql,UIIconButtonWithTag:function(e,t){Oe(t,!0);let n=Gr(t,"button",19,()=>({})),i=Gr(t,"tag",19,()=>({})),r=yt(Ct({})),o={left:!!t.left,right:!!t.right,top:!!t.top,bottom:!!t.bottom};Kr(()=>{t.left&&(Hn(r)["--siding-left-size"]=t.left),t.right&&(Hn(r)["--siding-right-size"]=t.right),t.top&&(Hn(r)["--siding-top-size"]=t.top),t.bottom&&(Hn(r)["--siding-bottom-size"]=t.bottom),$t(r,Hn(r),!0)});var s=Gl(),a=Vt(s);Is(a,Hr(n)),ts(Wt(a,2),Hr(i,{get vars(){return Hn(r)}},()=>o)),ne(s),ki(e,s),Ae()},UIIconFloating:function(e,t){Oe(t,!0);let n=Gr(t,"trigger",19,()=>({title:"Click me!",icon:"plus",color:"primary",size:"medium",onclick:()=>!0})),i=Gr(t,"top",3,"2em"),r=Gr(t,"left",3,"2em"),o=Gr(t,"class",3,""),s=yt("");Kr(()=>{$t(s,""),i()&&$t(s,Hn(s)+`top: ${i()};`),r()&&$t(s,Hn(s)+`left: ${r()};`),t.right&&$t(s,Hn(s)+`right: ${t.right};`),t.bottom&&$t(s,Hn(s)+`bottom: ${t.bottom};`)});var a=Kl();Is(Vt(a),Hr(n)),ne(a),on(()=>{Qi(a,1,`is-absolute ${o()??""}`),Xi(a,Hn(s))}),ki(e,a),Ae()},UIIconFont:zl});function Xl(e,t){let n=Gr(t,"side",3,"right"),i=Gr(t,"size",3,"small");var r=bi(),o=zt(r),s=e=>{{let r=at(()=>t.valid?"check":"exclamation-triangle");zl(e,{get font(){return Hn(r)},get side(){return n()},get size(){return i()}})}};Li(o,e=>{!0===t.validated&&e(s)}),ki(e,r)}var eu=mi("<!> <!> <!>",1);function tu(e,t){Oe(t,!0);let n=Gr(t,"value",15,"");Gr(t,"fieldnamePrefix",3,"form-field-");let i=Gr(t,"valid",3,!0),r=Gr(t,"validated",3,!1),o=zr(t,["$$slots","$$events","$$legacy","value","readonly","UIInput","label","fieldtype","fieldname","fieldnamePrefix","icon","valid","validated"]);var s=eu(),a=zt(s);Wi(a,()=>t.UIInput,(e,r)=>{r(e,Hr({get fieldtype(){return t.fieldtype},get fieldname(){return t.fieldname},get valid(){return i()},get readonly(){return t.readonly}},()=>o,{get value(){return n()},set value(e){n(e)}}))});var l=Wt(a,2),u=e=>{zl(e,{get font(){return t.icon},side:iconSide,size:iconSize})};Li(l,e=>{t.icon&&e(u)});var c=Wt(l,2),d=e=>{Xl(e,{get validated(){return r()},get valid(){return i()}})};Li(c,e=>{t.readonly||e(d)}),ki(e,s),Ae()}var nu=mi("<!> <!>",1),iu=mi(" <!>",1),ru=mi("<!> <!>",1);var ou=Object.freeze({__proto__:null,UIFormControl:function(e,t){Oe(t,!0);const n=e=>{Ds(e,{get class(){return Hn($)},children:(e,n)=>{tu(e,Hr({get UIInput(){return t.UIInput},get placeholder(){return s()},get fieldtype(){return t.fieldtype},get fieldname(){return t.fieldname},get fieldnamePrefix(){return a()},get icon(){return l()},get iconSide(){return u()},get iconSize(){return c()},get required(){return d()},get readonly(){return f()},get disabled(){return h()},get inputStarted(){return r()},get validated(){return g()},get valid(){return v()},get onchange(){return p()},get onerror(){return m()}},()=>k,{get value(){return i()},set value(e){i(e)}}))},$$slots:{default:!0}})};let i=Gr(t,"value",15,""),r=Gr(t,"inputStarted",3,!1),o=Gr(t,"labelVertical",3,!0),s=Gr(t,"placeholder",3,""),a=Gr(t,"fieldnamePrefix",3,"form-field-"),l=Gr(t,"icon",3,""),u=Gr(t,"iconSide",3,"left"),c=Gr(t,"iconSize",3,"small"),d=Gr(t,"required",3,!1),f=Gr(t,"readonly",3,!1),h=Gr(t,"disabled",3,!1),v=Gr(t,"valid",3,!0),g=Gr(t,"validated",3,!1),p=Gr(t,"onchange",3,()=>!0),m=Gr(t,"onerror",3,()=>!0),y=Gr(t,"formErrors",19,()=>[]),b=Gr(t,"errors",19,()=>[]),k=zr(t,["$$slots","$$events","$$legacy","value","UIInput","inputStarted","label","labelVertical","placeholder","fieldtype","fieldname","fieldnamePrefix","icon","iconSide","iconSize","required","readonly","disabled","valid","validated","onchange","onerror","formErrors","errors"]),$=at(()=>(l()?" has-icons-left ":"")+" has-icons-right ");var _=ru(),w=zt(_),I=e=>{var i=bi(),r=zt(i),s=e=>{var i=nu(),r=zt(i);fa(r,{get class(){return t.fieldtype},get for(){return`${a()??""}${t.fieldtype??""}-${t.fieldname??""}`},get label(){return t.label}});var o=Wt(r,2);n(o),ki(e,i)},l=e=>{fa(e,{get class(){return t.fieldtype},get for(){return`${a()??""}${t.fieldtype??""}-${t.fieldname??""}`},children:(e,i)=>{ie();var r=iu(),o=zt(r),s=Wt(o);n(s),on(()=>wi(o,`${t.label??""}: `)),ki(e,r)},$$slots:{default:!0}})};Li(r,e=>{o()?e(s):e(l,!1)}),ki(e,i)},O=e=>{n(e)};Li(w,e=>{t.label?e(I):e(O,!1)}),Hl(Wt(w,2),{get inputStarted(){return r()},get validated(){return g()},get valid(){return v()},get errors(){return b()},get formErrors(){return y()},get id(){return`input-field-helper-${t.fieldname??""}`}}),ki(e,_),Ae()},UIFormInput:tu,UIFormInputErrors:Hl,UIFormInputValidatedIcon:Xl});function su(e,t){let n=Gr(t,"values",19,()=>[]),i=zr(t,["$$slots","$$events","$$legacy","values"]);var r=bi();Fi(zt(r),17,n,e=>e.url,(e,t)=>{pl(e,Hr(()=>Hn(t),()=>i))}),ki(e,r)}var au=Object.freeze({__proto__:null,UIImage:pl,UIImages:su}),lu=Object.freeze({__proto__:null,UILink:Da,UILinks:Va});function uu(e,t){let n=Gr(t,"page",7,0),i=Gr(t,"pages",3,0),r=Gr(t,"buttonsRowComponent",3,Ls),o=Gr(t,"buttonsRowComponentProps",19,()=>({})),s=Gr(t,"buttonPrevProps",19,()=>({title:"not-node:list_navigation_prev_button_label"})),a=Gr(t,"buttonProgressProps",19,()=>({})),l=Gr(t,"buttonNextProps",19,()=>({title:"not-node:list_navigation_next_button_label"})),u=Gr(t,"onprev",3,()=>{n()>0&&jr(n,-1)}),c=Gr(t,"onnext",3,()=>{n()<i()-1&&jr(n)}),d=Gr(t,"progressTitleStart",3,""),f=Gr(t,"progressTitleDelimiter",3," / "),h=Gr(t,"progressTitleEnd",3,""),v=at(()=>n()+1);var g=bi(),p=zt(g),m=e=>{var t=bi(),n=zt(t);{let e=at(()=>Hn(v)>1?[{...s(),action:u()}]:[]),t=at(()=>i()>1?[{...a(),title:`${d()}${Hn(v)}${f()}${i()}${h()}`,disabled:!0}]:[]),g=at(()=>Hn(v)<i()?[{...l(),action:c()}]:[]);Wi(n,r,(n,i)=>{i(n,Hr(o,{get left(){return Hn(e)},get center(){return Hn(t)},get right(){return Hn(g)}}))})}ki(e,t)};Li(p,e=>{i()>0&&e(m)}),ki(e,g)}var cu=mi("<span> </span>");function du(e,t){function n(e){return e.preventDefault(),t.onclick({_id:t._id,id:t.id,title:t.title}),!1}Oe(t,!0),wo(e,{onclick:n,onkeyup:n,class:"list-item-selectable",children:(e,n)=>{var i=cu(),r=Vt(i,!0);ne(i),on(()=>wi(r,t.title)),ki(e,i)},$$slots:{default:!0}}),Ae()}var fu=mi("<!> <!>",1);function hu(e,t){Oe(t,!0);let n=Gr(t,"class",3,""),i=Gr(t,"data",31,()=>Ct({list:[],skip:0,count:0,page:0,pages:0})),r=Gr(t,"itemComponent",3,du),o=Gr(t,"itemComponentProps",19,()=>({})),s=Gr(t,"emptyListPlaceholderComponent",3,xa),a=Gr(t,"emptyListPlaceholderComponentProps",19,()=>({})),l=Gr(t,"listNavigationComponent",3,uu),u=Gr(t,"listNavigationComponentProps",19,()=>({}));var c=fu(),d=zt(c);$o(d,{get class(){return n()},children:(e,n)=>{var l=bi(),u=zt(l),c=e=>{var n=bi();Fi(zt(n),19,()=>i().list,e=>e.id,(e,n,i)=>{var s=bi(),a=zt(s),l=e=>{var r=bi();zi(zt(r),()=>t.itemRenderer,()=>Hn(n),()=>Hn(i)),ki(e,r)},u=e=>{var i=bi();Wi(zt(i),r,(e,i)=>{i(e,Hr({get onclick(){return t.onselect}},o,()=>Hn(n)))}),ki(e,i)};Li(a,e=>{t.itemRenderer?e(l):e(u,!1)}),ki(e,s)}),ki(e,n)},d=e=>{var t=bi();Wi(zt(t),s,(e,t)=>{t(e,Hr(a))}),ki(e,t)};Li(u,e=>{i()?.list?.length?e(c):e(d,!1)}),ki(e,l)},$$slots:{default:!0}}),Wi(Wt(d,2),l,(e,n)=>{n(e,Hr(u,{get onprev(){return t.onprev},get onnext(){return t.onnext},get page(){return i().page},set page(e){i(i().page=e,!0)},get pages(){return i().pages},set pages(e){i(i().pages=e,!0)},get skip(){return i().skip},set skip(e){i(i().skip=e,!0)},get count(){return i().count},set count(e){i(i().count=e,!0)}}))}),ki(e,c),Ae()}let vu=function(){return uo(function e(){io(this,e)},null,[{key:"convertGroupTitle",value:function({title:e}){return e}},{key:"convertGroupImage",value:function({image:e}){return e}},{key:"convertVariant",value:function(e,t){return{id:e.id,title:e.title,value:{valueId:e.id,groupId:t}}}},{key:"convertVariantsGroup",value:function(e){var t=this;return{id:e.id,title:this.convertGroupTitle(e),image:this.convertGroupImage(e),description:{values:e.variants.map(function(n){return t.convertVariant(n,e.id)})}}}},{key:"buildSelectorItemsFromVariants",value:function(e){var t=this;return e.map(function(e){return t.convertVariantsGroup(e)})}},{key:"sublimeValue",value:function(e){return{groupId:e.group||e.groupId,valueId:e.id||e.valueId}}},{key:"getSelectorGroupIndex",value:function(e,t){const n=e.findIndex(function(e){return e.id===t});return n>-1?n:void 0}},{key:"getSelectorGroup",value:function(e,t){return e[t]}},{key:"selectorGroupHasVariants",value:function(e){return e&&e.description&&Array.isArray(e.description.values)}},{key:"getSelectorGroupVariants",value:function(e){return e.description.values}},{key:"compareSelectorGroupValueIdWith",value:function(e){return function(t){return t?.value?.valueId===e}}},{key:"getSelectorItemIndex",value:function(e,t,n){const i=this.getSelectorGroup(e,t);if(!this.selectorGroupHasVariants(i))return;const r=this.getSelectorGroupVariants(i).findIndex(this.compareSelectorGroupValueIdWith(n));return r>-1?r:void 0}},{key:"getSelectorItemIndexes",value:function(e,t,n){const i=this.getSelectorGroupIndex(e,t);if(-1===i||void 0===i)return;const r=this.getSelectorItemIndex(e,i,n);return-1!==r&&void 0!==r?{groupIndex:i,itemIndex:r}:void 0}},{key:"getSelectorItem",value:function(e,t){const n=this.getSelectorItemIndexes(e,t.groupId,t.valueId);if(n){const t=this.getSelectorGroup(e,n.groupIndex);if(!this.selectorGroupHasVariants(t))return;return this.getSelectorGroupVariants(t)[n.itemIndex]}}},{key:"getDefaultSelectorItemSublime",value:function(e){if(e&&e.length&&this.selectorGroupHasVariants(e[0])){const t=e[0].id,n=e[0].description.values[0]?.value?.valueId;if(bo.stringsOfNumbers([t,n]))return{groupId:t,valueId:n}}}},{key:"updateSelectorItem",value:function(e,t,n,i){const r=this.getSelectorItemIndexes(e,t.groupId,t.valueId);void 0!==r&&(Object.keys(n).forEach(function(t){e[r.groupIndex].description.values[r.itemIndex][t]=n[t]}),Array.isArray(e[r.groupIndex].description.values[r.itemIndex].actions)&&e[r.groupIndex].description.values[r.itemIndex].actions.length&&Object.keys(uiProps).forEach(function(t){e[r.groupIndex].description.values[r.itemIndex][0][t]=i[t]}))}},{key:"uiOn",value:function(e,t){this.updateSelectorItem(e,t,{...this.UI_PROPS_DELTA_ON},{...this.UI_PROPS_DELTA_ON_ACTION})}},{key:"uiOff",value:function(e,t){this.updateSelectorItem(e,t,{...this.UI_PROPS_DELTA_OFF},{...this.UI_PROPS_DELTA_OFF_ACTION})}},{key:"syncUIWithValue",value:function(e,t){for(const n of e){const i=this.getSelectorGroupVariants(n);for(const r of i){const i={groupId:n.id,valueId:r.id};t(i)?this.uiOn(e,i):this.uiOff(e,i)}}return e}}])}();co(vu,"UI_PROPS_DELTA_ON",{class:"has-background-success"}),co(vu,"UI_PROPS_DELTA_OFF",{class:""}),co(vu,"UI_PROPS_DELTA_ON_ACTION",{title:"not-node:booleans_true",color:"success"}),co(vu,"UI_PROPS_DELTA_OFF_ACTION",{title:"not-node:booleans_false",color:"danger"});let gu=function(){return uo(function e(){io(this,e)},null,[{key:"countItemsInValue",value:function(e){return e?Object.values(e).reduce(function(e,t){return e+t.length},0):0}},{key:"initValue",value:function(e){return"object"==typeof e&&Object.values(e).every(this.groupItemsIsValid)?e:{}}},{key:"groupItemsIsValid",value:function(e){return!!Array.isArray(e)&&e.every(function(e){return bo.stringOrNumber(e)})}},{key:"itemInValue",value:function(e,t){return Object.hasOwn(e,t.groupId)&&e[t.groupId].includes(t.valueId)}},{key:"clearFromEmptyGroups",value:function(e){var t=this;Object.keys(e).forEach(function(n){t.groupIsEmpty(e[n])&&delete e[n]})}},{key:"groupIsEmpty",value:function(e){return!e||!Array.isArray(e)||0===e.length}},{key:"groupIsFull",value:function(e,t){return e.length===t?.variants?.length}},{key:"removeItemFromValue",value:function(e,t,n){n.atLeastOne&&1===this.countItemsInValue(e)||(e[t.groupId].splice(e[t.groupId].indexOf(t.valueId),1),this.clearFromEmptyGroups(e,n))}},{key:"addItemToValue",value:function(e,t,n){n.onlyOnePerGroup?e[t.groupId]=[t.valueId]:e[t.groupId]&&Array.isArray(e[t.groupId])?e[t.groupId].includes(t.valueId)||e[t.groupId].push(t.valueId):e[t.groupId]=[t.valueId]}},{key:"selectAll",value:function(e,t,n){var i=this;e.forEach(function(e){e.variants.forEach(function(r){i.addItemToValue(t,{valueId:r.id,groupId:e.id},n)})})}},{key:"selectNone",value:function(e,t,n){Object.keys(t).forEach(function(e){delete t[e]})}},{key:"selectAllInGroup",value:function(e,t,n,i){var r=this;if(!bo.stringOrNumber(n))return;const o=e.find(function(e){return e.id==n});o&&o.variants&&Array.isArray(o.variants)&&o.variants.forEach(function(e){r.addItemToValue(t,{groupId:n,valueId:e.id})})}},{key:"selectNoneInGroup",value:function(e,t,n,i){t[n]&&delete t[n]}},{key:"valueAsVariants",value:function(e,t){var n=this;const i={};return t.forEach(function(t){n.groupIsEmpty(t.id)||t.variants.forEach(function(r){n.itemInValue(e,{groupId:t.id,valueId:r.id})&&(Array.isArray(i[t.id])?i[t.id].push(r):i[t.id]=[r])})}),i}}])}(),pu=function(){return uo(function e(){io(this,e)},null,[{key:"countItemsInValue",value:function(e){return e&&bo.stringsOfNumbers([e.valueId,e.groupId])?1:0}},{key:"initValue",value:function(e){return e&&bo.stringsOfNumbers([e.valueId,e.groupId])?e:{valueId:void 0,groupId:void 0}}},{key:"itemInValue",value:function(e,t){return Object.hasOwn(e,"groupId")&&Object.hasOwn(e,"valueId")&&bo.stringsOfNumbers([e.valueId,e.groupId])&&e.groupId==t.groupId&&e.valueId==t.valueId}},{key:"removeItemFromValue",value:function(e,t,n){n.atLeastOne||e[t.groupId].splice(e[t.groupId].indexOf(t.valueId),1)}},{key:"addItemToValue",value:function(e,t){void 0===e&&(e=this.initValue()),e.valueId=t.valueId,e.groupId=t.groupId}},{key:"valueAsVariants",value:function(e,t){return this.countItemsInValue(e)?t.find(function(t){return t.id===e.groupId}).variants.find(function(t){return t.id===e.valueId}):{}}}])}(),mu=function(){return uo(function e(){io(this,e)},null,[{key:"behaviour",value:function(e){return e.multiple?gu:pu}},{key:"initValue",value:function(e,t){return this.behaviour(t).initValue(e)}},{key:"itemInValue",value:function(e,t,n){return this.behaviour(n).itemInValue(e,t,n)}},{key:"toggle",value:function(e,t,n){this.itemInValue(e,t,n)?this.removeItemFromValue(e,t,n):this.addItemToValue(e,t,n)}},{key:"removeItemFromValue",value:function(e,t,n){this.behaviour(n).removeItemFromValue(e,t,n)}},{key:"addItemToValue",value:function(e,t,n){this.behaviour(n).addItemToValue(e,t,n)}},{key:"selectAll",value:function(e,t,n){this.behaviour(n).selectAll(e,t,n)}},{key:"selectNone",value:function(e,t,n){this.behaviour(n).selectNone(e,t,n)}},{key:"selectAllInGroup",value:function(e,t,n,i){this.behaviour(i).selectAllInGroup(e,t,n,i)}},{key:"selectNoneInGroup",value:function(e,t,n,i){this.behaviour(i).selectNoneInGroup(e,t,n,i)}},{key:"valueAsVariants",value:function(e,t){return this.behaviour(options).valueAsVariants(e,t)}}])}();var yu=mi("<!> <!>",1);var bu=Object.freeze({__proto__:null,UIEndlessList:hu,UIEndlessListNavigation:uu,UIEndlessListSimpleItem:du,UIList:Ja,UIListBlock:Ga,UIListEmptyPlaceholder:xa,UIListItem:Ha,UIListSelect:function(e,t){Oe(t,!0);let n=yt(Ct([])),i=Gr(t,"fieldname",3,"list-select"),r=Gr(t,"multiple",3,!1),o=Gr(t,"atLeastOne",3,!0),s=Gr(t,"variants",19,()=>[]),a=Gr(t,"value",23,()=>[]),l=Gr(t,"selectedVariantsIds",23,()=>[]),u=Gr(t,"titleComponentProps",19,()=>({size:5})),c=Gr(t,"imageComponent",3,pl),d=Gr(t,"imageComponentProps",19,()=>({covered:!0})),f=Gr(t,"listComponent",3,Ja),h=Gr(t,"listComponentProps",19,()=>({actionsVisible:!0})),v=Gr(t,"sublimeValue",3,e=>e.id),g=Gr(t,"getItemIndex",3,(e,t)=>e.findIndex(e=>e.value.id===t)),p=Gr(t,"getItem",3,(e,{valueId:t})=>g()(e,t)>-1?e.find(e=>e.value.id===t):void 0),m=Gr(t,"getItemValue",3,(e,{valueId:t})=>{const n=p()(e,{valueId:t});return n?n.value:void 0}),y=Gr(t,"getDefaultItemSublime",3,e=>e&&e.length?e[0].id:void 0),b=Gr(t,"updateVariant",3,(e,t,n,i)=>{const r=g()(e,t);-1!==r&&(Object.keys(n).forEach(t=>{e[r][t]=n[t]}),Array.isArray(e[r].actions)&&e[r].actions.length&&Object.keys(i).forEach(t=>{e[r].actions[0][t]=i[t]}))}),k=Gr(t,"uiOn",3,(e,{valueId:t})=>{b()(e,t,{class:"has-background-success"},{title:"not-node:booleans_true",color:"success"})}),$=Gr(t,"uiOff",3,(e,{valueId:t})=>{b()(e,t,{class:""},{title:"not-node:booleans_false",color:"danger"})}),_=Gr(t,"extendVariantToItemList",3,e=>{const t={...e};return t.actions=[{title:"not-node:booleans_false",color:"danger",light:!0,action:S}],t}),w=zr(t,["$$slots","$$events","$$legacy","fieldname","multiple","atLeastOne","variants","value","selectedVariantsIds","titleComponentProps","imageComponent","imageComponentProps","listComponent","listComponentProps","sublimeValue","getItemIndex","getItem","getItemValue","getDefaultItemSublime","updateVariant","uiOn","uiOff","extendVariantToItemList","onchange"]);function I(){return Array.isArray(a())?l().length:0}Kr(()=>{$t(n,s().map(_()),!0),a()&&Array.isArray(a())?o()&&a().length&&a().forEach(e=>{C(A(e))}):function(){if(o()&&Hn(n).length>0){const e=y()(Hn(n));e&&S({id:e})}}()});const O=()=>!(o()&&1===I());function A(e){const t=v()(e);let n={on:void 0,off:void 0};return Array.isArray(l())||l([]),r()?l().includes(t)?O()&&(l().splice(l().indexOf(t),1),n.off={valueId:t}):(l().push(t),n.on={valueId:t}):o()?l().includes(t)||(I()>0&&(n.off={valueId:l().pop()}),n.on={valueId:t},l([t])):l().includes(t)?(n.off={valueId:t},l().splice(l().indexOf(t),1)):(n.on={valueId:t},l().push(t)),n}function S(e){C(A(e)),function(){let e=[];void 0!==l()&&Array.isArray(l())&&(e=l().filter(e=>void 0!==e).map(e=>m()(Hn(n),{valueId:e})));a(e)}(),t.onchange({field:i(),value:fe(a()),ids:fe(l())})}function C(e){e.off&&$()(Hn(n),e.off),e.on&&k()(Hn(n),e.on)}var E=bi();Wi(zt(E),f,(e,t)=>{t(e,Hr({get titleComponentProps(){return u()},get imageComponent(){return c()},get imageComponentProps(){return d()}},()=>w,h,{get items(){return Hn(n)}}))}),ki(e,E),Ae()},UIListSelectButtonsWithGroups:function(e,t){Oe(t,!0);let n=Gr(t,"onchange",3,()=>!0),i=Gr(t,"fieldname",3,"list-select-tags"),r=Gr(t,"variants",19,()=>[]),o=Gr(t,"variantsSelected",23,()=>({})),s=Gr(t,"value",7),a=Gr(t,"behaviourUI",3,vu),l=Gr(t,"behaviourValue",3,mu),u=Gr(t,"multiple",3,!0),c=Gr(t,"onlyOnePerGroup",3,!0),d=Gr(t,"atLeastOne",3,!0),f=Gr(t,"titleComponent",3,Ta),h=Gr(t,"titleComponentProps",19,()=>({size:5})),v=Gr(t,"imageComponent",3,pl),g=Gr(t,"imageComponentProps",19,()=>({covered:!0})),p=Gr(t,"descriptionComponent",3,Ns),m=Gr(t,"descriptionComponentProps",19,()=>({})),y=Gr(t,"listComponent",3,Ja),b=Gr(t,"listComponentProps",19,()=>({})),k=Gr(t,"actionsList",19,()=>["selectAll","selectNone"]);const $={selectAll:{title:"Выбрать все",color:"success",action(){S()}},selectNone:{title:"Снять выделение со всех",color:"",action(){C()}}};let _=yt(Ct([])),w=yt(Ct([]));function I(){$t(w,a().syncUIWithValue(Hn(w),e=>l().itemInValue(s(),e,{multiple:u(),onlyOnePerGroup:c(),atLeastOne:d()})),!0)}const O=()=>l().valueAsVariants(s(),r());function A(){o(O()),n()({field:i(),value:s()})}Kr(()=>{k().forEach(e=>{Object.hasOwn($,e)&&Hn(_).push($[e])}),$t(_,Hn(_),!0),$t(w,a().buildSelectorItemsFromVariants(r()),!0),s(l().initValue(s(),{multiple:u()})),I()});const S=()=>{l().selectAll(r(),s(),{multiple:u(),onlyOnePerGroup:c(),atLeastOne:d()}),I(),A()},C=()=>{l().selectNone(r(),s(),{multiple:u(),onlyOnePerGroup:c(),atLeastOne:d()}),I(),A()},E=e=>{l().toggle(s(),e,{multiple:u(),onlyOnePerGroup:c(),atLeastOne:d()}),I(),A()};var L={valueAsVariants:O,selectAll:S,selectNone:C,selectAllInGroup:e=>{l().selectAllInGroup(r(),s(),e,{multiple:u(),onlyOnePerGroup:c(),atLeastOne:d()}),I(),A()},selectNoneInGroup:e=>{behaviour.selectNoneInGroup(r(),s(),e,{multiple:u(),onlyOnePerGroup:c(),atLeastOne:d()}),I(),A()},toggleItem:E},T=yu(),x=zt(T);Cs(x,{get values(){return Hn(_)},centered:!0});var N=Wt(x,2);{let e=at(()=>({action(e,t){E(t)},...m()}));Wi(N,y,(t,n)=>{n(t,Hr(b,{get titleComponent(){return f()},get titleComponentProps(){return h()},get descriptionComponent(){return p()},get descriptionComponentProps(){return Hn(e)},get imageComponent(){return v()},get imageComponentProps(){return g()},get items(){return Hn(w)}}))})}return ki(e,T),Ae(L)},UIListSelectWithGroups:function(e,t){Oe(t,!0);let n=yt(Ct([])),i=Gr(t,"onchange",3,()=>!0),r=Gr(t,"fieldname",3,"list-select-tags"),o=Gr(t,"variants",19,()=>[]),s=Gr(t,"variantsSelected",23,()=>({})),a=Gr(t,"value",7),l=Gr(t,"behaviourUI",3,vu),u=Gr(t,"behaviourValue",3,mu),c=Gr(t,"multiple",3,!1),d=Gr(t,"onlyOnePerGroup",3,!0),f=Gr(t,"atLeastOne",3,!0),h=Gr(t,"titleComponent",3,Ta),v=Gr(t,"titleComponentProps",19,()=>({size:5})),g=Gr(t,"imageComponent",3,pl),p=Gr(t,"imageComponentProps",19,()=>({covered:!0})),m=Gr(t,"descriptionComponent",3,Cs),y=Gr(t,"descriptionComponentProps",19,()=>({})),b=Gr(t,"listComponent",3,Ja),k=Gr(t,"listComponentProps",19,()=>({}));function $(){$t(n,l().syncUIWithValue(Hn(n),e=>u().itemInValue(a(),e,{multiple:c(),onlyOnePerGroup:d(),atLeastOne:f()})),!0)}Kr(()=>{$t(n,l().buildSelectorItemsFromVariants(o()),!0),a(u().initValue(a(),{multiple:c(),onlyOnePerGroup:d(),atLeastOne:f()})),$()});const _=()=>u().valueAsVariants(a(),o()),w=e=>{u().toggle(a(),e,{multiple:c(),onlyOnePerGroup:d(),atLeastOne:f()}),$(),s(_()),i()({field:r(),value:a()})};var I={valueAsVariants:_,toggleItem:w},O=bi(),A=zt(O);{let e=at(()=>({action(e,t){w(t)},...y()}));Wi(A,b,(t,i)=>{i(t,Hr(k,{get titleComponent(){return h()},get titleComponentProps(){return v()},get descriptionComponent(){return m()},get descriptionComponentProps(){return Hn(e)},get imageComponent(){return g()},get imageComponentProps(){return p()},get items(){return Hn(n)}}))})}return ki(e,O),Ae(I)}}),ku=mi("<div><!> <!></div>");function $u(e,t){Oe(t,!0);let n=yt("");let i=Gr(t,"closeButton",3,!1),r=Gr(t,"closeButtonProps",3,{class:"is-absolute is-sided-right is-sided-top",style:"--siding-right-size: 2rem; --siding-top-size: 2rem",size:"normal"}),o=Gr(t,"show",7,!0),s=Gr(t,"closeOnClick",3,!0),a=Gr(t,"layer",3,1),l=Gr(t,"class",3,""),u=Gr(t,"onreject",3,()=>!1),c=Gr(t,"zIndexStep",3,1e3),d=Gr(t,"role",3,"button"),h=Gr(t,"tabIndex",3,"0");function v(e){s()&&function(e){try{if(e&&e.originalTarget){const t=e.originalTarget;t.classList&&t.classList.contains("is-overlay")&&p()}}catch{}}(e)}function g(){p()}function p(e={}){o(!1),u()(e)}Kr(()=>{$t(n,document.body.style.overflow,!0),o()?document.body.style.overflow="hidden":document.body.style.overflow=Hn(n)}),Jr(()=>{document.body.style.overflow=Hn(n)});var m=bi(),y=zt(m),b=e=>{var n=ku();n.__click=v,n.__keyup=v;var o=Vt(n),s=e=>{As(e,Hr(r,{onclick:g}))};Li(o,e=>{i()&&e(s)}),zi(Wt(o,2),()=>t.children??f),ne(n),on(()=>{Qi(n,1,`is-overlay not-overlay ${l()??""}`),lr(n,"role",d()),lr(n,"tabindex",h()),Xi(n,`z-index: ${c()*a()};`)}),$r(3,n,()=>Hs),ki(e,n)};Li(y,e=>{o()&&e(b)}),ki(e,m),Ae()}fi(["click","keyup"]);var _u=mi("<!> <!> <!> <!>",1),wu=mi("<!> <!> <!>",1);var Iu=mi("<!> <!> <!>",1);function Ou(e,t){Oe(t,!0);const[n,i]=Rr();let r=Gr(t,"show",3,!0),o=Gr(t,"showSearch",3,!0),s=Gr(t,"term",15,""),a=Gr(t,"size",3,"narrow"),l=Gr(t,"inputComponent",3,Bl),u=Gr(t,"inputComponentProps",19,()=>({})),c=Gr(t,"outputComponent",3,hu),d=Gr(t,"outputComponentProps",19,()=>({})),f=Gr(t,"buttonsProps",19,()=>({centered:!0,class:"mt-5"})),h=Gr(t,"rejectButtonProps",19,()=>({})),v=Gr(t,"results",31,()=>Ct({list:[],page:0,pages:0,skip:0,count:0}));const g=[{title:Dr(Lo,"$LOCALE",n)["not-node:button_cancel_label"],action:t.onreject,...h()}];$u(e,{get onreject(){return t.onreject},get show(){return r()},closeOnClick:!0,closeButton:!1,children:(e,n)=>{wo(e,{get class(){return`modal-selector ${a()??""}`},children:(e,n)=>{var i=Iu(),r=zt(i),a=e=>{var n=bi();Wi(zt(n),l,(e,n)=>{n(e,Hr({get onchange(){return t.onchange}},u,{get term(){return s()},set term(e){s(e)}}))}),ki(e,n)};Li(r,e=>{o()&&e(a)});var h=Wt(r,2);Wi(h,c,(e,n)=>{n(e,Hr({get onprev(){return t.onprev},get onnext(){return t.onnext},get onselect(){return t.onresolve},class:"has-height-up-to-60 overflow-scroll"},d,{get itemRenderer(){return t.itemRenderer},get data(){return v()},set data(e){v(e)}}))}),Cs(Wt(h,2),Hr(f,{get values(){return g}})),ki(e,i)},$$slots:{default:!0}})},$$slots:{default:!0}}),Ae(),i()}var Au=Object.freeze({__proto__:null,UIGenericSelector:Ou,UIModal:function(e,t){const n=(e,t)=>{let n=lt(()=>function(e,t,n=!1){return void 0===e?n?t():t:e}(t?.(),""));{let t=at(()=>g()||Hn(n)),i=at(()=>o()?[o()]:[]),r=at(()=>s()?[s()]:[]);Ls(e,{get class(){return Hn(t)},get left(){return Hn(i)},get right(){return Hn(r)}})}};let i=Gr(t,"buttonsPosition",3,"bottom"),r=Gr(t,"fullscreen",3,!1),o=Gr(t,"closeButton",3,!1),s=Gr(t,"applyButton",3,!1),a=Gr(t,"titleSize",3,2),l=Gr(t,"show",3,!1),u=Gr(t,"loading",3,!1),c=Gr(t,"title",3,"Modal window"),d=Gr(t,"subtitle",3,""),h=Gr(t,"class",3,""),v=Gr(t,"overlayClass",3,""),g=Gr(t,"buttonsClass",3,""),p=Gr(t,"WAITING_TEXT",3,"Обработка");$u(e,{get show(){return l()},closeOnClick:!1,closeButton:!1,get class(){return v()},children:(e,o)=>{{let o=at(()=>`${h()} ${r()?"is-fullscreen":""}`);wo(e,{get class(){return Hn(o)},children:(e,o)=>{var s=wu(),l=zt(s),h=e=>{n(e,()=>"")};Li(l,e=>{"top"===i()&&e(h)});var v=Wt(l,2);Ta(v,{get size(){return a()},get title(){return c()},get subtitle(){return d()}}),Oo(Wt(v,2),{children:(e,o)=>{var s=_u(),a=zt(s);fs(a,{size:"page",get loading(){return u()},get title(){return p()}});var l=Wt(a,2),c=e=>{n(e,()=>"")};Li(l,e=>{"topOfContent"===i()&&e(c)});var d=Wt(l,2);zi(d,()=>t.children??f);var h=Wt(d,2),v=e=>{n(e,()=>"is-mobile "+(r()?"is-footer":""))};Li(h,e=>{"bottom"===i()&&e(v)}),ki(e,s)},$$slots:{default:!0}}),ki(e,s)},$$slots:{default:!0}})}},$$slots:{default:!0}})},UIOverlay:$u}),Su=mi("<div><!></div>");function Cu(e,t){Oe(t,!0);let n=Gr(t,"classPrefix",3,"navbar-brand"),i=Gr(t,"class",3,""),r=zr(t,["$$slots","$$events","$$legacy","classPrefix","class","children"]);var o=Su();ur(o,e=>({class:e,...r}),[()=>[n(),i()].join(" ")]),zi(Vt(o),()=>t.children??f),ne(o),ki(e,o),Ae()}var Eu=mi("<span> </span>"),Lu=mi('<a aria-label="brand"><!> <!></a>');function Tu(e,t){Oe(t,!0);let n=Gr(t,"url",3,"/"),i=Gr(t,"title",3,""),r=Gr(t,"icon",19,()=>({src:"https://placehold.co/56x56.png",width:56,height:56})),o=Gr(t,"classPrefix",3,"navbar-item"),s=Gr(t,"titleClass",3,"navbar-item-brand-title"),a=Gr(t,"class",3,"");var l=Lu(),u=Vt(l),c=e=>{Ql(e,Hr(r))};Li(u,e=>{r()&&e(c)});var d=Wt(u,2),f=e=>{var t=Eu(),n=Vt(t,!0);ne(t),on(()=>{Qi(t,1,Gi(s())),wi(n,i())}),ki(e,t)};Li(d,e=>{i()&&e(f)}),ne(l),on(e=>{Qi(l,1,e),lr(l,"href",n())},[()=>Gi([o(),a()].join(" "))]),ki(e,l),Ae()}var xu=mi("<!> <!>",1);function Nu(e,t){Cu(e,{children:(e,n)=>{var i=xu(),r=zt(i);Tu(r,Hr(()=>t.brand)),zi(Wt(r,2),()=>t.children??f),ki(e,i)},$$slots:{default:!0}})}function Fu(e,t){Oe(t,!0);let n=Gr(t,"classPrefix",3,"navbar-item"),i=Gr(t,"class",3,""),r=Gr(t,"target",3,"_self"),o=zr(t,["$$slots","$$events","$$legacy","classPrefix","class","children","target"]);{let s=at(()=>[n(),i()].join(" "));Da(e,Hr({get class(){return Hn(s)},get target(){return r()}},()=>o,{children:(e,n)=>{var i=bi();zi(zt(i),()=>t.children??f),ki(e,i)},$$slots:{default:!0}}))}Ae()}var Uu=mi("<div><!></div>");fi(["click","keyup"]);var Pu=mi("<!> <!> <!>",1);function Mu(e,t){Oe(t,!0);const[n,i]=Rr();var r=bi(),o=zt(r),s=e=>{var i=Pu(),r=zt(i),o=e=>{Ql(e,Hr(()=>t.item.icon))},s=e=>{var i=bi(),r=zt(i),o=e=>{const n=at(()=>Sa.get(t.item.component));var i=bi();Wi(zt(i),()=>Hn(n),(e,n)=>{n(e,Hr({get id(){return t.item.id}},()=>t.item.props))}),ki(e,i)},s=e=>{var i=yi();on(()=>wi(i,Dr(Lo,"$LOCALE",n)[t.item.title])),ki(e,i)};Li(r,e=>{"component"===t.item.type&&t.item.component&&Sa.contains(t.item.component)?e(o):e(s,!1)},!0),ki(e,i)};Li(r,e=>{t.item.icon?e(o):e(s,!1)});var a=Wt(r,2),l=e=>{ts(e,Hr({top:!0,right:!0,size:"small",get id(){return t.item.id}},()=>t.item.tag))};Li(a,e=>{t.item.tag&&e(l)});var u=Wt(a,2),c=e=>{us(e,Hr({get id(){return t.item.id}},()=>t.item.indicator))};Li(u,e=>{t.item.indicator&&e(c)}),ki(e,i)},a=e=>{var n=bi();zi(zt(n),()=>t.children??f),ki(e,n)};Li(o,e=>{t.item?e(s):e(a,!1)}),ki(e,r),Ae(),i()}var Du=mi("<hr/>");function Ru(e,t){let n=Gr(t,"classPrefix",3,"navbar-divider");var i=Du();on(()=>Qi(i,1,`${n()??""} ${t.hidden?`is-hidden-${t.hidden}`:""}`)),ki(e,i)}function ju(e,t){Oe(t,!0),Gr(t,"class",3,"");var n=bi(),i=zt(n),r=e=>{Ru(e,Hr(()=>t.item))},o=e=>{var n=bi(),i=zt(n),r=e=>{Fu(e,Hr({button:!1},()=>t.item,{children:(e,n)=>{var i=bi();zi(zt(i),()=>t.children??f),ki(e,i)},$$slots:{default:!0}}))},o=e=>{!function(e,t){Oe(t,!0);let n=Gr(t,"id",3,""),i=Gr(t,"classPrefix",3,"navbar-item"),r=Gr(t,"hidden",3,""),o=Gr(t,"class",3,""),s=Gr(t,"role",3,"button"),a=Gr(t,"tabIndex",3,0);const l=t.onkeyup??(t.onclick?bo.onlyOnEnter(t.onclick):void 0);var u=Uu();u.__click=function(...e){t.onclick?.apply(this,e)},u.__keyup=l,zi(Vt(u),()=>t.children??f),ne(u),on(e=>{lr(u,"id",n()),Qi(u,1,e),lr(u,"role",s()),lr(u,"tabindex",a())},[()=>Gi([i(),r()?`is-hidden-${r()}`:"",o()].join(" "))]),ki(e,u),Ae()}(e,{get item(){return t.item},children:(e,n)=>{Mu(e,{get item(){return t.item}})},$$slots:{default:!0}})};Li(i,e=>{"string"==typeof t.item.href?e(r):e(o,!1)},!0),ki(e,n)};Li(i,e=>{t.item.break?e(r):e(o,!1)}),ki(e,n),Ae()}var Vu=mi("<div><!> <div><!></div></div>");var zu=mi('<a class="navbar-link"> </a>');function Wu(e,t){Oe(t,!0);const[n,i]=Rr();let r=zr(t,["$$slots","$$events","$$legacy","item","label"]);var o=bi(),s=zt(o),a=e=>{var i=zu(),r=Vt(i,!0);ne(i),on(()=>wi(r,Dr(Lo,"$LOCALE",n)[t.item.title||t.label])),ki(e,i)},l=e=>{var n=bi(),i=zt(n),o=e=>{Mu(e,Hr(()=>r,{children:(e,n)=>{ie();var i=yi();on(()=>wi(i,t.label)),ki(e,i)},$$slots:{default:!0}}))},s=e=>{var n=bi(),i=zt(n),r=e=>{qu(e,{get item(){return t.item}})},o=e=>{var n=bi(),i=zt(n),r=e=>{var n=bi();zi(zt(n),()=>t.label??f),ki(e,n)};Li(i,e=>{"function"==typeof t.label&&e(r)},!0),ki(e,n)};Li(i,e=>{"object"==typeof t.item?e(r):e(o,!1)},!0),ki(e,n)};Li(i,e=>{"string"==typeof t.label?e(o):e(s,!1)},!0),ki(e,n)};Li(s,e=>{t.arrowless?e(l,!1):e(a)}),ki(e,o),Ae(),i()}function Bu(e,t){Oe(t,!0);let n=Gr(t,"root",3,""),i=Gr(t,"onclick",3,()=>{}),r=Gr(t,"hidden",3,""),o=Gr(t,"hoverable",3,!0),s=Gr(t,"arrowless",3,!1),a=Gr(t,"dropUp",3,!1);Gr(t,"right",3,!1);let l=Gr(t,"boxed",3,!1);var u=bi(),c=zt(u),d=e=>{{const u=(e,n=f)=>{{let i=at(()=>({...t.item,items:null}));Wu(e,Hr(n,{get item(){return Hn(i)}}))}},c=(e,n=f)=>{!function(e,t){Oe(t,!0);var n=bi(),i=zt(n),r=e=>{var n=bi();Fi(zt(n),17,()=>t.items,e=>e.id,(e,t)=>{ju(e,{get item(){return Hn(t)}})}),ki(e,n)},o=e=>{var n=bi();zi(zt(n),()=>t.children??f),ki(e,n)};Li(i,e=>{t.items&&t.items.length?e(r):e(o,!1)}),ki(e,n),Ae()}(e,Hr(n,{get items(){return t.item.items}}))};!function(e,t){Oe(t,!0);let n=Gr(t,"hoverable",3,!0),i=Gr(t,"dropUp",3,!1),r=Gr(t,"boxed",3,!1),o=Gr(t,"root",7,"/"),s=Gr(t,"onclick",7);Kr(()=>{Ie("root")&&o(_e("root")),Ie("onclick")&&s(_e("onclick"))});var a=Vu();let l;var u=Vt(a);zi(u,()=>t.label??f,()=>({root:o(),onclick:s()}));var c=Wt(u,2);let d;zi(Vt(c),()=>t.items??f,()=>({root:o(),onclick:s()})),ne(c),ne(a),on(()=>{l=Qi(a,1,"navbar-item has-dropdown",null,l,{"is-hoverable":n()}),d=Qi(c,1,"navbar-dropdown",null,d,{"is-boxed":r(),"has-dropdown-up":i()})}),ki(e,a),Ae()}(e,{get hoverable(){return o()},get hidden(){return r()},get arrowless(){return s()},get dropUp(){return a()},get boxed(){return l()},get root(){return n()},get onclick(){return i()},label:u,items:c,children:(e,n)=>{on(()=>{console.log({item:fe(t.item)})})},$$slots:{label:!0,items:!0,default:!0}})}};Li(c,e=>{t.item&&Object.hasOwn(t.item,"items")&&Array.isArray(t.item.items)&&t.item.items.length&&e(d)}),ki(e,u),Ae()}function qu(e,t){Oe(t,!0);let n=zr(t,["$$slots","$$events","$$legacy","item"]);var i=bi(),r=zt(i),o=e=>{Bu(e,Hr({get renderer(){return ju},get item(){return t.item}},()=>n))},s=e=>{ju(e,Hr({get item(){return t.item}},()=>n))};Li(r,e=>{Object.hasOwn(t.item,"items")&&Array.isArray(t.item.items)&&t.item.items.length?e(o):e(s,!1)}),ki(e,i),Ae()}var Hu=mi("<div><!></div>");function Gu(e,t){Oe(t,!0);let n=Gr(t,"classPrefix",3,"navbar-menu"),i=Gr(t,"class",3,""),r=zr(t,["$$slots","$$events","$$legacy","id","active","classPrefix","class","children"]),o=at(()=>[n(),i()].join(" "));var s=Hu();ur(s,()=>({id:t.id,class:Hn(o),...r,[nr]:{"is-active":t.active}})),zi(Vt(s),()=>t.children??f),ne(s),ki(e,s),Ae()}var Ku=mi("<div><!></div>");function Ju(e,t){let n=Gr(t,"class",3,""),i=zr(t,["$$slots","$$events","$$legacy","class","children"]);var r=Ku();ur(r,()=>({class:"navbar-start "+n(),...i})),zi(Vt(r),()=>t.children??f),ne(r),ki(e,r)}var Yu=mi("<div><!></div>");function Qu(e,t){let n=Gr(t,"class",3,""),i=zr(t,["$$slots","$$events","$$legacy","class","children"]);var r=Yu();ur(r,()=>({class:"navbar-end "+n(),...i})),zi(Vt(r),()=>t.children??f),ne(r),ki(e,r)}var Zu=mi("<!> <!>",1);function Xu(e,t){Oe(t,!0);let n=Gr(t,"id",7),i=Gr(t,"sections",19,()=>[]),r=Gr(t,"items",19,()=>[]),o=Gr(t,"root",7),s=Gr(t,"onclick",7);Gr(t,"class",3,"");let a={},l={};function u(e,t){return!(!Array.isArray(e)||!e.includes(t))||"string"==typeof e&&e===t}Kr(()=>{Ie("navbarId")&&n(_e("navbarId")),Ie("root")&&o(_e("root")),Ie("onclick")&&s(_e("onclick"));for(let e of i())l[e.id]=r().filter(t=>t.section===e.id),a[e.id]=r().filter(t=>t.section===e.id).length}),Gu(e,{get id(){return n()},get active(){return t.active},children:(e,t)=>{var n=Zu(),l=zt(n);Ju(l,{children:(e,t)=>{var n=bi();Fi(zt(n),17,r,e=>e.id,(e,t)=>{var n=bi(),i=zt(n),r=e=>{qu(e,{hidden:"touch",get root(){return o()},get item(){return Hn(t)},get onclick(){return s()}})};Li(i,e=>{u(Hn(t).place,"start")&&e(r)}),ki(e,n)}),ki(e,n)},$$slots:{default:!0}}),Qu(Wt(l,2),{children:(e,t)=>{var n=bi();Fi(zt(n),17,i,e=>e.id,(e,t)=>{var n=bi(),i=zt(n),r=e=>{const n=at(()=>a[Hn(t).id]||Hn(t).indicator||Hn(t).href||Hn(t).tag);var i=bi(),r=zt(i),l=e=>{qu(e,{hidden:"touch",get root(){return o()},item:item,get onclick(){return s()}})};Li(r,e=>{Hn(n)&&e(l)}),ki(e,i)};Li(i,e=>{u(Hn(t).place,"end")&&e(r)}),ki(e,n)}),ki(e,n)},$$slots:{default:!0}}),ki(e,n)},$$slots:{default:!0}}),Ae()}var ec=mi('<a><span aria-hidden="true"></span> <span aria-hidden="true"></span> <span aria-hidden="true"></span> <span aria-hidden="true"></span></a>');function tc(e,t){Oe(t,!0);let n=Gr(t,"role",3,"button"),i=Gr(t,"classPrefix",3,"navbar-burger"),r=Gr(t,"ariaLabel",3,"menu"),o=Gr(t,"ariaExpanded",3,"false"),s=Gr(t,"dataTarget",7,"navbarBasicExample"),a=Gr(t,"class",3,""),l=Gr(t,"onclick",3,()=>{console.log("click")});Kr(()=>{Ie("navbarId")&&s(_e("navbarId"))});var u=ec();let c;u.__click=function(...e){l()?.apply(this,e)},on(e=>{c=Qi(u,1,e,null,c,{"is-active":t.active}),lr(u,"role",n()),lr(u,"aria-label",r()),lr(u,"aria-expanded",o()),lr(u,"data-target",s())},[()=>Gi([i(),a()].join(" "))]),ki(e,u),Ae()}fi(["click"]);var nc=mi("<nav><!></nav>");function ic(e,t){Oe(t,!0);let n=Gr(t,"class",3,""),i=Gr(t,"classPrefix",3,"navbar"),r=Gr(t,"role",3,"navigation"),o=Gr(t,"ariaLabel",3,"main navigation"),s=zr(t,["$$slots","$$events","$$legacy","class","classPrefix","role","ariaLabel","children"]);var a=nc();ur(a,e=>({class:e,role:r(),"aria-label":o(),...s}),[()=>[i(),n()].join(" ")]),zi(Vt(a),()=>t.children??f),ne(a),ki(e,a),Ae()}var rc=mi("<!> <!>",1);var oc=mi("<a><!></a>");var sc=Object.freeze({__proto__:null,UINavbar:function(e,t){Oe(t,!0);let n=Gr(t,"id",3,"navbar"),i=Gr(t,"active",7,!1),r=Gr(t,"sections",19,()=>[]),o=Gr(t,"items",19,()=>[]),s=Gr(t,"root",3,""),a=Gr(t,"navigate",3,null),l=Gr(t,"burgerControlsSidemenu",3,!0),u=Gr(t,"class",3,""),c=Gr(t,"onclick",3,()=>{});function d(){i(!i())}Kr(()=>{we("root",s()),we("navigate",a()),we("burgerControlsSidemenu",l()),we("navbarId",n()),we("onclick",c())}),ic(e,{get class(){return u()},children:(e,n)=>{var s=rc(),a=zt(s),l=e=>{Nu(e,{get brand(){return t.brand},children:(e,t)=>{tc(e,{get active(){return i()},onclick:d})}})},u=e=>{tc(e,{get active(){return i()},onclick:d})};Li(a,e=>{t.brand?e(l):e(u,!1)}),Xu(Wt(a,2),{get active(){return i()},get sections(){return r()},get items(){return o()}}),ki(e,s)},$$slots:{default:!0}}),Ae()},UINavbarBrand:Nu,UINavbarBrandItem:Tu,UINavbarBrandWrapper:Cu,UINavbarBurger:tc,UINavbarItemDevider:Ru,UINavbarItemGeneric:qu,UINavbarItemLink:Fu,UINavbarLink:function(e,t){Oe(t,!0);let n=Gr(t,"classPrefix",3,"navbar-link"),i=Gr(t,"class",3,""),r=zr(t,["$$slots","$$events","$$legacy","classPrefix","class","children","selected"]);var o=oc();ur(o,e=>({class:e,...r,[nr]:{"is-selected":t.selected}}),[()=>[n(),i()].join(" ")]),zi(Vt(o),()=>t.children??f),ne(o),ki(e,o),Ae()},UINavbarMenu:Xu,UINavbarMenuEnd:Qu,UINavbarMenuStart:Ju,UINavbarMenuWrapper:Gu,UINavbarWrapper:ic}),ac=mi("<p> </p>"),lc=mi("<p> </p>"),uc=mi('<article><div class="message-header"><!></div> <div class="message-body"><!></div></article>');function cc(e,t){Oe(t,!0);const n=()=>Dr(Lo,"$LOCALE",i),[i,r]=Rr();let o=Gr(t,"class",3,"");var s=uc(),a=Vt(s),l=Vt(a),u=e=>{var n=bi();zi(zt(n),()=>t.titleSnip,()=>t.title),ki(e,n)},c=e=>{var i=ac(),r=Vt(i,!0);ne(i),on(()=>wi(r,n()[t.title])),ki(e,i)};Li(l,e=>{t.titleSnip?e(u):e(c,!1)}),ne(a);var d=Wt(a,2),f=Vt(d),h=e=>{var n=bi();zi(zt(n),()=>t.messageSnip,()=>t.message),ki(e,n)},v=e=>{var i=lc(),r=Vt(i,!0);ne(i),on(()=>wi(r,n()[t.message])),ki(e,i)};Li(f,e=>{t.messageSnip?e(h):e(v,!1)}),ne(d),ne(s),on(()=>Qi(s,1,`message ${o()??""} ${t.color?`is-${t.color}`:""}`)),ki(e,s),Ae(),r()}function dc(e,t){Oe(t,!0);let n=Gr(t,"class",19,()=>bo.CLASS_ERR),i=zr(t,["$$slots","$$events","$$legacy","class"]);cc(e,Hr(()=>i,{get class(){return n()}})),Ae()}function fc(e,t){Oe(t,!0);let n=Gr(t,"class",19,()=>bo.CLASS_OK),i=zr(t,["$$slots","$$events","$$legacy","class"]);cc(e,Hr(()=>i,{get class(){return n()}})),Ae()}var hc=mi("<div><p> </p> <!></div>");var vc=Object.freeze({__proto__:null,UICookieNotification:function(e,t){Oe(t,!0);const n=()=>Dr(Lo,"$LOCALE",i),[i,r]=Rr();let o=Gr(t,"show",15,!1),s=Gr(t,"message",3,"Для улучшения работы сайта и его взаимодействия с пользователями мы используем файлы cookie. Продолжая работу с сайтом, Вы разрешаете использование cookie-файлов. Вы всегда можете отключить файлы cookie в настройках Вашего браузера."),a=Gr(t,"agree",3,"Хорошо"),l=Gr(t,"cooldown",3,31536e6),u=Gr(t,"lsKey",3,"cookie_date"),c=Gr(t,"id",3,"cookie_notification");function d(){localStorage.setItem(u(),Date.now()),o(!1)}Kr(()=>{let e=localStorage.getItem(u());(!e||+e+l()<Date.now())&&o(!0)});var f=bi(),h=zt(f),v=e=>{var t=hc(),i=Vt(t),r=Vt(i,!0);ne(i),Is(Wt(i,2),{onclick:d,color:"success",class:"cookie_accept",children:(e,t)=>{ie();var i=yi();on(()=>wi(i,n()[a()])),ki(e,i)},$$slots:{default:!0}}),ne(t),on(()=>{lr(t,"id",c()),wi(r,n()[s()])}),ki(e,t)};Li(h,e=>{o()&&e(v)}),ki(e,f),Ae(),r()},UIError:dc,UIMessage:cc,UISuccess:fc}),gc=Object.freeze({__proto__:null,Blocks:Co,Buttons:Fs,Forms:ou,Icons:Zl,Images:au,Inputs:Fl,Layouts:sl,Links:lu,Lists:bu,Modals:Au,Navigations:sc,Notifications:vc,UICommon:bo,Various:ql});const pc=Symbol("init"),mc=Symbol("data"),yc=Symbol("working"),bc=Symbol("options");let kc=function(e){function t(e){var n;return io(this,t),(n=to(this,t))[mc]={},n[yc]={},n[bc]={},n[pc](e),go(n,n)}return ho(t,e),uo(t,[{key:pc,value:function(e){e||(e={}),Object.hasOwn(e,"data")&&this.setData(e.data),Object.hasOwn(e,"working")&&this.setWorking(e.working),Object.hasOwn(e,"options")&&this.setOptions(e.options),this.log=Jo.genLogMsg(this.getWorking("name")),this.info=this.log,this.debug=Jo.genLogDebug(this.getWorking("name")),this.error=Jo.genLogError(this.getWorking("name"))}},{key:"setCommon",value:function(e,t){switch(t.length){case 1:e=t[0];break;case 2:Wo.set(t[0],e,void 0,t[1])}return this}},{key:"getCommon",value:function(e,t){switch(t.length){case 1:return Wo.get(t[0],e);case 2:{let n=Wo.get(t[0],e);return void 0===n?t[1]:n}default:return e}}},{key:"setData",value:function(){return 1===arguments.length?this[mc]=arguments[0]:this.setCommon(this.getData(),arguments),this.emit("change"),this}},{key:"getData",value:function(){return this.getCommon(this[mc],arguments)}},{key:"setOptions",value:function(){return 1===arguments.length?this[bc]=arguments[0]:this.setCommon(this.getOptions(),arguments),this}},{key:"getOptions",value:function(){return this.getCommon(this[bc],arguments)}},{key:"setWorking",value:function(){return 1===arguments.length?this[yc]=arguments[0]:this.setCommon(this.getWorking(),arguments),this}},{key:"getWorking",value:function(){return this.getCommon(this[yc],arguments)}},{key:"report",value:function(e){Jo.report&&Jo.report(e)}},{key:"getApp",value:function(){return Jo.getApp()}},{key:"destroy",value:function(){this.removeEvent(),this.setOptions(null),this.setWorking(null),this.setData(null),this.emit("destroy")}}])}(jo);const $c=Symbol("history"),_c=Symbol("hash");let wc=function(e){function t(){var e;return io(this,t),co(e=to(this,t,[{working:{routes:[],mode:$c,root:"/",initialized:!1,delays:Il,delay_default:Ol}}]),"host",""),go(e,e)}return ho(t,e),uo(t,[{key:"setDelays",value:function(e){return this.setWorking("delays",e),this}},{key:"setDefaultNavigationDelay",value:function(e){return this.setWorking("delay_default",this.delayAsMs(e)),this}},{key:"getDefaultNavigationDelay",value:function(){return this.getWorking("delay_default",Ol)}},{key:"delayAsMs",value:function(e){return"number"==typeof e?e:"string"==typeof e&&e.length>0?this.getWorking(`delays.${e}`,this.getDefaultNavigationDelay()):this.getDefaultNavigationDelay()}},{key:"navigateWithDelay",value:function(e,t,n){var i=this;return setTimeout(function(){"function"==typeof n&&n(),i.navigate(e)},this.delayAsMs(t))}},{key:"history",value:function(){this.setWorking("mode",$c)}},{key:"hash",value:function(){this.setWorking("mode",_c)}},{key:"setRoot",value:function(e){return this.setWorking("root",e&&"/"!==e?"/"+this.clearSlashes(e)+"/":"/"),this}},{key:"clearSlashes",value:function(e){return e.toString().replace(/\/$/,"").replace(/^\//,"")}},{key:"add",value:function(e,t){"function"==typeof e&&(t=e,e="");let n={re:e,handler:t};return this.getWorking("routes").push(n),this}},{key:"addList",value:function(e){for(let t in e)this.add(t,e[t]);return this}},{key:"remove",value:function(e){for(var t,n=0;this.getWorking("routes").length,t=this.getWorking("routes")[n];n++)if(t.handler===e||t.re===e)return this.getWorking("routes").splice(n,1),this;return this}},{key:"flush",value:function(){return this.setWorking({routes:[],mode:$c,root:"/"}),this}},{key:"isInitialized",value:function(){return this.getWorking("initialized")}},{key:"setInitialized",value:function(e=!0){return this.setWorking("initialized",e)}},{key:"getFragment",value:function(){var e="";if(this.getWorking("mode")===$c){if(!location)return"";e=(e=this.clearSlashes(decodeURI(location.pathname+location.search))).replace(/\?(.*)$/,""),e="/"!=this.getWorking("root")?e.replace(this.getWorking("root"),""):e}else{if(!window)return"";var t=window.location.href.match(/#(.*)$/);e=t?t[1]:""}return this.clearSlashes(e)}},{key:"checkLocation",value:function(){let e=this.getWorking("current"),t=this.getFragment(),n=this.isInitialized();e===t&&n||(this.setWorking("current",t),this.check(t),this.setInitialized(!0))}},{key:"hrefClick",value:function(){}},{key:"getRoot",value:function(){return this.getWorking("root")}},{key:"listen",value:function(e=50){return this.setWorking("current","notInitialized"),clearInterval(this.getWorking("interval")),this.setWorking("interval",setInterval(this.checkLocation.bind(this),e)),window.addEventListener("popstate",this.hrefClick.bind(this)),this}},{key:"check",value:function(e){let t=e||this.getFragment(),n=null;for(let e=0;e<this.getWorking("routes").length;e++){let i=this.getWorking("root")+this.getWorking("routes")[e].re,r=this.clearSlashes(decodeURI(i)),o=t.match(r);if(o&&o.length){if(""!==r)return o.shift(),this.getWorking("routes")[e].handler.apply(this.host||{},o),this.emit("afterRoute",this.getWorking("routes")[e]),this;o.shift(),n={route:this.getWorking("routes")[e],match:o}}}return n&&(n.route.handler.apply(this.host||{},n.match),this.emit("afterRoute",n.route)),this}},{key:"refresh",value:function(e=0){var t=this;e>0?setTimeout(function(){return t.refresh()},e):this.check(this.getWorking("current"))}},{key:"navigate",value:function(e){switch(e=e||"",this.getWorking("mode")){case $c:{const t=this.getFullRoute(e);t===this.lastRoute?this.refresh():(this.lastRoute=t,history.pushState(null,"",this.lastRoute));break}case _c:window.location.href.match(/#(.*)$/),window.location.href=window.location.href.replace(/#(.*)$/,"")+"#"+e}return this}},{key:"getFullRoute",value:function(e=""){e=this.clearSlashes(e);const t=this.getWorking("root");return"/"!==t&&0===e.indexOf(t.substring(1))?"/"+e:this.getWorking("root")+this.clearSlashes(e)}},{key:"getAllLinks",value:function(){const e=document.body.querySelectorAll("a");let t=[];for(let n=0;n<e.length;n++)for(let i=0,r=e[n].attributes,o=r.length;i<o;i++)if(0===r[i].nodeName.indexOf("n-href")){t.push(e[n]);break}return t}},{key:"reRouteExisted",value:function(){const e=this.getAllLinks();for(let t=0;t<e.length;t++)this.initRerouting(e[t],e[t].getAttribute("n-href"));return this}},{key:"initRerouting",value:function(e,t){var n=this;if(!e.notRouterInitialized){let i=this.getFullRoute(t);e.setAttribute("href",i),e.addEventListener("click",function(e){return e.preventDefault(),n.navigate(t),!1}),e.notRouterInitialized=!0}return this}}])}(kc);var Ic=new wc;let Oc=function(e){function t(e={}){var n;return io(this,t),(n=to(this,t,[{working:{name:e.name?e.name:"APIQuee"},options:e}])).busy=!1,n.queue=[],n.busySince=-1,n.afterEmpty=void 0,n.start(),go(n,n)}return ho(t,e),uo(t,[{key:"stop",value:function(){this.interval&&(clearInterval(this.interval),this.interval=void 0,this.busy=!1,this.busySince=-1)}},{key:"start",value:function(){this.stop(),this.interval=setInterval(this.checkQueue.bind(this),this.QUEUE_CHECK_INTERVAL)}},{key:"checkQueue",value:function(){var e=this;if(this.isEmpty()||this.isBusy()){if(!this.isBusy()&&this.afterEmpty){let e=this.afterEmpty;this.afterEmpty=void 0,e()}}else this.setBusy().runNext().then(this.setFree.bind(this)).catch(function(t){e.error&&e.error(t),e.setFree()})}},{key:"addToQueue",value:function(e){this.queue.push(e)}},{key:"runNext",value:function(){let e=this.queue.map(function(e){return e.title}).join(", ");this.debug&&this.debug(`tasks [${e}]`);let t=this.queue.shift();return Jo.isFunc(t.action)?Jo.isFunc(t.resolve)?t.action().then(t.resolve):(this.error&&this.error("В задании нет возвратной части, resolve не функция",t.title),t.action()):(this.error&&this.error("В задании нет исполнимой части, action не функция",t.title),Promise.resolve())}},{key:"isBusy",value:function(){let e=!!this.busy,n=Date.now()/1e3;return!!(e&&this.busySince>-1)&&(!(n-this.busySince>t.MAX_BUSY_TIME)||(this.setFree(),!1))}},{key:"setBusy",value:function(){return this.busy=!0,this.busySince=Date.now()/1e3,this}},{key:"setFree",value:function(){return this.busy=!1,this.busySince=-1,this}},{key:"isEmpty",value:function(){return 0===this.queue.length}},{key:"run",value:function(e,t=void 0,n=""){var i=this;return t&&void 0===this.afterEmpty&&(this.afterEmpty=t),new Promise(function(t,r){try{i.addToQueue({action:e,resolve:t,title:n})}catch(e){i.error&&i.error(e),r(e)}})}},{key:"actionIsQueued",value:function(e){return this.queue.some(function(t){return t.title==e})}},{key:"runIfNotQueued",value:function(e,t=void 0,n=""){return this.actionIsQueued(n)?Promise.resolve():this.run(e,t,n)}}])}(kc);co(Oc,"QUEUE_CHECK_INTERVAL",100),co(Oc,"MAX_BUSY_TIME",300);let Ac=function(e){function t(e){var n;return io(this,t),(n=to(this,t,[{options:e,working:{name:e.name?e.name:"APIConnection"}}])).online=null,n.run(),go(n,n)}return ho(t,e),uo(t,[{key:"run",value:function(){this.int=window.setInterval(this.check.bind(this),1e3)}},{key:"pause",value:function(){window.clearInterval(this.int)}},{key:"resume",value:function(){this.run()}},{key:"isOnline",value:function(){return window.navigator.onLine}},{key:"check",value:function(){let e=this.isOnline();null!==this.online&&this.online!==e&&this.changeState(e),this.online=e}},{key:"changeState",value:function(e=!1){e?this.emit("online"):this.emit("offline")}}])}(kc);co(Ac,"int",void 0),co(Ac,"online",void 0);var Sc=Object.freeze({__proto__:null,notAPIConnection:Ac,notAPIOptions:{rps:50,protocol:"http",host:"localhost",port:9e3},notAPIQueue:Oc});const Cc={};function Ec(e){return Jo.objHas(Cc,e)}var Lc=Object.freeze({__proto__:null,create:function(e,t={raw:[],filtered:[],selected:{}}){if(!Ec(e)){if(!(Object.keys(t).length>0))throw new Error("store's props wasn't specified");Cc[e]={},Object.keys(t).forEach(function(n){Cc[e][n]=Ur(t[n])})}return Cc[e]},fake:function(e){return{subscribe:t=>(t(e),function(){}),set(){}}},get:function(e){return!!Ec(e)&&Cc[e]}});const Tc=Symbol("interface"),xc=["getActionsCount","getActions","setFindBy","resetFilter","setFilter","getFilter","setSorter","getSorter","resetSorter","setPageNumber","setPageSize","setPager","setReturn","setSearch","getSearch","resetSearch","resetPager","getPager","addFormFieldType","addFormField","getFieldTypes","getActionFormFields"],Nc=["_id","id","ID"],Fc={},Uc={};let Pc=function(e){function t(e,n){var i;return io(this,t),(i=to(this,t,[{working:{name:"network interface for: "+(e.model?e.model:"unknown"),filter:Fc,search:"",return:Uc,pager:{size:10,page:0}},options:n}])).manifest=e,i.initActions(),go(i,i)}return ho(t,e),uo(t,[{key:"initActions",value:function(){if(this.getActionsCount()>0){let e=this.getActions();for(let t in e)this.initAction(t)}}},{key:"initAction",value:function(e){var t=this;Jo.objHas(this,"$"+e)||(this["$"+e]=function(n,i,r=!1,o){return t.request(t,e,n,i,r,o)})}},{key:"requestHTTP",value:function(e,t,n,i={},r=!1,o){try{let s=Object.assign({},e.getData&&"function"==typeof e.getData?e.getData():e,n),a=this.getActionData(t),l=this.collectRequestData(a),u=this.encodeRequest(l),c=this.getServerURL(),d=this.getURL(s,a,t),f={};if(r){d=this.getURL(n,a,t);const e=new FormData;e.append("file",o),f.body=e}else-1===["OPTIONS","GET"].indexOf(a.method.toUpperCase())&&(f={method:a.method,body:JSON.stringify(e.getData&&"function"==typeof e.getData?e.getData():e),headers:{Accept:"application/json","Content-Type":"application/json"}});return f.method=a.method.toUpperCase(),i&&Object.keys(i).length&&(f.headers=i),fetch(c+d+u,f).then(function(e){return e.json()})}catch(e){Jo.error(e),Jo.report(e)}}},{key:"requestWS",value:function(e,t){try{let n=this.getActionData(t),i=this.collectRequestData(n);const r=Jo.getApp().getWSClient(),o=this.getWSRequestName(t),s=Object.assign({},i,e.getData());return Jo.objHas(n,"type")&&"string"==typeof n.type&&n.type.length&&"request"!==n.type?r.message(n.type,o,s).then(function(e){return e.payload}):r.request(o,s).then(function(e){return e.payload})}catch(e){Jo.error(e),Jo.report(e)}}},{key:"request",value:function(){let e=this.getActionData(arguments[1]);switch(this.selectTransport(e)){case"ws":return this.requestWS(...arguments);case"http":return this.requestHTTP(...arguments);default:throw new Error("Offline")}}},{key:"wsIsUp",value:function(e){if(!0===e.ws){let t;if(t=Jo.objHas(e,"wsClient")&&e.wsClient?Jo.getApp().getWSClient(e.wsClient):Jo.getApp().getWSClient(),t)return!0}return!1}},{key:"selectTransport",value:function(e){return this.wsIsUp(e)?"ws":!!Jo.objHas(e,"method")&&"http"}},{key:"getModelName",value:function(){return this&&this.manifest?this.manifest.model:null}},{key:"getActionData",value:function(e){return this.getActions()&&this.getActions()[e]?this.getActions()[e]:null}},{key:"getActionsCount",value:function(){return this.getActions()?Object.keys(this.getActions()).length:0}},{key:"getActions",value:function(){return this.manifest&&this.manifest.actions?this.manifest.actions:{}}},{key:"parseParams",value:function(e,t,n,i){let r="",o=e.length;for(;n.indexOf(e)>-1;){let s=n.indexOf(e),a=s+o,l=n.indexOf(t);if(s>l)break;if(r=n.slice(a,l),""==r)break;this.log&&this.log(e+r+t,Wo.get(r,i)),n=n.replace(e+r+t,Wo.get(r,i))}return n}},{key:"parseLine",value:function(e,t,n){return e=(e=e.replace(":modelName",this.manifest.model)).replace(":actionName",n),e=this.parseParams(":record[","]",e,t),e=this.parseParams(":","?",e,t)}},{key:"getURL",value:function(e,t,n){return this.parseLine(this.manifest.url,e,n)+(Jo.objHas(t,"postFix")?this.parseLine(t.postFix,e,n):"")}},{key:"getServerURL",value:function(){return Jo.getApp()?Jo.getApp().getOptions("api.server.url",""):""}},{key:"getWSRequestName",value:function(e){return`${this.manifest.model}//${e}`}},{key:"encodeRequest",value:function(e){let t="?";for(let n in e)void 0!==e[n]&&null!==e[n]&&(t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n].constructor===Object?JSON.stringify(e[n]):e[n])+"&");return this.getOptions("test")&&(t+="&test=1",this.getOptions("test.session")&&(t+="&session="+this.getOptions("test.session")),this.getOptions("test.session")&&(t+="&role="+this.getOptions("test.role"))),t}},{key:"collectRequestData",value:function(e){let t={};if(Jo.objHas(e,"data")&&Array.isArray(e.data))for(let n=0;n<e.data.length;n++){let i="get"+Jo.capitalizeFirstLetter(e.data[n]);if(this[i]&&"function"==typeof this[i]){let r=this[i](),o={};["pager","sorter","filter","search","return"].indexOf(e.data[n])>-1?o[e.data[n]]=r:o=r,t=Object.assign(t,o)}}return t}},{key:"getID",value:function(e,t){let n,i=Nc,r=["",this.manifest.model];Jo.objHas(t,"index")&&t.index&&(i=[t.index].concat(Nc));for(let t of r)for(let r of i)if(Jo.objHas(e,t+r)){n=e[t+r];break}return n}},{key:"setFindBy",value:function(e,t){var n={};return n[e]=t,this.setFilter(n)}},{key:"setFilter",value:function(e=Fc){return this.setWorking("filter",e),this}},{key:"resetFilter",value:function(){return this.setFilter()}},{key:"getFilter",value:function(){return this.getWorking("filter")}},{key:"setSearch",value:function(e=""){return this.setWorking("search",e),this}},{key:"resetSearch",value:function(){return this.setSearch()}},{key:"getSearch",value:function(){return this.getWorking("search")}},{key:"setSorter",value:function(e){return this.setWorking("sorter",e),this}},{key:"resetSorter",value:function(){return this.setSorter({})}},{key:"getSorter",value:function(){return this.getWorking("sorter")}},{key:"setReturn",value:function(e=Uc){return this.setWorking("return",e),this}},{key:"resetReturn",value:function(){return this.setReturn({})}},{key:"getReturn",value:function(){return this.getWorking("return")}},{key:"setPageNumber",value:function(e){return this.setWorking("pager.page",e),this}},{key:"setPageSize",value:function(e){return this.setWorking("pager.size",e),this}},{key:"setPager",value:function(){if((arguments.length<2||isNaN(arguments[0])||isNaN(arguments[1]))&&arguments[0].constructor===Object&&Jo.objHas(arguments[0],"page")&&Jo.objHas(arguments[0],"size")){const e=arguments[0];this.setWorking("pager",{size:e.size||10,page:e.page||0})}else 2!==arguments.length||isNaN(arguments[0])||isNaN(arguments[1])||this.setWorking("pager",{size:arguments[0]||10,page:arguments[1]||0});return this}},{key:"resetPager",value:function(){return this.setPager()}},{key:"getPager",value:function(){return this.getWorking("pager")}},{key:"getRecord",value:function(){this.getData()}},{key:"getDefaultAsPlainObject",value:function(){if(!this.manifest||!this.manifest.fields)return{};const e={};for(const t of Object.keys(this.manifest.fields))if(Object.hasOwn(this.manifest.fields[t],"default")){const n=this.manifest.fields[t].default;Array.isArray(n)?e[t]=[...n]:e[t]="object"==typeof n?{...n}:n}return e}}])}(kc),Mc=function(e){function t(e,n){var i;return io(this,t),i=to(this,t),null==n||"object"!=typeof n?go(i,n):n&&n.isProxy?(Jo.error("this is Proxy item"),go(i,n)):n&&(n.isRecord||n.isProperty)?go(i,n):Array.isArray(n)?go(i,i.createCollection(e,n)):(i.setOptions({}),i[Tc]=new Pc(e,{}),i.setData(n),i.interfaceUp(),i.mapToInterface(),i.mapToMethods(),go(i,i))}return ho(t,e),uo(t,[{key:"toDefault",value:function(){return this.setData(this[Tc].getDefaultAsPlainObject())}},{key:"mapToInterface",value:function(){let e=this;for(let t of xc)this[Tc][t]&&"function"==typeof this[Tc][t]&&(this[t]=function(){let n=e[Tc][t](...arguments);return n==e[Tc]?e:n})}},{key:"mapToMethods",value:function(){let e=this[Tc].manifest,t=Jo.getApp(),n={};if(e.methods?n=e.methods:t&&(n=t.getOptions(["models",this[Tc].manifest.model].join("."),{})),n)for(let e in n)Object.hasOwn(n,e)&&(this[e]=n[e])}},{key:"createCollection",value:function(e,n){for(var i=[],r=0;r<n.length;r++)i.push(new t(e,n[r]));return i}},{key:"interfaceUp",value:function(){if(this[Tc].getActionsCount()>0){let e=this[Tc].getActions();for(let t in e)this.actionUp(t,e[t])}}},{key:"actionUp",value:function(e){var t=this;Object.hasOwn(this,["$"+e])||(this["$"+e]=function(...n){return t[Tc].request(t,e,...n)})}},{key:"setAttr",value:function(e,t){return this.setData(e,t)}},{key:"setAttrs",value:function(e){if(e&&"object"==typeof e&&Object.keys(e).length>0)for(let t in e)this.setAttr(t,e[t])}},{key:"getAttr",value:function(e,t=!1){let n=this.getData(e,{});return t?Jo.stripProxy(n):n}},{key:"getAttrs",value:function(e){let t=[];if(e&&e.length>0)for(let n of e)t.push(this.getAttr(n));return t}},{key:"getManifest",value:function(){return this[Tc]?this[Tc].manifest:{}}},{key:"setItem",value:function(e){return this.setData(e),this}}])}(kc);const Dc="main";let Rc=function(e){function t(e){var n;return io(this,t),n=to(this,t,[{working:{name:e.name,interfaces:{},controllers:Jo.objHas(e,"controllers")?e.controllers:{},initController:null,currentController:null,uis:{},wsc:{},wss:{},services:{}},options:e}]),n?.log&&n.log("start app"),Jo.register("app",n),n.initManifest(),go(n,n)}return ho(t,e),uo(t,[{key:"initManifest",value:function(){var e=this;Jo.getJSON(this.getOptions("manifestURL")).then(function(t){return e.setInterfaceManifest(t)}).catch(function(e){return Jo.report(e)})}},{key:"initRouter",value:function(){this.setWorking("router",Ic),this.getWorking("router").setRoot(this.getOptions("router.root")),Ic.reRouteExisted()}},{key:"execRouter",value:function(){var e={};for(let t=0;t<this.getOptions("router.manifest").length;t++){let n=this.getOptions("router.manifest")[t],i=n.paths,r=n.schemes,o=n.controller;for(let t=0;t<i.length;t++){let n=!!(r&&Array.isArray(r)&&r.length>t)&&r[t];e[i[t]]=this.bindController(o,n)}}this.getWorking("router").addList(e).listen()}},{key:"setInterfaceManifest",value:function(e){Object.freeze(e),this.setOptions("interfaceManifest",e),this.initRouter(),this.update()}},{key:"getInterfaceManifest",value:function(e){return e?this.getOptions("interfaceManifest")[e]:this.getOptions("interfaceManifest")}},{key:"update",value:function(){this.updateInterfaces(),this.initController(),this.startApp()}},{key:"startApp",value:function(){this.initServices(),this.execRouter(),this.emit("afterStarted",this)}},{key:"bindController",value:function(e,t){let n=this;return function(){new e(n,arguments,t)}}},{key:"initController",value:function(){if(void 0!==this.getOptions("initController")){let e=this.getOptions("initController");this.setWorking("initController",new e(this))}}},{key:"getCurrentController",value:function(){return this.getWorking("currentController")}},{key:"setCurrentController",value:function(e){let t=this.getCurrentController();return t&&t.destroy&&t.destroy(),this.setWorking("currentController",e),this}},{key:"createInterfaceModelFactory",value:function(e){return function(t){return new Mc(e,t)}}},{key:"updateInterfaces",value:function(){this.clearInterfaces();let e=this.getOptions("interfaceManifest");if(e)for(let t in e){let n=e[t],i=this.getOptions(["models",t].join("."),{});n.methods=i;const r=this.createInterfaceModelFactory(n);this.setInterface(t,r)}}},{key:"getRecordName",value:function(e){return"nr"+Jo.capitalizeFirstLetter(e)}},{key:"getControllerName",value:function(e){return"nc"+Jo.capitalizeFirstLetter(e)}},{key:"setInterface",value:function(e,t){return this.setWorking(`interfaces.${e}`,t)}},{key:"getInterfaces",value:function(){return this.getWorking("interfaces")}},{key:"clearInterfaces",value:function(){return this.setWorking("interfaces",{}),this}},{key:"setWSClient",value:function(e=Dc,t){return this.setWorking(`wsc.${e}`,t)}},{key:"getWSClient",value:function(e=Dc){return this.getWorking(`wsc.${e}`)}},{key:"getInterface",value:function(e){return this.getInterfaces()[e]}},{key:"getModel",value:function(e,t={}){return this.getInterface(e)(t)}},{key:"setService",value:function(e,t){return this.setWorking(`services.${e}`,t)}},{key:"getService",value:function(e){return this.getWorking(`services.${e}`)}},{key:"initServices",value:function(){if(this.getOptions("services"))for(let e in this.getOptions("services"))try{let t=this.getOptions(`services.${e}`);switch(Jo.detectType(t)){case"function":case"class":this.setService(e,new t(this));break;default:this.setService(e,t)}}catch(t){this?.error&&this.error(`Service (${e}) init error`,t)}}},{key:"getConfigReaderForModule",value:function(e=""){var t=this;const n=["modules",e].join(".");return{get:function(e,i){return e&&"string"==typeof e&&e.length?t.getOptions([n,e].join("."),i):t.getOptions(n,i)}}}},{key:"moduleConfig",value:function(e=""){return this.getConfigReaderForModule(e)}}])}(kc);co(Rc,"DEFAULT_WS_CLIENT_NAME",Dc);const jc="default",Vc="main";let zc=function(e){function t(e,n){var i;io(this,t),co(i=to(this,t,[{}]),"els",void 0),co(i,"make",void 0),co(i,"app",void 0),i.app=e,i.app.setCurrentController(i),i.setWorking({name:n,ready:!1,views:{},libs:{},helpers:{}}),i.ui={},i.els={},i.setData({}),i.setOptions({moduleName:Vc,containerSelector:"main.content",prefix:e.getOptions("paths.module"),names:{plural:"Models",single:"Model"}}),i.setURLPrefix(e.getOptions("router.root"));let r=e.getInterfaces();i.make={};for(let e in r)Object.hasOwn(r,e)&&(i.make[e]=r[e]);return i.on("destroy",function(){i.app=null;for(let e in i.ui)i.ui[e].destroy&&i.ui[e].destroy(),i.ui[e].$destroy&&i.ui[e].$destroy(),i.ui[e]=null;i.els=null,i.make=null}),go(i,i)}return ho(t,e),uo(t,[{key:"getApp",value:function(){return Jo.getApp()}},{key:"setModel",value:function(e){return this.setWorking("model",e),this}},{key:"getModel",value:function(e,t){if("string"==typeof e){const n=this.getInterface(e);return n&&n(t||{})}{const t=this.getInterface();return t&&t(e||{})}}},{key:"getInterface",value:function(e=""){return this.app?.getInterface(e||this.getModelName())}},{key:"getModelName",value:function(){return this.getWorking("modelName")}},{key:"setModelName",value:function(e){return this.setWorking("modelName",Jo.lowerFirstLetter(e)),this}},{key:"getModelIDFieldName",value:function(){return this.getWorking("modelIDFieldName","_id")}},{key:"setModelIDFieldName",value:function(e="_id"){return this.setWorking("modelIDFieldName",e)}},{key:"setReady",value:function(e=!0){this.setWorking("ready",e),e?this.emit("ready"):this.emit("busy")}},{key:"setURLPrefix",value:function(e){return this.setOptions("urlPrefix",e),this.updateAutoName(),this}},{key:"getURLPrefix",value:function(){return this.getOptions("urlPrefix")}},{key:"setModuleName",value:function(e){return this.setOptions("moduleName",Jo.lowerFirstLetter(e)),this.updateAutoName(),this}},{key:"getModuleName",value:function(){return this.getOptions("moduleName")}},{key:"getModulePrefix",value:function(){return[Jo.getApp().getOptions("paths.modules"),this.getModuleName()].join("/")}},{key:"getModelURL",value:function(){return Jo.buildURL({prefix:this.getURLPrefix(),module:this.getModuleName(),model:this.getModelName()})}},{key:"getModelActionURL",value:function(e,t=""){return Jo.buildURL({prefix:this.getURLPrefix(),module:this.getModuleName(),model:this.getModelName(),id:e,action:t})}},{key:"buildURL",value:function(e){return Jo.buildURL(e)}},{key:"updateAutoName",value:function(){return this.getOptions("autoName",true),this}},{key:"setName",value:function(e){return this.setWorking("name",e),this.setOptions("autoName",!1),this}},{key:"getName",value:function(){return this.getWorking("name")}},{key:"preloadLib",value:function(e={}){var t=this;return new Promise(function(n,i){if("object"!=typeof e)n(void 0);else{t.setWorking("loading",[]);for(let r in e)t.getWorking("loading").push(e[r]),t.make[e[r]]({}).$listAll().then(function(i){t.getOptions("libs")||t.setOptions("libs",{}),t.getOptions("libs")[r]=i,t.getWorking("loading").indexOf(e[r])>-1&&t.getWorking("loading").splice(t.getWorking("loading").indexOf(e[r]),1),0===t.getWorking("loading").length&&n(void 0)}).catch(function(e){t.report(e),i()});0===t.getWorking("loading").length&&n(void 0)}})}},{key:"onAfterRender",value:function(){this.emit("afterRender")}},{key:"getActionName",value:function(e=jc){return"run"+Jo.capitalizeFirstLetter(e)}},{key:"getDefaultActionName",value:function(){return this.getActionName(this.getOptions("defaultAction",jc))}},{key:"route",value:function(e){let[t,...n]=e,i=this.getActionName(t||jc);"function"==typeof this[i]?(this.setCurrentAction(i),this[i](n)):this[this.getDefaultActionName()]?(this.setCurrentAction(this.getDefaultActionName()),this[this.getDefaultActionName()](n)):(this.setCurrentAction(void 0),this.error&&this.error("No action in router",e))}},{key:"setCurrentAction",value:function(e){this.setWorking("action",e)}},{key:"getCurrentAction",value:function(){return this.getWorking("action")}},{key:"getAppOptions",value:function(){try{return this.getApp().getOptions()}catch(e){this.error&&this.error(e)}}},{key:"getModuleOptions",value:function(e){try{return this.getApp().getOptions(["modules",e||this.getModuleName()].join("."))}catch(e){this.error&&this.error(e)}}},{key:"getServices",value:function(e){try{return this.getApp().getOptions(["services",e||this.getModuleName()].join("."))}catch(e){this.error&&this.error(e)}}},{key:"getComponents",value:function(e){try{return this.getApp().getOptions(["components",e||this.getModuleName()].join("."))}catch(e){this.error&&this.error(e)}}},{key:"refresh",value:function(e=0){this.app?.getWorking("router").refresh(e)}},{key:"getRouter",value:function(){return this.app?.getWorking("router")}},{key:"navigateWithDelay",value:function(e,t=1500,n=function(){}){return this.getRouter().navigateWithDelay(e,t,n)}},{key:"navigate",value:function(e){return this.getRouter().navigate(e)}},{key:"navigateAction",value:function(e,t="",n=0,i=function(){}){return this.navigateModuleAction(this.getModuleName(),this.getModelName(),e,t,n,i)}},{key:"navigateModelAction",value:function(e,t,n="",i=0,r=function(){}){return this.navigateModuleAction(this.getModuleName(),e,t,n,i,r)}},{key:"navigateModuleAction",value:function(e,t,n,i="",r=0,o=function(){}){return r?this.getRouter().navigateWithDelay(Jo.buildURL({prefix:this.getURLPrefix(),module:e,model:t,id:n,action:i}),r,o):this.getRouter().navigate(Jo.buildURL({prefix:this.getURLPrefix(),module:e,model:t,id:n,action:i}))}}],[{key:"MODULE_NAME",get:function(){return Vc}},{key:"MODEL_NAME",get:function(){return"ModelName"}},{key:"LABELS",get:function(){return{plural:`${Vc}:model_label_plural`,single:`${Vc}:model_label_single`}}},{key:"getControllerRoute",value:function(e=0){let t=[];this.MODULE_NAME&&this.MODULE_NAME.length>0&&t.push(Jo.lowerFirstLetter(this.MODULE_NAME)),this.MODEL_NAME&&this.MODEL_NAME.length>0&&t.push(Jo.lowerFirstLetter(this.MODEL_NAME)),t=[t.join("/")];for(let n=0;n<e;n++)t.push("/([^/]+)");return t.join("")}},{key:"getControllerRoutes",value:function(e=0){let t=[this.getControllerRoute(0)];for(let n=0;n<e;n++)t.unshift(this.getControllerRoute(n+1));return t}},{key:"getRoutes",value:function(){return{paths:this.getControllerRoutes(this.PARAMS_LENGTH),controller:this}}},{key:"getCommonMenu",value:function(e){return[{section:e.MODULE_NAME,title:e.LABELS.plural,url:`/${Jo.lowerFirstLetter(e.MODULE_NAME)}/${Jo.lowerFirstLetter(e.MODEL_NAME)}`}]}},{key:"getMenu",value:function(){}}])}(kc);co(zc,"PARAMS_LENGTH",2);const Wc={};function Bc(e){return Object.hasOwn(Wc,e)}function qc(e){return!!Bc(e)&&Wc[e]}var Hc=mi('<input type="checkbox"/> <label class="label"></label>',1);fi(["input"]);var Gc=mi("<a> </a>"),Kc=mi('<div class="mx-1 tags has-addons svelte-1557h41"><span class="tag"> </span> <span><!></span></div>'),Jc=mi("<a> </a>"),Yc=mi("<span><!></span>");var Qc=mi("<td><!></td>");function Zc(e,t){Oe(t,!0);const[n,i]=Rr();let r=yt("");Kr(()=>{void 0===s().type&&(Object.hasOwn(s(),"titlePath")?$t(r,Wo.get(s().titlePath,a(),l()),!0):Object.hasOwn(s(),"titleComposer")&&"function"==typeof s().titleComposer?$t(r,s().titleComposer(a(),l()),!0):$t(r,Wo.get(s().path,a(),l()),!0))});let o=Gr(t,"getItemId",3,e=>e._id),s=Gr(t,"field",19,()=>({})),a=Gr(t,"item",19,()=>({})),l=Gr(t,"helpers",19,()=>({}));var u=Qc(),c=Vt(u),d=e=>{{let t=at(()=>Wo.get(s().path,a(),l()));Va(e,{get values(){return Hn(t)}})}},f=e=>{var t=bi(),i=zt(t),r=e=>{{let t=at(()=>Wo.get(s().path,a(),l()));Cs(e,{get values(){return Hn(t)}})}},u=e=>{var t=bi(),i=zt(t),r=e=>{{let t=at(()=>Wo.get(s().path,a(),l()));su(e,{get values(){return Hn(t)}})}},u=e=>{var t=bi(),i=zt(t),r=e=>{{let t=at(()=>Wo.get(s().path,a(),l()));rs(e,{get values(){return Hn(t)}})}},u=e=>{var t=bi(),i=zt(t),r=e=>{{let t=at(()=>Wo.get(s().path,a(),l()));!function(e,t){let n=Gr(t,"values",19,()=>[]);var i=bi();Fi(zt(i),17,n,e=>e.id,(e,t)=>{var n=bi(),i=zt(n),r=e=>{var n=Kc(),i=Vt(n),r=Vt(i,!0);ne(i);var o=Wt(i,2),s=Vt(o),a=e=>{var n=Gc(),i=Vt(n,!0);ne(n),on(()=>{lr(n,"href",Hn(t).url),Qi(n,1,Gi(Hn(t).urlCustomClasses),"svelte-1557h41"),wi(i,Hn(t).value)}),ki(e,n)},l=e=>{var n=yi();on(()=>wi(n,Hn(t).value)),ki(e,n)};Li(s,e=>{Hn(t).url?e(a):e(l,!1)}),ne(o),ne(n),on(()=>{wi(r,Hn(t).title),Qi(o,1,`tag is-${Hn(t).color??""} ${Hn(t).customClasses??""}`,"svelte-1557h41")}),ki(e,n)},o=e=>{var n=Yc(),i=Vt(n),r=e=>{var n=Jc(),i=Vt(n,!0);ne(n),on(()=>{lr(n,"href",Hn(t).url),Qi(n,1,Gi(Hn(t).urlCustomClasses),"svelte-1557h41"),wi(i,Hn(t).title)}),ki(e,n)},o=e=>{var n=yi();on(()=>wi(n,Hn(t).title)),ki(e,n)};Li(i,e=>{Hn(t).url?e(r):e(o,!1)}),ne(n),on(()=>Qi(n,1,`mx-1 tag is-${Hn(t).color??""} ${Hn(t).customClasses??""}`,"svelte-1557h41")),ki(e,n)};Li(i,e=>{Object.hasOwn(Hn(t),"value")?e(r):e(o,!1)}),ki(e,n)}),ki(e,i)}(e,{get values(){return Hn(t)}})}},u=e=>{var t=bi(),i=zt(t),r=e=>{{let t=at(()=>o()(a())),n=at(()=>Wo.get(s().path,a(),l()));!function(e,t){Oe(t,!0);let n=Yr(),i=Gr(t,"id",3,""),r=Gr(t,"value",15,!1),o=Gr(t,"fieldname",3,"switch"),s=Gr(t,"disabled",3,!1),a=Gr(t,"readonly",3,!1),l=Gr(t,"styling",3," is-rounded is-success ");var u=Hc(),c=zt(u);sr(c),c.__input=function(e){let t={id:i(),field:o(),value:"checkbox"===e.target.type?e.target.checked:e.target.value};return n("change",t),!0};var d=Wt(c,2);on(()=>{Qi(c,1,`switch ${l()??""}`),lr(c,"id",`edit-table-row-cell-inline-switch-${o()??""}-${i()??""}`),lr(c,"name",o()),c.readOnly=a(),c.disabled=s(),lr(d,"for",`edit-table-row-cell-inline-switch-${o()??""}-${i()??""}`)}),Ir(c,r),ki(e,u),Ae()}(e,{get id(){return Hn(t)},get fieldname(){return s().path},get value(){return Hn(n)},get disabled(){return s().disabled},get readonly(){return s().readonly},$$events:{change(...e){s().onChange?.apply(this,e)}}})}},u=e=>{var t=bi(),i=zt(t),r=e=>{var t=bi(),n=zt(t);{let e=at(()=>o()(a())),t=at(()=>Wo.get(s().path,a(),l()));Wi(n,()=>s().component,(n,i)=>{i(n,Hr({get id(){return Hn(e)},get fieldname(){return s().path},get disabled(){return s().disabled},get readonly(){return s().readonly},get value(){return Hn(t)}},()=>s().options,{$$events:{change(...e){s().onChange?.apply(this,e)}}}))})}ki(e,t)},u=e=>{var t=bi(),i=zt(t),r=e=>{var t=yi();on(e=>wi(t,e),[()=>Jo.strLengthCap(Wo.get(s().path,a(),l()),s().maxLength)]),ki(e,t)},o=e=>{var t=yi();on(e=>wi(t,e),[()=>Dr(Lo,"$LOCALE",n)[Wo.get(s().path,a(),l())]]),ki(e,t)};Li(i,e=>{s()&&void 0!==s()&&!isNaN(s().maxLength)&&s().maxLength?e(r):e(o,!1)},!0),ki(e,t)};Li(i,e=>{s().component?e(r):e(u,!1)},!0),ki(e,t)};Li(i,e=>{"switch"===s().type?e(r):e(u,!1)},!0),ki(e,t)};Li(i,e=>{"tag"===s().type?e(r):e(u,!1)},!0),ki(e,t)};Li(i,e=>{"boolean"===s().type?e(r):e(u,!1)},!0),ki(e,t)};Li(i,e=>{"image"===s().type?e(r):e(u,!1)},!0),ki(e,t)};Li(i,e=>{"button"===s().type?e(r):e(u,!1)},!0),ki(e,t)};Li(c,e=>{"link"===s().type?e(d):e(f,!1)}),ne(u),on(()=>{Qi(u,1,(s().hideOnMobile?" is-hidden-touch ":"")+(s().classes?` ${s().classes} `:"")),lr(u,"title",Hn(r))}),ki(e,u),Ae(),i()}var Xc=mi('<td><input type="checkbox" placeholder=""/></td>'),ed=mi("<tr><!><!></tr>");function td(e,t){Oe(t,!0);const n=()=>Dr(o,"$selectedList",i),[i,r]=Rr();let o,s=Yr(),a=yt(void 0);Kr(()=>{$t(a,f()(l()),!0),o=qc(t.id).selected});let l=Gr(t,"item",19,()=>({})),u=Gr(t,"helpers",19,()=>({})),c=Gr(t,"fields",19,()=>[]),d=Gr(t,"showSelect",3,!1),f=Gr(t,"getItemId",3,()=>{});function h(e){return e.preventDefault(),s("rowSelectChange",{id:Hn(a),selected:n()[Hn(a)]}),!1}var v=ed(),g=Vt(v),p=e=>{var t=Xc(),i=Vt(t);sr(i),i.__change=h,ne(t),on((e,t,n)=>{lr(i,"id",`table-row-select-${e??""}`),lr(i,"data-id",t),lr(i,"name",`row_selected_${n??""}`)},[()=>f()(l()),()=>f()(l()),()=>f()(l())]),Ir(i,()=>n()[Hn(a)],e=>{return t=o,i=Kn(n)[Hn(a)]=e,r=Kn(n),t.set(r),i;var t,i,r}),ki(e,t)};Li(g,e=>{d()&&n()&&e(p)}),Fi(Wt(g),17,c,Ni,(e,t)=>{Zc(e,{get field(){return Hn(t)},get helpers(){return u()},get item(){return l()},get getItemId(){return f()}})}),ne(v),ki(e,v),Ae(),r()}fi(["change"]);var nd=mi('<div class="field is-grouped"><!></div>'),id=mi('<div class="field is-grouped"><!></div>'),rd=mi('<div class="field"><div class="control"><input class="input" type="text" placeholder="Поиск"/></div></div>'),od=mi('<th><input type="checkbox" id="table-row-select-page" placeholder="" name="row_selected_all"/></th>'),sd=mi("<th><!></th>"),ad=mi('<a href="" class="pagination-link is-current" aria-current="page"> </a>'),ld=mi('<a href="" class="pagination-link"> </a>'),ud=mi("<li><!></li>"),cd=mi('<nav class="pagination is-centered" aria-label="pagination"><a href="" class="pagination-previous">Назад</a> <a href="" class="pagination-next">Вперед</a> <ul class="pagination-list"><!></ul></nav>'),dd=mi('<!> <!> <!> <table class="table"><thead><tr><!><!></tr></thead><tbody></tbody></table> <!>',1);fi(["input","change","click"]);const fd="__dublicate__",hd={},vd=!1,gd="listAndCount",pd="count",md="preprocessor",yd={ui:function(e,t){Oe(t,!0);const[n,i]=Rr();let r=Yr(),o=Gr(t,"helpers",19,()=>({})),s=Gr(t,"state",31,()=>Ct({})),a=Gr(t,"filter",31,()=>Ct({})),l=Gr(t,"sorter",31,()=>Ct({})),u=Gr(t,"fields",19,()=>[]),c=Gr(t,"selected",31,()=>Ct({})),d=Gr(t,"items",31,()=>Ct([])),f=Gr(t,"actions",19,()=>[]),h=Gr(t,"links",19,()=>[]),v=Gr(t,"search",15,""),g=Gr(t,"showSearch",3,!0),p=Gr(t,"showSelect",3,!0),m=Gr(t,"selectAll",15,!1),y=Gr(t,"getItemId",3,e=>e._id);function b(e){try{let t=e.currentTarget.value.trim();r("searchChange",t)}catch{return}}function k({detail:e}){try{r("searchChange",e)}catch{return}}function $({detail:e}){try{r("filterChange",e)}catch{return}}function _(){r("goToPrevPage")}function w(){r("goToNextPage")}function I(e){e.preventDefault();let t=e.target;return r("goToPage",parseInt(t.dataset.page)),!1}function O(){qc(t.id).selected.update(e=>(d().forEach(t=>{e[y()(t)]=m()}),e))}Kr(()=>{p()&&qc(t.id).selected.subscribe(e=>{c(e)}),qc(t.id).refined.subscribe(e=>{if(d(e),p()){for(let e in c())d().some(t=>y()(t)===e)?Object.hasOwn(c(),e)||c(c()[e]=!1,!0):delete c()[e];c(c())}}),qc(t.id).state.subscribe(e=>{s(e)})});var A=dd(),S=zt(A),C=e=>{var t=nd();Va(Vt(t),{get values(){return h()}}),ne(t),ki(e,t)};Li(S,e=>{h().length&&e(C)});var E=Wt(S,2),L=e=>{var t=id();Cs(Vt(t),{get values(){return f()}}),ne(t),ki(e,t)};Li(E,e=>{f().length&&e(L)});var T=Wt(E,2),x=e=>{var n=bi(),i=zt(n),r=e=>{const n=at(()=>t.filterUI);var i=bi();Wi(zt(i),()=>Hn(n),(e,t)=>{t(e,{get filter(){return a()},set filter(e){a(e)},$$events:{change:$,searchChange:k}})}),ki(e,i)},o=e=>{var t=rd(),n=Vt(t),i=Vt(n);sr(i),i.__input=b,ne(n),ne(t),wr(i,v),ki(e,t)};Li(i,e=>{t.filterUI?e(r):e(o,!1)}),ki(e,n)};Li(T,e=>{g()&&e(x)});var N=Wt(T,2),F=Vt(N),U=Vt(F),P=Vt(U),M=e=>{var t=od(),n=Vt(t);sr(n),n.__change=O,ne(t),Ir(n,m),ki(e,t)};Li(P,e=>{p()&&e(M)}),Fi(Wt(P),17,u,Ni,(e,t)=>{const i=at(()=>Hn(t).path.substring(1));var o=sd(),s=at(()=>function(e){const t=e.path.substring(1);Object.hasOwn(l(),t)?l(l()[t]=-1*parseInt(l()[t]),!0):l({[t]:1}),r("sorterChange",l())}(Hn(t)));o.__click=function(...e){Hn(s)?.apply(this,e)};var a=Vt(o),u=e=>{{let n=at(()=>l()[Hn(i)]>0?"sort-up":"sort-down");zl(e,{get font(){return Hn(n)},get title(){return Hn(t).title},pointable:!0})}},c=e=>{var i=yi();on(()=>wi(i,Dr(Lo,"$LOCALE",n)[Hn(t).title])),ki(e,i)};Li(a,e=>{Hn(t).sortable&&Object.hasOwn(l(),Hn(i))?e(u):e(c,!1)}),ne(o),on(()=>Qi(o,1,(Hn(t).hideOnMobile?" is-hidden-touch":"")+(Hn(t).sortable?" is-clickable":""))),ki(e,o)}),ne(U),ne(F);var D=Wt(F);Fi(D,21,d,e=>e._id,(e,n)=>{td(e,{get id(){return t.id},get item(){return Hn(n)},get fields(){return u()},get helpers(){return o()},get showSelect(){return p()},get getItemId(){return y()},$$events:{rowSelectChange(e){xr.call(this,t,e)}}})}),ne(D),ne(N);var R=Wt(N,2),j=e=>{var t=cd(),n=Vt(t);n.__click=_;var i=Wt(n,2);i.__click=w;var r=Wt(i,2),o=Vt(r),a=e=>{var t=bi();Fi(zt(t),17,()=>s().pagination.pages.list,Ni,(e,t)=>{var n=ud(),i=Vt(n),r=e=>{var n=ad(),i=Vt(n,!0);ne(n),on(()=>{lr(n,"aria-label",`Страница ${Hn(t).index??""}`),wi(i,Hn(t).index+1)}),ki(e,n)},o=e=>{var n=ld();n.__click=I;var i=Vt(n,!0);ne(n),on(()=>{lr(n,"aria-label",`Страница ${Hn(t).index??""}`),lr(n,"data-page",Hn(t).index),wi(i,Hn(t).index+1)}),ki(e,n)};Li(i,e=>{Hn(t).active?e(r):e(o,!1)}),ne(n),ki(e,n)}),ki(e,t)};Li(o,e=>{s().pagination&&s().pagination.pages&&s().pagination.pages.list&&e(a)}),ne(r),ne(t),ki(e,t)};Li(R,e=>{s()?.pagination?.pages?.list.length>1&&e(j)}),ki(e,A),Ae(),i()},links:[],actions:[],endless:!1,idField:"_id",getItemId:function(e){return e._id}};let bd=function(e){function t(e={}){var n;return io(this,t),(n=to(this,t)).id="table-"+Math.random(),n.options={...yd,...e.options?e.options:{}},n.ui={},n.data={raw:[],filtered:[],refined:[],selected:{}},n.state={pagination:{items:{count:0,from:0,to:0},pages:{count:0,from:0,to:0,current:0,list:[]}}},n.working={},n.stores=function(e,t={raw:[],filtered:[],selected:{}}){if(!Bc(e)){if(!(Object.keys(t).length>0))throw new Error("store's props wasn't specified");Wc[e]={},Object.keys(t).forEach(function(n){Wc[e][n]=Ur(t[n])})}return Wc[e]}(n.id,{raw:[],filtered:[],refined:[],selected:{},state:n.state,working:n.working}),n.stores.working.subscribe(n.onWorkingUpdate.bind(n)),n.stores.raw.subscribe(n.onRawUpdate.bind(n)),n.stores.filtered.subscribe(n.onFilteredUpdate.bind(n)),n.stores.refined.subscribe(n.onRefinedUpdate.bind(n)),n.stores.selected.subscribe(n.onSelectedUpdate.bind(n)),n.stores.state.subscribe(n.onStateUpdate.bind(n)),Jo.objHas(e,"data")&&Array.isArray(e.data)&&n.stores.raw.update(function(t){return e.data}),n.setCombinedActionName(n.getOptions("interface.combinedAction",gd)),Jo.objHas(n.options,"filter")?n.setFilter(n.options.filter,!0):n.resetFilter(),Jo.objHas(n.options,"pager")?n.setPager(n.options.pager,!0):n.resetPager(),Jo.objHas(n.options,"sorter")?n.setSorter(n.options.sorter,!0):n.resetSorter(!0),Jo.objHas(n.options,"return")?n.setReturn(n.options.return):n.setReturn(),Jo.objHas(n.options,"search")?n.setSearch(n.options.search,!0):n.setSearch(),n.render(),n.updateData(),go(n,n)}return ho(t,e),uo(t,[{key:"onWorkingUpdate",value:function(e){return this.working=e,e}},{key:"onRawUpdate",value:function(e){return this.data.raw=e,e}},{key:"onFilteredUpdate",value:function(e){return this.data.filtered=e,this.refineFiltered(),e}},{key:"onRefinedUpdate",value:function(e){return this.data.refined=e,this.clearSelected(),e}},{key:"onStateUpdate",value:function(e){return this.state=e,e}},{key:"onSearchChange",value:function(e){e.length>3?this.setSearch(e):this.setSearch()}},{key:"onSorterChange",value:function(e){e?this.setSorter(e):this.resetSorter()}},{key:"onFilterChange",value:function({filter:e,actionName:t}){0===t.indexOf(gd)&&this.setCombinedActionName(t),e?this.setFilter(e):this.resetFilter()}},{key:"onSelectedUpdate",value:function(e){this.data.selected=e}},{key:"clearSelected",value:function(){this.data.selected={}}},{key:"getSelected",value:function(e=!1,t="refined"){let n=[];for(let i in this.data.selected)if(this.data.selected[i])if(e){let e=this.data[t].findIndex(function(e){return e._id===i});e>-1&&n.push(this.data[t][e])}else n.push(i);return n}},{key:"getItemId",value:function(e){return this.getOptions("getItemId",yd.getItemId)(e)}},{key:"selectAll",value:function(){var e=this;this.stores.selected.update(function(){let t={};return e.data.filtered.forEach(function(n){t[e.getItemId(n)]=!0}),t})}},{key:"selectNone",value:function(){var e=this;this.stores.selected.update(function(){let t={};return e.data.filtered.forEach(function(n){t[e.getItemId(n)]=!1}),t})}},{key:"render",value:function(){var e=this;this.ui.table||(this.ui.table=new this.options.ui({target:this.options.targetEl,props:{filterUI:this.getOptions("filterUI",void 0),id:this.id,helpers:Object.assign({},this.getHelpers()),fields:this.getOptions("fields"),actions:this.getActions(),links:this.getLinks(),search:"",showSelect:this.getOptions("showSelect"),showSearch:this.getOptions("showSearch"),showSort:this.getOptions("showSort"),idField:this.getOptions("idField"),getItemId:this.getOptions("getItemId"),filter:this.getFilter()}})),this.ui.table.$on("searchChange",function(t){return e.onSearchChange(t.detail)}),this.ui.table.$on("sorterChange",function(t){return e.onSorterChange(t.detail)}),this.ui.table.$on("filterChange",function(t){return e.onFilterChange(t.detail)}),this.ui.table.$on("goToPage",function(t){return e.goToPage(t.detail)}),this.ui.table.$on("goToNextPage",function(){return e.goToNext()}),this.ui.table.$on("goToPrevPage",function(){return e.goToPrev()})}},{key:"getActions",value:function(){return this.getOptions("actions",[])}},{key:"getLinks",value:function(){return this.getOptions("links",[])}},{key:"getHelpers",value:function(){return this.options.helpers||{}}},{key:"setWorking",value:function(e,t){var n=this;return this.stores.working.update(function(i){return Wo.set(e,i,n.getHelpers(),t),i}),this}},{key:"getWorking",value:function(e,t){let n=Wo.get(e,this.working,this.getHelpers());return void 0===n?t:n}},{key:"setState",value:function(e,t){var n=this;return this.stores.state.update(function(i){return Wo.set(e,i,n.getHelpers(),t),i}),this}},{key:"getState",value:function(e,t){let n=Wo.get(e,this.state,this.getHelpers());return void 0===n?t:n}},{key:"setOptions",value:function(e,t){return Wo.set(e,this.options,this.getHelpers(),t),this}},{key:"getOptions",value:function(e,t){let n=Wo.get(e,this.options,this.getHelpers());return void 0===n?t:n}},{key:"setFilter",value:function(e,t=!1){return this.setState("filter",e),t||(this.invalidateData(),this.updateData()),this}},{key:"resetFilter",value:function(){return this.setState("filter",{}),this}},{key:"getFilter",value:function(){return this.getState("filter")}},{key:"setPager",value:function(e,t=!1){return this.setState("pager",e),t||this.updateData(),this}},{key:"getDefaultPageNumber",value:function(){return isNaN(this.getOptions("pager.page"))?0:this.getOptions("pager.page")}},{key:"getDefaultPageSize",value:function(){return isNaN(this.getOptions("pager.size"))?20:this.getOptions("pager.size")}},{key:"resetPager",value:function(){this.setState("pager",{size:this.getDefaultPageSize(),page:this.getDefaultPageNumber()})}},{key:"getPager",value:function(){return this.getState("pager")}},{key:"setSorter",value:function(e,t=!1){return this.setWorking("sorter",e),t||(this.invalidateData(),this.updateData()),this}},{key:"resetSorter",value:function(e=!1){let t={_id:1};return this.setSorter(t,e)}},{key:"getSorter",value:function(){return this.getWorking("sorter")}},{key:"getSorterDirection",value:function(){try{let e=Object.keys(this.getSorter());return this.getSorter()[e[0]]}catch{return 1}}},{key:"getSearch",value:function(){return void 0!==this.getWorking("search")&&null!==this.getWorking("search")?this.getWorking("search"):""}},{key:"setSearch",value:function(e="",t=!1){return this.setWorking("search",e),t||(this.invalidateData(),this.updateData()),this}},{key:"getReturn",value:function(){return this.getWorking("return")}},{key:"setReturn",value:function(e=hd){return this.setWorking("return",e),this}},{key:"clearFilteredData",value:function(){this.stores.filtered.update(function(e){return e.splice(0,e.length),e})}},{key:"clearRawData",value:function(){this.stores.raw.update(function(e){return e.splice(0,e.length),e})}},{key:"clearRefinedData",value:function(){this.stores.refined.update(function(e){return e.splice(0,e.length),e})}},{key:"invalidateData",value:function(){this.clearFilteredData(),this.isLive()&&this.clearRawData(),this.resetPager()}},{key:"isLive",value:function(){return this.getOptions("interface")&&this.getOptions("interface.factory")}},{key:"setUpdating",value:function(){this.setState("updating",!0)}},{key:"setUpdated",value:function(){this.setState("updating",!1)}},{key:"ifUpdating",value:function(){return this.getState("updating")}},{key:"getDataInterface",value:function(){let e=this.getOptions("interface.factory");return"function"==typeof e?e({}):e}},{key:"getLoadDataActionName",value:function(){return this.getOptions("interface.listAction")?this.getOptions("interface.listAction"):"list"}},{key:"setCombinedActionName",value:function(e=pd){this.setWorking("interface.combinedAction",e)}},{key:"getCombinedActionName",value:function(){return this.getWorking("interface.combinedAction")?this.getWorking("interface.combinedAction"):gd}},{key:"getCountActionName",value:function(){return this.getOptions("interface.countAction")?this.getOptions("interface.countAction"):pd}},{key:"loadData",value:function(){let e,t=this.getDataInterface().setFilter(this.getFilter()).setSorter(this.getSorter()).setReturn(this.getReturn()).setSearch(this.getSearch()).setPager(this.getPager());return e=this.getOptions("interface.combined",vd)?this.getCombinedActionName():this.getLoadDataActionName(),t["$"+e]()}},{key:"goToNext",value:function(){let e=isNaN(this.getState("pager.page"))?this.getDefaultPageNumber():this.getState("pager.page")+1;this.setState("pager.page",Math.min(e,this.getState("pagination.pages.to"))),this.updateData()}},{key:"goToPrev",value:function(){let e=isNaN(this.getState("pager.page"))?this.getDefaultPageNumber():this.getState("pager.page")-1;this.setState("pager.page",Math.max(e,this.getState("pagination.pages.from"))),this.updateData()}},{key:"goToFirst",value:function(){this.setState("pager.page",this.getState("pagination.pages.from")),this.updateData()}},{key:"goToLast",value:function(){this.setState("pager.page",this.getState("pagination.pages.to")),this.updateData()}},{key:"goToPage",value:function(e){this.setState("pager.page",e),this.updateData()}},{key:"testDataItem",value:function(e){var t=this.getSearch().toLowerCase();for(var n in e){if(e[n].toString().toLowerCase().indexOf(t)>-1)return!0}return!1}},{key:"getRowsCount",value:function(){var e=this;return this.getDataInterface().setFilter(this.getFilter())["$"+this.getCountActionName()]().then(function(t){e.updatePagination(t.count)}).catch(function(t){e.error(t)})}},{key:"updatePagination",value:function(e){var t=this;this.log("update pagination",e),this.state.pagination.pages.list.splice(0,this.state.pagination.pages.list.length);let n=(this.getPager().page-0)*this.getPager().size+1,i=e%this.getPager().size?Math.floor(e/this.getPager().size)+1:Math.round(e/this.getPager().size),r=Math.max(0,this.getPager().page-6),o=Math.min(i-1,this.getPager().page+6),s=[],a=Math.min(n+this.getPager().size-1,e);for(let e=r;e<=o;e++)s.push({index:e,active:e===this.getPager().page});this.stores.state.update(function(l){return t.log("update pagination",l),l.pagination.items.count=e,l.pagination.items.from=n,l.pagination.items.to=a,l.pagination.pages.count=i,l.pagination.pages.from=r,l.pagination.pages.to=o,l.pagination.pages.current=t.getPager().page,l.pagination.pages.list.splice(0,l.pagination.pages.list.length,...s),l})}},{key:"updateData",value:function(){var e=this;if(this.isLive()){if(this.ifUpdating())return;this.getOptions("endless",!1)||this.clearRawData(),this.setUpdating(),this.getOptions("interface.combined",vd)?this.loadData().then(function(t){let n=Jo.objHas(t,"status")&&Jo.objHas(t,"result");e.stores.filtered.update(function(i){return e.getOptions("endless",!1)||e.clearFilteredData(),n?i.push(...t.result.list):Jo.objHas(t,"list")&&Array.isArray(t.list)?i.push(...t.list):Array.isArray(t)&&i.push(...t),i}),e.setWorking("lastCount",n?t.result.count:t.count)}).then(function(){e.updatePagination(e.getWorking("lastCount"))}).catch(this.error.bind(this)).then(this.setUpdated.bind(this)):this.loadData().then(function(t){e.stores.filtered.update(function(e){return e.push(...t),e})}).then(this.getRowsCount.bind(this)).catch(this.error.bind(this)).then(this.setUpdated.bind(this))}else this.setUpdating(),this.processData(),this.setUpdated()}},{key:"getData",value:function(){return this.data}},{key:"processData",value:function(){var e=this;let t=this.getFilter();this.log(this.getData()),null!=t&&void 0!==t.filterSearch&&null!==t.filterSearch&&t.filterSearch.length>0?this.stores.filtered.update(function(t){return t.splice(0,t.length,...e.data.raw.filter(e.testDataItem.bind(e))),t}):this.stores.filtered.update(function(t){return t.splice(0,t.length,...e.data.raw),t});let n=this.getSorter();null!=n&&this.stores.filtered.update(function(e){return e.sort(function(e,t){let i=Wo.get(n.sortByField,e,{}),r=Wo.get(n.sortByField,t,{});return isNaN(i)?void 0!==i&&void 0!==r&&i.localeCompare?i.localeCompare()*-n.sortDirection:0:(i<r?1:-1)*n.sortDirection}),e})}},{key:"error",value:function(){this.options.logger&&this.options.logger.error(...arguments)}},{key:"log",value:function(){this.options.logger&&this.options.logger.log(...arguments)}},{key:"checkFieldsNames",value:function(){const e=":"+this.getOptions("idField");this.getOptions("fields",[]).forEach(function(t){e===t.path&&(t.path=t.path+fd)})}},{key:"readFieldValue",value:function(e,t,n){if(e.indexOf(fd)>-1){const e=":"+this.getOptions("idField");return Wo.get(e,t,n)}return Wo.get(e,t,n)}},{key:"refineFiltered",value:function(){var e=this;let t=[];this.checkFieldsNames(),this.data.filtered.forEach(function(n,i){let r={};e.getOptions("idField")&&(r[e.getOptions("idField")]=n[e.getOptions("idField")]),e.getOptions("fields",[]).forEach(function(t){let o=null,s=e.readFieldValue(t.path,n,e.getOptions("helpers"));if(Jo.objHas(t,md)){try{o=t[md](s,n,i)}catch(t){e.error("Error while preprocessing cell value",s,n,i),e.error(t)}Wo.set(t.path,r,o)}else Wo.set(t.path,r,s)}),t.push(r)}),this.stores.refined.update(function(e){return e.splice(0,e.length,...t),e})}},{key:"$destroy",value:function(){for(let e in this.ui)this.ui[e].$destroy&&this.ui[e].$destroy(),delete this.ui[e]}}])}(jo);var kd=mi("<!> <!>",1),$d=mi("<!> <!>",1);function _d(e,t){Oe(t,!0);let n=yt(!1),i=yt(!1),r=Gr(t,"container",19,()=>({})),o=Gr(t,"loaderTitle",15,"Отправка данных на сервер"),s=Gr(t,"loaderActive",15,!1),a=Gr(t,"loaderSize",15,"container"),l=Gr(t,"successTitle",15,"OK"),u=Gr(t,"successMessage",15,""),c=Gr(t,"errorTitle",15,"Error"),d=Gr(t,"errorMessage",15,"");var f={showSuccess:function(e,t){$t(i,!1),$t(n,!0),null!=t&&u(t),null!=e&&l(e)},showError:function(e,t){$t(n,!1),$t(i,!0),null!=t&&d(t),null!=e&&c(e)},setLoading:function(){s(!0),$t(n,!1),$t(i,!1)},resetLoading:function(){s(!1)},hideAll:function(){s(!1),$t(n,!1),$t(i,!1)}},h=$d(),v=zt(h);return fs(v,{get loading(){return s()},set loading(e){s(e)},get title(){return o()},set title(e){o(e)},get size(){return a()},set size(e){a(e)}}),nl(Wt(v,2),Hr(r,{children:(e,t)=>{var r=kd(),o=zt(r),s=e=>{dc(e,{get title(){return c()},set title(e){c(e)},get message(){return d()},set message(e){d(e)}})};Li(o,e=>{Hn(i)&&e(s)});var a=Wt(o,2),f=e=>{fc(e,{get title(){return l()},set title(e){l(e)},get message(){return u()},set message(e){u(e)}})};Li(a,e=>{Hn(n)&&e(f)}),ki(e,r)},$$slots:{default:!0}})),ki(e,h),Ae(f)}var wd=new WeakMap,Id=new WeakMap;let Od=function(e){function t({target:e=null,name:n="Default",options:i={},working:r={},data:o={},ui:s=_d}){var a;return io(this,t),oo(a=to(this,t,[{working:{name:`${n}ActionUI`,...r},options:i,data:o}]),wd,null),oo(a,Id,null),e&&a.setOptions("target",e),so(wd,a,s),a.initUI(),a}return ho(t,e),uo(t,[{key:"initUI",value:function(){try{const e=this.getTargetEl();for(;e.children.length;)e.removeChild(e.firstChild);so(Id,this,new(ro(wd,this))({target:e,props:this.getOptions()}))}catch(e){this.error(e)}}},{key:"setLoading",value:function(){this.emit("loading"),ro(Id,this).setLoading()}},{key:"resetLoading",value:function(){this.emit("loaded"),ro(Id,this).resetLoading()}},{key:"destroy",value:function(){this.emit("destroy"),ro(Id,this)&&(ro(Id,this).$destroy&&ro(Id,this).$destroy(),ro(Id,this).destroy&&ro(Id,this).destroy(),so(Id,this,null)),this.setOptions(null),this.setWorking(null),this.setData(null)}},{key:"processResult",value:function(e){return"ok"===e.status?(this.setFormSuccess(),!0):(this.setFormErrors(e),!1)}},{key:"setFormSuccess",value:function(){ro(Id,this).showSuccess(),this.emit("success")}},{key:"setFormErrors",value:function(e){const t={form:[],fields:{}};e.message&&t.form.push(e.message),e.errors&&Object.keys(e.errors).length>0&&(t.fields={...e.errors}),ro(Id,this).showError(t),this.emit("error",t)}},{key:"getTargetEl",value:function(){const e=this.getOptions("target",".container");if(e instanceof HTMLElement)return e;if("string"==typeof e)return document.querySelector(e);throw new Error("ActionUI parent element is not defined")}}])}(kc),Ad=function(){return uo(function e(){io(this,e)},null,[{key:"addComponent",value:function(e,t){Sa.add(e,t)}},{key:"addVariants",value:function(e,t){Ea.add(e,t)}},{key:"addField",value:function(e,t){Ca.add(e,t)}},{key:"actionFieldsInit",value:function(e,t,n){var i=this;Array.isArray(e)?e.forEach(function(e){i.actionFieldsInit(e,t,n)}):(Jo.objHas(t,"fields")||(t.fields={}),Jo.objHas(t.fields,e)||(t.fields[e]={}),null!=n&&void 0!==n[e]&&null!==n[e]&&(t.fields[e].value=n[e]))}}])}();co(Ad,"validator",null);const Sd={label:"",placeholder:"",enabled:!0,visible:!0,required:!0,validated:!1,valid:!1,errors:!1};function Cd(e,t={},n,i){let r={...Sd};return i.contains(e)&&(r={...r,...i.get(e)}),t&&(r={...r,...t}),Jo.objHas(r,"variantsSource")&&n.contains(r.variantsSource)?r.variants=n.get(r.variantsSource):r.variants&&0!==r.variants.length||(r.variants=[]),r}function Ed(e,t,n){return e[t].formErrors=[...n],e[t].validated=!0,e[t].inputStarted=!0,e[t].valid=!1,e[t].formLevelError=!0,e}function Ld(e,t){return e[t].formErrors=!1,e[t].validated=!0,e[t].valid=!0,e[t].formLevelError=!1,e}function Td(e,t){return Jo.objHas(e,t)&&e[t].enabled&&e[t].visible&&void 0!==e[t].value}var xd,Nd,Fd,Ud,Pd,Md,Dd,Rd,jd,Vd,zd,Wd,Bd,qd,Hd,Gd,Kd,Jd,Yd,Qd,Zd={fieldInit:Cd,initFormByField:function e(t={},n=[],i,r,o,s){if(Array.isArray(n))n.forEach(function(n){return e(t,n,i,r,o,s)});else{let e={};o&&Jo.objHas(o,"mutations")&&Jo.objHas(o.mutations,n)&&(e=o.mutations[n]),s&&Jo.objHas(s,n)&&(e.value=s[n]),t[n]=Cd(n,e,i,r),o&&o.readonly&&(t[n].readonly=!0)}return t},setFieldInvalid:function(e,t,n,i){return e[t].errors=[...i],e[t].validated=!0,e[t].valid=!1,e[t].value=n,e},setFieldValid:function(e,t,n){e[t].errors=!1,e[t].validated=!0,e[t].valid=!0,e[t].value=n;for(let n in e)if(n!==t&&(Array.isArray(e[n].errors)&&0===e[n].errors.length&&(e[n].errors=!1),!1!==e[n].errors))break;return e},isFieldValid:function(e,t){return!Array.isArray(e[t].errors)},setFormFieldInvalid:Ed,setFormFieldValid:Ld,updateFormValidationStatus:function({form:e,formErrors:t,validationStatus:n}){if(Array.isArray(n.form)&&n.form.length?t.splice(0,t.length,...n.form):t.splice(0,t.length),n.fields)for(let t in n.fields)Array.isArray(n.fields[t])&&n.fields[t].length?Ed(e,t,n.fields[t]):Ld(e,t)},fieldIsVisibleAndFilled:Td,setFieldsVisibility:function(e,t,n){return!!Array.isArray(t)&&(Object.keys(e).forEach(function(i){e[i].visible=t.includes(i)?n:!n}),!0)},setFieldValue:function(e,t,n){return!!Jo.objHas(e,t)&&(e[t].value=n,!0)},collectData:function(e,t){let n={};return e.flat().forEach(function(e){Td(t,e)&&(n[e]=t[e].value)}),n}};function Xd(){if(Nd)return xd;Nd=1;const e=e=>Object.keys(e).reduce((e,t)=>(e[t]=[],e),{}),t=["fields","form"];return xd=class{#M=!0;#D;constructor(e){this.#D=JSON.parse(JSON.stringify(e)),Object.keys(this.#D).forEach(e=>{t.includes(e)||delete this.#D[e]}),this.#M=0===this.#D.form.errors.length;const n=this.#R();for(let e of n)this.isFieldDirty(e)&&(this.#M=!1)}destroy(){this.#D=void 0}get clean(){return this.#M}static getDefaultResult(t){return{fields:e(t),form:{fields:e(t),errors:[],exceptions:[]}}}getReport(){return JSON.parse(JSON.stringify(this.#j()))}getDetailedReport(){return"object"==typeof this.#D?JSON.parse(JSON.stringify(this.#D)):void 0}isFieldDirty(e){return!(!Array.isArray(this.#D.fields[e])||!this.#D.fields[e].length)||!(!Array.isArray(this.#D.form.fields[e])||!this.#D.form.fields[e].length)}getCompleteResultForField(e){const t=[];return Array.isArray(this.#D.fields[e])&&t.push(...this.#D.fields[e]),Array.isArray(this.#D.form.fields[e])&&t.push(...this.#D.form.fields[e]),t}#j(){const e={clean:this.#M,fields:{},form:[]},t=this.#R();for(let n of t){const t=this.getCompleteResultForField(n);t.length&&(e.fields[n]=t)}return e.form=[...this.#D.form.errors],0===e.form.length&&delete e.form,e}#R(){const e=Object.keys(this.#D.fields),t=Object.keys(this.#D.form.fields);return[...new Set([...t,...e])]}}}function ef(){if(Md)return Pd;Md=1;const e=function(){if(Ud)return Fd;Ud=1;class e extends Error{constructor(e,t={},n=null){return super(e),this.options=t,this.adopt(n),this.fill(),this.getTime(),this}adopt(e){return e instanceof Error&&(this.parent=e),this}getStack(){return this.parent?this.parent.stack:this.stack}getDetails(){let e=this;return this.parent&&(e=this.parent),{columnNumber:e.columnNumber,fileName:e.fileName,lineNumber:e.lineNumber,name:e.name,message:e.message,stack:e.stack}}getTime(){let e=new Date;return this.env.date={timestamp:e.getTime(),offset:e.getTimezoneOffset()},this.env.date}filterEnv(e,t){let n={};for(let i of t)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}fill(){return this.env={browser:!1,node:!0,versions:Object.assign({},process.versions),vars:this.filterEnv(process.env,this.options.whitelist||["NODE_ENV"])},this}}return Fd=e}();return Pd=class extends e{constructor(e,t={},n=null,i={}){return super(e,{fields:t,params:i},n),this}setFieldsErrors(e){this.options.fields=e}getFieldsErrors(){return this.options.fields}}}function tf(){if(Vd)return jd;Vd=1;const e=Xd(),t=ef(),n=Rd?Dd:(Rd=1,Dd=async(e,t)=>{if("function"==typeof e)return"AsyncFunction"===e.constructor.name?await e(...t):e(...t)});jd=async(t,n)=>{const r=e.getDefaultResult(n);return await i({validators:t,data:n,result:r}),await l({validators:t,data:n,result:r}),new e(r)};const i=async({validators:e,data:t,result:n})=>{for(let i in t)await r(i,t[i],e,n)},r=async(e,t,n,i)=>{const r=o(e,n);return await s(e,t,r,i)},o=(e,t)=>t&&t.fields&&t.fields[e]?t.fields[e]:[],s=async(e,i,r,o)=>{for(let s of r)try{await n(s.validator,[i])||a(e,s.message,o)}catch(n){n instanceof t||!s.message?a(e,n.message,o):a(e,s.message,o)}},a=(e,t,n)=>{n.fields[e].includes(t)||n.fields[e].push(t)},l=async({validators:e,data:t,result:n})=>{const i=u(e);await c(t,i,n)},u=e=>e&&e.form?e.form:[],c=async(e,t,n)=>{for(let i of t)try{await i(e)}catch(e){if(!e||"function"!=typeof e.getFieldsErrors)throw e;{const t=e.getFieldsErrors();Array.isArray(t.form)&&d(t.form,n),t.fields&&h(t.fields,n)}}},d=(e,t)=>{e.forEach(e=>{f(e,t)})},f=(e,t)=>{t.form.errors.includes(e)||t.form.errors.push(e)},h=(e,t)=>{for(let n in e)v(n,e[n],t)},v=(e,t,n)=>{t.forEach(t=>{g(e,t,n)})},g=(e,t,n)=>{Array.isArray(n.form.fields[e])||(n.form.fields[e]=[]),n.form.fields[e].includes(t)||n.form.fields[e].push(t)};return jd}function nf(){if(qd)return Bd;qd=1;const{composeFieldsValidators:e,composeFormValidators:t}=(Wd||(Wd=1,zd={composeFieldsValidators:(e,t)=>{if(t&&t.fields){const n=Object.keys(e),i={};return n.forEach(e=>{Array.isArray(t.fields[e])&&(i[e]=t.fields[e])}),i}return{}},composeFormValidators:(e,t)=>t?t.forms&&Array.isArray(t.forms[e])?t.forms[e]:Array.isArray(t.form)?t.form:[]:[]}),zd),n=tf();return Bd=i=>(r,o)=>{const s={fields:e(r,i),form:t(o,i)};return n(s,r)}}function rf(){if(Jd)return Kd;Jd=1;const e=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),{augmentFieldsValidators:t,augmentFormValidators:n}=function(){if(Gd)return Hd;Gd=1;const e=(e,t)=>{if(e.validator&&"function"==typeof e.validator){const n=e.validator,i={...e};return delete i.validator,i.validator=e=>n(e,t()),i}return e},t=(e,t)=>n=>e(n,t());return Hd={augmentFieldsValidators:(t,n)=>t.map(t=>e(t,n)),augmentFieldValidator:e,augmentFormValidators:(e,n)=>e.map(e=>t(e,n)),augmentFormValidator:t}}();Kd=(t,o)=>{if(null==t)return{fields:{},forms:{}};const s={};return e(t,"fields")&&(s.fields=i(t.fields,o)),e(t,"forms")?s.forms=r(t.forms,o):e(t,"form")&&(s.form=n(t.form,o)),s};const i=(e,n)=>{const i={};for(let r in e)Array.isArray(e[r])&&(i[r]=t(e[r],n));return i},r=(e,t)=>{const i={};for(let r in e)Array.isArray(e[r])&&(i[r]=n(e[r],t));return i};return Kd}var of=function(){if(Qd)return Yd;Qd=1;const e=tf(),t=nf(),n=rf(),i=Xd();return Yd={name:"not-validation",Session:e,Runner:t,Builder:n,Result:i}}(),sf=mi('<div><div class="field-label is-normal"><!></div> <div class="field-body"></div></div>'),af=mi("<!> <!>",1),lf=mi("<div></div>");function uf(e,t){Oe(t,!0);let n=Gr(t,"label",3,""),i=Gr(t,"name",3,"generic field"),r=Gr(t,"readonly",3,!1),o=Gr(t,"horizontal",3,!1),s=Gr(t,"controls",19,()=>[]),a=Gr(t,"classes",3,""),l=Gr(t,"addons",3,!1),u=Gr(t,"addonsCentered",3,!1),c=Gr(t,"addonsRight",3,!1),d=Gr(t,"grouped",3,!1),f=Gr(t,"groupedMultiline",3,!1),h=Gr(t,"groupedRight",3,!1),v=Gr(t,"groupedCentered",3,!1),g=Gr(t,"onchange",3,()=>!0),p=Gr(t,"formFieldPrefix",3,"form-field-"),m=yt(""),y=yt(!1),b=yt(void 0);Kr(()=>{$t(m,Hn(m)+" "+a()),$t(m,Hn(m)+(l()?" has-addons ":"")),$t(m,Hn(m)+(u()?" has-addons-centered ":"")),$t(m,Hn(m)+(c()?" has-addons-right ":"")),$t(m,Hn(m)+(d()?" is-grouped ":"")),$t(m,Hn(m)+(f()?" is-grouped-multiline ":"")),$t(m,Hn(m)+(h()?" is-grouped-right ":"")),$t(m,Hn(m)+(v()?" is-grouped-centered ":"")),r()&&s().forEach(e=>{e.readonly=!0});let e=s().filter(e=>"UIHidden"!==e.component);$t(y,0===e.length);let t=s().map(e=>e.component).join("_");$t(b,`${p()}${t}-${i()}`)});var k=bi(),$=zt(k),_=e=>{var t=bi();Fi(zt(t),17,s,Ni,(e,t)=>{const n=at(()=>Sa.get(Hn(t).component));var r=bi();Wi(zt(r),()=>Hn(n),(e,n)=>{n(e,Hr(()=>Hn(t),{get onchange(){return g()},get fieldname(){return i()}}))}),ki(e,r)}),ki(e,t)},w=e=>{var t=bi(),r=zt(t),a=e=>{var t=sf(),r=Vt(t),o=Vt(r);{let e=at(()=>n()||s()[0].label);fa(o,{get for(){return Hn(b)},get label(){return Hn(e)}})}ne(r);var a=Wt(r,2);Fi(a,21,s,Ni,(e,t)=>{const n=at(()=>Sa.get(Hn(t).component));var r=bi();Wi(zt(r),()=>Hn(n),(e,n)=>{n(e,Hr(()=>Hn(t),{get onchange(){return g()},get fieldname(){return i()}}))}),ki(e,r)}),ne(a),ne(t),on(()=>{Qi(t,1,`field is-horizontal ${Hn(m)??""} ${Hn(b)??""}`),lr(a,"id",Hn(b))}),ki(e,t)},l=e=>{var t=lf();Fi(t,21,s,Ni,(e,t)=>{const n=at(()=>Sa.get(Hn(t).component));var r=af(),o=zt(r);fa(o,{get for(){return`form-field-${Hn(t).component??""}-${i()??""}`},get label(){return Hn(t).label}}),Wi(Wt(o,2),()=>Hn(n),(e,n)=>{n(e,Hr(()=>Hn(t),{get onchange(){return g()},get fieldname(){return i()}}))}),ki(e,r)}),ne(t),on(()=>Qi(t,1,`field ${Hn(m)??""} ${Hn(b)??""}`)),ki(e,t)};Li(r,e=>{o()?e(a):e(l,!1)},!0),ki(e,t)};Li($,e=>{Hn(y)?e(_):e(w,!1)}),ki(e,k),Ae()}var cf=mi('<div><span class="title"> </span></div>'),df=mi('<div class="notification is-success"><h3 class="form-success-message"> </h3></div>'),ff=mi('<h5 class="title is-5"> </h5>'),hf=mi('<h6 class="subtitle is-6"> </h6>'),vf=mi("<button> </button>"),gf=mi("<button> </button>"),pf=mi('<div class="edit-form-error notification is-danger"> </div>'),mf=mi('<div class="buttons is-grouped is-centered"><!> <!></div> <!>',1),yf=mi("<div><!></div>"),bf=mi('<div class="column notification is-danger"> </div>'),kf=mi('<div class="columns"></div>'),$f=mi('<div class="notification is-danger"> </div>'),_f=mi("<span> </span>"),wf=mi('<div class="edit-form-error notification is-danger"></div>'),If=mi("<button> </button>"),Of=mi("<button> </button>"),Af=mi('<!> <div class="buttons is-grouped is-centered"><!> <!></div>',1),Sf=mi("<!> <!> <!> <!> <!>",1),Cf=mi('<div class="form-container"><!> <!></div>');function Ef(e,t){Oe(t,!0);const n=()=>Dr(Lo,"$LOCALE",i),[i,r]=Rr();let o=Yr(),s=yt(Ct([])),a=yt(!1),l=yt(!1),u=yt(!1),c=Gr(t,"form",31,()=>Ct({})),d=Gr(t,"loading",15,!1),f=Gr(t,"loader",3,"container"),h=Gr(t,"fields",19,()=>[]),v=Gr(t,"SUCCESS_TEXT",3,"Операция завершена"),g=Gr(t,"WAITING_TEXT",3,"Отправка данных на сервер"),p=Gr(t,"title",3,""),m=Gr(t,"description",3,""),y=Gr(t,"buttonsFirst",3,!1),b=Gr(t,"horizontal",3,!1),k=Gr(t,"submit",19,()=>({caption:"Отправить",enabled:!0})),$=Gr(t,"cancel",19,()=>({caption:"Назад",enabled:!0})),_=at(()=>Hn(a)||Hn(l));function w(){return Zd.collectData(h(),c())}function I(e,t){Zd.setFieldsVisibility(c(),e,t)&&c(c())}function O(e){let t=e.detail;c(c()[t.field].value=t.value,!0),c(c()),o("change",t)}function A(e){return e&&e.preventDefault(),o("submit",w()),!1}function S(){o("reject")}var C={collectData:w,setFieldInvalid:function(e,t,n){c(Zd.setFieldInvalid(c(),e,t,n)),$t(l,!0)},setFieldValid:function(e,t){c(Zd.setFieldValid(c(),e,t))},isFieldValid:function(e){return Zd.isFieldValid(c(),e)},setFormFieldInvalid:function(e,t){c(Zd.setFormFieldInvalid(c(),e,t)),o("field.invalid",{fieldName:e})},setFormFieldValid:function(e){c(Zd.setFormFieldValid(c(),e)),o("field.valid",{fieldName:e})},updateFormValidationStatus:function(e){if($t(a,!1),$t(l,!1),Array.isArray(e.form)&&e.form.length?(Hn(s).splice(0,Hn(s).length,...e.form),$t(a,!0)):Hn(s).splice(0,Hn(s).length),$t(s,Hn(s),!0),e.fields)for(let t of Object.keys(c()))Array.isArray(e.fields[t])&&e.fields[t].length?(Zd.setFormFieldInvalid(c(),t,e.fields[t]),$t(l,!0)):Zd.setFormFieldValid(c(),t)},showSuccess:function(){$t(u,!0)},setLoading:function(){d(!0)},resetLoading:function(){d(!1)},setFieldsVisibility:I,setVisibleFields:function(e){I(e,!0)},setInvisibleFields:function(e){I(e,!1)},setFieldValue:function(e,t){Zd.setFieldValue(c(),e,t)&&O({detail:{field:e,value:t}})},updateField:function(e,t){c(c()[e]={...c()[e],...t},!0),c(c())}},E=Cf(),L=Vt(E),T=e=>{var t=cf(),i=Vt(t),r=Vt(i,!0);ne(i),ne(t),on(()=>{Qi(t,1,`${"page"===f()?"pageloader":"containerloader"} ${d()?"is-active":""}`),wi(r,n()[g()])}),ki(e,t)};Li(L,e=>{"hidden"!==f()&&e(T)});var x=Wt(L,2),N=e=>{var t=df(),i=Vt(t),r=Vt(i,!0);ne(i),ne(t),on(()=>wi(r,n()[v()])),ki(e,t)},F=e=>{var t=Sf(),i=zt(t),r=e=>{var t=ff(),i=Vt(t,!0);ne(t),on(()=>wi(i,n()[p()])),ki(e,t)};Li(i,e=>{p()&&e(r)});var o=Wt(i,2),a=e=>{var t=hf(),i=Vt(t,!0);ne(t),on(()=>wi(i,n()[m()])),ki(e,t)};Li(o,e=>{m()&&e(a)});var l=Wt(o,2),u=e=>{var t=mf(),i=zt(t),r=Vt(i),o=e=>{var t=vf();t.__click=S;var i=Vt(t,!0);ne(t),on(()=>{Qi(t,1,`button is-outlined ${$().classes??""}`),wi(i,n()[$().caption])}),ki(e,t)};Li(r,e=>{$().enabled&&e(o)});var a=Wt(r,2),l=e=>{var t=gf();t.__click=A;var i=Vt(t,!0);ne(t),on(()=>{t.disabled=Hn(_),Qi(t,1,`button is-primary is-hovered ${k().classes??""}`),wi(i,n()[k().caption])}),ki(e,t)};Li(a,e=>{k().enabled&&e(l)}),ne(i);var u=Wt(i,2),c=e=>{var t=pf(),n=Vt(t,!0);ne(t),on(e=>wi(n,e),[()=>Hn(s).join(", ")]),ki(e,t)};Li(u,e=>{Hn(s).length>0&&e(c)}),ki(e,t)};Li(l,e=>{y()&&e(u)});var d=Wt(l,2);Fi(d,17,h,Ni,(e,t)=>{var n=bi(),i=zt(n),r=e=>{var n=kf();Fi(n,21,()=>Hn(t),Ni,(e,t)=>{var n=bi(),i=zt(n),r=e=>{var n=bi(),i=zt(n),r=e=>{var n=yf(),i=Vt(n);{let e=at(()=>[c()[Hn(t)]]);uf(i,{get controls(){return Hn(e)},get name(){return Hn(t)},get horizontal(){return b()},get label(){return c()[Hn(t)].label},$$events:{change:O}})}ne(n),on(()=>Qi(n,1,`column ${c()[Hn(t)].fieldSize?"is-"+c()[Hn(t)].fieldSize:""} `)),ki(e,n)};Li(i,e=>{c()[Hn(t)].visible&&e(r)}),ki(e,n)},o=e=>{var n=bf(),i=Vt(n);ne(n),on(()=>wi(i,`Subfield '${Hn(t)??""}' is not registered`)),ki(e,n)};Li(i,e=>{c()[Hn(t)]&&c()[Hn(t)].component?e(r):e(o,!1)}),ki(e,n)}),ne(n),ki(e,n)},o=e=>{var n=bi(),i=zt(n),r=e=>{var n=bi(),i=zt(n),r=e=>{{let n=at(()=>[c()[Hn(t)]]);uf(e,{get controls(){return Hn(n)},get name(){return Hn(t)},get horizontal(){return b()},get label(){return c()[Hn(t)].label},$$events:{change:O}})}};Li(i,e=>{c()[Hn(t)].visible&&e(r)}),ki(e,n)},o=e=>{var n=$f(),i=Vt(n);ne(n),on(()=>wi(i,`Field '${Hn(t)??""}' is not registered`)),ki(e,n)};Li(i,e=>{c()[Hn(t)]&&c()[Hn(t)].component?e(r):e(o,!1)},!0),ki(e,n)};Li(i,e=>{Array.isArray(Hn(t))?e(r):e(o,!1)}),ki(e,n)});var f=Wt(d,2),v=e=>{var t=Af(),i=zt(t),r=e=>{var t=wf();Fi(t,21,()=>Hn(s),Ni,(e,t)=>{var i=_f(),r=Vt(i,!0);ne(i),on(()=>wi(r,n()[Hn(t)])),ki(e,i)}),ne(t),ki(e,t)};Li(i,e=>{Hn(s).length>0&&e(r)});var o=Wt(i,2),a=Vt(o),l=e=>{var t=If();t.__click=S;var i=Vt(t,!0);ne(t),on(()=>{Qi(t,1,`button ${($().classes?$().classes:"")??""}`),wi(i,n()[$().caption])}),ki(e,t)};Li(a,e=>{$().enabled&&e(l)});var u=Wt(a,2),c=e=>{var t=Of();t.__click=A;var i=Vt(t,!0);ne(t),on(()=>{t.disabled=Hn(_),Qi(t,1,`button is-primary is-hovered ${(k().classes?k().classes:"")??""}`),wi(i,n()[k().caption])}),ki(e,t)};Li(u,e=>{k().enabled&&e(c)}),ne(o),ki(e,t)};Li(f,e=>{y()||e(v)}),ki(e,t)};Li(x,e=>{Hn(u)?e(N):e(F,!1)}),ne(E),ki(e,E);var U=Ae(C);return r(),U}fi(["click"]);const Lf={notReadonly:e=>({readonly:!e}),readonly:e=>({readonly:e}),enable:e=>({disabled:!e}),disable:e=>({disabled:e})};let Tf=function(){function e(){io(this,e)}return uo(e,null,[{key:"add",value:function(t,n){Jo.objHas(eo(e,this,xf)._,t)||(eo(e,this,xf)._[t]=n)}},{key:"remove",value:function(t){Jo.objHas(eo(e,this,xf)._,t)&&!Object.keys(Lf).includes(t)&&delete eo(e,this,xf)._[t]}},{key:"exec",value:function(t,n,i,r,o){return eo(e,this,xf)._[t](r,n,i,o)}}])}();var xf={_:{...Lf}};var Nf=new WeakMap,Ff=new WeakMap,Uf=new WeakMap,Pf=new WeakMap,Mf=new WeakMap,Df=new WeakMap,Rf=new WeakSet;let jf=function(e){function t({target:e=null,name:n="Default",options:i={},working:r={},data:o={},ui:s=Ef}){var a;return io(this,t),ao(a=to(this,t,[{working:{name:`${n}Form`,...r},options:i,data:o}]),Rf),oo(a,Nf,null),oo(a,Ff,null),oo(a,Uf,null),oo(a,Pf,"default"),oo(a,Mf,new Aa),oo(a,Df,null),so(Df,a,new Aa(Ea.getContent())),e&&a.setOptions("target",e),so(Nf,a,s),Jo.objHas(i,"action")&&so(Pf,a,i.action),a.initForm(),a}return ho(t,e),uo(t,[{key:"initForm",value:function(){this.getOptions("autoInit",!0)&&this.initLibs(),this.getOptions("autoRender",!0)&&this.initUI()}},{key:"initLibs",value:function(){this.initFields(),this.initVariants(),this.initValidator()}},{key:"reInit",value:function(){this.initLibs(),this.updateUI(),this.resetLoading()}},{key:"initFields",value:function(){const e=this.getFormManifest();Jo.objHas(e,"fields")&&ro(Mf,this).isEmpty()&&ro(Mf,this).import(e.fields)}},{key:"initVariants",value:function(){this.getOptions("variants")&&ro(Df,this).import(this.getOptions("variants"))}},{key:"initValidator",value:function(){so(Ff,this,of.Runner(this.getFormValidators()))}},{key:"initUI",value:function(){try{const e=eo(Rf,this,qf).call(this,{manifest:this.getFormManifest(),formOptions:this.getFormOptions(),data:this.getFormData(),injectedProps:this.getFormInjectedProps()}),t=this.getFormTargetEl();for(;t.children.length;)t.removeChild(t.firstChild);so(Uf,this,new(ro(Nf,this))({target:t,props:e})),eo(Rf,this,Vf).call(this),this.validateForm()}catch(e){this.error(e)}}},{key:"updateUI",value:function(){try{const e=eo(Rf,this,qf).call(this,{manifest:this.getFormManifest(),formOptions:this.getFormOptions(),data:this.getFormData(),injectedProps:this.getFormInjectedProps()});ro(Uf,this).$set(e),this.validateForm()}catch(e){this.error(e)}}},{key:"validateForm",value:async function(){if(!this.getOptions("readonly",!1))try{const e=await ro(Ff,this).call(this,ro(Uf,this).collectData(),this.getFormAction());ro(Uf,this).updateFormValidationStatus(e.getReport()),e.clean||this.emit("error",e.getReport())}catch(e){const t={form:[bo.ERROR_DEFAULT,e.message]};ro(Uf,this)&&ro(Uf,this).updateFormValidationStatus(t),this.emit("error",t),Jo.report(e)}}},{key:"submit",value:function(e){this.emit("submit",e)}},{key:"reject",value:function(){this.emit("reject")}},{key:"$on",value:function(){ro(Uf,this)&&ro(Uf,this).$on(...arguments)}},{key:"setLoading",value:function(){this.emit("loading"),ro(Uf,this).setLoading()}},{key:"resetLoading",value:function(){this.emit("loaded"),ro(Uf,this).resetLoading()}},{key:"destroy",value:function(){this.emit("destroy"),ro(Uf,this)&&(ro(Uf,this).$destroy&&ro(Uf,this).$destroy(),ro(Uf,this).destroy&&ro(Uf,this).destroy(),so(Uf,this,null)),so(Ff,this,null),so(Pf,this,null),so(Mf,this,null),so(Df,this,null),this.setOptions(null),this.setWorking(null),this.setData(null)}},{key:"getName",value:function(){return this.getWorking("name")}},{key:"getFormAction",value:function(){return ro(Pf,this)}},{key:"setFormAction",value:function(e){e&&e!==ro(Pf,this)&&(so(Pf,this,e),ro(Uf,this)&&ro(Uf,this).$destroy(),this.initForm())}},{key:"processResult",value:function(e){return"ok"===e.status?(this.setFormSuccess(),!0):(this.setFormErrors(e),!1)}},{key:"setFormSuccess",value:function(){ro(Uf,this).showSuccess(),this.emit("success")}},{key:"setFormErrors",value:function(e){if(this.getOptions("readonly",!1))return;const t={form:[],fields:{}};e.message&&t.form.push(e.message),e.errors&&Object.keys(e.errors).length>0&&(t.fields={...e.errors}),ro(Uf,this).updateFormValidationStatus(t),this.emit("error",t)}},{key:"getVariant",value:function(e,t){let n=ro(Df,this).get(e).find(function(e){return e.id===t});return n||null}},{key:"getFormTargetEl",value:function(){const e=this.getOptions("target",".form");if(e instanceof HTMLElement)return e;if("string"==typeof e)return document.querySelector(e);throw new Error("Form parent element is not defined")}},{key:"getFormValidators",value:function(){return this.getOptions("validators")?this.getOptions("validators",{}):(eo(Rf,this,Hf).call(this,"validators"),{})}},{key:"getFormManifest",value:function(){const e=this.getModelName();return e&&Jo.getApp()?Jo.getApp().getInterfaceManifest(e):this.getOptions("manifest",void 0)?this.getOptions("manifest",{}):(eo(Rf,this,Hf).call(this,"manifest"),{})}},{key:"getFormData",value:function(){return this.getData()?this.getData():(eo(Rf,this,Hf).call(this,"data"),{})}},{key:"getFormOptions",value:function(){return this.getOptions("ui",void 0)||this.getOptions("fields",void 0)?{ui:this.getOptions("ui",{}),fields:this.getOptions("fields",{})}:(eo(Rf,this,Hf).call(this,"options"),{ui:{},fields:{}})}},{key:"getFormInjectedProps",value:function(){return this.getOptions("injected",{})}},{key:"collectData",value:function(){if(this.getOptions("readonly",!1))return this.getData();const e=ro(Uf,this).collectData();return this.setData({...e}),e}},{key:"updateField",value:function(e,t){ro(Uf,this).updateField(e,t)}},{key:"getModel",value:function(e,t){return"string"==typeof e?this.getInterface(e)(t||{}):this.getInterface()(e||{})}},{key:"getInterface",value:function(e=!1){return Jo.getApp().getInterface(e||this.getModelName())}},{key:"getModelName",value:function(){return this.getOptions("model")}}])}(kc);function Vf(){var e=this;ro(Uf,this).$on("change",function(){return e.validateForm()}),ro(Uf,this).$on("change",function(t){e.emit("change",t.detail),e.emit(`change.${t.detail.field}`,t.detail.value)}),ro(Uf,this).$on("submit",function(t){return e.submit(t.detail)}),ro(Uf,this).$on("reject",function(){return e.reject()}),ro(Uf,this).$on("error",function({detail:t}){return e.emit("error",t)}),eo(Rf,this,zf).call(this)}function zf(){const e=this.getOptions("masters",!1);if(e)for(let t in e){const n=e[t];for(let e in n){const i=n[e];eo(Rf,this,Wf).call(this,e,t,i)}}}function Wf(e,t,n=[]){var i=this;this.on(`change.${t}`,function(r){eo(Rf,i,Bf).call(i,e,t,n,r)}),this.emit(`change.${t}`,this.getFormData()[t])}function Bf(e,t,n,i){var r=this;const o=Tf.exec(e,t,n,i,this);n.forEach(function(e){r.updateField(e,o)})}function qf({manifest:e,formOptions:t={ui:{},fields:{}},data:n=null,injectedProps:i={}}){const r=ro(Pf,this);null==t&&(t={ui:{},fields:{}});const o=Zd.initFormByField({},e.actions[r].fields,ro(Df,this),ro(Mf,this),t.fields,n);return{loading:!this.getOptions("autoInit",!0),title:e.actions[r].title,description:e.actions[r].description,fields:e.actions[r].fields,form:o,...t.ui,...i}}function Hf(e){this.error(`${e} for ${this.getWorking("name")} form is not defined`)}var Gf=mi('<div class="block-container"><div class="form-paper"></div> <!></div>');function Kf(e,t){Oe(t,!0);let n=Yr(),i=Gr(t,"name",3,"default-form"),r=Gr(t,"showModes",3,!1),o=Gr(t,"mode",15,"default"),s=Gr(t,"forms",19,()=>[]);let a=yt(Ct([]));function l(){$t(a,s().filter(e=>o()!==e.mode).map(e=>({title:e.title,outlined:!0,type:"link",action(){var t;t=e.mode,o(t),n("mode",t),l()}})),!0)}Kr(()=>{l()});var u=Gf(),c=Vt(u),d=Wt(c,2),f=e=>{Cs(e,{centered:!0,classes:"mt-4",get values(){return Hn(a)},set values(e){$t(a,e,!0)}})};Li(d,e=>{r()&&e(f)}),ne(u),on(()=>{lr(u,"id",`${i()??""}-form-set`),lr(c,"id",`${i()??""}-form-set-container`)}),ki(e,u),Ae()}const Jf="form-set";var Yf=new WeakMap,Qf=new WeakMap,Zf=new WeakMap,Xf=new WeakMap,eh=new WeakSet;let th=function(e){function t({options:e={},formComponent:n=Ef,formSetComponent:i=Kf}){var r;return io(this,t),ao(r=to(this,t,[{options:{name:Jf,mode:"default",showModes:!0,...e}}]),eh),oo(r,Yf,null),oo(r,Qf,null),oo(r,Zf,null),oo(r,Xf,null),so(Qf,r,n),so(Yf,r,i),r.setFormMode(r.getOptions("mode")),r.initUI(),r}return ho(t,e),uo(t,[{key:"initUI",value:function(){var e=this;const t=this.getFrameTargetEl();for(;t.children.length;)t.removeChild(t.firstChild);so(Xf,this,new(ro(Yf,this))({target:t,props:eo(eh,this,nh).call(this)})),ro(Xf,this).$on("mode",function(t){e.setFormMode(t.detail),e.updateForm()}),this.updateForm()}},{key:"setFormMode",value:function(e){this.isModeExists(e)?this.setWorking("mode",e):(this.setWorking("mode",this.getFirstMode()),this.updateFormModeInUI())}},{key:"updateFormModeInUI",value:function(){ro(Xf,this)&&null!==this.getWorking("mode")&&ro(Xf,this).$set({mode:this.getWorking("mode")})}},{key:"getFormMode",value:function(){return this.getWorking("mode")}},{key:"updateForm",value:function(){this.destroyForm(),null!==this.getWorking("mode")&&this.renderForm()}},{key:"renderForm",value:function(){var e=this;const t=this.getFormTargetEl(),n=this.getFormConfig();if(!(t instanceof HTMLElement&&n))throw new Error("error while form rendering");const i=function(t){e.setFormMode(t),e.updateForm()};if(n.form){for(;t.children.length;)t.removeChild(t.firstChild);so(Zf,this,new n.form({options:{target:t,changeMode:i}}))}else n.props&&so(Zf,this,new(ro(Qf,this))({target:t,...n.props,changeMode:i}))}},{key:"getFormConfig",value:function(){var e=this;return this.getOptions("forms").find(function(t){return t.mode===e.getFormMode()})}},{key:"destroyForm",value:function(){const e=this.getFormTargetEl();if(e)for(;e.firstChild;)e.removeChild(e.lastChild);ro(Zf,this)&&ro(Zf,this).$destroy&&ro(Zf,this).$destroy(),so(Zf,this,null)}},{key:"destroyFrame",value:function(){ro(Xf,this)&&ro(Xf,this).$destroy&&ro(Xf,this).$destroy(),so(Xf,this,null)}},{key:"isModeExists",value:function(e){return this.getOptions("forms",[]).some(function(t){return t.mode===e})}},{key:"getFirstMode",value:function(){const e=this.getOptions("forms",[]);return e.length>0?e[0].mode:null}},{key:"destroy",value:function(){so(Yf,this,null),so(Qf,this,null),this.destroyForm(),this.destroyFrame(),this.setData(null),this.setOptions(null),this.setWorking(null)}},{key:"getFrameTargetEl",value:function(){const e=this.getOptions("target",".form-set");if(e instanceof HTMLElement)return e;if("string"==typeof e)return document.querySelector(e);throw new Error("form set target is not HTMLElement or string")}},{key:"getFormTargetEl",value:function(){const e=this.getOptions("name",Jf);return document.querySelector(`#${e}-form-set-container`)}}])}(kc);function nh(){return{showModes:this.getOptions("showModes",!0),mode:this.getFormMode(),forms:this.getOptions("forms",[]),name:this.getOptions("name",Jf)}}var ih=mi('<li class="is-active"><a aria-current="page"> </a></li>'),rh=mi('<li class="is-plain-crumb"> </li>'),oh=mi("<li><a> </a></li>"),sh=mi('<nav class="breadcrumb" aria-label="breadcrumbs"><ul></ul></nav>');fi(["click"]);let ah=yt(Ct({})),lh=function(){function e(){io(this,e)}return uo(e,null,[{key:"initUIProps",value:function(e,t){$t(ah,{items:this.getBreadcrumbs(),root:e,go:t},!0)}},{key:"render",value:function({target:t,root:n="",navigate:i}){return this.remove(),e.UIConstructor&&(this.initUIProps(n,i),this.ui=Ii(e.UIConstructor,{target:t,props:Hn(ah)})),this}},{key:"setHead",value:function(e){return this.head.splice(0,this.head.length,...e),this}},{key:"setTail",value:function(e){return this.tail.splice(0,this.tail.length,...e),this}},{key:"getBreadcrumbs",value:function(){let e=[];return e.push(...this.head),e.push(...this.tail),e}},{key:"update",value:function(){this.ui&&(Hn(ah).items=this.getBreadcrumbs())}},{key:"remove",value:function(){return this.ui&&(umount(this.ui),this.ui=null),this}}])}();var uh;co(lh,"UIConstructor",null),co(lh,"ui",null),co(lh,"head",[]),co(lh,"tail",[]),lh.UIConstructor=function(e,t){Oe(t,!0);const n=()=>Dr(Lo,"$LOCALE",i),[i,r]=Rr();let o=Gr(t,"root",3,""),s=Gr(t,"items",19,()=>[]),a=Gr(t,"go",3,null);function l(e){return"function"!=typeof a()||(e.preventDefault(),a()(e.currentTarget.dataset.href),!1)}var u=sh(),c=Vt(u);Fi(c,21,s,Ni,(e,t,i)=>{var r=bi(),a=zt(r),u=e=>{var i=ih(),r=Vt(i),s=Vt(r,!0);ne(r),ne(i),on(()=>{lr(r,"href",`${o()??""}${Hn(t).url??""}`),lr(r,"data-href",Hn(t).url),wi(s,n()[Hn(t).title])}),ki(e,i)},c=e=>{var i=bi(),r=zt(i),s=e=>{var i=rh(),r=Vt(i,!0);ne(i),on(()=>wi(r,n()[Hn(t).title])),ki(e,i)},a=e=>{var i=oh(),r=Vt(i);r.__click=l;var s=Vt(r,!0);ne(r),ne(i),on(()=>{lr(r,"href",`${o()??""}${Hn(t).url??""}`),lr(r,"data-href",Hn(t).url),wi(s,n()[Hn(t).title])}),ki(e,i)};Li(r,e=>{!1===Hn(t).url?e(s):e(a,!1)},!0),ki(e,i)};Li(a,e=>{s().length===i+1?e(u):e(c,!1)}),ki(e,r)}),ne(c),ne(u),ki(e,u),Ae(),r()};let ch=function(){return uo(function e(){io(this,e)},null,[{key:"hide",value:function(){}},{key:"setOptionsAdapter",value:function(e){return!this.optionsAdapter&&e&&(this.optionsAdapter=e),this}},{key:"setOptions",value:function(e){return this.options={...this.options,...e},this}},{key:"isDirectNavigation",value:function(){return this.options.directNavigation}},{key:"getOptions",value:function(){return this.optionsAdapter?this.optionsAdapter.getOptions(this.options):this.options}},{key:"initField",value:function(e,t=[]){var n=this;e.forEach(function(e){t.forEach(function(t){Object.hasOwn(e,t)||(e[t]=n.DEFAULT[t])}),Object.hasOwn(e,"items")&&n.initField(e.items,t)})}},{key:"sortList",value:function(e){var t=this;e.sort(function(e,n){return Object.hasOwn(e,"items")&&t.sortList(e.items),Object.hasOwn(n,"items")&&t.sortList(n.items),e.priority===n.priority?e.title>n.title?1:-1:e.priority<n.priority?1:-1})}},{key:"removeDublicates",value:function(e){for(let t=0;t<e.length;t++){let n=e[t].priority;e.filter(function(n){return n.id===e[t].id}).forEach(function(t,i){0!==i&&(t.priority<n&&(n=t.priority),e.splice(e.indexOf(t),1))}),e[t].priority=n}return e}},{key:"prepareData",value:function(){let e=[];e.push(...this.getOptions().items);let t=[];t.push(...this.getOptions().sections),this.initField(t,["priority"]),this.removeDublicates(t),this.initField(e,["priority","section","type"]),this.sortList(t),t.push({id:this.DEFAULT.section,title:this.DEFAULT.sectionTitle}),this.sortList(e),this.sections=t,this.items=e}},{key:"remove",value:function(){this.menu&&(Ci(this.menu),this.menu=null,clearInterval(this.interval))}},{key:"updateIndicator",value:function(e,t,n){this.updateSection(e,function(e){e.indicator.state=n}),this.updateItem(t,function(e){e.indicator.state=n})}},{key:"updateTag",value:function(e,t,n){this.updateSection(e,function(e){e.tag=n}),this.updateItem(t,function(e){e.tag=n})}},{key:"updateSectionTag",value:function(e,t){this.updateSection(e,function(e){e.tag={...e.tag,...t}})}},{key:"updateItemTag",value:function(e,t){this.updateItem(e,function(e){e.tag={...e.tag,...t}})}},{key:"updateSection",value:function(e,t){if(this.sections&&e){for(let n in this.sections)this.sections[n].id===e&&t(this.sections[n]);this.menu&&this.menu.$set({sections:this.sections})}}},{key:"updateSectionItems",value:function(e,t){if(this.sections&&e){let n=this.items.filter(function(t){return t.section===e});for(let e of n)this.items.splice(this.items.indexOf(e),1);this.items.push(...t(n)),this.menu&&this.menu.$set({items:this.items})}}},{key:"updateItem",value:function(e,t){e&&this.items&&(this.items.forEach(function(n){n.id===e&&t(n)}),this.menu&&this.menu.$set({items:this.items}))}},{key:"isTouch",value:function(){return bo.isMobile(!0)}},{key:"getSectionComponent",value:function(){}}])}();uh=ch,co(ch,"MAX_TOUCH_WIDTH",1023),co(ch,"INTERVAL_UPDATE_ACTIVE_ITEM",200),co(ch,"DEFAULT",{section:"any",sectionTitle:"Меню",priority:0,type:"link",open:!1}),co(ch,"optionsAdapter",void 0),co(ch,"directNavigation",!1),co(ch,"menu",void 0),co(ch,"options",{directNavigation:!1,navigate:function(e){if(uh.hide(),!uh.isDirectNavigation()&&uh.optionsAdapter){const t=uh.optionsAdapter.getNavigateFunction();if(t)return t(e.short)}document.location.assign(e.full)}}),co(ch,"items",[]),co(ch,"sections",[]),co(ch,"location",void 0),co(ch,"interval",void 0);var dh=mi('<a class="navbar-item"><!> <!></a>');var fh=mi("<!> <!> <!>",1);function hh(e,t){Oe(t,!0);const[n,i]=Rr();var r=fh(),o=zt(r),s=e=>{Ql(e,Hr(()=>t.item.icon))},a=e=>{var i=bi(),r=zt(i),o=e=>{const n=at(()=>Sa.get(t.item.component));var i=bi();Wi(zt(i),()=>Hn(n),(e,n)=>{n(e,Hr({get id(){return t.item.id}},()=>t.item.props))}),ki(e,i)},s=e=>{var i=yi();on(()=>wi(i,Dr(Lo,"$LOCALE",n)[t.item.title])),ki(e,i)};Li(r,e=>{"component"===t.item.type&&t.item.component&&Sa.contains(t.item.component)?e(o):e(s,!1)},!0),ki(e,i)};Li(o,e=>{t.item.icon?e(s):e(a,!1)});var l=Wt(o,2),u=e=>{ts(e,Hr({top:!0,right:!0,size:"small",get id(){return t.item.id}},()=>t.item.tag))};Li(l,e=>{t.item.tag&&e(u)});var c=Wt(l,2),d=e=>{us(e,Hr({get id(){return t.item.id}},()=>t.item.indicator))};Li(c,e=>{t.item.indicator&&e(d)}),ki(e,r),Ae(),i()}var vh=mi("<hr/>"),gh=mi("<a><!></a>"),ph=mi('<div role="button" tabindex="0"><!></div>'),mh=mi("<!> <!>",1);function yh(e,t){Oe(t,!0);const n=Yr();let i=Gr(t,"root",3,""),r=Gr(t,"item",19,()=>({})),o=Gr(t,"hidden",3,""),s=Gr(t,"classes",3,"");function a(e){n("click",{event:e,element:r()})}var l=mh(),u=zt(l),c=e=>{var t=vh();on(()=>Qi(t,1,`navbar-divider ${o()?`is-hidden-${o()}`:""} `)),ki(e,t)};Li(u,e=>{r().break&&e(c)});var d=Wt(u,2),f=e=>{var t=gh();t.__click=a,hh(Vt(t),{get item(){return r()}}),ne(t),on(()=>{Qi(t,1,`navbar-item ${o()?`is-hidden-${o()}`:""} ${r().classes??""} ${s()??""} `),lr(t,"href",`${i()??""}${r().url??""}`),lr(t,"data-href",r().url)}),ki(e,t)},h=e=>{var t=ph();t.__click=a,t.__keyup=a,hh(Vt(t),{get item(){return r()}}),ne(t),on(()=>Qi(t,1,`navbar-item ${o()?`is-hidden-${o()}`:""} ${r().classes??""} ${s()??""}`)),ki(e,t)};Li(d,e=>{r().url?e(f):e(h,!1)}),ki(e,l),Ae()}fi(["click","keyup"]);var bh=mi('<div><a href=""><!></a> <div></div></div>'),kh=mi("<a><!></a>"),$h=mi('<div role="button" tabindex="0"><!></div>');fi(["click","keyup"]);const _h=Ur({open:!0});var wh=mi('<a href="" role="button" aria-label="menu" aria-expanded="false" data-target="navbar"><span aria-hidden="true"></span> <span aria-hidden="true"></span> <span aria-hidden="true"></span></a>');fi(["click"]);var Ih,Oh=mi('<div class="navbar-brand"><!> <!> <!> <!></div> <div id="navbar"><div class="navbar-start"></div> <div class="navbar-end"></div></div>',1);function Ah(e,t){Oe(t,!0);let n=Gr(t,"sections",19,()=>[]),i=Gr(t,"items",19,()=>[]),r=Gr(t,"root",3,""),o=Gr(t,"navigate",3,null),s=Gr(t,"brand",3,!1),a=Gr(t,"showBurger",3,!0),l=Gr(t,"burgerControlsSidemenu",3,!0),u=yt(!0);function c({detail:e}){let{event:t,element:n}=e;return Object.hasOwn(n,"action")?n.action(t,n):(t.preventDefault(),"function"==typeof o()&&o()({full:t.currentTarget.getAttribute("href"),short:t.currentTarget.dataset.href}),!1)}let d={},f={};function h({detail:e}){l()?SideMenu.toggle():(dispatch("toggleBurger",e),$t(u,e.closed,!0))}var v=Oh(),g=zt(v),p=Vt(g),m=e=>{!function(e,t){let n=Gr(t,"url",3,"/"),i=Gr(t,"title",3,""),r=Gr(t,"icon",19,()=>({src:"https://via.placeholder.com/56x28",width:28,height:56}));var o=dh(),s=Vt(o);Ql(s,Hr(r));var a=Wt(s,2),l=e=>{var t=bi();ji(zt(t),()=>`<span class="navbar-item-brand-title">${i()}</span>`),ki(e,t)};Li(a,e=>{i()&&e(l)}),ne(o),on(()=>lr(o,"href",n())),ki(e,o)}(e,Hr(s))};Li(p,e=>{s()&&e(m)});var y=Wt(p,2);Fi(y,17,n,e=>e.id,(e,t)=>{var n=bi(),i=zt(n),o=e=>{yh(e,{hidden:"desktop",get item(){return Hn(t)},get root(){return r()},$$events:{click:c}})};Li(i,e=>{Hn(t).showOnTouch&&e(o)}),ki(e,n)});var b=Wt(y,2);Fi(b,17,i,e=>e.id,(e,t)=>{var n=bi(),i=zt(n),o=e=>{yh(e,{hidden:"desktop",get item(){return Hn(t)},get root(){return r()},onclick:c})};Li(i,e=>{Hn(t).showOnTouch&&e(o)}),ki(e,n)});var k=Wt(b,2),$=e=>{!function(e,t){Oe(t,!0);const n=Yr();let i=Gr(t,"events",31,()=>Ct({})),r=Gr(t,"register",19,()=>Jo.registerWidgetEvents.bind(Jo)),o=Gr(t,"closed",15,!0),s=Gr(t,"onUpdate",3,e=>{o(e.closed)});Kr(()=>{Jo.objHas(i(),"top-navbar-burger:update")||i(i()["top-navbar-burger:update"]=s(),!0),r()(i())}),_h.subscribe(e=>(o(!e.open),e));var a=wh();a.__click=function(e){return e.preventDefault(),o(!o()),n("toggle",{closed:o()}),!1},on(()=>Qi(a,1,"navbar-burger "+(o()?"":"is-active"))),ki(e,a),Ae()}(e,{$$events:{toggle:h}})};Li(k,e=>{a()&&e($)}),ne(g);var _=Wt(g,2),w=Vt(_);Fi(w,21,i,Ni,(e,t)=>{var n=bi(),i=zt(n),r=e=>{yh(e,{hidden:"touch",get item(){return Hn(t)},onclick:c})};Li(i,e=>{"start"===Hn(t).place&&e(r)}),ki(e,n)}),ne(w);var I=Wt(w,2);Fi(I,21,n,e=>e.id,(e,t)=>{var n=bi(),i=zt(n),o=e=>{!function(e,t){Oe(t,!0);const n=Yr();let i=Gr(t,"root",3,""),r=Gr(t,"section",19,()=>({})),o=Gr(t,"items",19,()=>[]),s=Gr(t,"hidden",3,""),a=Gr(t,"hoverable",3,!0),l=Gr(t,"arrowless",3,!1),u=Gr(t,"right",3,!1);function c(e){n("click",{event:e,element:r()})}var d=bi(),f=zt(d),h=e=>{var n=bh(),d=Vt(n);d.__click=c,hh(Vt(d),{get item(){return r()}}),ne(d);var f=Wt(d,2);Fi(f,21,o,e=>e.id,(e,n)=>{yh(e,{get root(){return i()},get item(){return Hn(n)},$$events:{click(e){xr.call(this,t,e)}}})}),ne(f),ne(n),on(()=>{Qi(n,1,`navbar-item has-dropdown ${a()?"is-hoverable":""} ${s()?`is-hidden-${s()}`:""} `),Qi(d,1,"navbar-link "+(l()?"is-arrowless":"")),Qi(f,1,"navbar-dropdown "+(u()?"is-right":""))}),ki(e,n)},v=e=>{var t=bi(),n=zt(t),o=e=>{var t=kh();t.__click=c,hh(Vt(t),{get item(){return r()}}),ne(t),on(()=>{Qi(t,1,`navbar-item ${s()?`is-hidden-${s()}`:""} `),lr(t,"href",`${i()??""}${r().url??""}`),lr(t,"data-href",r().url)}),ki(e,t)},a=e=>{var t=$h();t.__click=c,t.__keyup=c,hh(Vt(t),{get item(){return r()}}),ne(t),on(()=>Qi(t,1,`navbar-item ${s()?`is-hidden-${s()}`:""} `)),ki(e,t)};Li(n,e=>{r().url?e(o):e(a,!1)},!0),ki(e,t)};Li(f,e=>{o().length?e(h):e(v,!1)}),ki(e,d),Ae()}(e,{right:!0,get hidden(){return Hn(t).hidden},get root(){return r()},get section(){return Hn(t)},get items(){return f[Hn(t).id]},onclick:c})};Li(i,e=>{(d[Hn(t).id]||Hn(t).indicator||Hn(t).tag)&&"end"==Hn(t).place&&e(o)}),ki(e,n)}),ne(I),ne(_),on(()=>Qi(_,1,"navbar-menu "+(Hn(u)?"":"is-active"))),ki(e,v),Ae()}let Sh=yt(Ct({})),Ch=function(e){function t(){return io(this,t),to(this,t,arguments)}return ho(t,e),uo(t,null,[{key:"initMenuProps",value:function(){$t(Sh,{brand:this.getOptions().brand,items:this.items,sections:this.sections,root:this.getOptions().root,navigate:this.getOptions().navigate},!0)}},{key:"render",value:function(e){if(e&&this.setApp(e),this.prepareData(),!this.menu){this.initMenuProps();let e=document.querySelector(this.getOptions().targetSelector);if(!e)return;this.menu=Ii(Ah,{target:e,props:this.MENU_PROPS}),this.interval=setInterval(this.updateMenuActiveItem.bind(this),t.INTERVAL_UPDATE_ACTIVE_ITEM)}}},{key:"updateMenu",value:function(e){Array.from(document.querySelectorAll(this.getOptions().targetSelector+" aside.menu a")).forEach(function(t){t.href==e||e.href&&0==e.href.indexOf(t.href)?t.classList.add("is-active"):t.classList.remove("is-active")})}},{key:"updateMenuActiveItem",value:function(){let e=window.location.toString(),t=this.location;t?e!==t&&(this.location=e,this.updateMenu(e)):(this.location=e,this.updateMenu(e))}},{key:"toggle",value:function(){document.querySelector(this.getOptions().targetSelector).classList.toggle("is-active")}},{key:"hide",value:function(){document.querySelector(this.getOptions().targetSelector).classList.remove("is-active")}},{key:"show",value:function(){document.querySelector(this.getOptions().targetSelector).classList.add("is-active")}},{key:"setBurgerState",value:function(e){Hn(Sh).menuClosed=e}}])}(ch);Ih=Ch,co(Ch,"DEFAULT",{section:"any",sectionTitle:"Меню",priority:0,type:"link",place:"main"}),co(Ch,"options",{brand:!1,type:"top",items:[],sections:[],targetSelector:"#top-menu",root:"/",directNavigation:!1,navigate:function(e){if(Ih.hide(),!Ih.isDirectNavigation()&&Ih.app){let t=Ih.app.getWorking("router");if(t)return t.navigate(e.short)}document.location.assign(e.full)}});var Eh=mi("<li><a> <!> <!></a></li>"),Lh=mi("<li> <!> <!></li>");fi(["click"]);var Th=mi('<span class="icon is-small is-toggle-submenu is-pulled-right" role="button" tabindex="0"><i aria-hidden="true"></i></span>');function xh(e,t){Oe(t,!0);const n="fa-angle-down",i="fa-angle-up";let r=Gr(t,"icon_opened",19,()=>n),o=Gr(t,"icon_closed",19,()=>i),s=Gr(t,"closed",7),a=Gr(t,"ontoggle",3,()=>!0);function l(e){return e&&e.preventDefault()&&e.stopPropagation(),s(!s()),a()(s())||s(!s()),!1}var u=Th();u.__click=l,u.__keyup=l;var c=Vt(u);ne(u),on(()=>Qi(c,1,`fas ${(s()?o():r())??""}`)),ki(e,u),Ae()}fi(["click","keyup"]);var Nh=mi('<span class="is-no-link"> </span>'),Fh=mi("<!> <!> <!> <!>",1);function Uh(e,t){Oe(t,!0);const[n,i]=Rr();let r=Gr(t,"item",19,()=>({}));var o=Fh(),s=zt(o),a=e=>{zl(e,Hr(()=>r().icon))},l=e=>{var t=bi(),i=zt(t),o=e=>{const t=at(()=>Sa.get(r().component));var n=bi();Wi(zt(n),()=>Hn(t),(e,t)=>{t(e,Hr({get id(){return r().id}},()=>r().props))}),ki(e,n)},s=e=>{var t=Nh(),i=Vt(t,!0);ne(t),on(()=>wi(i,Dr(Lo,"$LOCALE",n)[r().title])),ki(e,t)};Li(i,e=>{"component"===r().type&&r().component&&Sa.contains(r().component)?e(o):e(s,!1)},!0),ki(e,t)};Li(s,e=>{r().icon?e(a):e(l,!1)});var u=Wt(s,2),c=e=>{ts(e,Hr({get id(){return r().id}},()=>r().tag))};Li(u,e=>{r().tag&&e(c)});var d=Wt(u,2),h=e=>{us(e,Hr({get id(){return r().id}},()=>r().indicator))};Li(d,e=>{r().indicator&&e(h)}),zi(Wt(d,2),()=>t.children??f),ki(e,o),Ae(),i()}var Ph=mi('<a class="has-subitems"><!></a>'),Mh=mi("<li><!> <!></li>"),Dh=mi("<ul></ul>");function Rh(e,t){Oe(t,!0);let n=Gr(t,"root",3,""),i=Gr(t,"items",19,()=>[]),r=Gr(t,"onnavigate",3,()=>{});let o=Ct((e=>{const t={};return e.forEach((e,n)=>t[n]=e.closed),t})(i()));function s(e){return e.preventDefault(),r()({full:e.target.getAttribute("href"),short:e.target.dataset.href}),!1}var a=Dh();Fi(a,21,i,Ni,(e,t,i)=>{var a=bi(),l=zt(a),u=e=>{var a=Mh(),l=Vt(a),u=e=>{var r=Ph();r.__click=s,Uh(Vt(r),{get item(){return Hn(t)},children:(e,t)=>{xh(e,{get closed(){return o[i]},set closed(e){o[i]=e}})},$$slots:{default:!0}}),ne(r),on(()=>{lr(r,"href",`${n()??""}${Hn(t).url??""}`),lr(r,"data-href",Hn(t).url)}),ki(e,r)},c=e=>{Uh(e,{get item(){return Hn(t)},children:(e,t)=>{xh(e,{get closed(){return o[i]},set closed(e){o[i]=e}})},$$slots:{default:!0}})};Li(l,e=>{void 0!==Hn(t).url&&!1!==Hn(t).url?e(u):e(c,!1)}),Rh(Wt(l,2),{get root(){return n()},get items(){return Hn(t).items},get onnavigate(){return r()},get closed(){return o[i]},set closed(e){o[i]=e}}),ne(a),on(()=>Qi(a,1,`is-no-follow-subtitle ${Hn(t).classes??""}`)),ki(e,a)},c=e=>{!function(e,t){Oe(t,!0);const n=()=>Dr(Lo,"$LOCALE",i),[i,r]=Rr();let o=Gr(t,"root",3,""),s=Gr(t,"item",19,()=>({})),a=Gr(t,"onnavigate",3,()=>{});function l(e){return e.preventDefault(),a()({full:e.target.getAttribute("href"),short:e.target.dataset.href}),!1}var u=bi(),c=zt(u),d=e=>{var t=Eh(),i=Vt(t);i.__click=l;var r=Vt(i),a=Wt(r),u=e=>{us(e,Hr({get id(){return s().id}},()=>s().tag))};Li(a,e=>{s().tag&&e(u)});var c=Wt(a,2),d=e=>{us(e,Hr({get id(){return s().id}},()=>s().indicator))};Li(c,e=>{s().indicator&&e(d)}),ne(i),ne(t),on(()=>{Qi(t,1,Gi(s().classes)),lr(i,"href",`${o()??""}${s().url??""}`),lr(i,"data-href",s().url),wi(r,`${n()[s().title]??""} `)}),ki(e,t)},f=e=>{var t=Lh(),i=Vt(t),r=Wt(i),o=e=>{us(e,Hr({get id(){return s().id}},()=>s().tag))};Li(r,e=>{s().tag&&e(o)});var a=Wt(r,2),l=e=>{us(e,Hr({get id(){return s().id}},()=>s().indicator))};Li(a,e=>{s().indicator&&e(l)}),ne(t),on(()=>{Qi(t,1,`is-no-follow-subtitle ${s().classes??""}`),wi(i,`${n()[s().title]??""} `)}),ki(e,t)};Li(c,e=>{void 0!==s().url&&!1!==s().url?e(d):e(f,!1)}),ki(e,u),Ae(),r()}(e,{get root(){return n()},get item(){return Hn(t)},get onnavigate(){return r()}})};Li(l,e=>{Hn(t).items&&Hn(t).items.length?e(u):e(c,!1)}),ki(e,a)}),ne(a),on(()=>Qi(a,1,"menu-list "+(t.closed?"is-closed":""))),ki(e,a),Ae()}fi(["click"]);var jh,Vh=mi("<p><!> <!> <!></p>"),zh=mi("<!> <!>",1);function Wh(e,t){Oe(t,!0);const[n,i]=Rr();let r=Gr(t,"items",19,()=>[]),o=Gr(t,"root",3,""),s=Gr(t,"onnavigate",3,()=>{}),a=at(()=>r().filter(e=>t.section.id===e.section));var l=zh(),u=zt(l),c=e=>{var i=bi(),r=zt(i),o=e=>{var i=Vh(),r=Vt(i),o=e=>{const n=at(()=>Sa.get(t.section.component));var i=bi();Wi(zt(i),()=>Hn(n),(e,n)=>{n(e,Hr({get id(){return t.section.id}},()=>t.section.props))}),ki(e,i)},s=e=>{var i=yi();on(()=>wi(i,Dr(Lo,"$LOCALE",n)[t.section.title])),ki(e,i)};Li(r,e=>{"component"===t.section.type&&t.section.component&&Sa.contains(t.section.component)?e(o):e(s,!1)});var a=Wt(r,2),l=e=>{us(e,Hr({get id(){return t.section.id}},()=>t.section.tag))};Li(a,e=>{t.section.tag&&e(l)});var u=Wt(a,2),c=e=>{us(e,Hr({get id(){return t.section.id}},()=>t.section.indicator))};Li(u,e=>{t.section.indicator&&e(c)}),ne(i),on(()=>Qi(i,1,`menu-label ${t.section.classes??""}`)),ki(e,i)};Li(r,e=>{(Hn(a).length||t.section.component||t.section.tag||t.section.indicator)&&e(o)}),ki(e,i)};Li(u,e=>{t.section&&e(c)});var d=Wt(u,2),f=e=>{Rh(e,{get root(){return o()},get items(){return Hn(a)},get onnavigate(){return s()}})};Li(d,e=>{Hn(a).length&&e(f)}),ki(e,l),Ae(),i()}function Bh(e,t){Oe(t,!0);let n=Gr(t,"root",3,""),i=Gr(t,"items",19,()=>[]),r=Gr(t,"sections",19,()=>[]),o=Gr(t,"navigate",3,null);function s(e){"function"==typeof o()&&o()(e)}var a=bi();Fi(zt(a),17,r,Ni,(e,t)=>{Wh(e,{get section(){return Hn(t)},get items(){return i()},get root(){return n()},onnavigate:s})}),ki(e,a),Ae()}const qh="side";let Hh=yt(Ct({})),Gh=function(e){function t(){return io(this,t),to(this,t,arguments)}return ho(t,e),uo(t,null,[{key:"initMenuUIProps",value:function(){$t(Hh,{items:this.items,sections:this.sections,root:this.getOptions().root,navigate:this.getOptions().navigate},!0)}},{key:"render",value:function(e){e&&this.setApp(e),this.prepareData(),this.menu||(this.initMenuUIProps(),this.createUI())}},{key:"update",value:function(){this.menu&&(Ci(this.menu),this.createUI())}},{key:"createUI",value:function(){let e=document.querySelector(this.getOptions().targetSelector);e&&(this.menu=Ii(Bh,{target:e,props:Hn(Hh)}),this.initSizeResponse(),this.interval=setInterval(this.updateMenuActiveItem.bind(this),this.INTERVAL_UPDATE_ACTIVE_ITEM),this.bindToggle())}},{key:"itemIsActive",value:function(e){return(this.location+"/").indexOf(e+"/")>-1}},{key:"updateMenu",value:function(){var e=this;Array.from(document.querySelectorAll(this.getOptions().targetSelector+" a")).forEach(function(t){e.itemIsActive(t.getAttribute("href"))?t.classList.add("is-active"):t.classList.remove("is-active")})}},{key:"updateMenuActiveItem",value:function(){let e=window.location.toString(),t=this.location;t?e!==t&&(this.location=e,this.updateMenu()):(this.location=e,this.updateMenu())}},{key:"initSizeResponse",value:function(){this.nav=document.querySelector("nav.navbar"),this.aside=document.querySelector("aside"),this.main=document.querySelector("main"),this.resizeAsideAndMain(this.aside,this.main,this.nav),this.resizeMain(this.main,this.aside),window.addEventListener("resize",this.resizeMain.bind(this)),this.isTouch()&&(this.getOptions().open?this.show():this.hide())}},{key:"resizeMain",value:function(){if(this.isTouch())this.aside.classList.contains("is-active")?this.main.style.display="none":(this.main.style.display="block",this.main.style.marginLeft="0px");else{let e=this.aside.getBoundingClientRect();this.main.style.display="block","0px"===this.main.style.height&&(this.main.style.height="auto"),this.main.style.marginLeft=e.width+e.left+"px"}}},{key:"resizeAside",value:function(){if("none"!==this.aside.style.display){let e=this.nav.getBoundingClientRect();this.aside.style.height=window.innerHeight-e.height+"px",this.aside.style.marginTop=e.height+"px"}}},{key:"resizeAsideAndMain",value:function(){let e=this.nav.getBoundingClientRect();this.aside.style.height=window.innerHeight-e.height+"px"}},{key:"bindToggle",value:function(){var e=this;let t=document.querySelectorAll(this.getOptions().toggleSelector);Array.from(t).forEach(function(t){t.removeEventListener("click",e.toggle.bind(e)),t.addEventListener("click",e.toggle.bind(e))})}},{key:"toggle",value:function(e){return e&&e.preventDefault(),this.aside&&(this.isTouch()?this.aside.classList.toggle("is-active"):this.aside.classList.toggle("is-closed"),this.resizeMain()),!1}},{key:"hide",value:function(e){return e&&e.preventDefault(),this.aside&&(this.isTouch()?this.aside.classList.remove("is-active"):this.aside.classList.add("is-closed"),this.resizeMain()),_h.update(function(e){return e.open=!1,e}),!1}},{key:"show",value:function(e){return e&&e.preventDefault(),this.aside&&(this.isTouch()?this.aside.classList.add("is-active"):this.aside.classList.remove("is-closed"),this.resizeMain()),_h.update(function(e){return e.open=!0,e}),!1}},{key:"isOpen",value:function(){return!this.aside||(this.isTouch()?this.aside.classList.contains("is-active"):!this.aside.classList.contains("is-closed"))}}])}(ch);jh=Gh,co(Gh,"nav",void 0),co(Gh,"main",void 0),co(Gh,"aside",void 0),co(Gh,"DEFAULT",{section:"any",sectionTitle:"Меню",priority:0,open:!0,type:"link"}),co(Gh,"options",{directNavigation:!1,type:qh,items:[],sections:[],targetSelector:`#${qh}-menu`,toggleSelector:`.${qh}-menu-toggle`,root:"/",open:!0,navigate:function(e){if(jh.isTouch()&&(jh.hide(),jh.app&&jh.app.emit("top-navbar-burger:update",{closed:!0})),!jh.isDirectNavigation()&&jh.app){let t=jh.app.getWorking("router");if(t)return t.navigate(e.short)}document.location.assign(e.full)}});const Kh=function(e){return Object.hasOwn(e,"status")&&Object.hasOwn(e,"result")?e.result:e};const Jh=["create","update","list","delete","details"];let Yh=function(){return uo(function e(){io(this,e)},null,[{key:"preload",value:async function(e,t="list"){try{if(!Jh.includes(t))return;let n=e.getOptions(`${t}.preload`,{});if(0==Object.keys(n).length&&(n=e.getOptions("preload",{})),Object.keys(n).length>0){let i=Object.keys(n),r=[];i.forEach(function(t){let i=Jo.lowerFirstLetter(n[t]),o=e.make[i]({});r.push(o.$listAll())});let o=await Promise.all(r);for(let n=0;n<i.length;n++){const r=i[n];if("ok"===o[n].status&&Array.isArray(o[n].result)){const i=o[n].result.map(function(e){return{id:e._id,title:e.title}});e.setOptions(`variants.${t}.${r}`,i)}}}e.log("preload finished")}catch(t){e.report(t),e.showErrorMessage(t)}}}])}();let Qh=function(){function e(){io(this,e)}return uo(e,null,[{key:"extractActionName",value:function(e,t){let n="list";return 1===t.length?n="create"===t[0]?"create":e.actionHandlerExists(t[0])?t[0]:"details":t.length>1&&(n="delete"===t[1]?"delete":"update"===t[1]?"update":t[1]),n}},{key:"route",value:function(t,n){try{const i=e.extractActionName(t,n);return t.setCurrentAction(i),t.runAction(i,n)}catch(e){t.report(e),t.showErrorMessage(e)}}}])}(),Zh=function(){return uo(function e(){io(this,e)},null,[{key:"error",value:function(e,t,n){e.setUI("__message__",new dc({target:e.getContainerInnerElement(),props:{title:t,message:n}}))}},{key:"success",value:function(e,t,n){e.setUI("__message__",new fc({target:e.getContainerInnerElement(),props:{title:t,message:n}}))}}])}();const Xh="Просмотр";let ev=function(){return uo(function e(){io(this,e)},null,[{key:"NAVIGATION_DELAY",get:function(){return Ol}},{key:"deafultBreadcrumbsTail",get:function(){return Xh}},{key:"breadcrumbsTails",get:function(){return{preset:Xh,set:'Просмотр, "{:title}"'}}},{key:"getBreadcrumbsTail",value:function(e){return this.breadcrumbsTails?Jo.select(this.breadcrumbsTails,e,this.deafultBreadcrumbsTail):""}},{key:"ACTION",get:function(){return"details"}},{key:"MODEL_ACTION_GET",get:function(){return"get"}},{key:"MODEL_ACTION_PUT",get:function(){return"get"}},{key:"UIConstructor",get:function(){return jf}},{key:"TRANSFORMER",get:function(){return Kh}},{key:"getIdField",value:function(e){return e.getOptions(`${this.ACTION}.idField`,"_id")}},{key:"loadDataQuery",value:function(e,t){const n=this.getIdField(e);return{[n]:t[0]}}},{key:"loadData",value:async function(e,t){const n=this.loadDataQuery(e,t),i=this.getModelActionName(e);return await e.getModel(n)[`$${i}`]()}},{key:"getModelActionName",value:function(e){return e.getOptions(`${this.ACTION}.actionName`,this.MODEL_ACTION_GET)}},{key:"presetBreadcrumbs",value:function(e,t){e.setBreadcrumbs([{title:this.getBreadcrumbsTail("preset"),url:e.getModelActionURL(t[0],!1)}])}},{key:"getTitle",value:function(e,t,n){return e.getItemTitle(n.result)}},{key:"setBreadcrumbs",value:function(e,t,n){const i=this.getTitle(e,t,n),r=this.getBreadcrumbsTail("set");e.setBreadcrumbs([{title:r?Zo.format(r,{title:i}):i,url:e.getModelActionURL(t[0],!1)}])}},{key:"isResponseBad",value:function(e){return!e||"ok"!==e.status}},{key:"getValidators",value:function(e){return e.getValidators&&e.getValidators()||e.getOptions("Validators")}},{key:"prepareUIOptions",value:function(e,t){const n=this.getModelActionName(e);return{options:{target:e.getContainerInnerElement(),model:e.getModelName(),action:n,name:`${e.getName()}.${this.ACTION}Form`,fields:{readonly:!0},validators:this.getValidators(e),variants:e.getOptions(`variants.${this.ACTION}`,{}),masters:e.getOptions(`${this.ACTION}.masters`,{}),injected:e.getOptions(`${this.ACTION}.injected`,{})},data:this.TRANSFORMER(t.result)}}},{key:"getUI",value:function(e){return e.getUI(this.ACTION)}},{key:"setUI",value:function(e,t){e.setUI(this.ACTION,t)}},{key:"setUILoading",value:function(e){this.getUI(e).$set({loading:!0})}},{key:"setUILoaded",value:function(e){this.getUI(e).$set({loading:!1})}},{key:"setUIError",value:function(e,t){this.getUI(e).$set({error:t})}},{key:"bindUIEvents",value:function(e,t,n){Jo.isFunc(e.goBack)&&this.bindUIEvent(e,"reject",function(){return e.goBack()})}},{key:"bindUIEvent",value:function(e,t,n){const i=this.getUI(e);return i.$on?i.$on(t,n):i.on?i.on(t,n):void 0}},{key:"isUIRendered",value:function(e){return!!this.getUI(e)||(e.$destroyUI(),!1)}},{key:"tweakUIOptions",value:function(e){return e}},{key:"createUI",value:function(e,t,n){return Jo.isFunc(e)?Ii(e,this.tweakUIOptions(this.prepareUIOptions(t,n))):new e(this.tweakUIOptions(this.prepareUIOptions(t,n)))}},{key:"run",value:async function(e,t){try{if(e.emit(`before:render:${this.ACTION}`,t),this.isUIRendered(e))return;e.renderLoadingScreen&&e.renderLoadingScreen(),await e.preloadVariants(this.ACTION),this.presetBreadcrumbs(e,t);const n=await this.loadData(e,t);if(this.isResponseBad(n))return e.showErrorMessage(n);this.setBreadcrumbs(e,t,n);this.UIConstructor,this.createUI();this.setUI(e),this.bindUIEvents(e,t,n),e.emit(`after:render:${this.ACTION}`,t,n)}catch(n){e.emit(`exception:render:${this.ACTION}`,t,n),e.report(n),e.showErrorMessage(n)}finally{e.removeLoadingScreen&&e.removeLoadingScreen()}}},{key:"goBackAfterDelay",value:function(e){e.goBack(this.NAVIGATION_DELAY)}},{key:"goBack",value:function(e){e.goBack(0)}}])}();const tv="create";let nv=function(e){function t(){return io(this,t),to(this,t,arguments)}return ho(t,e),uo(t,null,[{key:"deafultBreadcrumbsTail",get:function(){return"Создание"}},{key:"breadcrumbsTails",get:function(){}},{key:"ACTION",get:function(){return tv}},{key:"MODEL_ACTION_GET",get:function(){return tv}},{key:"MODEL_ACTION_PUT",get:function(){return tv}},{key:"loadData",value:function(e,t={}){let n=e.createDefault();return n.getData&&(n=n.getData()),{status:"ok",result:n}}},{key:"getTitle",value:function(e,t,n){return e.getItemTitle(n)}},{key:"prepareUIOptions",value:function(e,t){const n=this.getModelActionName(e);return{options:{target:e.getContainerInnerElement(),model:e.getModelName(),action:n,name:`${e.getName()}.${this.ACTION}Form`,validators:this.getValidators(e),variants:e.getOptions(`variants.${this.ACTION}`,{}),masters:e.getOptions(`${this.ACTION}.masters`,{})},data:this.TRANSFORMER(t)}}},{key:"bindUIEvents",value:function(e,t,n){var i=this;Jo.isFunc(e.goBack)&&this.bindUIEvent(e,"reject",function(){return i.goBack(e)}),Jo.isFunc(e.onActionSubmit)&&this.bindUIEvent(e,"submit",async function(n){await e.onActionSubmit(i.ACTION,{...i.loadDataQuery(e,t),...n.detail})&&i.goBackAfterDelay(e)})}}])}(ev),iv=function(e){function t(){return io(this,t),to(this,t,arguments)}return ho(t,e),uo(t)}(nv),rv=function(e){function t(){return io(this,t),to(this,t,arguments)}return ho(t,e),uo(t,null,[{key:"tweakUIOptions",value:function(e){return e.options.ui={submit:{enabled:!1}},e}},{key:"run",value:async function(e,t){try{if(e.emit(`before:render:${this.ACTION}`,t),this.isUIRendered(e))return;e.renderLoadingScreen&&e.renderLoadingScreen(),await e.preloadVariants(this.ACTION),this.presetBreadcrumbs(e,t);const n=await this.loadData(e,t);if(this.isResponseBad(n))return e.showErrorMessage(n);this.setBreadcrumbs(e,t,n);const i=this.UIConstructor;this.setUI(e,new i(this.tweakUIOptions(this.prepareUIOptions(e,n)))),this.bindUIEvents(e,t,n),e.emit(`after:render:${this.ACTION}`,t,n)}catch(n){e.emit(`exception:render:${this.ACTION}`,t,n),e.report(n),e.showErrorMessage(n)}finally{e.removeLoadingScreen&&e.removeLoadingScreen()}}}])}(ev),ov=function(e){function t(){return io(this,t),to(this,t,arguments)}return ho(t,e),uo(t)}(rv);const sv="Редактирование";let av=function(e){function t(){return io(this,t),to(this,t,arguments)}return ho(t,e),uo(t,null,[{key:"deafultBreadcrumbsTail",get:function(){return sv}},{key:"breadcrumbsTails",get:function(){return{preset:sv,set:`${sv}: "{:title}"`}}},{key:"ACTION",get:function(){return"update"}},{key:"MODEL_ACTION_GET",get:function(){return"getRaw"}},{key:"MODEL_ACTION_PUT",get:function(){return"update"}},{key:"prepareUIOptions",value:function(e,t){return{options:{target:e.getContainerInnerElement(),model:e.getModelName(),action:this.MODEL_ACTION_PUT,name:`${e.getName()}.${this.ACTION}Form`,validators:this.getValidators(e),variants:e.getOptions(`variants.${this.ACTION}`,{}),ui:e.getOptions(`${this.ACTION}.ui`,{}),fields:e.getOptions(`${this.ACTION}.fields`,{}),masters:e.getOptions(`${this.ACTION}.masters`,{})},data:this.TRANSFORMER(Jo.stripProxy(t.result))}}},{key:"bindUIEvents",value:function(e,t,n){var i=this;Jo.isFunc(e.goBack)&&this.bindUIEvent(e,"reject",function(){return i.goBack(e)}),Jo.isFunc(e.onActionSubmit)&&this.bindUIEvent(e,"submit",async function(n){await e.onActionSubmit(i.ACTION,{...i.loadDataQuery(e,t),...n.detail})&&i.goBackAfterDelay(e)})}},{key:"isUIRendered",value:function(e){return!!this.getUI(e)||(e.$destroyUI(),!1)}},{key:"run",value:async function(e,t){try{if(e.emit(`before:render:${this.ACTION}`,[t]),this.isUIRendered(e))return;e.renderLoadingScreen&&e.renderLoadingScreen(),await e.preloadVariants(this.ACTION),this.presetBreadcrumbs(e,t);const n=await this.loadData(e,t);if(this.isResponseBad(n))return e.showErrorMessage(n);this.setBreadcrumbs(e,t,n);const i=this.UIConstructor;this.setUI(e,new i(this.tweakUIOptions(this.prepareUIOptions(e,n)))),this.bindUIEvents(e,t,n),e.emit(`after:render:${this.ACTION}`,t)}catch(n){e.emit(`exception:render:${this.ACTION}`,t,n),e.report(n),e.showErrorMessage(n)}finally{e.removeLoadingScreen&&e.removeLoadingScreen()}}}])}(ev),lv=function(e){function t(){return io(this,t),to(this,t,arguments)}return ho(t,e),uo(t)}(av);const uv="delete";let cv=function(){return uo(function e(){io(this,e)},null,[{key:"run",value:async function(e,t){try{if(e.ui[uv])return;if(e.$destroyUI(),e.ui[uv]=new Od({name:"CRUDDelete",target:e.getContainerInnerElement(),options:{loaderActive:!0,loaderStyle:"container",loaderTitle:"not-node:crud_delete_action_waiting",container:{id:`crud-delete-action-${t[0]}`}}}),e.setBreadcrumbs([{title:"Удаление",url:e.getModelActionURL(t[0],uv)}]),confirm("Удалить запись?")){const n=e.getOptions(`${uv}.actionName`,"delete");return void(await e.onActionSubmit(n,{_id:t[0]})&&e.goList())}e.goList()}catch(t){e.report(t),e.showErrorMessage(t)}}}])}();const dv="list";let fv=function(){function e(){io(this,e)}return uo(e,null,[{key:"tweakActionsList",value:function(e,t){return e.getOptions(`${dv}.createAction`,!0)&&t.push({title:"Создать",action:function(){return e.goCreate()}}),t}},{key:"tweakUIOptions",value:function(e){return e}},{key:"createActionsButtons",value:function(e,t,n=0,i=["details","update","delete"],r=[],o=[],s=!0){const a={details:{action:function(){return e.goDetails(t,n)},...s?{icon:"circle-info"}:{title:"Подробнее"},size:"small"},update:{action:function(){return e.goUpdate(t,n)},...s?{icon:"edit"}:{title:"Изменить"},color:"warning",size:"small"},delete:{action:function(){return e.goDelete(t,n)},color:"danger",...s?{icon:"trash"}:{title:"Удалить"},size:"small",style:"outlined"}},l=[...r];return Array.isArray(i)&&i.forEach(function(e){return l.push(a[e])}),l.push(...o),l}},{key:"run",value:async function(t,n){try{if(t.renderLoadingScreen&&t.renderLoadingScreen(),await t.preloadVariants(dv),t.setBreadcrumbs([{title:"Список",url:t.getModelURL()}]),t.ui[dv])return;t.$destroyUI(),t.ui[dv]=new bd(this.tweakUIOptions(e.prepareOptions(t))),t.emit(`after:render:${dv}`,n,t.ui[dv])}catch(e){t.emit(`exception:render:${dv}`,n,e),t.report(e),t.showErrorMessage(e)}finally{t.removeLoadingScreen&&t.removeLoadingScreen()}}},{key:"prepareOptions",value:function(e){const t={interface:e.getOptions(`${dv}.interface`,{combined:!0,factory:e.getInterface()}),fields:void 0,showSelect:void 0,getItemId:void 0,idField:void 0,preload:{},filterUI:e.getOptions(`${dv}.filterUI`),pager:{size:50,page:0},sorter:{id:-1},filter:void 0,ui:void 0};let n=[...e.getOptions(`${dv}.actions`,[])];n=this.tweakActionsList(e,n);const i={options:{targetEl:e.getContainerInnerElement(),endless:!1,actions:n}};return Object.keys(t).forEach(function(n){let r=e.getOptions(`${dv}.${n}`,t[n]);void 0!==r&&(i.options[n]=r)}),i}}])}();var hv={create:iv,details:ov,update:lv,delete:cv,list:fv};const vv=[],gv=["title","label","id","name"],pv="loading_screen";var mv=new WeakMap,yv=new WeakMap,bv=new WeakMap;let kv=function(e){function t(e,n,{actions:i,router:r,preloader:o}={actions:void 0,router:void 0,preloader:void 0}){var s;return io(this,t),oo(s=to(this,t,[e,`CRUD.${n}`]),mv,{...hv}),oo(s,yv,Qh),oo(s,bv,Yh),co(s,"TITLE_FIELDS_PRIORITY",gv),co(s,"TOP_CLASS",["box"]),co(s,"MAIN_CLASS",["box"]),co(s,"BOTTOM_CLASS",["box"]),co(s,"WS_CHECK_INTERVAL",200),i&&so(mv,s,{...ro(mv,s),...i}),r&&so(yv,s,r),o&&so(bv,s,o),s.ui={},s.els={},s.setOptions("names",{module:"",plural:"plural",single:"single"}),s.setOptions("containerSelector",s.app?.getOptions("crud.containerSelector")),s.buildFrame(),go(s,s)}return ho(t,e),uo(t,[{key:"setValidators",value:function(e){const t=this.getModuleName().split("-"),n=`ns${("not"===t[0]?t.splice(1):t).map(Jo.capitalizeFirstLetter).join("")}Common`,i=this.app?.getService(n);this.setWorking("validators",i.augmentValidators(e))}},{key:"getValidators",value:function(){return this.getWorking("validators")}},{key:"start",value:function(){var e=this;let t=[];this.getModuleName()&&this.getOptions("names.module")&&t.push({title:this.getOptions("names.module"),url:!1}),t.push({title:this.getOptions("names.plural"),url:this.getModelURL()}),vv.splice(0,vv.length,...t),lh.setHead(vv).render({root:"",target:this.els.top,navigate:function(t){return e.app?.getWorking("router").navigate(t)}}),this.route(this.getOptions("params"))}},{key:"startWhenWSClientReady",value:function(){var e=this;this.app?.getWSClient()?this.app?.getWSClient().isConnected()?this.start():this.app.getWSClient().once("connected",this.startWhenWSClientReady.bind(this)):setTimeout(function(){return e.startWhenWSClientReady()},this.WS_CHECK_INTERVAL)}},{key:"setBreadcrumbs",value:function(e){lh.setTail(e).update()}},{key:"backToList",value:function(){this.navigate(this.linkBackToList())}},{key:"linkBackToList",value:function(){return this.getModelURL()}},{key:"afterAction",value:function(e="list"){let t=this.app?.getOptions("crud.navigateBackAfter",[]);t&&Array.isArray(t)&&t.indexOf(e)>-1?window.history.back():this.backToList()}},{key:"buildFrame",value:function(){var e=this;let t=document.querySelector(this.app?.getOptions("crud.containerSelector","body"));for(;t.firstChild;)t.removeChild(t.firstChild);this.els.top=document.createElement("div"),this.els.top.id="crud-top",this.getFrameClasses().TOP_CLASS.forEach(function(t){return e.els.top.classList.add(t)}),t.appendChild(this.els.top),this.els.main=document.createElement("div"),this.els.main.id="crud-main",this.getFrameClasses().MAIN_CLASS.forEach(function(t){return e.els.main.classList.add(t)}),t.appendChild(this.els.main),this.els.bottom=document.createElement("div"),this.els.bottom.id="crud-bottom",this.getFrameClasses().BOTTOM_CLASS.forEach(function(t){return e.els.bottom.classList.add(t)}),t.appendChild(this.els.bottom)}},{key:"getFrameClasses",value:function(){return{TOP_CLASS:this.TOP_CLASS,MAIN_CLASS:this.MAIN_CLASS,BOTTOM_CLASS:this.BOTTOM_CLASS}}},{key:"getContainerTopElement",value:function(){return this.els.top}},{key:"getContainerInnerElement",value:function(){return this.els.main}},{key:"getContainerBottomElement",value:function(){return this.els.bottom}},{key:"preloadVariants",value:async function(e="list"){await ro(bv,this).preload(this,e)}},{key:"getTitleFromLib",value:function(e,t){const n=this.getCurrentAction();return this.debug&&this.debug("notCRUD.getTitleFromLib is obsolete, use notCRUD.getPreloadedVariantTitle(actionName, propName, id)"),this.getPreloadedVariantTitle(n,e,t)}},{key:"getPreloadedVariants",value:function(e,t){return this.getOptions(`variants.${e}.${t}`,[])}},{key:"getPreloadedVariantTitle",value:function(e,t,n){const i=this.getPreloadedVariants(e,t).find(function(e){return e.id===n});return i?i.title:n}},{key:"getItemTitle",value:function(e){const t=this.TITLE_FIELDS_PRIORITY.find(function(t){return Jo.objHas(e,t)});return t?e[t]:""}},{key:"createDefault",value:function(){return this.getModel({}).toDefault()}},{key:"route",value:function(e=[]){try{return ro(yv,this).route(this,e)}catch(e){this.report(e),this.showErrorMessage(e)}}},{key:"actionHandlerExists",value:function(e){return!!Object.keys(ro(mv,this)).includes(e)||"function"==typeof this["run"+Jo.capitalizeFirstLetter(e)]}},{key:"runAction",value:function(e,t){if(Object.keys(ro(mv,this)).includes(e))return ro(mv,this)[e].run(this,t);if("function"==typeof this["run"+Jo.capitalizeFirstLetter(e)])return this["run"+Jo.capitalizeFirstLetter(e)](t);throw new Error(`No such action: ${e} in contoller ${this.getWorking("name")}`)}},{key:"goCreate",value:function(e=0){this.goAfterDelay(this.getModelActionURL("","create"),e)}},{key:"goDetails",value:function(e,t=0){this.goAfterDelay(this.getModelActionURL(e,""),t)}},{key:"goUpdate",value:function(e,t=0){this.goAfterDelay(this.getModelActionURL(e,"update"),t)}},{key:"goDelete",value:function(e,t=0){this.goAfterDelay(this.getModelActionURL(e,"delete"),t)}},{key:"goList",value:function(e=0){this.goAfterDelay(this.getModelURL(),e)}},{key:"goAfterDelay",value:function(e,t=0){var n=this;this.navigateWithDelay(e,t,function(){return n.$destroyUI()})}},{key:"goBack",value:function(e=0){this.goList(e)}},{key:"onActionSubmit",value:async function(e,t){let n=!0;const i=this.ui[e];if(!i)throw new Error("Action UI doesnt exist");try{i.setLoading();let r=await this.getModel(t)[`$${e}`]();n=i.processResult(r)}catch(e){n=i.processResult(e)}finally{return i.resetLoading(),n}}},{key:"$destroyUI",value:function(){for(let e in this.ui)this.destroyUIByName(e)}},{key:"destroyUIByName",value:function(e){Object.hasOwn(this.ui,e)&&(this.ui[e].$destroy&&this.ui[e].$destroy(),this.ui[e].destroy&&this.ui[e].destroy(),delete this.ui[e])}},{key:"showErrorMessage",value:function(e){this.error&&this.error(e),this.app&&this.app.emit("error",{title:"Произошла ошибка",message:e.message?e.message:bo.ERROR_DEFAULT}),Zh.error(this,"Произошла ошибка",e.message?e.message:bo.ERROR_DEFAULT)}},{key:"showSuccessMessage",value:function(e,t){this.app&&this.app.emit("success",{title:e,message:t}),Zh.success(this,e,t)}},{key:"setUI",value:function(e,t,n=!0){n&&this.$destroyUI(),this.ui[e]=t}},{key:"getUI",value:function(e){return this.ui[e]}},{key:"getActionUI",value:function(){return this.ui[this.getCurrentAction()]}},{key:"renderLoadingScreen",value:function(){this.setUI(pv,this.createLoaderUI())}},{key:"removeLoadingScreen",value:function(){this.destroyUIByName(pv)}},{key:"createLoaderUI",value:function(){return Ii(fs,{target:this.getContainerInnerElement(),props:{loading:!0,title:""}})}}],[{key:"LABELS",get:function(){return Object.freeze({plural:`${this.MODULE_NAME}:${this.MODEL_NAME}_label_plural`,single:`${this.MODULE_NAME}:${this.MODEL_NAME}_label_single`})}},{key:"getMenu",value:function(e={}){return[{section:this.MODULE_NAME,title:this.LABELS.plural,url:`/${Jo.lowerFirstLetter(this.MODULE_NAME)}/${Jo.lowerFirstLetter(this.MODEL_NAME)}`,...e}]}}])}(zc);co(kv,"ERROR_DEFAULT",bo.ERROR_DEFAULT);let $v=function(){return uo(function e(){io(this,e)},null,[{key:"extractActionName",value:function(e){return e.length>0?e[0]:this.DEFAULT_ROUTE}},{key:"route",value:function(e,t){try{const n=this.extractActionName(t);return e.setCurrentAction(n),e.runAction(n,t)}catch(t){e.report(t),e.showErrorMessage(t)}}}])}();co($v,"DEFAULT_ROUTE","list");let _v=function(){return uo(function e(){io(this,e)},null,[{key:"routesVariants",get:function(){return{}}},{key:"isRouteVariantValid",value:function(e){return""!==e&&Jo.objHas(this.routesVariants,e)}},{key:"determineRoute",value:async function(e,t=[]){return""}},{key:"route",value:async function(e,t){try{const n=await this.determineRoute(e,t);if(!this.isRouteVariantValid(n))throw new Error(`No such action: ${n} in contoller ${e.getWorking("name")}`);{e.setCurrentAction(n);const i=this.routesVariants[n];Jo.isAsync(i.run)?await i.run(e,t):i.run(e,t)}}catch(t){e.report(t),e.showErrorMessage(t)}}}])}();let wv=function(){return uo(function e(t,n){io(this,e),this.modelName=n,this.app=t},[{key:"destroy",value:function(){delete this.app}},{key:"getSearchRouteName",value:function(){return"listAndCount"}},{key:"getDataLoadRouteName",value:function(){return"get"}},{key:"transformSearchResult",value:function(e){var t=this;return e.list=e.list.map(function(e){return{_id:e._id,id:e[`${t.modelName}ID`],title:e.name||e.title||e.label||e.username}}),e}},{key:"transformSelectedResult",value:function(e){return{_id:e._id,[`${this.modelName}ID`]:e.id,title:e.title}}},{key:"searchByTerm",value:async function(e){try{if(e.value.length>2){const t=this.app.getModel(this.modelName);t.setSearch(e.value);const n=await t[`$${this.getSearchRouteName()}`]();return"ok"===n.status?this.transformSearchResult(n.result):{list:[],count:0,page:0,pages:0,skip:0}}return{list:[],count:0,page:0,pages:0,skip:0}}catch{return{list:[],count:0,page:0,pages:0,skip:0}}}},{key:"openSelector",value:function(){var e=this;return new Promise(function(t,n){try{const i=Ii(Ou,{target:document.body,props:{}});i.$on("termChange",async function({detail:t}){const n=await e.searchByTerm(t);i.$set({results:n})}),i.$on("next",function(){console.log("next selector results")}),i.$on("prev",function(){console.log("prev selector results")}),i.$on("reject",function(){Ci(i),n()}),i.$on("resolve",function({detail:n}){Ci(i),t(e.transformSelectedResult(n))})}catch(t){e.app.error(t),n(t)}})}},{key:"loadData",value:async function(e){try{if(e&&e.length>10){const t=this.app.getModel(this.modelName,{_id:e}),n=await t[`$${this.getDataLoadRouteName()}`]();return"ok"===n.status?n.result:null}return null}catch(e){return this.app.error(e),null}}}])}();const Iv=kv;var Ov=Object.freeze({__proto__:null,COMPONENTS:Sa,FIELDS:Ca,UIForm:Ef,VARIANTS:Ea,createCRUDActionUIView:function({ACTION:e,TITLE:t,UIConstructor:n,dataProvider:i,goBack:r}){return function(){return uo(function e(){io(this,e)},null,[{key:"run",value:async function(o,s){try{if(o.setBreadcrumbs([{title:`Просмотр "${t}"`}]),await o.preloadVariants(e),o.ui[e])return;o.$destroyUI();let a={};i&&(a=Jo.isFunc(i)?Jo.isAsync(i)?await i(s):i(s):{...i});const l=o.getOptions(`${e}.transformer`,Kh);o.ui[e]=new n({target:o.getContainerInnerElement(),props:{params:s,...l(a)}}),o.emit(`after:render:${e}`),r&&Jo.isFunc(r)&&o.ui[e].on("reject",function(){return r()})}catch(e){o.report(e),o.showErrorMessage(e)}}}])}()},ncCRUD:Iv,notAPI:Sc,notApp:Rc,notBase:kc,notBreadcrumbs:lh,notCRUD:kv,notCRUDRouter:Qh,notCRUDRouterPlain:$v,notCRUDRouterSwitch:_v,notCommon:Jo,notController:zc,notForm:jf,notFormHelpers:Zd,notFormRules:Tf,notFormSet:th,notFormUtils:Ad,notInterface:Pc,notPath:Wo,notRecord:Mc,notRouter:Ic,notServiceModelSearch:wv,notSideMenu:Gh,notStores:Lc,notTable:bd,notTopMenu:Ch});const Av={LOCALE:Lo,say:Xo,notLocale:Zo},Sv=bo,{notCommon:Cv,COMPONENTS:Ev,FIELDS:Lv,VARIANTS:Tv,notFormUtils:xv}=Ov;return Object.keys(gc).forEach(function(e){Object.keys(gc[e]).forEach(function(t){Ad.addComponent(t,gc[e][t])})}),e.COMPONENTS=Ev,e.Elements=gc,e.FIELDS=Lv,e.Frame=Ov,e.LOCALE=Lo,e.Locale=Av,e.UICommon=Sv,e.VARIANTS=Tv,e.notCommon=Cv,e.notFormUtils=xv,e.notLocale=Zo,e.say=Xo,e.svelte=Xr,e}({});
7
+ */var Pr,Ur,Rr,Dr,jr,Wr=(Nr||(Nr=1,Pr=Mr,function(e){function t(){}var n=t.prototype,i=e.EventEmitter;function r(e,t){for(var n=e.length;n--;)if(e[n].listener===t)return n;return-1}function o(e){return function(){return this[e].apply(this,arguments)}}function s(e){return"function"==typeof e||e instanceof RegExp||!(!e||"object"!=typeof e)&&s(e.listener)}n.getListeners=function(e){var t,n,i=this._getEvents();if(e instanceof RegExp)for(n in t={},i)i.hasOwnProperty(n)&&e.test(n)&&(t[n]=i[n]);else t=i[e]||(i[e]=[]);return t},n.flattenListeners=function(e){var t,n=[];for(t=0;t<e.length;t+=1)n.push(e[t].listener);return n},n.getListenersAsObject=function(e){var t,n=this.getListeners(e);return n instanceof Array&&((t={})[e]=n),t||n},n.addListener=function(e,t){if(!s(t))throw new TypeError("listener must be a function");var n,i=this.getListenersAsObject(e),o="object"==typeof t;for(n in i)i.hasOwnProperty(n)&&-1===r(i[n],t)&&i[n].push(o?t:{listener:t,once:!1});return this},n.on=o("addListener"),n.addOnceListener=function(e,t){return this.addListener(e,{listener:t,once:!0})},n.once=o("addOnceListener"),n.defineEvent=function(e){return this.getListeners(e),this},n.defineEvents=function(e){for(var t=0;t<e.length;t+=1)this.defineEvent(e[t]);return this},n.removeListener=function(e,t){var n,i,o=this.getListenersAsObject(e);for(i in o)o.hasOwnProperty(i)&&-1!==(n=r(o[i],t))&&o[i].splice(n,1);return this},n.off=o("removeListener"),n.addListeners=function(e,t){return this.manipulateListeners(!1,e,t)},n.removeListeners=function(e,t){return this.manipulateListeners(!0,e,t)},n.manipulateListeners=function(e,t,n){var i,r,o=e?this.removeListener:this.addListener,s=e?this.removeListeners:this.addListeners;if("object"!=typeof t||t instanceof RegExp)for(i=n.length;i--;)o.call(this,t,n[i]);else for(i in t)t.hasOwnProperty(i)&&(r=t[i])&&("function"==typeof r?o.call(this,i,r):s.call(this,i,r));return this},n.removeEvent=function(e){var t,n=typeof e,i=this._getEvents();if("string"===n)delete i[e];else if(e instanceof RegExp)for(t in i)i.hasOwnProperty(t)&&e.test(t)&&delete i[t];else delete this._events;return this},n.removeAllListeners=o("removeEvent"),n.emitEvent=function(e,t){var n,i,r,o,s=this.getListenersAsObject(e);for(o in s)if(s.hasOwnProperty(o))for(n=s[o].slice(0),r=0;r<n.length;r++)!0===(i=n[r]).once&&this.removeListener(e,i.listener),i.listener.apply(this,t||[])===this._getOnceReturnValue()&&this.removeListener(e,i.listener);return this},n.trigger=o("emitEvent"),n.emit=function(e){var t=Array.prototype.slice.call(arguments,1);return this.emitEvent(e,t)},n.setOnceReturnValue=function(e){return this._onceReturnValue=e,this},n._getOnceReturnValue=function(){return!this.hasOwnProperty("_onceReturnValue")||this._onceReturnValue},n._getEvents=function(){return this._events||(this._events={})},t.noConflict=function(){return e.EventEmitter=i,t},Pr.exports?Pr.exports=t:e.EventEmitter=t}("undefined"!=typeof window?window:Mr.exports||{})),Mr.exports),Br=Fr(Wr);var Vr,zr=(jr||(jr=1,Dr=function(){if(Rr)return Ur;Rr=1;const e=".",t=":",n="::",i="()";return Ur=class{static get SUB_PATH_START(){return"{"}static get SUB_PATH_END(){return"}"}static get PATH_SPLIT(){return e}static get PATH_START_OBJECT(){return t}static get PATH_START_HELPERS(){return n}static get FUNCTION_MARKER(){return i}static get MAX_DEEP(){return 10}static findNextSubPath(e){let t="",n=!1;for(let i=0;i<e.length;i++)if("{"===e[i])n=!0,t="";else{if("}"===e[i]&&n)return t;t+=e[i]}return n?t:null}static replaceSubPath(e,t,n){let i="{"+t+"}",r=0;for(;e.indexOf(i)>-1&&r<10;)e=e.replace(i,n),r++;return e}static parseSubs(e,t,i){let r,o=this.findNextSubPath(e),s=0;for(;o&&(r=this.getValueByPath(o.indexOf(n)>-1?i:t,o,t,i),e=this.replaceSubPath(e,o,r),s++,!(s>10));)o=this.findNextSubPath(e);return e}static get(e,i,r=void 0){switch(e){case t:return i;case n:return r}return e=this.parseSubs(e,i,r),this.getValueByPath(e.indexOf(n)>-1?r:i,e,i,r)}static set(e,t,i,r=void 0){3===arguments.length&&(r=i,i=void 0);let o,s=this.findNextSubPath(e),a=0;for(;s&&(o=this.getValueByPath(s.indexOf(n)>-1?i:t,s,t,i),e=this.replaceSubPath(e,s,o),!(a>10));)s=this.findNextSubPath(e),a++;this.setValueByPath(t,e,r),t.isRecord&&this.normilizePath(e).length>1&&t.__isActive&&t.trigger("change",t,e,r)}static unset(e,t,n){this.set(e,t,n,null)}static parsePathStep(e,r,o){let s=null;if(0===e.indexOf(n)&&o){if(s=e.replace(n,""),s.indexOf(i)!==s.length-2)return o[s];if(s=s.replace(i,""),Object.prototype.hasOwnProperty.call(o,s))return o[s](r,void 0)}else if(0===e.indexOf(t)&&r){if(s=e.replace(t,""),s.indexOf(i)!==s.length-2)return r[s];if(s=s.replace(i,""),Object.prototype.hasOwnProperty.call(r,s))return r[s](r,void 0)}return e}static parsePath(t,n,i){Array.isArray(t)||(t=t.split(e));for(var r=0;r<t.length;r++)t[r]=this.parsePathStep(t[r],n,i);return t}static normilizePath(n){if(Array.isArray(n))return n;for(;n.indexOf(t)>-1;)n=n.replace(t,"");return n.split(e)}static ifFullSubPath(e,t){if(e.length<t.length)return!1;for(let n=0;n<t.length;n++)if(t[n]!==e[n])return!1;return!0}static getValueByPath(e,t,n,r){let o=(t=this.normilizePath(t)).shift(),s=o.indexOf(i)>-1;if(s&&(o=o.replace(i,"")),("object"==typeof e||"function"==typeof e)&&null!=e&&void 0!==e[o]&&null!==e[o]){let i=s?e[o]({item:n,helpers:r}):e[o];return t.length>0?this.getValueByPath(i,t,n,r):i}}static setValueByPath(e,t,n){let i=(t=this.normilizePath(t)).shift();t.length>0?(Object.prototype.hasOwnProperty.call(e,i)||(e[i]={}),this.setValueByPath(e[i],t,n)):e[i]=n}static join(){return Array.prototype.slice.call(arguments).join(e)}},Ur}()),Dr),qr=Fr(zr);let Hr=function(e){return function(e){return!!e&&"object"==typeof e}(e)&&!function(e){var t=Object.prototype.toString.call(e);return"[object RegExp]"===t||"[object Date]"===t||function(e){return e.$$typeof===Gr}(e)}(e)};var Gr="function"==typeof Symbol&&Symbol.for?Symbol.for("react.element"):60103;function Kr(e,t){return(!t||!1!==t.clone)&&Hr(e)?Yr((n=e,Array.isArray(n)?[]:{}),e,t):e;var n}function Jr(e,t,n){return e.concat(t).map(function(e){return Kr(e,n)})}function Yr(e,t,n){const i=Array.isArray(t);if(i===Array.isArray(e)){if(i){return((n||{arrayMerge:Jr}).arrayMerge||Jr)(e,t,n)}return function(e,t,n){const i={};return Hr(e)&&Object.keys(e).forEach(function(t){i[t]=Kr(e[t],n)}),Object.keys(t).forEach(function(r){Hr(t[r])&&e[r]?i[r]=Yr(e[r],t[r],n):i[r]=Kr(t[r],n)}),i}(e,t,n)}return Kr(t,n)}Yr.all=function(e,t){if(!Array.isArray(e))throw new Error("first argument should be an array");return e.reduce(function(e,n){return Yr(e,n,t)},{})};let Qr=function(){function e(){kr(this,e)}return Sr(e,null,[{key:"isError",value:function(e){return e instanceof Error||Object.hasOwn(e,"status")&&"error"===e.status}},{key:"mute",value:function(){e.ENV_TYPE="production"}},{key:"pad",value:function(e){return e<10?"0"+e:e}},{key:"getTodayDate",value:function(){let e=new Date;return new Date(e.getFullYear(),e.getMonth(),e.getDate()).getTime()}},{key:"objHas",value:function(e,t){return Object.hasOwn(e,t)}},{key:"copyObj",value:function(e){return JSON.parse(JSON.stringify(e))}},{key:"partCopyObj",value:function(e,t){let n=Object.keys(e).reduce(function(n,i){return t.includes(i)&&(n[i]=e[i]),n},{});return JSON.parse(JSON.stringify(n))}},{key:"compareTwoArrays",value:function(e,t){return e.length===t.length&&e.every(function(e,n){return e===t[n]})}},{key:"isFunc",value:function(e){return"function"==typeof e}},{key:"isAsync",value:function(e){return"AsyncFunction"===e.constructor.name}},{key:"executeObjectFunction",value:async function(t,n,i){if(t){const r=qr.get(":"+n,t);if(e.isFunc(r))return e.isAsync(r)?await r(...i):r(...i)}}},{key:"mapBind",value:function(e,t,n){n.forEach(function(n){"function"==typeof e[n]&&(t[n]=e[n].bind(e))})}},{key:"isClass",value:function(e){return/^\s*class/.test(e.toString())}},{key:"detectType",value:function(t){return"function"!=typeof t?typeof t:e.isClass(t)?"class":"function"}},{key:"isArray",value:function(e){return"object"==typeof e&&e instanceof Array}},{key:"localIsoDate",value:function(t){return(t=t||new Date).getFullYear()+"-"+e.pad(t.getMonth()+1)+"-"+e.pad(t.getDate())+"T"+e.pad(t.getHours())+":"+e.pad(t.getMinutes())+":"+e.pad(t.getSeconds())}},{key:"getToday",value:function(){let t=new Date;return t.getFullYear()+"-"+e.pad(t.getMonth()+1)+"-"+e.pad(t.getDate())}},{key:"backlogAdd",value:function(t,n="log"){!0===e.get("backlog")&&e.backlog.push({msg:t,type:n})}},{key:"dumpBacklog",value:function(){for(;e.backlog.length;){let t=e.backlog.shift();window[e.LOG][t.type](...t.msg)}}},{key:"logMsg",value:function(){let t=e.localIsoDate();window[e.LOG].log(`[${t}]: `,...arguments),e.backlogAdd([`[${t}]: `,...arguments],"log")}},{key:"log",value:function(){e.logMsg(...arguments)}},{key:"createLogger",value:function(t){return{log:e.genLogMsg(t),error:e.genLogError(t),debug:e.genLogDebug(t),report:e.report}}},{key:"genLogMsg",value:function(t){return function(){let n=e.localIsoDate();window[e.LOG].log(`[${n}]: ${t}::`,...arguments),e.backlogAdd([`[${n}]: ${t}::`,...arguments],"log")}}},{key:"isDev",value:function(){return e.ENV_TYPE===e.DEV_ENV}},{key:"debug",value:function(){return e.isDev()?e.logMsg(...arguments):e.NOOP}},{key:"genLogDebug",value:function(t){return e.isDev()?e.genLogMsg(t):e.NOOP}},{key:"error",value:function(){e.logError(...arguments)}},{key:"logError",value:function(){let t=e.localIsoDate();window[e.LOG].error(`[${t}]: `,...arguments),e.backlogAdd([`[${t}]: `,...arguments],"error")}},{key:"genLogError",value:function(t){return function(){let n=e.localIsoDate();window[e.LOG].error(`[${n}]: ${t}::`,...arguments),e.backlogAdd([`[${n}]: ${t}::`,...arguments],"error")}}},{key:"report",value:function(t){if(e.getApp()){let n=e.getApp().getService("nsErrorReporter");n&&n.report(t).catch(e.error)}else e.get("production")||e.error(...arguments)}},{key:"trace",value:function(){e.get("production")||e.trace(...arguments)}},{key:"trimBackslash",value:function(e){return 0===e.indexOf("/")&&(e=e.substring(1)),"/"===e[e.length-1]&&(e=e.substring(0,e.length-1)),e}},{key:"buildURL",value:function({prefix:t,module:n,model:i,id:r,action:o}={prefix:"",module:"",model:"",id:"",action:""}){let s=["/"];return t&&s.push(encodeURIComponent(e.trimBackslash(t))),n&&s.push(encodeURIComponent(e.trimBackslash(n))),i&&s.push(encodeURIComponent(e.trimBackslash(i))),r&&s.push(encodeURIComponent(e.trimBackslash(r))),o&&s.push(encodeURIComponent(e.trimBackslash(o))),s=s.filter(function(e){return""!==e}),s.join("/").replace(/\/\//g,"/")}},{key:"capitalizeFirstLetter",value:function(e){return e.charAt(0).toUpperCase()+e.slice(1)}},{key:"lowerFirstLetter",value:function(e){return e.charAt(0).toLowerCase()+e.slice(1)}},{key:"strLengthCap",value:function(e,t=50,n="..."){return"string"==typeof e&&e.length>t?e.substr(0,t)+n:e}},{key:"escapeHtml",value:function(e){return e.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/"/g,"&quot;").replace(/'/g,"&#039;")}},{key:"startApp",value:function(e){document.addEventListener("DOMContentLoaded",e)}},{key:"getApp",value:function(){return e.get("app")}},{key:"extendAppConfig",value:function(t,n){return e.deepMerge(t,n)}},{key:"absorbModule",value:function(){let t,n,i={};1==arguments.length?(i={...arguments[0]},Object.hasOwnProperty.call(arguments[0],"defaultConf")&&(t=arguments[0].defaultConf,delete i.defaultConf),Object.hasOwnProperty.call(arguments[0],"mod")&&(n=arguments[0].mod,delete i.mod)):(e.log("WARNING: absorbModule format obsoleted, use object {defaultConf, mod, services, uis, wsc, etc}"),t=arguments[0],n=arguments[1],arguments.length>2&&(i.services=arguments[2]),arguments.length>3&&(i.uis=arguments[3]),arguments.length>4&&(i.wcs=arguments[4]));for(let r in n)"manifest"!==r?"function"==typeof e.get(`absorb.${r}`)?(Object.hasOwn(i,r)||(i[r]={},e.log(`WARNING: no accamulator object provided for '${r}' collection`)),e.get(`absorb.${r}`)(i[r],n[r])):0===r.indexOf("nc")?(Object.hasOwn(t,"controllers")||(t.controllers={}),t.controllers[r]=n[r]):(Object.hasOwn(window,"notEnv")||(window.notEnv={}),window.notEnv[r]=n[r]):t=e.extendAppConfig(t,n.manifest);return t}},{key:"defineIfNotExists",value:function(e,t,n){Object.hasOwn(e,t)||(e[t]=n)}},{key:"register",value:function(t,n){e.registry[t]=n}},{key:"get",value:function(t){return Object.hasOwn(e.registry,t)?e.registry[t]:null}},{key:"moveItem",value:function(e,t,n){const i=function(t){return t<e.length&&t>-1};i(n)&&i(t)&&e.splice(n,0,e.splice(t,1)[0])}},{key:"stripProxy",value:function(t){if(null!=t&&t.isProxy){t=Array.isArray(t)?Array.from(t):Object.assign({},t);for(let n in t)Object.hasOwn(t,n)&&(t[n]=e.stripProxy(t[n]))}return t}},{key:"pipe",value:function(e,t){let n;for(let i of t)n=i(n||e);return n}},{key:"getAPI",value:function(t){return e.getManager()?.getAPI(t)??null}},{key:"setManager",value:function(t){e.MANAGER=t}},{key:"getManager",value:function(){return e.MANAGER}},{key:"getJSON",value:function(e){return fetch(e).then(function(e){return e.json()})}},{key:"wait",value:function(e){return new Promise(function(t){setTimeout(t,1e3*e)})}},{key:"registerWidgetEvents",value:function(t){e.getApp()&&Object.keys(t).forEach(function(n){e.getApp().on(n,t[n])})}},{key:"navigate",value:function(t){e.getApp()&&e.getApp().getWorking("router").navigate(t)}},{key:"select",value:function(t,n,i){return t&&"object"==typeof t&&e.objHas(t,n)&&void 0!==t[n]&&null!==t[n]?t[n]:i}}])}();function Xr(e,t,n){Object.hasOwn(e,t)||(e[t]={connection:{},router:{routes:{}},messenger:{}});let i=e[t];if(Object.hasOwn(n,"router")&&Object.hasOwn(n.router,"routes"))for(let e in n.router.routes)Object.hasOwn(i.router.routes,e)||(i.router.routes[e]={}),Object.assign(i.router.routes[e],{...n.router.routes[e]});Object.hasOwn(n,"messenger")&&Object.assign(i.messenger,{...n.messenger}),Object.hasOwn(n,"connection")&&Object.assign(i.connection,{...n.connection});for(let e of["name","getToken","logger","identity","credentials"])Object.hasOwn(n,e)&&(i[e]=n[e])}Vr=Qr,Ir(Qr,"MANAGER",null),Ir(Qr,"LOG","console"),Ir(Qr,"deepMerge",Yr),Ir(Qr,"TZ_OFFSET",(new Date).getTimezoneOffset()/60*-1),Ir(Qr,"DEV_ENV","production"),Ir(Qr,"ENV_TYPE",window.NOT_ENV_TYPE??Vr.DEV_ENV),Ir(Qr,"NOOP",function(){}),Ir(Qr,"backlog",[]),Ir(Qr,"registry",{}),Qr.register("absorb.wsc",function(e,t){if(e)for(let n in t)Xr(e,n,t[n])}),Qr.register("absorb.services",function(e,t){if(e)for(let n in t)Object.hasOwn(e,n)&&Qr.logError(`services property duplication ${n}`),e[n]=t[n]}),Qr.register("absorb.uis",function(e,t){if(e)for(let n in t)Object.hasOwn(e,n)&&Qr.logError(`uis property duplication ${n}`),e[n]=t[n]}),Qr.register("absorb.uis",function(e,t){if(e)for(let n in t)Object.hasOwn(e,n)&&Qr.logError(`fields property duplication ${n}`),e[n]=t[n]});var Zr=new(function(e){function t(){var e;kr(this,t),(e=mr(this,t)).dict={},e.helpers={};let n=e.restoreFromStorage();return n&&e.set(n),e}return Cr(t,e),Sr(t,[{key:"format",value:function(e,t){return qr.parseSubs(e,t,this.helpers)}},{key:"say",value:function(e,t=!1){try{if(Qr.objHas(this.dict,e)){let n=this.dict[e],i="";return i=t?this.format(n,t):n,i}throw new Error(`Unknown locale phrase: ${e}`)}catch(t){return Qr.debug(t),e}}},{key:"set",value:function(e){pr.set(e),this.saveToStorage(e),this.dict=Object.assign({},{...e}),this.emit("onchange")}},{key:"saveToStorage",value:function(e){if(window.localStorage)try{return window.localStorage.setItem("dictionary",JSON.stringify(e))}catch(e){return Qr.debug(e),!1}return!1}},{key:"restoreFromStorage",value:function(){if(window.localStorage)try{let e=window.localStorage.getItem("dictionary");if(e){return JSON.parse(e)}return!1}catch(e){return Qr.debug(e),!1}return!1}},{key:"vocabulary",value:function(){return pr}}])}(Br));const eo=Zr.say.bind(Zr);var to=On("<span> </span>");function no(e,t){Z(t,!0);const[n,i]=Qi();let r=De(!1),o=rr(t,"id",3,"tagId"),s=rr(t,"title",15,"tag"),a=rr(t,"color",3,"info"),l=rr(t,"size",3,"normal"),u=rr(t,"padding",3,"normal"),c=rr(t,"bold",3,!1),d=rr(t,"right",3,!1),f=rr(t,"left",3,!1),h=rr(t,"top",3,!1),g=rr(t,"bottom",3,!1),p=rr(t,"classes",3,""),v=rr(t,"events",31,()=>Ge({})),m=rr(t,"register",19,()=>Qr.registerWidgetEvents.bind(Qr)),y=rr(t,"onUpdate",3,e=>{Object.hasOwn(e,"title")&&s(e.title)}),k=rr(t,"action",3,()=>!0);function b(){return`tag-${o()}:update`}Vn(()=>{Object.hasOwn(v(),b())||v(v()[b()]=y(),!0),m()(v())}),or(()=>{Be(r,d()||f()||h()||g(),!0)});var _=Sn(),w=rt(_),O=e=>{var t=to();t.__click=function(...e){(k()?k():void 0)?.apply(this,e)};var i=it(t);kt(()=>{Oi(t,"id",`tag-${o()??""}`),di(t,1,`\n tag\n ${c()?"has-text-weight-bold":""}\n ${"normal"!==u()?`is-padded-${u()}`:""}\n is-${l()??""}\n is-${a()??""}\n ${an(r)?"is-sided":""}\n ${d()?"is-sided-right":""}\n ${f()?"is-sided-left":""}\n ${h()?"is-sided-top":""}\n ${g()?"is-sided-bottom":""}\n ${p()??""}`),Pn(i,Yi(pr,"$LOCALE",n)[s()])}),In(e,t)};Gn(w,e=>{s()&&e(O)}),In(e,_),ee(),i()}function io(e,t){let n=rr(t,"LC_TRUE",3,"not-node:booleans_true"),i=rr(t,"LC_FALSE",3,"not-node:booleans_false"),r=rr(t,"inverted",3,!1);const o={title:i(),color:r()?"success":"danger"},s={title:n(),color:r()?"danger":"success"};let a=Le(()=>t.value?s:o);no(e,ir(()=>an(a)))}yn(["click"]);var ro=On('<span class="label"> <!></span>');function oo(e,t){Z(t,!0);let n=rr(t,"values",19,()=>[]),i=rr(t,"inverted",3,!1),r=rr(t,"componentConstructor",3,io),o=De(Ge([]));Vn(()=>{"boolean"==typeof n()?Be(o,[{value:n()}],!0):Array.isArray(n())&&(n().every(e=>"boolean"==typeof e)?Be(o,n().map(e=>({value:e})),!0):Be(o,[...n()],!0))});var s=Sn(),a=rt(s),l=e=>{var t=Sn();Qn(rt(t),17,()=>an(o),Yn,(e,t)=>{const n=Le(r);var o=Sn(),s=rt(o);{let e=Le(()=>i()||an(t).inverted);ri(s,()=>an(n),(n,i)=>{i(n,ir(()=>an(t),{get inverted(){return an(e)}}))})}In(e,o)}),In(e,t)};Gn(a,e=>{an(o).length&&e(l)}),In(e,s),ee()}var so=On("<span><i></i></span>"),ao=On('<span class="icon is-small is-right is-clickable is-vertical-middle"><i></i></span>'),lo=On("<span> </span> <!> <!>",1);yn(["click"]);var uo=On("<span> </span>");function co(e,t){Z(t,!0);let n=De(!1),i=rr(t,"id",3,"tagId"),r=rr(t,"status",15,"light"),o=rr(t,"size",3,"normal"),s=rr(t,"labels",19,()=>({black:"black",dark:"dark",light:"light",white:"white",primary:"primary",link:"link",info:"info",success:"success",warning:"warning",danger:"danger"})),a=rr(t,"classes",3,"mx-1"),l=rr(t,"padding",3,"normal"),u=rr(t,"bold",3,!1),c=rr(t,"right",3,!1),d=rr(t,"left",3,!1),f=rr(t,"top",3,!1),h=rr(t,"bottom",3,!1),g=rr(t,"events",31,()=>Ge({})),p=rr(t,"register",19,()=>Qr.registerWidgetEvents.bind(Qr)),v=rr(t,"onUpdate",3,e=>{Object.hasOwn(e,"status")&&r(e.status)});function m(){return`indicator-${i()}:update`}Vn(()=>{Object.hasOwn(g(),m())||g(g()[m()]=v(),!0),p()(g())}),or(()=>{Be(n,c()||d()||f()||h(),!0)});var y=uo(),k=it(y);kt(()=>{di(y,1,`tag\nis-${o()??""}\n${u()?"has-text-weight-bold":""}\n${"normal"!==l()?`is-padded-${l()}`:""}\n${an(n)?"is-sided":""}\n${c()?"is-sided-right":""}\n${d()?"is-sided-left":""}\n${f()?"is-sided-top":""}\n${h()?"is-sided-bottom":""}\n is-${r()??""} ${a()??""}\n `),Pn(k,s()[r()])}),In(e,y),ee()}var fo=On('<div><span class="title"> </span></div>');function ho(e,t){Z(t,!0);const[n,i]=Qi();let r=rr(t,"loading",3,!1),o=rr(t,"size",3,"container"),s=rr(t,"title",3,"Waiting...");var a=Sn(),l=rt(a),u=e=>{var t=fo(),i=it(t),a=it(i);kt(()=>{di(t,1,`${"page"===o()?"pageloader":"containerloader"} ${r()?"is-active":""}`),Pn(a,Yi(pr,"$LOCALE",n)[s()])}),In(e,t)};Gn(l,e=>{"hidden"!==o()&&e(u)}),In(e,a),ee(),i()}var go=On("<option> </option>");function po(e,t){Z(t,!0);const[n,i]=Qi();var r=go(),o=it(r),s={};kt(()=>{wi(r,t.selected),Pn(o,Yi(pr,"$LOCALE",n)[t.title]),s!==(s=t.value)&&(r.value=(r.__value=t.value)??"")}),In(e,r),ee(),i()}var vo=On("<span> </span>"),mo=On("<p><!></p>");function yo(e,t){Z(t,!0);const[n,i]=Qi();let r=rr(t,"errors",19,()=>[]),o=rr(t,"show",3,!1),s=rr(t,"classes",3,""),a=rr(t,"id",3,"errors-list");var l=Sn(),u=rt(l),c=e=>{var t=mo(),i=it(t),l=e=>{var t=Sn();Qn(rt(t),17,r,Yn,(e,t)=>{var i=vo(),r=it(i);kt(()=>Pn(r,Yi(pr,"$LOCALE",n)[an(t)])),In(e,i)}),In(e,t)},u=e=>{In(e,$n(" "))};Gn(i,e=>{o()?e(l):e(u,!1)}),kt(()=>{di(t,1,`help ${s()??""}`),Oi(t,"id",a())}),In(e,t)};Gn(u,e=>{Array.isArray(r())&&r().length&&e(c)}),In(e,l),ee(),i()}let ko=function(){function e(){kr(this,e)}return Sr(e,null,[{key:"isMobile",value:function(){const e=window.matchMedia||window.msMatchMedia;if(e){let t="(pointer:coarse)";if(arguments.length){t=`only screen and (max-width: ${"boolean"==typeof arguments[0]?this.MOBILE_WIDTH_BREAK_POINT:arguments[0]}px)`}return e(t).matches}return!1}},{key:"removeBodyScroll",value:function(){document.body.classList.add(this.SCROLL_DISABLER_CLASS)}},{key:"restoreBodyScroll",value:function(){document.body.classList.remove(this.SCROLL_DISABLER_CLASS)}},{key:"formatPhone",value:function(e,t=this.FILLER){const n=[1,2,2,2,3,3,3,4,4,5,5];let i=e.replace(/\D/g,"");if(i.length>11){let e=i.length-11;for(;e>0;)e--,n.unshift(1)}let r=["","","","",""];Array.from(i).forEach(function(e,t){let i=n[t];r[i-1]=r[i-1]+e});const o=n.reduce(function(e,t){return void 0===e[t]?e[t]=1:e[t]+=1,e},{});for(let e in r){let n=o[parseInt(e)+1]-r[e].length;for(;n>0;)r[e]=r[e]+t,n--}return`+${r[0]} (${r[1]}) ${r[2]}-${r[3]}-${r[4]}`}},{key:"setMoneySign",value:function(e){this.MONEY_SIGN=e}},{key:"formatPrice",value:function(e){let t=Math.floor(e/100),n=e%100;return`${this.MONEY_SIGN}${t.toString()}.${n.toString()}`}},{key:"formatLocaleDatetime",value:function(e,t={date:!0,time:!0}){const n=e.toLocaleDateString(window.navigator.language),i=e.toLocaleTimeString(window.navigator.language);return t.date&&t.time?`${n} ${i}`:t.date&&!t.time?n:i}},{key:"tryFormatLocaleDateTime",value:function(t,n={date:!0,time:!0}){if("string"==typeof t||"number"==typeof t){const i=new Date(t);return e.formatLocaleDatetime(i,n)}return"object"==typeof t?e.formatLocaleDatetime(t,n):""}},{key:"formatTimestamp",value:function(e,t=0){let n=60*((new Date).getTimezoneOffset()-t)*1e3;return new Date(parseInt(e)-n).toLocaleString(window.navigator.language)}},{key:"declOfNum",value:function(e,t){let n=(e=Math.abs(e)%100)%10;return e>10&&e<20?t[2]:n>1&&n<5?t[1]:1==n?t[0]:t[2]}},{key:"humanizedTimeDiff",value:function(e){let t,n=(new Date).getTime(),i=Math.round((n-e)/1e3);if(i<60)return t=this.declOfNum(i,this.TIME.SECONDS),`${i} ${t} назад`;if(i<3600){let e=Math.floor(i/60);return t=this.declOfNum(e,this.TIME.MINUTES),`${e} ${t} назад`}{let e=Math.floor(i/3600);return t=this.declOfNum(e,this.TIME.HOURS),`${e} ${t} назад`}}},{key:"addIds",value:function(e,t="id"){return e.map(function(e,n){return e[t]=n,e})}}])}();Ir(ko,"CLEAR_MACRO","__CLEAR__"),Ir(ko,"ERROR_DEFAULT","Что пошло не так."),Ir(ko,"DEFAULT_REDIRECT_TIMEOUT",3e3),Ir(ko,"CLASS_OK","is-success"),Ir(ko,"CLASS_ERR","is-danger"),Ir(ko,"SCROLL_DISABLER_CLASS","remove-scroll"),Ir(ko,"FILLER","_"),Ir(ko,"SCROLL_OPTIONS",{top:0,behavior:"smooth"}),Ir(ko,"MOBILE_WIDTH_BREAK_POINT",760),Ir(ko,"MONEY_SIGN","&#8381;"),Ir(ko,"TIME",{SECONDS:["секунду","секунды","секунд"],MINUTES:["минуту","минуты","минут"],HOURS:["час","часа","часов"]});var bo=On('<span class="mr-2"> </span>'),_o=On('<span class="mr-2"> </span>'),wo=On('<span class="icon is-small is-left"><i></i></span>'),Oo=On('<i class="fas fa-check"></i>'),$o=On('<i class="fas fa-exclamation-triangle"></i>'),So=On('<span class="icon is-small is-right"><!></span>'),Io=On("<div><select><!><!></select></div> <!> <!>",1),Ao=On("<div><!></div> <!>",1);function Co(e,t){Z(t,!0);const n=()=>Yi(pr,"$LOCALE",i),[i,r]=Qi();let o=rr(t,"inputStarted",7,!1),s=rr(t,"value",3,""),a=rr(t,"variants",19,()=>[]),l=rr(t,"placeholder",3,""),u=rr(t,"emptyValueTitle",3,""),c=rr(t,"fieldname",3,"select"),d=rr(t,"icon",3,!1),f=rr(t,"required",3,!0),h=rr(t,"readonly",3,!1),g=rr(t,"multiple",3,!1),p=rr(t,"size",3,8),v=rr(t,"valid",3,!0),m=rr(t,"validated",3,!1),y=rr(t,"errors",3,!1),k=rr(t,"formErrors",3,!1);rr(t,"formLevelError",3,!1);let b=rr(t,"onchange",3,()=>{}),_=rr(t,"onInputStarted",3,()=>{});rr(t,"class",3,"");let w,O,$=rr(t,"idField",3,"id"),S=rr(t,"titleField",3,"title"),I=De(Ge([]));function A(e){return Array.isArray(s())&&g()?s().indexOf(e[$()])>-1:!!s()&&s()==e[$()]}function C(){if(g()){const e=Array.from(O.selectedOptions).map(e=>e.value);return e.indexOf(ko.CLEAR_MACRO)>-1?[]:e}return O.value===ko.CLEAR_MACRO?"":O.value}function E(){_()(),o(!0)}function L(e){let t={field:c(),value:C()};return w===t.value||Array.isArray(t.value)&&Qr.compareTwoArrays(w,t.value)||(E(),b()(t)),!0}function T(e){let t={field:c(),value:C()};return E(),w=t.value,b()(t),!0}Vn(()=>{T()});let x,F,N,M=Le(()=>(d()?" has-icons-left ":"")+" has-icons-right ");or(()=>{x=[].concat(y()?y():[],k()?k():[])}),or(()=>{F=!(m()&&v())&&o()}),or(()=>{N=!0!==v()&&o()?ko.CLASS_ERR:ko.CLASS_OK});let P=Le(()=>g()?" is-multiple ":"");or(()=>{s(),Be(I,Array.isArray(a())?a().filter(A):[],!0)});var U=Ao(),R=rt(U),D=it(R),j=e=>{var t=Sn(),i=rt(t),r=e=>{var t=Sn();Qn(rt(t),17,()=>an(I),Yn,(e,t)=>{var i=bo(),r=it(i);kt(()=>Pn(r,n()[an(t)[S()]])),In(e,i)}),In(e,t)},o=e=>{var t=_o(),i=it(t);kt(()=>Pn(i,n()[u()])),In(e,t)};Gn(i,e=>{s()?e(r):e(o,!1)}),In(e,t)},W=e=>{var t=Io(),n=rt(t),i=it(n);i.__input=T,i.__change=T;var r=it(i),o=e=>{var t=Sn(),n=rt(t),i=e=>{po(e,{get value(){return ko.CLEAR_MACRO},get title(){return l()}})},r=e=>{po(e,{get value(){return ko.CLEAR_MACRO},selected:"selected",get title(){return l()}})};Gn(n,e=>{s()?e(i):e(r,!1)}),In(e,t)};Gn(r,e=>{l().length>0&&e(o)}),Qn(ot(r),17,a,Yn,(e,t)=>{var n=Sn(),i=rt(n),r=e=>{{let n=Le(()=>s()&&s().indexOf(an(t)[$()])>-1);po(e,{get value(){return an(t)[$()]},get selected(){return an(n)},get title(){return an(t)[S()]}})}},o=e=>{{let n=Le(()=>s()==an(t)[$()]);po(e,{get value(){return an(t)[$()]},get selected(){return an(n)},get title(){return an(t)[S()]}})}};Gn(i,e=>{g()?e(r):e(o,!1)}),In(e,n)}),Wi(i,e=>O=e,()=>O);var u=ot(n,2),y=e=>{var t=wo(),n=it(t);kt(()=>di(n,1,`fas fa-${d()??""}`)),In(e,t)};Gn(u,e=>{d()&&e(y)});var k=ot(u,2),b=e=>{var t=So(),n=it(t),i=e=>{In(e,Oo())},r=e=>{var t=Sn(),n=rt(t),i=e=>{In(e,$o())};Gn(n,e=>{!1===v()&&e(i)},!0),In(e,t)};Gn(n,e=>{!0===v()?e(i):e(r,!1)}),In(e,t)};Gn(k,e=>{!0===m()&&e(b)}),kt(()=>{di(n,1,`select ${N??""} ${an(P)??""}`),Oi(i,"id",`form-field-select-${c()??""}`),Oi(i,"name",c()),i.readOnly=h(),i.required=f(),i.multiple=g(),Oi(i,"size",!!g()&&p())}),mn("blur",i,L),In(e,t)};Gn(D,e=>{h()?e(j):e(W,!1)}),yo(ot(R,2),{get id(){return`input-field-helper-${c()??""}`},get errors(){return x},set errors(e){x=e},get show(){return F},set show(e){F=e},get classes(){return N},set classes(e){N=e}}),kt(()=>di(R,1,`control ${an(M)??""}`)),In(e,U),ee(),r()}yn(["input","change"]);var Eo=On('<span class="icon"><i></i></span>'),Lo=On("<span> </span>"),To=On('<span class="icon"><i></i></span>'),xo=On("<!> <!> <!>",1),Fo=On("<button><!></button>");function No(e,t){Z(t,!0);const n=()=>Yi(pr,"$LOCALE",i),[i,r]=Qi();let o=rr(t,"title",3,""),s=rr(t,"light",3,!1),a=rr(t,"loading",3,!1),l=rr(t,"raised",3,!1),u=rr(t,"outlined",3,!1),c=rr(t,"inverted",3,!1),d=rr(t,"rounded",3,!1),f=rr(t,"disabled",3,!1),h=rr(t,"state",3,""),g=rr(t,"type",3,""),p=rr(t,"color",3,""),v=rr(t,"size",3,""),m=rr(t,"classes",3,""),y=rr(t,"icon",3,!1),k=rr(t,"iconSide",3,"right"),b=rr(t,"action",3,()=>!0),_=rr(t,"onclick",3,()=>{});var w=Fo();w.__click=function(e){return e.stopPropagation(),_()({event:e,value:t.value}),b()(e,t.value)};var O=it(w),$=e=>{var n=Sn();Bn(rt(n),()=>t.children),In(e,n)},S=e=>{var t=Sn(),i=rt(t),r=e=>{var t=xo(),i=rt(t),r=e=>{var t=Eo(),n=it(t);kt(()=>di(n,1,`fas fa-${y()??""} ${v()?`is-${v()}`:""}`)),In(e,t)};Gn(i,e=>{"left"===k()&&e(r)});var s=ot(i,2),a=e=>{var t=Lo(),i=it(t);kt(()=>Pn(i,n()[o()])),In(e,t)};Gn(s,e=>{o()&&e(a)});var l=ot(s,2),u=e=>{var t=To(),n=it(t);kt(()=>di(n,1,`fas fa-${y()??""} ${v()?`is-${v()}`:""}`)),In(e,t)};Gn(l,e=>{"right"===k()&&e(u)}),In(e,t)},s=e=>{var t=$n();kt(()=>Pn(t,n()[o()])),In(e,t)};Gn(i,e=>{y()?e(r):e(s,!1)},!0),In(e,t)};Gn(O,e=>{t.children?e($):e(S,!1)}),kt(()=>{w.disabled=f(),Oi(w,"type",g()?g():""),di(w,1,`\n button\n ${m()??""}\n ${h()?`is-${h()}`:""}\n ${c()?"is-inverted":""}\n ${u()?"is-outlined":""}\n ${l()?"is-raised":""}\n ${d()?"is-rounded":""}\n ${s()?"is-light":""}\n ${a()?"is-loading":""}\n ${p()?`is-${p()}`:""}\n ${v()?`is-${v()}`:""}\n `)}),In(e,w),ee(),r()}yn(["click"]);var Mo=On("<div><!></div>");function Po(e,t){Z(t,!0);let n=rr(t,"values",23,()=>[]),i=rr(t,"centered",3,!1),r=rr(t,"right",3,!1),o=rr(t,"classes",3,""),s=rr(t,"buttonComponent",3,No),a=rr(t,"onclick",3,()=>{}),l=rr(t,"action",3,e=>{a()(e)});n().every(e=>Object.hasOwn(e,"id"))||n(ko.addIds(n()));var u=Mo(),c=it(u),d=e=>{var t=Sn();Qn(rt(t),17,n,e=>e.id,(e,t,n)=>{const i=Le(s);var r=Sn(),o=rt(r);{let e=Le(()=>an(t).action?an(t).action:l());ri(o,()=>an(i),(n,i)=>{i(n,ir(()=>an(t),{get action(){return an(e)},get onclick(){return a()},get value(){return an(t).value},set value(e){an(t).value=e}}))})}In(e,r)}),In(e,t)};Gn(c,e=>{Array.isArray(n())&&e(d)}),kt(()=>di(u,1,`buttons has-addons ${i()?"is-centered":""} ${r()?"is-right":""} ${o()??""}`)),In(e,u),ee()}var Uo=On('<div><div class="column"><!></div> <div class="column"><!></div> <div class="column"><!></div></div>');function Ro(e,t){let n=rr(t,"classes",3,""),i=rr(t,"left",19,()=>[]),r=rr(t,"center",19,()=>[]),o=rr(t,"right",19,()=>[]);var s=Uo(),a=it(s);Po(it(a),{get values(){return i()}});var l=ot(a,2);Po(it(l),{get values(){return r()},centered:!0}),Po(it(ot(l,2)),{get values(){return o()},right:!0}),kt(()=>di(s,1,`columns ${n()??""}`)),In(e,s)}function Do(e,t){Z(t,!0);const[n,i]=Qi(),r=zn();let o=rr(t,"title",3,""),s=rr(t,"light",3,!1),a=rr(t,"loading",3,!1),l=rr(t,"raised",3,!1),u=rr(t,"outlined",3,!1),c=rr(t,"inverted",3,!1),d=rr(t,"rounded",3,!1),f=rr(t,"disabled",3,!1),h=rr(t,"state",3,""),g=rr(t,"type",3,""),p=rr(t,"color",3,""),v=rr(t,"size",3,""),m=rr(t,"classes",3,""),y=rr(t,"icon",3,!1),k=rr(t,"iconSide",3,"right"),b=rr(t,"uiOff",3,()=>({color:""})),_=rr(t,"uiOn",3,()=>({color:"success"})),w=rr(t,"action",3,()=>!O()),O=rr(t,"selected",15,!1);let $=Yi(h(),"$state",n)();or(()=>{$&&(O()?$.$set(_()()):$.$set(b()()))}),Wi(No(e,{get title(){return o()},get light(){return s()},get loading(){return a()},get raised(){return l()},get outlined(){return u()},get inverted(){return c()},get rounded(){return d()},get disabled(){return f()},get state(){return h()},get type(){return g()},get color(){return p()},get size(){return v()},get classes(){return m()},get icon(){return y()},get iconSide(){return k()},get value(){return t.value},$$events:{click:function(e){O(w()(e,t.value,O())),r("click",{value:t.value,selected:O()}),r("change",{value:t.value,selected:O()})}}}),e=>$=e,()=>$),ee(),i()}var jo=On("<div></div>");function Wo(e,t){function n(e,t){let n=u()-e;if(n)for(let e in i())if(e!==t&&!i()[e].selected&&(i(i()[e].selected=!0,!0),n--,!n))break}Z(t,!0),zn(),Vn(()=>{u()&&n(0,-1)});let i=rr(t,"values",31,()=>Ge([])),r=rr(t,"centered",3,!1),o=rr(t,"right",3,!1),s=rr(t,"classes",3,""),a=rr(t,"buttonComponent",3,Do),l=rr(t,"action",3,(e,t,r)=>{let o=!r;const s=i().indexOf(e=>e.value===t),a=i().filter(e=>e.selected).length+(o?1:-1);return u()&&a<u()&&(n(a,s),i(i())),c()&&c()<a&&(!function(e,t){let n=e-c();if(n)for(let e in i())if(e!==t&&i()[e].selected&&(i(i()[e].selected=!1,!0),n--,!n))break}(a,s),i(i())),o}),u=rr(t,"min",3,0),c=rr(t,"max",3,100);var d={selectAll:function(){i().forEach(e=>{e.selected=!0}),i(i())},deselectAll:function(){i().forEach(e=>{e.selected=!1}),i(i())}},f=jo();return Qn(f,21,i,e=>e.id,(e,n,i)=>{const r=Le(a);var o=Sn(),s=rt(o);{let e=Le(()=>an(n).action?an(n).action:l());ri(s,()=>an(r),(i,r)=>{r(i,ir(()=>an(n),{get action(){return an(e)},get value(){return an(n).value},set value(e){an(n).value=e},get selected(){return an(n).selected},set selected(e){an(n).selected=e},$$events:{click(e){zi.call(this,t,e)},change(e){zi.call(this,t,e)}}}))})}In(e,o)}),kt(()=>di(f,1,`buttons has-addons ${r()?"is-centered":""} ${o()?"is-right":""} ${s()??""}`)),In(e,f),ee(d)}var Bo=Object.freeze({__proto__:null,UIButton:No,UIButtonSwitch:Do,UIButtons:Po,UIButtonsRow:Ro,UIButtonsSwitchers:Wo});const Vo="ok",zo={SHORT:500,NORMAL:1500,LONG:5e3},qo=1500;var Ho=On('<div class="field has-addons"><!></div> <div class="control"><!></div>',1);var Go=On('<div class="control"><!></div>');var Ko=On("<progress> </progress>");var Jo=On("<div><!> <!> <!></div>");var Yo=On("<!> <!>",1);function Qo(e,t){Z(t,!0);const n=()=>Yi(pr,"$LOCALE",i),[i,r]=Qi();let o=rr(t,"id",19,()=>`title-${Math.random()}`),s=rr(t,"title",3,""),a=rr(t,"size",3,1),l=rr(t,"spaced",3,!1),u=rr(t,"align",3,"left");let c=Le(()=>t.subsize?t.subsize:parseInt(a())<6?parseInt(a())+1:a()),d=Le(()=>l()?"is-spaced":""),f=Le(()=>`<h${a()} id="${o()}" style="text-align: ${u()};" class="title ${an(d)} is-${a()}">${n()[s()]}</h${a()}>`),h=Le(()=>`<h${an(c)} id="${o()}" style="text-align: ${u()};" class="subtitle is-${an(c)}">${n()[t.subtitle]}</h${an(c)}>`);var g={scrollToTop:(e=ko.SCROLL_OPTIONS)=>{setTimeout(()=>{document.getElementById(o()).scrollIntoView(e)},100)}},p=Yo(),v=rt(p),m=e=>{var t=Sn();ni(rt(t),()=>an(f)),In(e,t)};Gn(v,e=>{s()&&e(m)});var y=ot(v,2),k=e=>{var t=Sn();ni(rt(t),()=>an(h)),In(e,t)};Gn(y,e=>{t.subtitle&&e(k)}),In(e,p);var b=ee(g);return r(),b}var Xo=On('<article class="media"><figure class="media-left"><p class="image is-32x32"><img/></p></figure> <div class="media-content"><div class="content"><p><strong> </strong> <small>@</small> <strong> </strong></p></div></div></article>');var Zo=On("<p> </p>"),es=On('<span class="icon is-small is-left"><i></i></span>'),ts=On('<i class="fas fa-check"></i>'),ns=On('<i class="fas fa-exclamation-triangle"></i>'),is=On('<span class="icon is-small is-right"><!></span>'),rs=On('<input type="text"/> <!> <!>',1),os=On("<div><!></div> <!>",1);function ss(e,t){Z(t,!0);const[n,i]=Qi();let r,o,s=rr(t,"inputStarted",15,!1),a=rr(t,"value",15,""),l=rr(t,"placeholder",3,""),u=rr(t,"fieldname",3,"textfield"),c=rr(t,"icon",3,!1),d=rr(t,"required",3,!0),f=rr(t,"disabled",3,!1),h=rr(t,"readonly",3,!1),g=rr(t,"valid",3,!0),p=rr(t,"validated",3,!1),v=rr(t,"errors",3,!1),m=rr(t,"formErrors",3,!1),y=rr(t,"formLevelError",3,!1),k=rr(t,"onchange",3,()=>{}),b=Le(()=>(c()?" has-icons-left ":"")+" has-icons-right ");or(()=>{r=[].concat(v()?v():[],m()?m():[])}),or(()=>{o=!(p()&&g())&&s()});let _,w=Le(()=>!1===g()||y());function O(){let e={field:u(),value:a()};return s(!0),k()(e),!0}function $(e){let t={field:u(),value:e.currentTarget.value};return s(!0),k()(t),!0}or(()=>{_=!0!==g()&&s()?ko.CLASS_ERR:ko.CLASS_OK});var S=os(),I=rt(S),A=it(I),C=e=>{var t=Zo(),n=it(t);kt(()=>Pn(n,a())),In(e,t)},E=e=>{var t=rs(),i=rt(t);i.__change=O,i.__input=$;var r=ot(i,2),o=e=>{var t=es(),n=it(t);kt(()=>di(n,1,`fas fa-${c()??""}`)),In(e,t)};Gn(r,e=>{c()&&e(o)});var s=ot(r,2),v=e=>{var t=is(),n=it(t),i=e=>{In(e,ts())},r=e=>{var t=Sn(),n=rt(t),i=e=>{In(e,ns())};Gn(n,e=>{!1===g()&&e(i)},!0),In(e,t)};Gn(n,e=>{!0===g()?e(i):e(r,!1)}),In(e,t)};Gn(s,e=>{!0===p()&&e(v)}),kt(()=>{Oi(i,"id",`form-field-textfield-${u()??""}`),di(i,1,`input ${_??""}`),Oi(i,"name",u()),Oi(i,"invalid",an(w)),i.disabled=f(),i.required=d(),i.readOnly=h(),Oi(i,"placeholder",Yi(pr,"$LOCALE",n)[l()]),Oi(i,"autocomplete",u()),Oi(i,"aria-controls",`input-field-helper-${u()??""}`),Oi(i,"aria-describedby",`input-field-helper-${u()??""}`)}),Pi(i,a),In(e,t)};Gn(A,e=>{h()?e(C):e(E,!1)}),yo(ot(I,2),{get id(){return`input-field-helper-${u()??""}`},get errors(){return r},set errors(e){r=e},get show(){return o},set show(e){o=e},get classes(){return _},set classes(e){_=e}}),kt(()=>di(I,1,`control ${an(b)??""}`)),In(e,S),ee(),i()}yn(["change","input"]);var as=On('<div class="columns"><div class="column"><div class="field"><!></div></div></div>');function ls(e,t){Z(t,!0);const[n,i]=Qi(),r=zn();let o=rr(t,"placeholder",19,()=>Yi(pr,"$LOCALE",n)["not-node:field_search_placeholder"]),s=rr(t,"term",15,"");var a=as(),l=it(a),u=it(l);ss(it(u),{get placeholder(){return o()},fieldname:"searchTermInput",icon:"magnifying-glass",get value(){return s()},set value(e){s(e)},$$events:{change:function({detail:e}){r("termChange",e)}}}),In(e,a),ee(),i()}var us=Object.freeze({__proto__:null,UIBoolean:io,UIBooleanLabeled:function(e,t){Z(t,!0);const[n,i]=Qi();let r=rr(t,"inverted",3,!1);var o=ro(),s=it(o);io(ot(s),{get value(){return t.value},get inverted(){return r()}}),kt(()=>Pn(s,`${Yi(pr,"$LOCALE",n)[t.label]??""}: `)),In(e,o),ee(),i()},UIBooleans:oo,UICensored:function(e,t){Z(t,!0);let n=rr(t,"hidden",15,!0),i=rr(t,"showable",3,!0),r=rr(t,"copiable",3,!0),o=rr(t,"copyIcon",3,"copy"),s=rr(t,"showIcon",3,"eye"),a=rr(t,"hideIcon",3,"eye-slash"),l=rr(t,"maxLength",3,20),u=rr(t,"shadowClass",3,"has-background-primary-90"),c=rr(t,"tooltip",3,!0),d=rr(t,"tooltipTTL",3,2e3),f=rr(t,"tooltipText",3,"Скопировано в буфер"),h=rr(t,"tooltipClass",3,"has-tooltip-info"),g=rr(t,"value",3,"");function p(){n(!n())}let v=De(!1),m=Le(()=>c()&&an(v)),y=De(void 0);async function k(){try{await navigator.clipboard.writeText(g()),c()&&(Be(v,!0),an(y).dataset.tooltip=f(),setTimeout(()=>{Be(v,!1),an(y).removeAttribute("data-tooltip")},d()))}catch(e){console.error("Failed to copy: ",e)}}var b=lo(),_=rt(b),w=it(_),O=ot(_,2),$=e=>{var t=so();t.__click=k;var n=it(t);Wi(t,e=>Be(y,e),()=>an(y)),kt(()=>{di(t,1,"icon is-small is-right is-clickable "+(an(m)?` ${h()} `:"")+" is-vertical-middle"),di(n,1,`fas fa-${o()??""}`)}),In(e,t)};Gn(O,e=>{r()&&e($)});var S=ot(O,2),I=e=>{var t=ao();t.__click=p;var i=it(t);kt(()=>di(i,1,`fas fa-${(n()?s():a())??""}`)),In(e,t)};Gn(S,e=>{i()&&e(I)}),kt(()=>{di(_,1,(n()?"is-censored "+u():"")+" is-vertical-middle "),hi(_,`display:inline-block; width: ${l()}rem; height: var(--bulma-size-medium); overflow-x:hidden;`),Pn(w,n()?"":g())}),In(e,b),ee()},UIErrorsList:yo,UIIndicator:co,UILoader:ho,UIProgress:function(e,t){let n=rr(t,"max",3,100),i=rr(t,"color",3,""),r=rr(t,"size",3,""),o=rr(t,"classes",3,"");var s=Ko(),a=it(s);kt(()=>{di(s,1,`\n progress\n ${o()??""}\n ${i()?`is-${i()}`:""}\n ${r()?`is-${r()}`:""}`),bi(s,t.value),Oi(s,"max",n()),Pn(a,`${t.value??""}%`)}),In(e,s)},UISelectFromModelOnDemandInline:function(e,t){Z(t,!0);let n,i=rr(t,"inputStarted",3,!1),r=rr(t,"variants",31,()=>Ge([])),o=rr(t,"placeholder",3,"empty select item"),s=rr(t,"fieldname",3,"selectFromModel"),a=rr(t,"modelName",3,""),l=rr(t,"actionName",3,""),u=rr(t,"actionFilter",19,()=>({})),c=rr(t,"actionSorter",19,()=>({})),d=rr(t,"actionPager",19,()=>({})),f=rr(t,"actionSearch",3,void 0),h=rr(t,"optionId",3,":_id"),g=rr(t,"optionTitle",3,":title"),p=rr(t,"icon",3,!1),v=rr(t,"required",3,!0),m=rr(t,"readonly",3,!1),y=rr(t,"multiple",3,!1),k=rr(t,"size",3,8),b=rr(t,"valid",3,!0),_=rr(t,"validated",3,!1),w=rr(t,"errors",15,!1),O=rr(t,"formErrors",3,!1),$=rr(t,"formLevelError",3,!1),S=rr(t,"onreject",3,()=>{}),I=rr(t,"onresolve",3,()=>{}),A=Le(()=>!0),C=De("hidden"),E=[];function L({detail:e}){n=E.find(t=>qr.get(h(),t)===e.value)}Vn(async()=>{if(a()&&l()&&u()){const e=Qr.getApp().getModel(a()).setFilter(u()).setSorter(c()).setPager(d()).setSearch(f()),t=await e["$"+l()]();t.status===Vo?(E=t.result,r(E.map(e=>({id:qr.get(h(),e),title:qr.get(g(),e)})))):w(result.errors||[result.message])}});const T={add:{color:"primary",icon:"plus",action(){Be(C,"show")}},resolve:{icon:"check",color:"primary",action(){Be(C,"hidden"),I()(n)}},reject:{icon:"close",color:"danger",action(){Be(C,"hidden"),S()()}}};var x=Sn(),F=rt(x),N=e=>{No(e,ir(()=>T.add))},M=e=>{var n=Sn(),a=rt(n),l=e=>{var n=Ho(),a=rt(n);Co(it(a),{get inputStarted(){return i()},get value(){return t.value},get variants(){return r()},get placeholder(){return o()},get fieldname(){return s()},get icon(){return p()},get required(){return v()},get readonly(){return m()},disabled:an(A),get multiple(){return y()},get size(){return k()},get valid(){return b()},get validated(){return _()},get errors(){return w()},get formErrors(){return O()},get formLevelError(){return $()},onchange:L});var l=it(ot(a,2));{let e=Le(()=>[T.resolve,T.reject]);Po(l,{get values(){return an(e)}})}In(e,n)};Gn(a,e=>{"show"==an(C)&&e(l)},!0),In(e,n)};Gn(F,e=>{"hidden"===an(C)?e(N):e(M,!1)}),In(e,x),ee()},UISelectFromModelWithSearchModal:function(e,t){Z(t,!0);let n=rr(t,"value",15),i=rr(t,"inputStarted",15,!1),r=rr(t,"icon",3,!1),o=rr(t,"fieldname",3,""),s=rr(t,"readonly",3,!1),a=rr(t,"serviceName",3,""),l=rr(t,"serviceOpenSelectorMethod",3,"openSelector"),u=rr(t,"serviceLoadDataMethod",3,"loadData"),c=rr(t,"modelData",15,null),d=rr(t,"loading",15,!1),f=rr(t,"selectedModelTitleFormatter",3,e=>`${e._id}`),h=rr(t,"loadingLabel",3,"not-node:loading_label"),g=rr(t,"isEmptyLabel",3,"not-node:field_value_is_empty_placeholder"),p=rr(t,"onchange",3,()=>{});function v(){if(!a())throw new Error("serviceName is not set");return Qr.getApp().getService(a())}function m(){if(!l())throw new Error("serviceOpenSelectorMethod is not set");v()[l()]().then(e=>(n(e._id),c(e),n())).then(e=>{i(!0),p()({field:o(),value:e})}).catch(e=>{Qr.report(e)})}Vn(()=>{!async function(){try{n()&&(d(!0),c(await v()[u()](n())))}catch(e){Qr.report(e)}finally{d(!1)}}()});const y=[{id:1,action:m,icon:r(),color:"warning"},{id:2,action:function(){n(void 0),c(null),p()({field:o(),value:n()})},icon:"times",color:"danger"}];function k(){return d()?{disabled:!0,loading:d(),title:h()}:c()?{disabled:s(),action:m,title:f()(c())}:{disabled:!0,title:g()}}let b=De(Ge([]));or(()=>{n()?Be(b,[k(),...s()?[]:y],!0):Be(b,[k(),...s()?[]:[y[0]]],!0)});var _=Go();Po(it(_),{get values(){return an(b)},classes:"is-no-flex-wrap"}),In(e,_),ee()},UIShowOneFromList:function(e,t){Z(t,!0);const n=e=>e[o()]===t.id;let i=rr(t,"values",19,()=>[]),r=rr(t,"active",15),o=rr(t,"idFieldName",3,"_id"),s=rr(t,"filter",3,n);or(()=>{r(Array.isArray(i())&&i().length&&void 0!==t.id?i().find(s()||n):void 0)});var a=Sn(),l=rt(a),u=e=>{var n=Sn();ri(rt(n),()=>t.UIComponent,(e,t)=>{t(e,ir(r))}),In(e,n)},c=e=>{var n=Sn(),i=rt(n),r=e=>{var n=Sn();ri(rt(n),()=>t.UIPlaceholder,(e,t)=>{t(e,{})}),In(e,n)};Gn(i,e=>{t.UIPlaceholder&&e(r)},!0),In(e,n)};Gn(l,e=>{r()?e(u):e(c,!1)}),In(e,a),ee()},UISimpleSearchInput:ls,UITag:no,UITagValue:function(e,t){Z(t,!0);let n=rr(t,"id",3,"taggedValueId"),i=rr(t,"actions",19,()=>[]),r=rr(t,"classes",3,""),o=rr(t,"actionsGroupContructor",3,Po),s=rr(t,"actionsGroupProps",19,()=>({})),a=rr(t,"readonly",3,!1);var l=Jo(),u=it(l),c=e=>{no(e,ir(()=>t.title))};Gn(u,e=>{t.title&&e(c)});var d=ot(u,2),f=e=>{no(e,ir(()=>t.value))};Gn(d,e=>{t.value&&e(f)});var h=ot(d,2),g=e=>{const t=Le(o);var n=Sn();ri(rt(n),()=>an(t),(e,t)=>{t(e,ir({get values(){return i()}},s))}),In(e,n)};Gn(h,e=>{!a()&&i()&&i().length&&e(g)}),kt(()=>{di(l,1,`tags has-addons ${r()??""}`),Oi(l,"id",n())}),In(e,l),ee()},UITitle:Qo,UIUserCard:function(e,t){Z(t,!0);let n=rr(t,"id",3,"userCard"),i=rr(t,"image",3,"https://bulma.io/images/placeholders/32x32.png"),r=rr(t,"username",15,"John Doe"),o=rr(t,"role",15,"admin"),s=rr(t,"events",31,()=>Ge({})),a=rr(t,"register",19,()=>Qr.registerWidgetEvents),l=rr(t,"onUpdate",3,e=>{Object.hasOwn(e,"username")&&r(e.username),Object.hasOwn(e,"role")&&o(e.role)});function u(){return`usercard-${n()}`}function c(){return`${u()}:update`}Vn(()=>{Object.hasOwn(s(),c())||s(s()[c()]=l(),!0),a()(s())});var d=Xo(),f=it(d),h=it(f),g=it(h),p=it(ot(f,2)),v=it(p),m=it(v),y=it(m),k=it(ot(m,4));kt(e=>{Oi(d,"id",e),Oi(g,"src",i()),Oi(g,"alt",r()),Pn(y,r()),Pn(k,o())},[u]),In(e,d),ee()}});function cs(e){const t=e-1;return t*t*t+1}function ds(e,{from:t,to:n},i={}){var{delay:r=0,duration:o=e=>120*Math.sqrt(e),easing:s=cs}=i,a=getComputedStyle(e),l="none"===a.transform?"":a.transform,[u,c]=a.transformOrigin.split(" ").map(parseFloat);u/=e.clientWidth,c/=e.clientHeight;var d=function(e){if("currentCSSZoom"in e)return e.currentCSSZoom;var t=e,n=1;for(;null!==t;)n*=+getComputedStyle(t).zoom,t=t.parentElement;return n}(e),f=e.clientWidth/n.width/d,h=e.clientHeight/n.height/d,g=t.left+t.width*u,p=t.top+t.height*c,v=n.left+n.width*u,m=n.top+n.height*c,y=(g-v)*f,k=(p-m)*h,b=t.width/n.width,_=t.height/n.height;return{delay:r,duration:"function"==typeof o?o(Math.sqrt(y*y+k*k)):o,easing:s,css:(e,t)=>`transform: ${l} translate(${t*y}px, ${t*k}px) scale(${e+t*b}, ${e+t*_});`}}z=!0;const fs=e=>e;function hs(e,{delay:t=0,duration:n=400,easing:i=fs}={}){const r=+getComputedStyle(e).opacity;return{delay:t,duration:n,easing:i,css:e=>"opacity: "+e*r}}var gs=On('<option selected class="svelte-wl7m3y"> </option>'),ps=On('<option selected class="svelte-wl7m3y"> </option>'),vs=On('<div class="tags has-addons svelte-wl7m3y"><span class="tag svelte-wl7m3y"> </span> <span class="tag is-delete svelte-wl7m3y"></span></div>'),ms=On("<div><!></div>"),ys=On('<span class="autocomplete-clear-button svelte-wl7m3y"><!></span>'),ks=On("<div><!></div>"),bs=On('<div class="autocomplete-list-item-no-results svelte-wl7m3y"> </div>'),_s=On("<!> <!> <!>",1),ws=On('<div class="autocomplete-list-item-loading svelte-wl7m3y"><!></div>'),Os=On('<div class="autocomplete-list-item-create svelte-wl7m3y"><!></div>'),$s=On('<div class="autocomplete-list-item-no-results svelte-wl7m3y"><!></div>'),Ss=On('<div><select class="svelte-wl7m3y"><!></select> <div class="input-container svelte-wl7m3y"><!> <input/> <!></div> <div><!></div></div>');function Is(e,t){const n=tr(t,["children","$$slots","$$events","$$legacy"]),i=tr(n,["highlightFilter","items","searchFunction","labelFieldName","keywordsFieldName","valueFieldName","labelFunction","keywordsFunction","valueFunction","keywordsCleanFunction","textCleanFunction","beforeChange","onChange","onFocus","onBlur","onCreate","selectFirstIfEmpty","minCharactersToSearch","maxItemsToShowInList","multiple","create","ignoreAccents","matchAllKeywords","sortByMatchedKeywords","itemFilterFunction","itemSortFunction","lock","delay","localFiltering","localSorting","cleanUserText","lowercaseKeywords","closeOnBlur","orderableSelection","hideArrow","showClear","clearText","showLoadingIndicator","noResultsText","loadingText","moreItemsText","createText","placeholder","className","inputClassName","inputId","name","selectName","selectId","title","html5autocomplete","autocompleteOffValue","readonly","dropdownClassName","disabled","noInputStyles","required","debug","tabindex","selectedItem","value","highlightedItem","text"]);Z(t,!1);const r=je(),o=je(),s=je(),l=je();let u=rr(t,"items",28,()=>[]),c=rr(t,"searchFunction",8,!1),d=rr(t,"labelFieldName",8,void 0),f=rr(t,"keywordsFieldName",24,d),h=rr(t,"valueFieldName",8,void 0),g=rr(t,"labelFunction",8,function(e){return null==e?"":d()?e[d()]:e}),m=rr(t,"keywordsFunction",8,function(e){return null==e?"":f()?e[f()]:g()(e)}),y=rr(t,"valueFunction",8,function(e,t=!1){return null==e?e:!T()||t?h()?e[h()]:e:e.map(e=>h()?e[h()]:e)}),k=rr(t,"keywordsCleanFunction",8,function(e){return e}),b=rr(t,"textCleanFunction",8,function(e){return e}),_=rr(t,"beforeChange",8,function(e,t){return!0}),O=rr(t,"onChange",8,function(e){}),S=rr(t,"onFocus",8,function(){}),I=rr(t,"onBlur",8,function(){}),A=rr(t,"onCreate",8,function(e){ye()&&console.log("onCreate: "+e)}),C=rr(t,"selectFirstIfEmpty",8,!1),E=rr(t,"minCharactersToSearch",8,1),L=rr(t,"maxItemsToShowInList",8,0),T=rr(t,"multiple",8,!1),x=rr(t,"create",8,!1),F=rr(t,"ignoreAccents",8,!0),N=rr(t,"matchAllKeywords",8,!0),M=rr(t,"sortByMatchedKeywords",8,!1),P=rr(t,"itemFilterFunction",8,void 0),U=rr(t,"itemSortFunction",8,void 0),R=rr(t,"lock",8,!1),D=rr(t,"delay",8,0),j=rr(t,"localFiltering",8,!0),W=rr(t,"localSorting",8,!0),B=rr(t,"cleanUserText",8,!0),V=rr(t,"lowercaseKeywords",8,!0),z=rr(t,"closeOnBlur",8,!1),q=rr(t,"orderableSelection",8,!1),H=rr(t,"hideArrow",8,!1),G=rr(t,"showClear",8,!1),J=rr(t,"clearText",8,"&#10006;"),Y=rr(t,"showLoadingIndicator",8,!1),Q=rr(t,"noResultsText",8,"No results found"),X=rr(t,"loadingText",8,"Loading results..."),te=rr(t,"moreItemsText",8,"items not shown"),ne=rr(t,"createText",8,"Not found, add anyway?"),ie=rr(t,"placeholder",8,void 0),re=rr(t,"className",8,void 0),oe=rr(t,"inputClassName",8,void 0),se=rr(t,"inputId",8,void 0),ae=rr(t,"name",8,void 0),le=rr(t,"selectName",8,void 0),ue=rr(t,"selectId",8,void 0),ce=rr(t,"title",8,void 0),de=rr(t,"html5autocomplete",8,void 0),fe=rr(t,"autocompleteOffValue",8,"off"),he=rr(t,"readonly",8,void 0),ge=rr(t,"dropdownClassName",8,void 0),pe=rr(t,"disabled",8,!1),ve=rr(t,"noInputStyles",8,!1),me=rr(t,"required",8,null),ye=rr(t,"debug",8,!1),ke=rr(t,"tabindex",8,0),be=rr(t,"selectedItem",28,()=>T()?[]:void 0),_e=rr(t,"value",12,void 0),we=rr(t,"highlightedItem",12,void 0);const Oe="sautocomplete-"+Math.floor(1e3*Math.random());let $e,Se=je(),Ie=je(),Ae=je(),Ce=je(!1),xe=je(!1),Fe=je(-1),Ne=rr(t,"text",12,void 0),Me=je(0),Pe=je(),Ue=[],Re=0,De=0,Ve=je(!1);function qe(e,t){let n=function(e,t){if("function"!=typeof e)return void console.error("Not a function: "+e+", argument: "+t);let n;try{n=e(t)}catch(n){console.warn("Error executing Autocomplete function on value: "+t+" function: "+e)}return n}(e,t);return null==n&&(n=""),"string"!=typeof n&&(n=n.toString()),n}function He(e){return qe(g(),e)}function Ge(e){const t=qe(m(),e);let n=qe(k(),t);return n=V()?n.toLowerCase().trim():n,F()&&(n=At(n)),ye()&&console.log("Extracted keywords: '"+n+"' from item: "+JSON.stringify(e)),n}function Ke(){let e;ye()&&(e="Autocomplete prepare list "+(se()?`(id: ${se()})`:""),console.time(e),console.log("Prepare items to search"),console.log("items: "+JSON.stringify(u()))),Array.isArray(u())||(console.warn("Autocomplete items / search function did not return array but",u()),u([]));const t=u()?u().length:0;Ue=new Array(t),t>0&&u().forEach((e,t)=>{const n=function(e){return{keywords:j()?Ge(e):[],label:He(e),item:e}}(e);void 0===n&&console.log("Undefined item for: ",e),Ue[t]=n}),Be(Pe,Ue),ye()&&(console.log(Ue.length+" items to search"),console.timeEnd(e))}function Je(e,t){if(!e)return 0;const n=e.keywords;let i=0;return t.forEach(e=>{n.includes(e)&&i++}),i}async function Qe(){let e;ye()&&(e="Autocomplete search "+(se()?`(id: ${se()})`:""),console.time(e),console.log("Searching user entered text: '"+Ne()+"'"));let t=function(e){if(null==e)return"";if(!B())return e;const t=e.replace(/[&/\\#,+()$~%.'":*?<>{}]/g," ").trim(),n=qe(b(),t);return V()?n.toLowerCase().trim():n.trim()}(Ne());if(E()>1&&t.length<E()&&(t=""),Be(Me,t.length),ye()&&console.log("Changed user entered text '"+Ne()+"' into '"+t+"'"),""===t&&(c()?(u([]),ye()&&console.log("User entered text is empty clear list of items")):(Be(Pe,Ue),ye()&&console.log("User entered text is empty set the list of items to all items")),$t()))ye()&&console.timeEnd(e);else{if(c()){Re+=1;const e=Re;if(Be(xe,!0),"AsyncGeneratorFunction"===c().constructor.name){for await(const n of c()(t,L())){if(e<De)return!1;e>De&&u([]),De=e,u([...u(),...n]),Xe(t)}De<e&&(De=e,u([]),Xe(t))}else{let n=await c()(t,L());if(e<De)return!1;De=e,u(n),Xe(t)}Be(xe,!1)}else Xe(t);ye()&&(console.timeEnd(e),console.log("Search found "+an(Pe).length+" items"))}}function Xe(e){Ke();const t=(F()?At(e):e).split(/\s+/g).filter(e=>""!==e);let n;j()?(n=P()?Ue.filter(e=>P()(e.item,t)):Ue.filter(e=>function(e,t){const n=Je(e,t);return N()?n>=t.length:n>0}(e,t)),W()&&(U()?n=n.sort((e,n)=>U()(e.item,n.item,t)):M()&&(n=n.sort((e,n)=>function(e,t,n){return Je(t,n)-Je(e,n)}(e,n,t))))):n=Ue;const i=It(t,"label");return Be(Pe,n.map(i)),$t(),!0}function Ze(e){let t;if(ye()&&console.log("createdItem",e),void 0!==e){Ke(),Be(Pe,Ue);let n=bt(e,an(Pe));n<=0&&(u([e]),Ke(),Be(Pe,Ue),n=0),n>=0&&(Be(Fe,n),t=an(Pe)[an(Fe)])}return t}function et(e){if(ye()&&console.log("selectListItem",e),void 0===e&&x()){const t=A()(Ne());if(void 0!==t){if("function"==typeof t.then)return t.then(e=>{if(void 0!==e){const t=Ze(e);void 0!==t&&et(t)}}),!0;e=Ze(t)}}if(void 0===e)return ye()&&console.log("listItem is undefined. Can not select."),!1;if(an(l))return!0;const t=e.item;return _()(be(),t)&&(T()?be()?be().includes(t)?be(be().filter(e=>e!==t)):be([...be(),t]):be([t]):(be(void 0),be(t))),!0}function tt(){ye()&&console.log("selectItem",an(Fe));et(an(Pe)[an(Fe)])?(ye()&&console.log("selectListItem true, closing"),wt(),T()&&(Ne(""),an(Se).focus())):ye()&&console.log("selectListItem false, not closing")}function nt(){ye()&&console.log("up"),_t(),an(Fe)>0&&ze(Fe,-1),at()}function st(){ye()&&console.log("down"),_t(),an(Fe)<an(Pe).length-1&&ze(Fe),at()}function at(){ye()&&console.log("highlight");const e=".selected";ye()&&console.log("Seaching DOM element: "+e+" in "+an(Ie));const t=an(Ie)&&an(Ie).querySelector(e);t?"function"==typeof t.scrollIntoViewIfNeeded?(ye()&&console.log("Scrolling selected item into view"),t.scrollIntoViewIfNeeded()):"function"===t.scrollIntoView?(ye()&&console.log("Scrolling selected item into view"),t.scrollIntoView()):ye()&&console.warn("Could not scroll selected item into view, scrollIntoViewIfNeeded not supported"):ye()&&console.warn("Selected item not found to scroll into view")}function lt(e){ye()&&console.log("onListItemClick"),et(e)&&(wt(),T()&&(Ne(""),an(Se).focus()))}function ut(e){ye()&&console.log("unselectItem",e),be(be().filter(t=>t!==e)),an(Se).focus()}function ct(){Qe()&&(Be(Fe,0),_t())}function dt(e){ye()&&console.log("onEsc"),e.stopPropagation(),an(Ce)&&(an(Se).focus(),wt())}function gt(e){ye()&&console.log("onBackspace"),ut(be()[be().length-1])}function vt(){if(ye()&&console.log("resetListToAllItemsAndOpen"),c()&&!Ue.length?Qe():Ne()||Be(Pe,Ue),_t(),be()){ye()&&console.log("Searching currently selected item: "+JSON.stringify(be()));const e=bt(be(),an(Pe));e>=0&&(Be(Fe,e),at())}}function bt(e,t){ye()&&console.log("Finding index for item",e);let n=-1;for(let i=0;i<t.length;i++){const r=t[i];if(void 0!==r){if(ye()&&console.log("Item "+i+": "+JSON.stringify(r)),e===r.item){n=i;break}}else ye()&&console.log(`listItem ${i} is undefined. Skipping.`)}return ye()&&(n>=0?console.log("Found index for item: "+n):console.warn("Not found index for item: "+e)),n}function _t(){ye()&&console.log("open"),an(l)||Ot()||(Be(Ve,!0),Be(Ce,!0))}function wt(){ye()&&console.log("close"),Be(Ce,!1),Be(xe,!1),!Ne()&&C()&&(Be(Fe,0),tt())}function Ot(){return E()>0&&an(Me)<E()&&(c()||an(Me)>0)}function $t(){return!!Ot()&&(wt(),!0)}function St(){ye()&&console.log("clear"),Ne(""),be(T()?[]:void 0),setTimeout(()=>{an(Se).focus()})}function It(e,t){return n=>{let i=n[t];const r=Object.assign({highlighted:void 0},n);r.highlighted=i;const o=i.toLowerCase(),s=F()?At(o):o;if(e&&e.length){const t=[];for(let n=0;n<e.length;n++){let i=e[n];F()&&(i=At(i));const r=i.length;let o=0;do{if(o=s.indexOf(i,o),o>=0){let e=o+r;t.push([o,e]),o=e}}while(-1!==o)}if(t.length>0){const e=new Set;for(let n=0;n<t.length;n++){const i=t[n],r=i[0],s=i[1],a=o.substring(r,s);e.add(a)}for(let t of e){if("b"===t)continue;const e=new RegExp("("+t+")","ig"),n=r.highlighted.replace(e,"<b>$1</b>");r.highlighted=n}}}return r}}function At(e){return e.normalize("NFD").replace(/[\u0300-\u036f]/g,"")}function Ct(e){return!!be()&&(T()?be().includes(e):e===be())}qn(()=>{an(Ve)&&function(){const{height:e}=window.visualViewport,{bottom:t,height:n}=an(Ae).getBoundingClientRect(),{height:i}=an(Ie).getBoundingClientRect();We(Ie,an(Ie).style.top=t+i>e?`-${n+i}px`:"0px")}(),Be(Ve,!1)});let Et=je(!1);function Lt(e,t){q()&&(e.preventDefault(),Be(Et,t))}function Tt(e,t){if(q()){e.preventDefault(),Be(Et,!1);let n=parseInt(e.dataTransfer.getData("source"));n!=t&&function(e,t){let n=[...be()];e<t?(n.splice(t+1,0,n[e]),n.splice(e,1)):(n.splice(t,0,n[e]),n.splice(e+1,1));be(n)}(n,t)}}var xt;mt(()=>(fn(u()),fn(c())),()=>{u(),c()||Ke()}),mt(()=>fn(be()),()=>{be(),_e(y()(be())),be()&&!T()&&Ne(He(be())),Be(Pe,Ue),O()(be())}),mt(()=>(an(Pe),an(Fe)),()=>{we(an(Pe)&&an(Fe)&&an(Fe)>=0&&an(Fe)<an(Pe).length?an(Pe)[an(Fe)].item:null)}),mt(()=>(an(Ce),fn(u()),an(Me)),()=>{Be(r,an(Ce)&&(u()&&u().length>0||an(Me)>0))}),mt(()=>(fn(T()),fn(be())),()=>{Be(o,T()&&be()&&be().length>0||!T()&&be())}),mt(()=>(fn(G()),fn(R()),fn(T()),an(o)),()=>{Be(s,G()||(R()||T())&&an(o))}),mt(()=>(fn(R()),an(o)),()=>{Be(l,R()&&an(o))}),xt=K,yt(()=>{for(var e of xt.l.$){e.deps();var t=e.effect;0!==(t.f&w)&&dn(t,$),Zt(t)&&on(t),e.ran=!1}});var Ft={highlightFilter:It};!function(e=!1){const t=K,n=t.l.u;if(!n)return;let i=()=>fn(t.s);if(e){let e=0,n={};const r=Ee(()=>{let i=!1;const r=t.s;for(const e in r)r[e]!==n[e]&&(n[e]=r[e],i=!0);return i&&e++,e});i=()=>an(r)}n.b.length&&pt(()=>{Vi(t,i),v(n.b)}),ht(()=>{const e=un(()=>n.m.map(p));return()=>{for(const t of e)"function"==typeof t&&t()}}),n.a.length&&ht(()=>{Vi(t,i),v(n.a)})}();var Nt=Ss();let Mt;mn("click",Ye,function(e){ye()&&console.log("onDocumentClick"),e.composedPath().some(e=>e.classList&&e.classList.contains(Oe))?(ye()&&console.log("onDocumentClick inside"),at()):(ye()&&console.log("onDocumentClick outside"),wt())}),mn("scroll",Ye,()=>Be(Ve,!0));var Pt=it(Nt),Ut=it(Pt),Rt=e=>{var t=gs(),n=it(t),i={};kt((e,r)=>{Pn(n,e),i!==(i=r)&&(t.value=(t.__value=r)??"")},[()=>(fn(be()),un(()=>He(be()))),()=>(fn(y()),fn(be()),un(()=>y()(be(),!0)))]),In(e,t)},Dt=e=>{var t=Sn(),n=rt(t),i=e=>{var t=Sn();Qn(rt(t),1,be,Yn,(e,t)=>{var n=ps(),i=it(n),r={};kt((e,t)=>{Pn(i,e),r!==(r=t)&&(n.value=(n.__value=t)??"")},[()=>(an(t),un(()=>He(an(t)))),()=>(fn(y()),an(t),un(()=>y()(an(t),!0)))]),In(e,n)}),In(e,t)};Gn(n,e=>{T()&&an(o)&&e(i)},!0),In(e,t)};Gn(Ut,e=>{!T()&&an(o)?e(Rt):e(Dt,!1)});var jt=ot(Pt,2),Wt=it(jt),Bt=e=>{var n=Sn();Qn(rt(n),11,be,e=>y()(e,!0),(e,n,i)=>{var r=ms();let o;Oi(r,"draggable",!0);var s=it(r);{let e=Te(()=>(an(n),un(()=>He(an(n)))));ii(s,t,"tag",{get label(){return an(e)},get item(){return an(n)},unselectItem:ut},e=>{var t=vs(),i=it(t),r=it(i),o=ot(i,2),s=Le(()=>ut(an(n)));kt(e=>Pn(r,e),[()=>(an(n),un(()=>He(an(n))))]),mn("click",o,Bi(function(...e){an(s)?.apply(this,e)})),mn("keypress",o,Bi(e=>{"Enter"==e.key&&ut(an(n))})),In(e,t)})}kt(()=>o=di(r,1,"svelte-wl7m3y",null,o,{"is-active":an(Et)===an(i)})),function(e,t,n){var i,r,o,s=Kn,a=null;s.a??={element:e,measure(){i=this.element.getBoundingClientRect()},apply(){if(o?.abort(),r=this.element.getBoundingClientRect(),i.left!==r.left||i.right!==r.right||i.top!==r.top||i.bottom!==r.bottom){const e=t()(this.element,{from:i,to:r},n?.());o=Mi(this.element,e,void 0,1,()=>{o?.abort(),o=void 0})}},fix(){if(!e.getAnimations().length){var{position:t,width:n,height:r}=getComputedStyle(e);if("absolute"!==t&&"fixed"!==t){var o=e.style;a={position:o.position,width:o.width,height:o.height,transform:o.transform},o.position="absolute",o.width=n,o.height=r;var s=e.getBoundingClientRect();if(i.left!==s.left||i.top!==s.top){var l=`translate(${i.left-s.left}px, ${i.top-s.top}px)`;o.transform=o.transform?`${o.transform} ${l}`:l}}}},unfix(){if(a){var t=e.style;t.position=a.position,t.width=a.width,t.height=a.height,t.transform=a.transform}}},s.a.element=e}(r,()=>ds,()=>({duration:200})),Ni(3,r,()=>hs,()=>({duration:200})),mn("dragstart",r,e=>function(e,t){q()&&e.dataTransfer.setData("source",t)}(e,an(i))),mn("dragover",r,e=>Lt(e,an(i))),mn("dragleave",r,e=>(an(i),void(q()&&Be(Et,!1)))),mn("drop",r,e=>Tt(e,an(i))),In(e,r)}),In(e,n)};Gn(Wt,e=>{T()&&an(o)&&e(Bt)});var Vt=ot(Wt,2);$i(Vt,()=>({type:"text",class:`${(oe()?oe():"")??""} ${ve()?"":"input autocomplete-input"}`,id:se()?se():"",autocomplete:de()?"on":fe(),placeholder:ie(),name:ae(),disabled:pe(),required:me(),title:ce(),readonly:he()||an(l),tabindex:ke(),...i}),void 0,void 0,void 0,"svelte-wl7m3y",!0),Wi(Vt,e=>Be(Se,e),()=>an(Se));var zt=ot(Vt,2),qt=e=>{var t=ys();ni(it(t),J),mn("click",t,St),mn("keypress",t,e=>{"Enter"==e.key&&St()}),In(e,t)};Gn(zt,e=>{an(s)&&e(qt)}),Wi(jt,e=>Be(Ae,e),()=>an(Ae));var Ht=ot(jt,2),Gt=it(Ht),Kt=e=>{var n=_s(),i=rt(n);ii(i,t,"dropdown-header",{get nbItems(){return an(Pe),un(()=>an(Pe).length)},get maxItemsToShowInList(){return L()}},null);var r=ot(i,2);Qn(r,1,()=>an(Pe),Yn,(e,n,i)=>{var r=Sn(),o=rt(r),s=e=>{var r=ks();let o;ii(it(r),t,"item",{get item(){return an(n),un(()=>an(n).item)},get label(){return an(n),un(()=>an(n).highlighted?an(n).highlighted:an(n).label)}},e=>{var t=Sn(),i=rt(t),r=e=>{var t=Sn();ni(rt(t),()=>(an(n),un(()=>an(n).highlighted))),In(e,t)},o=e=>{var t=Sn();ni(rt(t),()=>(an(n),un(()=>an(n).label))),In(e,t)};Gn(i,e=>{an(n),un(()=>an(n).highlighted)?e(r):e(o,!1)}),In(e,t)}),kt(e=>o=di(r,1,"autocomplete-list-item svelte-wl7m3y",null,o,e),[()=>({selected:i===an(Fe),confirmed:Ct(an(n).item)})]),mn("click",r,()=>lt(an(n))),mn("keypress",r,e=>{"Enter"==e.key&&lt(an(n))}),mn("pointerenter",r,()=>{Be(Fe,i)}),In(e,r)};Gn(o,e=>{an(n)&&(L()<=0||i<L())&&e(s)}),In(e,r)}),ii(ot(r,2),t,"dropdown-footer",{get nbItems(){return an(Pe),un(()=>an(Pe).length)},get maxItemsToShowInList(){return L()}},e=>{var t=Sn(),n=rt(t),i=e=>{var t=Sn(),n=rt(t),i=e=>{var t=bs(),n=it(t);kt(()=>Pn(n,`...${an(Pe),fn(L()),un(()=>an(Pe).length-L())??""}\n ${te()??""}`)),In(e,t)};Gn(n,e=>{te()&&e(i)}),In(e,t)};Gn(n,e=>{fn(L()),an(Pe),un(()=>L()>0&&an(Pe).length>L())&&e(i)}),In(e,t)}),In(e,n)},Jt=e=>{var n=Sn(),i=rt(n),r=e=>{var n=ws();ii(it(n),t,"loading",{get loadingText(){return X()}},e=>{var t=$n();kt(()=>Pn(t,X())),In(e,t)}),In(e,n)},o=e=>{var n=Sn(),i=rt(n),r=e=>{var n=Os();ii(it(n),t,"create",{get createText(){return ne()}},e=>{var t=$n();kt(()=>Pn(t,ne())),In(e,t)}),mn("click",n,tt),mn("keypress",n,e=>{"Enter"==e.key&&tt()}),In(e,n)},o=e=>{var n=Sn(),i=rt(n),r=e=>{var n=$s();ii(it(n),t,"no-results",{get noResultsText(){return Q()}},e=>{var t=$n();kt(()=>Pn(t,Q())),In(e,t)}),In(e,n)};Gn(i,e=>{Q()&&e(r)},!0),In(e,n)};Gn(i,e=>{x()?e(r):e(o,!1)},!0),In(e,n)};Gn(i,e=>{an(xe)&&X()?e(r):e(o,!1)},!0),In(e,n)};return Gn(Gt,e=>{an(Pe),un(()=>an(Pe)&&an(Pe).length>0)?e(Kt):e(Jt,!1)}),Wi(Ht,e=>Be(Ie,e),()=>an(Ie)),kt(()=>{Mt=di(Nt,1,`${(re()?re():"")??""} autocomplete select is-fullwidth ${Oe}`,"svelte-wl7m3y",Mt,{"hide-arrow":H()||!u().length,"is-multiple":T(),"show-clear":an(s),"is-loading":Y()&&an(xe)}),Oi(Pt,"name",le()),Oi(Pt,"id",ue()),Pt.multiple=T(),di(Ht,1,`${(ge()?ge():"")??""} autocomplete-list ${an(r)?"":"hidden"}\n is-fullwidth`,"svelte-wl7m3y")}),Pi(Vt,Ne),mn("input",Vt,function(e){ye()&&console.log("onInput"),Ne(e.target.value),$e&&clearTimeout($e),D()?$e=setTimeout(ct,D()):ct()}),mn("focus",Vt,function(){ye()&&console.log("onFocus"),S()(),vt()}),mn("blur",Vt,function(){ye()&&console.log("onBlur"),z()&&wt(),I()()}),mn("keydown",Vt,function(e){ye()&&console.log("onKeyDown");let t=e.key;"Tab"===t&&e.shiftKey&&(t="ShiftTab");const n={Tab:an(Ce)?wt:null,ShiftTab:an(Ce)?wt:null,ArrowDown:st.bind(this),ArrowUp:nt.bind(this),Escape:dt.bind(this),Backspace:T()&&an(o)&&!Ne()?gt.bind(this):null}[t];"function"==typeof n&&n(e)}),mn("click",Vt,function(){ye()&&console.log("onInputClick"),vt()}),mn("keypress",Vt,function(e){ye()&&console.log("onKeyPress"),"Enter"===e.key&&function(e){an(Ce)&&(e.preventDefault(),tt())}(e)}),mn("dragover",Vt,e=>Lt(e,be().length-1)),mn("drop",Vt,e=>Tt(e,be().length-1)),In(e,Nt),function(e,t,n){var i=a(e,t);i&&i.set&&(e[t]=n,ft(()=>{e[t]=null}))}(t,"highlightFilter",It),ee(Ft)}var As=On("<p> </p>"),Cs=On('<div class="control"><!></div> <!>',1);var Es=On('<input type="checkbox"/> ',1),Ls=On('<div><label class="checkbox"><!></label></div> <!>',1);yn(["change","input"]);var Ts=On('<label class="checkbox pr-2"><input type="checkbox"/> </label>'),xs=On('<div class="control"></div> <!>',1);yn(["change","input"]);var Fs=On('<span class="icon is-small is-left"><i></i></span>'),Ns=On('<i class="fas fa-check"></i>'),Ms=On('<i class="fas fa-exclamation-triangle"></i>'),Ps=On('<span class="icon is-small is-right"><!></span>'),Us=On('<div><input type="color"/> <!> <!></div> <!>',1);yn(["change","input"]);var Rs=On("<div><!></div>");var Ds=On("<p><time> </time></p>"),js=On('<span class="icon is-small is-left"><i></i></span>'),Ws=On('<i class="fas fa-check"></i>'),Bs=On('<i class="fas fa-exclamation-triangle"></i>'),Vs=On('<span class="icon is-small is-right"><!></span>'),zs=On('<input type="date"/> <!> <!>',1),qs=On("<div><!></div> <!>",1);yn(["change","input"]);var Hs=On("<p> </p>"),Gs=On('<span class="icon is-small is-left"><i></i></span>'),Ks=On('<i class="fas fa-check"></i>'),Js=On('<i class="fas fa-exclamation-triangle"></i>'),Ys=On('<span class="icon is-small is-right"><!></span>'),Qs=On('<input type="datetime-local"/> <!> <!>',1),Xs=On("<div><!></div> <!>",1);yn(["change","input"]);var Zs=On("<p> </p>"),ea=On('<span class="icon is-small is-left"><i></i></span>'),ta=On('<i class="fas fa-check"></i>'),na=On('<i class="fas fa-exclamation-triangle"></i>'),ia=On('<span class="icon is-small is-right"><!></span>'),ra=On('<input type="email"/> <!> <!>',1),oa=On("<div><!></div> <!>",1);yn(["change","input"]);var sa=On('<input type="hidden"/>');var aa=On("<p> </p>"),la=On('<span class="icon is-small is-left"><i></i></span>'),ua=On('<i class="fas fa-check"></i>'),ca=On('<i class="fas fa-exclamation-triangle"></i>'),da=On('<span class="icon is-small is-right"><!></span>'),fa=On("<textarea></textarea> <!> <!>",1),ha=On("<div><!></div> <!>",1);function ga(e,t){Z(t,!0);const[n,i]=Qi();let r,o,s=rr(t,"inputStarted",15,!1),a=rr(t,"value",15,""),l=rr(t,"placeholder",3,""),u=rr(t,"fieldname",3,"textarea"),c=rr(t,"icon",3,!1),d=rr(t,"rows",3,10),f=rr(t,"required",3,!0),h=rr(t,"readonly",3,!1),g=rr(t,"disabled",3,!1),p=rr(t,"valid",3,!0),v=rr(t,"validated",3,!1),m=rr(t,"errors",3,!1),y=rr(t,"formErrors",3,!1),k=rr(t,"formLevelError",3,!1),b=rr(t,"onchange",3,()=>{}),_=Le(()=>(c()?" has-icons-left ":"")+" has-icons-right ");or(()=>{r=[].concat(m()?m():[],y()?y():[])}),or(()=>{o=!(v()&&p())&&s()});let w,O=Le(()=>!1===p()||k());function $(e){let t={field:u(),value:"checkbox"===e.target.type?e.target.checked:e.target.value};return s(!0),b()(t),!0}or(()=>{w=!0!==p()&&s()?ko.CLASS_ERR:ko.CLASS_OK});var S=ha(),I=rt(S),A=it(I),C=e=>{var t=aa(),n=it(t);kt(()=>Pn(n,a())),In(e,t)},E=e=>{var t=fa(),i=rt(t),r=ot(i,2),o=e=>{var t=la(),n=it(t);kt(()=>di(n,1,`fas fa-${c()??""}`)),In(e,t)};Gn(r,e=>{c()&&e(o)});var s=ot(r,2),m=e=>{var t=da(),n=it(t),i=e=>{In(e,ua())},r=e=>{var t=Sn(),n=rt(t),i=e=>{In(e,ca())};Gn(n,e=>{!1===p()&&e(i)},!0),In(e,t)};Gn(n,e=>{!0===p()?e(i):e(r,!1)}),In(e,t)};Gn(s,e=>{!0===v()&&e(m)}),kt(()=>{Oi(i,"id",`form-field-textarea-${u()??""}`),Oi(i,"invalid",an(O)),i.disabled=g(),i.required=f(),i.readOnly=h(),di(i,1,`textarea ${w??""}`),Oi(i,"name",u()),Oi(i,"placeholder",Yi(pr,"$LOCALE",n)[l()]),Oi(i,"rows",d()),Oi(i,"aria-controls",`input-field-helper-${u()??""}`),Oi(i,"aria-describedby",`input-field-helper-${u()??""}`)}),mn("blur",i,$),Pi(i,a),In(e,t)};Gn(A,e=>{h()?e(C):e(E,!1)}),yo(ot(I,2),{get id(){return`input-field-helper-${u()??""}`},get errors(){return r},set errors(e){r=e},get show(){return o},set show(e){o=e},get classes(){return w},set classes(e){w=e}}),kt(()=>di(I,1,`control ${an(_)??""}`)),In(e,S),ee(),i()}var pa=On('<label class="label"> </label>');function va(e,t){Z(t,!0);const[n,i]=Qi();let r=rr(t,"label",3,"label");var o=pa(),s=it(o);kt(()=>{Oi(o,"for",t.id),Pn(s,Yi(pr,"$LOCALE",n)[r()])}),In(e,o),ee(),i()}var ma=new WeakMap;let ya=function(){return Sr(function e(t){kr(this,e),_r(this,ma,{}),t instanceof e&&this.import(t.getContent())},[{key:"add",value:function(e,t,n="replace"){this.contains(e)?"replace"===n?br(ma,this)[e]=t:"add"===n&&(br(ma,this)[e]=Object.assign(br(ma,this)[e],t)):br(ma,this)[e]=t}},{key:"get",value:function(e){return br(ma,this)[e]}},{key:"contains",value:function(e){return Object.hasOwn(br(ma,this),e)}},{key:"import",value:function(e,t="replace"){for(let n in e)this.add(n,e[n],t)}},{key:"isEmpty",value:function(){return 0===Object.keys(br(ma,this)).length}},{key:"getContent",value:function(){return{...br(ma,this)}}}])}();const ka=new ya,ba=new ya,_a=new ya;function wa(e){Qo(e,{title:"not-node:empty_list_placeholder",size:4,align:"center"})}var Oa=On('<span class="icon"><i></i></span>'),$a=On("<span> </span>"),Sa=On('<span class="icon"><i></i></span>'),Ia=On("<!> <!> <!> <!>",1),Aa=On(" <!>",1),Ca=On("<a><!></a>");function Ea(e,t){Z(t,!0);const n=()=>Yi(pr,"$LOCALE",i),[i,r]=Qi();let o=rr(t,"title",3,""),s=rr(t,"href",3,""),a=rr(t,"target",3,"_blank"),l=rr(t,"light",3,!1),u=rr(t,"loading",3,!1),c=rr(t,"raised",3,!1),d=rr(t,"outlined",3,!1),f=rr(t,"inverted",3,!1),h=rr(t,"rounded",3,!1),p=rr(t,"button",3,!0),v=rr(t,"state",3,""),m=rr(t,"type",3,""),y=rr(t,"color",3,""),k=rr(t,"size",3,""),b=rr(t,"class",3,""),_=rr(t,"icon",3,!1),w=rr(t,"iconSide",3,"right"),O=rr(t,"action",3,()=>!0);const $=X("root")&&Y("root")||"";var S=Ca();S.__click=function(...e){O()?.apply(this,e)};var I=it(S),A=e=>{var i=Ia(),r=rt(i),s=e=>{var t=Oa(),n=it(t);kt(()=>di(n,1,`fas fa-${_()??""} ${k()?`is-${k()}`:""}`)),In(e,t)};Gn(r,e=>{"left"===w()&&e(s)});var a=ot(r,2),l=e=>{var t=$a(),i=it(t);kt(()=>Pn(i,n()[o()])),In(e,t)};Gn(a,e=>{o()&&e(l)});var u=ot(a,2);Bn(u,()=>t.children??g);var c=ot(u,2),d=e=>{var t=Sa(),n=it(t);kt(()=>di(n,1,`fas fa-${_()??""} ${k()?`is-${k()}`:""}`)),In(e,t)};Gn(c,e=>{"right"===w()&&e(d)}),In(e,i)},C=e=>{var i=Aa(),r=rt(i);Bn(ot(r),()=>t.children??g),kt(()=>Pn(r,`${n()[o()]??""} `)),In(e,i)};Gn(I,e=>{_()?e(A):e(C,!1)}),kt(()=>{Oi(S,"target",a()),Oi(S,"href",$+s()),Oi(S,"download",t.download),Oi(S,"rel",t.rel),di(S,1,ai([b(),p()&&"button",f()&&"is-inverted",d()&&"is-outlined",c()&&"is-raised",h()&&"is-rounded",u()&&"is-loading",l()&&"is-light",y()&&`is-${y()}`,v()&&`is-${v()}`,m()&&`is-${m()}`,k()&&`is-${k()}`]))}),In(e,S),ee(),r()}yn(["click"]);var La=On('<div><p class="control"></p></div>'),Ta=On("<div></div>");function xa(e,t){Z(t,!0);let n=rr(t,"values",23,()=>[]),i=rr(t,"classes",3,""),r=rr(t,"centered",3,!1),o=rr(t,"right",3,!1),s=rr(t,"joined",3,!0);n().every(e=>Object.hasOwn(e,"id"))||n(ko.addIds(n()));var a=Sn(),l=rt(a),u=e=>{var t=La();Qn(it(t),21,n,e=>e.id,(e,t)=>{Ea(e,ir(()=>an(t)))}),kt(()=>di(t,1,`field has-addons ${r()?"is-centered":""} ${o()?"is-right":""} ${i()??""}`)),In(e,t)},c=e=>{var t=Ta();Qn(t,21,n,e=>e.id,(e,t)=>{Ea(e,ir(()=>an(t)))}),kt(()=>di(t,1,`buttons ${r()?"is-centered":""} ${o()?"is-right":""} ${i()??""}`)),In(e,t)};Gn(l,e=>{s()?e(u):e(c,!1)}),In(e,a),ee()}var Fa=On('<figure class="image is-64x64"><img class="is-rounded"/></figure>'),Na=On('<div role="button" tabindex="0" class="list-item-image"><!></div>'),Ma=On('<div class="list-item-title" role="button" tabindex="0"><!></div>'),Pa=On('<div role="button" tabindex="0" class="list-item-description"><!></div>'),Ua=On('<div class="list-item-controls"><!> <!></div>'),Ra=On('<div role="button" tabindex="0"><!> <div role="button" tabindex="0" class="list-item-content"><!> <!></div> <!></div>');function Da(e,t){Z(t,!0);const n=zn();let i=rr(t,"actions",19,()=>[]),r=rr(t,"links",19,()=>[]),o=rr(t,"listActions",19,()=>[]),s=rr(t,"listLinks",19,()=>[]),a=rr(t,"classes",3,""),l=rr(t,"commonClasses",3,""),u=rr(t,"image",3,""),c=rr(t,"index",19,()=>-1),d=rr(t,"first",3,!1),f=rr(t,"last",3,!1),h=rr(t,"titleComponent",3,Qo),g=rr(t,"titleComponentProps",19,()=>({size:6})),p=rr(t,"descriptionComponentProps",19,()=>({})),v=rr(t,"imageComponentProps",19,()=>({}));function m(){n("click",t.value)}let y=De(Ge([]));or(()=>{Be(y,[...i(),...o()].map(e=>({...e,action:()=>e.action(t.value)})),!0)});let k=De(Ge([]));or(()=>{Be(k,[...r(),...s()],!0)});var b=Ra();b.__click=m,b.__keyup=e=>{e&&"Enter"==e.key&&m()};var _=it(b),w=e=>{var i=Na(),r=Le(()=>Bi(e=>{e&&"Enter"==e.key&&(m(),n("clickImage",t.value))}));i.__keyup=function(...e){an(r)?.apply(this,e)};var o=Le(()=>Bi(()=>{m(),n("clickImage",t.value)}));i.__click=function(...e){an(o)?.apply(this,e)};var s=it(i),a=e=>{var n=Sn(),i=rt(n),r=e=>{const n=Le(()=>t.imageComponent);var i=Sn();ri(rt(i),()=>an(n),(e,t)=>{t(e,ir({get value(){return u()}},v))}),In(e,i)},o=e=>{const n=Le(()=>t.imageComponent);var i=Sn();ri(rt(i),()=>an(n),(e,t)=>{t(e,ir(u,v))}),In(e,i)};Gn(i,e=>{"string"==typeof u()?e(r):e(o,!1)}),In(e,n)},l=e=>{var n=Fa(),i=it(n);kt(()=>{Oi(i,"src",u()),Oi(i,"alt",t.title)}),In(e,n)};Gn(s,e=>{t.imageComponent?e(a):e(l,!1)}),In(e,i)};Gn(_,e=>{u()&&e(w)});var O=ot(_,2),$=Le(()=>Bi(()=>{m(),n("clickContent",t.value)}));O.__click=function(...e){an($)?.apply(this,e)};var S=Le(()=>Bi(e=>{e&&"Enter"==e.key&&(m(),n("clickContent",t.value))}));O.__keyup=function(...e){an(S)?.apply(this,e)};var I=it(O),A=e=>{var i=Ma(),r=Le(()=>Bi(e=>{e&&"Enter"==e.key&&(m(),n("clickTitle",t.value))}));i.__keyup=function(...e){an(r)?.apply(this,e)};var o=Le(()=>Bi(()=>{m(),n("clickTitle",t.value)}));i.__click=function(...e){an(o)?.apply(this,e)};var s=it(i),a=e=>{var n=Sn(),i=rt(n),r=e=>{const n=Le(h);var i=Sn();ri(rt(i),()=>an(n),(e,n)=>{n(e,ir({get title(){return t.title}},g,{$$events:{change(e){zi.call(this,t,e)}}}))}),In(e,i)},o=e=>{const n=Le(h);var i=Sn();ri(rt(i),()=>an(n),(e,n)=>{n(e,ir(()=>t.title,g,{$$events:{change(e){zi.call(this,t,e)}}}))}),In(e,i)};Gn(i,e=>{"string"==typeof t.title?e(r):e(o,!1)}),In(e,n)},l=e=>{var n=$n();kt(()=>Pn(n,t.title)),In(e,n)};Gn(s,e=>{h()?e(a):e(l,!1)}),In(e,i)};Gn(I,e=>{t.title&&e(A)});var C=ot(I,2),E=e=>{var i=Pa(),r=Le(()=>Bi(e=>{e&&"Enter"==e.key&&(m(),n("clickDescription",t.value))}));i.__keyup=function(...e){an(r)?.apply(this,e)};var o=Le(()=>Bi(()=>{m(),n("clickDescription",t.value)}));i.__click=function(...e){an(o)?.apply(this,e)};var s=it(i),a=e=>{var n=Sn(),i=rt(n),r=e=>{const n=Le(()=>t.descriptionComponent);var i=Sn();ri(rt(i),()=>an(n),(e,n)=>{n(e,ir({get value(){return t.description}},p,{$$events:{change(e){zi.call(this,t,e)},click(e){zi.call(this,t,e)}}}))}),In(e,i)},o=e=>{const n=Le(()=>t.descriptionComponent);var i=Sn();ri(rt(i),()=>an(n),(e,n)=>{n(e,ir(()=>t.description,p,{$$events:{change(e){zi.call(this,t,e)},click(e){zi.call(this,t,e)}}}))}),In(e,i)};Gn(i,e=>{"string"==typeof t.description?e(r):e(o,!1)}),In(e,n)},l=e=>{var n=$n();kt(()=>Pn(n,t.description)),In(e,n)};Gn(s,e=>{t.descriptionComponent?e(a):e(l,!1)}),In(e,i)};Gn(C,e=>{t.description&&e(E)});var L=ot(O,2),T=e=>{var t=Ua(),n=it(t),i=e=>{Po(e,{get values(){return an(y)},right:!0})};Gn(n,e=>{an(y)&&an(y).length&&e(i)});var r=ot(n,2),o=e=>{xa(e,{get values(){return an(k)},right:!0})};Gn(r,e=>{an(k)&&an(k).length&&e(o)}),In(e,t)};Gn(L,e=>{(an(y)&&an(y).length||an(k)&&an(k).length)&&e(T)}),kt(()=>di(b,1,`list-item ${a()??""} ${l()??""} ${f()?"list-item-last":""} ${d()?"list-item-first":""} list-item-at-${c()} ${"list-item-"+(c()%2?"odd":"even")}`)),In(e,b),ee()}yn(["click","keyup"]);var ja=On("<div><!></div>");function Wa(e,t){Z(t,!0);let n=rr(t,"classes",3,""),i=rr(t,"items",31,()=>Ge([])),r=rr(t,"actions",19,()=>[]),o=rr(t,"links",19,()=>[]),s=rr(t,"actionsVisible",3,!1),a=rr(t,"itemsHoverable",3,!1),l=rr(t,"overflowEllipsis",3,!1),u=rr(t,"hiddenImages",3,!1),c=rr(t,"itemClasses",3,""),d=rr(t,"idFieldName",3,"id"),f=rr(t,"emptyListPlaceholderComponent",3,wa),h=rr(t,"emptyListPlaceholderComponentProps",19,()=>({})),g=rr(t,"listItemComponent",3,Da),p=rr(t,"listItemComponentProps",19,()=>({})),v=rr(t,"titleComponent",3,Qo),m=rr(t,"titleComponentProps",19,()=>({size:6})),y=rr(t,"descriptionComponentProps",19,()=>({})),k=rr(t,"imageComponentProps",19,()=>({}));var b=Sn(),_=rt(b),w=e=>{var f=ja();!function(e,t){Z(t,!0);let n=rr(t,"idFieldName",3,"id"),i=rr(t,"items",23,()=>[]),r=rr(t,"actions",19,()=>[]),o=rr(t,"links",19,()=>[]),s=rr(t,"itemClasses",3,""),a=rr(t,"listItemComponent",3,Da),l=rr(t,"listItemComponentProps",19,()=>({})),u=rr(t,"titleComponent",3,Qo),c=rr(t,"titleComponentProps",19,()=>({size:6})),d=rr(t,"descriptionComponentProps",19,()=>({})),f=rr(t,"imageComponentProps",19,()=>({}));var h=Sn(),g=rt(h),p=e=>{const h=Le(a);var g=Sn();Qn(rt(g),19,i,e=>e[n()],(e,n,a)=>{var g=Sn(),p=rt(g);{let e=Le(()=>0===an(a)),g=Le(()=>an(a)===i().length-1);ri(p,()=>an(h),(h,p)=>{p(h,ir(l,{get titleComponent(){return u()},get titleComponentProps(){return c()},get descriptionComponent(){return t.descriptionComponent},get descriptionComponentProps(){return d()},get imageComponent(){return t.imageComponent},get imageComponentProps(){return f()}},()=>an(n),{get listActions(){return r()},get listLinks(){return o()},get commonClasses(){return s()},get index(){return an(a)},get first(){return an(e)},get last(){return an(g)},get value(){return i()[an(a)]},set value(e){i()[an(a)]=e},$$events:{click(e){zi.call(this,t,e)},clickContent(e){zi.call(this,t,e)},clickDescription(e){zi.call(this,t,e)},clickImage(e){zi.call(this,t,e)},clickTitle(e){zi.call(this,t,e)}}}))})}In(e,g)}),In(e,g)};Gn(g,e=>{i()&&e(p)}),In(e,h),ee()}(it(f),{get itemClasses(){return c()},get listItemComponent(){return g()},get listItemComponentProps(){return p()},get idFieldName(){return d()},get titleComponent(){return v()},get titleComponentProps(){return m()},get descriptionComponent(){return t.descriptionComponent},get descriptionComponentProps(){return y()},get imageComponent(){return t.imageComponent},get imageComponentProps(){return k()},get actions(){return r()},get links(){return o()},get items(){return i()},set items(e){i(e)},$$events:{change(e){zi.call(this,t,e)},click(e){zi.call(this,t,e)},clickContent(e){zi.call(this,t,e)},clickDescription(e){zi.call(this,t,e)},clickImage(e){zi.call(this,t,e)},clickTitle(e){zi.call(this,t,e)}}}),kt(()=>{hi(f,t.itemLength?`--length: ${t.itemLength};`:""),di(f,1,`list ${n()??""} ${s()?"has-visible-pointer-controls":""} ${a()?"has-hoverable-list-items":""} ${l()?"has-overflow-ellipsis":""} ${u()?"has-hidden-images":""}`)}),In(e,f)},O=e=>{const t=Le(f);var n=Sn();ri(rt(n),()=>an(t),(e,t)=>{t(e,ir(h))}),In(e,n)};Gn(_,e=>{i().length?e(w):e(O,!1)}),In(e,b),ee()}var Ba=On("<!> <!>",1);var Va=On('<div role="button" tabindex="0"><!></div>');function za(e,t){Z(t,!0);const n=sr();let i=rr(t,"classes",3,""),r=rr(t,"title",3,""),o=rr(t,"narrow",3,!1);var s=Va(),a=Le(()=>n("click"));s.__click=function(...e){an(a)?.apply(this,e)};var l=Le(()=>n("keyup"));s.__keyup=function(...e){an(l)?.apply(this,e)},Bn(it(s),()=>t.children??g),kt(()=>{Oi(s,"title",r()),di(s,1,`column ${i()??""} ${o()?"is-narrow":""}`)}),In(e,s),ee()}yn(["click","keyup"]);var qa=On('<div role="button" tabindex="0"><!></div>');function Ha(e,t){Z(t,!0);const n=sr();let i=rr(t,"classes",3,"");var r=qa(),o=Le(()=>n("click"));r.__click=function(...e){an(o)?.apply(this,e)};var s=Le(()=>n("keyup"));r.__keyup=function(...e){an(s)?.apply(this,e)},Bn(it(r),()=>t.children??g),kt(()=>di(r,1,`columns ${i()??""}`)),In(e,r),ee()}yn(["click","keyup"]);var Ga=On('<div role="button" tabindex="0"><!></div>');function Ka(e,t){Z(t,!0);const n=sr();let i=rr(t,"id",3,""),r=rr(t,"classes",3,""),o=rr(t,"widescreen",3,!1),s=rr(t,"fullhd",3,!1),a=rr(t,"maxDesktop",3,!1),l=rr(t,"maxWidescreen",3,!1),u=rr(t,"fluid",3,!1);var c=Ga();let d;var f=Le(()=>n("click"));c.__click=function(...e){an(f)?.apply(this,e)};var h=Le(()=>n("keyup"));c.__keyup=function(...e){an(h)?.apply(this,e)},Bn(it(c),()=>t.children??g),kt(()=>{Oi(c,"id",i()),d=di(c,1,`container ${r()??""}`,null,d,{"is-widescreen":o(),"is-fullhd":s(),"is-max-desktop":a(),"is-max-widescreen":l(),"is-fluid":u()})}),In(e,c),ee()}yn(["click","keyup"]);var Ja=On("<footer><!></footer>");var Ya=On('<section role="button"><!></section>');yn(["click","keyup"]);var Qa=On('<nav class="level"><div class="level-left"><!></div> <div class="level-right"><!></div></nav>');var Xa=Object.freeze({__proto__:null,UIColumn:za,UIColumns:Ha,UIContainer:Ka,UIFooter:function(e,t){let n=rr(t,"id",3,""),i=rr(t,"classes",3,"");var r=Ja();Bn(it(r),()=>t.children??g),kt(()=>{Oi(r,"id",n()),di(r,1,`footer ${i()??""} `)}),In(e,r)},UILevel:function(e,t){var n=Qa(),i=it(n);Bn(it(i),()=>t.left??g),Bn(it(ot(i,2)),()=>t.right??g),In(e,n)},UILevelItem:function(e,t){let n=rr(t,"tag",3,"div");var i=Sn();!function(e,t,n,i){var r=null,o=Kn,s=new Wn(e,!1);bt(()=>{const e=t()||null;var n="svg"===e?"http://www.w3.org/2000/svg":null;return null===e?(s.ensure(null,null),void Mn(!0)):(s.ensure(e,t=>{var s=Kn;if(Jn(o),e){if(wn(r=n?document.createElementNS(n,e):document.createElement(e),r),i){var a=r.appendChild(et());i(r,a)}jt.nodes_end=r,t.before(r)}Jn(s)}),Mn(!0),()=>{e&&Mn(!1)})},C),ft(()=>{Mn(!0)})}(rt(i),n,0,(e,n)=>{var i=Sn(),r=rt(i),o=e=>{var n=Sn();Bn(rt(n),()=>t.children),In(e,n)},s=e=>{};Gn(r,e=>{t.children?e(o):e(s,!1)}),In(n,i)}),In(e,i)},UISection:function(e,t){Z(t,!0);const n=sr();let i=rr(t,"id",3,""),r=rr(t,"classes",3,""),o=rr(t,"tabindex",3,0);var s=Ya(),a=Le(()=>n("click"));s.__click=function(...e){an(a)?.apply(this,e)};var l=Le(()=>n("keyup"));s.__keyup=function(...e){an(l)?.apply(this,e)},Bn(it(s),()=>t.children??g),kt(()=>{Oi(s,"id",i()),di(s,1,`section ${t.size?"is-"+t.size:""} ${r()??""}`),Oi(s,"tabindex",o())}),In(e,s),ee()}}),Za=On("<p> </p>"),el=On('<span class="icon is-small is-left"><i></i></span>'),tl=On('<i class="fas fa-check"></i>'),nl=On('<i class="fas fa-exclamation-triangle"></i>'),il=On('<span class="icon is-small is-right"><!></span>'),rl=On('<input type="number"/> <!> <!>',1),ol=On("<div><!></div> <!>",1);function sl(e,t){Z(t,!0);const[n,i]=Qi();let r,o,s=rr(t,"inputStarted",15,!1),a=rr(t,"value",15,0),l=rr(t,"placeholder",3,"0.0"),u=rr(t,"min",3,0),c=rr(t,"max",3,100),d=rr(t,"step",3,1),f=rr(t,"fieldname",3,"number"),h=rr(t,"icon",3,!1),g=rr(t,"required",3,!0),p=rr(t,"disabled",3,!1),v=rr(t,"readonly",3,!1),m=rr(t,"valid",3,!0),y=rr(t,"validated",3,!1),k=rr(t,"errors",3,!1),b=rr(t,"formErrors",3,!1),_=rr(t,"formLevelError",3,!1),w=rr(t,"onchange",3,()=>{}),O=Le(()=>(h()?" has-icons-left ":"")+" has-icons-right ");or(()=>{r=[].concat(k()?k():[],b()?b():[])}),or(()=>{o=!(y()&&m())&&s()});let $,S=Le(()=>!1===m()||_());function I(){let e={field:f(),value:a()};return s(!0),w()(e),!0}function A(e){let t={field:f(),value:e.currentTarget.value};return s(!0),w()(t),!0}or(()=>{$=!0!==m()&&s()?ko.CLASS_ERR:ko.CLASS_OK});var C=ol(),E=rt(C),L=it(E),T=e=>{var t=Za(),n=it(t);kt(()=>Pn(n,a())),In(e,t)},x=e=>{var t=rl(),i=rt(t);i.__change=I,i.__input=A;var r=ot(i,2),o=e=>{var t=el(),n=it(t);kt(()=>di(n,1,`fas fa-${h()??""}`)),In(e,t)};Gn(r,e=>{h()&&e(o)});var s=ot(r,2),k=e=>{var t=il(),n=it(t),i=e=>{In(e,tl())},r=e=>{var t=Sn(),n=rt(t),i=e=>{In(e,nl())};Gn(n,e=>{!1===m()&&e(i)},!0),In(e,t)};Gn(n,e=>{!0===m()?e(i):e(r,!1)}),In(e,t)};Gn(s,e=>{!0===y()&&e(k)}),kt(()=>{Oi(i,"id",`form-field-textfield-${f()??""}`),di(i,1,`input ${$??""}`),Oi(i,"min",u()),Oi(i,"max",c()),Oi(i,"step",d()),Oi(i,"name",f()),Oi(i,"invalid",an(S)),i.disabled=p(),i.required=g(),i.readOnly=v(),Oi(i,"placeholder",Yi(pr,"$LOCALE",n)[l()]),Oi(i,"autocomplete",f()),Oi(i,"aria-controls",`input-field-helper-${f()??""}`),Oi(i,"aria-describedby",`input-field-helper-${f()??""}`)}),Pi(i,a),In(e,t)};Gn(L,e=>{v()?e(T):e(x,!1)}),yo(ot(E,2),{get id(){return`input-field-helper-${f()??""}`},get errors(){return r},set errors(e){r=e},get show(){return o},set show(e){o=e},get classes(){return $},set classes(e){$=e}}),kt(()=>di(E,1,`control ${an(O)??""}`)),In(e,C),ee(),i()}yn(["change","input"]);var al=On("<!> <!> <!>",1),ll=On("<!> <!> <!>",1),ul=On("<!> <!> <!> <!>",1);var cl=On('<span class="icon is-small is-left"><i></i></span>'),dl=On('<i class="fas fa-check"></i>'),fl=On('<i class="fas fa-exclamation-triangle"></i>'),hl=On('<span class="icon is-small is-right"><!></span>'),gl=On('<div><input type="password"/> <!> <!></div> <!>',1);yn(["change","input"]);var pl=On("<a><figure><img/></figure></a>"),vl=On('<figure role="button" tabindex="0"><img/></figure>');function ml(e,t){let n=rr(t,"size",3,64),i=rr(t,"contained",3,!0),r=rr(t,"covered",3,!0),o=rr(t,"classes",3,""),s=rr(t,"onclick",3,()=>{}),a=rr(t,"onkeyup",3,()=>{}),l=Le(()=>isNaN(n())?`is-${n()}`:`is-${n()}x${n()}`),u=Le(()=>i()?"is-contained":""),c=Le(()=>r()?"is-covered":""),d=Le(()=>t.cors);var f=Sn(),h=rt(f),g=e=>{var n=pl();n.__click=function(...e){s()?.apply(this,e)};var i=it(n),r=it(i);kt(()=>{Oi(n,"href",t.srcFull),Oi(n,"alt",t.title),di(i,1,`image ${an(l)??""} ${an(u)??""} ${an(c)??""} ${o()??""}`),Oi(r,"alt",t.title),Oi(r,"src",t.src),Oi(r,"crossorigin",an(d))}),In(e,n)},p=e=>{var n=vl();n.__click=function(...e){s()?.apply(this,e)},n.__keyup=function(...e){a()?.apply(this,e)};var i=it(n);kt(()=>{di(n,1,`image ${an(l)??""} ${an(u)??""} ${an(c)??""} ${o()??""}`),Oi(i,"alt",t.title),Oi(i,"src",t.src),Oi(i,"crossorigin",an(d))}),In(e,n)};Gn(h,e=>{t.srcFull?e(g):e(p,!1)}),In(e,f)}yn(["click","keyup"]);var yl=On("<p> </p>"),kl=On("<option></option>"),bl=On("<datalist></datalist>"),_l=On('<span class="icon is-small is-left"><i></i></span>'),wl=On('<input type="range"/> <output> </output> <!> <!>',1),Ol=On("<div><!></div> <!>",1);yn(["change","input"]);var $l=On("<p> </p>"),Sl=On("<option></option>"),Il=On("<datalist></datalist>"),Al=On('<span class="icon is-small is-left"><i></i></span>'),Cl=On('<input type="range"/> <output editable="true"> </output> <!> <!>',1),El=On("<div><!></div> <!>",1);yn(["change","input"]);var Ll=On('<!> <input type="checkbox"/> <label class="label"><!></label>',1),Tl=On('<div class="control"><!></div> <!>',1);yn(["input"]);var xl=On('<div class="switch-list-item"><input type="checkbox"/> <label class="label"> </label></div>'),Fl=On('<div class="control"><!></div> <!>',1);yn(["input"]);var Nl=On('<button class="delete is-small"></button>'),Ml=On("<span> <!></span>"),Pl=On("<option> </option>"),Ul=On('<div class="column"><div class="control"><div class="select is-small"><select><option selected> </option><!></select></div> <button class="button is-primary is-small"> </button></div></div>'),Rl=On('<div class="control columns"><div></div> <!></div> <!>',1);yn(["click"]);var Dl=On("<p> </p>"),jl=On('<span class="icon is-small is-left"><i></i></span>'),Wl=On('<i class="fas fa-check"></i>'),Bl=On('<i class="fas fa-exclamation-triangle"></i>'),Vl=On('<span class="icon is-small is-right"><!></span>'),zl=On('<input type="tel"/> <!> <!>',1),ql=On("<div><!></div> <!>",1);yn(["change","input"]);var Hl=Object.freeze({__proto__:null,UIAutocomplete:function(e,t){Z(t,!0);const[n,i]=Qi();let r=rr(t,"idField",3,"_id"),o=rr(t,"labelField",3,"title"),s=rr(t,"minCharactersToSearch",3,3),a=rr(t,"selectFirstIfEmpty",3,!1),l=rr(t,"maxItemsToShowInList",3,20),u=rr(t,"noResultsText",3,"Ничего не найдено"),c=rr(t,"showClear",3,!0),d=rr(t,"value",15),f=rr(t,"placeholder",3,""),h=rr(t,"fieldname",3,"checkbox-list"),g=rr(t,"disabled",3,!1),p=rr(t,"readonly",3,!1),v=rr(t,"icon",3,!1),m=rr(t,"inputStarted",15,!1),y=rr(t,"valid",3,!0),k=rr(t,"validated",3,!1),b=rr(t,"errors",3,!1),_=rr(t,"formErrors",3,!1);rr(t,"formLevelError",3,!1);let w,O,$,S=rr(t,"searchFunction",3,()=>[]),I=rr(t,"onchange",3,()=>{});function A(){let e={field:h(),value:d()};return m(!0),I()(e),!0}or(()=>{w=[].concat(b()?b():[],_()?_():[])}),or(()=>{O=!(k()&&y())&&m()}),or(()=>{$=!0!==y()&&m()?ko.CLASS_ERR:ko.CLASS_OK});var C=Sn(),E=rt(C),L=e=>{{let t=Le(()=>d()?d().title:"");ss(e,{get value(){return an(t)},get fieldname(){return h()},get placeholder(){return f()},get icon(){return v()}})}},T=e=>{var t=Cs(),i=rt(t),v=it(i),m=e=>{var t=As(),i=it(t);kt(()=>Pn(i,Yi(pr,"$LOCALE",n)[d()])),In(e,t)},y=e=>{Is(e,{get showClear(){return c()},get disabled(){return g()},get placeholder(){return f()},get noResultsText(){return u()},onChange:A,get searchFunction(){return S()},hideArrow:!0,get labelFieldName(){return o()},get valueFieldName(){return r()},get minCharactersToSearch(){return s()},get selectFirstIfEmpty(){return a()},get maxItemsToShowInList(){return l()},get selectedItem(){return d()},set selectedItem(e){d(e)}})};Gn(v,e=>{p()?e(m):e(y,!1)}),yo(ot(i,2),{get id(){return`input-field-helper-${h()??""}`},get errors(){return w},set errors(e){w=e},get show(){return O},set show(e){O=e},get classes(){return $},set classes(e){$=e}}),In(e,t)};Gn(E,e=>{p()?e(L):e(T,!1)}),In(e,C),ee(),i()},UICheckbox:function(e,t){Z(t,!0);const n=()=>Yi(pr,"$LOCALE",i),[i,r]=Qi();let o,s,a=rr(t,"inputStarted",15,!1),l=rr(t,"value",15,!1),u=rr(t,"label",3,"checkbox"),c=rr(t,"placeholder",3,""),d=rr(t,"fieldname",3,"checkbox"),f=rr(t,"icon",3,!1),h=rr(t,"required",3,!0),g=rr(t,"readonly",3,!1),p=rr(t,"disabled",3,!1),v=rr(t,"valid",3,!0),m=rr(t,"validated",3,!1),y=rr(t,"errors",3,!1),k=rr(t,"formErrors",3,!1),b=rr(t,"formLevelError",3,!1),_=rr(t,"onchange",3,()=>{}),w=Le(()=>(f()?" has-icons-left ":"")+" has-icons-right ");or(()=>{o=[].concat(y()?y():[],k()?k():[])}),or(()=>{s=!(m()&&v())&&a()});let O,$=Le(()=>!1===v()||b());function S(e){let t={field:d(),value:"checkbox"===e.currentTarget.type?e.currentTarget.checked:l()};return a(!0),_()(t),!0}function I(e){let t={field:d(),value:"checkbox"===e.currentTarget.type?e.currentTarget.checked:l()};return a(!0),_()(t),!0}or(()=>{O=!0!==v()&&a()?ko.CLASS_ERR:ko.CLASS_OK});var A=Ls(),C=rt(A),E=it(C),L=it(E),T=e=>{{let t=Le(()=>[{value:l()}]);oo(e,{get LC_TRUE(){return u()},get LC_FALSE(){return u()},get values(){return an(t)}})}},x=e=>{var t=Es(),i=rt(t);i.__change=S,i.__input=I;var r=ot(i);kt(()=>{Oi(i,"id",`form-field-checkbox-${d()??""}`),Oi(i,"placeholder",n()[c()]),Oi(i,"name",d()),i.required=h(),i.readOnly=g(),Oi(i,"invalid",an($)),Oi(i,"aria-controls",`input-field-helper-${d()??""}`),Oi(i,"aria-describedby",`input-field-helper-${d()??""}`),i.disabled=p(),Pn(r,` ${n()[u()]??""}`)}),Ui(i,l),In(e,t)};Gn(L,e=>{g()?e(T):e(x,!1)}),yo(ot(C,2),{get id(){return`input-field-helper-${d()??""}`},get errors(){return o},set errors(e){o=e},get show(){return s},set show(e){s=e},get classes(){return O},set classes(e){O=e}}),kt(()=>{di(C,1,`control ${an(w)??""}`),E.disabled=p(),Oi(E,"for",`form-field-checkbox-${d()??""}`)}),In(e,A),ee(),r()},UICheckboxList:function(e,t){Z(t,!0);const[n,i]=Qi();zn();let r,o,s=rr(t,"inputStarted",15,!1),a=rr(t,"value",19,()=>[]),l=rr(t,"fieldname",3,"checkbox-list"),u=rr(t,"readonly",3,!1),c=rr(t,"disabled",3,!1),d=rr(t,"valid",3,!0),f=rr(t,"validated",3,!1),h=rr(t,"errors",3,!1),g=rr(t,"formErrors",3,!1),p=rr(t,"formLevelError",3,!1),v=rr(t,"onchange",3,()=>{});or(()=>{r=[].concat(h()?h():[],g()?g():[])}),or(()=>{o=!(f()&&d())&&s()});let m,y=Le(()=>!1===d()||p());function k(e){let t=parseInt(e.currentTarget.dataset.id),n=[...a()];n.find(e=>e.id==t).value=e.currentTarget.checked;let i={id:t,field:l(),value:n};return s(!0),v()(i),!0}function b(e){let t=parseInt(e.currentTarget.dataset.id),n=[...a()];n.find(e=>e.id===t).value=e.currentTarget.checked;let i={id:t,field:l(),value:n};return s(!0),v()(i),!0}or(()=>{m=!0!==d()&&s()?ko.CLASS_ERR:ko.CLASS_OK});var _=xs(),w=rt(_);Qn(w,21,a,e=>e.id,(e,t,i)=>{var r=Ts(),o=it(r);o.__change=k,o.__input=b;var s=ot(o);kt(()=>{r.disabled=c()||an(t).disabled,Oi(r,"for","form-field-checkbox-"+(l()+"_"+an(t).id)),Oi(o,"data-id",an(t).id),Oi(o,"id","form-field-checkboxlist-"+(l()+"_"+an(t).id)),Oi(o,"placeholder",pr[an(t).placeholder]),Oi(o,"name",l()+"_"+an(t).id),o.readOnly=u(),Oi(o,"invalid",an(y)),Oi(o,"aria-controls","input-field-helper-"+(l()+"_"+an(t).id)),Oi(o,"aria-describedby","input-field-helper-"+(l()+"_"+an(t).id)),o.disabled=c()||an(t).disabled,Pn(s,` ${Yi(pr,"$LOCALE",n)[an(t).label]??""}`)}),Ui(o,()=>an(t).value,e=>an(t).value=e),In(e,r)}),yo(ot(w,2),{get id(){return`input-field-helper-${l()??""}`},get errors(){return r},set errors(e){r=e},get show(){return o},set show(e){o=e},get classes(){return m},set classes(e){m=e}}),In(e,_),ee(),i()},UIColor:function(e,t){Z(t,!0);const[n,i]=Qi();let r,o,s=rr(t,"inputStarted",15,!1),a=rr(t,"value",15,""),l=rr(t,"placeholder",3,""),u=rr(t,"fieldname",3,"color"),c=rr(t,"icon",3,!1),d=rr(t,"required",3,!0),f=rr(t,"readonly",3,!1),h=rr(t,"valid",3,!0),g=rr(t,"validated",3,!1),p=rr(t,"errors",3,!1),v=rr(t,"formErrors",3,!1),m=rr(t,"formLevelError",3,!1),y=rr(t,"onchange",3,()=>{}),k=Le(()=>(c()?" has-icons-left ":"")+" has-icons-right ");or(()=>{r=[].concat(p()?p():[],v()?v():[])}),or(()=>{o=!(g()&&h())&&s()});let b,_=Le(()=>!1===h()||m());or(()=>{b=!0!==h()&&s()?ko.CLASS_ERR:ko.CLASS_OK});var w=Us(),O=rt(w),$=it(O);$.__change=function(e){let t={field:u(),value:e.currentTarget.value};return s(!0),y()(t),!0},$.__input=function(e){let t={field:u(),value:e.currentTarget.value};return s(!0),y()(t),!0};var S=ot($,2),I=e=>{var t=Fs(),n=it(t);kt(()=>di(n,1,`fas fa-${c()??""}`)),In(e,t)};Gn(S,e=>{c()&&e(I)});var A=ot(S,2),C=e=>{var t=Ps(),n=it(t),i=e=>{In(e,Ns())},r=e=>{var t=Sn(),n=rt(t),i=e=>{In(e,Ms())};Gn(n,e=>{!1===h()&&e(i)},!0),In(e,t)};Gn(n,e=>{!0===h()?e(i):e(r,!1)}),In(e,t)};Gn(A,e=>{!0===g()&&e(C)}),yo(ot(O,2),{get id(){return`input-field-helper-${u()??""}`},get errors(){return r},set errors(e){r=e},get show(){return o},set show(e){o=e},get classes(){return b},set classes(e){b=e}}),kt(()=>{di(O,1,`control ${an(k)??""}`),Oi($,"id",`form-field-color-${u()??""}`),di($,1,`input ${b??""}`),Oi($,"name",u()),Oi($,"invalid",an(_)),$.required=d(),Oi($,"placeholder",Yi(pr,"$LOCALE",n)[l()]),Oi($,"autocomplete",u()),Oi($,"aria-controls",`input-field-helper-${u()??""}`),$.readOnly=f(),Oi($,"aria-describedby",`input-field-helper-${u()??""}`)}),Pi($,a),In(e,w),ee(),i()},UIControl:function(e,t){let n=rr(t,"classes",3,"");var i=Rs();Bn(it(i),()=>t.children??g),kt(()=>di(i,1,`control ${n()??""}`)),In(e,i)},UIDate:function(e,t){Z(t,!0);const[n,i]=Qi();let r,o=rr(t,"inputStarted",15,!1),s=rr(t,"value",31,()=>Ge(new Date)),a=rr(t,"placeholder",3,""),l=rr(t,"fieldname",3,"datetime"),u=rr(t,"pattern",3,"d{4}-d{2}-d{2}"),c=rr(t,"icon",3,!1),d=rr(t,"required",3,!0),f=rr(t,"readonly",3,!1),h=rr(t,"valid",3,!0),g=rr(t,"validated",3,!1),p=rr(t,"errors",3,!1),v=rr(t,"formErrors",3,!1),m=rr(t,"formLevelError",3,!1),y=rr(t,"onchange",3,()=>{}),k=Le(()=>(c()?" has-icons-left ":"")+" has-icons-right ");or(()=>{r=[].concat(p()?p():[],v()?v():[])});let b,_,w=Le(()=>!1===h()||m());function O(e){let t={field:l(),value:e.currentTarget.value};return o(!0),y()(t),!0}function $(e){let t={field:l(),value:e.currentTarget.value};return o(!0),y()(t),!0}or(()=>{b=!(g()&&h())&&o()}),or(()=>{_=!0!==h()&&o()?ko.CLASS_ERR:ko.CLASS_OK}),Vn(()=>{s()instanceof Date?s(s().toISOString().split("T")[0]):s().indexOf("T")>0&&s(s().split("T")[0])});var S=qs(),I=rt(S),A=it(I),C=e=>{var t=Ds(),n=it(t),i=it(n);kt(e=>{Oi(n,"datetime",s()),Pn(i,e)},[()=>ko.tryFormatLocaleDateTime(s())]),In(e,t)},E=e=>{var t=zs(),i=rt(t);i.__change=O,i.__input=$;var r=ot(i,2),o=e=>{var t=js(),n=it(t);kt(()=>di(n,1,`fas fa-${c()??""}`)),In(e,t)};Gn(r,e=>{c()&&e(o)});var p=ot(r,2),v=e=>{var t=Vs(),n=it(t),i=e=>{In(e,Ws())},r=e=>{var t=Sn(),n=rt(t),i=e=>{In(e,Bs())};Gn(n,e=>{!1===h()&&e(i)},!0),In(e,t)};Gn(n,e=>{!0===h()?e(i):e(r,!1)}),In(e,t)};Gn(p,e=>{!0===g()&&e(v)}),kt(()=>{di(i,1,`input ${_??""}`),Oi(i,"id",`form-field-date-${l()??""}`),Oi(i,"name",l()),Oi(i,"invalid",an(w)),i.required=d(),Oi(i,"placeholder",Yi(pr,"$LOCALE",n)[a()]),Oi(i,"pattern",u()),i.readOnly=f(),Oi(i,"autocomplete",l()),Oi(i,"aria-controls",`input-field-helper-${l()??""}`),Oi(i,"aria-describedby",`input-field-helper-${l()??""}`)}),Pi(i,s),In(e,t)};Gn(A,e=>{f()?e(C):e(E,!1)}),yo(ot(I,2),{get id(){return`input-field-helper-${l()??""}`},get errors(){return r},set errors(e){r=e},get show(){return b},set show(e){b=e},get classes(){return _},set classes(e){_=e}}),kt(()=>di(I,1,`control ${an(k)??""}`)),In(e,S),ee(),i()},UIDatetimeInTZ:function(e,t){function n(e,t=!1){return e.split(".")[0]+(t?"":"Z")}function i(e,t){try{const i=new Date(r(e)).getTime(),o=-6e4*t;if(A(i+o)){const e=new Date(i+o);return n(e.toISOString(),!0)}}catch(e){return}}function r(e){return e&&"Z"!==e.at(-1)?e+"Z":e}Z(t,!0);let o,s,a=rr(t,"inputStarted",15,!1),l=rr(t,"fieldname",3,"datetime"),u=rr(t,"value",31,()=>Ge(n((new Date).toISOString()))),c=rr(t,"timezoneOffset",3,0),d=rr(t,"icon",3,!1),f=rr(t,"required",3,!1),h=rr(t,"disabled",3,!1),g=rr(t,"readonly",3,!1),p=rr(t,"valid",3,!0),v=rr(t,"validated",3,!1),m=rr(t,"errors",3,!1),y=rr(t,"formErrors",3,!1),k=rr(t,"formLevelError",3,!1),b=rr(t,"onchange",3,()=>{}),_=Le(()=>(d()?" has-icons-left ":"")+" has-icons-right ");or(()=>{o=[].concat(m()?m():[],y()?y():[])}),or(()=>{s=!(v()&&p())&&a()});let w,O=Le(()=>!1===p()||k());or(()=>{w=!0!==p()&&a()?ko.CLASS_ERR:ko.CLASS_OK});let $,S=De(void 0);const I=e=>{A(e)&&($=an(S),Be(S,e,!0))};Vn(()=>{I(i(u(),c()))});const A=e=>{try{return new Date(e),!0}catch(e){return!1}};let C=Le(()=>isNaN(c())?"":(c()>0?"":"+")+(c()/-60).toFixed(1));function E(e){return e.currentTarget.value&&an(S)&&A(an(S))?(u()!==i(an(S),-c())&&(()=>{I(an(S)),u(r(i(an(S),-c())));let e={field:l(),value:u()};a(!0),b()(e)})(),!0):(Be(S,$,!0),!1)}var L=Sn(),T=rt(L),x=e=>{var t=Xs(),n=rt(t),i=it(n),r=e=>{var t=Hs(),n=it(t);kt(()=>Pn(n,an(S))),In(e,t)},a=e=>{var t=Qs(),n=rt(t);n.__change=E,n.__input=E;var i=ot(n,2),r=e=>{var t=Gs(),n=it(t);kt(()=>{Oi(t,"title",an(C)),di(n,1,`fas fa-${d()??""}`)}),In(e,t)};Gn(i,e=>{d()&&e(r)});var o=ot(i,2),s=e=>{var t=Ys(),n=it(t),i=e=>{In(e,Ks())},r=e=>{var t=Sn(),n=rt(t),i=e=>{In(e,Js())};Gn(n,e=>{!1===p()&&e(i)},!0),In(e,t)};Gn(n,e=>{!0===p()?e(i):e(r,!1)}),In(e,t)};Gn(o,e=>{!0===v()&&e(s)}),kt(()=>{Oi(n,"id",`form-field-datetime-in-timezone-${l()??""}`),di(n,1,`input ${w??""}`),Oi(n,"name",l()),Oi(n,"invalid",an(O)),n.disabled=h(),n.required=f(),n.readOnly=g(),Oi(n,"autocomplete",l()),Oi(n,"aria-controls",`input-field-helper-${l()??""}`),Oi(n,"aria-describedby",`input-field-helper-${l()??""}`)}),mn("blur",n,E),Pi(n,()=>an(S),e=>Be(S,e)),In(e,t)};Gn(i,e=>{g()?e(r):e(a,!1)}),yo(ot(n,2),{get id(){return`input-field-helper-${l()??""}`},get errors(){return o},set errors(e){o=e},get show(){return s},set show(e){s=e},get classes(){return w},set classes(e){w=e}}),kt(()=>di(n,1,`control ${an(_)??""}`)),In(e,t)};Gn(T,e=>{an(S)&&e(x)}),In(e,L),ee()},UIEmail:function(e,t){Z(t,!0);const[n,i]=Qi();let r,o,s=rr(t,"inputStarted",15,!1),a=rr(t,"value",15,""),l=rr(t,"placeholder",3,""),u=rr(t,"fieldname",3,"email"),c=rr(t,"icon",3,!1),d=rr(t,"required",3,!0),f=rr(t,"readonly",3,!1),h=rr(t,"disabled",3,!1),g=rr(t,"valid",3,!0),p=rr(t,"validated",3,!1),v=rr(t,"errors",3,!1),m=rr(t,"formErrors",3,!1),y=rr(t,"formLevelError",3,!1),k=rr(t,"onchange",3,()=>{}),b=Le(()=>(c()?" has-icons-left ":"")+" has-icons-right ");or(()=>{r=[].concat(v()?v():[],m()?m():[])}),or(()=>{o=!(p()&&g())&&s()});let _,w=Le(()=>!1===g()||y());function O(e){let t={field:u(),value:e.currentTarget.value};return s(!0),k()(t),!0}function $(e){let t={field:u(),value:e.currentTarget.value};return s(!0),k()(t),!0}or(()=>{_=!0!==g()&&s()?ko.CLASS_ERR:ko.CLASS_OK});var S=oa(),I=rt(S),A=it(I),C=e=>{var t=Zs(),n=it(t);kt(()=>Pn(n,a())),In(e,t)},E=e=>{var t=ra(),i=rt(t);i.__change=O,i.__input=$;var r=ot(i,2),o=e=>{var t=ea(),n=it(t);kt(()=>di(n,1,`fas fa-${c()??""}`)),In(e,t)};Gn(r,e=>{c()&&e(o)});var s=ot(r,2),v=e=>{var t=ia(),n=it(t),i=e=>{In(e,ta())},r=e=>{var t=Sn(),n=rt(t),i=e=>{In(e,na())};Gn(n,e=>{!1===g()&&e(i)},!0),In(e,t)};Gn(n,e=>{!0===g()?e(i):e(r,!1)}),In(e,t)};Gn(s,e=>{!0===p()&&e(v)}),kt(()=>{di(i,1,`input ${_??""}`),Oi(i,"id",`form-field-email-${u()??""}`),Oi(i,"name",u()),Oi(i,"invalid",an(w)),i.required=d(),i.readOnly=f(),i.disabled=h(),Oi(i,"placeholder",Yi(pr,"$LOCALE",n)[l()]),Oi(i,"autocomplete",u()),Oi(i,"aria-controls",`input-field-helper-${u()??""}`),Oi(i,"aria-describedby",`input-field-helper-${u()??""}`)}),Pi(i,a),In(e,t)};Gn(A,e=>{f()?e(C):e(E,!1)}),yo(ot(I,2),{get id(){return`input-field-helper-${u()??""}`},get errors(){return r},set errors(e){r=e},get show(){return o},set show(e){o=e},get classes(){return _},set classes(e){_=e}}),kt(()=>di(I,1,`control ${an(b)??""}`)),In(e,S),ee(),i()},UIHidden:function(e,t){Z(t,!0);let n=rr(t,"value",15,""),i=rr(t,"fieldname",3,"hidden"),r=rr(t,"required",3,!0),o=rr(t,"readonly",3,!1);var s=sa();kt(()=>{s.required=r(),s.readOnly=o(),Oi(s,"name",i())}),Pi(s,n),In(e,s),ee()},UIJSONArea:function(e,t){Z(t,!0);let n=rr(t,"inputStarted",15,!1),i=rr(t,"value",31,()=>Ge({})),r=rr(t,"placeholder",3,""),o=rr(t,"fieldname",3,"jsonarea"),s=rr(t,"icon",3,!1),a=rr(t,"rows",3,10),l=rr(t,"required",3,!0),u=rr(t,"readonly",3,!1),c=rr(t,"disabled",3,!1),d=rr(t,"valid",15,!0),f=rr(t,"validated",3,!1),h=rr(t,"errors",15,!1),g=rr(t,"formErrors",3,!1),p=rr(t,"formLevelError",3,!1),v=rr(t,"onchange",3,()=>{}),m=De("{}");function y(e){try{i(JSON.parse(e)),d(!0),h(!1),n(!0),v()({field:o(),value:i()})}catch(e){d(!1),h([e.message])}}Vn(()=>{Be(m,JSON.stringify(i(),null,4),!0)}),ga(e,{onchange:function(e){return y(e.value),!0},get placeholder(){return r()},get icon(){return s()},get rows(){return a()},get required(){return l()},get readonly(){return u()},get disabled(){return c()},get validated(){return f()},get formErrors(){return g()},get formLevelError(){return p()},get inputStarted(){return n()},set inputStarted(e){n(e)},get value(){return an(m)},set value(e){Be(m,e,!0)}}),ee()},UILabel:va,UIListOfModels:function(e,t){Z(t,!0),rr(t,"inputStarted",3,!1);let n=rr(t,"value",31,()=>Ge([])),i=rr(t,"placeholder",15,""),r=rr(t,"fieldname",15,"selectFromModel"),o=rr(t,"required",15,!0),s=rr(t,"readonly",3,!1),a=rr(t,"multiple",15,!1),l=rr(t,"size",15,8),u=rr(t,"valid",15,!0),c=rr(t,"validated",15,!1),d=rr(t,"errors",15,!1),f=rr(t,"formErrors",15,!1),h=rr(t,"formLevelError",15,!1),g=rr(t,"modelName",3,""),p=rr(t,"actionName",3,""),v=rr(t,"actionFilter",19,()=>({})),m=rr(t,"actionSorter",19,()=>({})),y=rr(t,"actionPager",19,()=>({})),k=rr(t,"actionSearch",3,void 0),b=rr(t,"optionId",3,":_id"),_=rr(t,"optionTitle",3,":title"),w=rr(t,"selectorUI",3,"UISelectFromModelOnDemandInline"),O=rr(t,"selectorUIProps",19,()=>({})),$=rr(t,"itemUI",3,"UIListItem"),S=rr(t,"itemUIProps",19,()=>({})),I=rr(t,"transformValueItemToListItem",3,e=>e?{id:e._id,title:e.title,description:e.description,value:e}:void 0),A=rr(t,"onchange",3,()=>{}),C=Le(()=>n().map?n().map(I()):[]);const E=[{action(e){const t=e.value,i=n().findIndex(e=>e===t);if(i>-1){const e=[...n()];Qr.moveItem(e,i,i-1),n(e)}},title:"",icon:"arrow-up",color:"normal"},{action:e=>{const t=e.value,i=n().findIndex(e=>e===t);if(i>-1){const e=[...n()];Qr.moveItem(e,i,i+1),n(e)}},title:"",icon:"arrow-down",color:"normal"},{action:e=>{const t=e.value,i=n().findIndex(e=>e===t);i>-1&&(n().splice(i,1),n(n()))},title:"",icon:"trash",color:"danger"}];var L=Ba(),T=rt(L);{let e=Le(()=>ka.get($()));Wa(T,ir({get listItemComponent(){return an(e)}},S,{get items(){return an(C)},get actions(){return E}}))}var x=ot(T,2),F=e=>{const t=Le(()=>ka.get(w()));var s=Sn();ri(rt(s),()=>an(t),(e,t)=>{t(e,ir(O,{get modelName(){return g()},get actionName(){return p()},get actionFilter(){return v()},get actionSorter(){return m()},get actionPager(){return y()},get actionSearch(){return k()},get optionId(){return b()},get optionTitle(){return _()},get onchange(){return A()},get placeholder(){return i()},set placeholder(e){i(e)},get fieldname(){return r()},set fieldname(e){r(e)},get required(){return o()},set required(e){o(e)},get multiple(){return a()},set multiple(e){a(e)},get size(){return l()},set size(e){l(e)},get valid(){return u()},set valid(e){u(e)},get validated(){return c()},set validated(e){c(e)},get errors(){return d()},set errors(e){d(e)},get formErrors(){return f()},set formErrors(e){f(e)},get formLevelError(){return h()},set formLevelError(e){h(e)},$$events:{resolve:e=>{return t=e,Array.isArray(n())||n([]),n().push(t),void n(n());var t}}}))}),In(e,s)};Gn(x,e=>{s()||e(F)}),In(e,L),ee()},UINamedNumbersList:function(e,t){Z(t,!0);let n,i,r,o=rr(t,"fieldname",3,"numbers_list"),s=rr(t,"value",23,()=>({})),a=rr(t,"label",3,"named numbers list"),l=rr(t,"inputStarted",3,!1),u=rr(t,"placeholder",3,"new item"),c=rr(t,"readonly",3,!1),d=rr(t,"valid",3,!0),f=rr(t,"validated",3,!1),h=rr(t,"errors",3,!1),g=rr(t,"formErrors",3,!1),p=rr(t,"onchange",3,()=>{}),v=De(Ge([]));function m(){Be(v,Object.keys(s()).map(e=>({id:e,title:e,number:s()[e]})),!0)}m(),or(()=>{n=[].concat(h()?h():[],g()?g():[])}),or(()=>{i=!(f()&&d())&&l()}),or(()=>{r=!0!==d()&&l()?ko.CLASS_ERR:ko.CLASS_OK});let y=Ge({id:"",number:0});var k=ul(),b=rt(k);Qo(b,{get title(){return a()},size:5});var _=ot(b,2);Qn(_,19,()=>an(v),e=>e.id,(e,t)=>{Ha(e,{children:(e,n)=>{var i=al(),r=rt(i);za(r,{classes:"is-6",children:(e,n)=>{var i=$n();kt(()=>Pn(i,an(t).title)),In(e,i)},$$slots:{default:!0}});var a=ot(r,2);za(a,{classes:"is-4",children:(e,n)=>{var i=$n();kt(()=>Pn(i,an(t).number)),In(e,i)},$$slots:{default:!0}});var l=ot(a,2),u=e=>{za(e,{classes:"is-2",children:(e,n)=>{No(e,{icon:"minus",action:()=>{return e=an(t).id,Qr.objHas(s(),e)&&(delete s()[e],s(s()),p()({value:H(s()),field:o()})),void m();var e}})},$$slots:{default:!0}})};Gn(l,e=>{c()||e(u)}),In(e,i)},$$slots:{default:!0}})});var w=ot(_,2),O=e=>{Ha(e,{children:(e,t)=>{var n=ll(),i=rt(n);za(i,{classes:"is-6",children:(e,t)=>{ss(e,{get placeholder(){return u()},get value(){return y.id},set value(e){y.id=e}})},$$slots:{default:!0}});var r=ot(i,2);za(r,{classes:"is-4",children:(e,t)=>{sl(e,{get value(){return y.number},set value(e){y.number=e}})},$$slots:{default:!0}}),za(ot(r,2),{classes:"is-2",children:(e,t)=>{No(e,{icon:"plus",action:()=>function(){const e=y.id.trim(),t=parseInt(y.number);!e||""===e||isNaN(t)||Qr.objHas(s(),e)||(s()[e]=t),s(s()),p()({value:H(s()),field:o()}),m()}()})},$$slots:{default:!0}}),In(e,n)},$$slots:{default:!0}})};Gn(w,e=>{c()||e(O)}),yo(ot(w,2),{get id(){return`input-field-helper-${o()??""}`},get errors(){return n},set errors(e){n=e},get show(){return i},set show(e){i=e},get classes(){return r},set classes(e){r=e}}),In(e,k),ee()},UINumber:sl,UIPassword:function(e,t){Z(t,!0);const[n,i]=Qi();let r,o,s=rr(t,"inputStarted",15,!1),a=rr(t,"value",15,""),l=rr(t,"placeholder",3,""),u=rr(t,"fieldname",3,"password"),c=rr(t,"icon",3,!1),d=rr(t,"required",3,!0),f=rr(t,"readonly",3,!1),h=rr(t,"valid",3,!0),g=rr(t,"validated",3,!1),p=rr(t,"errors",3,!1),v=rr(t,"formErrors",3,!1),m=rr(t,"formLevelError",3,!1),y=rr(t,"onchange",3,()=>{}),k=Le(()=>(c()?" has-icons-left ":"")+" has-icons-right ");or(()=>{r=[].concat(p()?p():[],v()?v():[])}),or(()=>{o=!(g()&&h())&&s()});let b,_=Le(()=>!1===h()||m());or(()=>{b=!0!==h()&&s()?ko.CLASS_ERR:ko.CLASS_OK}),or(()=>{});var w=gl(),O=rt(w),$=it(O);$.__change=function(e){let t={field:u(),value:e.currentTarget.value};return s(!0),y()(t),!0},$.__input=function(e){let t={field:u(),value:e.currentTarget.value};return s(!0),y()(t),!0};var S=ot($,2),I=e=>{var t=cl(),n=it(t);kt(()=>di(n,1,`fas fa-${c()??""}`)),In(e,t)};Gn(S,e=>{c()&&e(I)});var A=ot(S,2),C=e=>{var t=hl(),n=it(t),i=e=>{In(e,dl())},r=e=>{var t=Sn(),n=rt(t),i=e=>{In(e,fl())};Gn(n,e=>{!1===h()&&e(i)},!0),In(e,t)};Gn(n,e=>{!0===h()?e(i):e(r,!1)}),In(e,t)};Gn(A,e=>{!0===g()&&e(C)}),yo(ot(O,2),{get id(){return`input-field-helper-${u()??""}`},get errors(){return r},set errors(e){r=e},get show(){return o},set show(e){o=e},get classes(){return b},set classes(e){b=e}}),kt(()=>{di(O,1,`control ${an(k)??""}`),di($,1,`input ${b??""}`),$.readOnly=f(),Oi($,"id",`form-field-password-${u()??""}`),Oi($,"name",u()),Oi($,"invalid",an(_)),$.required=d(),Oi($,"placeholder",Yi(pr,"$LOCALE",n)[l()]),Oi($,"autocomplete",u()),Oi($,"aria-controls",`input-field-helper-${u()??""}`),Oi($,"aria-describedby",`input-field-helper-${u()??""}`)}),Pi($,a),In(e,w),ee(),i()},UIRadioButtons:function(e,t){Z(t,!0);let n=rr(t,"fieldname",3,"radio-buttons"),i=rr(t,"variants",19,()=>[]),r=rr(t,"value",15),o=rr(t,"buttonProps",19,()=>({})),s=rr(t,"titleComponent",3,Qo),a=rr(t,"titleComponentProps",19,()=>({size:5})),l=rr(t,"imageComponent",3,ml),u=rr(t,"imageComponentProps",19,()=>({covered:!0})),c=rr(t,"descriptionComponent",3,Po),d=rr(t,"descriptionComponentProps",19,()=>({})),f=rr(t,"listComponent",3,Wa),h=rr(t,"listComponentProps",19,()=>({})),g=rr(t,"getUIItem",3,e=>k.find(t=>t.value===e)),p=rr(t,"getDefaultItemSublime",3,()=>i()[0].value),v=rr(t,"uiOn",3,e=>{e.color="success",e.outlined=!1}),m=rr(t,"uiOff",3,e=>{e.color=!1,e.outlined=!0}),y=rr(t,"onchange",3,()=>{});Vn(()=>{k=i().map(e=>({...o(),...e})),Be(b,[{id:0,title:t.title,image:t.image,description:{values:k}}],!0),function(){if(i().length>0)if(void 0!==r())w({on:r()});else{_(p()())}}()});let k=[],b=De(Ge([]));function _(e){let t={on:void 0,off:void 0};r()&&(t.off=r(),t.on=e),r(e),w(t),y()({field:n(),value:r()})}function w(e){e.off&&m()(g()(e.off)),e.on&&v()(g()(e.on)),Be(b,an(b),!0)}const O=Le(f);var $=Sn(),S=rt($);{let e=Le(()=>({...d(),action(e,t){_(t)}}));ri(S,()=>an(O),(t,n)=>{n(t,ir(h,{get titleComponent(){return s()},get titleComponentProps(){return a()},get descriptionComponent(){return c()},get descriptionComponentProps(){return an(e)},get imageComponent(){return l()},get imageComponentProps(){return u()},get items(){return an(b)},set items(e){Be(b,e,!0)}}))})}In(e,$),ee()},UIRange:function(e,t){Z(t,!0);const[n,i]=Qi();let r,o,s=rr(t,"inputStarted",15,!1),a=rr(t,"value",15,10),l=rr(t,"min",3,0),u=rr(t,"max",3,100),c=rr(t,"step",3,1),d=rr(t,"tickmarks",3,!1),f=rr(t,"placeholder",3,""),h=rr(t,"fieldname",3,"range"),g=rr(t,"icon",3,!1),p=rr(t,"required",3,!0),v=rr(t,"disabled",3,!1),m=rr(t,"readonly",3,!1),y=rr(t,"valid",3,!0),k=rr(t,"validated",3,!1),b=rr(t,"errors",3,!1),_=rr(t,"formErrors",3,!1),w=rr(t,"formLevelError",3,!1),O=rr(t,"onchange",3,()=>{}),$=Le(()=>(g()?" has-icons-left ":"")+" has-icons-right ");or(()=>{r=[].concat(b()?b():[],_()?_():[])}),or(()=>{o=!(k()&&y())&&s()});let S,I=Le(()=>!1===y()||w());function A(){let e={field:h(),value:a()};return s(!0),O()(e),!0}function C(e){let t={field:h(),value:e.currentTarget.value};return s(!0),O()(t),!0}or(()=>{S=!0!==y()&&s()?ko.CLASS_ERR:ko.CLASS_OK});var E=Ol(),L=rt(E),T=it(L),x=e=>{var t=yl(),n=it(t);kt(()=>Pn(n,a())),In(e,t)},F=e=>{var t=wl(),i=rt(t);i.__change=A,i.__input=C;var r=ot(i,2),o=it(r),s=ot(r,2),y=e=>{var t=bl();Qn(t,21,d,Yn,(e,t)=>{var n=kl(),i={};kt(()=>{Oi(n,"label",an(t).label),i!==(i=an(t).value)&&(n.value=(n.__value=an(t).value)??"")}),In(e,n)}),kt(()=>Oi(t,"id",`form-field-range-${h()??""}-tickmarks`)),In(e,t)};Gn(s,e=>{Array.isArray(d())&&d().length&&e(y)});var k=ot(s,2),b=e=>{var t=_l(),n=it(t);kt(()=>di(n,1,`fas fa-${g()??""}`)),In(e,t)};Gn(k,e=>{g()&&e(b)}),kt(()=>{Oi(i,"id",`form-field-range-${h()??""}`),di(i,1,`input big-number slider has-output is-fullwidth is-success ${S??""}`),Oi(i,"name",h()),Oi(i,"min",l()),Oi(i,"max",u()),Oi(i,"step",c()),Oi(i,"list",`form-field-range-${h()??""}-tickmarks`),Oi(i,"invalid",an(I)),i.disabled=v(),i.required=p(),i.readOnly=m(),Oi(i,"placeholder",Yi(pr,"$LOCALE",n)[f()]),Oi(i,"autocomplete",h()),Oi(i,"aria-controls",`input-field-helper-${h()??""}`),Oi(i,"aria-describedby",`input-field-helper-${h()??""}`),Oi(r,"for",`form-field-range-${h()??""}`),Pn(o,a())}),Pi(i,a),In(e,t)};Gn(T,e=>{m()?e(x):e(F,!1)}),yo(ot(L,2),{get id(){return`input-field-helper-${h()??""}`},get errors(){return r},set errors(e){r=e},get show(){return o},set show(e){o=e},get classes(){return S},set classes(e){S=e}}),kt(()=>di(L,1,`control ${an($)??""}`)),In(e,E),ee(),i()},UIRangeLogarithmic:function(e,t){Z(t,!0);const[n,i]=Qi(),r=Number.MAX_SAFE_INTEGER;let o,s,a=rr(t,"inputStarted",15,!1),l=rr(t,"value",15,10),u=rr(t,"min",3,0),c=rr(t,"max",3,100),d=rr(t,"tickmarks",3,!1),f=rr(t,"placeholder",3,""),h=rr(t,"fieldname",3,"range"),g=rr(t,"icon",3,!1),p=rr(t,"required",3,!0),v=rr(t,"disabled",3,!1),m=rr(t,"readonly",3,!1),y=rr(t,"valid",3,!0),k=rr(t,"validated",3,!1),b=rr(t,"errors",3,!1),_=rr(t,"formErrors",3,!1),w=rr(t,"formLevelError",3,!1),O=rr(t,"onchange",3,()=>{}),$=Le(()=>(g()?" has-icons-left ":"")+" has-icons-right ");or(()=>{o=[].concat(b()?b():[],_()?_():[])}),or(()=>{s=!(k()&&y())&&a()});let S,I=Le(()=>!1===y()||w());function A(e){const t=M(e.currentTarget.value);l(t);let n={field:h(),value:l()};return a(!0),O()(n),!0}function C(e){const t=M(Math.round(parseInt(e.currentTarget.value)));l(t);let n={field:h(),value:l()};return a(!0),O()(n),!0}or(()=>{S=!0!==y()&&a()?ko.CLASS_ERR:ko.CLASS_OK});let E=0,L=0,T=100,x=10,F=De(1);function N(){L=Math.log(u()||1),T=Math.log(c()||r),x=(T-L)/(100-E),l()>c()?l(c()):l()<u()?l(u()):l(l())}function M(e){return e=parseInt(e),Math.round(Math.exp((e-E)*x+L))}or(()=>{u(),c(),N()}),Vn(()=>{N()});var P=El(),U=rt(P),R=it(U),D=e=>{var t=$l(),n=it(t);kt(()=>Pn(n,l())),In(e,t)},j=e=>{var t=Cl(),i=rt(t);Oi(i,"min",E),Oi(i,"max",100),Oi(i,"step",.01),i.__change=A,i.__input=C;var r=ot(i,2),o=it(r),s=ot(r,2),a=e=>{var t=Il();Qn(t,21,d,Yn,(e,t)=>{var n=Sl(),i={};kt(()=>{Oi(n,"label",an(t).label),i!==(i=an(t).value)&&(n.value=(n.__value=an(t).value)??"")}),In(e,n)}),kt(()=>Oi(t,"id",`form-field-range-${h()??""}-tickmarks`)),In(e,t)};Gn(s,e=>{Array.isArray(d())&&d().length&&e(a)});var u=ot(s,2),c=e=>{var t=Al(),n=it(t);kt(()=>di(n,1,`fas fa-${g()??""}`)),In(e,t)};Gn(u,e=>{g()&&e(c)}),kt(()=>{Oi(i,"id",`form-field-range-${h()??""}`),di(i,1,`input big-number slider has-output is-fullwidth is-success ${S??""}`),Oi(i,"name",h()),Oi(i,"list",`form-field-range-${h()??""}-tickmarks`),Oi(i,"invalid",an(I)),i.disabled=v(),i.required=p(),i.readOnly=m(),Oi(i,"placeholder",Yi(pr,"$LOCALE",n)[f()]),Oi(i,"autocomplete",h()),Oi(i,"aria-controls",`input-field-helper-${h()??""}`),Oi(i,"aria-describedby",`input-field-helper-${h()??""}`),Oi(r,"for",`form-field-range-${h()??""}`),Pn(o,l())}),Pi(i,()=>an(F),e=>Be(F,e)),In(e,t)};Gn(R,e=>{m()?e(D):e(j,!1)}),yo(ot(U,2),{get id(){return`input-field-helper-${h()??""}`},get errors(){return o},set errors(e){o=e},get show(){return s},set show(e){s=e},get classes(){return S},set classes(e){S=e}}),kt(()=>di(U,1,`control ${an($)??""}`)),In(e,P),ee(),i()},UISelect:Co,UISelectFromModel:function(e,t){Z(t,!0);let n=rr(t,"inputStarted",3,!1),i=rr(t,"placeholder",3,""),r=rr(t,"emptyValueTitle",3,""),o=rr(t,"fieldname",3,"selectFromModel"),s=rr(t,"modelName",3,""),a=rr(t,"actionName",3,""),l=rr(t,"actionFilter",19,()=>({})),u=rr(t,"actionSorter",19,()=>({})),c=rr(t,"actionPager",19,()=>({})),d=rr(t,"actionSearch",3,void 0),f=rr(t,"optionId",3,":_id"),h=rr(t,"optionTitle",3,":title"),g=rr(t,"icon",3,!1),p=rr(t,"required",3,!0),v=rr(t,"readonly",3,!1),m=rr(t,"multiple",3,!1),y=rr(t,"size",3,8),k=rr(t,"valid",3,!0),b=rr(t,"validated",3,!1),_=rr(t,"errors",15,!1),w=rr(t,"formErrors",3,!1),O=rr(t,"formLevelError",3,!1),$=rr(t,"returnVariant",3,!1),S=rr(t,"onchange",3,()=>{}),I=De(Ge([])),A=Le(()=>!0);Vn(async()=>{if(s()&&a()&&l()){const e=Qr.getApp().getModel(s()).setFilter(l()).setSorter(u()).setPager(c()).setSearch(d()),t=await e["$"+a()]();if(t.status===Vo){const e=t.result;Be(I,e.map(e=>({id:qr.get(f(),e),title:qr.get(h(),e)})),!0)}else _(result.errors||[result.message])}}),Co(e,{get inputStarted(){return n()},get value(){return t.value},get placeholder(){return i()},get emptyValueTitle(){return r()},get fieldname(){return o()},get icon(){return g()},get required(){return p()},get readonly(){return v()},disabled:an(A),get multiple(){return m()},get size(){return y()},get valid(){return k()},get validated(){return b()},get errors(){return _()},get formErrors(){return w()},get formLevelError(){return O()},onchange:function(e){$()?S()({...e,value:an(I).find(t=>t.id===e.value)}):S()(e)},get variants(){return an(I)},set variants(e){Be(I,e,!0)}}),ee()},UISwitch:function(e,t){Z(t,!0);const n=()=>Yi(pr,"$LOCALE",i),[i,r]=Qi();let o=rr(t,"inputStarted",7,!1),s=rr(t,"value",3,!1),a=rr(t,"label",3,""),l=rr(t,"hideLabel",3,!1),u=rr(t,"placeholder",3,""),c=rr(t,"fieldname",3,"textfield");rr(t,"icon",3,!1);let d,f,h=rr(t,"required",3,!0),g=rr(t,"readonly",3,!1),p=rr(t,"disabled",3,!1),v=rr(t,"valid",3,!0),m=rr(t,"styling",3," is-rounded is-success "),y=rr(t,"validated",3,!1),k=rr(t,"errors",3,!1),b=rr(t,"formErrors",3,!1),_=rr(t,"formLevelError",3,!1),w=rr(t,"onchange",3,()=>{});or(()=>{d=[].concat(k()?k():[],b()?b():[])}),or(()=>{f=!(y()&&v())&&o()});let O,$=Le(()=>!1===v()||_());function S(e){let t={field:c(),value:"checkbox"===e.currentTarget.type?e.currentTarget.checked:s()};return o(!0),w()(t),!0}function I(e){let t={field:c(),value:"checkbox"===e.currentTarget.type?e.currentTarget.checked:s()};return o(!0),w()(t),!0}or(()=>{O=!0!==v()&&o()?ko.CLASS_ERR:ko.CLASS_OK});var A=Tl(),C=rt(A),E=it(C),L=e=>{var t=Sn(),n=rt(t),i=e=>{oo(e,{values:[{value:!0}]})},r=e=>{oo(e,{values:[{value:!1}]})};Gn(n,e=>{s()?e(i):e(r,!1)}),In(e,t)},T=e=>{var t=Ll(),i=rt(t),r=e=>{oo(e,{values:[{value:!1}]})};Gn(i,e=>{a()||l()||e(r)});var o=ot(i,2);o.__input=I;var d=ot(o,2),f=it(d),v=e=>{var t=Sn(),i=rt(t),r=e=>{var t=$n();kt(()=>Pn(t,n()[a()])),In(e,t)},o=e=>{oo(e,{values:[{value:!0}]})};Gn(i,e=>{a()?e(r):e(o,!1)}),In(e,t)};Gn(f,e=>{l()||e(v)}),kt(()=>{di(o,1,`switch ${m()??""}`),Oi(o,"id",`form-field-switch-${c()??""}`),_i(o,s()),Oi(o,"placeholder",n()[u()]),Oi(o,"name",c()),o.disabled=p(),o.required=h(),o.readOnly=g(),Oi(o,"invalid",an($)),Oi(o,"aria-controls",`input-field-helper-${c()??""}`),Oi(o,"aria-describedby",`input-field-helper-${c()??""}`),Oi(d,"for",`form-field-switch-${c()??""}`)}),mn("blur",o,S),In(e,t)};Gn(E,e=>{g()?e(L):e(T,!1)}),yo(ot(C,2),{get id(){return`input-field-helper-${c()??""}`},get errors(){return d},set errors(e){d=e},get show(){return f},set show(e){f=e},get classes(){return O},set classes(e){O=e}}),In(e,A),ee(),r()},UISwitchList:function(e,t){Z(t,!0);const[n,i]=Qi();let r=rr(t,"inputStarted",7,!1),o=rr(t,"value",23,()=>[]),s=rr(t,"variants",19,()=>[]);rr(t,"label",3,""),rr(t,"hideLabel",3,!1),rr(t,"placeholder",3,"");let a=rr(t,"fieldname",3,"textfield");rr(t,"icon",3,!1);let l=rr(t,"required",3,!0),u=rr(t,"readonly",3,!1);rr(t,"multiple",3,!0);let c,d,f=rr(t,"disabled",3,!1),h=rr(t,"valid",3,!0),g=rr(t,"styling",3," is-rounded is-success "),p=rr(t,"validated",3,!1),v=rr(t,"errors",3,!1),m=rr(t,"formErrors",3,!1),y=rr(t,"formLevelError",3,!1),k=rr(t,"onchange",3,()=>{});or(()=>{c=[].concat(v()?v():[],m()?m():[])}),or(()=>{d=!(p()&&h())&&r()});let b,_=Le(()=>!1===h()||y());function w(e){o().includes(e)||(o().push(e),o(o()))}function O(e){o().includes(e)&&(o().splice(o().indexOf(e),1),o(o()))}function $(e){console.log("switch list element blur",e);const t=e.target.id.split("-variant-").at(-1);console.log(t),e.target.checked?w(t):O(t);let n={field:a(),value:o()};return r(!0),k()(n),!0}function S(e){console.log("switch list element input",e);const t=e.target.id.split("-variant-").at(-1);console.log(t),e.target.checked?w(t):O(t);let n={field:a(),value:o()};return r(!0),k()(n),!0}or(()=>{b=!0!==h()&&r()?ko.CLASS_ERR:ko.CLASS_OK});var I=Fl(),A=rt(I),C=it(A),E=e=>{var t=Sn(),n=rt(t),i=e=>{var t=$n();kt(e=>Pn(t,e),[()=>s().filter(e=>o().includes(e.id)).map(e=>e.title).join(", ")]),In(e,t)};Gn(n,e=>{o()&&e(i)}),In(e,t)},L=e=>{var t=Sn();Qn(rt(t),17,s,e=>e.id,(e,t)=>{var i=xl(),r=it(i);r.__input=S;var s=ot(r,2),c=it(s);kt(e=>{di(r,1,`switch ${g()??""}`),Oi(r,"id",`form-field-switch-${a()??""}-variant-${an(t).id??""}`),_i(r,e),Oi(r,"name",a()),r.disabled=f(),r.required=l(),r.readOnly=u(),Oi(r,"invalid",an(_)),Oi(r,"aria-controls",`input-field-helper-${a()??""}-variant-${an(t).id??""}`),Oi(r,"aria-describedby",`input-field-helper-${a()??""}-variant-${an(t).id??""}`),Oi(s,"for",`form-field-switch-${a()??""}-variant-${an(t).id??""}`),Pn(c,Yi(pr,"$LOCALE",n)[an(t).title])},[()=>o().includes(an(t).id)]),mn("blur",r,$),In(e,i)}),In(e,t)};Gn(C,e=>{u()?e(E):e(L,!1)}),yo(ot(A,2),{get id(){return`input-field-helper-${a()??""}`},get errors(){return c},set errors(e){c=e},get show(){return d},set show(e){d=e},get classes(){return b},set classes(e){b=e}}),In(e,I),ee(),i()},UITagSelect:function(e,t){Z(t,!0);const n=()=>Yi(pr,"$LOCALE",i),[i,r]=Qi();Vn(()=>{o(o().filter(e=>b(e))),o()});let o=rr(t,"value",31,()=>Ge([])),s=rr(t,"inputStarted",3,!1),a=rr(t,"variants",19,()=>[]),l=rr(t,"fieldname",3,"tag"),u=rr(t,"readonly",3,!1),c=rr(t,"valid",3,!0),d=rr(t,"validated",3,!1),f=rr(t,"errors",3,!1),h=rr(t,"formErrors",3,!1);rr(t,"formLevelError",3,!1);let g=rr(t,"beforeAdd",3,()=>!0),p=rr(t,"getItemId",3,e=>e.id),v=rr(t,"getItemTitle",3,e=>e.title),m=rr(t,"getItemType",3,e=>"info"),y=rr(t,"buildItem",3,e=>({id:p()(e),title:v()(e),type:m()(e)})),k=rr(t,"onchange",3,()=>{});function b(e){return a().find(t=>p()(t)===e)}function _(){let e={field:l(),value:o()};k()(e)}function w(e){e&&e.preventDefault();let t=e.currentTarget.dataset.id;return o().includes(t)&&(o().splice(o().indexOf(t),1),o(o()),_()),!1}function O(e){e&&e.preventDefault();let t=e.currentTarget.parentNode.querySelector("select").value;const n=b(t);return!!n&&(!!g()(n,a())&&(t&&-1===o().indexOf(t)&&(o().push(t),o(o()),_()),!1))}let $,S,I,A=Le(()=>o().map(b).filter(e=>e).map(y()));or(()=>{$=[].concat(f()?f():[],h()?h():[])}),or(()=>{S=!(d()&&c())&&s()}),or(()=>{I=!0!==c()&&s()?ko.CLASS_ERR:ko.CLASS_OK});var C=Rl(),E=rt(C),L=it(E);Qn(L,21,()=>an(A),e=>e.id,(e,t)=>{var i=Ml(),r=it(i),o=ot(r),s=e=>{var n=Nl();n.__click=w,kt(()=>Oi(n,"data-id",an(t).id)),In(e,n)};Gn(o,e=>{u()||e(s)}),kt(()=>{di(i,1,`mx-1 tag is-${an(t).type??""}`),Pn(r,`${n()[an(t).title]??""} `)}),In(e,i)});var T=ot(L,2),x=e=>{var t=Ul(),i=it(t),r=it(i),o=it(r),s=it(o),l=it(s);s.value=s.__value="-1",Qn(ot(s),17,a,Yn,(e,t)=>{var i=Pl(),r=it(i),o={};kt(()=>{Pn(r,n()[an(t).title]),o!==(o=an(t).id)&&(i.value=(i.__value=an(t).id)??"")}),In(e,i)});var u=ot(r,2);u.__click=O;var c=it(u);kt(()=>{Pn(l,n()["not-node:select_from_list_label"]),Pn(c,n()["not-node:add_label"])}),In(e,t)};Gn(T,e=>{u()||e(x)}),yo(ot(E,2),{get id(){return`input-field-helper-${l()??""}`},get errors(){return $},set errors(e){$=e},get show(){return S},set show(e){S=e},get classes(){return I},set classes(e){I=e}}),kt(()=>di(L,1,`column ${I??""}`)),In(e,C),ee(),r()},UITelephone:function(e,t){Z(t,!0);const[n,i]=Qi();let r,o,s=rr(t,"inputStarted",15,!1),a=rr(t,"value",15,""),l=rr(t,"placeholder",3,"+7 (987) 654-32-10"),u=rr(t,"fieldname",3,"telephone"),c=rr(t,"icon",3,!1),d=rr(t,"required",3,!0),f=rr(t,"readonly",3,!1),h=rr(t,"valid",3,!0),g=rr(t,"validated",3,!1),p=rr(t,"errors",3,!1),v=rr(t,"formErrors",3,!1),m=rr(t,"formLevelError",3,!1),y=rr(t,"onchange",3,()=>{}),k=Le(()=>(c()?" has-icons-left ":"")+" has-icons-right ");or(()=>{r=[].concat(p()?p():[],v()?v():[])}),or(()=>{o=!(g()&&h())&&s()});let b,_=Le(()=>!1===h()||m());function w(e){e.preventDefault();let t=ko.formatPhone(e.currentTarget.value),n={field:u(),value:t};return a(t),s(!0),y()(n),!1}function O(e){e.preventDefault();let t=ko.formatPhone(e.currentTarget.value),n={field:u(),value:t};return a(t),s(!0),y()(n),!1}or(()=>{b=!0!==h()&&s()?ko.CLASS_ERR:ko.CLASS_OK});var $=ql(),S=rt($),I=it(S),A=e=>{var t=Dl(),n=it(t);kt(()=>Pn(n,a())),In(e,t)},C=e=>{var t=zl(),i=rt(t);i.__change=w,i.__input=O;var r=ot(i,2),o=e=>{var t=jl(),n=it(t);kt(()=>di(n,1,`fas fa-${c()??""}`)),In(e,t)};Gn(r,e=>{c()&&e(o)});var s=ot(r,2),p=e=>{var t=Vl(),n=it(t),i=e=>{In(e,Wl())},r=e=>{var t=Sn(),n=rt(t),i=e=>{In(e,Bl())};Gn(n,e=>{!1===h()&&e(i)},!0),In(e,t)};Gn(n,e=>{!0===h()?e(i):e(r,!1)}),In(e,t)};Gn(s,e=>{!0===g()&&e(p)}),kt(()=>{Oi(i,"id",`form-field-telephone-${u()??""}`),di(i,1,`input ${b??""}`),Oi(i,"name",u()),Oi(i,"invalid",an(_)),i.required=d(),i.readOnly=f(),Oi(i,"placeholder",Yi(pr,"$LOCALE",n)[l()]),Oi(i,"autocomplete",u()),Oi(i,"aria-controls",`input-field-helper-${u()??""}`),Oi(i,"aria-describedby",`input-field-helper-${u()??""}`)}),Pi(i,a),In(e,t)};Gn(I,e=>{f()?e(A):e(C,!1)}),yo(ot(S,2),{get id(){return`input-field-helper-${u()??""}`},get errors(){return r},set errors(e){r=e},get show(){return o},set show(e){o=e},get classes(){return b},set classes(e){b=e}}),kt(()=>di(S,1,`control ${an(k)??""}`)),In(e,$),ee(),i()},UITextarea:ga,UITextfield:ss}),Gl=On("<!> <!>",1);var Kl=On('<div class="is-fab svelte-135omvc"><!></div>');var Jl=On("<span><span><i></i> <span> </span></span></span>"),Yl=On("<span><i></i></span>");function Ql(e,t){Z(t,!0);const[n,i]=Qi();let r=rr(t,"title",3,""),o=rr(t,"font",3,""),s=rr(t,"size",3,""),a=rr(t,"pointable",3,!1);var l=Sn(),u=rt(l),c=e=>{var t=Jl(),i=it(t),l=it(i),u=it(ot(l,2));kt(()=>{di(t,1,"icon-text "+(a()?"is-clickable":"")),di(i,1,"icon "+(s()?`is-${s()}`:"")),di(l,1,`is-title-icon fas\n fa-${o()??""}\n ${"medium"==s()?"fa-lg":""}\n ${"large"==s()?"fa-2x":""}\n `),Pn(u,Yi(pr,"$LOCALE",n)[r()])}),In(e,t)},d=e=>{var t=Yl(),n=it(t);kt(()=>{di(t,1,`\n ${a()?"is-clickable":""}\n icon ${s()?`is-${s()}`:""} ${"medium"==s()?"fa-lg":""}\n${"large"==s()?"fa-2x":""}`),di(n,1,`fas fa-${o()??""}`)}),In(e,t)};Gn(u,e=>{r()?e(c):e(d,!1)}),In(e,l),ee(),i()}var Xl=On('<span class="icon"><!></span>'),Zl=On("<figure><img/></figure>");function eu(e,t){let n=rr(t,"title",3,""),i=rr(t,"size",3,""),r=rr(t,"font",3,""),o=rr(t,"svg",3,""),s=rr(t,"src",3,"");var a=Sn(),l=rt(a),u=e=>{Ql(e,{get font(){return r()},get size(){return i()},get title(){return n()}})},c=e=>{var i=Sn(),r=rt(i),a=e=>{var t=Xl();ni(it(t),o),In(e,t)},l=e=>{var i=Sn(),r=rt(i),o=e=>{var i=Zl(),r=it(i);kt(()=>{di(i,1,`image ${t.width&&t.height?`is-${t.width}x${t.height}`:""} `),Oi(r,"src",s()),Oi(r,"title",n()),Oi(r,"alt",n()),Oi(r,"width",t.width),Oi(r,"height",t.height)}),In(e,i)};Gn(r,e=>{s()&&e(o)},!0),In(e,i)};Gn(r,e=>{o()?e(a):e(l,!1)},!0),In(e,i)};Gn(l,e=>{r()?e(u):e(c,!1)}),In(e,a)}var tu=Object.freeze({__proto__:null,UIIcon:eu,UIIconButtonWithTag:function(e,t){let n=rr(t,"button",19,()=>({})),i=rr(t,"tag",19,()=>({}));var r=Gl(),o=rt(r);No(o,ir(n)),no(ot(o,2),ir(i,{classes:"is-top-right"})),In(e,r)},UIIconFloating:function(e,t){Z(t,!0);let n=rr(t,"trigger",19,()=>({title:"Click me!",icon:"plus",color:"primary",size:"medium"})),i=De("");Vn(()=>{Be(i,"")});var r=Kl();No(it(r),ir({action:function(){}},n)),kt(()=>hi(r,an(i))),In(e,r),ee()},UIIconFont:Ql});function nu(e,t){let n=rr(t,"values",19,()=>[]),i=rr(t,"onclick",3,()=>{});var r=Sn();Qn(rt(r),17,n,e=>e.src,(e,t)=>{ml(e,ir(()=>an(t),{get onclick(){return i()}}))}),In(e,r)}var iu=Object.freeze({__proto__:null,UIImage:ml,UIImages:nu}),ru=Object.freeze({__proto__:null,UILink:Ea,UILinks:xa}),ou=On('<div class="column box"> </div>'),su=On('<div class="columns"><div class="column"><!></div> <!> <div class="column"><!></div></div>');function au(e,t){Z(t,!0);const n=()=>Yi(pr,"$LOCALE",i),[i,r]=Qi(),o=zn();let s=rr(t,"page",3,0),a=rr(t,"pages",3,0),l=rr(t,"buttonComponent",3,No),u=rr(t,"buttonComponentProps",19,()=>({}));var c=Sn(),d=rt(c),f=e=>{var t=su(),i=it(t),r=it(i),c=e=>{const t=Le(l);var i=Sn();ri(rt(i),()=>an(t),(e,t)=>{t(e,ir(u,{action:()=>o("prev"),children:(e,t)=>{var i=$n();kt(()=>Pn(i,n()["not-node:list_navigation_prev_button_label"])),In(e,i)},$$slots:{default:!0}}))}),In(e,i)};Gn(r,e=>{s()>1&&e(c)});var d=ot(i,2),f=e=>{var t=ou(),n=it(t);kt(()=>Pn(n,`${s()??""} / ${a()??""}`)),In(e,t)};Gn(d,e=>{a()>1&&e(f)});var h=it(ot(d,2)),g=e=>{const t=Le(l);var i=Sn();ri(rt(i),()=>an(t),(e,t)=>{t(e,ir(u,{action:()=>o("next"),children:(e,t)=>{var i=$n();kt(()=>Pn(i,n()["not-node:list_navigation_next_button_label"])),In(e,i)},$$slots:{default:!0}}))}),In(e,i)};Gn(h,e=>{s()<a()&&e(g)}),In(e,t)};Gn(d,e=>{a()>0&&e(f)}),In(e,c),ee(),r()}var lu=On('<div class="box list-item-selectable svelte-1yu9yjk" role="button" tabindex="0"><span> </span></div>');function uu(e,t){Z(t,!0);const n=zn();function i(){n("click",{_id:t._id,id:t.id,title:t.title})}var r=lu(),o=Le(()=>Bi(i));r.__click=function(...e){an(o)?.apply(this,e)},r.__keyup=i;var s=it(r),a=it(s);kt(()=>Pn(a,t.title)),In(e,r),ee()}yn(["click","keyup"]);var cu=On("<div><!></div> <!>",1);function du(e,t){Z(t,!0);const n=zn();let i=rr(t,"data",31,()=>Ge({list:[],skip:0,count:0,page:0,pages:0})),r=rr(t,"itemComponent",3,uu),o=rr(t,"itemComponentProps",19,()=>({})),s=rr(t,"emptyListPlaceholderComponent",3,wa),a=rr(t,"emptyListPlaceholderComponentProps",19,()=>({})),l=rr(t,"listNavigationComponent",3,au),u=rr(t,"listNavigationComponentProps",19,()=>({}));function c({detail:e}){n("select",e)}const d=Le(l);var f=cu(),h=rt(f),g=it(h),p=e=>{var t=Sn();Qn(rt(t),17,()=>i().list,e=>e.id,(e,t)=>{const n=Le(r);var i=Sn();ri(rt(i),()=>an(n),(e,n)=>{n(e,ir(o,()=>an(t),{$$events:{click:c}}))}),In(e,i)}),In(e,t)},v=e=>{const t=Le(s);var n=Sn();ri(rt(n),()=>an(t),(e,t)=>{t(e,ir(a))}),In(e,n)};Gn(g,e=>{i().list.length?e(p):e(v,!1)}),ri(ot(h,2),()=>an(d),(e,n)=>{n(e,ir(u,{get page(){return i().page},set page(e){i(i().page=e,!0)},get pages(){return i().pages},set pages(e){i(i().pages=e,!0)},get skip(){return i().skip},set skip(e){i(i().skip=e,!0)},get count(){return i().count},set count(e){i(i().count=e,!0)},$$events:{prev(e){zi.call(this,t,e)},next(e){zi.call(this,t,e)}}}))}),In(e,f),ee()}var fu=On("<!> <!>",1);var hu=Object.freeze({__proto__:null,UIEndlessList:du,UIEndlessListNavigation:au,UIEndlessListSimpleItem:uu,UIList:Wa,UIListEmptyPlaceholder:wa,UIListItem:Da,UIListSelect:function(e,t){Z(t,!0);const n=zn();let i=rr(t,"fieldname",3,"list-select"),r=rr(t,"multiple",3,!1),o=rr(t,"atLeastOne",3,!0),s=rr(t,"variants",31,()=>Ge([])),a=rr(t,"value",15),l=rr(t,"selectedVariantsIds",31,()=>Ge([])),u=rr(t,"titleComponent",3,Qo),c=rr(t,"titleComponentProps",19,()=>({size:5})),d=rr(t,"imageComponent",3,ml),f=rr(t,"imageComponentProps",19,()=>({covered:!0})),h=rr(t,"descriptionComponent",3,Po),g=rr(t,"descriptionComponentProps",19,()=>({})),p=rr(t,"listComponent",3,Wa),v=rr(t,"listComponentProps",19,()=>({})),m=rr(t,"sublimeValue",3,e=>e.id),y=rr(t,"getItem",3,({valueId:e})=>s().find(t=>t.value.id===e)),k=rr(t,"getItemValue",3,({valueId:e})=>y()({valueId:e}).value),b=rr(t,"getDefaultItemSublime",3,()=>s()[0].id),_=rr(t,"uiOn",3,e=>{e.color="success",e.outlined=!1}),w=rr(t,"uiOff",3,e=>{e.color=!1,e.outlined=!0});function O(){return Array.isArray(a())?l().length:0}Vn(()=>{a()&&Array.isArray(a())?o()&&a().length&&a().forEach(e=>{A(S(e))}):function(){if(o()&&s().length>0){I({id:b()()})}}()});const $=()=>!(o()&&1===O());function S(e){const t=m()(e);let n={on:void 0,off:void 0};return Array.isArray(l())||l([]),r()?l().includes(t)?$()&&(l().splice(l().indexOf(t),1),n.off={valueId:t}):(l().push(t),n.on={valueId:t}):o()?l().includes(t)||(O()>0&&(n.off={valueId:l().pop()}),n.on={valueId:t},l([t])):l().includes(t)?(n.off={valueId:t},l().splice(l().indexOf(t),1)):(n.on={valueId:t},l().push(t)),l(l()),n}function I(e){A(S(e)),function(){let e=[];void 0!==l()&&Array.isArray(l())&&(e=l().filter(e=>void 0!==e).map(e=>k()({valueId:e})));a(e)}(),n("change",{field:i(),value:a()})}function A(e){e.off&&w()(y()(e.off)),e.on&&_()(y()(e.on)),s(s())}const C=Le(p);var E=Sn(),L=rt(E);{let e=Le(()=>({...g(),action(e,t){I(t)}}));ri(L,()=>an(C),(t,n)=>{n(t,ir(v,{get titleComponent(){return u()},get titleComponentProps(){return c()},get descriptionComponent(){return h()},get descriptionComponentProps(){return an(e)},get imageComponent(){return d()},get imageComponentProps(){return f()},get items(){return s()},set items(e){s(e)}}))})}In(e,E),ee()},UIListSelectButtonsWithGroups:function(e,t){Z(t,!0);const n=zn();let i=rr(t,"fieldname",3,"list-select-tags"),r=rr(t,"variants",31,()=>Ge([]));rr(t,"variantsSelected",19,()=>({}));let o=rr(t,"value",15),s=rr(t,"titleComponent",3,Qo),a=rr(t,"titleComponentProps",19,()=>({size:5})),l=rr(t,"imageComponent",3,ml),u=rr(t,"imageComponentProps",19,()=>({covered:!0})),c=rr(t,"descriptionComponent",3,Wo),d=rr(t,"descriptionComponentProps",19,()=>({})),f=rr(t,"listComponent",3,Wa),h=rr(t,"listComponentProps",19,()=>({})),g=rr(t,"actionsList",19,()=>["selectAll","deselectAll"]),p=rr(t,"sublimeValue",3,e=>({groupId:e.group,valueId:e.id}));const v={selectAll:{title:"Выбрать все",color:"success",action(){y()}},deselectAll:{title:"Снять выделение со всех",color:"",action(){k()}}};let m=De(Ge([]));Vn(()=>{g().forEach(e=>{Object.hasOwn(v,e)&&an(m).push(v[e])}),Be(m,an(m),!0)});const y=()=>{_(!0)},k=()=>{_(!1)},b=(e,t)=>{r().forEach(n=>{e===n.id&&n.description.values.forEach(e=>{e.selected=t})}),r(r()),O()},_=e=>{r().forEach(t=>{t.description.values.forEach(t=>{t.selected=e})}),r(r()),O()};function w(){let e={};return r().forEach(t=>{Object.hasOwn(e,t.id)||(e[t.id]=[]),t.description.values.forEach(n=>{n.selected&&e[t.id].push(p()(n.value))})}),e}function O(){o(w()),n("change",{fieldname:i(),value:o()})}const $=Le(f);var S={selectAll:y,deselectAll:k,selectGroup:e=>{b(e,!0)},deselectGroup:e=>{b(e,!1)},setSelectionOfGroup:b,setSelectionOfAll:_,getSelectedItems:w},I=fu(),A=rt(I);Po(A,{get values(){return an(m)},centered:!0});var C=ot(A,2);{let e=Le(()=>({action:(e,t,n)=>(setTimeout(O,0),!n),...d()}));ri(C,()=>an($),(t,n)=>{n(t,ir(h,{get titleComponent(){return s()},get titleComponentProps(){return a()},get descriptionComponent(){return c()},get descriptionComponentProps(){return an(e)},get imageComponent(){return l()},get imageComponentProps(){return u()},get items(){return r()},set items(e){r(e)}}))})}return In(e,I),ee(S)},UIListSelectWithGroups:function(e,t){Z(t,!0);const n=zn();let i=rr(t,"fieldname",3,"list-select-tags"),r=rr(t,"multiple",3,!1),o=rr(t,"onlyOneInGroup",3,!0),s=rr(t,"atLeastOne",3,!0),a=rr(t,"variants",31,()=>Ge([])),l=rr(t,"variantsSelected",31,()=>Ge({})),u=rr(t,"value",15),c=rr(t,"titleComponent",3,Qo),d=rr(t,"titleComponentProps",19,()=>({size:5})),f=rr(t,"imageComponent",3,ml),h=rr(t,"imageComponentProps",19,()=>({covered:!0})),g=rr(t,"descriptionComponent",3,Po),p=rr(t,"descriptionComponentProps",19,()=>({})),v=rr(t,"listComponent",3,Wa),m=rr(t,"listComponentProps",19,()=>({})),y=rr(t,"sublimeValue",3,e=>({groupId:e.group,valueId:e.id})),k=rr(t,"getItem",3,({groupId:e,valueId:t})=>a().find(t=>t.id===e).description.values.find(e=>e.value.id===t)),b=rr(t,"getItemValue",3,({groupId:e,valueId:t})=>k()({groupId:e,valueId:t}).value),_=rr(t,"getDefaultItemSublime",3,()=>({groupId:a()[0].id,valueId:a()[0].description.values[0].value.id})),w=rr(t,"uiOn",3,e=>{e.color="success",e.outlined=!1}),O=rr(t,"uiOff",3,e=>{e.color=!1,e.outlined=!1});function $(e){const{valueId:t,groupId:n}=y()(e);let i={on:void 0,off:void 0};return r()?(o()?(void 0!==l()[n]&&(i.off={groupId:n,valueId:l()[n]}),l(l()[n]=t,!0),i.on={groupId:n,valueId:t}):(Array.isArray(l()[n])||l(l()[n]=[],!0),l()[n].includes(t)?function(){let e=0;if(r())for(let t of Object.values(l()))o()?void 0!==t&&e++:void 0!==t&&Array.isArray(t)&&(e+=t.length);else void 0!==l()&&void 0!==l().value&&void 0!==l().group&&e++;return e}()>1&&(l()[n].splice(l()[n].indexOf(t),1),i.off={groupId:n,valueId:t}):(l()[n].push(t),i.on={groupId:n,valueId:t}),l(l()[n]=l()[n],!0)),l(l())):l()&&l().groupId===n&&l().valueId===t?s()||(l(void 0),i.off={groupId:n,valueId:t}):(l()&&void 0!==l().groupId&&(i.off={groupId:l().groupId,valueId:l().valueId}),i.on={groupId:n,valueId:t},l({groupId:n,valueId:t})),i}function S(e){let t=$(e);console.log("image value",u(),t),I(t),function(){if(r()){let e={};if(o())for(let t in l())void 0!==l()[t]&&(e[t]=b()({groupId:t,valueId:l()[t]}));else for(let t in l())void 0!==l()[t]&&Array.isArray(l()[t])&&(e[t]=l()[t].filter(e=>void 0!==e).map(e=>b()({groupId:t,valueId:e})));0==Object.keys(e).length?u(void 0):u(e)}else l()?u(b()(l())):u(void 0)}(),n("change",{field:i(),value:u()})}function I(e){e.off&&O()(k()(e.off)),e.on&&w()(k()(e.on)),a(a())}Vn(()=>{if(u())if(r())if(o())for(let e of Object.keys(u())){I($(u()[e]))}else for(let e of Object.keys(u()))u()[e].forEach(e=>{I($(e))});else{I($(u()))}else!function(){if(s()&&a().length>0){const e=_()();S({id:e.valueId,group:e.groupId})}}()});const A=Le(v);var C=Sn(),E=rt(C);{let e=Le(()=>({...p(),action(e,t){S(t)}}));ri(E,()=>an(A),(t,n)=>{n(t,ir(m,{get titleComponent(){return c()},get titleComponentProps(){return d()},get descriptionComponent(){return g()},get descriptionComponentProps(){return an(e)},get imageComponent(){return f()},get imageComponentProps(){return h()},get items(){return a()},set items(e){a(e)}}))})}In(e,C),ee()}}),gu=On("<button></button>"),pu=On('<div role="button" tabindex="0"><!> <!></div>');function vu(e,t){Z(t,!0);let n=De("");let i=rr(t,"closeButton",3,!1),r=rr(t,"show",3,!0),o=rr(t,"closeOnClick",3,!0),s=rr(t,"closeSize",3,"normal"),a=rr(t,"layer",3,1),l=rr(t,"classes",3,""),u=rr(t,"onreject",3,()=>{});function c(e){o()&&function(e){try{if(e&&e.originalTarget){const t=e.originalTarget;t.classList&&t.classList.contains("is-overlay")&&f()}}catch{}}(e)}function d(){f()}function f(e={}){u()(e)}var h;or(()=>{r()?document.body.style.overflow="hidden":document.body.style.overflow=an(n)}),Vn(()=>{Be(n,document.body.style.overflow,!0)}),h=()=>{document.body.style.overflow=an(n)},null===K&&j(),Vn(()=>()=>un(h));var p=Sn(),v=rt(p),m=e=>{var n=pu();n.__click=c,n.__keyup=c;var r=it(n),o=e=>{var t=gu();t.__click=d,kt(()=>di(t,1,`delete is-${s()??""}`)),In(e,t)};Gn(r,e=>{i()&&e(o)}),Bn(ot(r,2),()=>t.children??g),kt(()=>{di(n,1,`is-overlay not-overlay ${l()??""}`),hi(n,`z-index: ${1e3*a()};`)}),Ni(3,n,()=>hs),In(e,n)};Gn(v,e=>{r()&&e(m)}),In(e,p),ee()}yn(["click","keyup"]);var mu=On('<div><span class="title"> </span></div> <!> <!> <!>',1),yu=On("<!> <!>",1);var ku=On("<div><!> <!> <!></div>");function bu(e,t){Z(t,!0);const[n,i]=Qi();let r=rr(t,"show",3,!0),o=rr(t,"term",15,""),s=rr(t,"size",3,"narrow"),a=rr(t,"inputComponent",3,ls),l=rr(t,"inputComponentProps",19,()=>({})),u=rr(t,"outputComponent",3,du),c=rr(t,"outputComponentProps",19,()=>({})),d=rr(t,"results",31,()=>Ge({list:[],page:0,pages:0,skip:0,count:0})),f=rr(t,"onreject",3,()=>{}),h=rr(t,"onresolve",3,()=>{}),g=rr(t,"onTermChange",3,()=>{}),p=rr(t,"onprev",3,()=>{}),v=rr(t,"onnext",3,()=>{});Vn(()=>{});const m=[{title:Yi(pr,"$LOCALE",n)["not-node:button_cancel_label"],action:f()}];vu(e,{get onreject(){return f()},get show(){return r()},closeOnClick:!0,closeButton:!1,children:(e,t)=>{const n=Le(a),i=Le(u);var r=ku(),f=it(r);ri(f,()=>an(n),(e,t)=>{t(e,ir({get onTermChange(){return g()}},l,{get term(){return o()},set term(e){o(e)}}))});var y=ot(f,2);ri(y,()=>an(i),(e,t)=>{t(e,ir({get onprev(){return p()},get onnext(){return v()},get onselect(){return h()}},c,{get data(){return d()},set data(e){d(e)}}))}),Po(ot(y,2),{get values(){return m},centered:!0,classes:"mt-5"}),kt(()=>di(r,1,`paper box block ${s()??""}`,"svelte-25yqoj")),In(e,r)},$$slots:{default:!0}}),ee(),i()}var _u=Object.freeze({__proto__:null,UIGenericSelector:bu,UIModal:function(e,t){Z(t,!0);const n=()=>Yi(pr,"$LOCALE",i),[i,r]=Qi();let o=rr(t,"buttonsPosition",3,"bottom"),s=rr(t,"closeButton",3,!1),a=rr(t,"applyButton",3,!1),l=rr(t,"titleSize",3,2),u=rr(t,"show",3,!1),c=rr(t,"loading",3,!1),d=rr(t,"title",3,"Modal window"),f=rr(t,"subtitle",3,""),h=rr(t,"classes",3,""),p=rr(t,"overlayClasses",3,""),v=rr(t,"buttonsClasses",3,""),m=rr(t,"WAITING_TEXT",3,"Обработка");vu(e,{get show(){return u()},closeOnClick:!1,closeButton:!1,get classes(){return p()},children:(e,i)=>{cr(e,{get classes(){return h()},children:(e,i)=>{var r=yu(),u=rt(r);Qo(u,{get size(){return l()},get title(){return n()[d()]},get subtitle(){return n()[f()]}}),fr(ot(u,2),{children:(e,i)=>{var r=mu(),l=rt(r),u=it(l),d=it(u),f=ot(l,2),h=e=>{{let t=Le(()=>s()?[s()]:[]),n=Le(()=>a()?[a()]:[]);Ro(e,{get classes(){return v()},get left(){return an(t)},get right(){return an(n)}})}};Gn(f,e=>{"top"===o()&&e(h)});var p=ot(f,2);Bn(p,()=>t.children??g);var y=ot(p,2),k=e=>{{let t=Le(()=>v()||"is-footer is-mobile"),n=Le(()=>s()?[s()]:[]),i=Le(()=>a()?[a()]:[]);Ro(e,{get classes(){return an(t)},get left(){return an(n)},get right(){return an(i)}})}};Gn(y,e=>{"bottom"===o()&&e(k)}),kt(()=>{di(l,1,"pageloader "+(c()?"is-active":"")),Pn(d,n()[m()])}),In(e,r)},$$slots:{default:!0}}),In(e,r)},$$slots:{default:!0}})},$$slots:{default:!0}}),ee(),r()},UIOverlay:vu}),wu=On('<article><div class="message-header"><p> </p></div> <div class="message-body"> </div></article>');function Ou(e,t){Z(t,!0);const n=()=>Yi(pr,"$LOCALE",i),[i,r]=Qi();let o=rr(t,"class",3,"");var s=wu(),a=it(s),l=it(a),u=it(l),c=it(ot(a,2));kt(()=>{di(s,1,`message is-danger ${o()??""}`),Pn(u,n()[t.title]),Pn(c,n()[t.message])}),In(e,s),ee(),r()}var $u=On('<article><div class="message-header"><p> </p></div> <div class="message-body"> </div></article>');function Su(e,t){Z(t,!0);const n=()=>Yi(pr,"$LOCALE",i),[i,r]=Qi();let o=rr(t,"class",3,"");var s=$u(),a=it(s),l=it(a),u=it(l),c=it(ot(a,2));kt(()=>{di(s,1,`message is-success ${o()??""}`),Pn(u,n()[t.title]),Pn(c,n()[t.message])}),In(e,s),ee(),r()}var Iu=On('<div id="cookie_notification" class="svelte-1shueb2"><p class="svelte-1shueb2"> </p> <button class="button is-success cookie_accept svelte-1shueb2"> </button></div>');yn(["click"]);var Au=Object.freeze({__proto__:null,UICookieNotification:function(e,t){Z(t,!0);const n=()=>Yi(pr,"$LOCALE",i),[i,r]=Qi();let o=rr(t,"show",15,!1),s=rr(t,"message",3,"Для улучшения работы сайта и его взаимодействия с пользователями мы используем файлы cookie. Продолжая работу с сайтом, Вы разрешаете использование cookie-файлов. Вы всегда можете отключить файлы cookie в настройках Вашего браузера."),a=rr(t,"agree",3,"Хорошо");function l(){localStorage.setItem("cookie_date",Date.now()),o(!1)}Vn(()=>{let e=localStorage.getItem("cookie_date");(!e||+e+31536e6<Date.now())&&o(!0)});var u=Sn(),c=rt(u),d=e=>{var t=Iu(),i=it(t),r=it(i),o=ot(i,2);o.__click=l;var u=it(o);kt(()=>{Pn(r,n()[s()]),Pn(u,n()[a()])}),In(e,t)};Gn(c,e=>{o()&&e(d)}),In(e,u),ee(),r()},UIError:Ou,UISuccess:Su}),Cu=Object.freeze({__proto__:null,Blocks:hr,Buttons:Bo,Forms:Hl,Icons:tu,Images:iu,Layouts:Xa,Links:ru,Lists:hu,Modals:_u,Notifications:Au,UICommon:ko,Various:us});const Eu=Symbol("init"),Lu=Symbol("data"),Tu=Symbol("working"),xu=Symbol("options");let Fu=function(e){function t(e){var n;return kr(this,t),(n=mr(this,t))[Lu]={},n[Tu]={},n[xu]={},n[Eu](e),Lr(n,n)}return Cr(t,e),Sr(t,[{key:Eu,value:function(e){e||(e={}),Object.hasOwn(e,"data")&&this.setData(e.data),Object.hasOwn(e,"working")&&this.setWorking(e.working),Object.hasOwn(e,"options")&&this.setOptions(e.options),this.log=Qr.genLogMsg(this.getWorking("name")),this.info=this.log,this.debug=Qr.genLogDebug(this.getWorking("name")),this.error=Qr.genLogError(this.getWorking("name"))}},{key:"setCommon",value:function(e,t){switch(t.length){case 1:e=t[0];break;case 2:qr.set(t[0],e,void 0,t[1])}return this}},{key:"getCommon",value:function(e,t){switch(t.length){case 1:return qr.get(t[0],e);case 2:{let n=qr.get(t[0],e);return void 0===n?t[1]:n}default:return e}}},{key:"setData",value:function(){return 1===arguments.length?this[Lu]=arguments[0]:this.setCommon(this.getData(),arguments),this.emit("onchange"),this}},{key:"getData",value:function(){return this.getCommon(this[Lu],arguments)}},{key:"setOptions",value:function(){return 1===arguments.length?this[xu]=arguments[0]:this.setCommon(this.getOptions(),arguments),this}},{key:"getOptions",value:function(){return this.getCommon(this[xu],arguments)}},{key:"setWorking",value:function(){return 1===arguments.length?this[Tu]=arguments[0]:this.setCommon(this.getWorking(),arguments),this}},{key:"getWorking",value:function(){return this.getCommon(this[Tu],arguments)}},{key:"report",value:function(e){Qr.report&&Qr.report(e)}},{key:"getApp",value:function(){return Qr.getApp()}},{key:"destroy",value:function(){this.removeEvent(),this.setOptions(null),this.setWorking(null),this.setData(null),this.emit("ondestroy")}}])}(Br);const Nu=Symbol("history"),Mu=Symbol("hash");let Pu=function(e){function t(){var e;return kr(this,t),Ir(e=mr(this,t,[{working:{routes:[],mode:Nu,root:"/",initialized:!1,delays:zo,delay_default:qo}}]),"host",""),Lr(e,e)}return Cr(t,e),Sr(t,[{key:"setDelays",value:function(e){return this.setWorking("delays",e),this}},{key:"setDefaultNavigationDelay",value:function(e){return this.setWorking("delay_default",this.delayAsMs(e)),this}},{key:"getDefaultNavigationDelay",value:function(){return this.getWorking("delay_default",qo)}},{key:"delayAsMs",value:function(e){return"number"==typeof e?e:"string"==typeof e&&e.length>0?this.getWorking(`delays.${e}`,this.getDefaultNavigationDelay()):this.getDefaultNavigationDelay()}},{key:"navigateWithDelay",value:function(e,t,n){var i=this;return setTimeout(function(){"function"==typeof n&&n(),i.navigate(e)},this.delayAsMs(t))}},{key:"history",value:function(){this.setWorking("mode",Nu)}},{key:"hash",value:function(){this.setWorking("mode",Mu)}},{key:"setRoot",value:function(e){return this.setWorking("root",e&&"/"!==e?"/"+this.clearSlashes(e)+"/":"/"),this}},{key:"clearSlashes",value:function(e){return e.toString().replace(/\/$/,"").replace(/^\//,"")}},{key:"add",value:function(e,t){"function"==typeof e&&(t=e,e="");let n={re:e,handler:t};return this.getWorking("routes").push(n),this}},{key:"addList",value:function(e){for(let t in e)this.add(t,e[t]);return this}},{key:"remove",value:function(e){for(var t,n=0;this.getWorking("routes").length,t=this.getWorking("routes")[n];n++)if(t.handler===e||t.re===e)return this.getWorking("routes").splice(n,1),this;return this}},{key:"flush",value:function(){return this.setWorking({routes:[],mode:Nu,root:"/"}),this}},{key:"isInitialized",value:function(){return this.getWorking("initialized")}},{key:"setInitialized",value:function(e=!0){return this.setWorking("initialized",e)}},{key:"getFragment",value:function(){var e="";if(this.getWorking("mode")===Nu){if(!location)return"";e=(e=this.clearSlashes(decodeURI(location.pathname+location.search))).replace(/\?(.*)$/,""),e="/"!=this.getWorking("root")?e.replace(this.getWorking("root"),""):e}else{if(!window)return"";var t=window.location.href.match(/#(.*)$/);e=t?t[1]:""}return this.clearSlashes(e)}},{key:"checkLocation",value:function(){let e=this.getWorking("current"),t=this.getFragment(),n=this.isInitialized();e===t&&n||(this.setWorking("current",t),this.check(t),this.setInitialized(!0))}},{key:"hrefClick",value:function(){}},{key:"getRoot",value:function(){return this.getWorking("root")}},{key:"listen",value:function(e=50){return this.setWorking("current","notInitialized"),clearInterval(this.getWorking("interval")),this.setWorking("interval",setInterval(this.checkLocation.bind(this),e)),window.addEventListener("popstate",this.hrefClick.bind(this)),this}},{key:"check",value:function(e){let t=e||this.getFragment(),n=null;for(let e=0;e<this.getWorking("routes").length;e++){let i=this.getWorking("root")+this.getWorking("routes")[e].re,r=this.clearSlashes(decodeURI(i)),o=t.match(r);if(o&&o.length){if(""!==r)return o.shift(),this.getWorking("routes")[e].handler.apply(this.host||{},o),this.emit("onAfterRoute",this.getWorking("routes")[e]),this;o.shift(),n={route:this.getWorking("routes")[e],match:o}}}return n&&(n.route.handler.apply(this.host||{},n.match),this.emit("onAfterRoute",n.route)),this}},{key:"refresh",value:function(e=0){var t=this;e>0?setTimeout(function(){return t.refresh()},e):this.check(this.getWorking("current"))}},{key:"navigate",value:function(e){switch(e=e||"",this.getWorking("mode")){case Nu:{const t=this.getFullRoute(e);t===this.lastRoute?this.refresh():(this.lastRoute=t,history.pushState(null,"",this.lastRoute));break}case Mu:window.location.href.match(/#(.*)$/),window.location.href=window.location.href.replace(/#(.*)$/,"")+"#"+e}return this}},{key:"getFullRoute",value:function(e=""){e=this.clearSlashes(e);const t=this.getWorking("root");return"/"!==t&&0===e.indexOf(t.substring(1))?"/"+e:this.getWorking("root")+this.clearSlashes(e)}},{key:"getAllLinks",value:function(){const e=document.body.querySelectorAll("a");let t=[];for(let n=0;n<e.length;n++)for(let i=0,r=e[n].attributes,o=r.length;i<o;i++)if(0===r[i].nodeName.indexOf("n-href")){t.push(e[n]);break}return t}},{key:"reRouteExisted",value:function(){const e=this.getAllLinks();for(let t=0;t<e.length;t++)this.initRerouting(e[t],e[t].getAttribute("n-href"));return this}},{key:"initRerouting",value:function(e,t){var n=this;if(!e.notRouterInitialized){let i=this.getFullRoute(t);e.setAttribute("href",i),e.addEventListener("click",function(e){return e.preventDefault(),n.navigate(t),!1}),e.notRouterInitialized=!0}return this}}])}(Fu);var Uu=new Pu;let Ru=function(e){function t(e={}){var n;return kr(this,t),(n=mr(this,t,[{working:{name:e.name?e.name:"APIQuee"},options:e}])).busy=!1,n.queue=[],n.busySince=-1,n.afterEmpty=void 0,n.start(),Lr(n,n)}return Cr(t,e),Sr(t,[{key:"stop",value:function(){this.interval&&(clearInterval(this.interval),this.interval=void 0,this.busy=!1,this.busySince=-1)}},{key:"start",value:function(){this.stop(),this.interval=setInterval(this.checkQueue.bind(this),this.QUEUE_CHECK_INTERVAL)}},{key:"checkQueue",value:function(){var e=this;if(this.isEmpty()||this.isBusy()){if(!this.isBusy()&&this.afterEmpty){let e=this.afterEmpty;this.afterEmpty=void 0,e()}}else this.setBusy().runNext().then(this.setFree.bind(this)).catch(function(t){e.error&&e.error(t),e.setFree()})}},{key:"addToQueue",value:function(e){this.queue.push(e)}},{key:"runNext",value:function(){let e=this.queue.map(function(e){return e.title}).join(", ");this.debug&&this.debug(`tasks [${e}]`);let t=this.queue.shift();return Qr.isFunc(t.action)?Qr.isFunc(t.resolve)?t.action().then(t.resolve):(this.error&&this.error("В задании нет возвратной части, resolve не функция",t.title),t.action()):(this.error&&this.error("В задании нет исполнимой части, action не функция",t.title),Promise.resolve())}},{key:"isBusy",value:function(){let e=!!this.busy,n=Date.now()/1e3;return!!(e&&this.busySince>-1)&&(!(n-this.busySince>t.MAX_BUSY_TIME)||(this.setFree(),!1))}},{key:"setBusy",value:function(){return this.busy=!0,this.busySince=Date.now()/1e3,this}},{key:"setFree",value:function(){return this.busy=!1,this.busySince=-1,this}},{key:"isEmpty",value:function(){return 0===this.queue.length}},{key:"run",value:function(e,t=void 0,n=""){var i=this;return t&&void 0===this.afterEmpty&&(this.afterEmpty=t),new Promise(function(t,r){try{i.addToQueue({action:e,resolve:t,title:n})}catch(e){i.error&&i.error(e),r(e)}})}},{key:"actionIsQueued",value:function(e){return this.queue.some(function(t){return t.title==e})}},{key:"runIfNotQueued",value:function(e,t=void 0,n=""){return this.actionIsQueued(n)?Promise.resolve():this.run(e,t,n)}}])}(Fu);Ir(Ru,"QUEUE_CHECK_INTERVAL",100),Ir(Ru,"MAX_BUSY_TIME",300);let Du=function(e){function t(e){var n;return kr(this,t),(n=mr(this,t,[{options:e,working:{name:e.name?e.name:"APIConnection"}}])).online=null,n.run(),Lr(n,n)}return Cr(t,e),Sr(t,[{key:"run",value:function(){this.int=window.setInterval(this.check.bind(this),1e3)}},{key:"pause",value:function(){window.clearInterval(this.int)}},{key:"resume",value:function(){this.run()}},{key:"isOnline",value:function(){return window.navigator.onLine}},{key:"check",value:function(){let e=this.isOnline();null!==this.online&&this.online!==e&&this.changeState(e),this.online=e}},{key:"changeState",value:function(e=!1){e?this.emit("online"):this.emit("offline")}}])}(Fu);Ir(Du,"int",void 0),Ir(Du,"online",void 0);var ju=Object.freeze({__proto__:null,notAPIConnection:Du,notAPIOptions:{rps:50,protocol:"http",host:"localhost",port:9e3},notAPIQueue:Ru});const Wu={};function Bu(e){return Qr.objHas(Wu,e)}var Vu=Object.freeze({__proto__:null,create:function(e,t={raw:[],filtered:[],selected:{}}){if(!Bu(e)){if(!(Object.keys(t).length>0))throw new Error("store's props wasn't specified");Wu[e]={},Object.keys(t).forEach(function(n){Wu[e][n]=Gi(t[n])})}return Wu[e]},fake:function(e){return{subscribe:t=>(t(e),function(){}),set(){}}},get:function(e){return!!Bu(e)&&Wu[e]}}),zu=new WeakMap,qu=new WeakMap,Hu=new WeakMap,Gu=new WeakMap,Ku=new WeakMap;let Ju=function(){return Sr(function e(t,n,i={},r=!1,o=!1){kr(this,e),_r(this,zu,De(Ge({}))),_r(this,qu,void 0),_r(this,Hu,void 0),_r(this,Gu,!1),_r(this,Ku,void 0),wr(Hu,this,t),wr(Ku,this,n),"object"==typeof i&&Be(br(zu,this),i,!0),wr(Gu,this,r),o||this.render(n)},[{key:"render",value:function(e){const t=e||br(Ku,this);if(br(Gu,this)&&e){const e=document.createDocumentFragment();wr(qu,this,Un(br(Hu,this),{target:e,props:an(br(zu,this))})),t.replaceWith(e)}else wr(qu,this,Un(br(Hu,this),{target:t,props:an(br(zu,this))}))}},{key:"$on",value:function(e,t){return this.on(e,t)}},{key:"on",value:function(e,t){return an(br(zu,this))[e]=t,this}},{key:"$off",value:function(e){return this.off(e)}},{key:"off",value:function(e){return delete an(br(zu,this))[e],this}},{key:"$set",value:function(e,t){return this.set(e,t)}},{key:"set",value:function(e,t){return qr.set(e,an(br(zu,this)),{},t),this}},{key:"changeProp",value:function(e,t){return this.set(e,t(this.get(e))),this}},{key:"replaceProps",value:function(e){var t=this;const n=[];return Object.keys(an(br(zu,this))).forEach(function(n){Object.hasOwn(e)?an(br(zu,t))[n]=e[n]:delete an(br(zu,t))[n]}),Object.keys(e).forEach(function(i){n.includes(i)||(an(br(zu,t))[i]=e[i])}),this}},{key:"$get",value:function(e){return this.get(e)}},{key:"get",value:function(e){return qr.get(e,an(br(zu,this)))}},{key:"props",get:function(){return H(an(br(zu,this)))}},{key:"$destroy",value:function(){return this.destroy()}},{key:"destroy",value:function(){return br(qu,this)&&(jn(br(qu,this)),wr(qu,this,void 0)),Be(br(zu,this),void 0),wr(Hu,this,void 0),this}},{key:"exec",value:function(e,t=[]){return br(qu,this)&&e&&br(qu,this)[e]?br(qu,this)[e](...t):void 0}}])}();const Yu=Symbol("interface"),Qu=["getActionsCount","getActions","setFindBy","resetFilter","setFilter","getFilter","setSorter","getSorter","resetSorter","setPageNumber","setPageSize","setPager","setReturn","setSearch","getSearch","resetSearch","resetPager","getPager","addFormFieldType","addFormField","getFieldTypes","getActionFormFields"],Xu=["_id","id","ID"],Zu={},ec={};let tc=function(e){function t(e,n){var i;return kr(this,t),(i=mr(this,t,[{working:{name:"network interface for: "+(e.model?e.model:"unknown"),filter:Zu,search:"",return:ec,pager:{size:10,page:0}},options:n}])).manifest=e,i.initActions(),Lr(i,i)}return Cr(t,e),Sr(t,[{key:"initActions",value:function(){if(this.getActionsCount()>0){let e=this.getActions();for(let t in e)this.initAction(t)}}},{key:"initAction",value:function(e){var t=this;Qr.objHas(this,"$"+e)||(this["$"+e]=function(n,i,r=!1,o){return t.request(t,e,n,i,r,o)})}},{key:"requestHTTP",value:function(e,t,n,i={},r=!1,o){try{let s=Object.assign({},e.getData&&"function"==typeof e.getData?e.getData():e,n),a=this.getActionData(t),l=this.collectRequestData(a),u=this.encodeRequest(l),c=this.getServerURL(),d=this.getURL(s,a,t),f={};if(r){d=this.getURL(n,a,t);const e=new FormData;e.append("file",o),f.body=e}else-1===["OPTIONS","GET"].indexOf(a.method.toUpperCase())&&(f={method:a.method,body:JSON.stringify(e.getData&&"function"==typeof e.getData?e.getData():e),headers:{Accept:"application/json","Content-Type":"application/json"}});return f.method=a.method.toUpperCase(),i&&Object.keys(i).length&&(f.headers=i),fetch(c+d+u,f).then(function(e){return e.json()})}catch(e){Qr.error(e),Qr.report(e)}}},{key:"requestWS",value:function(e,t){try{let n=this.getActionData(t),i=this.collectRequestData(n);const r=Qr.getApp().getWSClient(),o=this.getWSRequestName(t),s=Object.assign({},i,e.getData());return Qr.objHas(n,"type")&&"string"==typeof n.type&&n.type.length&&"request"!==n.type?r.message(n.type,o,s).then(function(e){return e.payload}):r.request(o,s).then(function(e){return e.payload})}catch(e){Qr.error(e),Qr.report(e)}}},{key:"request",value:function(){let e=this.getActionData(arguments[1]);switch(this.selectTransport(e)){case"ws":return this.requestWS(...arguments);case"http":return this.requestHTTP(...arguments);default:throw new Error("Offline")}}},{key:"wsIsUp",value:function(e){if(!0===e.ws){let t;if(t=Qr.objHas(e,"wsClient")&&e.wsClient?Qr.getApp().getWSClient(e.wsClient):Qr.getApp().getWSClient(),t)return!0}return!1}},{key:"selectTransport",value:function(e){return this.wsIsUp(e)?"ws":!!Qr.objHas(e,"method")&&"http"}},{key:"getModelName",value:function(){return this&&this.manifest?this.manifest.model:null}},{key:"getActionData",value:function(e){return this.getActions()&&this.getActions()[e]?this.getActions()[e]:null}},{key:"getActionsCount",value:function(){return this.getActions()?Object.keys(this.getActions()).length:0}},{key:"getActions",value:function(){return this.manifest&&this.manifest.actions?this.manifest.actions:{}}},{key:"parseParams",value:function(e,t,n,i){let r="",o=e.length;for(;n.indexOf(e)>-1;){let s=n.indexOf(e),a=s+o,l=n.indexOf(t);if(s>l)break;if(r=n.slice(a,l),""==r)break;this.log&&this.log(e+r+t,qr.get(r,i)),n=n.replace(e+r+t,qr.get(r,i))}return n}},{key:"parseLine",value:function(e,t,n){return e=(e=e.replace(":modelName",this.manifest.model)).replace(":actionName",n),e=this.parseParams(":record[","]",e,t),e=this.parseParams(":","?",e,t)}},{key:"getURL",value:function(e,t,n){return this.parseLine(this.manifest.url,e,n)+(Qr.objHas(t,"postFix")?this.parseLine(t.postFix,e,n):"")}},{key:"getServerURL",value:function(){return Qr.getApp()?Qr.getApp().getOptions("api.server.url",""):""}},{key:"getWSRequestName",value:function(e){return`${this.manifest.model}//${e}`}},{key:"encodeRequest",value:function(e){let t="?";for(let n in e)void 0!==e[n]&&null!==e[n]&&(t+=encodeURIComponent(n)+"="+encodeURIComponent(e[n].constructor===Object?JSON.stringify(e[n]):e[n])+"&");return this.getOptions("test")&&(t+="&test=1",this.getOptions("test.session")&&(t+="&session="+this.getOptions("test.session")),this.getOptions("test.session")&&(t+="&role="+this.getOptions("test.role"))),t}},{key:"collectRequestData",value:function(e){let t={};if(Qr.objHas(e,"data")&&Array.isArray(e.data))for(let n=0;n<e.data.length;n++){let i="get"+Qr.capitalizeFirstLetter(e.data[n]);if(this[i]&&"function"==typeof this[i]){let r=this[i](),o={};["pager","sorter","filter","search","return"].indexOf(e.data[n])>-1?o[e.data[n]]=r:o=r,t=Object.assign(t,o)}}return t}},{key:"getID",value:function(e,t){let n,i=Xu,r=["",this.manifest.model];Qr.objHas(t,"index")&&t.index&&(i=[t.index].concat(Xu));for(let t of r)for(let r of i)if(Qr.objHas(e,t+r)){n=e[t+r];break}return n}},{key:"setFindBy",value:function(e,t){var n={};return n[e]=t,this.setFilter(n)}},{key:"setFilter",value:function(e=Zu){return this.setWorking("filter",e),this}},{key:"resetFilter",value:function(){return this.setFilter()}},{key:"getFilter",value:function(){return this.getWorking("filter")}},{key:"setSearch",value:function(e=""){return this.setWorking("search",e),this}},{key:"resetSearch",value:function(){return this.setSearch()}},{key:"getSearch",value:function(){return this.getWorking("search")}},{key:"setSorter",value:function(e){return this.setWorking("sorter",e),this}},{key:"resetSorter",value:function(){return this.setSorter({})}},{key:"getSorter",value:function(){return this.getWorking("sorter")}},{key:"setReturn",value:function(e=ec){return this.setWorking("return",e),this}},{key:"resetReturn",value:function(){return this.setReturn({})}},{key:"getReturn",value:function(){return this.getWorking("return")}},{key:"setPageNumber",value:function(e){return this.setWorking("pager.page",e),this}},{key:"setPageSize",value:function(e){return this.setWorking("pager.size",e),this}},{key:"setPager",value:function(){if((arguments.length<2||isNaN(arguments[0])||isNaN(arguments[1]))&&arguments[0]&&"object"==typeof arguments[0]&&Qr.objHas(arguments[0],"page")&&Qr.objHas(arguments[0],"size")){const e=arguments[0];this.setWorking("pager",{size:e.size||10,page:e.page||0})}else 2!==arguments.length||isNaN(arguments[0])||isNaN(arguments[1])||this.setWorking("pager",{size:arguments[0]||10,page:arguments[1]||0});return this}},{key:"resetPager",value:function(){return this.setPager()}},{key:"getPager",value:function(){return this.getWorking("pager")}},{key:"getRecord",value:function(){this.getData()}},{key:"getDefaultAsPlainObject",value:function(){if(!this.manifest||!this.manifest.fields)return{};const e={};for(const t of Object.keys(this.manifest.fields))if(Object.hasOwn(this.manifest.fields[t],"default")){const n=this.manifest.fields[t].default;Array.isArray(n)?e[t]=[...n]:e[t]="object"==typeof n?{...n}:n}return e}}])}(Fu),nc=function(e){function t(e,n){var i;return kr(this,t),i=mr(this,t),null==n||"object"!=typeof n?Lr(i,n):n&&n.isProxy?(Qr.error("this is Proxy item"),Lr(i,n)):n&&(n.isRecord||n.isProperty)?Lr(i,n):Array.isArray(n)?Lr(i,i.createCollection(e,n)):(i.setOptions({}),i[Yu]=new tc(e,{}),i.setData(n),i.interfaceUp(),i.mapToInterface(),i.mapToMethods(),Lr(i,i))}return Cr(t,e),Sr(t,[{key:"toDefault",value:function(){return this.setData(this[Yu].getDefaultAsPlainObject())}},{key:"mapToInterface",value:function(){let e=this;for(let t of Qu)this[Yu][t]&&"function"==typeof this[Yu][t]&&(this[t]=function(){let n=e[Yu][t](...arguments);return n==e[Yu]?e:n})}},{key:"mapToMethods",value:function(){let e=this[Yu].manifest,t=Qr.getApp(),n={};if(e.methods?n=e.methods:t&&(n=t.getOptions(["models",this[Yu].manifest.model].join("."),{})),n)for(let e in n)Object.hasOwn(n,e)&&(this[e]=n[e])}},{key:"createCollection",value:function(e,n){for(var i=[],r=0;r<n.length;r++)i.push(new t(e,n[r]));return i}},{key:"interfaceUp",value:function(){if(this[Yu].getActionsCount()>0){let e=this[Yu].getActions();for(let t in e)this.actionUp(t,e[t])}}},{key:"actionUp",value:function(e){var t=this;Object.hasOwn(this,["$"+e])||(this["$"+e]=function(...n){return t[Yu].request(t,e,...n)})}},{key:"setAttr",value:function(e,t){return this.setData(e,t)}},{key:"setAttrs",value:function(e){if(e&&"object"==typeof e&&Object.keys(e).length>0)for(let t in e)this.setAttr(t,e[t])}},{key:"getAttr",value:function(e,t=!1){let n=this.getData(e,{});return t?Qr.stripProxy(n):n}},{key:"getAttrs",value:function(e){let t=[];if(e&&e.length>0)for(let n of e)t.push(this.getAttr(n));return t}},{key:"getManifest",value:function(){return this[Yu]?this[Yu].manifest:{}}},{key:"setItem",value:function(e){return this.setData(e),this}}])}(Fu);const ic="main";let rc=function(e){function t(e){var n;return kr(this,t),n=mr(this,t,[{working:{name:e.name,interfaces:{},controllers:Qr.objHas(e,"controllers")?e.controllers:{},initController:null,currentController:null,uis:{},wsc:{},wss:{},services:{}},options:e}]),n?.log&&n.log("start app"),Qr.register("app",n),n.initManifest(),Lr(n,n)}return Cr(t,e),Sr(t,[{key:"initManifest",value:function(){var e=this;Qr.getJSON(this.getOptions("manifestURL")).then(function(t){return e.setInterfaceManifest(t)}).catch(function(e){return Qr.report(e)})}},{key:"initRouter",value:function(){this.setWorking("router",Uu),this.getWorking("router").setRoot(this.getOptions("router.root")),Uu.reRouteExisted()}},{key:"execRouter",value:function(){var e={};for(let t=0;t<this.getOptions("router.manifest").length;t++){let n=this.getOptions("router.manifest")[t],i=n.paths,r=n.schemes,o=n.controller;for(let t=0;t<i.length;t++){let n=!!(r&&Array.isArray(r)&&r.length>t)&&r[t];e[i[t]]=this.bindController(o,n)}}this.getWorking("router").addList(e).listen()}},{key:"setInterfaceManifest",value:function(e){Object.freeze(e),this.setOptions("interfaceManifest",e),this.initRouter(),this.update()}},{key:"getInterfaceManifest",value:function(e){return e?this.getOptions("interfaceManifest")[e]:this.getOptions("interfaceManifest")}},{key:"update",value:function(){this.updateInterfaces(),this.initController(),this.startApp()}},{key:"startApp",value:function(){this.initServices(),this.execRouter(),this.emit("onAfterStarted",this)}},{key:"bindController",value:function(e,t){let n=this;return function(){new e(n,arguments,t)}}},{key:"initController",value:function(){if(void 0!==this.getOptions("initController")){let e=this.getOptions("initController");this.setWorking("initController",new e(this))}}},{key:"getCurrentController",value:function(){return this.getWorking("currentController")}},{key:"setCurrentController",value:function(e){let t=this.getCurrentController();return t&&t.destroy&&t.destroy(),this.setWorking("currentController",e),this}},{key:"createInterfaceModelFactory",value:function(e){return function(t){return new nc(e,t)}}},{key:"updateInterfaces",value:function(){this.clearInterfaces();let e=this.getOptions("interfaceManifest");if(e)for(let t in e){let n=e[t],i=this.getOptions(["models",t].join("."),{});n.methods=i;const r=this.createInterfaceModelFactory(n);this.setInterface(t,r)}}},{key:"getRecordName",value:function(e){return"nr"+Qr.capitalizeFirstLetter(e)}},{key:"getControllerName",value:function(e){return"nc"+Qr.capitalizeFirstLetter(e)}},{key:"setInterface",value:function(e,t){return this.setWorking(`interfaces.${e}`,t)}},{key:"getInterfaces",value:function(){return this.getWorking("interfaces")}},{key:"clearInterfaces",value:function(){return this.setWorking("interfaces",{}),this}},{key:"setWSClient",value:function(e=ic,t){return this.setWorking(`wsc.${e}`,t)}},{key:"getWSClient",value:function(e=ic){return this.getWorking(`wsc.${e}`)}},{key:"getInterface",value:function(e){return this.getInterfaces()[e]}},{key:"getModel",value:function(e,t={}){return this.getInterface(e)(t)}},{key:"setService",value:function(e,t){return this.setWorking(`services.${e}`,t)}},{key:"getService",value:function(e){return this.getWorking(`services.${e}`)}},{key:"initServices",value:function(){if(this.getOptions("services"))for(let e in this.getOptions("services"))try{let t=this.getOptions(`services.${e}`);switch(Qr.detectType(t)){case"function":case"class":this.setService(e,new t(this));break;default:this.setService(e,t)}}catch(t){this?.error&&this.error(`Service (${e}) init error`,t)}}},{key:"getConfigReaderForModule",value:function(e=""){var t=this;const n=["modules",e].join(".");return{get:function(e,i){return e&&"string"==typeof e&&e.length?t.getOptions([n,e].join("."),i):t.getOptions(n,i)}}}},{key:"moduleConfig",value:function(e=""){return this.getConfigReaderForModule(e)}}])}(Fu);Ir(rc,"DEFAULT_WS_CLIENT_NAME",ic);const oc="default",sc="main";let ac=function(e){function t(e,n){var i;kr(this,t),Ir(i=mr(this,t,[{}]),"els",void 0),Ir(i,"make",void 0),Ir(i,"app",void 0),i.app=e,i.app.setCurrentController(i),i.setWorking({name:n,ready:!1,views:{},libs:{},helpers:{}}),i.ui={},i.els={},i.setData({}),i.setOptions({moduleName:sc,containerSelector:"main.content",prefix:e.getOptions("paths.module"),names:{plural:"Models",single:"Model"}}),i.setURLPrefix(e.getOptions("router.root"));let r=e.getInterfaces();i.make={};for(let e in r)Object.hasOwn(r,e)&&(i.make[e]=r[e]);return i.on("ondestroy",function(){i.app=null;for(let e in i.ui)i.ui[e].destroy&&i.ui[e].destroy(),i.ui[e].$destroy&&i.ui[e].$destroy(),i.ui[e]=null;i.els=null,i.make=null}),Lr(i,i)}return Cr(t,e),Sr(t,[{key:"getApp",value:function(){return Qr.getApp()}},{key:"setModel",value:function(e){return this.setWorking("model",e),this}},{key:"getModel",value:function(e,t){if("string"==typeof e){const n=this.getInterface(e);return n&&n(t||{})}{const t=this.getInterface();return t&&t(e||{})}}},{key:"getInterface",value:function(e=""){return this.app?.getInterface(e||this.getModelName())}},{key:"getModelName",value:function(){return this.getWorking("modelName")}},{key:"setModelName",value:function(e){return this.setWorking("modelName",Qr.lowerFirstLetter(e)),this}},{key:"getModelIDFieldName",value:function(){return this.getWorking("modelIDFieldName","_id")}},{key:"setModelIDFieldName",value:function(e="_id"){return this.setWorking("modelIDFieldName",e)}},{key:"setReady",value:function(e=!0){this.setWorking("ready",e),e?this.emit("onready"):this.emit("onbusy")}},{key:"setURLPrefix",value:function(e){return this.setOptions("urlPrefix",e),this.updateAutoName(),this}},{key:"getURLPrefix",value:function(){return this.getOptions("urlPrefix")}},{key:"setModuleName",value:function(e){return this.setOptions("moduleName",Qr.lowerFirstLetter(e)),this.updateAutoName(),this}},{key:"getModuleName",value:function(){return this.getOptions("moduleName")}},{key:"getModulePrefix",value:function(){return[Qr.getApp().getOptions("paths.modules"),this.getModuleName()].join("/")}},{key:"getModelURL",value:function(){return Qr.buildURL({prefix:this.getURLPrefix(),module:this.getModuleName(),model:this.getModelName()})}},{key:"getModelActionURL",value:function(e,t=""){return Qr.buildURL({prefix:this.getURLPrefix(),module:this.getModuleName(),model:this.getModelName(),id:e,action:t})}},{key:"buildURL",value:function(e){return Qr.buildURL(e)}},{key:"updateAutoName",value:function(){return this.getOptions("autoName",true),this}},{key:"setName",value:function(e){return this.setWorking("name",e),this.setOptions("autoName",!1),this}},{key:"getName",value:function(){return this.getWorking("name")}},{key:"preloadLib",value:function(e={}){var t=this;return new Promise(function(n,i){if("object"!=typeof e)n(void 0);else{t.setWorking("loading",[]);for(let r in e)t.getWorking("loading").push(e[r]),t.make[e[r]]({}).$listAll().then(function(i){t.getOptions("libs")||t.setOptions("libs",{}),t.getOptions("libs")[r]=i,t.getWorking("loading").indexOf(e[r])>-1&&t.getWorking("loading").splice(t.getWorking("loading").indexOf(e[r]),1),0===t.getWorking("loading").length&&n(void 0)}).catch(function(e){t.report(e),i()});0===t.getWorking("loading").length&&n(void 0)}})}},{key:"onAfterRender",value:function(){this.emit("onAfterRender")}},{key:"getActionName",value:function(e=oc){return"run"+Qr.capitalizeFirstLetter(e)}},{key:"getDefaultActionName",value:function(){return this.getActionName(this.getOptions("defaultAction",oc))}},{key:"route",value:function(e){let[t,...n]=e,i=this.getActionName(t||oc);"function"==typeof this[i]?(this.setCurrentAction(i),this[i](n)):this[this.getDefaultActionName()]?(this.setCurrentAction(this.getDefaultActionName()),this[this.getDefaultActionName()](n)):(this.setCurrentAction(void 0),this.error&&this.error("No action in router",e))}},{key:"setCurrentAction",value:function(e){this.setWorking("action",e)}},{key:"getCurrentAction",value:function(){return this.getWorking("action")}},{key:"getAppOptions",value:function(){try{return this.getApp().getOptions()}catch(e){this.error&&this.error(e)}}},{key:"getModuleOptions",value:function(e){try{return this.getApp().getOptions(["modules",e||this.getModuleName()].join("."))}catch(e){this.error&&this.error(e)}}},{key:"getServices",value:function(e){try{return this.getApp().getOptions(["services",e||this.getModuleName()].join("."))}catch(e){this.error&&this.error(e)}}},{key:"getComponents",value:function(e){try{return this.getApp().getOptions(["components",e||this.getModuleName()].join("."))}catch(e){this.error&&this.error(e)}}},{key:"refresh",value:function(e=0){this.app?.getWorking("router").refresh(e)}},{key:"getRouter",value:function(){return this.app?.getWorking("router")}},{key:"navigateWithDelay",value:function(e,t=1500,n=function(){}){return this.getRouter().navigateWithDelay(e,t,n)}},{key:"navigate",value:function(e){return this.getRouter().navigate(e)}},{key:"navigateAction",value:function(e,t="",n=0,i=function(){}){return this.navigateModuleAction(this.getModuleName(),this.getModelName(),e,t,n,i)}},{key:"navigateModelAction",value:function(e,t,n="",i=0,r=function(){}){return this.navigateModuleAction(this.getModuleName(),e,t,n,i,r)}},{key:"navigateModuleAction",value:function(e,t,n,i="",r=0,o=function(){}){return r?this.getRouter().navigateWithDelay(Qr.buildURL({prefix:this.getURLPrefix(),module:e,model:t,id:n,action:i}),r,o):this.getRouter().navigate(Qr.buildURL({prefix:this.getURLPrefix(),module:e,model:t,id:n,action:i}))}}],[{key:"MODULE_NAME",get:function(){return sc}},{key:"MODEL_NAME",get:function(){return"ModelName"}},{key:"LABELS",get:function(){return{plural:`${sc}:model_label_plural`,single:`${sc}:model_label_single`}}},{key:"getControllerRoute",value:function(e=0){let t=[];this.MODULE_NAME&&this.MODULE_NAME.length>0&&t.push(Qr.lowerFirstLetter(this.MODULE_NAME)),this.MODEL_NAME&&this.MODEL_NAME.length>0&&t.push(Qr.lowerFirstLetter(this.MODEL_NAME)),t=[t.join("/")];for(let n=0;n<e;n++)t.push("/([^/]+)");return t.join("")}},{key:"getControllerRoutes",value:function(e=0){let t=[this.getControllerRoute(0)];for(let n=0;n<e;n++)t.unshift(this.getControllerRoute(n+1));return t}},{key:"getRoutes",value:function(){return{paths:this.getControllerRoutes(this.PARAMS_LENGTH),controller:this}}},{key:"getCommonMenu",value:function(e){return[{section:e.MODULE_NAME,title:e.LABELS.plural,url:`/${Qr.lowerFirstLetter(e.MODULE_NAME)}/${Qr.lowerFirstLetter(e.MODEL_NAME)}`}]}},{key:"getMenu",value:function(){}}])}(Fu);Ir(ac,"PARAMS_LENGTH",2);var lc=On('<input type="checkbox"/> <label class="label"></label>',1);yn(["input"]);var uc=On("<a> </a>"),cc=On('<div class="mx-1 tags has-addons svelte-1557h41"><span class="tag"> </span> <span><!></span></div>'),dc=On("<a> </a>"),fc=On("<span><!></span>");var hc=On("<td><!></td>");function gc(e,t){Z(t,!0);const[n,i]=Qi();let r=De("");Vn(()=>{void 0===s().type&&(Object.hasOwn(s(),"titlePath")?Be(r,qr.get(s().titlePath,a(),l()),!0):Object.hasOwn(s(),"titleComposer")&&"function"==typeof s().titleComposer?Be(r,s().titleComposer(a(),l()),!0):Be(r,qr.get(s().path,a(),l()),!0))});let o=rr(t,"getItemId",3,e=>e._id),s=rr(t,"field",19,()=>({})),a=rr(t,"item",19,()=>({})),l=rr(t,"helpers",19,()=>({}));var u=hc(),c=it(u),d=e=>{{let t=Le(()=>qr.get(s().path,a(),l()));xa(e,{get values(){return an(t)}})}},f=e=>{var t=Sn(),i=rt(t),r=e=>{{let t=Le(()=>qr.get(s().path,a(),l()));Po(e,{get values(){return an(t)}})}},u=e=>{var t=Sn(),i=rt(t),r=e=>{{let t=Le(()=>qr.get(s().path,a(),l()));nu(e,{get values(){return an(t)}})}},u=e=>{var t=Sn(),i=rt(t),r=e=>{{let t=Le(()=>qr.get(s().path,a(),l()));oo(e,{get values(){return an(t)}})}},u=e=>{var t=Sn(),i=rt(t),r=e=>{{let t=Le(()=>qr.get(s().path,a(),l()));!function(e,t){let n=rr(t,"values",19,()=>[]);var i=Sn();Qn(rt(i),17,n,e=>e.id,(e,t)=>{var n=Sn(),i=rt(n),r=e=>{var n=cc(),i=it(n),r=it(i),o=ot(i,2),s=it(o),a=e=>{var n=uc(),i=it(n);kt(()=>{Oi(n,"href",an(t).href),di(n,1,ai(an(t).urlCustomClasses),"svelte-1557h41"),Pn(i,an(t).value)}),In(e,n)},l=e=>{var n=$n();kt(()=>Pn(n,an(t).value)),In(e,n)};Gn(s,e=>{an(t).href?e(a):e(l,!1)}),kt(()=>{Pn(r,an(t).title),di(o,1,`tag is-${an(t).color??""} ${an(t).customClasses??""}`,"svelte-1557h41")}),In(e,n)},o=e=>{var n=fc(),i=it(n),r=e=>{var n=dc(),i=it(n);kt(()=>{Oi(n,"href",an(t).href),di(n,1,ai(an(t).urlCustomClasses),"svelte-1557h41"),Pn(i,an(t).title)}),In(e,n)},o=e=>{var n=$n();kt(()=>Pn(n,an(t).title)),In(e,n)};Gn(i,e=>{an(t).href?e(r):e(o,!1)}),kt(()=>di(n,1,`mx-1 tag is-${an(t).color??""} ${an(t).customClasses??""}`,"svelte-1557h41")),In(e,n)};Gn(i,e=>{Object.hasOwn(an(t),"value")?e(r):e(o,!1)}),In(e,n)}),In(e,i)}(e,{get values(){return an(t)}})}},u=e=>{var t=Sn(),i=rt(t),r=e=>{{let t=Le(()=>o()(a())),n=Le(()=>qr.get(s().path,a(),l()));!function(e,t){Z(t,!0);let n=rr(t,"id",3,""),i=rr(t,"value",15,!1),r=rr(t,"fieldname",3,"switch"),o=rr(t,"disabled",3,!1),s=rr(t,"readonly",3,!1),a=rr(t,"styling",3," is-rounded is-success "),l=rr(t,"onchange",3,()=>{});var u=lc(),c=rt(u);c.__input=function(e){let t={id:n(),field:r(),value:"checkbox"===e.target.type?e.target.checked:e.target.value};return l()(t),!0};var d=ot(c,2);kt(()=>{di(c,1,`switch ${a()??""}`),Oi(c,"id",`edit-table-row-cell-inline-switch-${r()??""}-${n()??""}`),Oi(c,"name",r()),c.readOnly=s(),c.disabled=o(),Oi(d,"for",`edit-table-row-cell-inline-switch-${r()??""}-${n()??""}`)}),Ui(c,i),In(e,u),ee()}(e,{get id(){return an(t)},get fieldname(){return s().path},get onchange(){return s().onChange},get value(){return an(n)},get disabled(){return s().disabled},get readonly(){return s().readonly}})}},u=e=>{var t=Sn(),i=rt(t),r=e=>{var t=Sn(),n=rt(t);{let e=Le(()=>o()(a())),t=Le(()=>qr.get(s().path,a(),l()));ri(n,()=>s().component,(n,i)=>{i(n,ir({get id(){return an(e)},get onchange(){return s().onChange},get fieldname(){return s().path},get disabled(){return s().disabled},get readonly(){return s().readonly},get value(){return an(t)}},()=>s().options))})}In(e,t)},u=e=>{var t=Sn(),i=rt(t),r=e=>{var t=$n();kt(e=>Pn(t,e),[()=>Qr.strLengthCap(qr.get(s().path,a(),l()),s().maxLength)]),In(e,t)},o=e=>{var t=$n();kt(e=>Pn(t,e),[()=>Yi(pr,"$LOCALE",n)[qr.get(s().path,a(),l())]]),In(e,t)};Gn(i,e=>{s()&&void 0!==s()&&!isNaN(s().maxLength)&&s().maxLength?e(r):e(o,!1)},!0),In(e,t)};Gn(i,e=>{s().component?e(r):e(u,!1)},!0),In(e,t)};Gn(i,e=>{"switch"===s().type?e(r):e(u,!1)},!0),In(e,t)};Gn(i,e=>{"tag"===s().type?e(r):e(u,!1)},!0),In(e,t)};Gn(i,e=>{"boolean"===s().type?e(r):e(u,!1)},!0),In(e,t)};Gn(i,e=>{"image"===s().type?e(r):e(u,!1)},!0),In(e,t)};Gn(i,e=>{"button"===s().type?e(r):e(u,!1)},!0),In(e,t)};Gn(c,e=>{"link"===s().type?e(d):e(f,!1)}),kt(()=>{di(u,1,(s().hideOnMobile?" is-hidden-touch ":"")+(s().classes?` ${s().classes} `:"")),Oi(u,"title",an(r))}),In(e,u),ee(),i()}var pc=On('<td><input type="checkbox" placeholder=""/></td>'),vc=On("<tr><!><!></tr>");function mc(e,t){Z(t,!0);let n=De(void 0);Vn(()=>{Be(n,l()(i()),!0)});let i=rr(t,"item",19,()=>({})),r=rr(t,"helpers",19,()=>({})),o=rr(t,"fields",19,()=>[]),s=rr(t,"showSelect",3,!1),a=rr(t,"isSelected",3,!1),l=rr(t,"getItemId",3,()=>{}),u=rr(t,"onRowSelectChange",3,()=>{});function c(e){return e.preventDefault(),u()({id:an(n),selected:e.currentTraget.checked}),!1}var d=vc(),f=it(d),h=e=>{var t=pc(),n=it(t);n.__change=c,kt((e,t,i)=>{Oi(n,"id",`table-row-select-${e??""}`),Oi(n,"data-id",t),_i(n,a()),Oi(n,"name",`row_selected_${i??""}`)},[()=>l()(i()),()=>l()(i()),()=>l()(i())]),In(e,t)};Gn(f,e=>{s()&&e(h)}),Qn(ot(f),17,o,Yn,(e,t)=>{gc(e,{get field(){return an(t)},get helpers(){return r()},get item(){return i()},get getItemId(){return l()}})}),In(e,d),ee()}yn(["change"]);var yc=On('<div class="field is-grouped"><!></div>'),kc=On('<div class="field is-grouped"><!></div>'),bc=On('<div class="field"><div class="control"><input class="input" type="text" placeholder="Поиск"/></div></div>'),_c=On('<th><input type="checkbox" id="table-row-select-page" placeholder="" name="row_selected_all"/></th>'),wc=On("<th><!></th>"),Oc=On('<a href="" class="pagination-previous">Назад</a>'),$c=On('<a href="" class="pagination-next">Вперед</a>'),Sc=On('<a href="" class="pagination-link is-current" aria-current="page"> </a>'),Ic=On('<a href="" class="pagination-link"> </a>'),Ac=On("<li><!></li>"),Cc=On('<nav class="pagination is-centered" aria-label="pagination"><!> <!> <ul class="pagination-list"><!></ul></nav>'),Ec=On('<table class="table"><thead><!><!></thead><tbody></tbody></table> <!>',1),Lc=On("<!> <!> <!> <!>",1);yn(["input","change","click"]);const Tc="__dublicate__",xc={},Fc=!1,Nc="listAndCount",Mc="count",Pc="preprocessor",Uc={ui:function(e,t){Z(t,!0);const[n,i]=Qi();let r=rr(t,"helpers",19,()=>({})),o=rr(t,"filter",19,()=>({})),s=rr(t,"sorter",23,()=>({})),a=rr(t,"fields",19,()=>[]),l=rr(t,"selected",23,()=>({})),u=rr(t,"items",19,()=>[]),c=rr(t,"state",19,()=>({})),d=rr(t,"actions",19,()=>[]),f=rr(t,"links",19,()=>[]),h=rr(t,"search",3,""),g=rr(t,"showSearch",3,!0),p=rr(t,"showSelect",3,!0),v=rr(t,"selectAll",7,!1),m=rr(t,"getItemId",3,e=>e._id),y=rr(t,"onRowSelectChange",3,()=>{}),k=rr(t,"onRowCellChange",3,()=>{}),b=rr(t,"onSelectAll",3,()=>{}),_=rr(t,"onSelectNone",3,()=>{}),w=rr(t,"onSearchChange",3,()=>{}),O=rr(t,"onFilterChange",3,()=>{}),$=rr(t,"onSorterChange",3,()=>{}),S=rr(t,"onGoToPage",3,()=>{}),I=rr(t,"onGoToPrevPage",3,()=>{}),A=rr(t,"onGoToNextPage",3,()=>{});function C(e){try{let t=e.currentTarget.value.trim();w()(t)}catch(e){return}}function E(e){try{w()(e)}catch(e){return}}function L(e){try{O()(e)}catch(e){return}}function T(e){e.preventDefault();let t=e.target;return S()(parseInt(t.dataset.page)),!1}function x(){u().forEach(e=>{l()[m()(e)]=v()}),v()?b()(l()):_()(l())}function F(e){l()[e.id]=e.selected,y()(e)}function N(e){return t=>(t.preventDefault(),e(t))}var M=Lc(),P=rt(M),U=e=>{var t=yc();xa(it(t),{get values(){return f()}}),In(e,t)};Gn(P,e=>{f().length&&e(U)});var R=ot(P,2),D=e=>{var t=kc();Po(it(t),{get values(){return d()}}),In(e,t)};Gn(R,e=>{d().length&&e(D)});var j=ot(R,2),W=e=>{var n=Sn(),i=rt(n),r=e=>{const n=Le(()=>t.filterUI);var i=Sn();ri(rt(i),()=>an(n),(e,t)=>{t(e,{get filter(){return o()},onchange:L,onSearchChange:E})}),In(e,i)},s=e=>{var t=bc(),n=it(t),i=it(n);i.__input=C,kt(()=>bi(i,h())),In(e,t)};Gn(i,e=>{t.filterUI?e(r):e(s,!1)}),In(e,n)};Gn(j,e=>{g()&&e(W)});var B=ot(j,2),V=e=>{ho(e,{loading:!0,title:"Загрузка...",size:"container"})},z=e=>{var i=Ec(),o=rt(i),d=it(o),f=it(d),h=e=>{var t=_c(),n=it(t);n.__change=x,Ui(n,v),In(e,t)};Gn(f,e=>{p()&&e(h)}),Qn(ot(f),17,a,Yn,(e,t)=>{const i=Le(()=>an(t).path.substring(1));var r=wc();r.__click=()=>function(e){const t=e.path.substring(1);Object.hasOwn(s(),t)?s()[t]=-1*parseInt(s()[t]):s({[t]:1}),$()(s())}(an(t));var o=it(r),a=e=>{{let n=Le(()=>s()[an(i)]>0?"sort-up":"sort-down");Ql(e,{get font(){return an(n)},get title(){return an(t).title},pointable:!0})}},l=e=>{var i=$n();kt(()=>Pn(i,Yi(pr,"$LOCALE",n)[an(t).title])),In(e,i)};Gn(o,e=>{an(t).sortable&&Object.hasOwn(s(),an(i))?e(a):e(l,!1)}),kt(()=>di(r,1,(an(t).hideOnMobile?" is-hidden-touch":"")+(an(t).sortable?" is-clickable":""))),In(e,r)}),Qn(ot(d),21,u,e=>e._id,(e,n)=>{{let i=Le(()=>l()[m()(an(n))]);mc(e,{get id(){return t.id},get item(){return an(n)},get fields(){return a()},get helpers(){return r()},get showSelect(){return p()},get isSelected(){return an(i)},get getItemId(){return m()},onRowSelectChange:F,get onchange(){return k()}})}});var g=ot(o,2),y=e=>{var t=Cc(),n=it(t),i=e=>{var t=Oc(),n=Le(()=>N(I()));t.__click=function(...e){an(n)?.apply(this,e)},In(e,t)};Gn(n,e=>{c()?.pagination?.pages?.current>0&&e(i)});var r=ot(n,2),o=e=>{var t=$c(),n=Le(()=>N(A()));t.__click=function(...e){an(n)?.apply(this,e)},In(e,t)};Gn(r,e=>{c()?.pagination?.pages?.current<c()?.pagination?.pages.to&&e(o)});var s=it(ot(r,2)),a=e=>{var t=Sn();Qn(rt(t),17,()=>c()?.pagination.pages.list,e=>e.index,(e,t)=>{var n=Ac(),i=it(n),r=e=>{var n=Sc(),i=it(n);kt(()=>{Oi(n,"aria-label",`Страница ${an(t).index??""}`),Pn(i,an(t).index+1)}),In(e,n)},o=e=>{var n=Ic();n.__click=T;var i=it(n);kt(()=>{Oi(n,"aria-label",`Страница ${an(t).index??""}`),Oi(n,"data-page",an(t).index),Pn(i,an(t).index+1)}),In(e,n)};Gn(i,e=>{an(t).active?e(r):e(o,!1)}),In(e,n)}),In(e,t)};Gn(s,e=>{c()&&c()?.pagination&&c()?.pagination.pages&&c()?.pagination.pages.list&&e(a)}),In(e,t)};Gn(g,e=>{c()?.pagination?.pages?.list.length>=1&&e(y)}),In(e,i)};Gn(B,e=>{c().updating?e(V):e(z,!1)}),In(e,M),ee(),i()},links:[],actions:[],endless:!1,idField:"_id",getItemId:function(e){return e._id}};var Rc=new WeakMap,Dc=new WeakMap,jc=new WeakMap;let Wc=function(e){function t(e={}){var n;return kr(this,t),_r(n=mr(this,t),Rc,{raw:[],filtered:[],refined:[],selected:{},state:{pager:{},pagination:{items:{count:0,from:0,to:0},pages:{count:0,from:0,to:0,current:0,list:[]}}},working:{}}),_r(n,Dc,{raw:[],filtered:[],refined:[],selected:{},working:{}}),_r(n,jc,{}),n.id="table-"+Math.random(),n.options={...Uc,...e.options?e.options:{}},Qr.objHas(e,"data")&&Array.isArray(e.data)&&n.setStoreContent("raw",e.data),n.setCombinedActionName(n.getOptions("interface.combinedAction",Nc)),Qr.objHas(n.options,"filter")?n.setFilter(n.options.filter,!0):n.resetFilter(),Qr.objHas(n.options,"pager")?n.setPager(n.options.pager,!0):n.resetPager(),Qr.objHas(n.options,"sorter")?n.setSorter(n.options.sorter,!0):n.resetSorter(!0),Qr.objHas(n.options,"return")?n.setReturn(n.options.return):n.setReturn(),Qr.objHas(n.options,"search")?n.setSearch(n.options.search,!0):n.setSearch(),n.on("onStateUpdate",n.onStateUpdate.bind(n)),n.render(),n.updateData(),Lr(n,n)}return Cr(t,e),Sr(t,[{key:"setStoreContent",value:function(e,t){br(Rc,this)[e]=t,this.callStoreUpdateEvent(e,t)}},{key:"updateStore",value:function(e,t){br(Rc,this)[e]=t(br(Rc,this)[e]),this.callStoreUpdateEvent(e,br(Rc,this)[e])}},{key:"callStoreUpdateEvent",value:function(e,t){const n=`on${Qr.capitalizeFirstLetter(e)}Update`;this[n]&&this[n](t)}},{key:"onWorkingUpdate",value:function(e){return br(Dc,this).working=e,e}},{key:"onRawUpdate",value:function(e){return br(Dc,this).raw=e,e}},{key:"onFilteredUpdate",value:function(e){return br(Dc,this).filtered=e,this.refineFiltered(),e}},{key:"onRefinedUpdate",value:function(e){return br(Dc,this).refined=e,this.clearSelected(),br(jc,this)&&br(jc,this).table&&br(jc,this).table.set("items",br(Dc,this).refined),e}},{key:"onSearchChange",value:function(e){e.length>3?this.setSearch(e):this.setSearch()}},{key:"onSorterChange",value:function(e){e?this.setSorter(e):this.resetSorter()}},{key:"onFilterChange",value:function({filter:e,actionName:t}){0===t.indexOf(Nc)&&this.setCombinedActionName(t),e?this.setFilter(e):this.resetFilter()}},{key:"onSelectedUpdate",value:function(e){br(Dc,this).selected=e}},{key:"clearSelected",value:function(){br(Dc,this).selected={}}},{key:"getSelected",value:function(e=!1,t="refined"){const n=[];for(let i in br(Dc,this).selected)if(br(Dc,this).selected[i])if(e){const e=br(Dc,this)[t].findIndex(function(e){return e._id===i});e>-1&&n.push(br(Dc,this)[t][e])}else n.push(i);return n}},{key:"getItemId",value:function(e){return this.getOptions("getItemId",Uc.getItemId)(e)}},{key:"selectAll",value:function(){var e=this;br(Dc,this).filtered.forEach(function(t){br(jc,e).table.set(`selected.${e.getItemId(t)}`,!0)})}},{key:"selectNone",value:function(){var e=this;br(Dc,this).filtered.forEach(function(t){br(jc,e).table.set(`selected.${e.getItemId(t)}`,!1)})}},{key:"render",value:function(){var e=this;br(jc,this).table||(br(jc,this).table=new Ju(this.options.ui,this.options.targetEl,{id:this.id,filterUI:this.getOptions("filterUI",void 0),helpers:Object.assign({},this.getHelpers()),fields:this.getOptions("fields"),actions:this.getActions(),links:this.getLinks(),search:"",showSelect:this.getOptions("showSelect"),showSearch:this.getOptions("showSearch"),showSort:this.getOptions("showSort"),idField:this.getOptions("idField"),getItemId:this.getOptions("getItemId"),filter:this.getFilter(),items:br(Rc,this).refined,selected:br(Rc,this).selected,state:br(Rc,this).state})),br(jc,this).table.$on("onSearchChange",function(t){return e.onSearchChange(t)}),br(jc,this).table.$on("onSorterChange",function(t){return e.onSorterChange(t)}),br(jc,this).table.$on("onFilterChange",function(t){return e.onFilterChange(t)}),br(jc,this).table.$on("onGoToPage",function(t){return e.goToPage(t)}),br(jc,this).table.$on("onGoToNextPage",function(){return e.goToNext()}),br(jc,this).table.$on("onGoToPrevPage",function(){return e.goToPrev()})}},{key:"getActions",value:function(){return this.getOptions("actions",[])}},{key:"getLinks",value:function(){return this.getOptions("links",[])}},{key:"getHelpers",value:function(){return this.options.helpers||{}}},{key:"setWorking",value:function(e,t){return qr.set(e,br(Rc,this).working,this.getHelpers(),t),this.onWorkingUpdate(br(Rc,this).working),this}},{key:"getWorking",value:function(e,t){let n=qr.get(e,br(Rc,this).working,this.getHelpers());return void 0===n?t:n}},{key:"onStateUpdate",value:function(){br(jc,this).table&&br(jc,this).table.set(":state",br(Rc,this).state)}},{key:"setState",value:function(e,t){return qr.set(e,br(Rc,this).state,this.getHelpers(),t),this.emit("onStateUpdate"),this}},{key:"getState",value:function(e,t){let n=qr.get(`:${e}`,br(Rc,this).state);return void 0===n?t:n}},{key:"updateState",value:function(e){return br(Rc,this).state=e(br(Rc,this).state),this.emit("onStateUpdate"),this}},{key:"updateStateProp",value:function(e,t){return qr.set(e,br(Rc,this).state,this.getHelpers(),t(qr.get(e,br(Rc,this).state))),this.emit("onStateUpdate"),this}},{key:"setOptions",value:function(e,t){return qr.set(e,this.options,this.getHelpers(),t),this}},{key:"getOptions",value:function(e,t){let n=qr.get(e,this.options,this.getHelpers());return void 0===n?t:n}},{key:"setFilter",value:function(e,t=!1){return this.setState("filter",e),t||(this.invalidateData(),this.updateData()),this}},{key:"resetFilter",value:function(){return this.setState("filter",{}),this}},{key:"getFilter",value:function(){return this.getState("filter")}},{key:"setPager",value:function(e,t=!1){return this.setState("pager",e),t||this.updateData(),this}},{key:"getDefaultPageNumber",value:function(){return isNaN(this.getOptions("pager.page"))?0:this.getOptions("pager.page")}},{key:"getDefaultPageSize",value:function(){return isNaN(this.getOptions("pager.size"))?20:this.getOptions("pager.size")}},{key:"resetPager",value:function(){this.setState("pager",{size:this.getDefaultPageSize(),page:this.getDefaultPageNumber()})}},{key:"getPager",value:function(){return this.getState("pager")}},{key:"setSorter",value:function(e,t=!1){return this.setWorking("sorter",e),t||(this.invalidateData(),this.updateData()),this}},{key:"resetSorter",value:function(e=!1){let t={_id:1};return this.setSorter(t,e)}},{key:"getSorter",value:function(){return this.getWorking("sorter")}},{key:"getSorterDirection",value:function(){try{let e=Object.keys(this.getSorter());return this.getSorter()[e[0]]}catch(e){return 1}}},{key:"getSearch",value:function(){return void 0!==this.getWorking("search")&&null!==this.getWorking("search")?this.getWorking("search"):""}},{key:"setSearch",value:function(e="",t=!1){return this.setWorking("search",e),t||(this.invalidateData(),this.updateData()),this}},{key:"getReturn",value:function(){return this.getWorking("return")}},{key:"setReturn",value:function(e=xc){return this.setWorking("return",e),this}},{key:"clearFilteredData",value:function(){this.setStoreContent("filtered",[])}},{key:"clearRawData",value:function(){this.setStoreContent("raw",[])}},{key:"clearRefinedData",value:function(){this.setStoreContent("refined",[])}},{key:"invalidateData",value:function(){this.clearFilteredData(),this.isLive()&&this.clearRawData(),this.resetPager()}},{key:"isLive",value:function(){return this.getOptions("interface")&&this.getOptions("interface.factory")}},{key:"setUpdating",value:function(){this.setState("updating",!0)}},{key:"setUpdated",value:function(){this.setState("updating",!1)}},{key:"ifUpdating",value:function(){return this.getState("updating")}},{key:"getDataInterface",value:function(){let e=this.getOptions("interface.factory");return"function"==typeof e?e({}):e}},{key:"getLoadDataActionName",value:function(){return this.getOptions("interface.listAction")?this.getOptions("interface.listAction"):"list"}},{key:"setCombinedActionName",value:function(e=Mc){this.setWorking("interface.combinedAction",e)}},{key:"getCombinedActionName",value:function(){return this.getWorking("interface.combinedAction")?this.getWorking("interface.combinedAction"):Nc}},{key:"getCountActionName",value:function(){return this.getOptions("interface.countAction")?this.getOptions("interface.countAction"):Mc}},{key:"loadData",value:function(){let e,t=this.getDataInterface().setFilter(this.getFilter()).setSorter(this.getSorter()).setReturn(this.getReturn()).setSearch(this.getSearch()).setPager(this.getPager());return e=this.getOptions("interface.combined",Fc)?this.getCombinedActionName():this.getLoadDataActionName(),t["$"+e]()}},{key:"goToNext",value:function(){let e=isNaN(this.getState("pager.page"))?this.getDefaultPageNumber():this.getState("pager.page")+1;this.setState("pager.page",Math.min(e,this.getState("pagination.pages.to"))),this.updateData()}},{key:"goToPrev",value:function(){let e=isNaN(this.getState("pager.page"))?this.getDefaultPageNumber():this.getState("pager.page")-1;this.setState("pager.page",Math.max(e,this.getState("pagination.pages.from"))),this.updateData()}},{key:"goToFirst",value:function(){this.setState("pager.page",this.getState("pagination.pages.from")),this.updateData()}},{key:"goToLast",value:function(){this.setState("pager.page",this.getState("pagination.pages.to")),this.updateData()}},{key:"goToPage",value:function(e){this.setState("pager.page",e),this.updateData()}},{key:"testDataItem",value:function(e){let t=this.getSearch().toLowerCase();for(let n in e){if(e[n].toString().toLowerCase().indexOf(t)>-1)return!0}return!1}},{key:"getRowsCount",value:function(){var e=this;return this.getDataInterface().setFilter(this.getFilter())["$"+this.getCountActionName()]().then(function(t){e.updatePagination(t.count)}).catch(function(t){e.error(t)})}},{key:"updatePagination",value:function(e){this.log("update pagination",e),this.updateStateProp("pagination.pages.list",function(e){return e.splice(0,e.length),e});let t=(this.getPager().page-0)*this.getPager().size+1,n=e%this.getPager().size?Math.floor(e/this.getPager().size)+1:Math.round(e/this.getPager().size),i=Math.max(0,this.getPager().page-6),r=Math.min(n-1,this.getPager().page+6),o=[],s=Math.min(t+this.getPager().size-1,e);for(let e=i;e<=r;e++)o.push({index:e,active:e===this.getPager().page});this.log("update pagination",this.getState(":")),this.setState("count",e),this.setState("pagination.items.from",t),this.setState("pagination.items.to",s),this.setState("pagination.pages.count",n),this.setState("pagination.pages.from",i),this.setState("pagination.pages.to",r),this.setState("pagination.pages.current",this.getPager().page),this.updateStateProp("pagination.pages.list",function(e){return e.splice(0,e.length,...o),e})}},{key:"updateData",value:function(){var e=this;if(this.isLive()){if(this.ifUpdating())return;this.getOptions("endless",!1)||this.clearRawData(),this.setUpdating(),this.getOptions("interface.combined",Fc)?this.loadData().then(function(t){const n=Qr.objHas(t,"status")&&Qr.objHas(t,"result");e.updateStore("filtered",function(i){return e.getOptions("endless",!1)||i.splice(0),n&&t?.result.list?i.push(...t.result.list||[]):Qr.objHas(t,"list")&&Array.isArray(t.list)?i.push(...t.list):Array.isArray(t)&&i.push(...t),i}),e.setWorking("lastCount",n?t.result.count:t.count)}).then(function(){e.updatePagination(e.getWorking("lastCount"))}).catch(this.error.bind(this)).then(this.setUpdated.bind(this)):this.loadData().then(function(t){e.updateStore("filtered",function(e){return e.push(...t),e})}).then(this.getRowsCount.bind(this)).catch(this.error.bind(this)).then(this.setUpdated.bind(this))}else this.setUpdating(),this.processData(),this.setUpdated()}},{key:"getData",value:function(){return this.data}},{key:"processData",value:function(){var e=this;let t=this.getFilter();this.log(this.getData()),null!=t&&void 0!==t.filterSearch&&null!==t.filterSearch&&t.filterSearch.length>0?this.updateStore("filtered",function(t){return t.splice(0,t.length,...br(Dc,e).raw.filter(e.testDataItem.bind(e))),t}):this.updateStore("filtered",function(t){return t.splice(0,t.length,...br(Dc,e).raw),t});let n=this.getSorter();null!=n&&this.updateStore("filtered",function(e){return e.sort(function(e,t){let i=qr.get(n.sortByField,e,{}),r=qr.get(n.sortByField,t,{});return isNaN(i)?void 0!==i&&void 0!==r&&i.localeCompare?i.localeCompare()*-n.sortDirection:0:(i<r?1:-1)*n.sortDirection}),e})}},{key:"error",value:function(){this.options.logger&&this.options.logger.error(...arguments)}},{key:"log",value:function(){this.options.logger&&this.options.logger.log(...arguments)}},{key:"checkFieldsNames",value:function(){const e=":"+this.getOptions("idField");this.getOptions("fields",[]).forEach(function(t){e===t.path&&(t.path=t.path+Tc)})}},{key:"readFieldValue",value:function(e,t,n){if(e.indexOf(Tc)>-1){const e=":"+this.getOptions("idField");return qr.get(e,t,n)}return qr.get(e,t,n)}},{key:"refineFiltered",value:function(){var e=this;let t=[];this.checkFieldsNames(),br(Dc,this).filtered.forEach(function(n,i){let r={};e.getOptions("idField")&&(r[e.getOptions("idField")]=n[e.getOptions("idField")]),e.getOptions("fields",[]).forEach(function(t){let o=null,s=e.readFieldValue(t.path,n,e.getOptions("helpers"));if(Qr.objHas(t,Pc)){try{o=t[Pc](s,n,i)}catch(t){e.error("Error while preprocessing cell value",s,n,i),e.error(t)}qr.set(t.path,r,o)}else qr.set(t.path,r,s)}),t.push(r)}),this.updateStore("refined",function(e){return e.splice(0,e.length,...t),e})}},{key:"$destroy",value:function(){for(let e in br(jc,this))br(jc,this)[e].$destroy&&br(jc,this)[e].$destroy(),delete br(jc,this)[e]}}])}(Br);var Bc=On("<!> <!>",1),Vc=On("<!> <!>",1);function zc(e,t){Z(t,!0);let n=rr(t,"success",3,!1),i=rr(t,"error",3,!1),r=rr(t,"container",19,()=>({})),o=rr(t,"loaderTitle",15,"Отправка данных на сервер"),s=rr(t,"loaderActive",15,!1),a=rr(t,"loaderSize",15,"container"),l=rr(t,"successTitle",15,"OK"),u=rr(t,"successMessage",15,""),c=rr(t,"errorTitle",15,"Error"),d=rr(t,"errorMessage",15,"");var f=Vc(),h=rt(f);ho(h,{get loading(){return s()},set loading(e){s(e)},get title(){return o()},set title(e){o(e)},get size(){return a()},set size(e){a(e)}}),Ka(ot(h,2),ir(r,{children:(e,t)=>{var r=Bc(),o=rt(r),s=e=>{Ou(e,{get title(){return c()},set title(e){c(e)},get message(){return d()},set message(e){d(e)}})};Gn(o,e=>{i()&&e(s)});var a=ot(o,2),f=e=>{Su(e,{get title(){return l()},set title(e){l(e)},get message(){return u()},set message(e){u(e)}})};Gn(a,e=>{n()&&e(f)}),In(e,r)},$$slots:{default:!0}})),In(e,f),ee()}var qc=new WeakMap,Hc=new WeakMap;let Gc=function(e){function t({target:e=null,name:n="Default",options:i={},working:r={},data:o={},ui:s=zc}){var a;return kr(this,t),_r(a=mr(this,t,[{working:{name:`${n}ActionUI`,...r},options:i,data:o}]),qc,null),_r(a,Hc,null),e&&a.setOptions("target",e),wr(qc,a,s),a.initUI(),a}return Cr(t,e),Sr(t,[{key:"initUI",value:function(){try{const e=this.getTargetEl();for(;e.children.length;)e.removeChild(e.firstChild);wr(Hc,this,new Ju(br(qc,this),e,this.getOptions()))}catch(e){this.error(e)}}},{key:"setLoading",value:function(){this.emit("onloading"),br(Hc,this).set("loaderActive",!0),br(Hc,this).set("success",!1),br(Hc,this).set("error",!1)}},{key:"resetLoading",value:function(){this.emit("onloaded"),br(Hc,this).set("loaderActive",!1)}},{key:"hideAll",value:function(){br(Hc,this).set("loaderActive",!1),br(Hc,this).set("success",!1),br(Hc,this).set("error",!1)}},{key:"destroy",value:function(){this.emit("ondestroy"),br(Hc,this)&&(br(Hc,this).$destroy&&br(Hc,this).$destroy(),br(Hc,this).destroy&&br(Hc,this).destroy(),wr(Hc,this,null)),this.setOptions(null),this.setWorking(null),this.setData(null)}},{key:"processResult",value:function(e){return e.status===Vo?(this.setFormSuccess(),!0):(this.setFormErrors(e),!1)}},{key:"showSuccess",value:function(e,t){br(Hc,this).set("success",!0),br(Hc,this).set("error",!1),null!=t&&br(Hc,this).set("successMessage",t),null!=e&&br(Hc,this).set("successTitle",e)}},{key:"showError",value:function(e,t){br(Hc,this).set("success",!1),br(Hc,this).set("error",!0),null!=t&&br(Hc,this).set("errorMessage",t),null!=e&&br(Hc,this).set("errorTitle",e)}},{key:"setFormSuccess",value:function(){this.showSuccess(),this.emit("onsuccess")}},{key:"setFormErrors",value:function(e){const t={form:[],fields:{}};e.message&&t.form.push(e.message),e.errors&&Object.keys(e.errors).length>0&&(t.fields={...e.errors}),this.showError(e.message,JSON.stringify(t,null,4)),this.emit("onerror",t)}},{key:"getTargetEl",value:function(){const e=this.getOptions("target",".container");if(e instanceof HTMLElement)return e;if("string"==typeof e)return document.querySelector(e);throw new Error("ActionUI parent element is not defined")}}])}(Fu),Kc=function(){return Sr(function e(){kr(this,e)},null,[{key:"addComponent",value:function(e,t){ka.add(e,t)}},{key:"addVariants",value:function(e,t){_a.add(e,t)}},{key:"addField",value:function(e,t){ba.add(e,t)}},{key:"actionFieldsInit",value:function(e,t,n){var i=this;Array.isArray(e)?e.forEach(function(e){i.actionFieldsInit(e,t,n)}):(Qr.objHas(t,"fields")||(t.fields={}),Qr.objHas(t.fields,e)||(t.fields[e]={}),null!=n&&void 0!==n[e]&&null!==n[e]&&(t.fields[e].value=n[e]))}}])}();Ir(Kc,"validator",null);const Jc={label:"",placeholder:"",enabled:!0,visible:!0,required:!0,validated:!1,valid:!1,errors:!1};function Yc(e,t={},n,i){let r={...Jc};return i.contains(e)&&(r={...r,...i.get(e)}),t&&(r={...r,...t}),Qr.objHas(r,"variantsSource")&&n.contains(r.variantsSource)?r.variants=n.get(r.variantsSource):r.variants&&0!==r.variants.length||(r.variants=[]),r}function Qc(e,t,n){return e[t].formErrors=[...n],e[t].validated=!0,e[t].inputStarted=!0,e[t].valid=!1,e[t].formLevelError=!0,e}function Xc(e,t){return e[t].formErrors=!1,e[t].validated=!0,e[t].valid=!0,e[t].formLevelError=!1,e}function Zc(e,t){return Qr.objHas(e,t)&&e[t].enabled&&e[t].visible&&void 0!==e[t].value}var ed,td,nd,id,rd,od,sd,ad,ld,ud,cd,dd,fd,hd,gd,pd,vd,md,yd,kd,bd={fieldInit:Yc,initFormByField:function e(t={},n=[],i,r,o,s){if(Array.isArray(n))n.forEach(function(n){return e(t,n,i,r,o,s)});else{let e={};o&&Qr.objHas(o,"mutations")&&Qr.objHas(o.mutations,n)&&(e=o.mutations[n]),s&&Qr.objHas(s,n)&&(e.value=s[n]),t[n]=Yc(n,e,i,r),o&&o.readonly&&(t[n].readonly=!0)}return t},setFieldInvalid:function(e,t,n,i){return e[t].errors=[...i],e[t].validated=!0,e[t].valid=!1,e[t].value=n,e},setFieldValid:function(e,t,n){e[t].errors=!1,e[t].validated=!0,e[t].valid=!0,e[t].value=n;for(let n in e)if(n!==t&&(Array.isArray(e[n].errors)&&0===e[n].errors.length&&(e[n].errors=!1),!1!==e[n].errors))break;return e},isFieldValid:function(e,t){return!Array.isArray(e[t].errors)},setFormFieldInvalid:Qc,setFormFieldValid:Xc,updateFormValidationStatus:function({form:e,formErrors:t,formHasErrors:n,fieldsHasErrors:i,validationStatus:r}){if(Array.isArray(r.form)&&r.form.length?(t.splice(0,t.length,...r.form),!0):t.splice(0,t.length),r.fields)for(let t in r.fields)Array.isArray(r.fields[t])&&r.fields[t].length?(Qc(e,t,r.fields[t]),!0):Xc(e,t)},fieldIsVisibleAndFilled:Zc,setFieldsVisibility:function(e,t,n){return!!Array.isArray(t)&&(Object.keys(e).forEach(function(i){e[i].visible=t.includes(i)?n:!n}),!0)},setFieldValue:function(e,t,n){return!!Qr.objHas(e,t)&&(e[t].value=n,!0)},collectData:function(e,t){let n={};return e.flat().forEach(function(e){Zc(t,e)&&(n[e]=t[e].value)}),n}};function _d(){if(td)return ed;td=1;const e=e=>Object.keys(e).reduce((e,t)=>(e[t]=[],e),{}),t=["fields","form"];return ed=class{#U=!0;#R;constructor(e){this.#R=JSON.parse(JSON.stringify(e)),Object.keys(this.#R).forEach(e=>{t.includes(e)||delete this.#R[e]}),this.#U=0===this.#R.form.errors.length;const n=this.#D();for(let e of n)this.isFieldDirty(e)&&(this.#U=!1)}destroy(){this.#R=void 0}get clean(){return this.#U}static getDefaultResult(t){return{fields:e(t),form:{fields:e(t),errors:[],exceptions:[]}}}getReport(){return JSON.parse(JSON.stringify(this.#j()))}getDetailedReport(){return"object"==typeof this.#R?JSON.parse(JSON.stringify(this.#R)):void 0}isFieldDirty(e){return!(!Array.isArray(this.#R.fields[e])||!this.#R.fields[e].length)||!(!Array.isArray(this.#R.form.fields[e])||!this.#R.form.fields[e].length)}getCompleteResultForField(e){const t=[];return Array.isArray(this.#R.fields[e])&&t.push(...this.#R.fields[e]),Array.isArray(this.#R.form.fields[e])&&t.push(...this.#R.form.fields[e]),t}#j(){const e={clean:this.#U,fields:{},form:[]},t=this.#D();for(let n of t){const t=this.getCompleteResultForField(n);t.length&&(e.fields[n]=t)}return e.form=[...this.#R.form.errors],0===e.form.length&&delete e.form,e}#D(){const e=Object.keys(this.#R.fields),t=Object.keys(this.#R.form.fields);return[...new Set([...t,...e])]}}}function wd(){if(od)return rd;od=1;const e=function(){if(id)return nd;id=1;class e extends Error{constructor(e,t={},n=null){return super(e),this.options=t,this.adopt(n),this.fill(),this.getTime(),this}adopt(e){return e instanceof Error&&(this.parent=e),this}getStack(){return this.parent?this.parent.stack:this.stack}getDetails(){let e=this;return this.parent&&(e=this.parent),{columnNumber:e.columnNumber,fileName:e.fileName,lineNumber:e.lineNumber,name:e.name,message:e.message,stack:e.stack}}getTime(){let e=new Date;return this.env.date={timestamp:e.getTime(),offset:e.getTimezoneOffset()},this.env.date}filterEnv(e,t){let n={};for(let i of t)Object.prototype.hasOwnProperty.call(e,i)&&(n[i]=e[i]);return n}fill(){return this.env={browser:!1,node:!0,versions:Object.assign({},process.versions),vars:this.filterEnv(process.env,this.options.whitelist||["NODE_ENV"])},this}}return nd=e}();return rd=class extends e{constructor(e,t={},n=null,i={}){return super(e,{fields:t,params:i},n),this}setFieldsErrors(e){this.options.fields=e}getFieldsErrors(){return this.options.fields}}}function Od(){if(ud)return ld;ud=1;const e=_d(),t=wd(),n=ad?sd:(ad=1,sd=async(e,t)=>{if("function"==typeof e)return"AsyncFunction"===e.constructor.name?await e(...t):e(...t)});ld=async(t,n)=>{const r=e.getDefaultResult(n);return await i({validators:t,data:n,result:r}),await l({validators:t,data:n,result:r}),new e(r)};const i=async({validators:e,data:t,result:n})=>{for(let i in t)await r(i,t[i],e,n)},r=async(e,t,n,i)=>{const r=o(e,n);return await s(e,t,r,i)},o=(e,t)=>t&&t.fields&&t.fields[e]?t.fields[e]:[],s=async(e,i,r,o)=>{for(let s of r)try{await n(s.validator,[i])||a(e,s.message,o)}catch(n){n instanceof t||!s.message?a(e,n.message,o):a(e,s.message,o)}},a=(e,t,n)=>{n.fields[e].includes(t)||n.fields[e].push(t)},l=async({validators:e,data:t,result:n})=>{const i=u(e);await c(t,i,n)},u=e=>e&&e.form?e.form:[],c=async(e,t,n)=>{for(let i of t)try{await i(e)}catch(e){if(!e||"function"!=typeof e.getFieldsErrors)throw e;{const t=e.getFieldsErrors();Array.isArray(t.form)&&d(t.form,n),t.fields&&h(t.fields,n)}}},d=(e,t)=>{e.forEach(e=>{f(e,t)})},f=(e,t)=>{t.form.errors.includes(e)||t.form.errors.push(e)},h=(e,t)=>{for(let n in e)g(n,e[n],t)},g=(e,t,n)=>{t.forEach(t=>{p(e,t,n)})},p=(e,t,n)=>{Array.isArray(n.form.fields[e])||(n.form.fields[e]=[]),n.form.fields[e].includes(t)||n.form.fields[e].push(t)};return ld}function $d(){if(hd)return fd;hd=1;const{composeFieldsValidators:e,composeFormValidators:t}=dd?cd:(dd=1,cd={composeFieldsValidators:(e,t)=>{if(t&&t.fields){const n=Object.keys(e),i={};return n.forEach(e=>{Array.isArray(t.fields[e])&&(i[e]=t.fields[e])}),i}return{}},composeFormValidators:(e,t)=>t?t.forms&&Array.isArray(t.forms[e])?t.forms[e]:Array.isArray(t.form)?t.form:[]:[]}),n=Od();return fd=i=>(r,o)=>{const s={fields:e(r,i),form:t(o,i)};return n(s,r)}}function Sd(){if(md)return vd;md=1;const e=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),{augmentFieldsValidators:t,augmentFormValidators:n}=function(){if(pd)return gd;pd=1;const e=(e,t)=>{if(e.validator&&"function"==typeof e.validator){const n=e.validator,i={...e};return delete i.validator,i.validator=e=>n(e,t()),i}return e},t=(e,t)=>n=>e(n,t());return gd={augmentFieldsValidators:(t,n)=>t.map(t=>e(t,n)),augmentFieldValidator:e,augmentFormValidators:(e,n)=>e.map(e=>t(e,n)),augmentFormValidator:t}}();vd=(t,o)=>{if(null==t)return{fields:{},forms:{}};const s={};return e(t,"fields")&&(s.fields=i(t.fields,o)),e(t,"forms")?s.forms=r(t.forms,o):e(t,"form")&&(s.form=n(t.form,o)),s};const i=(e,n)=>{const i={};for(let r in e)Array.isArray(e[r])&&(i[r]=t(e[r],n));return i},r=(e,t)=>{const i={};for(let r in e)Array.isArray(e[r])&&(i[r]=n(e[r],t));return i};return vd}var Id=function(){if(kd)return yd;kd=1;const e=Od(),t=$d(),n=Sd(),i=_d();return yd={name:"not-validation",Session:e,Runner:t,Builder:n,Result:i}}(),Ad=On('<div><div class="field-label is-normal"><!></div> <div class="field-body"></div></div>'),Cd=On("<!> <!>",1),Ed=On("<div></div>");function Ld(e,t){Z(t,!0);let n=rr(t,"label",3,""),i=rr(t,"name",3,"generic field"),r=rr(t,"readonly",3,!1),o=rr(t,"horizontal",3,!1),s=rr(t,"controls",19,()=>[]),a=rr(t,"classes",3,""),l=rr(t,"addons",3,!1),u=rr(t,"addonsCentered",3,!1),c=rr(t,"addonsRight",3,!1),d=rr(t,"grouped",3,!1),f=rr(t,"groupedMultiline",3,!1),h=rr(t,"groupedRight",3,!1),g=rr(t,"groupedCentered",3,!1),p=rr(t,"onchange",3,()=>{}),v=De(""),m=De(!1),y=De(void 0);Vn(()=>{Be(v,an(v)+" "+a()),Be(v,an(v)+(l()?" has-addons ":"")),Be(v,an(v)+(u()?" has-addons-centered ":"")),Be(v,an(v)+(c()?" has-addons-right ":"")),Be(v,an(v)+(d()?" is-grouped ":"")),Be(v,an(v)+(f()?" is-grouped-multiline ":"")),Be(v,an(v)+(h()?" is-grouped-right ":"")),Be(v,an(v)+(g()?" is-grouped-centered ":"")),r()&&s().forEach(e=>{e.readonly=!0});let e=s().filter(e=>"UIHidden"!==e.component);Be(m,0===e.length);let t=s().map(e=>e.component).join("_");Be(y,`form-field-${t}-${i()}`)});var k=Sn(),b=rt(k),_=e=>{var t=Sn();Qn(rt(t),17,s,Yn,(e,t)=>{const n=Le(()=>ka.get(an(t).component));var r=Sn();ri(rt(r),()=>an(n),(e,n)=>{n(e,ir(()=>an(t),{get onchange(){return p()},get fieldname(){return i()}}))}),In(e,r)}),In(e,t)},w=e=>{var t=Sn(),r=rt(t),a=e=>{var t=Ad(),r=it(t),o=it(r);{let e=Le(()=>n()||s()[0].label);va(o,{get id(){return an(y)},get label(){return an(e)}})}var a=ot(r,2);Qn(a,21,s,Yn,(e,t)=>{const n=Le(()=>ka.get(an(t).component));var r=Sn();ri(rt(r),()=>an(n),(e,n)=>{n(e,ir(()=>an(t),{get onchange(){return p()},get fieldname(){return i()}}))}),In(e,r)}),kt(()=>{di(t,1,`field is-horizontal ${an(v)??""} ${an(y)??""}`),Oi(a,"id",an(y))}),In(e,t)},l=e=>{var t=Ed();Qn(t,21,s,Yn,(e,t)=>{const n=Le(()=>ka.get(an(t).component));var r=Cd(),o=rt(r);va(o,{get id(){return`form-field-${an(t).component??""}-${i()??""}`},get label(){return an(t).label}}),ri(ot(o,2),()=>an(n),(e,n)=>{n(e,ir(()=>an(t),{get onchange(){return p()},get fieldname(){return i()}}))}),In(e,r)}),kt(()=>di(t,1,`field ${an(v)??""} ${an(y)??""}`)),In(e,t)};Gn(r,e=>{o()?e(a):e(l,!1)},!0),In(e,t)};Gn(b,e=>{an(m)?e(_):e(w,!1)}),In(e,k),ee()}var Td=On('<div><span class="title"> </span></div>'),xd=On('<div class="notification is-success"><h3 class="form-success-message"> </h3></div>'),Fd=On('<h5 class="title is-5"> </h5>'),Nd=On('<h6 class="subtitle is-6"> </h6>'),Md=On("<button> </button>"),Pd=On("<button> </button>"),Ud=On('<div class="edit-form-error notification is-danger"> </div>'),Rd=On('<div class="buttons is-grouped is-centered"><!> <!></div> <!>',1),Dd=On("<div><!></div>"),jd=On('<div class="column notification is-danger"> </div>'),Wd=On('<div class="columns"></div>'),Bd=On('<div class="notification is-danger"> </div>'),Vd=On("<span> </span>"),zd=On('<div class="edit-form-error notification is-danger"></div>'),qd=On("<button> </button>"),Hd=On("<button> </button>"),Gd=On('<!> <div class="buttons is-grouped is-centered"><!> <!></div>',1),Kd=On("<!> <!> <!> <!> <!>",1),Jd=On('<div class="form-container"><!> <!></div>');function Yd(e,t){Z(t,!0);const n=()=>Yi(pr,"$LOCALE",i),[i,r]=Qi();let o=De(Ge([])),s=De(!1),a=De(!1),l=rr(t,"form",31,()=>Ge({})),u=rr(t,"loading",11,!1),c=rr(t,"loader",3,"container"),d=rr(t,"success",3,!1),f=rr(t,"fields",19,()=>[]),h=rr(t,"SUCCESS_TEXT",3,"Операция завершена"),g=rr(t,"WAITING_TEXT",3,"Отправка данных на сервер"),p=rr(t,"title",3,""),v=rr(t,"description",3,""),m=rr(t,"buttonsFirst",3,!1),y=rr(t,"horizontal",3,!1),k=rr(t,"submit",19,()=>({caption:"Отправить",enabled:!0})),b=rr(t,"cancel",19,()=>({caption:"Назад",enabled:!0})),_=rr(t,"onchange",3,()=>{}),w=rr(t,"onsubmit",3,()=>{}),O=rr(t,"onreject",3,()=>{}),$=rr(t,"onFieldInvalid",3,()=>{}),S=rr(t,"onFieldValid",3,()=>{}),I=Le(()=>an(s)||an(a));function A(){return bd.collectData(f(),l())}function C(e,t){bd.setFieldsVisibility(l(),e,t)&&l(l())}function E(e){l(l()[e.field].value=e.value,!0),_()(e)}function L(e){return e&&e.preventDefault(),w()(A()),!1}function T(){O()()}var x={collectData:A,setFieldInvalid:function(e,t,n){l(bd.setFieldInvalid(l(),e,t,n)),Be(a,!0)},setFieldValid:function(e,t){l(bd.setFieldValid(l(),e,t)),an(a)!==some&&Be(a,some,!0)},isFieldValid:function(e){return bd.isFieldValid(l(),e)},setFormFieldInvalid:function(e,t){l(bd.setFormFieldInvalid(l(),e,t)),$()({fieldName:e})},setFormFieldValid:function(e){l(bd.setFormFieldValid(l(),e)),S()({fieldName:e})},updateFormValidationStatus:function(e){if(Be(s,!1),Be(a,!1),Array.isArray(e.form)&&e.form.length?(an(o).splice(0,an(o).length,...e.form),Be(s,!0)):an(o).splice(0,an(o).length),Be(o,an(o),!0),e.fields)for(let t of Object.keys(l()))Array.isArray(e.fields[t])&&e.fields[t].length?(bd.setFormFieldInvalid(l(),t,e.fields[t]),Be(a,!0)):bd.setFormFieldValid(l(),t)},setFieldsVisibility:C,setVisibleFields:function(e){C(e,!0)},setInvisibleFields:function(e){C(e,!1)},setFieldValue:function(e,t){bd.setFieldValue(l(),e,t)&&E({field:e,value:t})}},F=Jd(),N=it(F),M=e=>{var t=Td(),i=it(t),r=it(i);kt(()=>{di(t,1,`${"page"===c()?"pageloader":"containerloader"} ${u()?"is-active":""}`),Pn(r,n()[g()])}),In(e,t)};Gn(N,e=>{"hidden"!==c()&&e(M)});var P=ot(N,2),U=e=>{var t=xd(),i=it(t),r=it(i);kt(()=>Pn(r,n()[h()])),In(e,t)},R=e=>{var t=Kd(),i=rt(t),r=e=>{var t=Fd(),i=it(t);kt(()=>Pn(i,n()[p()])),In(e,t)};Gn(i,e=>{p()&&e(r)});var s=ot(i,2),a=e=>{var t=Nd(),i=it(t);kt(()=>Pn(i,n()[v()])),In(e,t)};Gn(s,e=>{v()&&e(a)});var u=ot(s,2),c=e=>{var t=Rd(),i=rt(t),r=it(i),s=e=>{var t=Md();t.__click=T;var i=it(t);kt(()=>{di(t,1,`button is-outlined ${b().classes??""}`),Pn(i,n()[b().caption])}),In(e,t)};Gn(r,e=>{b().enabled&&e(s)});var a=ot(r,2),l=e=>{var t=Pd();t.__click=L;var i=it(t);kt(()=>{t.disabled=an(I),di(t,1,`button is-primary is-hovered ${k().classes??""}`),Pn(i,n()[k().caption])}),In(e,t)};Gn(a,e=>{k().enabled&&e(l)});var u=ot(i,2),c=e=>{var t=Ud(),n=it(t);kt(e=>Pn(n,e),[()=>an(o).join(", ")]),In(e,t)};Gn(u,e=>{an(o).length>0&&e(c)}),In(e,t)};Gn(u,e=>{m()&&e(c)});var d=ot(u,2);Qn(d,17,f,Yn,(e,t)=>{var n=Sn(),i=rt(n),r=e=>{var n=Wd();Qn(n,21,()=>an(t),Yn,(e,t)=>{var n=Sn(),i=rt(n),r=e=>{var n=Sn(),i=rt(n),r=e=>{var n=Dd(),i=it(n);{let e=Le(()=>[l()[an(t)]]);Ld(i,{get controls(){return an(e)},onchange:E,get name(){return an(t)},get horizontal(){return y()},get label(){return l()[an(t)].label}})}kt(()=>di(n,1,`column ${l()[an(t)].fieldSize?"is-"+l()[an(t)].fieldSize:""} `)),In(e,n)};Gn(i,e=>{l()[an(t)].visible&&e(r)}),In(e,n)},o=e=>{var n=jd(),i=it(n);kt(()=>Pn(i,`Subfield '${an(t)??""}' is not registered`)),In(e,n)};Gn(i,e=>{l()[an(t)]&&l()[an(t)].component?e(r):e(o,!1)}),In(e,n)}),In(e,n)},o=e=>{var n=Sn(),i=rt(n),r=e=>{var n=Sn(),i=rt(n),r=e=>{{let n=Le(()=>[l()[an(t)]]);Ld(e,{get controls(){return an(n)},onchange:E,get name(){return an(t)},get horizontal(){return y()},get label(){return l()[an(t)].label}})}};Gn(i,e=>{l()[an(t)].visible&&e(r)}),In(e,n)},o=e=>{var n=Bd(),i=it(n);kt(()=>Pn(i,`Field '${an(t)??""}' is not registered`)),In(e,n)};Gn(i,e=>{l()[an(t)]&&l()[an(t)].component?e(r):e(o,!1)},!0),In(e,n)};Gn(i,e=>{Array.isArray(an(t))?e(r):e(o,!1)}),In(e,n)});var h=ot(d,2),g=e=>{var t=Gd(),i=rt(t),r=e=>{var t=zd();Qn(t,21,()=>an(o),Yn,(e,t)=>{var i=Vd(),r=it(i);kt(()=>Pn(r,n()[an(t)])),In(e,i)}),In(e,t)};Gn(i,e=>{an(o).length>0&&e(r)});var s=it(ot(i,2)),a=e=>{var t=qd();t.__click=T;var i=it(t);kt(()=>{di(t,1,`button ${(b().classes?b().classes:"")??""}`),Pn(i,n()[b().caption])}),In(e,t)};Gn(s,e=>{b().enabled&&e(a)});var l=ot(s,2),u=e=>{var t=Hd();t.__click=L;var i=it(t);kt(()=>{t.disabled=an(I),di(t,1,`button is-primary is-hovered ${(k().classes?k().classes:"")??""}`),Pn(i,n()[k().caption])}),In(e,t)};Gn(l,e=>{k().enabled&&e(u)}),In(e,t)};Gn(h,e=>{m()||e(g)}),In(e,t)};Gn(P,e=>{d()?e(U):e(R,!1)}),In(e,F);var D=ee(x);return r(),D}yn(["click"]);const Qd={notReadonly:e=>({readonly:!e}),readonly:e=>({readonly:e}),enable:e=>({disabled:!e}),disable:e=>({disabled:e})};let Xd=function(){function e(){kr(this,e)}return Sr(e,null,[{key:"add",value:function(t,n){Qr.objHas(vr(e,this,Zd)._,t)||(vr(e,this,Zd)._[t]=n)}},{key:"remove",value:function(t){Qr.objHas(vr(e,this,Zd)._,t)&&!Object.keys(Qd).includes(t)&&delete vr(e,this,Zd)._[t]}},{key:"exec",value:function(t,n,i,r,o){return vr(e,this,Zd)._[t](r,n,i,o)}}])}();var Zd={_:{...Qd}};var ef=new WeakMap,tf=new WeakMap,nf=new WeakMap,rf=new WeakMap,of=new WeakMap,sf=new WeakMap,af=new WeakSet;let lf=function(e){function t({target:e=null,name:n="Default",options:i={},working:r={},data:o={},ui:s=Yd}){var a;return kr(this,t),Or(a=mr(this,t,[{working:{name:`${n}Form`,...r},options:i,data:o}]),af),_r(a,ef,null),_r(a,tf,null),_r(a,nf,null),_r(a,rf,"default"),_r(a,of,new ya),_r(a,sf,null),wr(sf,a,new ya(_a.getContent())),e&&a.setOptions("target",e),wr(ef,a,s),Qr.objHas(i,"action")&&wr(rf,a,i.action),a.initForm(),a}return Cr(t,e),Sr(t,[{key:"initForm",value:function(){this.getOptions("autoInit",!0)&&this.initLibs(),this.getOptions("autoRender",!0)&&this.initUI()}},{key:"initLibs",value:function(){this.initFields(),this.initVariants(),this.initValidator()}},{key:"reInit",value:function(){this.initLibs(),this.updateUI(),this.resetLoading()}},{key:"initFields",value:function(){const e=this.getFormManifest();Qr.objHas(e,"fields")&&br(of,this).isEmpty()&&br(of,this).import(e.fields)}},{key:"initVariants",value:function(){this.getOptions("variants")&&br(sf,this).import(this.getOptions("variants"))}},{key:"initValidator",value:function(){wr(tf,this,Id.Runner(this.getFormValidators()))}},{key:"initUI",value:function(){try{const e=vr(af,this,hf).call(this,{manifest:this.getFormManifest(),formOptions:this.getFormOptions(),data:this.getFormData(),injectedProps:this.getFormInjectedProps()}),t=this.getFormTargetEl();for(;t.children.length;)t.removeChild(t.firstChild);wr(nf,this,new Ju(br(ef,this),t,e)),vr(af,this,uf).call(this),this.validateForm()}catch(e){this.error(e)}}},{key:"updateUI",value:function(){try{const e=vr(af,this,hf).call(this,{manifest:this.getFormManifest(),formOptions:this.getFormOptions(),data:this.getFormData(),injectedProps:this.getFormInjectedProps()});br(nf,this).replaceProps(e),this.validateForm()}catch(e){this.error(e)}}},{key:"validateForm",value:async function(){if(!this.getOptions("readonly",!1))try{const e=await br(tf,this).call(this,this.collectData(),this.getFormAction());br(nf,this).exec("updateFormValidationStatus",[e.getReport()]),e.clean||this.emit("onerror",e.getReport())}catch(e){const t={form:[ko.ERROR_DEFAULT,e.message]};br(nf,this)&&br(nf,this).exec("updateFormValidationStatus",[t]),this.emit("onerror",t),Qr.report(e)}}},{key:"submit",value:function(e){this.emit("onsubmit",e)}},{key:"reject",value:function(){this.emit("onreject")}},{key:"$on",value:function(){br(nf,this)&&br(nf,this).on(...arguments)}},{key:"setLoading",value:function(){this.emit("onloading"),br(nf,this).set("loading",!0)}},{key:"resetLoading",value:function(){this.emit("onloaded"),br(nf,this).set("loading",!1)}},{key:"destroy",value:function(){this.emit("ondestroy"),br(nf,this)&&(br(nf,this).$destroy&&br(nf,this).$destroy(),br(nf,this).destroy&&br(nf,this).destroy(),wr(nf,this,null)),wr(tf,this,null),wr(rf,this,null),wr(of,this,null),wr(sf,this,null),this.setOptions(null),this.setWorking(null),this.setData(null)}},{key:"getName",value:function(){return this.getWorking("name")}},{key:"getFormAction",value:function(){return br(rf,this)}},{key:"setFormAction",value:function(e){if(e&&e!==br(rf,this)){wr(rf,this,e);try{br(nf,this)&&br(nf,this).$destroy&&br(nf,this).$destroy()}catch{}this.initForm()}}},{key:"processResult",value:function(e){return e.status===Vo?(this.setFormSuccess(),!0):(this.setFormErrors(e),!1)}},{key:"setFormSuccess",value:function(){br(nf,this).set("success",!0),this.emit("onsuccess")}},{key:"setFormErrors",value:function(e){if(this.getOptions("readonly",!1))return;const t={form:[],fields:{}};e.message&&t.form.push(e.message),e.errors&&Object.keys(e.errors).length>0&&(t.fields={...e.errors}),br(nf,this).exec("updateFormValidationStatus",[t]),this.emit("onerror",t)}},{key:"getVariant",value:function(e,t){let n=br(sf,this).get(e).find(function(e){return e.id===t});return n||null}},{key:"getFormTargetEl",value:function(){const e=this.getOptions("target",".form");if(e instanceof HTMLElement)return e;if("string"==typeof e)return document.querySelector(e);throw new Error("Form parent element is not defined")}},{key:"getFormValidators",value:function(){return this.getOptions("validators")?this.getOptions("validators",{}):(vr(af,this,gf).call(this,"validators"),{})}},{key:"getFormManifest",value:function(){const e=this.getModelName();return e&&Qr.getApp()?Qr.getApp().getInterfaceManifest(e):this.getOptions("manifest",void 0)?this.getOptions("manifest",{}):(vr(af,this,gf).call(this,"manifest"),{})}},{key:"getFormData",value:function(){return this.getData()?this.getData():(vr(af,this,gf).call(this,"data"),{})}},{key:"getFormOptions",value:function(){return this.getOptions("ui",void 0)||this.getOptions("fields",void 0)?{ui:this.getOptions("ui",{}),fields:this.getOptions("fields",{})}:(vr(af,this,gf).call(this,"options"),{ui:{},fields:{}})}},{key:"getFormInjectedProps",value:function(){return this.getOptions("injected",{})}},{key:"collectData",value:function(){if(this.getOptions("readonly",!1))return this.getData();const e=bd.collectData(br(nf,this).props.fields,br(nf,this).props.form);return this.setData({...e}),e}},{key:"updateField",value:function(e,t){br(nf,this).props&&br(nf,this).props.form&&(br(nf,this).props.form[e]?br(nf,this).changeProp(`form.${e}`,function(e){return{...e,...t}}):br(nf,this).set(`form.${e}`,{...t}))}},{key:"getModel",value:function(e,t){return"string"==typeof e?this.getInterface(e)(t||{}):this.getInterface()(e||{})}},{key:"getInterface",value:function(e=!1){return Qr.getApp().getInterface(e||this.getModelName())}},{key:"getModelName",value:function(){return this.getOptions("model")}}])}(Fu);function uf(){var e=this;br(nf,this).on("onchange",function(t){e.validateForm(),e.emit("onchange",t),e.emit(`onchange.${t.field}`,t.value)}),br(nf,this).on("onsubmit",function(t){return e.submit(t)}),br(nf,this).on("onreject",function(){return e.reject()}),br(nf,this).on("onerror",function(t){return e.emit("onerror",t)}),vr(af,this,cf).call(this)}function cf(){const e=this.getOptions("masters",!1);if(e)for(let t in e){const n=e[t];for(let e in n){const i=n[e];vr(af,this,df).call(this,e,t,i)}}}function df(e,t,n=[]){var i=this;this.on(`onchange.${t}`,function(r){vr(af,i,ff).call(i,e,t,n,r)}),this.emit(`onchange.${t}`,this.getFormData()[t])}function ff(e,t,n,i){var r=this;const o=Xd.exec(e,t,n,i,this);n.forEach(function(e){r.updateField(e,o)})}function hf({manifest:e,formOptions:t={ui:{},fields:{}},data:n=null,injectedProps:i={}}){const r=br(rf,this);null==t&&(t={ui:{},fields:{}});const o=bd.initFormByField({},e.actions[r].fields,br(sf,this),br(of,this),t.fields,n);return{loading:!this.getOptions("autoInit",!0),title:e.actions[r].title,description:e.actions[r].description,fields:e.actions[r].fields,form:o,...t.ui,...i}}function gf(e){this.error(`${e} for ${this.getWorking("name")} form is not defined`)}var pf=On('<div class="block-container"><div class="form-paper"></div> <!></div>');function vf(e,t){Z(t,!0);let n=rr(t,"name",3,"default-form"),i=rr(t,"showModes",3,!1),r=rr(t,"mode",15,"default"),o=rr(t,"forms",19,()=>[]),s=rr(t,"onmode",3,()=>{});let a=De(Ge([]));function l(){Be(a,o().filter(e=>r()!==e.mode).map((e,t)=>({id:t,title:e.title,outlined:!0,type:"link",action(){var t;t=e.mode,r(t),s()(t),l()}})),!0)}Vn(()=>{l()});var u=pf(),c=it(u),d=ot(c,2),f=e=>{Po(e,{centered:!0,get values(){return an(a)},classes:"mt-4"})};Gn(d,e=>{i()&&e(f)}),kt(()=>{Oi(u,"id",`${n()??""}-form-set`),Oi(c,"id",`${n()??""}-form-set-container`)}),In(e,u),ee()}const mf="form-set";var yf=new WeakMap,kf=new WeakMap,bf=new WeakMap,_f=new WeakMap,wf=new WeakSet;let Of=function(e){function t({options:e={},formComponent:n=Yd,formSetComponent:i=vf}){var r;return kr(this,t),Or(r=mr(this,t,[{options:{name:mf,mode:"default",showModes:!0,...e}}]),wf),_r(r,yf,null),_r(r,kf,null),_r(r,bf,null),_r(r,_f,null),wr(kf,r,Yd),wr(yf,r,vf),r.setFormMode(r.getOptions("mode")),r.initUI(),r}return Cr(t,e),Sr(t,[{key:"initUI",value:function(){const e=this.getFrameTargetEl();for(;e.children.length;)e.removeChild(e.firstChild);wr(_f,this,new Ju(br(yf,this),e,vr(wf,this,$f).call(this))),this.updateForm()}},{key:"setFormMode",value:function(e){this.isModeExists(e)?this.setWorking("mode",e):(this.setWorking("mode",this.getFirstMode()),this.updateFormModeInUI())}},{key:"updateFormModeInUI",value:function(){br(_f,this)&&null!==this.getWorking("mode")&&br(_f,this).set("mode",this.getWorking("mode"))}},{key:"getFormMode",value:function(){return this.getWorking("mode")}},{key:"updateForm",value:function(){this.destroyForm(),null!==this.getWorking("mode")&&this.renderForm()}},{key:"renderForm",value:function(){var e=this;const t=this.getFormTargetEl(),n=this.getFormConfig();if(!(t instanceof HTMLElement&&n))throw new Error("error while form rendering");const i=function(t){e.setFormMode(t),e.updateForm()};if(n.form){for(;t.children.length;)t.removeChild(t.firstChild);wr(bf,this,new n.form({options:{target:t,changeMode:i}}))}else n.props&&wr(bf,this,new(br(kf,this))({target:t,...n.props,changeMode:i}))}},{key:"getFormConfig",value:function(){var e=this;return this.getOptions("forms").find(function(t){return t.mode===e.getFormMode()})}},{key:"destroyForm",value:function(){const e=this.getFormTargetEl();if(e)for(;e.firstChild;)e.removeChild(e.lastChild);br(bf,this)&&br(bf,this).$destroy&&br(bf,this).$destroy(),wr(bf,this,null)}},{key:"destroyFrame",value:function(){br(_f,this)&&br(_f,this).$destroy&&br(_f,this).$destroy(),wr(_f,this,null)}},{key:"isModeExists",value:function(e){return this.getOptions("forms",[]).some(function(t){return t.mode===e})}},{key:"getFirstMode",value:function(){const e=this.getOptions("forms",[]);return e.length>0?e[0].mode:null}},{key:"destroy",value:function(){wr(yf,this,null),wr(kf,this,null),this.destroyForm(),this.destroyFrame(),thi.setData(null),thi.setOptions(null),thi.setWorking(null)}},{key:"getFrameTargetEl",value:function(){const e=this.getOptions("target",".form-set");if(e instanceof HTMLElement)return e;if("string"==typeof e)return document.querySelector(e);throw new Error("form set target is not HTMLElement or string")}},{key:"getFormTargetEl",value:function(){const e=this.getOptions("name",mf);return document.querySelector(`#${e}-form-set-container`)}}])}(Fu);function $f(){var e=this;return{showModes:this.getOptions("showModes",!0),mode:this.getFormMode(),forms:this.getOptions("forms",[]),name:this.getOptions("name",mf),onmode:function(t){e.setFormMode(t),e.updateForm()}}}var Sf=On('<li class="is-active"><a aria-current="page"> </a></li>'),If=On('<li class="is-plain-crumb"> </li>'),Af=On("<li><a> </a></li>"),Cf=On('<nav class="breadcrumb" aria-label="breadcrumbs"><ul></ul></nav>');yn(["click"]);const Ef=Ge({});let Lf=function(){function e(){kr(this,e)}return Sr(e,null,[{key:"initUIProps",value:function(e,t){Ef.items=this.getBreadcrumbs(),Ef.root=e,Ef.go=t}},{key:"render",value:function({target:t,root:n="",navigate:i}){return this.remove(),e.UIConstructor&&(this.initUIProps(n,i),this.ui=Un(e.UIConstructor,{target:t,props:Ef})),this}},{key:"setHead",value:function(e){return this.head.splice(0,this.head.length,...e),this}},{key:"setTail",value:function(e){return this.tail.splice(0,this.tail.length,...e),this}},{key:"getBreadcrumbs",value:function(){let e=[];return e.push(...this.head),e.push(...this.tail),e}},{key:"update",value:function(){this.ui&&(Ef.items=this.getBreadcrumbs())}},{key:"remove",value:function(){return this.ui&&(jn(this.ui),this.ui=null),this}}])}();var Tf;Ir(Lf,"UIConstructor",null),Ir(Lf,"ui",null),Ir(Lf,"head",[]),Ir(Lf,"tail",[]),Lf.UIConstructor=function(e,t){Z(t,!0);const n=()=>Yi(pr,"$LOCALE",i),[i,r]=Qi();let o=rr(t,"root",3,""),s=rr(t,"items",19,()=>[]),a=rr(t,"go",3,null);function l(e){return"function"!=typeof a()||(e.preventDefault(),a()(e.currentTarget.dataset.href),!1)}var u=Cf();Qn(it(u),21,s,Yn,(e,t,i)=>{var r=Sn(),a=rt(r),u=e=>{var i=Sf(),r=it(i),s=it(r);kt(()=>{Oi(r,"href",`${o()??""}${an(t).href??""}`),Oi(r,"data-href",an(t).href),Pn(s,n()[an(t).title])}),In(e,i)},c=e=>{var i=Sn(),r=rt(i),s=e=>{var i=If(),r=it(i);kt(()=>Pn(r,n()[an(t).title])),In(e,i)},a=e=>{var i=Af(),r=it(i);r.__click=l;var s=it(r);kt(()=>{Oi(r,"href",`${o()??""}${an(t).href??""}`),Oi(r,"data-href",an(t).href),Pn(s,n()[an(t).title])}),In(e,i)};Gn(r,e=>{!1===an(t).href?e(s):e(a,!1)},!0),In(e,i)};Gn(a,e=>{s().length===i+1?e(u):e(c,!1)}),In(e,r)}),In(e,u),ee(),r()};let xf=function(){return Sr(function e(){kr(this,e)},null,[{key:"setApp",value:function(e){return this.app||(this.app=e),this}},{key:"setOptions",value:function(e){return this.options={...this.options,...e},this}},{key:"getOptionsPathTo",value:function(e){return`menu.${this.options.type}.${e}`}},{key:"getCurrentUrl",value:function(){return window.location.toString()}},{key:"isDirectNavigation",value:function(){return this.app?this.app.getOptions(this.getOptionsPathTo("directNavigation"),this.options.directNavigation):this.options.directNavigation}},{key:"getOptions",value:function(){return this.app?{class:this.app.getOptions(this.getOptionsPathTo("class"),this.options.class),brand:this.app.getOptions("brand",this.options.brand),items:this.app.getOptions(this.getOptionsPathTo("items"),this.options.items),sections:this.app.getOptions(this.getOptionsPathTo("sections"),this.options.sections),targetSelector:this.app.getOptions(this.getOptionsPathTo("targetSelector"),this.options.targetSelector),toggleSelector:this.app.getOptions(this.getOptionsPathTo("toggleSelector"),this.options.toggleSelector),open:this.app.getOptions(this.getOptionsPathTo("open"),this.options.open),directNavigation:this.app.getOptions(this.getOptionsPathTo("directNavigation"),this.options.directNavigation),root:this.app.getOptions("router.root",this.options.root),navigate:this.options.navigate.bind(this),getComponent:this.getComponent.bind(this)}:this.options}},{key:"getComponent",value:function(e){return!!ka.contains(e)&&ka.get(e)}},{key:"initField",value:function(e,t=[]){var n=this;e.forEach(function(e){t.forEach(function(t){Object.hasOwn(e,t)||(e[t]=n.DEFAULT[t])}),Object.hasOwn(e,"items")&&n.initField(e.items,t)})}},{key:"sortList",value:function(e){var t=this;e.sort(function(e,n){return Object.hasOwn(e,"items")&&t.sortList(e.items),Object.hasOwn(n,"items")&&t.sortList(n.items),e.priority===n.priority?e.title>n.title?1:-1:e.priority<n.priority?1:-1})}},{key:"removeDublicates",value:function(e){for(let t=0;t<e.length;t++){let n=e[t].priority;e.filter(function(n){return n.id===e[t].id}).forEach(function(t,i){0!==i&&(t.priority<n&&(n=t.priority),e.splice(e.indexOf(t),1))}),e[t].priority=n}return e}},{key:"prepareData",value:function(){const e=[...this.getOptions().items],t=[...this.getOptions().sections];this.initField(t,["priority"]),this.removeDublicates(t),this.initField(e,["priority","section","type"]),this.sortList(t),t.push({id:this.DEFAULT.section,title:this.DEFAULT.sectionTitle}),this.sortList(e),this.sections=t,this.items=e,this.menuStructure=this.createStructure()}},{key:"createStructure",value:function(){var e=this;const t=[];return this.sections.forEach(function(n){const i=structuredClone(n),r=e.items.filter(function(e){return e.section===n.id}).map(function(e){return structuredClone(e)});r&&r.length&&(i.items=r),t.push(i)}),t}},{key:"remove",value:function(){this.menu&&(this.menu.$destroy(),this.menu=null,clearInterval(this.interval))}},{key:"updateIndicator",value:function(e,t,n){this.updateSection(e,function(e){return e.indicator.status=n,e}),this.updateItem(t,function(e){return e.indicator.status=n,e})}},{key:"updateTag",value:function(e,t,n){this.updateSection(e,function(e){return e.tag=n,e}),this.updateItem(t,function(e){return e.tag=n,e})}},{key:"updateSectionTag",value:function(e,t){this.updateSection(e,function(e){return e.tag={...e.tag,...t},e})}},{key:"updateItemTag",value:function(e,t){this.updateItem(e,function(e){return e.tag={...e.tag,...t},e})}},{key:"updateSection",value:function(e,t){if(this.menu.props.items&&void 0!==e)for(let n in this.menu.props.items)this.menu.props.items[n].id===e&&(this.menu.props.items[n]=t(this.menu.props.items[n]))}},{key:"updateSectionItems",value:function(e,t){if(this.menu&&this.menu.props.items&&void 0!==e){const n=this.menu.props.items.findIndex(function(t){return t.id===e});n>-1&&(this.menu.props.items[n].items=t(this.menu.props.items[n].items))}}},{key:"getSectionIndexByItemId",value:function(e){if(this.menu)for(let t in this.menu.props.items)if(this.menu.props.items[t]&&Array.isArray(this.menu.props.items[t].items)){const n=this.menu.props.items[t].items.findIndex(function(t){return t.id===e});if(n>-1)return{sectionIndex:t,itemIndex:n}}}},{key:"updateItem",value:function(e,t){if(this.menu&&void 0!==e&&this.items){const n=this.getSectionIndexByItemId(e);n&&(this.menu.props.items[n.sectionIndex].items[n.itemIndex]=t(this.menu.props.items[n.sectionIndex].items[n.itemIndex]))}}},{key:"isTouch",value:function(){return ko.isMobile(!0)}},{key:"getSectionComponent",value:function(){}}])}();Tf=xf,Ir(xf,"MAX_TOUCH_WIDTH",1023),Ir(xf,"DEFAULT",{section:"any",sectionTitle:"Меню",priority:0,type:"link",open:!1}),Ir(xf,"app",!1),Ir(xf,"directNavigation",!1),Ir(xf,"menu",void 0),Ir(xf,"options",{directNavigation:!1,navigate:function(e){if(Tf.hide(),!Tf.isDirectNavigation()&&Tf.app){let t=Tf.app.getWorking("router");if(t)return t.navigate(e.short)}document.location.assign(e.full)}}),Ir(xf,"items",[]),Ir(xf,"sections",[]),Ir(xf,"menuStructure",[]),Ir(xf,"location",void 0),Ir(xf,"interval",void 0);var Ff=On("<div><!></div>");var Nf=On("<span> </span>"),Mf=On('<a aria-label="brand"><!> <!></a>');var Pf=On("<!> <!>",1);function Uf(e,t){!function(e,t){Z(t,!0);let n=rr(t,"classPrefix",3,"navbar-brand"),i=rr(t,"class",3,""),r=Zi(t,["$$slots","$$events","$$legacy","classPrefix","class","children"]);var o=Ff();$i(o,e=>({class:e,...r}),[()=>[n(),i()].join(" ")]),Bn(it(o),()=>t.children??g),In(e,o),ee()}(e,{children:(e,n)=>{var i=Pf(),r=rt(i);!function(e,t){Z(t,!0);let n=rr(t,"url",3,"/"),i=rr(t,"title",3,""),r=rr(t,"icon",19,()=>({src:"https://placehold.co/56x56.png",width:56,height:56})),o=rr(t,"classPrefix",3,"navbar-item"),s=rr(t,"titleClass",3,"navbar-item-brand-title"),a=rr(t,"class",3,"");var l=Mf(),u=it(l),c=e=>{eu(e,ir(r))};Gn(u,e=>{r()&&e(c)});var d=ot(u,2),f=e=>{var t=Nf(),n=it(t);kt(()=>{di(t,1,ai(s())),Pn(n,i())}),In(e,t)};Gn(d,e=>{i()&&e(f)}),kt(e=>{di(l,1,e),Oi(l,"href",n())},[()=>ai([o(),a()].join(" "))]),In(e,l),ee()}(r,ir(()=>t.brand)),Bn(ot(r,2),()=>t.children??g),In(e,i)},$$slots:{default:!0}})}var Rf=On('<a><span aria-hidden="true"></span> <span aria-hidden="true"></span> <span aria-hidden="true"></span> <span aria-hidden="true"></span></a>');function Df(e,t){Z(t,!0);let n=rr(t,"role",3,"button"),i=rr(t,"classPrefix",3,"navbar-burger"),r=rr(t,"ariaLabel",3,"menu"),o=rr(t,"ariaExpanded",3,"false"),s=rr(t,"dataTarget",7,"navbarBasicExample"),a=rr(t,"class",3,""),l=rr(t,"onclick",3,()=>{console.log("click")});Vn(()=>{X("navbarId")&&s(Y("navbarId"))});var u=Rf();let c;u.__click=function(...e){l()?.apply(this,e)},kt(e=>{c=di(u,1,e,null,c,{"is-active":t.active}),Oi(u,"role",n()),Oi(u,"aria-label",r()),Oi(u,"aria-expanded",o()),Oi(u,"data-target",s())},[()=>ai([i(),a()].join(" "))]),In(e,u),ee()}yn(["click"]);var jf=On("<div><!></div>");yn(["click","keyup"]);var Wf=On("<!> <!> <!> <!>",1);function Bf(e,t){Z(t,!0);const[n,i]=Qi();var r=Sn(),o=rt(r),s=e=>{var i=Wf(),r=rt(i),o=e=>{var i=$n();kt(()=>Pn(i,Yi(pr,"$LOCALE",n)[t.item.title])),In(e,i)};Gn(r,e=>{t.item.title&&e(o)});var s=ot(r,2),a=e=>{eu(e,ir(()=>t.item.icon))},l=e=>{var n=Sn(),i=rt(n),r=e=>{const n=Le(()=>ka.get(t.item.component));var i=Sn();ri(rt(i),()=>an(n),(e,n)=>{n(e,ir({get id(){return t.item.id}},()=>t.item.props))}),In(e,i)};Gn(i,e=>{"component"===t.item.type&&t.item.component&&ka.contains(t.item.component)&&e(r)},!0),In(e,n)};Gn(s,e=>{t.item.icon?e(a):e(l,!1)});var u=ot(s,2),c=e=>{no(e,ir({top:!0,right:!0,size:"small",get id(){return t.item.id}},()=>t.item.tag))};Gn(u,e=>{t.item.tag&&e(c)});var d=ot(u,2),f=e=>{co(e,ir({get id(){return t.item.id}},()=>t.item.indicator))};Gn(d,e=>{t.item.indicator&&e(f)}),In(e,i)},a=e=>{var n=Sn();Bn(rt(n),()=>t.children??g),In(e,n)};Gn(o,e=>{t.item?e(s):e(a,!1)}),In(e,r),ee(),i()}var Vf=On("<hr/>");function zf(e,t){Z(t,!0),rr(t,"class",3,"");var n=Sn(),i=rt(n),r=e=>{!function(e,t){let n=rr(t,"classPrefix",3,"navbar-divider");var i=Vf();kt(()=>di(i,1,`${n()??""} ${t.hidden?`is-hidden-${t.hidden}`:""}`)),In(e,i)}(e,ir(()=>t.item))},o=e=>{var n=Sn(),i=rt(n),r=e=>{!function(e,t){Z(t,!0);let n=rr(t,"classPrefix",3,"navbar-item"),i=rr(t,"class",3,""),r=rr(t,"target",3,"_self"),o=Zi(t,["$$slots","$$events","$$legacy","classPrefix","class","children","target"]);{let s=Le(()=>[n(),i()].join(" "));Ea(e,ir({get class(){return an(s)},get target(){return r()}},()=>o,{children:(e,n)=>{var i=Sn();Bn(rt(i),()=>t.children??g),In(e,i)},$$slots:{default:!0}}))}ee()}(e,ir({button:!1},()=>t.item,{children:(e,n)=>{var i=Sn();Bn(rt(i),()=>t.children??g),In(e,i)},$$slots:{default:!0}}))},o=e=>{!function(e,t){Z(t,!0);let n=rr(t,"id",3,""),i=rr(t,"classPrefix",3,"navbar-item"),r=rr(t,"hidden",3,""),o=rr(t,"class",3,""),s=rr(t,"role",3,"button"),a=rr(t,"tabIndex",3,0);var l=jf();l.__click=function(...e){t.onclick?.apply(this,e)};var u=Le(()=>t.onkeyup??(t.onclick?ko.onlyOnEnter(t.onclick):void 0));l.__keyup=function(...e){an(u)?.apply(this,e)},Bn(it(l),()=>t.children??g),kt(e=>{Oi(l,"id",n()),di(l,1,e),Oi(l,"role",s()),Oi(l,"tabindex",a())},[()=>ai([i(),r()?`is-hidden-${r()}`:"",o()].join(" "))]),In(e,l),ee()}(e,{get item(){return t.item},children:(e,n)=>{Bf(e,{get item(){return t.item}})},$$slots:{default:!0}})};Gn(i,e=>{"string"==typeof t.item.href?e(r):e(o,!1)},!0),In(e,n)};Gn(i,e=>{t.item.break?e(r):e(o,!1)}),In(e,n),ee()}var qf=On("<div><!> <div><!></div></div>");var Hf=On('<a class="navbar-link"> </a>');function Gf(e,t){Z(t,!0);const[n,i]=Qi();let r=Zi(t,["$$slots","$$events","$$legacy","item","label"]);var o=Sn(),s=rt(o),a=e=>{var i=Hf(),r=it(i);kt(()=>Pn(r,Yi(pr,"$LOCALE",n)[t.item.title||t.label])),In(e,i)},l=e=>{var n=Sn(),i=rt(n),o=e=>{Bf(e,ir(()=>r,{children:(e,n)=>{var i=$n();kt(()=>Pn(i,t.label)),In(e,i)},$$slots:{default:!0}}))},s=e=>{var n=Sn(),i=rt(n),r=e=>{Jf(e,{get item(){return t.item}})},o=e=>{var n=Sn(),i=rt(n),r=e=>{var n=Sn();Bn(rt(n),()=>t.label??g),In(e,n)};Gn(i,e=>{"function"==typeof t.label&&e(r)},!0),In(e,n)};Gn(i,e=>{"object"==typeof t.item?e(r):e(o,!1)},!0),In(e,n)};Gn(i,e=>{"string"==typeof t.label?e(o):e(s,!1)},!0),In(e,n)};Gn(s,e=>{t.arrowless?e(l,!1):e(a)}),In(e,o),ee(),i()}function Kf(e,t){Z(t,!0);let n=rr(t,"root",3,""),i=rr(t,"onclick",3,()=>{}),r=rr(t,"hidden",3,""),o=rr(t,"hoverable",3,!0),s=rr(t,"arrowless",3,!1),a=rr(t,"dropUp",3,!1),l=rr(t,"right",3,!1),u=rr(t,"boxed",3,!1);var c=Sn(),d=rt(c),f=e=>{{const c=(e,n=g)=>{{let i=Le(()=>({...t.item,items:null}));Gf(e,ir(n,{get item(){return an(i)}}))}},d=(e,n=g)=>{!function(e,t){Z(t,!0);var n=Sn(),i=rt(n),r=e=>{var n=Sn();Qn(rt(n),17,()=>t.items,e=>e.id,(e,t)=>{zf(e,{get item(){return an(t)}})}),In(e,n)},o=e=>{var n=Sn();Bn(rt(n),()=>t.children??g),In(e,n)};Gn(i,e=>{t.items&&t.items.length?e(r):e(o,!1)}),In(e,n),ee()}(e,ir(n,{get items(){return t.item.items}}))};!function(e,t){Z(t,!0);let n=rr(t,"hoverable",3,!0),i=rr(t,"dropUp",3,!1),r=rr(t,"boxed",3,!1),o=rr(t,"right",3,!1),s=rr(t,"root",7,"/"),a=rr(t,"onclick",7);Vn(()=>{X("root")&&s(Y("root")),X("onclick")&&a(Y("onclick"))});var l=qf();let u;var c=it(l);Bn(c,()=>t.label??g,()=>({root:s(),onclick:a()}));var d=ot(c,2);let f;Bn(it(d),()=>t.items??g,()=>({root:s(),onclick:a()})),kt(()=>{u=di(l,1,"navbar-item has-dropdown",null,u,{"is-hoverable":n()}),f=di(d,1,"navbar-dropdown",null,f,{"is-boxed":r(),"is-right":o(),"has-dropdown-up":i()})}),In(e,l),ee()}(e,{get hoverable(){return o()},get hidden(){return r()},get arrowless(){return s()},get dropUp(){return a()},get boxed(){return u()},get root(){return n()},get onclick(){return i()},get right(){return l()},label:c,items:d,children:(e,n)=>{kt(()=>{console.log({item:H(t.item)})})},$$slots:{label:!0,items:!0,default:!0}})}};Gn(d,e=>{t.item&&Object.hasOwn(t.item,"items")&&Array.isArray(t.item.items)&&t.item.items.length&&e(f)}),In(e,c),ee()}function Jf(e,t){Z(t,!0);let n=Zi(t,["$$slots","$$events","$$legacy","item"]);var i=Sn(),r=rt(i),o=e=>{Kf(e,ir({get renderer(){return zf},get item(){return t.item}},()=>n))},s=e=>{zf(e,ir({get item(){return t.item}},()=>n))};Gn(r,e=>{Object.hasOwn(t.item,"items")&&Array.isArray(t.item.items)&&t.item.items.length?e(o):e(s,!1)}),In(e,i),ee()}var Yf=On("<div><!></div>");var Qf=On("<div><!></div>");function Xf(e,t){let n=rr(t,"classPrefix",3,""),i=rr(t,"class",3,""),r=Zi(t,["$$slots","$$events","$$legacy","classPrefix","class","children"]);var o=Qf();$i(o,()=>({class:`${n()} ${i()}`,...r})),Bn(it(o),()=>t.children??g),In(e,o)}var Zf=On("<!> <!>",1);function eh(e,t){Z(t,!0);let n=rr(t,"id",7),i=rr(t,"items",19,()=>[]),r=rr(t,"root",7),o=rr(t,"onclick",7);function s(e,t){return void 0===e&&"start"===t||(!(!Array.isArray(e)||!e.includes(t))||"string"==typeof e&&e===t)}rr(t,"class",3,""),Vn(()=>{X("navbarId")&&n(Y("navbarId")),X("root")&&r(Y("root")),X("onclick")&&o(Y("onclick"))}),function(e,t){Z(t,!0);let n=rr(t,"classPrefix",3,"navbar-menu"),i=rr(t,"class",3,""),r=Zi(t,["$$slots","$$events","$$legacy","id","active","classPrefix","class","children"]),o=Le(()=>[n(),i()].join(" "));var s=Yf();$i(s,()=>({id:t.id,class:an(o),...r,[vi]:{"is-active":t.active}})),Bn(it(s),()=>t.children??g),In(e,s),ee()}(e,{get id(){return n()},get active(){return t.active},children:(e,n)=>{var a=Zf(),l=rt(a);!function(e,t){let n=Zi(t,["$$slots","$$events","$$legacy"]);Xf(e,ir(()=>n,{classPrefix:"navbar-start"}))}(l,{children:(e,n)=>{var a=Sn();Qn(rt(a),17,i,e=>e.id,(e,n)=>{var i=Sn(),a=rt(i),l=e=>{Jf(e,{hidden:"touch",get root(){return r()},get item(){return an(n)},get onclick(){return o()},get url(){return t.url}})};Gn(a,e=>{s(an(n).place,"start")&&e(l)}),In(e,i)}),In(e,a)},$$slots:{default:!0}}),function(e,t){let n=Zi(t,["$$slots","$$events","$$legacy"]);Xf(e,ir(()=>n,{classPrefix:"navbar-end"}))}(ot(l,2),{children:(e,n)=>{var a=Sn();Qn(rt(a),19,i,e=>e.id,(e,n)=>{var i=Sn(),a=rt(i),l=e=>{Jf(e,{hidden:"touch",get root(){return r()},get url(){return t.url},get item(){return an(n)},get onclick(){return o()},right:!0})};Gn(a,e=>{s(an(n).place,"end")&&e(l)}),In(e,i)}),In(e,a)},$$slots:{default:!0}}),In(e,a)},$$slots:{default:!0}}),ee()}var th=On("<nav><!></nav>");var nh,ih=On("<!> <!>",1);function rh(e,t){Z(t,!0);let n=rr(t,"id",3,"navbar"),i=rr(t,"active",7,!1),r=rr(t,"items",19,()=>[]),o=rr(t,"root",3,""),s=rr(t,"navigate",3,null),a=rr(t,"burgerControlsSidemenu",3,!0),l=rr(t,"class",3,""),u=rr(t,"onclick",3,()=>{});function c(){i(!i())}Q("root",o()),Q("navigate",s()),Q("burgerControlsSidemenu",a()),Q("navbarId",n()),Q("onclick",u()),Vn(()=>{}),function(e,t){Z(t,!0);let n=rr(t,"class",3,""),i=rr(t,"classPrefix",3,"navbar"),r=rr(t,"role",3,"navigation"),o=rr(t,"ariaLabel",3,"main navigation"),s=Zi(t,["$$slots","$$events","$$legacy","class","classPrefix","role","ariaLabel","children"]);var a=th();$i(a,e=>({class:e,role:r(),"aria-label":o(),...s}),[()=>[i(),n()].join(" ")]),Bn(it(a),()=>t.children??g),In(e,a),ee()}(e,{get class(){return l()},children:(e,n)=>{var o=ih(),s=rt(o),a=e=>{Uf(e,{get brand(){return t.brand},children:(e,n)=>{var r=Sn(),o=rt(r),s=e=>{Df(e,{get active(){return i()},onclick:c})};Gn(o,e=>{t.burger&&e(s)}),In(e,r)}})},l=e=>{var n=Sn(),r=rt(n),o=e=>{Df(e,{get active(){return i()},onclick:c})};Gn(r,e=>{t.burger&&e(o)},!0),In(e,n)};Gn(s,e=>{t.brand?e(a):e(l,!1)}),eh(ot(s,2),{get active(){return i()},get items(){return r()},get url(){return t.url}}),In(e,o)},$$slots:{default:!0}}),ee()}let oh=function(e){function t(){return kr(this,t),mr(this,t,arguments)}return Cr(t,e),Sr(t,null,[{key:"initMenuProps",value:function(){return{id:this.getOptions()?.id,active:this.getOptions()?.active,items:this.menuStructure,root:this.getOptions()?.root,navigate:this.getOptions()?.navigate,brand:this.getOptions()?.brand,burger:this.getOptions()?.burger,burgerControlsSidemenu:this.getOptions()?.burgerControlsSidemenu,class:this.getOptions()?.class,onclick:this.getOptions()?.onclick,url:this.getCurrentUrl()}}},{key:"render",value:function(e){if(e&&this.setApp(e),!this.menu){this.prepareData();let e=this.initMenuProps();const n=document.querySelector(this.getOptions().targetSelector);if(!n)return;this.menu=new Ju(rh,n,e,!0),this.interval=setInterval(this.updateMenuActiveItem.bind(this),t.INTERVAL_UPDATE_ACTIVE_ITEM)}}},{key:"updateMenuActiveItem",value:function(){this.menu.set("url",this.getCurrentUrl())}},{key:"toggle",value:function(){this.menu.set("active",!this.menu.get("active"))}},{key:"hide",value:function(){this.menu.set("active",!1)}},{key:"show",value:function(){this.menu.set("active",!0)}},{key:"setBurgerState",value:function(e){this.menu.set("menuClosed",e)}}])}(xf);nh=oh,Ir(oh,"DEFAULT",{section:"any",sectionTitle:"Меню",priority:0,type:"link",place:"main"}),Ir(oh,"options",{brand:!1,type:"top",items:[],sections:[],targetSelector:"#top-menu",root:"/",directNavigation:!1,navigate:function(e){if(nh.hide(),!nh.isDirectNavigation()&&nh.app){let t=nh.app.getWorking("router");if(t)return t.navigate(e.short)}document.location.assign(e.full)}});var sh=On("<li><a> <!> <!></a></li>"),ah=On("<li> <!> <!></li>");yn(["click"]);var lh=On('<span class="icon is-small is-toggle-submenu is-pulled-right"><i aria-hidden="true"></i></span>');function uh(e,t){Z(t,!0);const n="fa-angle-down",i="fa-angle-up";let r=rr(t,"icon_opened",19,()=>n),o=rr(t,"icon_closed",19,()=>i),s=rr(t,"closed",15,!1),a=rr(t,"ontoggle",3,()=>{});function l(e){return e&&e.preventDefault()&&e.stopPropagation(),s(!s()),a()({closed:s()}),!1}var u=lh();u.__click=l,u.__keyup=l;var c=it(u);kt(()=>di(c,1,`fas ${(s()?o():r())??""}`)),In(e,u),ee()}yn(["click","keyup"]);var ch=On('<span class="is-no-link"> </span>'),dh=On("<!> <!> <!> <!>",1);function fh(e,t){Z(t,!0);const[n,i]=Qi();let r=rr(t,"item",19,()=>({}));var o=dh(),s=rt(o),a=e=>{Ql(e,ir(()=>r().icon))},l=e=>{var t=Sn(),i=rt(t),o=e=>{const t=Le(()=>ka.get(r().component));var n=Sn();ri(rt(n),()=>an(t),(e,t)=>{t(e,ir({get id(){return r().id}},()=>r().props))}),In(e,n)},s=e=>{var t=ch(),i=it(t);kt(()=>Pn(i,Yi(pr,"$LOCALE",n)[r().title])),In(e,t)};Gn(i,e=>{"component"===r().type&&r().component&&ka.contains(r().component)?e(o):e(s,!1)},!0),In(e,t)};Gn(s,e=>{r().icon?e(a):e(l,!1)});var u=ot(s,2),c=e=>{no(e,ir({get id(){return r().id}},()=>r().tag))};Gn(u,e=>{r().tag&&e(c)});var d=ot(u,2),f=e=>{co(e,ir({get id(){return r().id}},()=>r().indicator))};Gn(d,e=>{r().indicator&&e(f)}),Bn(ot(d,2),()=>t.children??g),In(e,o),ee(),i()}var hh=On('<a class="has-subitems"><!></a>'),gh=On("<li><!> <!></li>"),ph=On("<ul></ul>");function vh(e,t){Z(t,!0);let n=Ge({}),i=rr(t,"root",3,""),r=rr(t,"items",19,()=>[]),o=rr(t,"closed",3,!1),s=rr(t,"onnavigate",3,()=>{});function a(e){return e.preventDefault(),s()({full:e.target.getAttribute("href"),short:e.target.dataset.href}),!1}var l=ph();Qn(l,21,r,Yn,(e,t,r)=>{var o=Sn(),l=rt(o),u=e=>{var o=gh(),l=it(o),u=e=>{var o=hh();o.__click=a,fh(it(o),{get item(){return an(t)},children:(e,t)=>{uh(e,{ontoggle:e=>{n[r]=e.closed}})},$$slots:{default:!0}}),kt(()=>{Oi(o,"href",`${i()??""}${an(t).href??""}`),Oi(o,"data-href",an(t).href)}),In(e,o)},c=e=>{fh(e,{get item(){return an(t)},children:(e,t)=>{uh(e,{ontoggle:e=>{n[r]=e.closed}})},$$slots:{default:!0}})};Gn(l,e=>{void 0!==an(t).href&&!1!==an(t).href?e(u):e(c,!1)}),vh(ot(l,2),{get root(){return i()},get items(){return an(t).items},get onnavigate(){return s()},get closed(){return n[r]},set closed(e){n[r]=e}}),kt(()=>di(o,1,`is-no-follow-subtitle ${an(t).classes??""}`)),In(e,o)},c=e=>{!function(e,t){Z(t,!0);const n=()=>Yi(pr,"$LOCALE",i),[i,r]=Qi();let o=rr(t,"root",3,""),s=rr(t,"item",19,()=>({})),a=rr(t,"onnavigate",3,()=>{});function l(e){return e.preventDefault(),a()({full:e.target.getAttribute("href"),short:e.target.dataset.href}),!1}var u=Sn(),c=rt(u),d=e=>{var t=sh(),i=it(t);i.__click=l;var r=it(i),a=ot(r),u=e=>{co(e,ir({get id(){return s().id}},()=>s().tag))};Gn(a,e=>{s().tag&&e(u)});var c=ot(a,2),d=e=>{co(e,ir({get id(){return s().id}},()=>s().indicator))};Gn(c,e=>{s().indicator&&e(d)}),kt(()=>{di(t,1,ai(s().classes)),Oi(i,"href",`${o()??""}${s().href??""}`),Oi(i,"data-href",s().href),Pn(r,`${n()[s().title]??""} `)}),In(e,t)},f=e=>{var t=Sn(),i=rt(t),r=e=>{var t=ah(),i=it(t),r=ot(i),o=e=>{co(e,ir({get id(){return s().id}},()=>s().tag))};Gn(r,e=>{s().tag&&e(o)});var a=ot(r,2),l=e=>{co(e,ir({get id(){return s().id}},()=>s().indicator))};Gn(a,e=>{s().indicator&&e(l)}),kt(()=>{di(t,1,`is-no-follow-subtitle ${s().classes??""}`),Pn(i,`${n()[s().title]??""} `)}),In(e,t)};Gn(i,e=>{s().break||e(r)},!0),In(e,t)};Gn(c,e=>{void 0!==s().href&&!1!==s().href?e(d):e(f,!1)}),In(e,u),ee(),r()}(e,{get root(){return i()},get item(){return an(t)},get onnavigate(){return s()}})};Gn(l,e=>{an(t).items&&an(t).items.length?e(u):e(c,!1)}),In(e,o)}),kt(()=>di(l,1,"menu-list "+(o()?"is-closed":""))),In(e,l),ee()}yn(["click"]);var mh=On("<p><!> <!> <!></p>"),yh=On("<!> <!>",1);function kh(e,t){Z(t,!0);const[n,i]=Qi();let r=rr(t,"root",3,""),o=rr(t,"onnavigate",3,()=>{});var s=yh(),a=rt(s),l=e=>{var i=Sn(),r=rt(i),o=e=>{var i=mh(),r=it(i),o=e=>{const n=Le(()=>ka.get(t.section.component));var i=Sn();ri(rt(i),()=>an(n),(e,n)=>{n(e,ir({get id(){return t.section.id}},()=>t.section.props))}),In(e,i)},s=e=>{var i=$n();kt(()=>Pn(i,Yi(pr,"$LOCALE",n)[t.section.title])),In(e,i)};Gn(r,e=>{"component"===t.section.type&&t.section.component&&ka.contains(t.section.component)?e(o):e(s,!1)});var a=ot(r,2),l=e=>{co(e,ir({get id(){return t.section.id}},()=>t.section.tag))};Gn(a,e=>{t.section.tag&&e(l)});var u=ot(a,2),c=e=>{co(e,ir({get id(){return t.section.id}},()=>t.section.indicator))};Gn(u,e=>{t.section.indicator&&e(c)}),kt(()=>di(i,1,`menu-label ${t.section.classes??""}`)),In(e,i)};Gn(r,e=>{(t.section.items&&t.section.items.length||t.section.component||t.section.tag||t.section.indicator)&&e(o)}),In(e,i)};Gn(a,e=>{t.section&&e(l)});var u=ot(a,2),c=e=>{vh(e,{get root(){return r()},get items(){return t.section.items},get onnavigate(){return o()}})};Gn(u,e=>{t.section.items&&t.section.items.length&&e(c)}),In(e,s),ee(),i()}var bh,_h=On('<aside id="side-menu"></aside>');function wh(e,t){Z(t,!0);let n=rr(t,"root",3,""),i=rr(t,"items",19,()=>[]),r=rr(t,"navigate",3,null);var o=_h();let s;Qn(o,21,i,e=>e.id,(e,t)=>{kh(e,{get section(){return an(t)},get root(){return n()},get onnavigate(){return r()}})}),kt(()=>{s=di(o,1,"menu main-menu",null,s,{"is-active":t.open}),hi(o,`${t.height}; ${t.marginTop};`)}),In(e,o),ee()}const Oh="side";let $h=function(e){function t(){return kr(this,t),mr(this,t,arguments)}return Cr(t,e),Sr(t,null,[{key:"initMenuUIProps",value:function(){return{items:this.menuStructure,root:this.getOptions().root,navigate:this.getOptions().navigate,class:this.getOptions()?.class,onclick:this.getOptions()?.onclick,url:this.getCurrentUrl()}}},{key:"render",value:function(e){if(e&&this.setApp(e),!this.menu){this.prepareData();let e=this.initMenuUIProps();const n=document.querySelector(this.getOptions().targetSelector);if(!n)return;this.menu=new Ju(wh,n,e,!0),this.initSizeResponse(),this.interval=setInterval(this.updateMenuActiveItem.bind(this),t.INTERVAL_UPDATE_ACTIVE_ITEM)}}},{key:"update",value:function(){this.menu&&(this.menu.destroy(),this.createUI(this.initMenuUIProps()))}},{key:"itemIsActive",value:function(e){return(this.location+"/").indexOf(e+"/")>-1}},{key:"updateMenu",value:function(){var e=this;Array.from(document.querySelectorAll(this.getOptions().targetSelector+" a")).forEach(function(t){e.itemIsActive(t.getAttribute("href"))?t.classList.add("is-active"):t.classList.remove("is-active")})}},{key:"updateMenuActiveItem",value:function(){let e=window.location.toString(),t=this.location;t?e!==t&&(this.location=e,this.updateMenu()):(this.location=e,this.updateMenu())}},{key:"initSizeResponse",value:function(){this.nav=document.querySelector("nav.navbar"),this.aside=document.querySelector("aside"),this.main=document.querySelector("main"),this.resizeAsideAndMain(),this.resizeMain(),window.addEventListener("resize",this.resizeMain.bind(this)),this.isTouch()&&(this.getOptions().open?this.show():this.hide())}},{key:"resizeMain",value:function(){if(this.menu)if(this.isTouch())this.menu.get("open")?this.main.style.display="none":(this.main.style.display="block",this.main.style.marginLeft="0px");else{const e=this.aside.getBoundingClientRect();this.main.style.display="block","0px"===this.main.style.height&&(this.main.style.height="auto"),this.main.style.marginLeft=e.width+e.left+"px"}}},{key:"resizeAside",value:function(){if(this.menu&&"none"!==this.aside.style.display){const e=this.nav.getBoundingClientRect();this.menu.set("height",window.innerHeight-e.height+"px)"),this.menu.set("marginTop",e.height+"px")}}},{key:"resizeAsideAndMain",value:function(){if(!this.menu)return;let e=this.nav.getBoundingClientRect();this.menu.set("height",window.innerHeight-e.height+"px")}},{key:"bindToggle",value:function(){var e=this;const t=document.querySelectorAll(this.getOptions().toggleSelector);Array.from(t).forEach(function(t){t.removeEventListener("click",e.toggle.bind(e)),t.addEventListener("click",e.toggle.bind(e))})}},{key:"toggle",value:function(e){return e&&e.preventDefault(),this.isTouch()?this.menu.set("open",!0):this.menu.set("open",!1),this.resizeMain(),!1}},{key:"hide",value:function(e){return e&&e.preventDefault(),this.isTouch()?this.menu.set("open",!0):this.menu.set("open",!1),this.resizeMain(),!1}},{key:"show",value:function(e){return e&&e.preventDefault(),this.isTouch()?this.menu.set("open",!0):this.menu.set("open",!1),this.resizeMain(),!1}},{key:"isOpen",value:function(){return!!this.menu&&this.menu.get("open",!0)}}])}(xf);bh=$h,Ir($h,"DEFAULT",{section:"any",sectionTitle:"Меню",priority:0,open:!0,type:"link"}),Ir($h,"options",{directNavigation:!1,type:Oh,items:[],sections:[],targetSelector:`#${Oh}-menu`,toggleSelector:`.${Oh}-menu-toggle`,root:"/",open:!0,navigate:function(e){if(bh.isTouch()&&(bh.hide(),bh.app&&bh.app.emit("top-navbar-burger:update",{closed:!0})),!bh.isDirectNavigation()&&bh.app){let t=bh.app.getWorking("router");if(t)return t.navigate(e.short)}document.location.assign(e.full)}});const Sh=function(e){return Object.hasOwn(e,"status")&&Object.hasOwn(e,"result")?e.result:e};const Ih=["create","update","list","delete","details"],Ah=function(e,t,n){return"object"==typeof e&&Object.hasOwn(e,t)?e[t]:n};let Ch=function(){return Sr(function e(){kr(this,e)},null,[{key:"getFilter",value:function(e,t){return Ah(t,"filter",{})}},{key:"getSorter",value:function(e,t){return Ah(t,"sorter",{})}},{key:"getPager",value:function(e,t){return Ah(t,"pager",{})}},{key:"getMethod",value:function(e,t){return Ah(t,"method","listAll")}},{key:"getModelName",value:function(e,t){if("string"==typeof t)return Qr.lowerFirstLetter(t);if("object"==typeof t)return Qr.lowerFirstLetter(Ah(t,"modelName"));throw new Error("Controller Action Preload Option's model is not defined")}},{key:"getIdField",value:function(e,t){return Ah(t,"idField","id")}},{key:"getTitleField",value:function(e,t){return Ah(t,"titleField","title")}},{key:"setVariants",value:function(e,t,n,i){e.setOptions(`variants.${t}.${n}`,i)}},{key:"getActionsPreloads",value:function(e,t){return e.getOptions(`${t}.preload`,{})}},{key:"getControllersPreloads",value:function(e){return e.getOptions("preload",{})}},{key:"getPreloads",value:function(e,t){let n=this.getActionsPreloads(e,t);return 0==Object.keys(n).length&&(n=this.getControllersPreloads(e)),n}},{key:"preloadRestricted",value:function(e,t){return e.getOptions("preloadable",Ih).includes(t)}},{key:"addPreloadRequest",value:function(e,t,n){var i=this;return function(r){const o=i.getModelName(e,t[r]),s=e.make[o]({}),a=i.getMethod(e,t[r]);n.push(s[`$${a}`]())}}},{key:"loadAll",value:async function(e,t){const n=[];return Object.keys(t).forEach(this.addPreloadRequest(e,t,n)),await Promise.all(n)}},{key:"getPreloadOptions",value:function(e,t,n){return t[n]}},{key:"getListItemTransformer",value:function(e,t){const n=this.getCustomListItemTransformer(e,t);return"function"==typeof n?n(e,t):this.getDefaultTransformer(e,t)}},{key:"getCustomListItemTransformer",value:function(e,t){return Ah(t,"itemTransformer")}},{key:"getDefaultTransformer",value:function(e,t){var n=this;return function(i){return{id:i[n.getIdField(e,t)],title:i[n.getTitleField(e,t)]}}}},{key:"transformAndAddToLibResults",value:function(e,t,n,i,r){const o=this.getListItemTransformer(e,i),s=r.map(o);this.setVariants(e,t,n,s)}},{key:"resultIsNotEmpty",value:function(e){return"ok"===e.status&&Array.isArray(e.result)}},{key:"preload",value:async function(e,t="list"){var n=this;try{if(!this.preloadRestricted(e,t))return;const i=this.getPreloads(e,t);if(0===Object.keys(i).length)return;const r=await this.loadAll(e,i);Object.keys(i).forEach(function(o,s){const a=i[o];n.resultIsNotEmpty(r[s])&&n.transformAndAddToLibResults(e,t,o,a,r[s].result)}),e.log("preload finished")}catch(t){e.report(t),e.showErrorMessage(t)}}}])}();let Eh=function(){function e(){kr(this,e)}return Sr(e,null,[{key:"extractActionName",value:function(e,t){let n=e.getOptions("defaultAction","list");return 1===t.length?n="create"===t[0]?"create":e.actionHandlerExists(t[0])?t[0]:"details":t.length>1&&(n="delete"===t[1]?"delete":"update"===t[1]?"update":t[1]),n}},{key:"route",value:function(t,n){try{const i=e.extractActionName(t,n);return t.setCurrentAction(i),t.runAction(i,n)}catch(e){t.report(e),t.showErrorMessage(e)}}}])}(),Lh=function(){return Sr(function e(){kr(this,e)},null,[{key:"error",value:function(e,t,n){e.setUI("__message__",Un(Ou,{target:e.getContainerInnerElement(),props:{title:t,message:n}}))}},{key:"success",value:function(e,t,n){e.setUI("__message__",Un(Su,{target:e.getContainerInnerElement(),props:{title:t,message:n}}))}}])}();const Th="Просмотр";let xh=function(){return Sr(function e(){kr(this,e)},null,[{key:"NAVIGATION_DELAY",get:function(){return qo}},{key:"deafultBreadcrumbsTail",get:function(){return Th}},{key:"breadcrumbsTails",get:function(){return{preset:Th,set:'Просмотр, "{:title}"'}}},{key:"getBreadcrumbsTail",value:function(e){return this.breadcrumbsTails?Qr.select(this.breadcrumbsTails,e,this.deafultBreadcrumbsTail):""}},{key:"ACTION",get:function(){return"details"}},{key:"MODEL_ACTION_GET",get:function(){return"get"}},{key:"MODEL_ACTION_PUT",get:function(){return"get"}},{key:"UIConstructor",get:function(){return lf}},{key:"TRANSFORMER",get:function(){return Sh}},{key:"getIdField",value:function(e){return e.getOptions(`${this.ACTION}.idField`,"_id")}},{key:"loadDataQuery",value:function(e,t){const n=this.getIdField(e);return{[n]:t[0]}}},{key:"loadData",value:async function(e,t){const n=this.loadDataQuery(e,t),i=this.getModelActionName(e);return await e.getModel(n)[`$${i}`]()}},{key:"getModelActionName",value:function(e){return e.getOptions(`${this.ACTION}.actionName`,this.MODEL_ACTION_GET)}},{key:"presetBreadcrumbs",value:function(e,t){e.setBreadcrumbs([{title:this.getBreadcrumbsTail("preset"),url:e.getModelActionURL(t[0],!1)}])}},{key:"getTitle",value:function(e,t,n){return e.getItemTitle(n.result)}},{key:"setBreadcrumbs",value:function(e,t,n){const i=this.getTitle(e,t,n),r=this.getBreadcrumbsTail("set");e.setBreadcrumbs([{title:r?Zr.format(r,{title:i}):i,url:e.getModelActionURL(t[0],!1)}])}},{key:"isResponseBad",value:function(e){return!e||"ok"!==e.status}},{key:"getValidators",value:function(e){return e.getValidators&&e.getValidators()||e.getOptions("Validators")}},{key:"prepareUIOptions",value:function(e,t){const n=this.getModelActionName(e);return{options:{target:e.getContainerInnerElement(),model:e.getModelName(),action:n,name:`${e.getName()}.${this.ACTION}Form`,fields:{readonly:!0},validators:this.getValidators(e),variants:e.getOptions(`variants.${this.ACTION}`,{}),masters:e.getOptions(`${this.ACTION}.masters`,{}),injected:e.getOptions(`${this.ACTION}.injected`,{})},data:this.TRANSFORMER(t.result)}}},{key:"getUI",value:function(e){return e.getUI(this.ACTION)}},{key:"setUI",value:function(e,t){e.setUI(this.ACTION,t)}},{key:"setUILoading",value:function(e){this.getUI(e).set("loading",!0)}},{key:"setUILoaded",value:function(e){this.getUI(e).set("loading",!1)}},{key:"setUIError",value:function(e,t){this.getUI(e).set("error",t)}},{key:"bindUIEvents",value:function(e,t,n){Qr.isFunc(e.goBack)&&this.bindUIEvent(e,"onreject",function(){return e.goBack()})}},{key:"bindUIEvent",value:function(e,t,n){const i=this.getUI(e);return i.$on?i.$on(t,n):i.on?i.on(t,n):void 0}},{key:"isUIRendered",value:function(e){return!!this.getUI(e)||(e.$destroyUI(),!1)}},{key:"tweakUIOptions",value:function(e){return e}},{key:"buildUI",value:function(e,t){this.UIConstructor.prototype instanceof Fu?this.setUI(e,new this.UIConstructor(t)):this.setUI(e,new Ju(this.UIConstructor,e.getContainerInnerElement(),t))}},{key:"run",value:async function(e,t){try{if(e.emit(`before:render:${this.ACTION}`,t),this.isUIRendered(e))return;e.renderLoadingScreen&&e.renderLoadingScreen(),await e.preloadVariants(this.ACTION),this.presetBreadcrumbs(e,t);const n=await this.loadData(e,t);if(this.isResponseBad(n))return e.showErrorMessage(n);this.setBreadcrumbs(e,t,n),this.buildUI(e,this.tweakUIOptions(this.prepareUIOptions(e,n))),this.bindUIEvents(e,t,n),e.emit(`after:render:${this.ACTION}`,t,n)}catch(n){e.emit(`exception:render:${this.ACTION}`,t,n),e.report(n),e.showErrorMessage(n)}finally{e.removeLoadingScreen&&e.removeLoadingScreen()}}},{key:"goBackAfterDelay",value:function(e){e.goBack(this.NAVIGATION_DELAY)}},{key:"goBack",value:function(e){e.goBack(0)}}])}();const Fh="create";let Nh=function(e){function t(){return kr(this,t),mr(this,t,arguments)}return Cr(t,e),Sr(t,null,[{key:"deafultBreadcrumbsTail",get:function(){return"Создание"}},{key:"breadcrumbsTails",get:function(){}},{key:"ACTION",get:function(){return Fh}},{key:"MODEL_ACTION_GET",get:function(){return Fh}},{key:"MODEL_ACTION_PUT",get:function(){return Fh}},{key:"loadData",value:function(e,t){let n=e.createDefault();return n.getData&&(n=n.getData()),{status:"ok",result:n}}},{key:"getTitle",value:function(e,t,n){return e.getItemTitle(n)}},{key:"prepareUIOptions",value:function(e,t){const n=this.getModelActionName(e);return{options:{target:e.getContainerInnerElement(),model:e.getModelName(),action:n,name:`${e.getName()}.${this.ACTION}Form`,validators:this.getValidators(e),variants:e.getOptions(`variants.${this.ACTION}`,{}),masters:e.getOptions(`${this.ACTION}.masters`,{})},data:this.TRANSFORMER(t)}}},{key:"bindUIEvents",value:function(e,t,n){var i=this;Qr.isFunc(e.goBack)&&this.bindUIEvent(e,"onreject",function(){return i.goBack(e)}),Qr.isFunc(e.onActionSubmit)&&this.bindUIEvent(e,"onsubmit",async function(n){await e.onActionSubmit(i.ACTION,{...i.loadDataQuery(e,t),...n})&&i.goBackAfterDelay(e)})}}])}(xh),Mh=function(e){function t(){return kr(this,t),mr(this,t,arguments)}return Cr(t,e),Sr(t)}(Nh),Ph=function(e){function t(){return kr(this,t),mr(this,t,arguments)}return Cr(t,e),Sr(t,null,[{key:"tweakUIOptions",value:function(e){return e.options.ui={submit:{enabled:!1}},e}},{key:"run",value:async function(e,t){try{if(e.emit(`before:render:${this.ACTION}`,t),this.isUIRendered(e))return;e.renderLoadingScreen&&e.renderLoadingScreen(),await e.preloadVariants(this.ACTION),this.presetBreadcrumbs(e,t);const n=await this.loadData(e,t);if(this.isResponseBad(n))return e.showErrorMessage(n);this.setBreadcrumbs(e,t,n),this.buildUI(e,this.tweakUIOptions(this.prepareUIOptions(e,n))),this.bindUIEvents(e,t,n),e.emit(`after:render:${this.ACTION}`,t,n)}catch(n){e.emit(`exception:render:${this.ACTION}`,t,n),e.report(n),e.showErrorMessage(n)}finally{e.removeLoadingScreen&&e.removeLoadingScreen()}}}])}(xh),Uh=function(e){function t(){return kr(this,t),mr(this,t,arguments)}return Cr(t,e),Sr(t)}(Ph);const Rh="Редактирование";let Dh=function(e){function t(){return kr(this,t),mr(this,t,arguments)}return Cr(t,e),Sr(t,null,[{key:"deafultBreadcrumbsTail",get:function(){return Rh}},{key:"breadcrumbsTails",get:function(){return{preset:Rh,set:`${Rh}: "{:title}"`}}},{key:"ACTION",get:function(){return"update"}},{key:"MODEL_ACTION_GET",get:function(){return"getRaw"}},{key:"MODEL_ACTION_PUT",get:function(){return"update"}},{key:"prepareUIOptions",value:function(e,t){return{options:{target:e.getContainerInnerElement(),model:e.getModelName(),action:this.MODEL_ACTION_PUT,name:`${e.getName()}.${this.ACTION}Form`,validators:this.getValidators(e),variants:e.getOptions(`variants.${this.ACTION}`,{}),ui:e.getOptions(`${this.ACTION}.ui`,{}),fields:e.getOptions(`${this.ACTION}.fields`,{}),masters:e.getOptions(`${this.ACTION}.masters`,{})},data:this.TRANSFORMER(Qr.stripProxy(t.result))}}},{key:"bindUIEvents",value:function(e,t,n){var i=this;Qr.isFunc(e.goBack)&&this.bindUIEvent(e,"onreject",function(){return i.goBack(e)}),Qr.isFunc(e.onActionSubmit)&&this.bindUIEvent(e,"onsubmit",async function(n){await e.onActionSubmit(i.ACTION,{...i.loadDataQuery(e,t),...n})&&i.goBackAfterDelay(e)})}},{key:"isUIRendered",value:function(e){return!!this.getUI(e)||(e.$destroyUI(),!1)}},{key:"run",value:async function(e,t){try{if(e.emit(`before:render:${this.ACTION}`,[t]),this.isUIRendered(e))return;e.renderLoadingScreen&&e.renderLoadingScreen(),await e.preloadVariants(this.ACTION),this.presetBreadcrumbs(e,t);const n=await this.loadData(e,t);if(this.isResponseBad(n))return e.showErrorMessage(n);this.setBreadcrumbs(e,t,n),this.buildUI(e,this.tweakUIOptions(this.prepareUIOptions(e,n))),this.bindUIEvents(e,t,n),e.emit(`after:render:${this.ACTION}`,t)}catch(n){e.emit(`exception:render:${this.ACTION}`,t,n),e.report(n),e.showErrorMessage(n)}finally{e.removeLoadingScreen&&e.removeLoadingScreen()}}}])}(xh),jh=function(e){function t(){return kr(this,t),mr(this,t,arguments)}return Cr(t,e),Sr(t)}(Dh);const Wh="delete";let Bh=function(){return Sr(function e(){kr(this,e)},null,[{key:"run",value:async function(e,t){try{if(e.ui[Wh])return;if(e.$destroyUI(),e.ui[Wh]=new Gc({name:"CRUDDelete",target:e.getContainerInnerElement(),options:{loaderActive:!0,loaderStyle:"container",loaderTitle:"not-node:crud_delete_action_waiting",container:{id:`crud-delete-action-${t[0]}`}}}),e.setBreadcrumbs([{title:"Удаление",url:e.getModelActionURL(t[0],Wh)}]),confirm("Удалить запись?")){const n=e.getOptions(`${Wh}.actionName`,"delete");return void(await e.onActionSubmit(n,{_id:t[0]})&&e.goList())}e.goList()}catch(t){e.report(t),e.showErrorMessage(t)}}}])}();const Vh="list";let zh=function(){function e(){kr(this,e)}return Sr(e,null,[{key:"tweakActionsList",value:function(e,t){return e.getOptions(`${Vh}.createAction`,!0)&&t.push({title:"Создать",action:function(){return e.goCreate()}}),t}},{key:"tweakUIOptions",value:function(e){return e}},{key:"createActionsButtons",value:function(e,t,n=0,i=["details","update","delete"],r=[],o=[],s=!0){const a={details:{action:function(){return e.goDetails(t,n)},...s?{icon:"circle-info"}:{title:"Подробнее"},size:"small"},update:{action:function(){return e.goUpdate(t,n)},...s?{icon:"edit"}:{title:"Изменить"},color:"warning",size:"small"},delete:{action:function(){return e.goDelete(t,n)},color:"danger",...s?{icon:"trash"}:{title:"Удалить"},size:"small",style:"outlined"}},l=[...r];return Array.isArray(i)&&i.forEach(function(e,t){return l.push({...a[e]})}),l.push(...o),ko.addIds(l)}},{key:"run",value:async function(t,n){try{if(t.renderLoadingScreen&&t.renderLoadingScreen(),await t.preloadVariants(Vh),t.setBreadcrumbs([{title:"Список",url:t.getModelURL()}]),t.ui[Vh])return;t.$destroyUI(),t.ui[Vh]=new Wc(this.tweakUIOptions(e.prepareOptions(t))),t.emit(`after:render:${Vh}`,n,t.ui[Vh])}catch(e){t.emit(`exception:render:${Vh}`,n,e),t.report(e),t.showErrorMessage(e)}finally{t.removeLoadingScreen&&t.removeLoadingScreen()}}},{key:"prepareOptions",value:function(e){const t={interface:e.getOptions(`${Vh}.interface`,{combined:!0,factory:e.getInterface()}),fields:void 0,showSelect:void 0,getItemId:void 0,idField:void 0,preload:{},filterUI:e.getOptions(`${Vh}.filterUI`),pager:{size:50,page:0},sorter:{id:-1},filter:void 0,ui:void 0};let n=[...e.getOptions(`${Vh}.actions`,[])];n=this.tweakActionsList(e,n);const i={options:{targetEl:e.getContainerInnerElement(),endless:!1,actions:n}};return Object.keys(t).forEach(function(n){let r=e.getOptions(`${Vh}.${n}`,t[n]);void 0!==r&&(i.options[n]=r)}),i}}])}();var qh={create:Mh,details:Uh,update:jh,delete:Bh,list:zh};const Hh=[],Gh=["title","label","id","name"],Kh="loading_screen";var Jh=new WeakMap,Yh=new WeakMap,Qh=new WeakMap,Xh=new WeakMap;let Zh=function(e){function t(e,n,{actions:i,router:r,preloader:o}={actions:void 0,router:void 0,preloader:void 0}){var s;return kr(this,t),_r(s=mr(this,t,[e,`CRUD.${n}`]),Jh,{...qh}),_r(s,Yh,Eh),_r(s,Qh,Ch),Ir(s,"TITLE_FIELDS_PRIORITY",Gh),Ir(s,"TOP_CLASS",["box"]),Ir(s,"MAIN_CLASS",["box"]),Ir(s,"BOTTOM_CLASS",["box"]),Ir(s,"WS_CHECK_INTERVAL",200),_r(s,Xh,{loading:!0,title:""}),i&&wr(Jh,s,{...br(Jh,s),...i}),r&&wr(Yh,s,r),o&&wr(Qh,s,o),s.ui={},s.els={},s.setOptions("names",{module:"",plural:"plural",single:"single"}),s.setOptions("containerSelector",s.app?.getOptions("crud.containerSelector")),s.buildFrame(),Lr(s,s)}return Cr(t,e),Sr(t,[{key:"setValidators",value:function(e){const t=this.getModuleName().split("-"),n=`ns${("not"===t[0]?t.splice(1):t).map(Qr.capitalizeFirstLetter).join("")}Common`,i=this.app?.getService(n);this.setWorking("validators",i.augmentValidators(e))}},{key:"getValidators",value:function(){return this.getWorking("validators")}},{key:"start",value:function(){var e=this;let t=[];this.getModuleName()&&this.getOptions("names.module")&&t.push({title:this.getOptions("names.module"),href:!1}),t.push({title:this.getOptions("names.plural"),href:this.getModelURL()}),Hh.splice(0,Hh.length,...t),Lf.setHead(Hh).render({root:"",target:this.els.top,navigate:function(t){return e.app?.getWorking("router").navigate(t)}}),this.route(this.getOptions("params"))}},{key:"startWhenWSClientReady",value:function(){var e=this;this.app?.getWSClient()?this.app?.getWSClient().isConnected()?this.start():this.app.getWSClient().once("connected",this.startWhenWSClientReady.bind(this)):setTimeout(function(){return e.startWhenWSClientReady()},this.WS_CHECK_INTERVAL)}},{key:"setBreadcrumbs",value:function(e){Lf.setTail(e).update()}},{key:"backToList",value:function(){this.navigate(this.linkBackToList())}},{key:"linkBackToList",value:function(){return this.getModelURL()}},{key:"afterAction",value:function(e="list"){let t=this.app?.getOptions("crud.navigateBackAfter",[]);t&&Array.isArray(t)&&t.indexOf(e)>-1?window.history.back():this.backToList()}},{key:"buildFrame",value:function(){var e=this;let t=document.querySelector(this.app?.getOptions("crud.containerSelector","body"));for(;t.firstChild;)t.removeChild(t.firstChild);this.els.top=document.createElement("div"),this.els.top.id="crud-top",this.getFrameClasses().TOP_CLASS.forEach(function(t){return e.els.top.classList.add(t)}),t.appendChild(this.els.top),this.els.main=document.createElement("div"),this.els.main.id="crud-main",this.getFrameClasses().MAIN_CLASS.forEach(function(t){return e.els.main.classList.add(t)}),t.appendChild(this.els.main),this.els.bottom=document.createElement("div"),this.els.bottom.id="crud-bottom",this.getFrameClasses().BOTTOM_CLASS.forEach(function(t){return e.els.bottom.classList.add(t)}),t.appendChild(this.els.bottom)}},{key:"getFrameClasses",value:function(){return{TOP_CLASS:this.TOP_CLASS,MAIN_CLASS:this.MAIN_CLASS,BOTTOM_CLASS:this.BOTTOM_CLASS}}},{key:"getContainerTopElement",value:function(){return this.els.top}},{key:"getContainerInnerElement",value:function(){return this.els.main}},{key:"getContainerBottomElement",value:function(){return this.els.bottom}},{key:"preloadVariants",value:async function(e="list"){await br(Qh,this).preload(this,e),this.emit("onVariantsPreloaded",{type:e})}},{key:"getTitleFromLib",value:function(e,t){const n=this.getCurrentAction();return this.debug&&this.debug("notCRUD.getTitleFromLib is obsolete, use notCRUD.getPreloadedVariantTitle(actionName, propName, id)"),this.getPreloadedVariantTitle(n,e,t)}},{key:"getPreloadedVariants",value:function(e,t){return this.getOptions(`variants.${e}.${t}`,[])}},{key:"getPreloadedVariantTitle",value:function(e,t,n){const i=this.getPreloadedVariants(e,t).find(function(e){return e.id===n});return i?i.title:n}},{key:"getItemTitle",value:function(e){const t=this.TITLE_FIELDS_PRIORITY.find(function(t){return Qr.objHas(e,t)});return t?e[t]:""}},{key:"createDefault",value:function(){return this.getModel({}).toDefault()}},{key:"route",value:function(e=[]){try{return br(Yh,this).route(this,e)}catch(e){this.report(e),this.showErrorMessage(e)}}},{key:"actionHandlerExists",value:function(e){return!!Object.keys(br(Jh,this)).includes(e)||"function"==typeof this["run"+Qr.capitalizeFirstLetter(e)]}},{key:"runAction",value:function(e,t){if(Object.keys(br(Jh,this)).includes(e))return br(Jh,this)[e].run(this,t);if("function"==typeof this["run"+Qr.capitalizeFirstLetter(e)])return this["run"+Qr.capitalizeFirstLetter(e)](t);throw new Error(`No such action: ${e} in contoller ${this.getWorking("name")}`)}},{key:"goCreate",value:function(e=0){this.goAfterDelay(this.getModelActionURL("","create"),e)}},{key:"goDetails",value:function(e,t=0){this.goAfterDelay(this.getModelActionURL(e,""),t)}},{key:"goUpdate",value:function(e,t=0){this.goAfterDelay(this.getModelActionURL(e,"update"),t)}},{key:"goDelete",value:function(e,t=0){this.goAfterDelay(this.getModelActionURL(e,"delete"),t)}},{key:"goList",value:function(e=0){this.goAfterDelay(this.getModelURL(),e)}},{key:"goAfterDelay",value:function(e,t=0){var n=this;this.navigateWithDelay(e,t,function(){return n.$destroyUI()})}},{key:"goBack",value:function(e=0){this.goList(e)}},{key:"onActionSubmit",value:async function(e,t){let n=!0;const i=this.ui[e];if(!i)throw new Error("Action UI doesnt exist");try{i.setLoading();let r=await this.getModel(t)[`$${e}`]();n=i.processResult(r)}catch(e){n=i.processResult(e)}finally{return i.resetLoading(),n}}},{key:"$destroyUI",value:function(){for(let e in this.ui)this.destroyUIByName(e)}},{key:"destroyUIByName",value:function(e){Object.hasOwn(this.ui,e)&&(this.ui[e].$destroy&&this.ui[e].$destroy(),this.ui[e].destroy&&this.ui[e].destroy(),delete this.ui[e])}},{key:"showErrorMessage",value:function(e){this.error&&this.error(e),this.app&&this.app.emit("onerror",{title:"Произошла ошибка",message:e.message?e.message:ko.ERROR_DEFAULT}),Lh.error(this,"Произошла ошибка",e.message?e.message:ko.ERROR_DEFAULT)}},{key:"showSuccessMessage",value:function(e,t){this.app&&this.app.emit("onsuccess",{title:e,message:t}),Lh.success(this,e,t)}},{key:"setUI",value:function(e,t,n=!0){n&&this.$destroyUI(),this.ui[e]=t}},{key:"getUI",value:function(e){return this.ui[e]}},{key:"getActionUI",value:function(){return this.ui[this.getCurrentAction()]}},{key:"renderLoadingScreen",value:function(){this.setUI(Kh,this.createLoaderUI())}},{key:"removeLoadingScreen",value:function(){this.destroyUIByName(Kh)}},{key:"createLoaderUI",value:function(){return new Ju(ho,this.getContainerInnerElement(),br(Xh,this))}},{key:"setUIProp",value:function(e,t,n){this.ui&&this.ui[e]&&this.ui[e].set(t,n)}},{key:"getActionProps",value:function(){return this.ui[this.getCurrentAction()].props}},{key:"setLoaderProp",value:function(e,t){this.getUI(Kh).set(e,t)}}],[{key:"LABELS",get:function(){return Object.freeze({plural:`${this.MODULE_NAME}:${this.MODEL_NAME}_label_plural`,single:`${this.MODULE_NAME}:${this.MODEL_NAME}_label_single`})}},{key:"getMenu",value:function(e={}){return[{section:this.MODULE_NAME,title:this.LABELS.plural,href:`/${Qr.lowerFirstLetter(this.MODULE_NAME)}/${Qr.lowerFirstLetter(this.MODEL_NAME)}`,...e}]}}])}(ac);Ir(Zh,"ERROR_DEFAULT",ko.ERROR_DEFAULT);let eg=function(){return Sr(function e(){kr(this,e)},null,[{key:"extractActionName",value:function(e){return e.length>0?e[0]:this.DEFAULT_ROUTE}},{key:"route",value:function(e,t){try{const n=this.extractActionName(t);return e.setCurrentAction(n),e.runAction(n,t)}catch(t){e.report(t),e.showErrorMessage(t)}}}])}();Ir(eg,"DEFAULT_ROUTE","list");let tg=function(){return Sr(function e(){kr(this,e)},null,[{key:"routesVariants",get:function(){return{}}},{key:"isRouteVariantValid",value:function(e){return""!==e&&Qr.objHas(this.routesVariants,e)}},{key:"determineRoute",value:async function(e,t=[]){return""}},{key:"route",value:async function(e,t){try{const n=await this.determineRoute(e,t);if(!this.isRouteVariantValid(n))throw new Error(`No such action: ${n} in contoller ${e.getWorking("name")}`);{e.setCurrentAction(n);const i=this.routesVariants[n];Qr.isAsync(i.run)?await i.run(e,t):i.run(e,t)}}catch(t){e.report(t),e.showErrorMessage(t)}}}])}();var ng=new WeakMap,ig=new WeakMap;let rg=function(){return Sr(function e(t,n){kr(this,e),_r(this,ng,$state({})),_r(this,ig,void 0),this.modelName=n,this.app=t,this.bindEventsToProps()},[{key:"bindEventsToProps",value:function(){var e=this;br(ng,this).onTermChange=async function({detail:t}){br(ng,e).results=await e.searchByTerm(t)},br(ng,this).onnext=function(){console.log("next selector results")},br(ng,this).onprev=function(){console.log("prev selector results")}}},{key:"destroy",value:function(){delete this.app}},{key:"getSearchRouteName",value:function(){return"listAndCount"}},{key:"getDataLoadRouteName",value:function(){return"get"}},{key:"transformSearchResult",value:function(e){var t=this;return e.list=e.list.map(function(e){return{_id:e._id,id:e[`${t.modelName}ID`],title:e.name||e.title||e.label||e.username}}),e}},{key:"transformSelectedResult",value:function(e){return{_id:e._id,[`${this.modelName}ID`]:e.id,title:e.title}}},{key:"searchByTerm",value:async function(e){try{if(e.value.length>2){const t=this.app.getModel(this.modelName);t.setSearch(e.value);const n=await t[`$${this.getSearchRouteName()}`]();return"ok"===n.status?this.transformSearchResult(n.result):{list:[],count:0,page:0,pages:0,skip:0}}return{list:[],count:0,page:0,pages:0,skip:0}}catch(e){return{list:[],count:0,page:0,pages:0,skip:0}}}},{key:"openSelector",value:function(){var e=this;return new Promise(function(t,n){try{wr(ig,e,Un(bu,{target:document.body,props:br(ng,e)})),br(ng,e).onreject=function(){jn(br(ig,e)),n()},br(ng,e).onresolve=function({detail:n}){jn(br(ig,e)),t(e.transformSelectedResult(n))}}catch(t){e.app.error(t),n(t)}})}},{key:"loadData",value:async function(e){try{if(e&&e.length>10){const t=this.app.getModel(this.modelName,{_id:e}),n=await t[`$${this.getDataLoadRouteName()}`]();return"ok"===n.status?n.result:null}return null}catch(e){return this.app.error(e),null}}}])}();const og=Zh;var sg=Object.freeze({__proto__:null,COMPONENTS:ka,FIELDS:ba,UIAdapterSvelte:Ju,UIForm:Yd,VARIANTS:_a,createCRUDActionUIView:function({ACTION:e,TITLE:t,UIConstructor:n,dataProvider:i,goBack:r}){return function(){return Sr(function e(){kr(this,e)},null,[{key:"run",value:async function(o,s){try{if(o.setBreadcrumbs([{title:`Просмотр "${t}"`}]),await o.preloadVariants(e),o.getUI(e))return;o.$destroyUI();let a={};i&&(a=Qr.isFunc(i)?Qr.isAsync(i)?await i(s):i(s):{...i});const l={params:s,...o.getOptions(`${e}.transformer`,Sh)(a)},u=new Ju(n,o.getContainerInnerElement(),l);r&&Qr.isFunc(r)&&u.on("onreject",r),o.setUI(e,u),o.emit(`after:render:${e}`)}catch(e){o.report(e),o.showErrorMessage(e)}}}])}()},ncCRUD:og,notAPI:ju,notApp:rc,notBase:Fu,notBreadcrumbs:Lf,notCRUD:Zh,notCRUDRouter:Eh,notCRUDRouterPlain:eg,notCRUDRouterSwitch:tg,notCommon:Qr,notController:ac,notForm:lf,notFormHelpers:bd,notFormRules:Xd,notFormSet:Of,notFormUtils:Kc,notInterface:tc,notPath:qr,notRecord:nc,notRouter:Uu,notServiceModelSearch:rg,notSideMenu:$h,notStores:Vu,notTable:Wc,notTopMenu:oh});const ag={LOCALE:pr,say:eo,notLocale:Zr},lg=ko,{notCommon:ug,COMPONENTS:cg,FIELDS:dg,VARIANTS:fg,notFormUtils:hg}=sg;return Object.keys(Cu).forEach(function(e){Object.keys(Cu[e]).forEach(function(t){Kc.addComponent(t,Cu[e][t])})}),e.COMPONENTS=cg,e.Elements=Cu,e.FIELDS=dg,e.Frame=sg,e.LOCALE=pr,e.Locale=ag,e.UICommon=lg,e.VARIANTS=fg,e.notCommon=ug,e.notFormUtils=hg,e.notLocale=Zr,e.say=eo,e}({});