aptechka 0.13.0 → 0.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (81) hide show
  1. package/lib/{Animation-seVC6-fS.cjs → Animation-De9aUv3b.cjs} +1 -1
  2. package/lib/{Animation-DF5jPON_.js → Animation-NAGXiFv5.js} +1 -1
  3. package/lib/{Composed-ChlKoJEp.cjs → Composed-C_4slJQ6.cjs} +1 -1
  4. package/lib/{Composed-CoX1ImVk.js → Composed-CfWa-69I.js} +1 -1
  5. package/lib/{Damped-C7WAqKPh.cjs → Damped-DYJ6Z0xo.cjs} +1 -1
  6. package/lib/{Damped-BDO-F13V.js → Damped-DbJKrUIf.js} +1 -1
  7. package/lib/Derived-BIBU-y7Z.cjs +1 -0
  8. package/lib/Derived-Vo_RsJfi.js +23 -0
  9. package/lib/{SourceManager-B8-EMNnd.js → SourceManager-B6wZpXUZ.js} +1 -1
  10. package/lib/{SourceManager-TzU9Rw08.cjs → SourceManager-CfHcGLUa.cjs} +1 -1
  11. package/lib/Store-C46i0nvr.js +137 -0
  12. package/lib/Store-npaZHvX4.cjs +1 -0
  13. package/lib/{Tweened-DSXD0I0k.cjs → Tweened-BkkD9s4n.cjs} +1 -1
  14. package/lib/{Tweened-CHhmfvzo.js → Tweened-DOSHLCZa.js} +1 -1
  15. package/lib/{Viewport-DTlImj28.js → Viewport-B55BvLsV.js} +1 -1
  16. package/lib/{Viewport-BmLTk_6k.cjs → Viewport-Cv4TRGiv.cjs} +1 -1
  17. package/lib/animation/index.cjs +1 -1
  18. package/lib/animation/index.js +3 -3
  19. package/lib/attribute/index.cjs +1 -1
  20. package/lib/attribute/index.js +1 -1
  21. package/lib/canvas/index.cjs +1 -1
  22. package/lib/canvas/index.js +3 -3
  23. package/lib/checkbox/index.cjs +1 -1
  24. package/lib/checkbox/index.js +3 -3
  25. package/lib/class-linked-status/index.cjs +1 -1
  26. package/lib/class-linked-status/index.js +1 -1
  27. package/lib/controls/index.cjs +1 -1
  28. package/lib/controls/index.js +2 -2
  29. package/lib/{createStylesheet-DO5t5q-m.js → createStylesheet-COAZH1Mw.js} +1 -1
  30. package/lib/{createStylesheet-CaDI99iu.cjs → createStylesheet-Csfmh-MH.cjs} +1 -1
  31. package/lib/css-property/index.cjs +1 -1
  32. package/lib/css-property/index.js +1 -1
  33. package/lib/dev/index.cjs +1 -1
  34. package/lib/dev/index.js +1 -1
  35. package/lib/device/index.cjs +1 -1
  36. package/lib/device/index.js +1 -1
  37. package/lib/element-constructor/index.cjs +1 -1
  38. package/lib/element-constructor/index.js +2 -2
  39. package/lib/en3/helpers/index.cjs +1 -1
  40. package/lib/en3/helpers/index.js +2 -2
  41. package/lib/en3/misc/index.cjs +1 -1
  42. package/lib/en3/misc/index.js +2 -2
  43. package/lib/image/index.cjs +1 -1
  44. package/lib/image/index.js +1 -1
  45. package/lib/{index-BpsQqM-8.cjs → index-BuAuBz2_.cjs} +1 -1
  46. package/lib/{index-BhbT9PrL.js → index-CenF0JbH.js} +3 -3
  47. package/lib/ladder/index.cjs +1 -1
  48. package/lib/ladder/index.js +1 -1
  49. package/lib/media/index.cjs +1 -1
  50. package/lib/media/index.js +1 -1
  51. package/lib/modal/index.cjs +1 -1
  52. package/lib/modal/index.js +3 -3
  53. package/lib/pointer/index.cjs +1 -1
  54. package/lib/pointer/index.js +2 -2
  55. package/lib/popover/index.cjs +1 -1
  56. package/lib/popover/index.js +2 -2
  57. package/lib/scroll/index.cjs +1 -1
  58. package/lib/scroll/index.js +7 -7
  59. package/lib/select/index.cjs +1 -1
  60. package/lib/select/index.js +1 -1
  61. package/lib/sequence/index.cjs +1 -1
  62. package/lib/sequence/index.js +1 -1
  63. package/lib/source/index.cjs +1 -1
  64. package/lib/source/index.js +2 -2
  65. package/lib/store/index.cjs +1 -1
  66. package/lib/store/index.js +38 -112
  67. package/lib/{tags-v-OSVkiQ.cjs → tags-6_ETuR75.cjs} +1 -1
  68. package/lib/{tags-4AoxVUe3.js → tags-BL3kQp9o.js} +1 -1
  69. package/lib/theme/index.cjs +1 -1
  70. package/lib/theme/index.js +2 -2
  71. package/lib/tweaker/index.cjs +2 -2
  72. package/lib/tweaker/index.js +50 -53
  73. package/lib/video/index.cjs +1 -1
  74. package/lib/video/index.js +1 -1
  75. package/package.json +1 -9
  76. package/lib/Derived-B-2UXnVE.cjs +0 -1
  77. package/lib/Derived-CDGpSMKu.js +0 -56
  78. package/lib/Store-BnA-dJsE.cjs +0 -1
  79. package/lib/Store-DGtldlBH.js +0 -147
  80. package/lib/svg-path-data/index.cjs +0 -3
  81. package/lib/svg-path-data/index.js +0 -490
@@ -1,4 +1,4 @@
1
- "use strict";var ve=h=>{throw TypeError(h)};var ue=(h,i,e)=>i.has(h)||ve("Cannot "+e);var t=(h,i,e)=>(ue(h,i,"read from private field"),e?e.call(h):i.get(h)),a=(h,i,e)=>i.has(h)?ve("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(h):i.set(h,e),o=(h,i,e,s)=>(ue(h,i,"write to private field"),s?s.call(h,e):i.set(h,e),e),f=(h,i,e)=>(ue(h,i,"access private method"),e);const Ae=require("../browser-CpzFX2xg.cjs"),g=require("../Store-BnA-dJsE.cjs"),De=require("../file-EevnUtRj.cjs"),He=require("../function-MthRj-GJ.cjs"),ye=require("../gestures-DHLrn6Q8.cjs");require("../ticker/index.cjs");const n=require("../tags-v-OSVkiQ.cjs"),C=require("../createStylesheet-CaDI99iu.cjs"),Ke=require("../Viewport-BmLTk_6k.cjs"),c=require("../theme/index.cjs"),Oe=require("../index-BpsQqM-8.cjs"),Ze=require("../events-BGwqaxVW.cjs");require("../checkbox/index.cjs");const je=require("../math-GDWEqu7y.cjs"),pe=require("../polyfills-CM4SCDTt.cjs"),ke=require("../element-resizer/index.cjs"),Se='<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>',xe='<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>',Je='<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>',We='<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>';var L,b,x;class _e{constructor(){a(this,L);a(this,b);a(this,x);this.scrollValue=0,o(this,L,""),o(this,b,[]),o(this,x,{}),o(this,L,g.storeRegistry.projectName+"-studio")}openPanel(i){t(this,b).includes(i)||t(this,b).push(i)}closePanel(i){o(this,b,t(this,b).filter(e=>e!==i))}isPanelOpened(i){return t(this,b).includes(i)}changedSizes(i){return t(this,x)[i]}changeSize(i,e){e?t(this,x)[i]=e:delete t(this,x)[i]}save(){const i={openedPanels:t(this,b),changedSizes:t(this,x),scrollValue:this.scrollValue};localStorage.setItem(t(this,L),JSON.stringify(i)),g.storeRegistry.saveState()}load(){g.storeRegistry.loadState();const i=localStorage.getItem(t(this,L));if(i)try{const e=JSON.parse(i);e.openedPanels&&o(this,b,e.openedPanels),e.changedSizes&&o(this,x,e.changedSizes),e.scrollValue&&(this.scrollValue=e.scrollValue)}catch(e){console.error(e)}}}L=new WeakMap,b=new WeakMap,x=new WeakMap;const w=new _e;var R;class K extends HTMLElement{constructor(...e){super();a(this,R);o(this,R,e)}addStore(e){t(this,R).push(e)}get firstStore(){return t(this,R)[0]}get stores(){return t(this,R)}updateStores(e){t(this,R).forEach(s=>{s.current=e})}}R=new WeakMap;const Be=C.createStylesheet({":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:c.aptechkaTheme.borderRadiusSmall.var}});class Ee extends K{constructor(...i){super(...i),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Be),n.element(this,{children:[n.element("e-checkbox",{onChange:s=>{this.updateStores(s.currentTarget.checked)},ref:s=>{this.firstStore.subscribe(r=>{s.checked=r.current})}})]})}}customElements.get("e-tweaker-boolean-manager")||customElements.define("e-tweaker-boolean-manager",Ee);const Xe=C.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{width:"100%",height:"var(--height-input)",padding:"0",background:"none",borderRadius:c.aptechkaTheme.borderRadius.var,border:"none",blockSize:"unset"},"input::-webkit-color-swatch, input::-webkit-color-swatch-wrapper":{boxSizing:"border-box",padding:"0px",border:"none",borderRadius:c.aptechkaTheme.borderRadius.var,height:"calc(var(--height-input) * 0.93)"}});class Ce extends K{constructor(...i){super(...i),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Xe),n.element(this,{children:[n.input({type:"color",value:this.firstStore,onInput:s=>{this.updateStores(s.currentTarget.value)}})]})}}customElements.get("e-tweaker-color-manager")||customElements.define("e-tweaker-color-manager",Ce);const Ye=C.createStylesheet({a:{color:"inherit",fontSize:"var(--font-size-small)"}});class ze extends K{constructor(...i){var s,r;super(...i),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ye),console.log(this.firstStore),n.element(this,{children:[n.a({href:this.firstStore,target:(r=(s=this.firstStore.passport)==null?void 0:s.manager)!=null&&r.sameWindow?"_self":"_blank",children:this.firstStore})]})}}customElements.get("e-tweaker-link-manager")||customElements.define("e-tweaker-link-manager",ze);const Ge=C.createStylesheet({":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:c.aptechkaTheme.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 ${c.aptechkaTheme.colorFont.var}`,transform:"translateY(-50%)",opacity:"0.3"},":host(.infinite) .drag::before":{borderBottom:`1px dashed ${c.aptechkaTheme.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:c.aptechkaTheme.colorFont.var,borderRadius:c.aptechkaTheme.borderRadiusSmall.var,transition:"opacity var(--duration-short)"},":host(.infinite) .grabbing .drag-knob-inner":{opacity:.3}});var P,q,N,E,F,Z,j,S,I,J,W,u,V,ge,me,ne,_;class Te extends K{constructor(...e){var r,l,d,p,y,M,O,we;super(...e);a(this,u);a(this,P,[]);a(this,q,[]);a(this,N);a(this,E);a(this,F);a(this,Z);a(this,j);a(this,S);a(this,I,!1);a(this,J,e=>{const s=f(this,u,V).call(this,e);return s.map((r,l)=>{const d=typeof r=="string"?parseFloat(r)||t(this,E):r,p=je.clamp(d,t(this,E),t(this,F)),y=pe.toStep(p,t(this,N));s[l]=y}),t(this,j)==="number"?s[0]:s});a(this,W,()=>{f(this,u,V).call(this).map((e,s)=>{const r=t(this,P)[s];r&&(r.value=(e||0).toString())}),f(this,u,ge).call(this)});a(this,_,()=>{f(this,u,ge).call(this)});this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ge),o(this,E,pe.nullishCoalescing((l=(r=this.firstStore.passport)==null?void 0:r.manager)==null?void 0:l.min,-1/0)),o(this,F,pe.nullishCoalescing((p=(d=this.firstStore.passport)==null?void 0:d.manager)==null?void 0:p.max,1/0)),o(this,N,((M=(y=this.firstStore.passport)==null?void 0:y.manager)==null?void 0:M.step)||.01),o(this,Z,((we=(O=this.firstStore.passport)==null?void 0:O.manager)==null?void 0:we.ease)||1),o(this,j,Array.isArray(this.firstStore.current)?"array":"number"),o(this,S,isFinite(t(this,F))&&isFinite(t(this,E))),n.element(this,{class:t(this,S)?"":"infinite",children:f(this,u,V).call(this).map((Le,ie)=>n.div({class:"inputs-wrapper",children:[n.input({type:"number",step:t(this,N),min:t(this,E),max:t(this,F),ref:z=>t(this,P).push(z),value:Le,onChange:()=>{this.updateStores(t(this,P).map(z=>parseFloat(z.value)))}}),n.div({class:"drag",children:[n.div({class:"drag-knob",ref:z=>t(this,q).push(z),onPointerdown:z=>{z.preventDefault(),o(this,I,!0);const he=f(this,u,V).call(this),Pe=he[ie],T=t(this,q)[ie],Ie=t(this,P)[ie];if(T&&Ie){const ce=T.parentElement,Ve=f(this,u,me).call(this);ce.classList.add("grabbing"),ye.setupDrag(de=>{const be=de.x-z.x,qe=t(this,S)?ce.offsetWidth/(Ve||1):1,Ne=Pe+be/qe*t(this,Z);if(he[ie]=Ne,!t(this,S)){const $e=f(this,u,ne).call(this,T,0);T.style.transform=`translateX(${$e+be}px)`}this.updateStores([...he])},()=>{if(o(this,I,!1),!t(this,S)){const de=f(this,u,ne).call(this,T,0);T.style.transition="transform 0.1s",T.style.transform=`translateX(${de}px)`,ce.classList.remove("grabbing"),setTimeout(()=>{T.style.transition=""},100)}})}},children:n.div({class:"drag-knob-inner"})})]})]}))})}connectedCallback(){this.firstStore.addMiddleware(t(this,J)),this.firstStore.subscribe(t(this,W)),ke.elementResizer.subscribe(this,t(this,_))}disconnectedCallback(){this.firstStore.removeMiddleware(t(this,J)),this.firstStore.unsubscribe(t(this,W)),ke.elementResizer.unsubscribe(t(this,_))}}P=new WeakMap,q=new WeakMap,N=new WeakMap,E=new WeakMap,F=new WeakMap,Z=new WeakMap,j=new WeakMap,S=new WeakMap,I=new WeakMap,J=new WeakMap,W=new WeakMap,u=new WeakSet,V=function(e=this.firstStore.current){return Array.isArray(e)?e:[e]},ge=function(){f(this,u,V).call(this).map((e,s)=>{const r=t(this,q)[s];if(r&&(!t(this,I)||t(this,I)&&t(this,S))){const l=f(this,u,ne).call(this,r,e);r.style.transform=`translateX(${l}px)`}})},me=function(){return t(this,S)?t(this,F)-t(this,E):0},ne=function(e,s){const r=e.parentElement,l=f(this,u,me).call(this),d=l?s/l:.5;return(r.offsetWidth-e.offsetWidth)*d},_=new WeakMap;customElements.get("e-tweaker-number-manager")||customElements.define("e-tweaker-number-manager",Te);const Qe=C.createStylesheet({"e-select":{display:"block",width:"100%","--arrow-color":c.aptechkaTheme.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:c.aptechkaTheme.colorActive.var},svg:{width:"16px",height:"16px",fill:c.aptechkaTheme.colorFont.var,transitionProperty:"transform",transitionDuration:"var(--duration-short)"},".opened svg":{transform:"scaleY(-1)"}});class Re extends K{constructor(...i){var r,l;super(...i),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Qe);const s=((l=(r=this.firstStore.passport)==null?void 0:r.manager)==null?void 0:l.variants)||[];n.element(this,{children:n.element("e-select",{value:this.firstStore,onChange:d=>{this.updateStores(d.currentTarget.value)},lightChildren:[n.element("e-select-head",{lightChildren:[n.span({"data-value-holder":""})]}),...s.map((d,p)=>n.element("e-select-option",{lightChildren:d,default:p===0?!0:null}))]})})}}customElements.get("e-tweaker-select-manager")||customElements.define("e-tweaker-select-manager",Re);const Ue=C.createStylesheet({":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:c.aptechkaTheme.borderRadius.var}});class Fe extends K{constructor(...i){super(...i),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ue),n.element(this,{children:[n.input({class:"text-input",type:"string",value:this.firstStore,onChange:s=>{this.updateStores(s.currentTarget.value)}})]})}}customElements.get("e-tweaker-string-manager")||customElements.define("e-tweaker-string-manager",Fe);const et={boolean:Ee,color:Ce,link:ze,number:Te,select:Re,string:Fe},tt=C.createStylesheet({":host":{display:"grid",gridAutoFlow:"column",gridTemplateColumns:"0.5fr 1fr",alignItems:"center",color:c.aptechkaTheme.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:c.aptechkaTheme.colorFont.var,transitionDuration:"var(--duration-short)",transitionProperty:"fill, opacity",opacity:"0"},":host(:hover) .head-button":{opacity:"1"},".head-button:hover":{fill:c.aptechkaTheme.colorActive.var},".head-button svg":{width:"100%",height:"100%"}});var v,$,A,D,H,B,X;class fe extends HTMLElement{constructor(e){var l,d,p,y;super();a(this,v,[]);a(this,$);a(this,A);a(this,D,!1);a(this,H);a(this,B,()=>{g.activeStores.current.find(e=>t(this,v).includes(e))||this.remove()});a(this,X,e=>{t(this,D)&&((e.metaKey||e.ctrlKey)&&e.code==="KeyC"?navigator.clipboard.writeText(t(this,v)[0].current):(e.metaKey||e.ctrlKey)&&e.code==="KeyR"&&(t(this,v).forEach(s=>{s.reset()}),e.preventDefault()))});o(this,v,[e.store]),o(this,$,e.store.passport.name),o(this,A,t(this,$).split(".").slice(-1).toString());const s=((d=(l=e.store.passport)==null?void 0:l.manager)==null?void 0:d.type)||"string";o(this,H,new et[s](t(this,v)[0])),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(tt),n.element(this,{class:{disabled:((y=(p=e.store.passport)==null?void 0:p.manager)==null?void 0:y.disabled)||!1},onPointerleave:()=>{o(this,D,!1)},onPointerenter:()=>{o(this,D,!0)},children:[n.div({class:"head",children:[n.div({class:"name",children:t(this,A)+":"}),n.div({class:"head-buttons",children:[n.button({class:"head-button",children:xe,onClick:()=>{navigator.clipboard.writeText(t(this,v)[0].current)}}),n.button({class:"head-button",children:Se,onClick:()=>{t(this,v).forEach(M=>{M.reset()})}})]})]}),t(this,H)]})}get key(){return t(this,$)}get name(){return t(this,A)}get stores(){return t(this,v)}addStore(e){t(this,H).addStore(e)}connectedCallback(){g.activeStores.subscribe(t(this,B)),addEventListener("keydown",t(this,X)),Ze.dispatchSizeChangeEvent(this)}disconnectedCallback(){g.activeStores.unsubscribe(t(this,B)),removeEventListener("keydown",t(this,X))}}v=new WeakMap,$=new WeakMap,A=new WeakMap,D=new WeakMap,H=new WeakMap,B=new WeakMap,X=new WeakMap;customElements.get("e-tweaker-field")||customElements.define("e-tweaker-field",fe);const st=C.createStylesheet({".wrapper":{boxSizing:"border-box",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:c.aptechkaTheme.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:c.aptechkaTheme.colorMainAux.var,borderRadius:c.aptechkaTheme.borderRadius.var},".name":{fontSize:"var(--font-size-large)",color:c.aptechkaTheme.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:c.aptechkaTheme.colorFont.var,transition:"transform var(--duration-short)"},".opened .arrow":{transform:"scaleY(-1)"}});var k,Y,m,G,Q,U,ee,oe;const le=class le extends HTMLElement{constructor(e){super();a(this,k);a(this,Y,new g.Store(null));a(this,m,new g.Store([]));a(this,G);a(this,Q,null);a(this,U,null);a(this,ee,null);a(this,oe,e=>{let s=[],r=[];e.forEach(l=>{s=[...s,...l.removedNodes],r=[...r,...l.addedNodes]}),t(this,m).current=t(this,m).current.filter(l=>!s.includes(l)),t(this,k)&&!t(this,m).current.length&&!r.length&&this.remove()});this.attachShadow({mode:"open"}).adoptedStyleSheets.push(st),o(this,k,e.key),o(this,G,new MutationObserver(t(this,oe))),n.element(this,{children:[n.div({class:"wrapper",children:[n.div({class:"head",onClick:r=>{this.classList.toggle("opened"),this.classList.contains("opened")?w.openPanel(t(this,k)):w.closePanel(t(this,k))},children:[t(this,k)?n.div({class:"name",children:[t(this,k).split(".").slice(-1).toString()]}):null,t(this,Y),n.element(Oe.arrowIcon,{class:"arrow"})]}),n.div({class:"body",ref:r=>{o(this,Q,r)},children:n.div({class:"body-content",children:t(this,m),ref:r=>{o(this,U,r),o(this,ee,r.firstElementChild)}})})]})]}),e!=null&&e.storeBox&&this.handleStore(e.storeBox)}get key(){return t(this,k)}get head(){return t(this,Y)}get content(){return t(this,m)}get bodyElement(){return t(this,Q)}get contentElement(){return t(this,U)}connectedCallback(){w.isPanelOpened(t(this,k))&&this.classList.add("opened"),setTimeout(()=>{this.classList.add("transition-allowed")}),t(this,G).observe(t(this,ee),{childList:!0})}handleStore(e){if(e.remainingFolders.length){const r=e.store.passport.name.split("."),l=r.slice(0,r.length-e.remainingFolders.length).join("."),d=t(this,m).current.find(p=>p.key===l);d instanceof le?d.handleStore({store:e.store,remainingFolders:e.remainingFolders.slice(1)}):t(this,m).current=[...t(this,m).current,new le({key:l,storeBox:{store:e.store,remainingFolders:e.remainingFolders.slice(1)}})]}else{const s=t(this,m).current.find(r=>r.key===e.store.passport.name);s instanceof fe?s.addStore(e.store):t(this,m).current=[...t(this,m).current,new fe({store:e.store})]}}};k=new WeakMap,Y=new WeakMap,m=new WeakMap,G=new WeakMap,Q=new WeakMap,U=new WeakMap,ee=new WeakMap,oe=new WeakMap;let ae=le;customElements.get("e-tweaker-folder")||customElements.define("e-tweaker-folder",ae);const rt=C.createStylesheet({":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:c.aptechkaTheme.colorMain.var,borderRadius:c.aptechkaTheme.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:c.aptechkaTheme.colorFont.var,transitionProperty:"fill",transitionDuration:"var(--duration-short)"},".tweaker-button:hover":{fill:c.aptechkaTheme.colorActive.var},".tweaker-button svg":{width:"100%",height:"100%"},":host .body-content":{maxHeight:`calc(
1
+ "use strict";var ve=h=>{throw TypeError(h)};var ue=(h,i,e)=>i.has(h)||ve("Cannot "+e);var t=(h,i,e)=>(ue(h,i,"read from private field"),e?e.call(h):i.get(h)),a=(h,i,e)=>i.has(h)?ve("Cannot add the same private member more than once"):i instanceof WeakSet?i.add(h):i.set(h,e),o=(h,i,e,s)=>(ue(h,i,"write to private field"),s?s.call(h,e):i.set(h,e),e),f=(h,i,e)=>(ue(h,i,"access private method"),e);const Ne=require("../browser-CpzFX2xg.cjs"),g=require("../Store-npaZHvX4.cjs"),De=require("../file-EevnUtRj.cjs"),He=require("../function-MthRj-GJ.cjs"),ye=require("../gestures-DHLrn6Q8.cjs");require("../ticker/index.cjs");const n=require("../tags-6_ETuR75.cjs"),C=require("../createStylesheet-Csfmh-MH.cjs"),Ke=require("../Viewport-Cv4TRGiv.cjs"),c=require("../theme/index.cjs"),Oe=require("../index-BuAuBz2_.cjs"),Ze=require("../events-BGwqaxVW.cjs");require("../checkbox/index.cjs");const Je=require("../math-GDWEqu7y.cjs"),pe=require("../polyfills-CM4SCDTt.cjs"),ke=require("../element-resizer/index.cjs"),Se='<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>',xe='<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>',We='<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>',_e='<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>';var L,b,x;class je{constructor(){a(this,L);a(this,b);a(this,x);this.scrollValue=0,o(this,L,""),o(this,b,[]),o(this,x,{}),o(this,L,g.storeRegistry.name+"-tweaker")}openPanel(i){t(this,b).includes(i)||t(this,b).push(i)}closePanel(i){o(this,b,t(this,b).filter(e=>e!==i))}isPanelOpened(i){return t(this,b).includes(i)}changedSizes(i){return t(this,x)[i]}changeSize(i,e){e?t(this,x)[i]=e:delete t(this,x)[i]}save(){const i={openedPanels:t(this,b),changedSizes:t(this,x),scrollValue:this.scrollValue};localStorage.setItem(t(this,L),JSON.stringify(i)),g.storeRegistry.saveState()}load(){g.storeRegistry.loadState();const i=localStorage.getItem(t(this,L));if(i)try{const e=JSON.parse(i);e.openedPanels&&o(this,b,e.openedPanels),e.changedSizes&&o(this,x,e.changedSizes),e.scrollValue&&(this.scrollValue=e.scrollValue)}catch(e){console.error(e)}}}L=new WeakMap,b=new WeakMap,x=new WeakMap;const w=new je;var R;class K extends HTMLElement{constructor(...e){super();a(this,R);o(this,R,e)}addStore(e){t(this,R).push(e)}get firstStore(){return t(this,R)[0]}get stores(){return t(this,R)}updateStores(e){t(this,R).forEach(s=>{s.current=e})}}R=new WeakMap;const Be=C.createStylesheet({":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:c.aptechkaTheme.borderRadiusSmall.var}});class Ee extends K{constructor(...i){super(...i),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Be),n.element(this,{children:[n.element("e-checkbox",{onChange:s=>{this.updateStores(s.currentTarget.checked)},ref:s=>{this.firstStore.subscribe(r=>{s.checked=r.current})}})]})}}customElements.get("e-tweaker-boolean-manager")||customElements.define("e-tweaker-boolean-manager",Ee);const Xe=C.createStylesheet({":host":{width:"100%",display:"inline-flex",height:"max-content"},input:{width:"100%",height:"var(--height-input)",padding:"0",background:"none",borderRadius:c.aptechkaTheme.borderRadius.var,border:"none",blockSize:"unset"},"input::-webkit-color-swatch, input::-webkit-color-swatch-wrapper":{boxSizing:"border-box",padding:"0px",border:"none",borderRadius:c.aptechkaTheme.borderRadius.var,height:"calc(var(--height-input) * 0.93)"}});class Ce extends K{constructor(...i){super(...i),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Xe),n.element(this,{children:[n.input({type:"color",value:this.firstStore,onInput:s=>{this.updateStores(s.currentTarget.value)}})]})}}customElements.get("e-tweaker-color-manager")||customElements.define("e-tweaker-color-manager",Ce);const Ye=C.createStylesheet({a:{color:"inherit",fontSize:"var(--font-size-small)"}});class ze extends K{constructor(...i){var s,r;super(...i),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ye),console.log(this.firstStore),n.element(this,{children:[n.a({href:this.firstStore,target:(r=(s=this.firstStore.passport)==null?void 0:s.manager)!=null&&r.sameWindow?"_self":"_blank",children:this.firstStore})]})}}customElements.get("e-tweaker-link-manager")||customElements.define("e-tweaker-link-manager",ze);const Ge=C.createStylesheet({":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:c.aptechkaTheme.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 ${c.aptechkaTheme.colorFont.var}`,transform:"translateY(-50%)",opacity:"0.3"},":host(.infinite) .drag::before":{borderBottom:`1px dashed ${c.aptechkaTheme.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:c.aptechkaTheme.colorFont.var,borderRadius:c.aptechkaTheme.borderRadiusSmall.var,transition:"opacity var(--duration-short)"},":host(.infinite) .grabbing .drag-knob-inner":{opacity:.3}});var P,q,$,E,F,Z,J,S,I,W,_,u,V,ge,me,ne,j;class Te extends K{constructor(...e){var r,l,d,p,y,M,O,we;super(...e);a(this,u);a(this,P,[]);a(this,q,[]);a(this,$);a(this,E);a(this,F);a(this,Z);a(this,J);a(this,S);a(this,I,!1);a(this,W,e=>{const s=f(this,u,V).call(this,e);return s.map((r,l)=>{const d=typeof r=="string"?parseFloat(r)||t(this,E):r,p=Je.clamp(d,t(this,E),t(this,F)),y=pe.toStep(p,t(this,$));s[l]=y}),t(this,J)==="number"?s[0]:s});a(this,_,()=>{f(this,u,V).call(this).map((e,s)=>{const r=t(this,P)[s];r&&(r.value=(e||0).toString())}),f(this,u,ge).call(this)});a(this,j,()=>{f(this,u,ge).call(this)});this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ge),o(this,E,pe.nullishCoalescing((l=(r=this.firstStore.passport)==null?void 0:r.manager)==null?void 0:l.min,-1/0)),o(this,F,pe.nullishCoalescing((p=(d=this.firstStore.passport)==null?void 0:d.manager)==null?void 0:p.max,1/0)),o(this,$,((M=(y=this.firstStore.passport)==null?void 0:y.manager)==null?void 0:M.step)||.01),o(this,Z,((we=(O=this.firstStore.passport)==null?void 0:O.manager)==null?void 0:we.ease)||1),o(this,J,Array.isArray(this.firstStore.current)?"array":"number"),o(this,S,isFinite(t(this,F))&&isFinite(t(this,E))),n.element(this,{class:t(this,S)?"":"infinite",children:f(this,u,V).call(this).map((Le,ie)=>n.div({class:"inputs-wrapper",children:[n.input({type:"number",step:t(this,$),min:t(this,E),max:t(this,F),ref:z=>t(this,P).push(z),value:Le,onChange:()=>{this.updateStores(t(this,P).map(z=>parseFloat(z.value)))}}),n.div({class:"drag",children:[n.div({class:"drag-knob",ref:z=>t(this,q).push(z),onPointerdown:z=>{z.preventDefault(),o(this,I,!0);const he=f(this,u,V).call(this),Pe=he[ie],T=t(this,q)[ie],Ie=t(this,P)[ie];if(T&&Ie){const ce=T.parentElement,Ve=f(this,u,me).call(this);ce.classList.add("grabbing"),ye.setupDrag(de=>{const be=de.x-z.x,qe=t(this,S)?ce.offsetWidth/(Ve||1):1,$e=Pe+be/qe*t(this,Z);if(he[ie]=$e,!t(this,S)){const Ae=f(this,u,ne).call(this,T,0);T.style.transform=`translateX(${Ae+be}px)`}this.updateStores([...he])},()=>{if(o(this,I,!1),!t(this,S)){const de=f(this,u,ne).call(this,T,0);T.style.transition="transform 0.1s",T.style.transform=`translateX(${de}px)`,ce.classList.remove("grabbing"),setTimeout(()=>{T.style.transition=""},100)}})}},children:n.div({class:"drag-knob-inner"})})]})]}))})}connectedCallback(){this.firstStore.addMiddleware(t(this,W)),this.firstStore.subscribe(t(this,_)),ke.elementResizer.subscribe(this,t(this,j))}disconnectedCallback(){this.firstStore.removeMiddleware(t(this,W)),this.firstStore.unsubscribe(t(this,_)),ke.elementResizer.unsubscribe(t(this,j))}}P=new WeakMap,q=new WeakMap,$=new WeakMap,E=new WeakMap,F=new WeakMap,Z=new WeakMap,J=new WeakMap,S=new WeakMap,I=new WeakMap,W=new WeakMap,_=new WeakMap,u=new WeakSet,V=function(e=this.firstStore.current){return Array.isArray(e)?e:[e]},ge=function(){f(this,u,V).call(this).map((e,s)=>{const r=t(this,q)[s];if(r&&(!t(this,I)||t(this,I)&&t(this,S))){const l=f(this,u,ne).call(this,r,e);r.style.transform=`translateX(${l}px)`}})},me=function(){return t(this,S)?t(this,F)-t(this,E):0},ne=function(e,s){const r=e.parentElement,l=f(this,u,me).call(this),d=l?s/l:.5;return(r.offsetWidth-e.offsetWidth)*d},j=new WeakMap;customElements.get("e-tweaker-number-manager")||customElements.define("e-tweaker-number-manager",Te);const Qe=C.createStylesheet({"e-select":{display:"block",width:"100%","--arrow-color":c.aptechkaTheme.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:c.aptechkaTheme.colorActive.var},svg:{width:"16px",height:"16px",fill:c.aptechkaTheme.colorFont.var,transitionProperty:"transform",transitionDuration:"var(--duration-short)"},".opened svg":{transform:"scaleY(-1)"}});class Re extends K{constructor(...i){var r,l;super(...i),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Qe);const s=((l=(r=this.firstStore.passport)==null?void 0:r.manager)==null?void 0:l.variants)||[];n.element(this,{children:n.element("e-select",{value:this.firstStore,onChange:d=>{this.updateStores(d.currentTarget.value)},lightChildren:[n.element("e-select-head",{lightChildren:[n.span({"data-value-holder":""})]}),...s.map((d,p)=>n.element("e-select-option",{lightChildren:d,default:p===0?!0:null}))]})})}}customElements.get("e-tweaker-select-manager")||customElements.define("e-tweaker-select-manager",Re);const Ue=C.createStylesheet({":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:c.aptechkaTheme.borderRadius.var}});class Fe extends K{constructor(...i){super(...i),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(Ue),n.element(this,{children:[n.input({class:"text-input",type:"string",value:this.firstStore,onChange:s=>{this.updateStores(s.currentTarget.value)}})]})}}customElements.get("e-tweaker-string-manager")||customElements.define("e-tweaker-string-manager",Fe);const et={boolean:Ee,color:Ce,link:ze,number:Te,select:Re,string:Fe},tt=C.createStylesheet({":host":{display:"grid",gridAutoFlow:"column",gridTemplateColumns:"0.5fr 1fr",alignItems:"center",color:c.aptechkaTheme.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:c.aptechkaTheme.colorFont.var,transitionDuration:"var(--duration-short)",transitionProperty:"fill, opacity",opacity:"0"},":host(:hover) .head-button":{opacity:"1"},".head-button:hover":{fill:c.aptechkaTheme.colorActive.var},".head-button svg":{width:"100%",height:"100%"}});var v,A,N,D,H,B,X;class fe extends HTMLElement{constructor(e){var l,d,p,y;super();a(this,v,[]);a(this,A);a(this,N);a(this,D,!1);a(this,H);a(this,B,()=>{g.activeStores.current.find(e=>t(this,v).includes(e))||this.remove()});a(this,X,e=>{t(this,D)&&((e.metaKey||e.ctrlKey)&&e.code==="KeyC"?navigator.clipboard.writeText(t(this,v)[0].current):(e.metaKey||e.ctrlKey)&&e.code==="KeyR"&&(t(this,v).forEach(s=>{s.reset()}),e.preventDefault()))});o(this,v,[e.store]),o(this,A,e.store.passport.name),o(this,N,t(this,A).split(".").slice(-1).toString());const s=((d=(l=e.store.passport)==null?void 0:l.manager)==null?void 0:d.type)||"string";o(this,H,new et[s](t(this,v)[0])),this.attachShadow({mode:"open"}).adoptedStyleSheets.push(tt),n.element(this,{class:{disabled:((y=(p=e.store.passport)==null?void 0:p.manager)==null?void 0:y.disabled)||!1},onPointerleave:()=>{o(this,D,!1)},onPointerenter:()=>{o(this,D,!0)},children:[n.div({class:"head",children:[n.div({class:"name",children:t(this,N)+":"}),n.div({class:"head-buttons",children:[n.button({class:"head-button",children:xe,onClick:()=>{navigator.clipboard.writeText(t(this,v)[0].current)}}),n.button({class:"head-button",children:Se,onClick:()=>{t(this,v).forEach(M=>{M.reset()})}})]})]}),t(this,H)]})}get key(){return t(this,A)}get name(){return t(this,N)}get stores(){return t(this,v)}addStore(e){t(this,H).addStore(e)}connectedCallback(){g.activeStores.subscribe(t(this,B)),addEventListener("keydown",t(this,X)),Ze.dispatchSizeChangeEvent(this)}disconnectedCallback(){g.activeStores.unsubscribe(t(this,B)),removeEventListener("keydown",t(this,X))}}v=new WeakMap,A=new WeakMap,N=new WeakMap,D=new WeakMap,H=new WeakMap,B=new WeakMap,X=new WeakMap;customElements.get("e-tweaker-field")||customElements.define("e-tweaker-field",fe);const st=C.createStylesheet({".wrapper":{boxSizing:"border-box",backgroundColor:"rgba(255, 255, 255, 0.1)",borderRadius:c.aptechkaTheme.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:c.aptechkaTheme.colorMainAux.var,borderRadius:c.aptechkaTheme.borderRadius.var},".name":{fontSize:"var(--font-size-large)",color:c.aptechkaTheme.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:c.aptechkaTheme.colorFont.var,transition:"transform var(--duration-short)"},".opened .arrow":{transform:"scaleY(-1)"}});var k,Y,m,G,Q,U,ee,oe;const le=class le extends HTMLElement{constructor(e){super();a(this,k);a(this,Y,new g.Store(null));a(this,m,new g.Store([]));a(this,G);a(this,Q,null);a(this,U,null);a(this,ee,null);a(this,oe,e=>{let s=[],r=[];e.forEach(l=>{s=[...s,...l.removedNodes],r=[...r,...l.addedNodes]}),t(this,m).current=t(this,m).current.filter(l=>!s.includes(l)),t(this,k)&&!t(this,m).current.length&&!r.length&&this.remove()});this.attachShadow({mode:"open"}).adoptedStyleSheets.push(st),o(this,k,e.key),o(this,G,new MutationObserver(t(this,oe))),n.element(this,{children:[n.div({class:"wrapper",children:[n.div({class:"head",onClick:r=>{this.classList.toggle("opened"),this.classList.contains("opened")?w.openPanel(t(this,k)):w.closePanel(t(this,k))},children:[t(this,k)?n.div({class:"name",children:[t(this,k).split(".").slice(-1).toString()]}):null,t(this,Y),n.element(Oe.arrowIcon,{class:"arrow"})]}),n.div({class:"body",ref:r=>{o(this,Q,r)},children:n.div({class:"body-content",children:t(this,m),ref:r=>{o(this,U,r),o(this,ee,r.firstElementChild)}})})]})]}),e!=null&&e.storeBox&&this.handleStore(e.storeBox)}get key(){return t(this,k)}get head(){return t(this,Y)}get content(){return t(this,m)}get bodyElement(){return t(this,Q)}get contentElement(){return t(this,U)}connectedCallback(){w.isPanelOpened(t(this,k))&&this.classList.add("opened"),setTimeout(()=>{this.classList.add("transition-allowed")}),t(this,G).observe(t(this,ee),{childList:!0})}handleStore(e){if(e.remainingFolders.length){const r=e.store.passport.name.split("."),l=r.slice(0,r.length-e.remainingFolders.length).join("."),d=t(this,m).current.find(p=>p.key===l);d instanceof le?d.handleStore({store:e.store,remainingFolders:e.remainingFolders.slice(1)}):t(this,m).current=[...t(this,m).current,new le({key:l,storeBox:{store:e.store,remainingFolders:e.remainingFolders.slice(1)}})]}else{const s=t(this,m).current.find(r=>r.key===e.store.passport.name);s instanceof fe?s.addStore(e.store):t(this,m).current=[...t(this,m).current,new fe({store:e.store})]}}};k=new WeakMap,Y=new WeakMap,m=new WeakMap,G=new WeakMap,Q=new WeakMap,U=new WeakMap,ee=new WeakMap,oe=new WeakMap;let ae=le;customElements.get("e-tweaker-folder")||customElements.define("e-tweaker-folder",ae);const rt=C.createStylesheet({":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:c.aptechkaTheme.colorMain.var,borderRadius:c.aptechkaTheme.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:c.aptechkaTheme.colorFont.var,transitionProperty:"fill",transitionDuration:"var(--duration-short)"},".tweaker-button:hover":{fill:c.aptechkaTheme.colorActive.var},".tweaker-button svg":{width:"100%",height:"100%"},":host .body-content":{maxHeight:`calc(
2
2
  100dvh -
3
3
  (
4
4
  var(--tweaker-offset) * 2 +
@@ -7,4 +7,4 @@
7
7
  )`,overflow:"hidden auto","-ms-overflow-style":"none","scrollbar-width":"none"},":host .body-content::-webkit-scrollbar":{display:"none"},[`@media ${Ke.ViewportMediaRules["<=mobile"]}`]:{":host":{position:"absolute",top:"0",right:"0",width:"100% !important",borderTopLeftRadius:"0",borderTopRightRadius:"0"},":host .body-content":{maxHeight:`calc(
8
8
  100dvh -
9
9
  var(--tweaker-folder-height)
10
- )`}}});var te,se,re;class Me extends ae{constructor(){super({key:""});a(this,te,!1);a(this,se,()=>{w.save()});a(this,re,He.debounce(()=>{g.activeStores.current.forEach(e=>{var s;if(e.passport&&!((s=e.passport.manager)!=null&&s.invisible)){const r=e.passport.name.split(".");this.handleStore({store:e,remainingFolders:r.length>1?r.slice(0,-1):[]})}}),t(this,te)||(o(this,te,!0),this.contentElement.scroll({top:w.scrollValue}),this.contentElement.addEventListener("scroll",()=>{w.scrollValue=this.contentElement.scrollTop}))},10));w.load(),this.shadowRoot.adoptedStyleSheets.push(rt),this.head.current=[n.div({class:"tweaker-buttons",onClick:e=>{e.stopPropagation()},children:[n.button({class:"tweaker-button",children:Se,onClick:()=>{g.storeRegistry.resetState()}}),n.button({class:["tweaker-button"],children:[xe],onClick:()=>{navigator.clipboard.writeText(JSON.stringify(g.storeRegistry.getState()))}}),n.button({class:"tweaker-button",children:Je,onClick:()=>{De.createJSONAndSave(g.storeRegistry.projectName,g.storeRegistry.getState())}}),n.label({class:"tweaker-button",children:[We,n.input({type:"file",style:{display:"none"},onChange:e=>{var l;const r=(l=e.currentTarget.files)==null?void 0:l[0];if(r){const d=new FileReader;d.onload=p=>{var M,O;const y=(O=(M=p.target)==null?void 0:M.result)==null?void 0:O.toString();y&&g.storeRegistry.loadState(y)},d.readAsText(r)}}})]})]})],n.element(this.bodyElement,{children:[n.div({class:"resize",onPointerdown:e=>{e.preventDefault();const s=this.getBoundingClientRect(),r=this.contentElement.scrollTop;ye.setupDrag(l=>{const d=e.x-l.x,p=Math.max(400,s.width+d);this.style.width=p+"px",w.changeSize("tweaker",p)},()=>{setTimeout(()=>{this.contentElement.scroll({top:r})},10)})},onDblclick:()=>{this.style.width="",w.changeSize("tweaker",null)}})]})}connectedCallback(){super.connectedCallback(),window.addEventListener("beforeunload",t(this,se)),g.activeStores.subscribe(t(this,re)),w.changedSizes("tweaker")&&(this.style.width=w.changedSizes("tweaker")+"px")}disconnectedCallback(){window.removeEventListener("beforeunload",t(this,se)),w.save(),g.activeStores.unsubscribe(t(this,re))}}te=new WeakMap,se=new WeakMap,re=new WeakMap;customElements.get("e-tweaker")||customElements.define("e-tweaker",Me);Ae.isBrowser&&document.body.appendChild(new Me);
10
+ )`}}});var te,se,re;class Me extends ae{constructor(){super({key:""});a(this,te,!1);a(this,se,()=>{w.save()});a(this,re,He.debounce(()=>{g.activeStores.current.forEach(e=>{var s;if(e.passport&&!((s=e.passport.manager)!=null&&s.invisible)){const r=e.passport.name.split(".");this.handleStore({store:e,remainingFolders:r.length>1?r.slice(0,-1):[]})}}),t(this,te)||(o(this,te,!0),this.contentElement.scroll({top:w.scrollValue}),this.contentElement.addEventListener("scroll",()=>{w.scrollValue=this.contentElement.scrollTop}))},10));w.load(),this.shadowRoot.adoptedStyleSheets.push(rt),this.head.current=[n.div({class:"tweaker-buttons",onClick:e=>{e.stopPropagation()},children:[n.button({class:"tweaker-button",children:Se,onClick:()=>{g.storeRegistry.resetState()}}),n.button({class:["tweaker-button"],children:[xe],onClick:()=>{navigator.clipboard.writeText(JSON.stringify(g.storeRegistry.getState()))}}),n.button({class:"tweaker-button",children:We,onClick:()=>{De.createJSONAndSave(g.storeRegistry.name,g.storeRegistry.getState())}}),n.label({class:"tweaker-button",children:[_e,n.input({type:"file",style:{display:"none"},onChange:e=>{var l;const r=(l=e.currentTarget.files)==null?void 0:l[0];if(r){const d=new FileReader;d.onload=p=>{var M,O;const y=(O=(M=p.target)==null?void 0:M.result)==null?void 0:O.toString();y&&g.storeRegistry.loadState(y)},d.readAsText(r)}}})]})]})],n.element(this.bodyElement,{children:[n.div({class:"resize",onPointerdown:e=>{e.preventDefault();const s=this.getBoundingClientRect(),r=this.contentElement.scrollTop;ye.setupDrag(l=>{const d=e.x-l.x,p=Math.max(400,s.width+d);this.style.width=p+"px",w.changeSize("tweaker",p)},()=>{setTimeout(()=>{this.contentElement.scroll({top:r})},10)})},onDblclick:()=>{this.style.width="",w.changeSize("tweaker",null)}})]})}connectedCallback(){super.connectedCallback(),window.addEventListener("beforeunload",t(this,se)),g.activeStores.subscribe(t(this,re)),w.changedSizes("tweaker")&&(this.style.width=w.changedSizes("tweaker")+"px")}disconnectedCallback(){window.removeEventListener("beforeunload",t(this,se)),w.save(),g.activeStores.unsubscribe(t(this,re))}}te=new WeakMap,se=new WeakMap,re=new WeakMap;customElements.get("e-tweaker")||customElements.define("e-tweaker",Me);Ne.isBrowser&&document.body.appendChild(new Me);
@@ -3,17 +3,17 @@ var ke = (l) => {
3
3
  };
4
4
  var fe = (l, r, e) => r.has(l) || ke("Cannot " + e);
5
5
  var t = (l, r, e) => (fe(l, r, "read from private field"), e ? e.call(l) : r.get(l)), o = (l, r, e) => r.has(l) ? ke("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(l) : r.set(l, e), n = (l, r, e, s) => (fe(l, r, "write to private field"), s ? s.call(l, e) : r.set(l, e), e), f = (l, r, e) => (fe(l, r, "access private method"), e);
6
- import { i as je } from "../browser-0zX67oeU.js";
7
- import { s as T, a as $, S as xe } from "../Store-DGtldlBH.js";
8
- import { c as Be } from "../file-lxi_oXJf.js";
9
- import { d as Je } from "../function-C10DGppn.js";
6
+ import { i as Be } from "../browser-0zX67oeU.js";
7
+ import { s as T, a as A, S as xe } from "../Store-C46i0nvr.js";
8
+ import { c as Je } from "../file-lxi_oXJf.js";
9
+ import { d as We } from "../function-C10DGppn.js";
10
10
  import { s as ze } from "../gestures-D2Fdra_G.js";
11
11
  import "../ticker/index.js";
12
- import { e as m, a0 as pe, a as We, D as g, aB as Xe, p as J, a3 as Ye } from "../tags-4AoxVUe3.js";
13
- import { c as C } from "../createStylesheet-DO5t5q-m.js";
14
- import { a as qe } from "../Viewport-DTlImj28.js";
12
+ import { e as m, a0 as pe, a as je, D as g, aB as Xe, p as W, a3 as Ye } from "../tags-BL3kQp9o.js";
13
+ import { c as C } from "../createStylesheet-COAZH1Mw.js";
14
+ import { a as qe } from "../Viewport-B55BvLsV.js";
15
15
  import { aptechkaTheme as h } from "../theme/index.js";
16
- import { a as Ge } from "../index-BhbT9PrL.js";
16
+ import { a as Ge } from "../index-CenF0JbH.js";
17
17
  import { a as Qe } from "../events-CJTUMSLU.js";
18
18
  import "../checkbox/index.js";
19
19
  import { c as Ue } from "../math-BOBiC4TN.js";
@@ -26,7 +26,7 @@ class st {
26
26
  o(this, P);
27
27
  o(this, b);
28
28
  o(this, x);
29
- this.scrollValue = 0, n(this, P, ""), n(this, b, []), n(this, x, {}), n(this, P, T.projectName + "-studio");
29
+ this.scrollValue = 0, n(this, P, ""), n(this, b, []), n(this, x, {}), n(this, P, T.name + "-tweaker");
30
30
  }
31
31
  openPanel(r) {
32
32
  t(this, b).includes(r) || t(this, b).push(r);
@@ -66,7 +66,7 @@ class st {
66
66
  P = new WeakMap(), b = new WeakMap(), x = new WeakMap();
67
67
  const w = new st();
68
68
  var F;
69
- class j extends HTMLElement {
69
+ class B extends HTMLElement {
70
70
  constructor(...e) {
71
71
  super();
72
72
  o(this, F);
@@ -101,7 +101,7 @@ const it = C({
101
101
  borderRadius: h.borderRadiusSmall.var
102
102
  }
103
103
  });
104
- class Fe extends j {
104
+ class Fe extends B {
105
105
  constructor(...r) {
106
106
  super(...r), this.attachShadow({ mode: "open" }).adoptedStyleSheets.push(it), m(this, {
107
107
  children: [
@@ -146,7 +146,7 @@ const rt = C({
146
146
  height: "calc(var(--height-input) * 0.93)"
147
147
  }
148
148
  });
149
- class Me extends j {
149
+ class Me extends B {
150
150
  constructor(...r) {
151
151
  super(...r), this.attachShadow({ mode: "open" }).adoptedStyleSheets.push(rt), m(this, {
152
152
  children: [
@@ -168,12 +168,12 @@ const ot = C({
168
168
  fontSize: "var(--font-size-small)"
169
169
  }
170
170
  });
171
- class Le extends j {
171
+ class Le extends B {
172
172
  constructor(...r) {
173
173
  var s, i;
174
174
  super(...r), this.attachShadow({ mode: "open" }).adoptedStyleSheets.push(ot), console.log(this.firstStore), m(this, {
175
175
  children: [
176
- We({
176
+ je({
177
177
  href: this.firstStore,
178
178
  target: (i = (s = this.firstStore.passport) == null ? void 0 : s.manager) != null && i.sameWindow ? "_self" : "_blank",
179
179
  children: this.firstStore
@@ -247,30 +247,30 @@ const nt = C({
247
247
  opacity: 0.3
248
248
  }
249
249
  });
250
- var I, A, D, E, M, W, X, k, V, Y, q, c, N, we, be, le, G;
251
- class Pe extends j {
250
+ var I, N, D, E, M, j, X, k, V, Y, q, c, $, we, be, le, G;
251
+ class Pe extends B {
252
252
  constructor(...e) {
253
- var i, a, d, p, y, L, B, Se;
253
+ var i, a, d, p, y, L, J, Se;
254
254
  super(...e);
255
255
  o(this, c);
256
256
  o(this, I, []);
257
- o(this, A, []);
257
+ o(this, N, []);
258
258
  o(this, D);
259
259
  o(this, E);
260
260
  o(this, M);
261
- o(this, W);
261
+ o(this, j);
262
262
  o(this, X);
263
263
  o(this, k);
264
264
  o(this, V, !1);
265
265
  o(this, Y, (e) => {
266
- const s = f(this, c, N).call(this, e);
266
+ const s = f(this, c, $).call(this, e);
267
267
  return s.map((i, a) => {
268
268
  const d = typeof i == "string" ? parseFloat(i) || t(this, E) : i, p = Ue(d, t(this, E), t(this, M)), y = _e(p, t(this, D));
269
269
  s[a] = y;
270
270
  }), t(this, X) === "number" ? s[0] : s;
271
271
  });
272
272
  o(this, q, () => {
273
- f(this, c, N).call(this).map((e, s) => {
273
+ f(this, c, $).call(this).map((e, s) => {
274
274
  const i = t(this, I)[s];
275
275
  i && (i.value = (e || 0).toString());
276
276
  }), f(this, c, we).call(this);
@@ -284,9 +284,9 @@ class Pe extends j {
284
284
  )), n(this, M, Ee(
285
285
  (p = (d = this.firstStore.passport) == null ? void 0 : d.manager) == null ? void 0 : p.max,
286
286
  1 / 0
287
- )), n(this, D, ((L = (y = this.firstStore.passport) == null ? void 0 : y.manager) == null ? void 0 : L.step) || 0.01), n(this, W, ((Se = (B = this.firstStore.passport) == null ? void 0 : B.manager) == null ? void 0 : Se.ease) || 1), n(this, X, Array.isArray(this.firstStore.current) ? "array" : "number"), n(this, k, isFinite(t(this, M)) && isFinite(t(this, E))), m(this, {
287
+ )), n(this, D, ((L = (y = this.firstStore.passport) == null ? void 0 : y.manager) == null ? void 0 : L.step) || 0.01), n(this, j, ((Se = (J = this.firstStore.passport) == null ? void 0 : J.manager) == null ? void 0 : Se.ease) || 1), n(this, X, Array.isArray(this.firstStore.current) ? "array" : "number"), n(this, k, isFinite(t(this, M)) && isFinite(t(this, E))), m(this, {
288
288
  class: t(this, k) ? "" : "infinite",
289
- children: f(this, c, N).call(this).map(($e, ae) => g({
289
+ children: f(this, c, $).call(this).map((Ae, ae) => g({
290
290
  class: "inputs-wrapper",
291
291
  children: [
292
292
  pe({
@@ -295,7 +295,7 @@ class Pe extends j {
295
295
  min: t(this, E),
296
296
  max: t(this, M),
297
297
  ref: (z) => t(this, I).push(z),
298
- value: $e,
298
+ value: Ae,
299
299
  onChange: () => {
300
300
  this.updateStores(
301
301
  t(this, I).map((z) => parseFloat(z.value))
@@ -307,15 +307,15 @@ class Pe extends j {
307
307
  children: [
308
308
  g({
309
309
  class: "drag-knob",
310
- ref: (z) => t(this, A).push(z),
310
+ ref: (z) => t(this, N).push(z),
311
311
  onPointerdown: (z) => {
312
312
  z.preventDefault(), n(this, V, !0);
313
- const ue = f(this, c, N).call(this), Ae = ue[ae], R = t(this, A)[ae], De = t(this, I)[ae];
313
+ const ue = f(this, c, $).call(this), Ne = ue[ae], R = t(this, N)[ae], De = t(this, I)[ae];
314
314
  if (R && De) {
315
315
  const ge = R.parentElement, He = f(this, c, be).call(this);
316
316
  ge.classList.add("grabbing"), ze(
317
317
  (me) => {
318
- const ye = me.x - z.x, Ke = t(this, k) ? ge.offsetWidth / (He || 1) : 1, Oe = Ae + ye / Ke * t(this, W);
318
+ const ye = me.x - z.x, Ke = t(this, k) ? ge.offsetWidth / (He || 1) : 1, Oe = Ne + ye / Ke * t(this, j);
319
319
  if (ue[ae] = Oe, !t(this, k)) {
320
320
  const Ze = f(this, c, le).call(this, R, 0);
321
321
  R.style.transform = `translateX(${Ze + ye}px)`;
@@ -350,11 +350,11 @@ class Pe extends j {
350
350
  this.firstStore.removeMiddleware(t(this, Y)), this.firstStore.unsubscribe(t(this, q)), Ce.unsubscribe(t(this, G));
351
351
  }
352
352
  }
353
- I = new WeakMap(), A = new WeakMap(), D = new WeakMap(), E = new WeakMap(), M = new WeakMap(), W = new WeakMap(), X = new WeakMap(), k = new WeakMap(), V = new WeakMap(), Y = new WeakMap(), q = new WeakMap(), c = new WeakSet(), N = function(e = this.firstStore.current) {
353
+ I = new WeakMap(), N = new WeakMap(), D = new WeakMap(), E = new WeakMap(), M = new WeakMap(), j = new WeakMap(), X = new WeakMap(), k = new WeakMap(), V = new WeakMap(), Y = new WeakMap(), q = new WeakMap(), c = new WeakSet(), $ = function(e = this.firstStore.current) {
354
354
  return Array.isArray(e) ? e : [e];
355
355
  }, we = function() {
356
- f(this, c, N).call(this).map((e, s) => {
357
- const i = t(this, A)[s];
356
+ f(this, c, $).call(this).map((e, s) => {
357
+ const i = t(this, N)[s];
358
358
  if (i && (!t(this, V) || t(this, V) && t(this, k))) {
359
359
  const a = f(this, c, le).call(this, i, e);
360
360
  i.style.transform = `translateX(${a}px)`;
@@ -401,7 +401,7 @@ const at = C({
401
401
  transform: "scaleY(-1)"
402
402
  }
403
403
  });
404
- class Ie extends j {
404
+ class Ie extends B {
405
405
  constructor(...r) {
406
406
  var i, a;
407
407
  super(...r), this.attachShadow({ mode: "open" }).adoptedStyleSheets.push(at);
@@ -454,7 +454,7 @@ const lt = C({
454
454
  borderRadius: h.borderRadius.var
455
455
  }
456
456
  });
457
- class Ve extends j {
457
+ class Ve extends B {
458
458
  constructor(...r) {
459
459
  super(...r), this.attachShadow({ mode: "open" }).adoptedStyleSheets.push(lt), m(this, {
460
460
  children: [
@@ -536,7 +536,7 @@ class ve extends HTMLElement {
536
536
  o(this, O, !1);
537
537
  o(this, Z);
538
538
  o(this, Q, () => {
539
- $.current.find((e) => t(this, v).includes(e)) || this.remove();
539
+ A.current.find((e) => t(this, v).includes(e)) || this.remove();
540
540
  });
541
541
  o(this, U, (e) => {
542
542
  t(this, O) && ((e.metaKey || e.ctrlKey) && e.code === "KeyC" ? navigator.clipboard.writeText(t(this, v)[0].current) : (e.metaKey || e.ctrlKey) && e.code === "KeyR" && (t(this, v).forEach((s) => {
@@ -563,14 +563,14 @@ class ve extends HTMLElement {
563
563
  g({
564
564
  class: "head-buttons",
565
565
  children: [
566
- J({
566
+ W({
567
567
  class: "head-button",
568
568
  children: Te,
569
569
  onClick: () => {
570
570
  navigator.clipboard.writeText(t(this, v)[0].current);
571
571
  }
572
572
  }),
573
- J({
573
+ W({
574
574
  class: "head-button",
575
575
  children: Re,
576
576
  onClick: () => {
@@ -600,10 +600,10 @@ class ve extends HTMLElement {
600
600
  t(this, Z).addStore(e);
601
601
  }
602
602
  connectedCallback() {
603
- $.subscribe(t(this, Q)), addEventListener("keydown", t(this, U)), Qe(this);
603
+ A.subscribe(t(this, Q)), addEventListener("keydown", t(this, U)), Qe(this);
604
604
  }
605
605
  disconnectedCallback() {
606
- $.unsubscribe(t(this, Q)), removeEventListener("keydown", t(this, U));
606
+ A.unsubscribe(t(this, Q)), removeEventListener("keydown", t(this, U));
607
607
  }
608
608
  }
609
609
  v = new WeakMap(), H = new WeakMap(), K = new WeakMap(), O = new WeakMap(), Z = new WeakMap(), Q = new WeakMap(), U = new WeakMap();
@@ -868,7 +868,7 @@ const pt = C({
868
868
  }
869
869
  });
870
870
  var re, oe, ne;
871
- class Ne extends he {
871
+ class $e extends he {
872
872
  constructor() {
873
873
  super({
874
874
  key: ""
@@ -877,8 +877,8 @@ class Ne extends he {
877
877
  o(this, oe, () => {
878
878
  w.save();
879
879
  });
880
- o(this, ne, Je(() => {
881
- $.current.forEach((e) => {
880
+ o(this, ne, We(() => {
881
+ A.current.forEach((e) => {
882
882
  var s;
883
883
  if (e.passport && !((s = e.passport.manager) != null && s.invisible)) {
884
884
  const i = e.passport.name.split(".");
@@ -900,14 +900,14 @@ class Ne extends he {
900
900
  e.stopPropagation();
901
901
  },
902
902
  children: [
903
- J({
903
+ W({
904
904
  class: "tweaker-button",
905
905
  children: Re,
906
906
  onClick: () => {
907
907
  T.resetState();
908
908
  }
909
909
  }),
910
- J({
910
+ W({
911
911
  class: ["tweaker-button"],
912
912
  children: [Te],
913
913
  onClick: () => {
@@ -916,14 +916,11 @@ class Ne extends he {
916
916
  );
917
917
  }
918
918
  }),
919
- J({
919
+ W({
920
920
  class: "tweaker-button",
921
921
  children: et,
922
922
  onClick: () => {
923
- Be(
924
- T.projectName,
925
- T.getState()
926
- );
923
+ Je(T.name, T.getState());
927
924
  }
928
925
  }),
929
926
  Ye({
@@ -941,8 +938,8 @@ class Ne extends he {
941
938
  if (i) {
942
939
  const d = new FileReader();
943
940
  d.onload = (p) => {
944
- var L, B;
945
- const y = (B = (L = p.target) == null ? void 0 : L.result) == null ? void 0 : B.toString();
941
+ var L, J;
942
+ const y = (J = (L = p.target) == null ? void 0 : L.result) == null ? void 0 : J.toString();
946
943
  y && T.loadState(y);
947
944
  }, d.readAsText(i);
948
945
  }
@@ -981,12 +978,12 @@ class Ne extends he {
981
978
  });
982
979
  }
983
980
  connectedCallback() {
984
- super.connectedCallback(), window.addEventListener("beforeunload", t(this, oe)), $.subscribe(t(this, ne)), w.changedSizes("tweaker") && (this.style.width = w.changedSizes("tweaker") + "px");
981
+ super.connectedCallback(), window.addEventListener("beforeunload", t(this, oe)), A.subscribe(t(this, ne)), w.changedSizes("tweaker") && (this.style.width = w.changedSizes("tweaker") + "px");
985
982
  }
986
983
  disconnectedCallback() {
987
- window.removeEventListener("beforeunload", t(this, oe)), w.save(), $.unsubscribe(t(this, ne));
984
+ window.removeEventListener("beforeunload", t(this, oe)), w.save(), A.unsubscribe(t(this, ne));
988
985
  }
989
986
  }
990
987
  re = new WeakMap(), oe = new WeakMap(), ne = new WeakMap();
991
- customElements.get("e-tweaker") || customElements.define("e-tweaker", Ne);
992
- je && document.body.appendChild(new Ne());
988
+ customElements.get("e-tweaker") || customElements.define("e-tweaker", $e);
989
+ Be && document.body.appendChild(new $e());
@@ -1 +1 @@
1
- "use strict";var l=e=>{throw TypeError(e)};var d=(e,s,t)=>s.has(e)||l("Cannot "+t);var i=(e,s,t)=>(d(e,s,"read from private field"),t?t.call(e):s.get(e)),n=(e,s,t)=>s.has(e)?l("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(e):s.set(e,t),c=(e,s,t,o)=>(d(e,s,"write to private field"),o?o.call(e,t):s.set(e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../window-resizer/index.cjs");require("../Store-BnA-dJsE.cjs");const m=require("../source/index.cjs"),u=require("../ticker/index.cjs");var r,a;class h extends m.SourceElement{constructor(){super(...arguments);n(this,r,0);n(this,a,()=>{this.classList.add(`state-${this.consumerElement.readyState}`);const t=this.consumerElement.readyState/4;t>i(this,r)&&c(this,r,t),this.dispatchEvent(new CustomEvent("readyStateChange",{detail:{readyState:this.consumerElement.readyState,progress:i(this,r)}})),this.consumerElement.readyState===4&&u.ticker.unsubscribe(i(this,a))})}connectedCallback(){super.connectedCallback(),this.addEventListener("sourceCapture",()=>{u.ticker.subscribe(i(this,a)),this.hasAttribute("capture-autoplay")&&this.consumerElement.play()}),this.addEventListener("sourceRelease",()=>{this.hasAttribute("capture-autoplay")&&(this.consumerElement.pause(),this.hasAttribute("replay")&&(this.consumerElement.currentTime=0)),this.hasAttribute("reload-source")&&this.classList.remove("state-0","state-1","state-2","state-3","state-4")})}disconnectedCallback(){super.disconnectedCallback(),u.ticker.unsubscribe(i(this,a)),c(this,r,0)}createConsumer(){return document.createElement("video")}consumeSource(t){this.consumerElement.src=t||""}}r=new WeakMap,a=new WeakMap;customElements.get("e-video")||customElements.define("e-video",h);exports.VideoElement=h;
1
+ "use strict";var l=e=>{throw TypeError(e)};var d=(e,s,t)=>s.has(e)||l("Cannot "+t);var i=(e,s,t)=>(d(e,s,"read from private field"),t?t.call(e):s.get(e)),n=(e,s,t)=>s.has(e)?l("Cannot add the same private member more than once"):s instanceof WeakSet?s.add(e):s.set(e,t),c=(e,s,t,o)=>(d(e,s,"write to private field"),o?o.call(e,t):s.set(e,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});require("../window-resizer/index.cjs");require("../Store-npaZHvX4.cjs");const m=require("../source/index.cjs"),u=require("../ticker/index.cjs");var r,a;class h extends m.SourceElement{constructor(){super(...arguments);n(this,r,0);n(this,a,()=>{this.classList.add(`state-${this.consumerElement.readyState}`);const t=this.consumerElement.readyState/4;t>i(this,r)&&c(this,r,t),this.dispatchEvent(new CustomEvent("readyStateChange",{detail:{readyState:this.consumerElement.readyState,progress:i(this,r)}})),this.consumerElement.readyState===4&&u.ticker.unsubscribe(i(this,a))})}connectedCallback(){super.connectedCallback(),this.addEventListener("sourceCapture",()=>{u.ticker.subscribe(i(this,a)),this.hasAttribute("capture-autoplay")&&this.consumerElement.play()}),this.addEventListener("sourceRelease",()=>{this.hasAttribute("capture-autoplay")&&(this.consumerElement.pause(),this.hasAttribute("replay")&&(this.consumerElement.currentTime=0)),this.hasAttribute("reload-source")&&this.classList.remove("state-0","state-1","state-2","state-3","state-4")})}disconnectedCallback(){super.disconnectedCallback(),u.ticker.unsubscribe(i(this,a)),c(this,r,0)}createConsumer(){return document.createElement("video")}consumeSource(t){this.consumerElement.src=t||""}}r=new WeakMap,a=new WeakMap;customElements.get("e-video")||customElements.define("e-video",h);exports.VideoElement=h;
@@ -4,7 +4,7 @@ var m = (e) => {
4
4
  var h = (e, s, t) => s.has(e) || m("Cannot " + t);
5
5
  var i = (e, s, t) => (h(e, s, "read from private field"), t ? t.call(e) : s.get(e)), n = (e, s, t) => s.has(e) ? m("Cannot add the same private member more than once") : s instanceof WeakSet ? s.add(e) : s.set(e, t), c = (e, s, t, u) => (h(e, s, "write to private field"), u ? u.call(e, t) : s.set(e, t), t);
6
6
  import "../window-resizer/index.js";
7
- import "../Store-DGtldlBH.js";
7
+ import "../Store-C46i0nvr.js";
8
8
  import { SourceElement as l } from "../source/index.js";
9
9
  import { ticker as o } from "../ticker/index.js";
10
10
  var r, a;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aptechka",
3
- "version": "0.13.0",
3
+ "version": "0.13.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/denisavitski/aptechka.git"
@@ -223,11 +223,6 @@
223
223
  "default": "./lib/store/index.js",
224
224
  "types": "./lib/store/index.d.ts"
225
225
  },
226
- "./svg-path-data": {
227
- "require": "./lib/svg-path-data/index.cjs",
228
- "default": "./lib/svg-path-data/index.js",
229
- "types": "./lib/svg-path-data/index.d.ts"
230
- },
231
226
  "./theme": {
232
227
  "require": "./lib/theme/index.cjs",
233
228
  "default": "./lib/theme/index.js",
@@ -387,9 +382,6 @@
387
382
  "store": [
388
383
  "lib/store/index.d.ts"
389
384
  ],
390
- "svg-path-data": [
391
- "lib/svg-path-data/index.d.ts"
392
- ],
393
385
  "theme": [
394
386
  "lib/theme/index.d.ts"
395
387
  ],
@@ -1 +0,0 @@
1
- "use strict";var p=s=>{throw TypeError(s)};var D=(s,r,e)=>r.has(s)||p("Cannot "+e);var a=(s,r,e)=>(D(s,r,"read from private field"),e?e.call(s):r.get(s)),h=(s,r,e)=>r.has(s)?p("Cannot add the same private member more than once"):r instanceof WeakSet?r.add(s):r.set(s,e),v=(s,r,e,c)=>(D(s,r,"write to private field"),c?c.call(s,e):r.set(s,e),e);var y=(s,r,e)=>new Promise((c,i)=>{var n=t=>{try{u(e.next(t))}catch(d){i(d)}},b=t=>{try{u(e.throw(t))}catch(d){i(d)}},u=t=>t.done?c(t.value):Promise.resolve(t.value).then(n,b);u((e=e.apply(s,r)).next())});const S=require("./Store-BnA-dJsE.cjs");var o;class x extends S.Store{constructor(e,c,i){super(null,i);h(this,o);v(this,o,e.subscribe(n=>{this.current=c(n.current)}))}close(){super.close(),a(this,o).call(this)}}o=new WeakMap;var l;class A extends S.Store{constructor(e,c,i){super(null,i);h(this,l);let n=0;v(this,l,e.subscribe(b=>y(this,null,function*(){const u=++n,t=yield c(b.current);n===u&&(this.current=t)})))}close(){super.close(),a(this,l).call(this)}}l=new WeakMap;exports.AsyncDerived=A;exports.Derived=x;
@@ -1,56 +0,0 @@
1
- var v = (s) => {
2
- throw TypeError(s);
3
- };
4
- var x = (s, r, e) => r.has(s) || v("Cannot " + e);
5
- var h = (s, r, e) => (x(s, r, "read from private field"), e ? e.call(s) : r.get(s)), p = (s, r, e) => r.has(s) ? v("Cannot add the same private member more than once") : r instanceof WeakSet ? r.add(s) : r.set(s, e), d = (s, r, e, c) => (x(s, r, "write to private field"), c ? c.call(s, e) : r.set(s, e), e);
6
- var D = (s, r, e) => new Promise((c, n) => {
7
- var u = (t) => {
8
- try {
9
- i(e.next(t));
10
- } catch (b) {
11
- n(b);
12
- }
13
- }, a = (t) => {
14
- try {
15
- i(e.throw(t));
16
- } catch (b) {
17
- n(b);
18
- }
19
- }, i = (t) => t.done ? c(t.value) : Promise.resolve(t.value).then(u, a);
20
- i((e = e.apply(s, r)).next());
21
- });
22
- import { S as f } from "./Store-DGtldlBH.js";
23
- var o;
24
- class A extends f {
25
- constructor(e, c, n) {
26
- super(null, n);
27
- p(this, o);
28
- d(this, o, e.subscribe((u) => {
29
- this.current = c(u.current);
30
- }));
31
- }
32
- close() {
33
- super.close(), h(this, o).call(this);
34
- }
35
- }
36
- o = new WeakMap();
37
- var l;
38
- class S extends f {
39
- constructor(e, c, n) {
40
- super(null, n);
41
- p(this, l);
42
- let u = 0;
43
- d(this, l, e.subscribe((a) => D(this, null, function* () {
44
- const i = ++u, t = yield c(a.current);
45
- u === i && (this.current = t);
46
- })));
47
- }
48
- close() {
49
- super.close(), h(this, l).call(this);
50
- }
51
- }
52
- l = new WeakMap();
53
- export {
54
- S as A,
55
- A as D
56
- };
@@ -1 +0,0 @@
1
- "use strict";var p=i=>{throw TypeError(i)};var N=(i,t,e)=>t.has(i)||p("Cannot "+e);var r=(i,t,e)=>(N(i,t,"read from private field"),e?e.call(i):t.get(i)),s=(i,t,e)=>t.has(i)?p("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(i):t.set(i,e),a=(i,t,e,c)=>(N(i,t,"write to private field"),c?c.call(i,e):t.set(i,e),e),R=(i,t,e)=>(N(i,t,"access private method"),e);const z=require("./browser-CpzFX2xg.cjs");var f,d,S;class M{constructor(){s(this,f,null);s(this,d,"");s(this,S,"");z.isBrowser&&(a(this,d,document.documentElement.getAttribute("data-project")||"unnamed"),a(this,S,r(this,d)?r(this,d)+"-store-registry":"store-registry"))}get projectName(){return r(this,d)}get localStoreRegistryName(){return r(this,S)}get loadedState(){return r(this,f)}saveState(){const t=this.getState(),e=JSON.stringify(t);localStorage.setItem(r(this,S),e)}loadState(t=localStorage.getItem(r(this,S))){t&&(typeof t=="string"?a(this,f,JSON.parse(t)):a(this,f,t),l.current.forEach(e=>{e.passport&&this.updateStore(e)}))}resetState(){l.current.forEach(t=>{t.passport&&t.reset()}),this.saveState()}updateStore(t){var c,v;if(!Array.isArray((c=r(this,f))==null?void 0:c.stores))return t;const e=t.passport;if(e){const A=(v=r(this,f))==null?void 0:v.stores.find(q=>q.name===e.name);A&&(t.current=A.value)}return t}getState(){const t={stores:[]};return l.current.forEach(e=>{e.passport&&(t.stores.find(c=>c.name===e.passport.name)||t.stores.push({value:e.current,name:e.passport.name}))}),t}}f=new WeakMap,d=new WeakMap,S=new WeakMap;const C=new M;var g,h,m,n,o,u,y,b,w,j;class E{constructor(t,e){s(this,w);s(this,g);s(this,h);s(this,m);s(this,n,new Set);s(this,o);s(this,u);s(this,y);s(this,b);a(this,g,e==null?void 0:e.passport),a(this,h,{initial:t,previous:void 0,current:t}),a(this,m,(e==null?void 0:e.equalityCheck)||((c,v)=>c===v)),e!=null&&e.validate&&this.addMiddleware(e.validate),a(this,y,(e==null?void 0:e.notifyAndClose)||!1),a(this,b,(e==null?void 0:e.invisible)||!1),a(this,o,(e==null?void 0:e.skipSubscribeNotification)||!1),r(this,g)&&C.updateStore(this)}get passport(){return r(this,g)}get initial(){return r(this,h).initial}get previous(){return r(this,h).previous}get current(){return r(this,h).current}set current(t){if(!r(this,m).call(this,r(this,h).current,t)){if(r(this,h).previous=r(this,h).current,r(this,u))for(const e of r(this,u))t=e(t);r(this,h).current=t,R(this,w,j).call(this),r(this,y)&&this.close()}}get subscribers(){return r(this,n)}addMiddleware(t){r(this,u)||a(this,u,new Set),r(this,u).add(t)}removeMiddleware(t){var e,c;(e=r(this,u))==null||e.delete(t),(c=r(this,u))!=null&&c.size||a(this,u,void 0)}subscribe(t){return!r(this,b)&&!r(this,n).size&&I(this),r(this,n).add(t),r(this,o)||t(r(this,h)),()=>{this.unsubscribe(t)}}unsubscribe(t){r(this,n).delete(t),r(this,n).size||k(this)}reset(){this.current=Array.isArray(this.initial)?[...this.initial]:this.initial}close(){r(this,n).clear(),k(this)}}g=new WeakMap,h=new WeakMap,m=new WeakMap,n=new WeakMap,o=new WeakMap,u=new WeakMap,y=new WeakMap,b=new WeakMap,w=new WeakSet,j=function(){for(const t of r(this,n))t(r(this,h))};const l=new E([],{invisible:!0});function I(i){l.current.includes(i)||(l.current=[...l.current,i])}function k(i){l.current.includes(i)&&(l.current=l.current.filter(t=>t!==i))}exports.Store=E;exports.activeStores=l;exports.storeRegistry=C;