aptechka 0.64.0 → 0.64.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/Animation-BRqj4VfN.cjs +1 -0
- package/lib/{Animation-Cb-klopb.js → Animation-D29tc5VS.js} +5 -4
- package/lib/Damped-BD1OQ1fH.cjs +1 -0
- package/lib/{Damped-ByZFbNSt.js → Damped-YrqW5V4w.js} +5 -4
- package/lib/DragControls-D8BXtKVu.cjs +1 -0
- package/lib/DragControls-DGDUw6bM.js +226 -0
- package/lib/ScrollSegmentElement-B6gp1q_z.js +459 -0
- package/lib/ScrollSegmentElement-DtMMAirz.cjs +1 -0
- package/lib/SourceElement-D_YeNqsI.cjs +5 -0
- package/lib/SourceElement-jbviggZp.js +217 -0
- package/lib/{Store-swP_0ymB.js → Store-0BVty6AZ.js} +2 -1
- package/lib/Store-Cd1GlEmZ.cjs +1 -0
- package/lib/Tweened-B-AHx93m.cjs +1 -0
- package/lib/{Tweened-DzZwfKNm.js → Tweened-_pF0zXXN.js} +9 -8
- package/lib/Viewport-DA10iWAO.js +109 -0
- package/lib/Viewport-DB0qAZPJ.cjs +1 -0
- package/lib/accordion/index.cjs +1 -1
- package/lib/accordion/index.js +2 -1
- package/lib/animation/index.cjs +1 -1
- package/lib/animation/index.js +3 -3
- package/lib/attribute/index.cjs +1 -1
- package/lib/attribute/index.js +5 -4
- package/lib/billboard/index.cjs +1 -1
- package/lib/billboard/index.js +2 -1
- package/lib/canvas/index.cjs +1 -1
- package/lib/canvas/index.js +5 -5
- package/lib/controls/index.cjs +1 -1
- package/lib/controls/index.js +6 -223
- package/lib/css-property/index.cjs +1 -1
- package/lib/css-property/index.js +15 -14
- package/lib/custom-scrollbar/index.cjs +1 -1
- package/lib/custom-scrollbar/index.js +25 -24
- package/lib/dev/index.cjs +1 -1
- package/lib/dev/index.js +7 -6
- package/lib/device/index.cjs +1 -1
- package/lib/device/index.js +5 -106
- package/lib/element-linked-store/index.cjs +1 -1
- package/lib/element-linked-store/index.js +5 -4
- package/lib/element-resizer/index.cjs +1 -1
- package/lib/element-resizer/index.js +22 -21
- package/lib/en3/En3View.d.ts +2 -2
- package/lib/en3/en3.d.ts +3 -2
- package/lib/en3/index.cjs +3 -3
- package/lib/en3/index.js +90 -89
- package/lib/iframe/index.cjs +1 -1
- package/lib/iframe/index.js +4 -3
- package/lib/image/index.cjs +1 -1
- package/lib/image/index.js +5 -4
- package/lib/{index-euf5anj6.js → index-Bv9zgfdb.js} +3 -2
- package/lib/index-DekP7OZe.cjs +1 -0
- package/lib/intersector/index.cjs +1 -1
- package/lib/intersector/index.js +4 -3
- package/lib/ladder/index.cjs +1 -1
- package/lib/ladder/index.js +41 -40
- package/lib/{layout-DpZo-I0y.js → layout-BSMtwCga.js} +2 -2
- package/lib/layout-box/index.cjs +1 -1
- package/lib/layout-box/index.js +18 -17
- package/lib/loading/index.cjs +1 -1
- package/lib/loading/index.js +4 -3
- package/lib/masonry-layout/index.cjs +1 -1
- package/lib/masonry-layout/index.js +2 -2
- package/lib/media/index.cjs +1 -1
- package/lib/media/index.js +12 -11
- package/lib/morph/index.cjs +1 -1
- package/lib/morph/index.js +3 -2
- package/lib/need_redo_tweaker/index.cjs +3 -3
- package/lib/need_redo_tweaker/index.js +368 -340
- package/lib/pixel-perfect/index.cjs +1 -1
- package/lib/pixel-perfect/index.js +2 -2
- package/lib/pointer/index.cjs +1 -1
- package/lib/pointer/index.js +19 -18
- package/lib/popover/index.cjs +1 -1
- package/lib/popover/index.js +3 -2
- package/lib/radio/index.cjs +1 -1
- package/lib/radio/index.js +2 -1
- package/lib/router/index.cjs +1 -1
- package/lib/router/index.js +11 -10
- package/lib/scroll/index.cjs +1 -1
- package/lib/scroll/index.js +66 -65
- package/lib/{scroll-Benkuq-t.js → scroll-BWF48oHS.js} +11 -10
- package/lib/scroll-CFDCeArT.cjs +1 -0
- package/lib/scroll-segment/index.cjs +1 -1
- package/lib/scroll-segment/index.js +3 -456
- package/lib/sequence/index.cjs +1 -1
- package/lib/sequence/index.js +4 -3
- package/lib/size-element/index.cjs +1 -1
- package/lib/size-element/index.js +2 -1
- package/lib/slicer/index.cjs +3 -3
- package/lib/slicer/index.js +31 -30
- package/lib/source/SourceElement.d.ts +1 -1
- package/lib/source/index.cjs +1 -5
- package/lib/source/index.js +5 -214
- package/lib/store/index.cjs +1 -1
- package/lib/store/index.js +14 -13
- package/lib/stylesheet-DpnWNVyD.js +24 -0
- package/lib/stylesheet-HWF2a3nr.cjs +1 -0
- package/lib/ticker/index.cjs +1 -1
- package/lib/ticker/index.js +14 -13
- package/lib/utils/index.cjs +1 -1
- package/lib/utils/index.d.ts +1 -0
- package/lib/utils/index.js +5 -5
- package/lib/utils/jss.d.ts +0 -1
- package/lib/utils/stylesheet.d.ts +2 -0
- package/lib/video/index.cjs +1 -1
- package/lib/video/index.js +11 -10
- package/lib/window-resizer/index.cjs +1 -1
- package/lib/window-resizer/index.js +9 -8
- package/lib/youtube/index.cjs +1 -1
- package/lib/youtube/index.js +12 -11
- package/package.json +4 -4
- package/lib/Animation-dD_idtTU.cjs +0 -1
- package/lib/Damped-B8bmTxAr.cjs +0 -1
- package/lib/Store-GokLe_g-.cjs +0 -1
- package/lib/Tweened-BsL9FamJ.cjs +0 -1
- package/lib/index-Cqw2NKev.cjs +0 -1
- package/lib/jss-CRBgdvJ3.cjs +0 -1
- package/lib/jss-DtnXPEnq.js +0 -23
- package/lib/scroll-DAhSpkhR.cjs +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"use strict";var wt=r=>{throw TypeError(r)};var Ge=(r,s,t)=>s.has(r)||wt("Cannot "+t);var e=(r,s,t)=>(Ge(r,s,"read from private field"),t?t.call(r):s.get(r)),o=(r,s,t)=>s.has(r)?wt("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(r):s.set(r,t),c=(r,s,t,i)=>(Ge(r,s,"write to private field"),i?i.call(r,t):s.set(r,t),t),l=(r,s,t)=>(Ge(r,s,"access private method"),t);const p=require("../index-Cqw2NKev.cjs"),m=require("../Store-GokLe_g-.cjs"),Yt=require("../file-DSpfWdd9.cjs"),Gt=require("../function-MthRj-GJ.cjs"),St=require("../gestures-C7gbKx11.cjs");require("../ticker/index.cjs");const pe=require("../string-DUXXtU8v.cjs"),bt=require("../object-CCiXnER2.cjs"),Ut=require("../connector/index.cjs"),Xt=require("../device/index.cjs"),Qt=require("../math-GDWEqu7y.cjs"),jt=require("../number-DyefJ5a1.cjs"),vt=require("../polyfills-Df4r-ETT.cjs"),yt=require("../element-resizer/index.cjs"),es=require("../style-At6aDoqG.cjs"),ts=new Set(["animate","animateMotion","animateTransform","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","listener","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidColor","stop","svg","switch","symbol","text","textPath","title","tspan","view","use"]);var d,B,S,we,I,H,a,kt,Et,xt,Ue,Xe,Ct,Tt,Lt,zt,Qe,je,Rt,et,tt,Mt,st,qe,it,nt,ot,Ke,Oe;const Ze=class Ze{constructor(...s){o(this,a);o(this,d,null);o(this,B,new Set);o(this,S,new Set);o(this,we);o(this,I);o(this,H);o(this,Ke,s=>{e(this,B).forEach(t=>{t(s)}),e(this,B).clear()});o(this,Oe,(s,t)=>{e(this,S).forEach(i=>{i(s,t)}),e(this,S).clear(),l(this,a,tt).call(this)});if(p.isBrowser){const t=s[0],i=s[1];c(this,d,l(this,a,kt).call(this,t,i==null?void 0:i.forceSvg)),l(this,a,xt).call(this,i)}}get node(){return e(this,d)}set node(s){var t;l(this,a,tt).call(this),c(this,d,s),(t=e(this,we))==null||t.call(this),e(this,d)instanceof Element&&c(this,I,[...e(this,d).querySelectorAll("store-root")]),l(this,a,et).call(this),l(this,a,Ue).call(this)}};d=new WeakMap,B=new WeakMap,S=new WeakMap,we=new WeakMap,I=new WeakMap,H=new WeakMap,a=new WeakSet,kt=function(s,t){let i=null;if(s instanceof Node)i=s;else if(typeof s=="string")if(!s.includes("<")&&s.includes("-"))i=new(customElements.get(s));else if(s.includes("<")){const n=document.createElement("div");n.innerHTML=s,i=n.firstElementChild}else ts.has(s)||t?i=document.createElementNS("http://www.w3.org/2000/svg",s):i=document.createElement(s);else i=document.createElement("div");return i},Et=function(s){return s instanceof HTMLElement||s instanceof SVGElement},xt=function(s){if(!s)return;const t=l(this,a,Et).call(this,e(this,d)),i=s.ref;delete s.ref,s!=null&&s.onConnect&&(e(this,B).add(s.onConnect),delete s.onConnect),s!=null&&s.onDisconnect&&(e(this,S).add(s.onDisconnect),delete s.onDisconnect);let n,h;for(const u in s){const g=s[u];u==="class"&&t?l(this,a,Xe).call(this,g):u==="style"&&t?l(this,a,Lt).call(this,g):u==="lightChildren"?l(this,a,qe).call(this,e(this,d),g):u==="children"?l(this,a,qe).call(this,e(this,d)instanceof Element?e(this,d).shadowRoot||e(this,d):e(this,d),g):u==="connectedClass"?e(this,B).add(()=>{requestAnimationFrame(()=>{e(this,d).classList.add(typeof g=="boolean"?"connected":g)})}):u.startsWith("on")?(h||(h={}),h[u]=g):(n||(n={}),n[u]=g)}l(this,a,Mt).call(this,n),l(this,a,Rt).call(this,h),i&&(typeof i=="function"?i(e(this,d)):i.current=e(this,d)),l(this,a,Ue).call(this)},Ue=function(){if(p.isBrowser&&(e(this,S).size||e(this,B).size)){const s=e(this,d)instanceof DocumentFragment?e(this,d).firstChild:e(this,d);c(this,we,Ut.connector.subscribe(s,{connectCallback:e(this,Ke),disconnectCallback:e(this,Oe),unsubscribeAfterDisconnect:!0,maxWaitSec:20}))}},Xe=function(s){if(s){if(typeof s=="string")e(this,d).classList.add(s);else if(Array.isArray(s))s.forEach(t=>{t&&l(this,a,Xe).call(this,t)});else if(typeof s=="object")if(s instanceof m.Store)l(this,a,Ct).call(this,s);else for(const t in s){const i=s[t];i instanceof m.Store?l(this,a,Tt).call(this,t,i):i?e(this,d).classList.add(t):e(this,d).classList.remove(t)}}else return},Ct=function(s){e(this,S).add(s.subscribe(({current:t,previous:i})=>{i&&[i].flat().forEach(n=>{n&&e(this,d).classList.remove(n)}),t&&[t].flat().forEach(n=>{n&&e(this,d).classList.add(n)})}))},Tt=function(s,t){e(this,S).add(t.subscribe(({current:i})=>{i?e(this,d).classList.add(s):e(this,d).classList.remove(s)}))},Lt=function(s){if(!s)return;e(this,d).tagName==="style"||e(this,d).tagName==="STYLE"?l(this,a,Qe).call(this,s):l(this,a,zt).call(this,s)},zt=function(s){for(const t in s){const i=t,n=s[i];n instanceof m.Store?e(this,S).add(n.subscribe(({current:h})=>{l(this,a,je).call(this,i,h)})):l(this,a,je).call(this,i,n)}},Qe=function(s){for(const t in s){const i=s[t];if(typeof i=="object"&&!(i instanceof m.Store))e(this,d).appendChild(document.createTextNode(`${t} {`)),l(this,a,Qe).call(this,i),e(this,d).appendChild(document.createTextNode("}"));else if(i instanceof m.Store){const n=document.createTextNode("");e(this,S).add(i.subscribe(h=>{h.current?n.nodeValue=`${pe.camelToKebab(t)}: ${h.current};`:n.nodeValue=""})),e(this,d).appendChild(n)}else e(this,d).appendChild(document.createTextNode(`${pe.camelToKebab(t)}: ${i};`))}},je=function(s,t){s.includes("--")?t?e(this,d).style.setProperty(s,t.toString()):e(this,d).style.removeProperty(s):t?e(this,d).style[s]=t.toString():e(this,d).style[s]=""},Rt=function(s){if(s){e(this,H)||c(this,H,[]);for(const t in s){const i=t,n=pe.uncapitalize(i.split("on").slice(1).join("on")),h=s[i];typeof h=="object"?e(this,H).push({name:n,callback:h.callback,options:h.options}):typeof h=="function"&&e(this,H).push({name:n,callback:h})}l(this,a,et).call(this)}},et=function(){var s;(s=e(this,H))==null||s.forEach(t=>{e(this,d).addEventListener(t.name,t.callback,t.options)})},tt=function(){var s;(s=e(this,H))==null||s.forEach(t=>{e(this,d).removeEventListener(t.name,t.callback,t.options)})},Mt=function(s){for(const t in s){const i=s[t];i instanceof m.Store?e(this,S).add(i.subscribe(({current:n})=>{l(this,a,st).call(this,t,n)})):l(this,a,st).call(this,t,i)}},st=function(s,t){var n,h;const i=e(this,d);if(s in i&&!((h=(n=i.constructor)==null?void 0:n.observedAttributes)!=null&&h.includes(s)))t!=null&&(i[s]=t.toString());else if(t!=null){const u=t.toString();s.includes("xlink")?i.setAttributeNS("http://www.w3.org/1999/xlink",s,u):i.setAttribute(s,u)}},qe=function(s,t){t&&(t=[t].flat(),t.forEach(i=>{if(i instanceof m.Store){const n=document.createElement("div");n.style.display="contents",s.appendChild(n),e(this,I)||c(this,I,[]);const h=e(this,I).length;n.setAttribute("store-root",""),e(this,I).push(n),e(this,S).add(i.subscribe(({current:u,previous:g})=>{const E=e(this,I)[h];E.dispatchEvent(new CustomEvent("beforeChildrenChange",{bubbles:!0,composed:!0}));const L=Array.from(E.childNodes),y=Array.isArray(u)?u:[u],ge=Array.isArray(g)?g:[g],De=[],C=[];L.length&&ge.forEach((F,P)=>{y.includes(F)?C.push(F):De.push(L[P])}),y.forEach((F,P)=>{if(C[P]!=null){if(F!==C[P]){const V=l(this,a,nt).call(this,F),Z=L[P];V instanceof Node&&!Z.isEqualNode(V)?E.replaceChild(V,Z):E.removeChild(Z)}}else{const V=l(this,a,nt).call(this,F);V instanceof Node&&n.appendChild(V)}}),De.forEach(F=>{E.removeChild(F)}),E.dispatchEvent(new CustomEvent("afterChildrenChange",{bubbles:!0,composed:!0}))}))}else if(i instanceof Ze)l(this,a,it).call(this,s,i.node);else if(i instanceof Function)l(this,a,qe).call(this,s,bt.isESClass(i)?new i:i());else{const n=l(this,a,ot).call(this,i);n instanceof Node&&l(this,a,it).call(this,s,n)}}))},it=function(s,t){!(s instanceof ShadowRoot)&&t instanceof HTMLElement&&t.tagName==="STYLE"?(e(this,B).add(()=>{[...document.head.querySelectorAll("style")].find(n=>n.outerHTML===t.outerHTML)||document.head.appendChild(t)}),e(this,S).add(()=>{t.remove()})):s.appendChild(t)},nt=function(s){return s instanceof Ze?s.node:typeof s=="function"?bt.isESClass(s)?new s:s():l(this,a,ot).call(this,s)},ot=function(s){if(s instanceof Node)return s;if(s!=null){const t=String(s);if(t.trim().startsWith("<")&&t.trim().endsWith(">")){const i=document.createElement("div");return i.innerHTML=t,i.firstElementChild}else return document.createTextNode(t)}else return},Ke=new WeakMap,Oe=new WeakMap;let N=Ze;function w(...r){return new N(...r)}function ss(r){return new N("a",r)}function Q(r){return new N("button",r)}function v(r){return new N("div",r)}function He(r){return new N("input",r)}function At(r){return new N("label",r)}function ue(r){return new N("slot",r)}function rt(r){return new N("span",r)}function Nt(r){return new N("style",{style:r})}function x(r){const s=new CSSStyleSheet;return s.replaceSync(Nt(r).node.innerHTML),s}function is(r,s){const t=s==null?void 0:s.prefix,i={style:{}};for(const n in r)i[n]={var:`var(--${t}${pe.camelToKebab(n)})`,value:r[n]},i.style[`--${t}${pe.camelToKebab(n)}`]=r[n];return i}const f=is({colorMain:"#1c1c1c",colorMainAux:"#282828",colorFont:"#ffffff",colorActive:"#00E5B0",borderRadius:"12px",borderRadiusSmall:"4px"},{prefix:"aptechka-"});if(p.isBrowser){const r=Nt({":root":f.style}).node;r.setAttribute("data-permanent",""),document.head.appendChild(r)}const Ft='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M20.536 3.464C19.07 2 16.714 2 12 2C7.286 2 4.929 2 3.464 3.464C2 4.93 2 7.286 2 12c0 4.714 0 7.071 1.464 8.535C4.93 22 7.286 22 12 22c4.714 0 7.071 0 8.535-1.465C22 19.072 22 16.714 22 12s0-7.071-1.465-8.536M16.75 12a.75.75 0 0 1-.75.75H9.81l1.72 1.72a.75.75 0 1 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 1 1 1.06 1.06l-1.72 1.72H16a.75.75 0 0 1 .75.75" clip-rule="evenodd"/></svg>',$t='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path d="M15.24 2h-3.894c-1.764 0-3.162 0-4.255.148c-1.126.152-2.037.472-2.755 1.193c-.719.721-1.038 1.636-1.189 2.766C3 7.205 3 8.608 3 10.379v5.838c0 1.508.92 2.8 2.227 3.342c-.067-.91-.067-2.185-.067-3.247v-5.01c0-1.281 0-2.386.118-3.27c.127-.948.413-1.856 1.147-2.593c.734-.737 1.639-1.024 2.583-1.152c.88-.118 1.98-.118 3.257-.118h3.07c1.276 0 2.374 0 3.255.118A3.601 3.601 0 0 0 15.24 2Z"/><path d="M6.6 11.397c0-2.726 0-4.089.844-4.936c.843-.847 2.2-.847 4.916-.847h2.88c2.715 0 4.073 0 4.917.847c.843.847.843 2.21.843 4.936v4.82c0 2.726 0 4.089-.843 4.936c-.844.847-2.202.847-4.917.847h-2.88c-2.715 0-4.073 0-4.916-.847c-.844-.847-.844-2.21-.844-4.936v-4.82Z"/></svg>',ns='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10-5.75a.75.75 0 0 1 .75.75v5.19l1.72-1.72a.75.75 0 1 1 1.06 1.06l-3 3a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 1 1 1.06-1.06l1.72 1.72V7a.75.75 0 0 1 .75-.75Zm-4 10a.75.75 0 0 0 0 1.5h8a.75.75 0 0 0 0-1.5H8Z" clip-rule="evenodd"/></svg>',os='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10 5.75a.75.75 0 0 0 .75-.75v-5.19l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72V17c0 .414.336.75.75.75Zm-4-10a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 0 1.5H8Z" clip-rule="evenodd"/></svg>',Pt=`<svg
|
|
1
|
+
"use strict";var wt=r=>{throw TypeError(r)};var Ge=(r,s,e)=>s.has(r)||wt("Cannot "+e);var t=(r,s,e)=>(Ge(r,s,"read from private field"),e?e.call(r):s.get(r)),o=(r,s,e)=>s.has(r)?wt("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(r):s.set(r,e),c=(r,s,e,i)=>(Ge(r,s,"write to private field"),i?i.call(r,e):s.set(r,e),e),l=(r,s,e)=>(Ge(r,s,"access private method"),e);const p=require("../index-DekP7OZe.cjs");require("construct-style-sheets-polyfill");const m=require("../Store-Cd1GlEmZ.cjs"),Yt=require("../file-DSpfWdd9.cjs"),Gt=require("../function-MthRj-GJ.cjs"),St=require("../gestures-C7gbKx11.cjs");require("../ticker/index.cjs");const pe=require("../string-DUXXtU8v.cjs"),bt=require("../object-CCiXnER2.cjs"),Ut=require("../connector/index.cjs"),Xt=require("../Viewport-DB0qAZPJ.cjs"),Qt=require("../math-GDWEqu7y.cjs"),jt=require("../number-DyefJ5a1.cjs"),vt=require("../polyfills-Df4r-ETT.cjs"),yt=require("../element-resizer/index.cjs"),es=require("../style-At6aDoqG.cjs"),ts=new Set(["animate","animateMotion","animateTransform","circle","clipPath","defs","desc","ellipse","feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence","filter","foreignObject","g","image","line","linearGradient","listener","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialGradient","rect","set","solidColor","stop","svg","switch","symbol","text","textPath","title","tspan","view","use"]);var d,B,S,we,I,H,a,kt,Et,xt,Ue,Xe,Ct,Tt,Lt,zt,Qe,je,Rt,et,tt,Mt,st,qe,it,nt,ot,Ke,Oe;const Ze=class Ze{constructor(...s){o(this,a);o(this,d,null);o(this,B,new Set);o(this,S,new Set);o(this,we);o(this,I);o(this,H);o(this,Ke,s=>{t(this,B).forEach(e=>{e(s)}),t(this,B).clear()});o(this,Oe,(s,e)=>{t(this,S).forEach(i=>{i(s,e)}),t(this,S).clear(),l(this,a,tt).call(this)});if(p.isBrowser){const e=s[0],i=s[1];c(this,d,l(this,a,kt).call(this,e,i==null?void 0:i.forceSvg)),l(this,a,xt).call(this,i)}}get node(){return t(this,d)}set node(s){var e;l(this,a,tt).call(this),c(this,d,s),(e=t(this,we))==null||e.call(this),t(this,d)instanceof Element&&c(this,I,[...t(this,d).querySelectorAll("store-root")]),l(this,a,et).call(this),l(this,a,Ue).call(this)}};d=new WeakMap,B=new WeakMap,S=new WeakMap,we=new WeakMap,I=new WeakMap,H=new WeakMap,a=new WeakSet,kt=function(s,e){let i=null;if(s instanceof Node)i=s;else if(typeof s=="string")if(!s.includes("<")&&s.includes("-"))i=new(customElements.get(s));else if(s.includes("<")){const n=document.createElement("div");n.innerHTML=s,i=n.firstElementChild}else ts.has(s)||e?i=document.createElementNS("http://www.w3.org/2000/svg",s):i=document.createElement(s);else i=document.createElement("div");return i},Et=function(s){return s instanceof HTMLElement||s instanceof SVGElement},xt=function(s){if(!s)return;const e=l(this,a,Et).call(this,t(this,d)),i=s.ref;delete s.ref,s!=null&&s.onConnect&&(t(this,B).add(s.onConnect),delete s.onConnect),s!=null&&s.onDisconnect&&(t(this,S).add(s.onDisconnect),delete s.onDisconnect);let n,h;for(const u in s){const g=s[u];u==="class"&&e?l(this,a,Xe).call(this,g):u==="style"&&e?l(this,a,Lt).call(this,g):u==="lightChildren"?l(this,a,qe).call(this,t(this,d),g):u==="children"?l(this,a,qe).call(this,t(this,d)instanceof Element?t(this,d).shadowRoot||t(this,d):t(this,d),g):u==="connectedClass"?t(this,B).add(()=>{requestAnimationFrame(()=>{t(this,d).classList.add(typeof g=="boolean"?"connected":g)})}):u.startsWith("on")?(h||(h={}),h[u]=g):(n||(n={}),n[u]=g)}l(this,a,Mt).call(this,n),l(this,a,Rt).call(this,h),i&&(typeof i=="function"?i(t(this,d)):i.current=t(this,d)),l(this,a,Ue).call(this)},Ue=function(){if(p.isBrowser&&(t(this,S).size||t(this,B).size)){const s=t(this,d)instanceof DocumentFragment?t(this,d).firstChild:t(this,d);c(this,we,Ut.connector.subscribe(s,{connectCallback:t(this,Ke),disconnectCallback:t(this,Oe),unsubscribeAfterDisconnect:!0,maxWaitSec:20}))}},Xe=function(s){if(s){if(typeof s=="string")t(this,d).classList.add(s);else if(Array.isArray(s))s.forEach(e=>{e&&l(this,a,Xe).call(this,e)});else if(typeof s=="object")if(s instanceof m.Store)l(this,a,Ct).call(this,s);else for(const e in s){const i=s[e];i instanceof m.Store?l(this,a,Tt).call(this,e,i):i?t(this,d).classList.add(e):t(this,d).classList.remove(e)}}else return},Ct=function(s){t(this,S).add(s.subscribe(({current:e,previous:i})=>{i&&[i].flat().forEach(n=>{n&&t(this,d).classList.remove(n)}),e&&[e].flat().forEach(n=>{n&&t(this,d).classList.add(n)})}))},Tt=function(s,e){t(this,S).add(e.subscribe(({current:i})=>{i?t(this,d).classList.add(s):t(this,d).classList.remove(s)}))},Lt=function(s){if(!s)return;t(this,d).tagName==="style"||t(this,d).tagName==="STYLE"?l(this,a,Qe).call(this,s):l(this,a,zt).call(this,s)},zt=function(s){for(const e in s){const i=e,n=s[i];n instanceof m.Store?t(this,S).add(n.subscribe(({current:h})=>{l(this,a,je).call(this,i,h)})):l(this,a,je).call(this,i,n)}},Qe=function(s){for(const e in s){const i=s[e];if(typeof i=="object"&&!(i instanceof m.Store))t(this,d).appendChild(document.createTextNode(`${e} {`)),l(this,a,Qe).call(this,i),t(this,d).appendChild(document.createTextNode("}"));else if(i instanceof m.Store){const n=document.createTextNode("");t(this,S).add(i.subscribe(h=>{h.current?n.nodeValue=`${pe.camelToKebab(e)}: ${h.current};`:n.nodeValue=""})),t(this,d).appendChild(n)}else t(this,d).appendChild(document.createTextNode(`${pe.camelToKebab(e)}: ${i};`))}},je=function(s,e){s.includes("--")?e?t(this,d).style.setProperty(s,e.toString()):t(this,d).style.removeProperty(s):e?t(this,d).style[s]=e.toString():t(this,d).style[s]=""},Rt=function(s){if(s){t(this,H)||c(this,H,[]);for(const e in s){const i=e,n=pe.uncapitalize(i.split("on").slice(1).join("on")),h=s[i];typeof h=="object"?t(this,H).push({name:n,callback:h.callback,options:h.options}):typeof h=="function"&&t(this,H).push({name:n,callback:h})}l(this,a,et).call(this)}},et=function(){var s;(s=t(this,H))==null||s.forEach(e=>{t(this,d).addEventListener(e.name,e.callback,e.options)})},tt=function(){var s;(s=t(this,H))==null||s.forEach(e=>{t(this,d).removeEventListener(e.name,e.callback,e.options)})},Mt=function(s){for(const e in s){const i=s[e];i instanceof m.Store?t(this,S).add(i.subscribe(({current:n})=>{l(this,a,st).call(this,e,n)})):l(this,a,st).call(this,e,i)}},st=function(s,e){var n,h;const i=t(this,d);if(s in i&&!((h=(n=i.constructor)==null?void 0:n.observedAttributes)!=null&&h.includes(s)))e!=null&&(i[s]=e.toString());else if(e!=null){const u=e.toString();s.includes("xlink")?i.setAttributeNS("http://www.w3.org/1999/xlink",s,u):i.setAttribute(s,u)}},qe=function(s,e){e&&(e=[e].flat(),e.forEach(i=>{if(i instanceof m.Store){const n=document.createElement("div");n.style.display="contents",s.appendChild(n),t(this,I)||c(this,I,[]);const h=t(this,I).length;n.setAttribute("store-root",""),t(this,I).push(n),t(this,S).add(i.subscribe(({current:u,previous:g})=>{const E=t(this,I)[h];E.dispatchEvent(new CustomEvent("beforeChildrenChange",{bubbles:!0,composed:!0}));const L=Array.from(E.childNodes),y=Array.isArray(u)?u:[u],ge=Array.isArray(g)?g:[g],De=[],C=[];L.length&&ge.forEach((F,P)=>{y.includes(F)?C.push(F):De.push(L[P])}),y.forEach((F,P)=>{if(C[P]!=null){if(F!==C[P]){const V=l(this,a,nt).call(this,F),Z=L[P];V instanceof Node&&!Z.isEqualNode(V)?E.replaceChild(V,Z):E.removeChild(Z)}}else{const V=l(this,a,nt).call(this,F);V instanceof Node&&n.appendChild(V)}}),De.forEach(F=>{E.removeChild(F)}),E.dispatchEvent(new CustomEvent("afterChildrenChange",{bubbles:!0,composed:!0}))}))}else if(i instanceof Ze)l(this,a,it).call(this,s,i.node);else if(i instanceof Function)l(this,a,qe).call(this,s,bt.isESClass(i)?new i:i());else{const n=l(this,a,ot).call(this,i);n instanceof Node&&l(this,a,it).call(this,s,n)}}))},it=function(s,e){!(s instanceof ShadowRoot)&&e instanceof HTMLElement&&e.tagName==="STYLE"?(t(this,B).add(()=>{[...document.head.querySelectorAll("style")].find(n=>n.outerHTML===e.outerHTML)||document.head.appendChild(e)}),t(this,S).add(()=>{e.remove()})):s.appendChild(e)},nt=function(s){return s instanceof Ze?s.node:typeof s=="function"?bt.isESClass(s)?new s:s():l(this,a,ot).call(this,s)},ot=function(s){if(s instanceof Node)return s;if(s!=null){const e=String(s);if(e.trim().startsWith("<")&&e.trim().endsWith(">")){const i=document.createElement("div");return i.innerHTML=e,i.firstElementChild}else return document.createTextNode(e)}else return},Ke=new WeakMap,Oe=new WeakMap;let N=Ze;function w(...r){return new N(...r)}function ss(r){return new N("a",r)}function Q(r){return new N("button",r)}function v(r){return new N("div",r)}function He(r){return new N("input",r)}function At(r){return new N("label",r)}function ue(r){return new N("slot",r)}function rt(r){return new N("span",r)}function Nt(r){return new N("style",{style:r})}function x(r){const s=new CSSStyleSheet;return s.replaceSync(Nt(r).node.innerHTML),s}function is(r,s){const e=s==null?void 0:s.prefix,i={style:{}};for(const n in r)i[n]={var:`var(--${e}${pe.camelToKebab(n)})`,value:r[n]},i.style[`--${e}${pe.camelToKebab(n)}`]=r[n];return i}const f=is({colorMain:"#1c1c1c",colorMainAux:"#282828",colorFont:"#ffffff",colorActive:"#00E5B0",borderRadius:"12px",borderRadiusSmall:"4px"},{prefix:"aptechka-"});if(p.isBrowser){const r=Nt({":root":f.style}).node;r.setAttribute("data-permanent",""),document.head.appendChild(r)}const Ft='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M20.536 3.464C19.07 2 16.714 2 12 2C7.286 2 4.929 2 3.464 3.464C2 4.93 2 7.286 2 12c0 4.714 0 7.071 1.464 8.535C4.93 22 7.286 22 12 22c4.714 0 7.071 0 8.535-1.465C22 19.072 22 16.714 22 12s0-7.071-1.465-8.536M16.75 12a.75.75 0 0 1-.75.75H9.81l1.72 1.72a.75.75 0 1 1-1.06 1.06l-3-3a.75.75 0 0 1 0-1.06l3-3a.75.75 0 1 1 1.06 1.06l-1.72 1.72H16a.75.75 0 0 1 .75.75" clip-rule="evenodd"/></svg>',$t='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path d="M15.24 2h-3.894c-1.764 0-3.162 0-4.255.148c-1.126.152-2.037.472-2.755 1.193c-.719.721-1.038 1.636-1.189 2.766C3 7.205 3 8.608 3 10.379v5.838c0 1.508.92 2.8 2.227 3.342c-.067-.91-.067-2.185-.067-3.247v-5.01c0-1.281 0-2.386.118-3.27c.127-.948.413-1.856 1.147-2.593c.734-.737 1.639-1.024 2.583-1.152c.88-.118 1.98-.118 3.257-.118h3.07c1.276 0 2.374 0 3.255.118A3.601 3.601 0 0 0 15.24 2Z"/><path d="M6.6 11.397c0-2.726 0-4.089.844-4.936c.843-.847 2.2-.847 4.916-.847h2.88c2.715 0 4.073 0 4.917.847c.843.847.843 2.21.843 4.936v4.82c0 2.726 0 4.089-.843 4.936c-.844.847-2.202.847-4.917.847h-2.88c-2.715 0-4.073 0-4.916-.847c-.844-.847-.844-2.21-.844-4.936v-4.82Z"/></svg>',ns='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10-5.75a.75.75 0 0 1 .75.75v5.19l1.72-1.72a.75.75 0 1 1 1.06 1.06l-3 3a.75.75 0 0 1-1.06 0l-3-3a.75.75 0 1 1 1.06-1.06l1.72 1.72V7a.75.75 0 0 1 .75-.75Zm-4 10a.75.75 0 0 0 0 1.5h8a.75.75 0 0 0 0-1.5H8Z" clip-rule="evenodd"/></svg>',os='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 24 24"><path fill-rule="evenodd" d="M2 12c0-4.714 0-7.071 1.464-8.536C4.93 2 7.286 2 12 2c4.714 0 7.071 0 8.535 1.464C22 4.93 22 7.286 22 12c0 4.714 0 7.071-1.465 8.535C19.072 22 16.714 22 12 22s-7.071 0-8.536-1.465C2 19.072 2 16.714 2 12Zm10 5.75a.75.75 0 0 0 .75-.75v-5.19l1.72 1.72a.75.75 0 1 0 1.06-1.06l-3-3a.75.75 0 0 0-1.06 0l-3 3a.75.75 0 1 0 1.06 1.06l1.72-1.72V17c0 .414.336.75.75.75Zm-4-10a.75.75 0 0 1 0-1.5h8a.75.75 0 0 1 0 1.5H8Z" clip-rule="evenodd"/></svg>',Pt=`<svg
|
|
2
2
|
xmlns="http://www.w3.org/2000/svg"
|
|
3
3
|
width="32"
|
|
4
4
|
height="32"
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
>
|
|
7
7
|
<path d="m12.37 15.835l6.43-6.63C19.201 8.79 18.958 8 18.43 8H5.57c-.528 0-.771.79-.37 1.205l6.43 6.63c.213.22.527.22.74 0Z" />
|
|
8
8
|
</svg>
|
|
9
|
-
`;var W,z,D;class rs{constructor(){o(this,W);o(this,z);o(this,D);this.scrollValue=0,c(this,W,""),c(this,z,[]),c(this,D,{}),c(this,W,m.storeRegistry.name+"-tweaker")}openPanel(s){e(this,z).includes(s)||e(this,z).push(s)}closePanel(s){c(this,z,e(this,z).filter(t=>t!==s))}isPanelOpened(s){return e(this,z).includes(s)}changedSizes(s){return e(this,D)[s]}changeSize(s,t){t?e(this,D)[s]=t:delete e(this,D)[s]}save(){const s={openedPanels:e(this,z),changedSizes:e(this,D),scrollValue:this.scrollValue};localStorage.setItem(e(this,W),JSON.stringify(s)),m.storeRegistry.saveState()}load(){m.storeRegistry.loadState();const s=localStorage.getItem(e(this,W));if(s)try{const t=JSON.parse(s);t.openedPanels&&c(this,z,t.openedPanels),t.changedSizes&&c(this,D,t.changedSizes),t.scrollValue&&(this.scrollValue=t.scrollValue)}catch(t){console.error(t)}}}W=new WeakMap,z=new WeakMap,D=new WeakMap;const T=new rs,as='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 256 256"><path d="m243.33 90.91l-128.41 128.4a16 16 0 0 1-22.63 0l-71.62-72a16 16 0 0 1 0-22.61l24-24a16 16 0 0 1 22.57-.06l36.64 35.27l.11.11l92.73-91.37a16 16 0 0 1 22.58 0l24 23.56a16 16 0 0 1 .03 22.7Z"/></svg>',ls=x({":host":{position:"relative",display:"inline-block",width:"30px",height:"30px",borderRadius:f.borderRadiusSmall.var,overflow:"hidden"},"label, .fake":{display:"block"},"label, .fake, .default":{width:"100%",height:"100%"},".real":{position:"absolute",top:"0",left:"0",width:"0px",height:"0px",visibility:"hidden",margin:"0"},".default":{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:f.colorMainAux.var},".default svg":{width:"60%",height:"60%",fill:f.colorFont.var,opacity:0,transition:"var(--duration-short)"},":host(.checked) .default svg":{opacity:1}});var _,j,J,me;const gt=class gt extends HTMLElement{constructor(){super();o(this,J);o(this,_,null);o(this,j);this.attachShadow({mode:"open"}).adoptedStyleSheets.push(ls),c(this,j,this.attachInternals()),w(this,{children:At({children:[rt({class:"fake",children:ue({children:[rt({class:"default",children:[as]})]})}),He({ref:i=>{c(this,_,i),i.required=this.hasAttribute("required"),i.value=this.getAttribute("value")||"",i.checked=this.hasAttribute("checked"),i.name=this.getAttribute("name")||"",l(this,J,me).call(this)},class:"real",type:"checkbox",onChange:()=>{l(this,J,me).call(this),this.dispatchEvent(new Event("change",{composed:!0}))}})]})})}get checked(){return e(this,_).checked}set checked(t){e(this,_).checked=t,l(this,J,me).call(this)}get value(){return e(this,_).value}set value(t){e(this,_).value=t,l(this,J,me).call(this)}};_=new WeakMap,j=new WeakMap,J=new WeakSet,me=function(){this.checked?e(this,j).setFormValue(this.value):e(this,j).setFormValue(null),this.classList.toggle("checked",this.checked)},gt.formAssociated=!0;let at=gt;p.isBrowser&&!customElements.get("e-checkbox")&&customElements.define("e-checkbox",at);var K;class fe extends HTMLElement{constructor(...t){super();o(this,K);c(this,K,t)}addStore(t){e(this,K).push(t)}get firstStore(){return e(this,K)[0]}get stores(){return e(this,K)}updateStores(t){e(this,K).forEach(i=>{i.current=t})}}K=new WeakMap;const hs=x({":host":{width:"100%",display:"inline-flex",height:"max-content"},"e-checkbox":{"--size":"calc(var(--height-input) * 0.8)",width:"var(--size)",height:"var(--size)",borderRadius:f.borderRadiusSmall.var}});class Bt extends fe{constructor(...s){super(...s),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(hs),w(this,{children:[w("e-checkbox",{onChange:i=>{this.updateStores(i.currentTarget.checked)},ref:i=>{this.firstStore.subscribe(n=>{i.checked=n.current})}})]})}}p.isBrowser&&!customElements.get("e-tweaker-boolean-manager")&&customElements.define("e-tweaker-boolean-manager",Bt);const cs=x({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{width:"100%",height:"var(--height-input)",padding:"0",background:"none",borderRadius:f.borderRadius.var,border:"none",blockSize:"unset"},"input::-webkit-color-swatch, input::-webkit-color-swatch-wrapper":{boxSizing:"border-box",padding:"0px",border:"none",borderRadius:f.borderRadius.var,height:"calc(var(--height-input) * 0.93)"}});class It extends fe{constructor(...s){super(...s),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(cs),w(this,{children:[He({type:"color",value:this.firstStore,onInput:i=>{this.updateStores(i.currentTarget.value)}})]})}}p.isBrowser&&!customElements.get("e-tweaker-color-manager")&&customElements.define("e-tweaker-color-manager",It);const ds=x({a:{color:"inherit",fontSize:"var(--font-size-small)"}});class Ht extends fe{constructor(...s){var i;super(...s),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(ds),w(this,{children:[ss({href:this.firstStore,target:(i=this.firstStore.__manager)!=null&&i.sameWindow?"_self":"_blank",children:this.firstStore})]})}}p.isBrowser&&!customElements.get("e-tweaker-link-manager")&&customElements.define("e-tweaker-link-manager",Ht);const us=x({":host":{width:"100%",display:"flex",alignItems:"center",gap:"var(--gap-small)"},".inputs-wrapper":{display:"grid",gap:"var(--gap-small)",width:"100%"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",width:"100%",height:"var(--height-input)",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:f.borderRadius.var},".drag":{position:"relative",width:"100%",height:"calc(var(--height-input) * 0.2)",display:"flex",alignItems:"center"},".drag::before":{content:'""',position:"absolute",left:"0",width:"100%",zIndex:"-1",height:"1px",borderBottom:`1px solid ${f.colorFont.var}`,transform:"translateY(-50%)",opacity:"0.3"},":host(.infinite) .drag::before":{borderBottom:`1px dashed ${f.colorFont.var}`},".drag-knob":{"--size":"calc(var(--height-input) * 0.4)",width:"var(--size)",height:"var(--size)"},".drag-knob-inner":{width:"100%",height:"100%",backgroundColor:f.colorFont.var,borderRadius:f.borderRadiusSmall.var,transition:"opacity var(--duration-short)"},":host(.infinite) .grabbing .drag-knob-inner":{opacity:.3}});var Y,ee,te,q,O,be,ve,$,G,ye,Se,b,X,lt,ht,Ve,ke;class Dt extends fe{constructor(...t){var n,h,u,g;super(...t);o(this,b);o(this,Y,[]);o(this,ee,[]);o(this,te);o(this,q);o(this,O);o(this,be);o(this,ve);o(this,$);o(this,G,!1);o(this,ye,t=>{const i=l(this,b,X).call(this,t);return i.map((n,h)=>{const u=typeof n=="string"?parseFloat(n)||e(this,q):n,g=Qt.clamp(u,e(this,q),e(this,O)),E=jt.toStep(g,e(this,te));i[h]=E}),e(this,ve)==="number"?i[0]:i});o(this,Se,()=>{l(this,b,X).call(this).map((t,i)=>{const n=e(this,Y)[i];n&&(n.value=(t||0).toString())}),l(this,b,lt).call(this)});o(this,ke,()=>{l(this,b,lt).call(this)});this.attachShadow({mode:"open"}).adoptedStyleSheets.push(us),c(this,q,vt.nullishCoalescing((n=this.firstStore.__manager)==null?void 0:n.min,-1/0)),c(this,O,vt.nullishCoalescing((h=this.firstStore.__manager)==null?void 0:h.max,1/0)),c(this,te,((u=this.firstStore.__manager)==null?void 0:u.step)||.01),c(this,be,((g=this.firstStore.__manager)==null?void 0:g.ease)||1),c(this,ve,Array.isArray(this.firstStore.current)?"array":"number"),c(this,$,isFinite(e(this,O))&&isFinite(e(this,q))),w(this,{class:e(this,$)?"":"infinite",children:l(this,b,X).call(this).map((E,L)=>v({class:"inputs-wrapper",children:[He({type:"number",step:e(this,te),min:e(this,q),max:e(this,O),ref:y=>e(this,Y).push(y),value:E,onChange:()=>{this.updateStores(e(this,Y).map(y=>parseFloat(y.value)))}}),v({class:"drag",children:[v({class:"drag-knob",ref:y=>e(this,ee).push(y),onPointerdown:y=>{y.preventDefault(),c(this,G,!0);const ge=l(this,b,X).call(this),De=ge[L],C=e(this,ee)[L],F=e(this,Y)[L];if(C&&F){const P=C.parentElement,V=l(this,b,ht).call(this);P.classList.add("grabbing"),St.setupDrag(Z=>{const pt=Z.x-y.x,Zt=e(this,$)?P.offsetWidth/(V||1):1,Wt=De+pt/Zt*e(this,be);if(ge[L]=Wt,!e(this,$)){const Jt=l(this,b,Ve).call(this,C,0);C.style.transform=`translateX(${Jt+pt}px)`}this.updateStores([...ge])},()=>{if(c(this,G,!1),!e(this,$)){const Z=l(this,b,Ve).call(this,C,0);C.style.transition="transform 0.1s",C.style.transform=`translateX(${Z}px)`,P.classList.remove("grabbing"),setTimeout(()=>{C.style.transition=""},100)}})}},children:v({class:"drag-knob-inner"})})]})]}))})}connectedCallback(){this.firstStore.addMiddleware(e(this,ye)),this.firstStore.subscribe(e(this,Se)),yt.elementResizer.subscribe(this,e(this,ke))}disconnectedCallback(){this.firstStore.removeMiddleware(e(this,ye)),this.firstStore.unsubscribe(e(this,Se)),yt.elementResizer.unsubscribe(e(this,ke))}}Y=new WeakMap,ee=new WeakMap,te=new WeakMap,q=new WeakMap,O=new WeakMap,be=new WeakMap,ve=new WeakMap,$=new WeakMap,G=new WeakMap,ye=new WeakMap,Se=new WeakMap,b=new WeakSet,X=function(t=this.firstStore.current){return Array.isArray(t)?t:[t]},lt=function(){l(this,b,X).call(this).map((t,i)=>{const n=e(this,ee)[i];if(n&&(!e(this,G)||e(this,G)&&e(this,$))){const h=l(this,b,Ve).call(this,n,t);n.style.transform=`translateX(${h}px)`}})},ht=function(){return e(this,$)?e(this,O)-e(this,q):0},Ve=function(t,i){const n=t.parentElement,h=l(this,b,ht).call(this),u=h?i/h:.5;return(n.offsetWidth-t.offsetWidth)*u},ke=new WeakMap;p.isBrowser&&!customElements.get("e-tweaker-number-manager")&&customElements.define("e-tweaker-number-manager",Dt);function qt(r){r.dispatchEvent(new CustomEvent("sizeChange",{bubbles:!0,composed:!0}))}function fs(r){r.dispatchEvent(new CustomEvent("beforeSizeChange",{bubbles:!0,composed:!0}))}const gs=x({":host":{position:"relative"},".head":{width:"100%",cursor:"default",background:"none",border:"none",color:"inherit",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit",textAlign:"start",padding:"0",margin:"0"},".body":{boxSizing:"border-box",position:"var(--position, unset)",top:"100%",left:"0",width:"100%",overflow:"hidden",transitionDuration:"var(--duration, var(--duration-short))",transitionProperty:"height",cursor:"default"},".body-inner":{display:"grid",gap:"var(--gap, 0px)",width:"100%",paddingTop:"var(--gap, 0px)"}});var se,ie,R,U,ne,oe,We,Ee,dt;const mt=class mt extends HTMLElement{constructor(){super();o(this,Ee);o(this,se,null);o(this,ie,"");o(this,R,null);o(this,U,!1);o(this,ne);o(this,oe,null);o(this,We,()=>{qt(this)});p.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(gs),c(this,se,this.attachInternals()),c(this,oe,new ResizeObserver(e(this,We))),w(this,{children:[Q({class:"head",children:ue({name:"head"}),onClick:()=>{this.opened?this.close():this.open()}}),v({class:"body",style:{height:"0px"},children:v({class:"body-inner",children:ue()}),ref:i=>{c(this,R,i)}})]}))}get value(){return e(this,ie)}set value(t){c(this,ie,t),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),e(this,se).setFormValue(e(this,ie))}get internals(){return e(this,se)}get opened(){return e(this,U)}open(){clearTimeout(e(this,ne)),c(this,U,!0),e(this,R).style.display="grid",this.classList.add("triggered"),setTimeout(()=>{this.classList.add("opened"),e(this,R).style.height=e(this,R).scrollHeight+"px",l(this,Ee,dt).call(this)},0)}close(){c(this,U,!1),e(this,R).style.height="0px",this.classList.remove("opened"),l(this,Ee,dt).call(this),c(this,ne,setTimeout(()=>{this.classList.remove("triggered"),e(this,R).style.display="none"},es.getElementTransitionDurationMS(e(this,R))))}connectedCallback(){e(this,oe).observe(e(this,R))}disconnectedCallback(){clearTimeout(e(this,ne)),e(this,oe).disconnect()}};se=new WeakMap,ie=new WeakMap,R=new WeakMap,U=new WeakMap,ne=new WeakMap,oe=new WeakMap,We=new WeakMap,Ee=new WeakSet,dt=function(){fs(this),this.dispatchEvent(new CustomEvent("selectToggle",{bubbles:!0,composed:!0,detail:{opened:e(this,U)}}))},mt.formAssociated=!0;let ct=mt;p.isBrowser&&!customElements.get("e-select")&&customElements.define("e-select",ct);var xe;class Vt extends HTMLElement{constructor(){super(...arguments);o(this,xe,null)}get selectElement(){return e(this,xe)}connectedCallback(){var i,n;const t=(n=(i=this.assignedSlot)==null?void 0:i.getRootNode())==null?void 0:n.host;t?c(this,xe,t):console.log(this,"e-select not found")}}xe=new WeakMap;const ms=x({":host":{width:"100%",height:"40px",display:"inline-flex",alignItems:"center"}});var re,Ce,ut;class ps extends Vt{constructor(){super();o(this,Ce);o(this,re,()=>{this.selectElement.value===this.value?this.style.display="none":this.style.display=""});p.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(ms),w(this,{tabindex:0,onClick:()=>{l(this,Ce,ut).call(this)},onKeydown:i=>{i.code==="Space"&&l(this,Ce,ut).call(this)},children:ue()}))}get value(){return(this.hasAttribute("value")?this.getAttribute("value"):this.innerText)||""}connectedCallback(){super.connectedCallback(),this.hasAttribute("default")&&(this.selectElement.value||(this.selectElement.value=this.value)),this.selectElement.addEventListener("change",e(this,re)),setTimeout(()=>{e(this,re).call(this)})}disconnectedCallback(){this.selectElement.removeEventListener("change",e(this,re))}}re=new WeakMap,Ce=new WeakSet,ut=function(){this.selectElement.value=this.value,this.selectElement.close()};p.isBrowser&&!customElements.get("e-select-option")&&customElements.define("e-select-option",ps);const ws=x({":host":{width:"100%",height:"40px",display:"inline-flex",alignItems:"center",justifyContent:"space-between"},".default-arrow":{flexShrink:"0",width:"var(--arrow-size, 1em)",height:"var(--arrow-size, 1em)",fill:`var(--arrow-color, ${f.colorMain.var})`,transitionProperty:"transform",transitionDuration:"var(--duration, var(--duration-short))"},":host(.opened) .default-arrow":{transform:"scaleY(-1)"}});var Te,ae,Le;class bs extends Vt{constructor(){super();o(this,Te,null);o(this,ae,()=>{const i=this.selectElement.shadowRoot.querySelector(".body slot").assignedElements().find(n=>n.value===this.selectElement.value);i&&(e(this,Te).innerHTML=i.innerHTML)});o(this,Le,()=>{this.classList.toggle("opened",this.selectElement.opened)});p.isBrowser&&(this.attachShadow({mode:"open"}).adoptedStyleSheets.push(ws),w(this,{children:[ue(),ue({name:"arrow",children:w(Pt,{class:"default-arrow"})})]}),this.slot="head")}connectedCallback(){super.connectedCallback(),c(this,Te,this.querySelector("[data-value-holder]")||this),this.selectElement.addEventListener("change",e(this,ae)),e(this,ae).call(this),this.selectElement.addEventListener("selectToggle",e(this,Le))}disconnectedCallback(){this.selectElement.removeEventListener("change",e(this,ae)),this.selectElement.removeEventListener("selectToggle",e(this,Le))}}Te=new WeakMap,ae=new WeakMap,Le=new WeakMap;p.isBrowser&&!customElements.get("e-select-head")&&customElements.define("e-select-head",bs);const vs=x({"e-select":{display:"block",width:"100%","--arrow-color":f.colorFont.var},"e-select-head":{width:"100%",height:"var(--height-input)",display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:"var(--font-size-small)"},"e-select-option":{height:"var(--height-input)",transitionDuration:"var(--duration-short)",transitionProperty:"color",fontSize:"var(--font-size-small)"},"e-select-option:hover":{color:f.colorActive.var},svg:{width:"16px",height:"16px",fill:f.colorFont.var,transitionProperty:"transform",transitionDuration:"var(--duration-short)"},".opened svg":{transform:"scaleY(-1)"}});class _t extends fe{constructor(...s){var n;super(...s),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(vs);const i=((n=this.firstStore.__manager)==null?void 0:n.variants)||[];w(this,{children:w("e-select",{value:this.firstStore,onChange:h=>{this.updateStores(h.currentTarget.value)},lightChildren:[w("e-select-head",{lightChildren:[rt({"data-value-holder":""})]}),...i.map((h,u)=>w("e-select-option",{lightChildren:h,default:u===0?!0:null}))]})})}}p.isBrowser&&!customElements.get("e-tweaker-select-manager")&&customElements.define("e-tweaker-select-manager",_t);const ys=x({":host":{width:"100%",display:"flex",alignItems:"center"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",height:"var(--height-input)",width:"100%",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:f.borderRadius.var}});class Kt extends fe{constructor(...s){super(...s),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(ys),w(this,{children:[He({class:"text-input",type:"string",value:this.firstStore,onChange:i=>{this.updateStores(i.currentTarget.value)}})]})}}p.isBrowser&&!customElements.get("e-tweaker-string-manager")&&customElements.define("e-tweaker-string-manager",Kt);const Ss={boolean:Bt,color:It,link:Ht,number:Dt,select:_t,string:Kt},ks=x({":host":{display:"grid",gridAutoFlow:"column",gridTemplateColumns:"0.5fr 1fr",alignItems:"center",color:f.colorFont.var,gap:"var(--gap-medium)"},":host(.disabled)":{pointerEvents:"none",opacity:.5},".head":{fontSize:"var(--font-size-medium)",display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".head-buttons":{display:"flex"},".head-button":{width:"14px",height:"14px",padding:"0",margin:"0",border:"none",background:"none",fill:f.colorFont.var,transitionDuration:"var(--duration-short)",transitionProperty:"fill, opacity",opacity:"0"},":host(:hover) .head-button":{opacity:"1"},".head-button:hover":{fill:f.colorActive.var},".head-button svg":{width:"100%",height:"100%"}});var M,le,he,ce,de,ze,Re;class ft extends HTMLElement{constructor(t){var h,u;super();o(this,M,[]);o(this,le);o(this,he);o(this,ce,!1);o(this,de);o(this,ze,()=>{m.activeStores.current.find(t=>e(this,M).includes(t))||this.remove()});o(this,Re,t=>{e(this,ce)&&((t.metaKey||t.ctrlKey)&&t.code==="KeyC"?navigator.clipboard.writeText(e(this,M)[0].current):(t.metaKey||t.ctrlKey)&&t.code==="KeyR"&&(e(this,M).forEach(i=>{i.reset()}),t.preventDefault()))});c(this,M,[t.store]),c(this,le,t.store.name),c(this,he,e(this,le).split(".").slice(-1).toString());const i=((h=t.store.__manager)==null?void 0:h.type)||"string";c(this,de,new Ss[i](e(this,M)[0])),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(ks),w(this,{class:{disabled:((u=t.store.__manager)==null?void 0:u.disabled)||!1},onPointerleave:()=>{c(this,ce,!1)},onPointerenter:()=>{c(this,ce,!0)},children:[v({class:"head",children:[v({class:"name",children:e(this,he)+":"}),v({class:"head-buttons",children:[Q({class:"head-button",children:$t,onClick:()=>{navigator.clipboard.writeText(e(this,M)[0].current)}}),Q({class:"head-button",children:Ft,onClick:()=>{e(this,M).forEach(g=>{g.reset()})}})]})]}),e(this,de)]})}get key(){return e(this,le)}get name(){return e(this,he)}get stores(){return e(this,M)}addStore(t){e(this,de).addStore(t)}connectedCallback(){m.activeStores.subscribe(e(this,ze)),addEventListener("keydown",e(this,Re)),qt(this)}disconnectedCallback(){m.activeStores.unsubscribe(e(this,ze)),removeEventListener("keydown",e(this,Re))}}M=new WeakMap,le=new WeakMap,he=new WeakMap,ce=new WeakMap,de=new WeakMap,ze=new WeakMap,Re=new WeakMap;p.isBrowser&&!customElements.get("e-tweaker-field")&&customElements.define("e-tweaker-field",ft);const Es=x({".wrapper":{boxSizing:"border-box",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:f.borderRadius.var},".head":{boxSizing:"border-box",width:"100%",height:"var(--tweaker-folder-height)",paddingLeft:"var(--gap-medium)",paddingRight:"var(--gap-medium)",display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:f.colorMainAux.var,borderRadius:f.borderRadius.var},".name":{fontSize:"var(--font-size-large)",color:f.colorFont.var},".body":{display:"none",overflow:"hidden","@supports (height: calc-size(auto))":{height:"0"}},":host(.transition-allowed) .body":{transition:"height var(--duration-short), display var(--duration-short) allow-discrete"},":host(.opened) .body":{height:"calc-size(auto)",display:"block","@starting-style":{height:"0"}},".body-content":{boxSizing:"border-box",padding:"var(--gap-large)",display:"grid",gap:"var(--gap-medium)"},".arrow":{width:"20px",height:"20px",fill:f.colorFont.var,transition:"transform var(--duration-short)"},".opened .arrow":{transform:"scaleY(-1)"}});var A,Me,k,Ae,Ne,Fe,$e,Je;const Ye=class Ye extends HTMLElement{constructor(t){super();o(this,A);o(this,Me,new m.Store(null));o(this,k,new m.Store([]));o(this,Ae);o(this,Ne,null);o(this,Fe,null);o(this,$e,null);o(this,Je,t=>{let i=[],n=[];t.forEach(h=>{i=[...i,...h.removedNodes],n=[...n,...h.addedNodes]}),e(this,k).current=e(this,k).current.filter(h=>!i.includes(h)),e(this,A)&&!e(this,k).current.length&&!n.length&&this.remove()});this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Es),c(this,A,t.key),c(this,Ae,new MutationObserver(e(this,Je))),w(this,{children:[v({class:"wrapper",children:[v({class:"head",onClick:n=>{this.classList.toggle("opened"),this.classList.contains("opened")?T.openPanel(e(this,A)):T.closePanel(e(this,A))},children:[e(this,A)?v({class:"name",children:[e(this,A).split(".").slice(-1).toString()]}):null,e(this,Me),w(Pt,{class:"arrow"})]}),v({class:"body",ref:n=>{c(this,Ne,n)},children:v({class:"body-content",children:e(this,k),ref:n=>{c(this,Fe,n),c(this,$e,n.firstElementChild)}})})]})]}),t!=null&&t.storeBox&&this.handleStore(t.storeBox)}get key(){return e(this,A)}get head(){return e(this,Me)}get content(){return e(this,k)}get bodyElement(){return e(this,Ne)}get contentElement(){return e(this,Fe)}connectedCallback(){T.isPanelOpened(e(this,A))&&this.classList.add("opened"),setTimeout(()=>{this.classList.add("transition-allowed")}),e(this,Ae).observe(e(this,$e),{childList:!0})}handleStore(t){if(t.remainingFolders.length){const n=t.store.name.split("."),h=n.slice(0,n.length-t.remainingFolders.length).join("."),u=e(this,k).current.find(g=>g.key===h);u instanceof Ye?u.handleStore({store:t.store,remainingFolders:t.remainingFolders.slice(1)}):e(this,k).current=[...e(this,k).current,new Ye({key:h,storeBox:{store:t.store,remainingFolders:t.remainingFolders.slice(1)}})]}else{const i=e(this,k).current.find(n=>n.key===t.store.name);i instanceof ft?i.addStore(t.store):e(this,k).current=[...e(this,k).current,new ft({store:t.store})]}}};A=new WeakMap,Me=new WeakMap,k=new WeakMap,Ae=new WeakMap,Ne=new WeakMap,Fe=new WeakMap,$e=new WeakMap,Je=new WeakMap;let _e=Ye;p.isBrowser&&!customElements.get("e-tweaker-folder")&&customElements.define("e-tweaker-folder",_e);const xs=x({":host":{"--tweaker-width":"550px","--tweaker-offset":"20px","--tweaker-folder-height":"35px","--height-input":"25px","--gap-large":"12px","--gap-medium":"10px","--gap-small":"8px","--gap-extra-small":"4px","--font-size-large":"16px","--font-size-medium":"14px","--font-size-small":"12px","--duration-short":"0.2s",fontFamily:"sans-serif",position:"absolute",top:"var(--tweaker-offset)",right:"var(--tweaker-offset)",width:"var(--tweaker-width)",backgroundColor:f.colorMain.var,borderRadius:f.borderRadius.var,transition:"opacity 0.1s",zIndex:"100",opacity:"0.1"},":host(:hover)":{opacity:"1 !important"},".resize":{position:"absolute",left:"0",top:"0",width:"calc(var(--tweaker-width) * 0.025)",height:"100%",zIndex:"1",cursor:"ew-resize"},".tweaker-buttons":{display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".tweaker-button":{width:"18px",height:"18px",padding:"0",margin:"0",background:"none",border:"none",fill:f.colorFont.var,transitionProperty:"fill",transitionDuration:"var(--duration-short)"},".tweaker-button:hover":{fill:f.colorActive.var},".tweaker-button svg":{width:"100%",height:"100%"},":host .body-content":{maxHeight:`calc(
|
|
9
|
+
`;var W,z,D;class rs{constructor(){o(this,W);o(this,z);o(this,D);this.scrollValue=0,c(this,W,""),c(this,z,[]),c(this,D,{}),c(this,W,m.storeRegistry.name+"-tweaker")}openPanel(s){t(this,z).includes(s)||t(this,z).push(s)}closePanel(s){c(this,z,t(this,z).filter(e=>e!==s))}isPanelOpened(s){return t(this,z).includes(s)}changedSizes(s){return t(this,D)[s]}changeSize(s,e){e?t(this,D)[s]=e:delete t(this,D)[s]}save(){const s={openedPanels:t(this,z),changedSizes:t(this,D),scrollValue:this.scrollValue};localStorage.setItem(t(this,W),JSON.stringify(s)),m.storeRegistry.saveState()}load(){m.storeRegistry.loadState();const s=localStorage.getItem(t(this,W));if(s)try{const e=JSON.parse(s);e.openedPanels&&c(this,z,e.openedPanels),e.changedSizes&&c(this,D,e.changedSizes),e.scrollValue&&(this.scrollValue=e.scrollValue)}catch(e){console.error(e)}}}W=new WeakMap,z=new WeakMap,D=new WeakMap;const T=new rs,as='<svg xmlns="http://www.w3.org/2000/svg" width="32" height="32" viewBox="0 0 256 256"><path d="m243.33 90.91l-128.41 128.4a16 16 0 0 1-22.63 0l-71.62-72a16 16 0 0 1 0-22.61l24-24a16 16 0 0 1 22.57-.06l36.64 35.27l.11.11l92.73-91.37a16 16 0 0 1 22.58 0l24 23.56a16 16 0 0 1 .03 22.7Z"/></svg>',ls=x({":host":{position:"relative",display:"inline-block",width:"30px",height:"30px",borderRadius:f.borderRadiusSmall.var,overflow:"hidden"},"label, .fake":{display:"block"},"label, .fake, .default":{width:"100%",height:"100%"},".real":{position:"absolute",top:"0",left:"0",width:"0px",height:"0px",visibility:"hidden",margin:"0"},".default":{display:"flex",alignItems:"center",justifyContent:"center",backgroundColor:f.colorMainAux.var},".default svg":{width:"60%",height:"60%",fill:f.colorFont.var,opacity:0,transition:"var(--duration-short)"},":host(.checked) .default svg":{opacity:1}});var _,j,J,me;const gt=class gt extends HTMLElement{constructor(){super();o(this,J);o(this,_,null);o(this,j);const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[...e.adoptedStyleSheets,ls],c(this,j,this.attachInternals()),w(this,{children:At({children:[rt({class:"fake",children:ue({children:[rt({class:"default",children:[as]})]})}),He({ref:i=>{c(this,_,i),i.required=this.hasAttribute("required"),i.value=this.getAttribute("value")||"",i.checked=this.hasAttribute("checked"),i.name=this.getAttribute("name")||"",l(this,J,me).call(this)},class:"real",type:"checkbox",onChange:()=>{l(this,J,me).call(this),this.dispatchEvent(new Event("change",{composed:!0}))}})]})})}get checked(){return t(this,_).checked}set checked(e){t(this,_).checked=e,l(this,J,me).call(this)}get value(){return t(this,_).value}set value(e){t(this,_).value=e,l(this,J,me).call(this)}};_=new WeakMap,j=new WeakMap,J=new WeakSet,me=function(){this.checked?t(this,j).setFormValue(this.value):t(this,j).setFormValue(null),this.classList.toggle("checked",this.checked)},gt.formAssociated=!0;let at=gt;p.isBrowser&&!customElements.get("e-checkbox")&&customElements.define("e-checkbox",at);var K;class fe extends HTMLElement{constructor(...e){super();o(this,K);c(this,K,e)}addStore(e){t(this,K).push(e)}get firstStore(){return t(this,K)[0]}get stores(){return t(this,K)}updateStores(e){t(this,K).forEach(i=>{i.current=e})}}K=new WeakMap;const hs=x({":host":{width:"100%",display:"inline-flex",height:"max-content"},"e-checkbox":{"--size":"calc(var(--height-input) * 0.8)",width:"var(--size)",height:"var(--size)",borderRadius:f.borderRadiusSmall.var}});class Bt extends fe{constructor(...s){super(...s);const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[...e.adoptedStyleSheets,hs],w(this,{children:[w("e-checkbox",{onChange:i=>{this.updateStores(i.currentTarget.checked)},ref:i=>{this.firstStore.subscribe(n=>{i.checked=n.current})}})]})}}p.isBrowser&&!customElements.get("e-tweaker-boolean-manager")&&customElements.define("e-tweaker-boolean-manager",Bt);const cs=x({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{width:"100%",height:"var(--height-input)",padding:"0",background:"none",borderRadius:f.borderRadius.var,border:"none",blockSize:"unset"},"input::-webkit-color-swatch, input::-webkit-color-swatch-wrapper":{boxSizing:"border-box",padding:"0px",border:"none",borderRadius:f.borderRadius.var,height:"calc(var(--height-input) * 0.93)"}});class It extends fe{constructor(...s){super(...s);const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[...e.adoptedStyleSheets,cs],w(this,{children:[He({type:"color",value:this.firstStore,onInput:i=>{this.updateStores(i.currentTarget.value)}})]})}}p.isBrowser&&!customElements.get("e-tweaker-color-manager")&&customElements.define("e-tweaker-color-manager",It);const ds=x({a:{color:"inherit",fontSize:"var(--font-size-small)"}});class Ht extends fe{constructor(...s){var i;super(...s);const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[...e.adoptedStyleSheets,ds],w(this,{children:[ss({href:this.firstStore,target:(i=this.firstStore.__manager)!=null&&i.sameWindow?"_self":"_blank",children:this.firstStore})]})}}p.isBrowser&&!customElements.get("e-tweaker-link-manager")&&customElements.define("e-tweaker-link-manager",Ht);const us=x({":host":{width:"100%",display:"flex",alignItems:"center",gap:"var(--gap-small)"},".inputs-wrapper":{display:"grid",gap:"var(--gap-small)",width:"100%"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",width:"100%",height:"var(--height-input)",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:f.borderRadius.var},".drag":{position:"relative",width:"100%",height:"calc(var(--height-input) * 0.2)",display:"flex",alignItems:"center"},".drag::before":{content:'""',position:"absolute",left:"0",width:"100%",zIndex:"-1",height:"1px",borderBottom:`1px solid ${f.colorFont.var}`,transform:"translateY(-50%)",opacity:"0.3"},":host(.infinite) .drag::before":{borderBottom:`1px dashed ${f.colorFont.var}`},".drag-knob":{"--size":"calc(var(--height-input) * 0.4)",width:"var(--size)",height:"var(--size)"},".drag-knob-inner":{width:"100%",height:"100%",backgroundColor:f.colorFont.var,borderRadius:f.borderRadiusSmall.var,transition:"opacity var(--duration-short)"},":host(.infinite) .grabbing .drag-knob-inner":{opacity:.3}});var Y,ee,te,q,O,be,ve,$,G,ye,Se,b,X,lt,ht,Ve,ke;class Dt extends fe{constructor(...e){var n,h,u,g;super(...e);o(this,b);o(this,Y,[]);o(this,ee,[]);o(this,te);o(this,q);o(this,O);o(this,be);o(this,ve);o(this,$);o(this,G,!1);o(this,ye,e=>{const i=l(this,b,X).call(this,e);return i.map((n,h)=>{const u=typeof n=="string"?parseFloat(n)||t(this,q):n,g=Qt.clamp(u,t(this,q),t(this,O)),E=jt.toStep(g,t(this,te));i[h]=E}),t(this,ve)==="number"?i[0]:i});o(this,Se,()=>{l(this,b,X).call(this).map((e,i)=>{const n=t(this,Y)[i];n&&(n.value=(e||0).toString())}),l(this,b,lt).call(this)});o(this,ke,()=>{l(this,b,lt).call(this)});const i=this.attachShadow({mode:"open"});i.adoptedStyleSheets=[...i.adoptedStyleSheets,us],c(this,q,vt.nullishCoalescing((n=this.firstStore.__manager)==null?void 0:n.min,-1/0)),c(this,O,vt.nullishCoalescing((h=this.firstStore.__manager)==null?void 0:h.max,1/0)),c(this,te,((u=this.firstStore.__manager)==null?void 0:u.step)||.01),c(this,be,((g=this.firstStore.__manager)==null?void 0:g.ease)||1),c(this,ve,Array.isArray(this.firstStore.current)?"array":"number"),c(this,$,isFinite(t(this,O))&&isFinite(t(this,q))),w(this,{class:t(this,$)?"":"infinite",children:l(this,b,X).call(this).map((E,L)=>v({class:"inputs-wrapper",children:[He({type:"number",step:t(this,te),min:t(this,q),max:t(this,O),ref:y=>t(this,Y).push(y),value:E,onChange:()=>{this.updateStores(t(this,Y).map(y=>parseFloat(y.value)))}}),v({class:"drag",children:[v({class:"drag-knob",ref:y=>t(this,ee).push(y),onPointerdown:y=>{y.preventDefault(),c(this,G,!0);const ge=l(this,b,X).call(this),De=ge[L],C=t(this,ee)[L],F=t(this,Y)[L];if(C&&F){const P=C.parentElement,V=l(this,b,ht).call(this);P.classList.add("grabbing"),St.setupDrag(Z=>{const pt=Z.x-y.x,Zt=t(this,$)?P.offsetWidth/(V||1):1,Wt=De+pt/Zt*t(this,be);if(ge[L]=Wt,!t(this,$)){const Jt=l(this,b,Ve).call(this,C,0);C.style.transform=`translateX(${Jt+pt}px)`}this.updateStores([...ge])},()=>{if(c(this,G,!1),!t(this,$)){const Z=l(this,b,Ve).call(this,C,0);C.style.transition="transform 0.1s",C.style.transform=`translateX(${Z}px)`,P.classList.remove("grabbing"),setTimeout(()=>{C.style.transition=""},100)}})}},children:v({class:"drag-knob-inner"})})]})]}))})}connectedCallback(){this.firstStore.addMiddleware(t(this,ye)),this.firstStore.subscribe(t(this,Se)),yt.elementResizer.subscribe(this,t(this,ke))}disconnectedCallback(){this.firstStore.removeMiddleware(t(this,ye)),this.firstStore.unsubscribe(t(this,Se)),yt.elementResizer.unsubscribe(t(this,ke))}}Y=new WeakMap,ee=new WeakMap,te=new WeakMap,q=new WeakMap,O=new WeakMap,be=new WeakMap,ve=new WeakMap,$=new WeakMap,G=new WeakMap,ye=new WeakMap,Se=new WeakMap,b=new WeakSet,X=function(e=this.firstStore.current){return Array.isArray(e)?e:[e]},lt=function(){l(this,b,X).call(this).map((e,i)=>{const n=t(this,ee)[i];if(n&&(!t(this,G)||t(this,G)&&t(this,$))){const h=l(this,b,Ve).call(this,n,e);n.style.transform=`translateX(${h}px)`}})},ht=function(){return t(this,$)?t(this,O)-t(this,q):0},Ve=function(e,i){const n=e.parentElement,h=l(this,b,ht).call(this),u=h?i/h:.5;return(n.offsetWidth-e.offsetWidth)*u},ke=new WeakMap;p.isBrowser&&!customElements.get("e-tweaker-number-manager")&&customElements.define("e-tweaker-number-manager",Dt);function qt(r){r.dispatchEvent(new CustomEvent("sizeChange",{bubbles:!0,composed:!0}))}function fs(r){r.dispatchEvent(new CustomEvent("beforeSizeChange",{bubbles:!0,composed:!0}))}const gs=x({":host":{position:"relative"},".head":{width:"100%",cursor:"default",background:"none",border:"none",color:"inherit",fontFamily:"inherit",fontSize:"inherit",fontWeight:"inherit",textAlign:"start",padding:"0",margin:"0"},".body":{boxSizing:"border-box",position:"var(--position, unset)",top:"100%",left:"0",width:"100%",overflow:"hidden",transitionDuration:"var(--duration, var(--duration-short))",transitionProperty:"height",cursor:"default"},".body-inner":{display:"grid",gap:"var(--gap, 0px)",width:"100%",paddingTop:"var(--gap, 0px)"}});var se,ie,R,U,ne,oe,We,Ee,dt;const mt=class mt extends HTMLElement{constructor(){super();o(this,Ee);o(this,se,null);o(this,ie,"");o(this,R,null);o(this,U,!1);o(this,ne);o(this,oe,null);o(this,We,()=>{qt(this)});if(p.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[...e.adoptedStyleSheets,gs],c(this,se,this.attachInternals()),c(this,oe,new ResizeObserver(t(this,We))),w(this,{children:[Q({class:"head",children:ue({name:"head"}),onClick:()=>{this.opened?this.close():this.open()}}),v({class:"body",style:{height:"0px"},children:v({class:"body-inner",children:ue()}),ref:i=>{c(this,R,i)}})]})}}get value(){return t(this,ie)}set value(e){c(this,ie,e),this.dispatchEvent(new Event("change",{bubbles:!0,composed:!0})),t(this,se).setFormValue(t(this,ie))}get internals(){return t(this,se)}get opened(){return t(this,U)}open(){clearTimeout(t(this,ne)),c(this,U,!0),t(this,R).style.display="grid",this.classList.add("triggered"),setTimeout(()=>{this.classList.add("opened"),t(this,R).style.height=t(this,R).scrollHeight+"px",l(this,Ee,dt).call(this)},0)}close(){c(this,U,!1),t(this,R).style.height="0px",this.classList.remove("opened"),l(this,Ee,dt).call(this),c(this,ne,setTimeout(()=>{this.classList.remove("triggered"),t(this,R).style.display="none"},es.getElementTransitionDurationMS(t(this,R))))}connectedCallback(){t(this,oe).observe(t(this,R))}disconnectedCallback(){clearTimeout(t(this,ne)),t(this,oe).disconnect()}};se=new WeakMap,ie=new WeakMap,R=new WeakMap,U=new WeakMap,ne=new WeakMap,oe=new WeakMap,We=new WeakMap,Ee=new WeakSet,dt=function(){fs(this),this.dispatchEvent(new CustomEvent("selectToggle",{bubbles:!0,composed:!0,detail:{opened:t(this,U)}}))},mt.formAssociated=!0;let ct=mt;p.isBrowser&&!customElements.get("e-select")&&customElements.define("e-select",ct);var xe;class Vt extends HTMLElement{constructor(){super(...arguments);o(this,xe,null)}get selectElement(){return t(this,xe)}connectedCallback(){var i,n;const e=(n=(i=this.assignedSlot)==null?void 0:i.getRootNode())==null?void 0:n.host;e?c(this,xe,e):console.log(this,"e-select not found")}}xe=new WeakMap;const ms=x({":host":{width:"100%",height:"40px",display:"inline-flex",alignItems:"center"}});var re,Ce,ut;class ps extends Vt{constructor(){super();o(this,Ce);o(this,re,()=>{this.selectElement.value===this.value?this.style.display="none":this.style.display=""});if(p.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[...e.adoptedStyleSheets,ms],w(this,{tabindex:0,onClick:()=>{l(this,Ce,ut).call(this)},onKeydown:i=>{i.code==="Space"&&l(this,Ce,ut).call(this)},children:ue()})}}get value(){return(this.hasAttribute("value")?this.getAttribute("value"):this.innerText)||""}connectedCallback(){super.connectedCallback(),this.hasAttribute("default")&&(this.selectElement.value||(this.selectElement.value=this.value)),this.selectElement.addEventListener("change",t(this,re)),setTimeout(()=>{t(this,re).call(this)})}disconnectedCallback(){this.selectElement.removeEventListener("change",t(this,re))}}re=new WeakMap,Ce=new WeakSet,ut=function(){this.selectElement.value=this.value,this.selectElement.close()};p.isBrowser&&!customElements.get("e-select-option")&&customElements.define("e-select-option",ps);const ws=x({":host":{width:"100%",height:"40px",display:"inline-flex",alignItems:"center",justifyContent:"space-between"},".default-arrow":{flexShrink:"0",width:"var(--arrow-size, 1em)",height:"var(--arrow-size, 1em)",fill:`var(--arrow-color, ${f.colorMain.var})`,transitionProperty:"transform",transitionDuration:"var(--duration, var(--duration-short))"},":host(.opened) .default-arrow":{transform:"scaleY(-1)"}});var Te,ae,Le;class bs extends Vt{constructor(){super();o(this,Te,null);o(this,ae,()=>{const i=this.selectElement.shadowRoot.querySelector(".body slot").assignedElements().find(n=>n.value===this.selectElement.value);i&&(t(this,Te).innerHTML=i.innerHTML)});o(this,Le,()=>{this.classList.toggle("opened",this.selectElement.opened)});if(p.isBrowser){const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[...e.adoptedStyleSheets,ws],w(this,{children:[ue(),ue({name:"arrow",children:w(Pt,{class:"default-arrow"})})]}),this.slot="head"}}connectedCallback(){super.connectedCallback(),c(this,Te,this.querySelector("[data-value-holder]")||this),this.selectElement.addEventListener("change",t(this,ae)),t(this,ae).call(this),this.selectElement.addEventListener("selectToggle",t(this,Le))}disconnectedCallback(){this.selectElement.removeEventListener("change",t(this,ae)),this.selectElement.removeEventListener("selectToggle",t(this,Le))}}Te=new WeakMap,ae=new WeakMap,Le=new WeakMap;p.isBrowser&&!customElements.get("e-select-head")&&customElements.define("e-select-head",bs);const vs=x({"e-select":{display:"block",width:"100%","--arrow-color":f.colorFont.var},"e-select-head":{width:"100%",height:"var(--height-input)",display:"flex",alignItems:"center",justifyContent:"space-between",fontSize:"var(--font-size-small)"},"e-select-option":{height:"var(--height-input)",transitionDuration:"var(--duration-short)",transitionProperty:"color",fontSize:"var(--font-size-small)"},"e-select-option:hover":{color:f.colorActive.var},svg:{width:"16px",height:"16px",fill:f.colorFont.var,transitionProperty:"transform",transitionDuration:"var(--duration-short)"},".opened svg":{transform:"scaleY(-1)"}});class _t extends fe{constructor(...s){var n;super(...s);const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[...e.adoptedStyleSheets,vs];const i=((n=this.firstStore.__manager)==null?void 0:n.variants)||[];w(this,{children:w("e-select",{value:this.firstStore,onChange:h=>{this.updateStores(h.currentTarget.value)},lightChildren:[w("e-select-head",{lightChildren:[rt({"data-value-holder":""})]}),...i.map((h,u)=>w("e-select-option",{lightChildren:h,default:u===0?!0:null}))]})})}}p.isBrowser&&!customElements.get("e-tweaker-select-manager")&&customElements.define("e-tweaker-select-manager",_t);const ys=x({":host":{width:"100%",display:"flex",alignItems:"center"},input:{boxSizing:"border-box",outline:"none",fontVariantNumeric:"tabular-nums",fontFamily:"inherit",color:"inherit",border:"none",fontSize:"var(--font-size-small)",height:"var(--height-input)",width:"100%",margin:"0",padding:"0 var(--gap-small)",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:f.borderRadius.var}});class Kt extends fe{constructor(...s){super(...s);const e=this.attachShadow({mode:"open"});e.adoptedStyleSheets=[...e.adoptedStyleSheets,ys],w(this,{children:[He({class:"text-input",type:"string",value:this.firstStore,onChange:i=>{this.updateStores(i.currentTarget.value)}})]})}}p.isBrowser&&!customElements.get("e-tweaker-string-manager")&&customElements.define("e-tweaker-string-manager",Kt);const Ss={boolean:Bt,color:It,link:Ht,number:Dt,select:_t,string:Kt},ks=x({":host":{display:"grid",gridAutoFlow:"column",gridTemplateColumns:"0.5fr 1fr",alignItems:"center",color:f.colorFont.var,gap:"var(--gap-medium)"},":host(.disabled)":{pointerEvents:"none",opacity:.5},".head":{fontSize:"var(--font-size-medium)",display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".head-buttons":{display:"flex"},".head-button":{width:"14px",height:"14px",padding:"0",margin:"0",border:"none",background:"none",fill:f.colorFont.var,transitionDuration:"var(--duration-short)",transitionProperty:"fill, opacity",opacity:"0"},":host(:hover) .head-button":{opacity:"1"},".head-button:hover":{fill:f.colorActive.var},".head-button svg":{width:"100%",height:"100%"}});var M,le,he,ce,de,ze,Re;class ft extends HTMLElement{constructor(e){var h,u;super();o(this,M,[]);o(this,le);o(this,he);o(this,ce,!1);o(this,de);o(this,ze,()=>{m.activeStores.current.find(e=>t(this,M).includes(e))||this.remove()});o(this,Re,e=>{t(this,ce)&&((e.metaKey||e.ctrlKey)&&e.code==="KeyC"?navigator.clipboard.writeText(t(this,M)[0].current):(e.metaKey||e.ctrlKey)&&e.code==="KeyR"&&(t(this,M).forEach(i=>{i.reset()}),e.preventDefault()))});c(this,M,[e.store]),c(this,le,e.store.name),c(this,he,t(this,le).split(".").slice(-1).toString());const i=((h=e.store.__manager)==null?void 0:h.type)||"string";c(this,de,new Ss[i](t(this,M)[0]));const n=this.attachShadow({mode:"open"});n.adoptedStyleSheets=[...n.adoptedStyleSheets,ks],w(this,{class:{disabled:((u=e.store.__manager)==null?void 0:u.disabled)||!1},onPointerleave:()=>{c(this,ce,!1)},onPointerenter:()=>{c(this,ce,!0)},children:[v({class:"head",children:[v({class:"name",children:t(this,he)+":"}),v({class:"head-buttons",children:[Q({class:"head-button",children:$t,onClick:()=>{navigator.clipboard.writeText(t(this,M)[0].current)}}),Q({class:"head-button",children:Ft,onClick:()=>{t(this,M).forEach(g=>{g.reset()})}})]})]}),t(this,de)]})}get key(){return t(this,le)}get name(){return t(this,he)}get stores(){return t(this,M)}addStore(e){t(this,de).addStore(e)}connectedCallback(){m.activeStores.subscribe(t(this,ze)),addEventListener("keydown",t(this,Re)),qt(this)}disconnectedCallback(){m.activeStores.unsubscribe(t(this,ze)),removeEventListener("keydown",t(this,Re))}}M=new WeakMap,le=new WeakMap,he=new WeakMap,ce=new WeakMap,de=new WeakMap,ze=new WeakMap,Re=new WeakMap;p.isBrowser&&!customElements.get("e-tweaker-field")&&customElements.define("e-tweaker-field",ft);const Es=x({".wrapper":{boxSizing:"border-box",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:f.borderRadius.var},".head":{boxSizing:"border-box",width:"100%",height:"var(--tweaker-folder-height)",paddingLeft:"var(--gap-medium)",paddingRight:"var(--gap-medium)",display:"flex",alignItems:"center",justifyContent:"space-between",backgroundColor:f.colorMainAux.var,borderRadius:f.borderRadius.var},".name":{fontSize:"var(--font-size-large)",color:f.colorFont.var},".body":{display:"none",overflow:"hidden","@supports (height: calc-size(auto))":{height:"0"}},":host(.transition-allowed) .body":{transition:"height var(--duration-short), display var(--duration-short) allow-discrete"},":host(.opened) .body":{height:"calc-size(auto)",display:"block","@starting-style":{height:"0"}},".body-content":{boxSizing:"border-box",padding:"var(--gap-large)",display:"grid",gap:"var(--gap-medium)"},".arrow":{width:"20px",height:"20px",fill:f.colorFont.var,transition:"transform var(--duration-short)"},".opened .arrow":{transform:"scaleY(-1)"}});var A,Me,k,Ae,Ne,Fe,$e,Je;const Ye=class Ye extends HTMLElement{constructor(e){super();o(this,A);o(this,Me,new m.Store(null));o(this,k,new m.Store([]));o(this,Ae);o(this,Ne,null);o(this,Fe,null);o(this,$e,null);o(this,Je,e=>{let i=[],n=[];e.forEach(h=>{i=[...i,...h.removedNodes],n=[...n,...h.addedNodes]}),t(this,k).current=t(this,k).current.filter(h=>!i.includes(h)),t(this,A)&&!t(this,k).current.length&&!n.length&&this.remove()});const i=this.attachShadow({mode:"open"});i.adoptedStyleSheets=[...i.adoptedStyleSheets,Es],c(this,A,e.key),c(this,Ae,new MutationObserver(t(this,Je))),w(this,{children:[v({class:"wrapper",children:[v({class:"head",onClick:n=>{this.classList.toggle("opened"),this.classList.contains("opened")?T.openPanel(t(this,A)):T.closePanel(t(this,A))},children:[t(this,A)?v({class:"name",children:[t(this,A).split(".").slice(-1).toString()]}):null,t(this,Me),w(Pt,{class:"arrow"})]}),v({class:"body",ref:n=>{c(this,Ne,n)},children:v({class:"body-content",children:t(this,k),ref:n=>{c(this,Fe,n),c(this,$e,n.firstElementChild)}})})]})]}),e!=null&&e.storeBox&&this.handleStore(e.storeBox)}get key(){return t(this,A)}get head(){return t(this,Me)}get content(){return t(this,k)}get bodyElement(){return t(this,Ne)}get contentElement(){return t(this,Fe)}connectedCallback(){T.isPanelOpened(t(this,A))&&this.classList.add("opened"),setTimeout(()=>{this.classList.add("transition-allowed")}),t(this,Ae).observe(t(this,$e),{childList:!0})}handleStore(e){if(e.remainingFolders.length){const n=e.store.name.split("."),h=n.slice(0,n.length-e.remainingFolders.length).join("."),u=t(this,k).current.find(g=>g.key===h);u instanceof Ye?u.handleStore({store:e.store,remainingFolders:e.remainingFolders.slice(1)}):t(this,k).current=[...t(this,k).current,new Ye({key:h,storeBox:{store:e.store,remainingFolders:e.remainingFolders.slice(1)}})]}else{const i=t(this,k).current.find(n=>n.key===e.store.name);i instanceof ft?i.addStore(e.store):t(this,k).current=[...t(this,k).current,new ft({store:e.store})]}}};A=new WeakMap,Me=new WeakMap,k=new WeakMap,Ae=new WeakMap,Ne=new WeakMap,Fe=new WeakMap,$e=new WeakMap,Je=new WeakMap;let _e=Ye;p.isBrowser&&!customElements.get("e-tweaker-folder")&&customElements.define("e-tweaker-folder",_e);const xs=x({":host":{"--tweaker-width":"550px","--tweaker-offset":"20px","--tweaker-folder-height":"35px","--height-input":"25px","--gap-large":"12px","--gap-medium":"10px","--gap-small":"8px","--gap-extra-small":"4px","--font-size-large":"16px","--font-size-medium":"14px","--font-size-small":"12px","--duration-short":"0.2s",fontFamily:"sans-serif",position:"absolute",top:"var(--tweaker-offset)",right:"var(--tweaker-offset)",width:"var(--tweaker-width)",backgroundColor:f.colorMain.var,borderRadius:f.borderRadius.var,transition:"opacity 0.1s",zIndex:"100",opacity:"0.1"},":host(:hover)":{opacity:"1 !important"},".resize":{position:"absolute",left:"0",top:"0",width:"calc(var(--tweaker-width) * 0.025)",height:"100%",zIndex:"1",cursor:"ew-resize"},".tweaker-buttons":{display:"flex",alignItems:"center",gap:"var(--gap-extra-small)"},".tweaker-button":{width:"18px",height:"18px",padding:"0",margin:"0",background:"none",border:"none",fill:f.colorFont.var,transitionProperty:"fill",transitionDuration:"var(--duration-short)"},".tweaker-button:hover":{fill:f.colorActive.var},".tweaker-button svg":{width:"100%",height:"100%"},":host .body-content":{maxHeight:`calc(
|
|
10
10
|
100dvh -
|
|
11
11
|
(
|
|
12
12
|
var(--tweaker-offset) * 2 +
|
|
@@ -15,4 +15,4 @@
|
|
|
15
15
|
)`,overflow:"hidden auto","-ms-overflow-style":"none","scrollbar-width":"none"},":host .body-content::-webkit-scrollbar":{display:"none"},[`@media ${Xt.ViewportMediaRules["<=mobile"]}`]:{":host":{position:"absolute",top:"0",right:"0",width:"100% !important",borderTopLeftRadius:"0",borderTopRightRadius:"0"},":host .body-content":{maxHeight:`calc(
|
|
16
16
|
100dvh -
|
|
17
17
|
var(--tweaker-folder-height)
|
|
18
|
-
)`}}});var Pe,Be,Ie;class Ot extends _e{constructor(){super({key:""});o(this,Pe,!1);o(this,Be,()=>{T.save()});o(this,Ie,Gt.debounce(()=>{m.activeStores.current.forEach(
|
|
18
|
+
)`}}});var Pe,Be,Ie;class Ot extends _e{constructor(){super({key:""});o(this,Pe,!1);o(this,Be,()=>{T.save()});o(this,Ie,Gt.debounce(()=>{m.activeStores.current.forEach(e=>{if(e.name){const i=e.name.split(".");this.handleStore({store:e,remainingFolders:i.length>1?i.slice(0,-1):[]})}}),t(this,Pe)||(c(this,Pe,!0),this.contentElement.scroll({top:T.scrollValue}),this.contentElement.addEventListener("scroll",()=>{T.scrollValue=this.contentElement.scrollTop}))},10));T.load(),this.shadowRoot.adoptedStyleSheets=[...this.shadowRoot.adoptedStyleSheets,xs],this.head.current=[v({class:"tweaker-buttons",onClick:e=>{e.stopPropagation()},children:[Q({class:"tweaker-button",children:Ft,onClick:()=>{m.storeRegistry.resetState()}}),Q({class:["tweaker-button"],children:[$t],onClick:()=>{navigator.clipboard.writeText(JSON.stringify(m.storeRegistry.getState()))}}),Q({class:"tweaker-button",children:ns,onClick:()=>{Yt.createJSONAndSave(m.storeRegistry.name,m.storeRegistry.getState())}}),At({class:"tweaker-button",children:[os,He({type:"file",style:{display:"none"},onChange:e=>{var h;const n=(h=e.currentTarget.files)==null?void 0:h[0];if(n){const u=new FileReader;u.onload=g=>{var L,y;const E=(y=(L=g.target)==null?void 0:L.result)==null?void 0:y.toString();E&&m.storeRegistry.loadState(E)},u.readAsText(n)}}})]})]})],w(this.bodyElement,{children:[v({class:"resize",onPointerdown:e=>{e.preventDefault();const i=this.getBoundingClientRect(),n=this.contentElement.scrollTop;St.setupDrag(h=>{const u=e.x-h.x,g=Math.max(400,i.width+u);this.style.width=g+"px",T.changeSize("tweaker",g)},()=>{setTimeout(()=>{this.contentElement.scroll({top:n})},10)})},onDblclick:()=>{this.style.width="",T.changeSize("tweaker",null)}})]})}connectedCallback(){super.connectedCallback(),window.addEventListener("beforeunload",t(this,Be)),m.activeStores.subscribe(t(this,Ie)),T.changedSizes("tweaker")&&(this.style.width=T.changedSizes("tweaker")+"px")}disconnectedCallback(){window.removeEventListener("beforeunload",t(this,Be)),T.save(),m.activeStores.unsubscribe(t(this,Ie))}}Pe=new WeakMap,Be=new WeakMap,Ie=new WeakMap;p.isBrowser&&!customElements.get("e-tweaker")&&customElements.define("e-tweaker",Ot);p.isBrowser&&document.body.appendChild(new Ot);
|