nodality 1.0.182 → 1.0.185
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/dist/animator.cjs.js +1 -1
- package/dist/animator.esm.js +1 -1
- package/dist/audionew.cjs.js +1 -1
- package/dist/audionew.esm.js +1 -1
- package/dist/base.cjs.js +1 -1
- package/dist/base.esm.js +1 -1
- package/dist/beta-desktop-bar.cjs.js +1 -1
- package/dist/beta-desktop-bar.esm.js +1 -1
- package/dist/beta-mobile-bar.cjs.js +1 -1
- package/dist/beta-mobile-bar.esm.js +1 -1
- package/dist/bundle.umd.js +1 -1
- package/dist/button.cjs.js +1 -1
- package/dist/button.esm.js +1 -1
- package/dist/center.cjs.js +1 -1
- package/dist/center.esm.js +1 -1
- package/dist/checkbox.cjs.js +1 -1
- package/dist/checkbox.esm.js +1 -1
- package/dist/code.cjs.js +1 -1
- package/dist/code.esm.js +1 -1
- package/dist/container.cjs.js +1 -1
- package/dist/container.esm.js +1 -1
- package/dist/data-list.cjs.js +1 -1
- package/dist/data-list.esm.js +1 -1
- package/dist/designer.cjs.js +1 -1
- package/dist/designer.esm.js +1 -1
- package/dist/dropdown.cjs.js +1 -1
- package/dist/dropdown.esm.js +1 -1
- package/dist/element-mapper.cjs.js +1 -1
- package/dist/element-mapper.esm.js +1 -1
- package/dist/finalresult.esm.js +1 -1
- package/dist/flex-card.cjs.js +1 -1
- package/dist/flex-card.esm.js +1 -1
- package/dist/flex-grid.cjs.js +1 -1
- package/dist/flex-grid.esm.js +1 -1
- package/dist/flex-row.cjs.js +1 -1
- package/dist/flex-row.esm.js +1 -1
- package/dist/floating-input.cjs.js +1 -1
- package/dist/floating-input.esm.js +1 -1
- package/dist/free.cjs.js +1 -1
- package/dist/free.esm.js +1 -1
- package/dist/horizontal-scroller.cjs.js +1 -1
- package/dist/horizontal-scroller.esm.js +1 -1
- package/dist/image-picker.cjs.js +1 -1
- package/dist/image-picker.esm.js +1 -1
- package/dist/image.cjs.js +1 -1
- package/dist/image.esm.js +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/link-getter.cjs.js +1 -1
- package/dist/link-getter.esm.js +1 -1
- package/dist/link.cjs.js +1 -1
- package/dist/link.esm.js +1 -1
- package/dist/meta-adder.cjs.js +1 -1
- package/dist/meta-adder.esm.js +1 -1
- package/dist/modal-2025.cjs.js +1 -1
- package/dist/modal-2025.esm.js +1 -1
- package/dist/multiswitcher.cjs.js +1 -1
- package/dist/multiswitcher.esm.js +1 -1
- package/dist/new-nav-bar.cjs.js +1 -1
- package/dist/new-nav-bar.esm.js +1 -1
- package/dist/picker.cjs.js +1 -1
- package/dist/picker.esm.js +1 -1
- package/dist/progress.cjs.js +1 -1
- package/dist/progress.esm.js +1 -1
- package/dist/radio.cjs.js +1 -1
- package/dist/radio.esm.js +1 -1
- package/dist/range.cjs.js +1 -1
- package/dist/range.esm.js +1 -1
- package/dist/side-bar.cjs.js +1 -1
- package/dist/side-bar.esm.js +1 -1
- package/dist/side-nav-bar.cjs.js +1 -1
- package/dist/side-nav-bar.esm.js +1 -1
- package/dist/simple-bar.cjs.js +1 -1
- package/dist/simple-bar.esm.js +1 -1
- package/dist/slider-2025.cjs.js +1 -1
- package/dist/slider-2025.esm.js +1 -1
- package/dist/spacer.cjs.js +1 -1
- package/dist/spacer.esm.js +1 -1
- package/dist/stack.cjs.js +1 -1
- package/dist/stack.esm.js +1 -1
- package/dist/table.cjs.js +1 -1
- package/dist/table.esm.js +1 -1
- package/dist/text-field.cjs.js +1 -1
- package/dist/text-field.esm.js +1 -1
- package/dist/text.cjs.js +1 -1
- package/dist/text.esm.js +1 -1
- package/dist/ulist.cjs.js +1 -1
- package/dist/ulist.esm.js +1 -1
- package/dist/video.cjs.js +1 -1
- package/dist/video.esm.js +1 -1
- package/dist/wrap.cjs.js +1 -1
- package/dist/wrap.esm.js +1 -1
- package/dist/zoom-card.cjs.js +1 -1
- package/dist/zoom-card.esm.js +1 -1
- package/layout/animator.js +1 -1
- package/layout/audio.js +1 -1
- package/layout/audionew.js +1 -1
- package/layout/base-2.js +1 -1
- package/layout/base.js +1 -1
- package/layout/beta-desktop-bar.js +1 -1
- package/layout/beta-mobile-bar.js +1 -1
- package/layout/box.js +1 -1
- package/layout/button.js +1 -1
- package/layout/cards.js +1 -1
- package/layout/center.js +1 -1
- package/layout/checkbox.js +1 -1
- package/layout/circle.js +1 -1
- package/layout/clean-row.js +1 -1
- package/layout/code.js +1 -1
- package/layout/container.js +1 -1
- package/layout/custom.js +1 -1
- package/layout/div-image.js +1 -1
- package/layout/dropdown-2025.js +1 -1
- package/layout/dropdown.js +1 -1
- package/layout/empty-element.js +1 -1
- package/layout/external-stylesheet.js +1 -1
- package/layout/flex-card.js +1 -1
- package/layout/flex-grid.js +1 -1
- package/layout/flex-row.js +1 -1
- package/layout/footer.js +1 -1
- package/layout/form-components/custom.js +1 -1
- package/layout/form-components/data-list.js +1 -1
- package/layout/form-components/floating-input.js +1 -1
- package/layout/form-components/form-all.js +1 -1
- package/layout/form-components/form.js +1 -1
- package/layout/form-components/image-picker.js +1 -1
- package/layout/form-components/picker.js +1 -1
- package/layout/form-components/radio.js +1 -1
- package/layout/form-components/radiogroup.js +1 -1
- package/layout/form-components/range.js +1 -1
- package/layout/free.js +1 -1
- package/layout/grid-new.js +1 -1
- package/layout/grid-switcher.js +1 -1
- package/layout/grid.js +1 -1
- package/layout/group.js +1 -1
- package/layout/header.js +1 -1
- package/layout/horizontal-scroller.js +1 -1
- package/layout/image-old.js +1 -1
- package/layout/image.js +1 -1
- package/layout/index.js +1 -1
- package/layout/label.js +1 -1
- package/layout/link.js +1 -1
- package/layout/list-OLD.js +1 -1
- package/layout/list.js +1 -1
- package/layout/meta-adder.js +1 -1
- package/layout/modal-2025.js +1 -1
- package/layout/modernwrap.js +1 -1
- package/layout/multiswitcher.js +1 -1
- package/layout/multiswitcherBeta.js +1 -1
- package/layout/nav-bar.js +1 -1
- package/layout/nav-factor/custom-div.js +1 -1
- package/layout/navBar-OLD.js +1 -1
- package/layout/new-flat-adder.js +1 -1
- package/layout/new-nav-bar.js +1 -1
- package/layout/offset-container.js +1 -1
- package/layout/polygon.js +1 -1
- package/layout/prerender-site.js +1 -1
- package/layout/prerender.js +1 -1
- package/layout/progress.js +1 -1
- package/layout/row.js +1 -1
- package/layout/saved-new-nav-bar.js +1 -1
- package/layout/scroll-video.js +1 -1
- package/layout/side-bar.js +1 -1
- package/layout/side-nav-bar.js +1 -1
- package/layout/simple-bar.js +1 -1
- package/layout/slider-2025.js +1 -1
- package/layout/spacer.js +1 -1
- package/layout/stack.js +1 -1
- package/layout/styler.js +1 -1
- package/layout/svg.js +1 -1
- package/layout/switcher.js +1 -1
- package/layout/table.js +1 -1
- package/layout/text-field.js +1 -1
- package/layout/text.js +1 -1
- package/layout/ulist.js +1 -1
- package/layout/video.js +1 -1
- package/layout/without-new.js +1 -1
- package/layout/wrap.js +1 -1
- package/layout/zoom-card.js +1 -1
- package/lib/card-getter.js +1 -1
- package/lib/data.js +1 -1
- package/lib/designer.js +1 -1
- package/lib/element-mapper.js +1 -1
- package/lib/keyframe-animation.js +1 -1
- package/lib/link-getter.js +1 -1
- package/lib/raster-ops.js +179 -10
- package/lib/scroll-video.js +1 -1
- package/lib/seo.js +1 -1
- package/lib/stacker.js +1 -1
- package/lib/theme.js +1 -1
- package/lib/transform-anim.js +1 -1
- package/package.json +2 -1
package/dist/container.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}e.r(t),e.d(t,{Wrapper:()=>M});var n="nodality.theme.mode",i="nodality:theme",o={mode:function(){try{var e=localStorage.getItem(n);if("light"===e||"dark"===e)return e}catch(e){}return"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}(),tokens:{light:{},dark:{}},defaults:{light:{color:"#111"},dark:{}},setDefaults:function(e){return e&&"object"===r(e)&&(e.light&&(this.defaults.light=Object.assign({},this.defaults.light,e.light)),e.dark&&(this.defaults.dark=Object.assign({},this.defaults.dark,e.dark)),this._broadcast()),this},setTokens:function(e){return e&&"object"===r(e)&&(e.light&&Object.assign(this.tokens.light,e.light),e.dark&&Object.assign(this.tokens.dark,e.dark)),this},get current(){return this.tokens[this.mode]||{}},set:function(e){if("light"!==e&&"dark"!==e)return this;if(e===this.mode)return this;this.mode=e;try{localStorage.setItem(n,e)}catch(e){}return this._broadcast(),this},toggle:function(){return this.set("dark"===this.mode?"light":"dark")},subscribe:function(e){if("undefined"==typeof document)return function(){};var t=function(t){return e(t.detail.mode,t.detail.tokens)};document.addEventListener(i,t);try{e(this.mode,this.current)}catch(e){}return function(){return document.removeEventListener(i,t)}},_broadcast:function(){"undefined"!=typeof document&&document.dispatchEvent(new CustomEvent(i,{detail:{mode:this.mode,tokens:this.current}}))}};function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=l(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function l(e,t){if(e){if("string"==typeof e)return c(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var u={hexalize:{stage:"cell",decl:function(e){return"uniform float ".concat(e,"size;")},code:function(e){return"\n {\n vec2 hp = warped / ".concat(e,"size;\n vec2 hr = vec2(1.0, 1.7320508), hh = hr * 0.5;\n vec2 ha = mod(hp, hr) - hh, hb = mod(hp - hh, hr) - hh;\n vec2 gv = dot(ha, ha) < dot(hb, hb) ? ha : hb;\n center = (hp - gv) * ").concat(e,"size;\n gv = abs(gv);\n edge = max(edge, smoothstep(0.44, 0.5,\n max(dot(gv, normalize(vec2(1.0, 1.7320508))), gv.x)));\n }")},uniforms:function(e,t){return{size:["1f",(e.size||24)*t]}}},offset:{stage:"warp",decl:function(e){return"uniform float ".concat(e,"strength; uniform float ").concat(e,"radius;")},code:function(e){return"\n {\n float d = length(warped - u_mouse);\n float fall = 1.0 - smoothstep(0.0, ".concat(e,"radius, d);\n vec2 dir = d > 0.5 ? (warped - u_mouse) / d : vec2(0.0);\n warped -= dir * ").concat(e,"strength * fall;\n }")},uniforms:function(e,t){return{strength:["1f",(e.strength||20)*t],radius:["1f",(e.radius||260)*t]}}},duotone:{stage:"color",decl:function(e){return"uniform vec3 ".concat(e,"a; uniform vec3 ").concat(e,"b; uniform float ").concat(e,"radius;")},code:function(e,t){return"\n {\n float lum = dot(col, vec3(0.299, 0.587, 0.114));\n vec3 duo = mix(".concat(e,"a, ").concat(e,"b, lum);\n ").concat("mouse"===t.by?"float mask = 1.0 - smoothstep(".concat(e,"radius * 0.35, ").concat(e,"radius, length(center - u_mouse));"):"float mask = 1.0;","\n col = mix(col, duo, mask);\n }")},uniforms:function(e,t){var r=e.colors||["#104B87","#E8FF00"];return{a:["3fv",h(r[0])],b:["3fv",h(r[1])],radius:["1f",(e.radius||220)*t]}}},edges:{stage:"color",decl:function(e){return"uniform vec3 ".concat(e,"color; uniform float ").concat(e,"strength;")},code:function(e){return"\n {\n edgeCol = ".concat(e,"color;\n edgeCov = max(edgeCov, edge * ").concat(e,"strength);\n }")},uniforms:function(e){return{color:["3fv",h(e.color||"#FFFFFF")],strength:["1f",null!=e.strength?e.strength:1]}}},stir:{stage:["warp","color"],decl:function(e){return"\n uniform sampler2D ".concat(e,"vel;\n uniform sampler2D ").concat(e,"dye;\n uniform float ").concat(e,"strength;\n uniform float ").concat(e,"dyemix;\n uniform float ").concat(e,"intensity;\n uniform float ").concat(e,"sheen;\n uniform vec3 ").concat(e,"tint;")},code:function(e,t,r){return"warp"===r?"\n {\n // frag/warped are top-down pixels, the field is bottom-up\n // [0,1]: flip y going in, and flip the y of the vector coming\n // out so the content drags WITH the pointer.\n vec2 fuv = vec2(warped.x / u_res.x, 1.0 - warped.y / u_res.y);\n vec2 v = texture2D(".concat(e,"vel, clamp(fuv, 0.001, 0.999)).xy;\n warped += vec2(v.x, -v.y) * ").concat(e,"strength;\n }"):"\n {\n // Sampled at the CONTINUOUS warped position, never at the\n // cell centre: a cell op upstream (hexalize) snaps the cell\n // centre to one point per tile, which would quantise the\n // liquid into flat per-hex patches instead of smooth swirls.\n vec2 suv = vec2(warped.x / u_res.x, 1.0 - warped.y / u_res.y);\n vec3 dc = texture2D(".concat(e,"dye, clamp(suv, 0.001, 0.999)).rgb;\n float mag = length(dc);\n // Colour is carried IN the dye field and advected with it, so\n // a ribbon keeps its hue while the flow folds it. Deriving\n // colour from the local flow direction instead would make\n // neighbouring pixels jump hue and read as confetti.\n vec3 liquid = mag > 1e-4 ? clamp(dc / mag * 1.25, 0.0, 1.0) : ").concat(e,"tint;\n float amt = clamp((1.0 - exp(-mag * ").concat(e,"intensity)) * ").concat(e,"dyemix, 0.0, 1.0);\n // Straight-alpha OVER so a later overlay op (blobs) still\n // composites correctly on top of the liquid.\n float na = amt + ovA * (1.0 - amt);\n ovCol = (liquid * amt + ovCol * ovA * (1.0 - amt)) / max(na, 1e-4);\n ovA = na;\n\n // Faint sheen on the content itself where the flow is fast.\n float sp = length(texture2D(").concat(e,"vel, clamp(suv, 0.001, 0.999)).xy);\n col = mix(col, ").concat(e,"tint, (1.0 - exp(-sp * 0.7)) * ").concat(e,"sheen);\n }")},uniforms:function(e,t){return{strength:["1f",(null!=e.strength?e.strength:26)*t],sheen:["1f",null!=e.sheen?e.sheen:.15],tint:["3fv",h(e.tint||"#7FD4FF")],dyemix:["1f",null!=e.dye?e.dye:.85],intensity:["1f",null!=e.intensity?e.intensity:1.6]}},solver:{resolutions:function(e){return{sim:Math.max(32,Math.min(e.resolution||128,512)),dye:Math.max(64,Math.min(e.dyeResolution||512,1024))}},targets:{velocity:{double:!0,res:"sim",fmt:"rg",smooth:!0},dye:{double:!0,res:"dye",fmt:"rgba",smooth:!0},pressure:{double:!0,res:"sim",fmt:"r",smooth:!1},divergence:{double:!1,res:"sim",fmt:"r",smooth:!1},vorticity:{double:!1,res:"sim",fmt:"r",smooth:!1}},samplers:{vel:"velocity",dye:"dye"},programs:{splat:"\nprecision highp float;\nuniform sampler2D u_src;\nuniform vec2 u_texel;\nuniform vec2 u_point;\nuniform vec3 u_amount;\nuniform float u_radius;\nuniform float u_aspect;\nvoid main() {\n vec2 uv = gl_FragCoord.xy * u_texel;\n vec2 d = uv - u_point;\n if (u_aspect >= 1.0) d.y /= u_aspect; else d.x *= u_aspect;\n float g = exp(-dot(d, d) / max(u_radius * u_radius, 1e-6));\n gl_FragColor = vec4(texture2D(u_src, uv).xyz + u_amount * g, 1.0);\n}",advect:"\nprecision highp float;\nuniform sampler2D u_vel;\nuniform sampler2D u_src;\nuniform vec2 u_texel;\nuniform float u_dt;\nuniform float u_diss;\nvoid main() {\n vec2 uv = gl_FragCoord.xy * u_texel;\n vec2 back = uv - texture2D(u_vel, uv).xy * u_dt;\n gl_FragColor = vec4(texture2D(u_src, clamp(back, 0.0, 1.0)).xyz * u_diss, 1.0);\n}",curl:"\nprecision highp float;\nuniform sampler2D u_vel;\nuniform vec2 u_texel;\nvoid main() {\n vec2 uv = gl_FragCoord.xy * u_texel;\n float r = texture2D(u_vel, uv + vec2(u_texel.x, 0.0)).y;\n float l = texture2D(u_vel, uv - vec2(u_texel.x, 0.0)).y;\n float t = texture2D(u_vel, uv + vec2(0.0, u_texel.y)).x;\n float b = texture2D(u_vel, uv - vec2(0.0, u_texel.y)).x;\n gl_FragColor = vec4(0.5 * ((r - l) - (t - b)), 0.0, 0.0, 1.0);\n}",confine:"\nprecision highp float;\nuniform sampler2D u_vel;\nuniform sampler2D u_curl;\nuniform vec2 u_texel;\nuniform float u_eps;\nuniform float u_dt;\nvoid main() {\n vec2 uv = gl_FragCoord.xy * u_texel;\n float r = texture2D(u_curl, uv + vec2(u_texel.x, 0.0)).x;\n float l = texture2D(u_curl, uv - vec2(u_texel.x, 0.0)).x;\n float t = texture2D(u_curl, uv + vec2(0.0, u_texel.y)).x;\n float b = texture2D(u_curl, uv - vec2(0.0, u_texel.y)).x;\n float c = texture2D(u_curl, uv).x;\n vec2 grad = 0.5 * vec2(abs(r) - abs(l), abs(t) - abs(b));\n vec2 n = grad / (length(grad) + 1e-5);\n vec2 force = u_eps * c * vec2(n.y, -n.x);\n vec2 v = texture2D(u_vel, uv).xy + force * u_dt;\n gl_FragColor = vec4(clamp(v, -64.0, 64.0), 0.0, 1.0);\n}",divergence:"\nprecision highp float;\nuniform sampler2D u_vel;\nuniform vec2 u_texel;\nvoid main() {\n vec2 uv = gl_FragCoord.xy * u_texel;\n float r = texture2D(u_vel, uv + vec2(u_texel.x, 0.0)).x;\n float l = texture2D(u_vel, uv - vec2(u_texel.x, 0.0)).x;\n float t = texture2D(u_vel, uv + vec2(0.0, u_texel.y)).y;\n float b = texture2D(u_vel, uv - vec2(0.0, u_texel.y)).y;\n vec2 c = texture2D(u_vel, uv).xy;\n if (uv.x - u_texel.x < 0.0) l = -c.x;\n if (uv.x + u_texel.x > 1.0) r = -c.x;\n if (uv.y - u_texel.y < 0.0) b = -c.y;\n if (uv.y + u_texel.y > 1.0) t = -c.y;\n gl_FragColor = vec4(0.5 * ((r - l) + (t - b)), 0.0, 0.0, 1.0);\n}",jacobi:"\nprecision highp float;\nuniform sampler2D u_p;\nuniform sampler2D u_div;\nuniform vec2 u_texel;\nvoid main() {\n vec2 uv = gl_FragCoord.xy * u_texel;\n float r = texture2D(u_p, uv + vec2(u_texel.x, 0.0)).x;\n float l = texture2D(u_p, uv - vec2(u_texel.x, 0.0)).x;\n float t = texture2D(u_p, uv + vec2(0.0, u_texel.y)).x;\n float b = texture2D(u_p, uv - vec2(0.0, u_texel.y)).x;\n float d = texture2D(u_div, uv).x;\n gl_FragColor = vec4((r + l + t + b - d) * 0.25, 0.0, 0.0, 1.0);\n}",subtract:"\nprecision highp float;\nuniform sampler2D u_p;\nuniform sampler2D u_vel;\nuniform vec2 u_texel;\nvoid main() {\n vec2 uv = gl_FragCoord.xy * u_texel;\n float r = texture2D(u_p, uv + vec2(u_texel.x, 0.0)).x;\n float l = texture2D(u_p, uv - vec2(u_texel.x, 0.0)).x;\n float t = texture2D(u_p, uv + vec2(0.0, u_texel.y)).x;\n float b = texture2D(u_p, uv - vec2(0.0, u_texel.y)).x;\n vec2 v = texture2D(u_vel, uv).xy - 0.5 * vec2(r - l, t - b);\n gl_FragColor = vec4(v, 0.0, 1.0);\n}",decay:"\nprecision highp float;\nuniform sampler2D u_tex;\nuniform vec2 u_texel;\nuniform float u_value;\nvoid main() {\n gl_FragColor = texture2D(u_tex, gl_FragCoord.xy * u_texel) * u_value;\n}"},splatColor:function(e,t,r){var n=null!=e.dyeAmount?e.dyeAmount:.6;if(!e.rainbow){var i=h(e.tint||"#7FD4FF");return[i[0]*n,i[1]*n,i[2]*n]}var o=Math.atan2(r,t);return[(.5+.5*Math.cos(o))*n,(.5+.5*Math.cos(o+2.0944))*n,(.5+.5*Math.cos(o+4.1888))*n]},step:function(e,t,r){var n=Math.min(r.dt,1/30),i=1/e.res.sim,o=1/e.res.dye,a=function(e,t){return Math.pow(e,60*t)};if(r.moving){var s=null!=t.force?t.force:1;e.use("splat"),e.f1("u_radius",null!=t.radius?t.radius:.1),e.f1("u_aspect",r.aspect),e.f2("u_point",r.px,r.py),e.f2("u_texel",i,i),e.smp("u_src",e.read("velocity"),0),e.f3("u_amount",r.dx*s,r.dy*s,0),e.blit(e.write("velocity")),e.swap("velocity"),e.f2("u_texel",o,o),e.smp("u_src",e.read("dye"),0),e.f3("u_amount",r.col[0],r.col[1],r.col[2]),e.blit(e.write("dye")),e.swap("dye")}e.use("curl"),e.f2("u_texel",i,i),e.smp("u_vel",e.read("velocity"),0),e.blit(e.single("vorticity")),e.use("confine"),e.f2("u_texel",i,i),e.f1("u_eps",null!=t.curl?t.curl:2.2),e.f1("u_dt",n),e.smp("u_vel",e.read("velocity"),0),e.smp("u_curl",e.single("vorticity"),1),e.blit(e.write("velocity")),e.swap("velocity"),e.use("divergence"),e.f2("u_texel",i,i),e.smp("u_vel",e.read("velocity"),0),e.blit(e.single("divergence")),e.use("decay"),e.f2("u_texel",i,i),e.f1("u_value",a(null!=t.pressure?t.pressure:.8,n)),e.smp("u_tex",e.read("pressure"),0),e.blit(e.write("pressure")),e.swap("pressure"),e.use("jacobi"),e.f2("u_texel",i,i),e.smp("u_div",e.single("divergence"),1);for(var l=Math.max(1,Math.min(t.pressureIterations||6,40)),c=0;c<l;c++)e.smp("u_p",e.read("pressure"),0),e.blit(e.write("pressure")),e.swap("pressure");e.use("subtract"),e.f2("u_texel",i,i),e.smp("u_p",e.read("pressure"),0),e.smp("u_vel",e.read("velocity"),1),e.blit(e.write("velocity")),e.swap("velocity"),e.use("advect"),e.f1("u_dt",n),e.f2("u_texel",i,i),e.smp("u_vel",e.read("velocity"),0),e.smp("u_src",e.read("velocity"),0),e.f1("u_diss",a(null!=t.decay?t.decay:.985,n)),e.blit(e.write("velocity")),e.swap("velocity"),e.f2("u_texel",o,o),e.smp("u_vel",e.read("velocity"),0),e.smp("u_src",e.read("dye"),1),e.f1("u_diss",a(null!=t.dyeFade?t.dyeFade:.97,n)),e.blit(e.write("dye")),e.swap("dye")}}},blobs:{stage:"color",overlay:!0,mips:!0,decl:function(e){return"\n uniform vec3 ".concat(e,"blobs[").concat(12,"];\n uniform int ").concat(e,"count;\n uniform vec3 ").concat(e,"tint;\n uniform float ").concat(e,"refract;\n uniform float ").concat(e,"rim;\n uniform float ").concat(e,"alpha;\n uniform float ").concat(e,"irid;\n uniform float ").concat(e,"disp;\n uniform float ").concat(e,"frost;\n float ").concat(e,"hash(vec3 v) {\n return fract(sin(dot(v, vec3(21.9898, 63.233, 41.719))) * 41739.317);\n }\n float ").concat(e,"noise(vec3 v) {\n vec3 f = floor(v);\n vec3 r = v - f;\n r = r * r * (3.0 - 2.0 * r);\n float c000 = ").concat(e,"hash(f);\n float c100 = ").concat(e,"hash(f + vec3(1.0, 0.0, 0.0));\n float c010 = ").concat(e,"hash(f + vec3(0.0, 1.0, 0.0));\n float c110 = ").concat(e,"hash(f + vec3(1.0, 1.0, 0.0));\n float c001 = ").concat(e,"hash(f + vec3(0.0, 0.0, 1.0));\n float c101 = ").concat(e,"hash(f + vec3(1.0, 0.0, 1.0));\n float c011 = ").concat(e,"hash(f + vec3(0.0, 1.0, 1.0));\n float c111 = ").concat(e,"hash(f + vec3(1.0, 1.0, 1.0));\n return mix(\n mix(mix(c000, c100, r.x), mix(c010, c110, r.x), r.y),\n mix(mix(c001, c101, r.x), mix(c011, c111, r.x), r.y), r.z);\n }")},code:function(e){return"\n {\n float field = 0.0;\n vec2 grad = vec2(0.0);\n for (int bi = 0; bi < ".concat(12,"; bi++) {\n if (bi >= ").concat(e,"count) break;\n vec2 bd = frag - ").concat(e,"blobs[bi].xy;\n float br = ").concat(e,"blobs[bi].z;\n float dd = max(dot(bd, bd), 1.0);\n field += (br * br) / dd;\n grad += (-2.0 * (br * br) / (dd * dd)) * bd;\n }\n float bmask = smoothstep(0.6, 1.0, field);\n if (bmask > 0.003) {\n float gmag = length(grad);\n vec2 g2 = gmag > 1e-6 ? -grad / gmag : vec2(0.0);\n // Pseudo-3D surface normal from the 2D field. For a\n // metaball field (sum of r^2/d^2), 1/sqrt(field) IS the\n // normalized radial position: 0 at the centre, 1 at the\n // surface. That yields a true hemisphere profile — the\n // curvature (and therefore refraction) varies smoothly\n // across the WHOLE disc, not just an edge annulus.\n float s = clamp(inversesqrt(max(field, 1e-4)), 0.0, 1.0);\n vec3 n = normalize(vec3(g2 * s, sqrt(max(1.0 - s * s, 0.004))));\n vec3 rd = vec3(0.0, 0.0, -1.0);\n\n // Dispersion: refract each channel with a slightly\n // different index (water-glass ~1.33). Near the rim the\n // exit direction flattens (|z| -> 0), so the sampling\n // offsets stretch — producing the smooth concentric\n // colour-fringed bands of a thick lens.\n float ca = 0.03 * ").concat(e,"disp;\n vec3 tR = refract(rd, n, 1.0 / (1.33 - ca));\n vec3 tG = refract(rd, n, 1.0 / 1.33);\n vec3 tB = refract(rd, n, 1.0 / (1.33 + ca));\n vec2 oR = tR.xy * (").concat(e,"refract / max(abs(tR.z), 0.3));\n vec2 oG = tG.xy * (").concat(e,"refract / max(abs(tG.z), 0.3));\n vec2 oB = tB.xy * (").concat(e,"refract / max(abs(tB.z), 0.3));\n\n // Blur grows with how far the ray was bent (mip bias), so\n // strongly-refracted regions smear smoothly instead of\n // showing sharp displaced copies. frost adds a base blur.\n float lod = ").concat(e,"frost * 5.0 + log2(1.0 + length(oG) * 0.035);\n vec2 px = 1.0 / u_res;\n vec4 sG = texture2D(u_tex, clamp(uv + oG * px, 0.002, 0.998), lod);\n vec3 refr;\n refr.r = texture2D(u_tex, clamp(uv + oR * px, 0.002, 0.998), lod).r;\n refr.g = sG.g;\n refr.b = texture2D(u_tex, clamp(uv + oB * px, 0.002, 0.998), lod).b;\n // Blend in (approximately) linear light for clean fringes.\n refr = pow(max(refr, 0.0), vec3(2.2));\n\n vec3 tintLin = pow(").concat(e,"tint, vec3(2.2));\n vec3 bodyLin = mix(tintLin * 0.35, refr, sG.a);\n\n // Glass darkens toward the silhouette (absorption), the\n // opposite of an additive glow ring.\n float edge = pow(1.0 - clamp(n.z, 0.0, 1.0), 1.5);\n bodyLin *= 1.0 - 0.35 * ").concat(e,"rim * edge;\n vec3 body = pow(max(bodyLin, 0.0), vec3(1.0 / 2.2));\n\n // Sparse iridescent glints: two drifting value-noise\n // fields sampled on the reflection direction, one warm\n // one cool, sharpened hard so only sparkles survive.\n vec3 rf = reflect(rd, n);\n float nA = ").concat(e,"noise(rf * 2.3 + u_time * 0.5);\n float nB = ").concat(e,"noise(rf * 2.3 - u_time * 0.5);\n vec3 glint = pow(max(vec3(0.30, 0.52, 0.86) * nA +\n vec3(0.80, 0.56, 0.34) * nB, 0.0), vec3(6.0));\n body += glint * ").concat(e,"irid;\n\n // Small hard specular from a fixed key light.\n vec3 L = normalize(vec3(-0.5, 0.7, 0.6));\n float spec = pow(max(dot(reflect(-L, n), vec3(0.0, 0.0, 1.0)), 0.0), 60.0);\n body += spec * 0.35;\n\n ovCol = body;\n ovA = max(ovA, bmask * ").concat(e,"alpha);\n }\n }")},uniforms:function(e,t){return{tint:["3fv",h(e.color||"#EAF4EE")],refract:["1f",(null!=e.refract?e.refract:70)*t],rim:["1f",null!=e.rim?e.rim:.6],alpha:["1f",null!=e.alpha?e.alpha:1],irid:["1f",null!=e.iridescence?e.iridescence:.8],disp:["1f",null!=e.dispersion?e.dispersion:1],frost:["1f",null!=e.frost?e.frost:.25]}},init:function(e,t,r,n){for(var i=(e.radius||46)*t,o=Math.max(1,Math.min(null!=e.trail?e.trail:7,12)),a=[],s=0,l=0;l<o;l++){var c=Math.pow(.86,l);a.push(c),s+=c*c}for(var u=Math.sqrt(s),h=a.map(function(e){return i*e/u}),d=a.map(function(e,t){return.85*i*Math.pow(.955,t)}),f=function(e,t){return e+Math.random()*(t-e)},p=Math.max(0,Math.min((e.count||1)-1,12-o)),v=[],m=0;m<p;m++){var y=f(0,2*Math.PI),g=f(30,80)*t;v.push({x:f(i,r-i),y:f(i,n-i),r:i*f(.45,.8),vx:Math.cos(y)*g,vy:Math.sin(y)*g,phase:f(0,2*Math.PI)})}for(var x={x:.5*r,y:.55*n},b=[],w=0;w<o;w++)b.push({x:x.x,y:x.y});return{head:x,chain:b,nTrail:o,drifters:v,trailIdleR:h,trailMoveR:d,stretch:0,seg:.9*i}},tick:function(e,t){var r=Math.min(t.dt,.05),n=t.w,i=t.h,o=1-Math.exp(9*-r);e.head.x+=(t.mouseX-e.head.x)*o,e.head.y+=(t.mouseY-e.head.y)*o;var a=e.chain;a[0].x=e.head.x,a[0].y=e.head.y;for(var l=1-Math.exp(16*-r),c=1;c<a.length;c++){var u=a[c-1],h=a[c],d=u.x-h.x,f=u.y-h.y,p=Math.hypot(d,f)||1e-4,v=e.seg;p>v&&(h.x+=d*(1-v/p),h.y+=f*(1-v/p)),h.x+=(u.x-h.x)*l,h.y+=(u.y-h.y)*l}var m=a[a.length-1],y=Math.hypot(m.x-e.head.x,m.y-e.head.y),g=Math.max(1,e.seg*(e.nTrail-1)),x=Math.min(1,y/g);e.stretch+=(x-e.stretch)*(1-Math.exp(8*-r));var b,w=s(e.drifters);try{for(w.s();!(b=w.n()).done;){var k=b.value;k.x+=k.vx*r,k.y+=k.vy*r,k.x<k.r?(k.x=k.r,k.vx=Math.abs(k.vx)):k.x>n-k.r&&(k.x=n-k.r,k.vx=-Math.abs(k.vx)),k.y<k.r?(k.y=k.r,k.vy=Math.abs(k.vy)):k.y>i-k.r&&(k.y=i-k.r,k.vy=-Math.abs(k.vy)),k.phase+=1.6*r}}catch(e){w.e(e)}finally{w.f()}for(var _=new Float32Array(36),E=e.stretch,T=0;T<e.nTrail;T++){var S=a[T];_[3*T]=S.x,_[3*T+1]=S.y,_[3*T+2]=e.trailIdleR[T]+(e.trailMoveR[T]-e.trailIdleR[T])*E}return e.drifters.forEach(function(t,r){var n=e.nTrail+r;_[3*n]=t.x,_[3*n+1]=t.y,_[3*n+2]=t.r*(1+.12*Math.sin(t.phase))}),[{name:"blobs",kind:"3fv",value:_},{name:"count",kind:"1i",value:e.nTrail+e.drifters.length}]}}};function h(e){return[1,3,5].map(function(t){return parseInt(e.slice(t,t+2),16)/255})}Object.keys(u);var d="attribute vec2 a; void main(){ gl_Position = vec4(a, 0.0, 1.0); }";function f(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=v(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function p(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||v(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function v(e,t){if(e){if("string"==typeof e)return m(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?m(e,t):void 0}}function m(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function y(e){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},y(e)}function g(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,x(n.key),n)}}function x(e){var t=function(e){if("object"!=y(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==y(t)?t:t+""}function b(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=k(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function w(e){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},w(e)}function k(e,t){if(e){if("string"==typeof e)return _(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?_(e,t):void 0}}function _(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function E(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,T(n.key),n)}}function T(e){var t=function(e){if("object"!=w(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=w(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==w(t)?t:t+""}function S(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(S=function(){return!!e})()}function R(){return R="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=A(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}},R.apply(null,arguments)}function A(e){return A=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},A(e)}function C(e,t){return C=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},C(e,t)}var M=function(e){function t(e){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,r){return t=A(t),function(e,t){if(t&&("object"==w(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,S()?Reflect.construct(t,r||[],A(e).constructor):t.apply(e,r))}(this,t)).res=null,r.setup(e),r.code=[],r.isLast=!1,r.constrObj=e,r.code.push("\n new Wrapper() \n"),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&C(e,t)}(t,e),r=t,n=[{key:"isLasta",value:function(){return this.isLast=!0,this}},{key:"toCode",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.code=[],this.excludeFromCodeTrue)return[""];var r=" ".repeat(t),n="".concat(r,'new Wrapper("').concat(this.constrObj,'")');if(this.constrObj||(n="".concat(r,"new Wrapper()")),Object.keys(this.obj).length){var i=Object.fromEntries(Object.entries(this.obj).filter(function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||k(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2);return t[0],null!==t[1]})),o=JSON.stringify(i,null,2).replace(/"([^"]+)":/g,"$1:");n+="\n".concat(r," .set(").concat(o,")")}return null!==(e=this.items)&&void 0!==e&&e.length&&(n+="\n".concat(r," .add([\n")+this.items.map(function(e){return e.toCode(t+4)}).join(",\n")+"\n".concat(r," ])")),[n+="\n".concat(r)]}},{key:"getType",value:function(){return"LayoutWrapperElement"}},{key:"setArea",value:function(e){return this.res.style.gridArea=e,this}},{key:"removeQuotesFromFirstWord",value:function(e){return e.replace(/"([^"]+)":/g,"$1:")}},{key:"clicked",value:function(e){return this.res.addEventListener("click",e),this}},{key:"onTap",value:function(e){return this.res.addEventListener("click",e),this}},{key:"gpos",value:function(e){return this.res.style.gridColumn=e.col,this.res.style.gridRow=e.row,this}},{key:"set",value:function(e){this.obj=e,this.commonMethods(e),e.onTap&&this.onTap(e.onTap);var r=".set({";e.isHidden&&this.isHidden(e.isHidden),e.scale&&(this.res.style.scale=e.scale),e.scale&&(r+="scale: ".concat(e.scale)),e.keySet&&this.keySet(e.keySet),e.resprop&&this.resprop(e.resprop),e.position&&(this.res.style.position=e.position),void 0!==e.top&&(this.res.style.top=e.top),e.pad&&this.pad(e.pad),e.mar&&this.mar(e.mar),e.arrpad&&(r+="pad: {sides: [".concat(e.arrpad.sides.map(function(e){return'"'.concat(e,'"')}).join(", "),'], value: "').concat(e.arrpad.value,'"}, ')),e.gpos&&this.gpos(e.gpos);var n,i,o,a=[],s=e.transform&&"object"===w(e.transform);if(e.stroke||e.gradient||e.span||e.backgroundOp||e.layout||e.shadow||e.animation||e.filtera||s){e.gradient&&(this.globalGradient=e.gradient.op.gradient,"radial"===e.gradient.op.direction&&(this.globalGradient="radial-gradient(circle at center, orange, green)")),e.stroke&&(n=t,i=this,"function"==typeof(o=R(A(1&3?n.prototype:n),"setAny",i))?function(e){return o.apply(i,e)}:o)([{globalBlast:"".concat(e.stroke.op.width," ").concat(e.stroke.op.color)}]),e.span&&(e.span.prevText=this.text);var l=[e.stroke,e.gradient,e.animation,e.span,e.backgroundOp,e.layout,e.marginOp,e.shadow,e.animation,e.filtera,s?e.transform:void 0];l=l.filter(function(e){return null!=e});for(var c=0;c<l.length;c++)a.push({range:l[c].range,log:l[c].op.name,target:l[c].target,op:l[c].op});var u=[];e.borderObj&&u.push("border"),e.background&&u.push("background"),e.mar&&u.push("margin"),e.animation&&u.push("animation"),e.span&&u.push("span"),s&&u.push("transform"),e.gradient&&u.push("gradient"),e.blast,console.log("CARA IS "),console.log(a),this.options=e,this.chainReact(a,this.options.id,u)}if(e.centerColumn&&(this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.alignItems="center",e.centerColumn&&(r+="centerColumn: ".concat(e.centerColumn,","))),e.mboth&&(this.res.style.marginRight="auto")&&(this.res.style.marginLeft="auto"),e.mar&&this.mar(e.mar),e.sticky&&this.sticky(),e.transition&&(this.res.style.transition=e.transition),e.class&&this.res.setAttribute("class",e.class),e.ga&&(this.res.style.gridArea=e.ga),e.opacity&&(0==e.opacity&&(this.res.style.opacity=0),e.opacity&&(this.res.style.opacity=e.opacity)),e.maxHeight&&(this.res.style.maxHeight=e.maxHeight),e.id&&this.res.setAttribute("id",e.id),e.arrpad&&this.arrayPadding(e.arrpad.sides,e.arrpad.value),e.arrpad&&(r+="arrpad: {sides: [".concat(e.arrpad.sides.map(function(e){return'"'.concat(e,'"')}).join(", "),'], value: "').concat(e.arrpad.value,'"}, ')),e.arrayMargin&&this.arrayMargin(e.arrayMargin.sides,e.arrayMargin.value),e.arrayMargin&&(r+='\n arrayMargin: {sides: ["'.concat(e.arrayMargin.sides,'"], value: "').concat(e.arrayMargin.value,'"},')),e.center&&this.toCenter(e.center),e.center&&(r+='center: "'.concat(e.center,'",')),e.simpleCenter&&this.simpleCenter(),e.simpleCenter&&(r+='center: "'.concat(e.simpleCenter,'",')),e.filter&&(this.res.style.backdropFilter="blur(3px)"),e.radius&&this.corner(e.radius),e.radius&&(r+='\n radius: "'.concat(e.radius,'",')),e.border&&this.border(e.border),e.simpleBorder&&(this.res.style.border=e.simpleBorder),e.width&&this.width(e.width),e.width&&(r+='\n width: "'.concat(e.width,'",')),e.overflow&&(r+='\n overflow: "'.concat(e.overflow,'",')),e.height&&this.heightNoAuto(e.height),e.height&&(r+='\n height: "'.concat(e.height,'",')),e.align&&this.flexAlign(e.align),e.align&&(r+='\n align: "'.concat(e.align,'",')),e.borderObj&&(this.res.style.border="".concat(e.borderObj.width," solid ").concat(e.borderObj.color),void 0!==e.borderObj.radius&&(this.res.style.borderRadius=e.borderObj.radius)),e.borderObja&&(this.res.style.border="".concat(e.borderObja.width," solid ").concat(e.borderObja.color),void 0!==e.borderObja.radius&&(this.res.style.borderRadius=e.borderObja.radius)),e.font&&this.font(e.font),e.font&&(r+='font: "'.concat(e.font,'",')),e.maxWidth&&this.maxWidth(e.maxWidth),e.flexCenter&&this.flexc(e.flexCenter),e.multipad&&this.makeMultiPad(e.multipad),e.multimargin&&this.makeMultiMargin(e.multimargin),e.color&&this.color(e.color),e.background&&this.background(e.background),e.background&&(r+='background: "'.concat(e.background,'",')),e.weight&&this.weight(e.weight),e.paddings&&this.paddingo(e.paddings),e.area&&this.setArea(e.area),e.area&&(r+='area: "'.concat(e.area,'"')),e.column&&this.makeCol(),e.column&&(r+='\n column: "'.concat(e.column,'",')),e.alignIts&&(this.res.style.background="gray"),e.alignIts&&(this.res.style.alignItems="flex-start"),e.alignIts&&(this.res.style.justifyItems="flex-start"),e.customAlign&&(this.res.style.alignItems=e.customAlign),e.customJustify&&(this.res.style.justifyItems=e.customJustify),e.disp&&(this.res.style.display=e.disp),e.flexDir&&(this.res.style.flexDirection=e.flexDir),e.flexDir&&(this.res.style.display="flex"),e.flexDir&&(r+='\n flexDir: "'.concat(e.flexDir,'",')),e.zIndex&&(this.res.style.zIndex=e.zIndex),e.transform&&"object"===w(e.transform)&&this.reactOnTransform(e.transform),e.name&&(this.name=e.name),e.responsive&&this.rsp(e.responsive),e.stretch){e.stretch&&this.stretch(e.stretch);var h=this.removeQuotesFromFirstWord(JSON.stringify(e.stretch));r+="\n stretch: ".concat(h,",")}for(var d in e)if("margin"===d){var f=e[d];if(Array.isArray(f)&&f.length>0){var p,v=b(f);try{for(v.s();!(p=v.n()).done;){var m=p.value;m.hasOwnProperty("top")&&(this.res.style.marginTop=m.top),m.hasOwnProperty("right")&&(this.res.style.marginRight=m.right),m.hasOwnProperty("bottom")&&(this.res.style.marginBottom=m.bottom),m.hasOwnProperty("left")&&(this.res.style.marginLeft=m.left)}}catch(e){v.e(e)}finally{v.f()}}}return 8===(r+="})\n").length&&(r=""),this.code.push(r),this}},{key:"rsp",value:function(e){var t=this;this.res.style.display="flex";var r=e.sequence.split("-"),n=function(){var n=e.ranges;"0px"!==n[0]&&n.unshift("0px");for(var i=0;i<n.length-1;i++)(window.matchMedia("(min-width: ".concat(n[i],") and (max-width: ").concat(n[i+1],")")).matches||window.matchMedia("(min-width: ".concat(n[n.length-1],")")).matches)&&("row"===r[i]&&(t.res.style.flexDirection="row",t.res.style.border="3px solid green"),"col"===r[i]&&(t.res.style.flexDirection="column",t.res.style.border="3px solid purple"));return t};window.addEventListener("resize",n),n()}},{key:"sticky",value:function(){return this.res.style.position="sticky",this.res.style.top=0,this}},{key:"toSticky",value:function(){return this.res.style.position="sticky",this.res.style.top="0",this}},{key:"stretch",value:function(e){var t=this,r=function(){window.matchMedia("(max-width: ".concat(e.at,")")).matches?t.res.style.width="auto":window.matchMedia("(max-device-width: 415px)").matches?t.res.style.width="100%":t.res.style.width=e.backTo};r(),window.addEventListener("resize",r)}},{key:"makeCol",value:function(){return this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.alignItems="flex-start",this}},{key:"paddingo",value:function(e){return this.res.style.padding=e,this}},{key:"toCenter",value:function(e){return this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.justifyContent="center","both"===e&&(this.res.style.alignItems="center"),this}},{key:"simpleCenter",value:function(){return this.res.style.justifyContent="center",this.res.style.justifyItems="center",this.res.style.alignContent="center",this.res.style.alignItems="center",this}},{key:"color",value:function(e){return this.res.style.color=e,this}},{key:"weight",value:function(e){return this.res.style.fontWeight=e,this}},{key:"makeMultiPad",value:function(e){for(var t=0;t<e.length;t++)"left"===e[t].side&&(this.res.style.paddingLeft=e[t].value),"right"===e[t].side&&(this.res.style.paddingRight=e[t].value);return this}},{key:"makeMultiMargin",value:function(e){this.res.style.zIndex="1";for(var t=0;t<e.length;t++)"left"===e[t].side&&(this.res.style.marginLeft=e[t].value),"right"===e[t].side&&(this.res.style.marginRight=e[t].value),"top"===e[t].side&&(this.res.style.marginTop=e[t].value),"bottom"===e[t].side&&(this.res.style.marginBottom=e[t].value);return this}},{key:"flexc",value:function(e){return this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.justifyContent="center",this}},{key:"maxWidth",value:function(e){return this.res.style.maxWidth=e,this}},{key:"font",value:function(e){return this.res.style.fontFamily=e,this}},{key:"flexAlign",value:function(e){return this.res.style.display="flex",this.res.style.justifyContent="flex-start",this.res.style.alignItems="flex-start","center"===e?(this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.alignItems="center",this):this}},{key:"width",value:function(e){return this.res.style.width=e,this}},{key:"heightNoAuto",value:function(e){return this.res.style.height=e,this}},{key:"border",value:function(e){return this.res.style.borderRadius="".concat(e.radius,"px"),this.res.style.padding="0.25em",this.res.style.border="".concat(e.width,"px solid ").concat(e.color),this}},{key:"toCol",value:function(){return this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.justifyContent="center",this.res.style.alignItems="center",this}},{key:"add",value:function(e){this.items=e,this.code.push(".add([ \n");var t=e.map(function(t,r){return t.toCode().flatMap(function(e){return e}).join("")+(r<e.length-1?",":"")}).join("");this.code.push(t);for(var r=0;r<e.length;r++)if(void 0!==e[r]&&void 0!==e[r].toCode){var n=e[r].render();this.res.appendChild(n)}return this.code.push("])"),this}},{key:"arrayPadding",value:function(e,t){return e.includes("left")&&(this.res.style.paddingLeft=t),e.includes("right")&&(this.res.style.paddingRight=t),e.includes("top")&&(this.res.style.paddingTop=t),e.includes("bottom")&&(this.res.style.paddingBottom=t),this}},{key:"arrayMargin",value:function(e,t){return t||(this.res.style.marginLeft="".concat(e[0],"px"),this.res.style.marginTop="".concat(e[1],"px"),this.res.style.marginRight="".concat(e[2],"px"),this.res.style.marginBottom="".concat(e[3],"px")),e.includes("left")&&(this.res.style.marginLeft=t),e.includes("right")&&(this.res.style.marginRight=t),e.includes("top")&&(this.res.style.marginTop=t),e.includes("bottom")&&(this.res.style.marginBottom=t),this}},{key:"setWidth",value:function(e){this.res.style.width="100vw"}},{key:"setHeight",value:function(e){return this.res.style.height="".concat(e),this}},{key:"setup",value:function(e){var t=null;return e?(e.isLink&&(t=document.createElement("a")),"aside"===e&&(t=document.createElement("aside")),"article"===e&&(t=document.createElement("article")),"main"===e&&(t=document.createElement("main")),"section"===e&&(t=document.createElement("section")),"header"===e&&(t=document.createElement("header")),"footer"===e&&(t=document.createElement("footer"))):t=document.createElement("div"),e&&e.isLink&&(t.style.textDecoration="none",t.setAttribute("href",e.child)),this.res=t,this.res.style.margin=0,this.res.style.padding=0,e&&!0===e.hideOverflow&&(this.res.style.overflow="hidden",this.res.style.overflowY="scroll"),e&&!0===e.center&&(this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.justifyContent="center",this.res.style.alignItems="center"),e&&"left"===e.align&&(this.res.style.alignItems="flex-start"),e&&"right"===e.align&&(this.res.style.alignItems="flex-end"),e&&e.height&&(this.res.style.height=e.height),e&&e.width&&(this.res.style.width=e.width,this.res.style.marginLeft="auto",this.res.style.marginRight="auto",window.matchMedia("(max-device-width: 415px)").matches&&(this.res.style.width="95%")),this}},{key:"height",value:function(e){return this.res.style.width="auto",this.res.style.height="".concat(e),this}},{key:"size",value:function(e,t){return this.w=e,this.h=t,this.w?this.res.style.width=this.w:this.res.style.width=window.innerWidth,this.h?this.res.style.height=this.h:this.res.style.height=window.innerHeight,this}},{key:"background",value:function(e){return this.res.style.background=e,this}},{key:"corner",value:function(e){return this.res.style.borderRadius=e,this}},{key:"padding",value:function(e,t,r,n){return this.res.style.paddingLeft=e,this.res.style.paddingTop=t,this.res.style.paddingRight=r,this.res.style.paddingBottom=n,this}},{key:"margin",value:function(e,t,r,n){return this.res.style.marginLeft=e,this.res.style.marginTop=t,this.res.style.marginRight=r,this.res.style.marginBottom=n,this}},{key:"itemWidth",value:function(e){for(var t=0;t<this.res.childNodes.length;t++)this.res.childNodes[t].style.width=e;return this}},{key:"apply",value:function(e){var t=this,r=function(){for(var r=0;r<e.length;r++){var n=e[r],i=window.matchMedia("(max-width: ".concat(n.width,"px)"));n.device&&(i=window.matchMedia("(max-device-width: ".concat(n.width,"px)")),alert(n.device)),i.matches&&Object.assign(t.res.style,n.styles)}},n=window.matchMedia("(max-width: ".concat(e[0].width,"px)"));return e[0].device&&(n=window.matchMedia("(max-device-width: ".concat(e[0].width,"px)"))),n.matches||Object.assign(this.res.style,e[0].styles),r(),window.addEventListener("resize",r),this}},{key:"mount",value:function(e){document.querySelector(e).appendChild(this.res)}},{key:"render",value:function(e){return e?(document.querySelector("#mount"),document.querySelector(e).appendChild(this.res),this):this.res}}],n&&E(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(function(){return e=function e(){var t,r,n,i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=this,n=function(e){if(console.log("LOBJO IS"),console.log("REPO"),console.log(i.res),console.log(e),e.transform||e.op){console.log("SIMPLIFIED"),console.log(e.transform),console.log(e.op);var t=e.op;e.transform||(t=e.op),t.duration||(t.duration="3s-ease-in-out"),console.log("ENTERING"),console.log(t),i.setDefault=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0px";return 0===e.length?t+" ":e};var r=function(){var r="",n="",o="",a="",s="",l="",c="",u="",h="";if(console.log("ERRA - still nested"),console.log(t),0!==t.values.length){console.warn(t),t.values.forEach(function(e){e.startsWith("tx:")&&(r=e.replace("tx:","")),e.startsWith("ty:")&&(n=e.replace("ty:","")),e.startsWith("tz:")?o=e.replace("tz:",""):e.startsWith("scale(")?a=e:e.startsWith("skew(")?s=e:e.startsWith("rotate(")?l=function(e){var t=e.match(/rotate\(([^)]+)\)/);if(!t)return e;var r=t[1].split(",").map(function(e){return e.trim()});return 1===r.length?"rotate(".concat(r[0],")"):2===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],")"):3===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],") rotate(").concat(r[2],")"):e}(e):e.startsWith("perspective(")?c=e:e.startsWith("matrix(")?u=e:e.startsWith("opacity:")&&(h=e.replace("opacity:",""))}),r=i.setDefault(r),n=i.setDefault(n),o=i.setDefault(o);var d="";if("0px"!=n&&"0px"!=r&&"0px"!=o?d+="translate3d(".concat(r,", ").concat(n,", ").concat(o,")"):"0px"==n&&"0px"==r||(d+="translate(".concat(r,", ").concat(n,")")),a&&(d+=" ".concat(a)),l&&(d+=" ".concat(l)),s&&(d+=" ".concat(s)),c&&(d+=" ".concat(c)),u&&(d+=" ".concat(u)),d){if(e.op.duration){var f=e.op.duration.replace(/^(\d+)(s)-/,function(e,t,r){return t/2+r+" "}),p="transform ".concat(f,", opacity ").concat(f);i.res.style.transition=p}else i.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";e.op.static&&(i.res.style.transition=""),(i.blastTarget||i.res).style.transform=d,i.res.style.opacity=h}else alert("OPE")}};t.on?i.res.addEventListener(t.on,function(){t.delay?setTimeout(function(){r()},t.delay):r()}):window.addEventListener("load",function(){t.delay?setTimeout(function(){r()},t.delay):r()});var n=function(){var e="";console.log("RESET"),console.log(t),t.values.forEach(function(t){t.startsWith("tx:")?e+="translateX(0) ":t.startsWith("ty:")?e+="translateY(0) ":t.startsWith("tz:")?e+="translateZ(0) ":t.startsWith("scale(")?e+="scale(1) ":t.startsWith("skew(")?e+="skew(0, 0) ":t.startsWith("rotate(")?e+="rotate(0) ":t.startsWith("perspective(")?e+="perspective(0) ":t.startsWith("matrix(")&&(e+="matrix(1, 0, 0, 1, 0, 0) "),i.res.style.opacity="1"}),e&&(i.res.style.transform=e.trim())};if(t.on)i.res.addEventListener("mouseout",function(){t.keep||n()});else{var o=1e3*parseFloat(t.duration),a=t.closeAfter?t.closeAfter:0;setTimeout(function(){t.keep||n()},o/2+a)}t.hardCSS&&(i.res.style.transform=t.hardCSS)}else alert("THIS FIRE WITH GRADIENT (invalid block"),console.log("INVALID BLOCKA"),console.log(e)},(r=x(r="reactOnTransform"))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,this.state={isExpanded:!1,isMovedUp:!1,isMovedDown:!1},this.openedElements=new WeakMap,"undefined"!=typeof document&&(this._themeUnsub=o.subscribe(function(e){return i._applyTheme(e)}),Promise.resolve().then(function(){return i._applyTheme(o.mode)}))},t=[{key:"rasterize",value:function(e){var t=this;if(e&&0!==e.length&&!this._rasterHandle&&"undefined"!=typeof document&&"undefined"!=typeof setTimeout){var r=0,n=function(){if(!t._rasterHandle){if(t.res&&t.res.isConnected){try{t._rasterHandle=function(e,t){if(!e||"undefined"==typeof document||"undefined"==typeof window)return null;if(!t||0===t.length)return null;if("function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)return null;if(e.querySelector&&e.querySelector(":scope > canvas[data-nodality-raster]"))return null;var r=function(){var t=e.getBoundingClientRect();return{width:Math.max(t.width,e.scrollWidth||0),height:Math.max(t.height,e.scrollHeight||0)}},n=r();if(n.width<2||n.height<2)return null;var i=Math.min(window.devicePixelRatio||1,2),o=t.some(function(e){return(u[e.op]||{}).overlay}),l=t.every(function(e){return(u[e.op]||{}).overlay}),c=!l&&!t.some(function(e){return!1===e.live}),h="undefined"!=typeof WebGL2RenderingContext&&"texElementImage2D"in WebGL2RenderingContext.prototype||"undefined"!=typeof WebGLRenderingContext&&"texElementImage2D"in WebGLRenderingContext.prototype,f=c&&h;c&&!f&&console.info("[nodality] HTML-in-Canvas API not available - raster ops fall back to snapshot capture.");var p=document.createElement("canvas");f&&p.setAttribute("layoutsubtree","");var v={alpha:!0,premultipliedAlpha:!1},m=p.getContext("webgl2",v)||p.getContext("webgl",v);if(!m)return null;var y="undefined"!=typeof WebGL2RenderingContext&&m instanceof WebGL2RenderingContext,g=y&&t.some(function(e){return(u[e.op]||{}).mips});f&&!("texElementImage2D"in m)&&(console.info("[nodality] texElementImage2D missing on the created context - snapshot fallback."),p.removeAttribute("layoutsubtree"),f=!1),"static"===window.getComputedStyle(e).position&&(e.style.position="relative"),p.width=Math.round(n.width*i),p.height=Math.round(n.height*i),p.setAttribute("data-nodality-raster",f?"live":"snapshot"),console.info("[nodality] raster backend:",f?"html-in-canvas (live)":"snapshot");var x=e;if(f){for(var b=document.createElement("div");e.firstChild;)b.appendChild(e.firstChild);p.appendChild(b),x=b,p.style.cssText="display:block;width:".concat(n.width,"px;height:").concat(n.height,"px;")}else p.style.cssText="position:absolute;top:0;left:0;"+"width:".concat(n.width,"px;height:").concat(n.height,"px;")+"pointer-events:none;z-index:2147483000;",p.setAttribute("aria-hidden","true");e.appendChild(p);var w=function(e,t){var r=m.createShader(e);if(m.shaderSource(r,t),m.compileShader(r),!m.getShaderParameter(r,m.COMPILE_STATUS))throw new Error("[nodality] raster shader: "+m.getShaderInfoLog(r));return r},k=m.createProgram();m.attachShader(k,w(m.VERTEX_SHADER,d)),m.attachShader(k,w(m.FRAGMENT_SHADER,function(e){var t="",r="",n="",i="",o="";e.forEach(function(e,a){var s=u[e.op];if(s){var l="u".concat(a,"_");t+=s.decl(l,e)+"\n",(Array.isArray(s.stage)?s.stage:[s.stage]).forEach(function(t){var a=s.code(l,e,t)+"\n";"warp"===t?r+=a:"cell"===t?n+=a:"displace"===t?i+=a:o+=a})}});var a=e.some(function(e){return"edges"===e.op})?"":" col *= 1.0 - edge * 0.55;";return"\nprecision highp float;\nuniform sampler2D u_tex;\nuniform vec2 u_res;\nuniform vec2 u_mouse;\nuniform float u_time;\n".concat(t,"\nvoid main() {\n vec2 frag = vec2(gl_FragCoord.x, u_res.y - gl_FragCoord.y);\n vec2 warped = frag;\n").concat(r,"\n vec2 center = warped;\n float edge = 0.0;\n").concat(n,"\n vec2 sampleP = warped;\n").concat(i,"\n vec2 uv = vec2(sampleP.x / u_res.x, 1.0 - sampleP.y / u_res.y);\n vec4 tex = texture2D(u_tex, clamp(uv, 0.001, 0.999));\n vec3 col = tex.rgb;\n vec3 edgeCol = vec3(1.0);\n float edgeCov = 0.0;\n vec3 ovCol = vec3(0.0);\n float ovA = 0.0;\n").concat(o,"\n").concat(a,"\n // content OVER border\n float baseA = tex.a + edgeCov * (1.0 - tex.a);\n vec3 baseRGB = (col * tex.a + edgeCol * edgeCov * (1.0 - tex.a)) / max(baseA, 1e-4);\n // overlay OVER (content+border)\n float outA = ovA + baseA * (1.0 - ovA);\n vec3 outRGB = (ovCol * ovA + baseRGB * baseA * (1.0 - ovA)) / max(outA, 1e-4);\n gl_FragColor = vec4(outRGB, outA);\n}")}(t))),m.bindAttribLocation(k,0,"a"),m.linkProgram(k),m.useProgram(k),m.bindBuffer(m.ARRAY_BUFFER,m.createBuffer()),m.bufferData(m.ARRAY_BUFFER,new Float32Array([-1,-1,3,-1,-1,3]),m.STATIC_DRAW),m.enableVertexAttribArray(0),m.vertexAttribPointer(0,2,m.FLOAT,!1,0,0);var _=function(e){return m.getUniformLocation(k,e)},E=function(e,t,r){"1f"===t?m.uniform1f(e,r):"1i"===t?m.uniform1i(e,r):"2fv"===t?m.uniform2fv(e,r):"3fv"===t&&m.uniform3fv(e,r)};t.forEach(function(e,t){var r=u[e.op];if(r&&r.uniforms){var n=r.uniforms(e,i);for(var o in n)E(_("u".concat(t,"_").concat(o)),n[o][0],n[o][1])}});var T=[];t.forEach(function(e,t){var r=u[e.op];r&&"function"==typeof r.init&&T.push({i:t,def:r,state:r.init(e,i,p.width,p.height)})});var S="undefined"!=typeof performance?performance.now():0,R=[];t.forEach(function(e,t){var r=u[e.op];if(r&&r.solver){var n=function(e,t){var r=u[e.op];if(!y||!m.getExtension("EXT_color_buffer_float"))return console.info("[nodality] '"+e.op+"' needs WebGL2 float render targets - op skipped."),null;m.getExtension("OES_texture_float_linear");var n=r.solver.resolutions(e),i={r:[m.R16F,m.RED],rg:[m.RG16F,m.RG],rgba:[m.RGBA16F,m.RGBA]},o=[],s=function(e,t,r){var n=a(i[t],2),s=n[0],l=n[1],c=m.createTexture();m.bindTexture(m.TEXTURE_2D,c);var u=r?m.LINEAR:m.NEAREST;m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,u),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MAG_FILTER,u),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_S,m.CLAMP_TO_EDGE),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_T,m.CLAMP_TO_EDGE),m.texImage2D(m.TEXTURE_2D,0,s,e,e,0,l,m.HALF_FLOAT,null);var h=m.createFramebuffer();m.bindFramebuffer(m.FRAMEBUFFER,h),m.framebufferTexture2D(m.FRAMEBUFFER,m.COLOR_ATTACHMENT0,m.TEXTURE_2D,c,0);var d=m.checkFramebufferStatus(m.FRAMEBUFFER)===m.FRAMEBUFFER_COMPLETE;m.viewport(0,0,e,e),m.clearColor(0,0,0,1),m.clear(m.COLOR_BUFFER_BIT);var f={tex:c,fbo:h,size:e,ok:d};return o.push(f),f},l={},c=!0;for(var h in r.solver.targets){var f=r.solver.targets[h],p=n[f.res];f.double?(l[h]={a:s(p,f.fmt,f.smooth),b:s(p,f.fmt,f.smooth)},c=c&&l[h].a.ok&&l[h].b.ok):(l[h]={a:s(p,f.fmt,f.smooth)},c=c&&l[h].a.ok)}m.bindFramebuffer(m.FRAMEBUFFER,null);var v=function(){return o.forEach(function(e){m.deleteFramebuffer(e.fbo),m.deleteTexture(e.tex)})};if(!c)return console.info("[nodality] '"+e.op+"' float targets incomplete - op skipped."),v(),null;var g={};try{for(var x in r.solver.programs){var b=m.createProgram();if(m.attachShader(b,w(m.VERTEX_SHADER,d)),m.attachShader(b,w(m.FRAGMENT_SHADER,r.solver.programs[x])),m.bindAttribLocation(b,0,"a"),m.linkProgram(b),!m.getProgramParameter(b,m.LINK_STATUS))throw new Error(x+": "+m.getProgramInfoLog(b));g[x]={prog:b,loc:{}}}}catch(t){for(var _ in console.warn("[nodality] '"+e.op+"' solver programs failed:",t),v(),g)m.deleteProgram(g[_].prog);return null}return m.useProgram(k),{i:t,node:e,def:r,res:n,targets:l,progs:g,cleanup:v,prevX:.5,prevY:.5,primed:!1}}(e,t);n&&R.push(n)}});var A=function(e,t){var r=null,n={res:e.res,use:function(t){r=e.progs[t],m.useProgram(r.prog)},u:function(e){return e in r.loc||(r.loc[e]=m.getUniformLocation(r.prog,e)),r.loc[e]},f1:function(e,t){m.uniform1f(n.u(e),t)},f2:function(e,t,r){m.uniform2f(n.u(e),t,r)},f3:function(e,t,r,i){m.uniform3f(n.u(e),t,r,i)},smp:function(e,t,r){m.activeTexture(m.TEXTURE0+r),m.bindTexture(m.TEXTURE_2D,t.tex),m.uniform1i(n.u(e),r)},read:function(t){return e.targets[t].a},write:function(t){return e.targets[t].b},single:function(t){return e.targets[t].a},swap:function(t){var r=e.targets[t],n=r.a;r.a=r.b,r.b=n},blit:function(e){m.bindFramebuffer(m.FRAMEBUFFER,e.fbo),m.viewport(0,0,e.size,e.size),m.drawArrays(m.TRIANGLES,0,3)}},i=B[0]/p.width,o=1-B[1]/p.height,a=0,s=0;e.primed&&(a=(i-e.prevX)/Math.max(t,.001),s=(o-e.prevY)/Math.max(t,.001)),e.prevX=i,e.prevY=o,e.primed=!0;var l=Math.abs(a)+Math.abs(s)>.001;e.def.solver.step(n,e.node,{dt:t,px:i,py:o,dx:a,dy:s,moving:l,aspect:p.width/Math.max(p.height,1),col:e.def.solver.splatColor(e.node,a,s)})},C=m.createTexture();m.bindTexture(m.TEXTURE_2D,C),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_MIN_FILTER,g?m.LINEAR_MIPMAP_LINEAR:m.LINEAR),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_S,m.CLAMP_TO_EDGE),m.texParameteri(m.TEXTURE_2D,m.TEXTURE_WRAP_T,m.CLAMP_TO_EDGE),m.pixelStorei(m.UNPACK_FLIP_Y_WEBGL,!0);var M=function(){g&&m.generateMipmap(m.TEXTURE_2D)},D=!1,O=!1,I=f?"live":"snapshot",F=!1,L=function(){if(o){var t=function(){var t="IMG"===e.tagName?e:e.querySelector?e.querySelector("img"):null;return t&&t.complete&&t.naturalWidth>0?t:null}();if(t)try{return m.bindTexture(m.TEXTURE_2D,C),m.texImage2D(m.TEXTURE_2D,0,m.RGBA,m.RGBA,m.UNSIGNED_BYTE,t),M(),D=!0,Promise.resolve()}catch(e){}else if(!F){var r="IMG"===e.tagName?e:e.querySelector&&e.querySelector("img");r&&(F=!0,r.addEventListener("load",function(){O||L()},{once:!0}))}}p.style.display="none";var a=e.style.visibility;e.style.visibility="";var s=function(e,t,r,n){return new Promise(function(i,o){var a=(new XMLSerializer).serializeToString(e),s='<svg xmlns="http://www.w3.org/2000/svg" width="'.concat(t*n,'" height="').concat(r*n,'" viewBox="0 0 ').concat(t," ").concat(r,'">')+'<foreignObject width="100%" height="100%">'+'<div xmlns="http://www.w3.org/1999/xhtml">'.concat(a,"</div>")+"</foreignObject></svg>",l=new Image;l.onload=function(){return i(l)},l.onerror=o,l.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(s)})}(e,n.width,n.height,i).then(function(t){O||(m.bindTexture(m.TEXTURE_2D,C),m.texImage2D(m.TEXTURE_2D,0,m.RGBA,m.RGBA,m.UNSIGNED_BYTE,t),M(),D=!0,e.style.visibility=l?"":"hidden",p.style.visibility="visible")}).catch(function(t){e.style.visibility=a,console.warn("[nodality] raster snapshot failed:",t)});return p.style.display="",s},j=-1,P=function(){if(!O&&"live"===I){m.bindTexture(m.TEXTURE_2D,C);var e,t=m.RGBA8||32856,r=[[m.TEXTURE_2D,t,x],[m.TEXTURE_2D,0,m.RGBA,m.RGBA,m.UNSIGNED_BYTE,x],[m.TEXTURE_2D,0,t,x],[m.TEXTURE_2D,0,x]];if(j>=0)e=[j];else{e=[0,1,2,3];var n={3:0,6:1,4:2}[m.texElementImage2D.length];null!=n&&(e.splice(e.indexOf(n),1),e.unshift(n))}var i,o=[],a=s(e);try{for(a.s();!(i=a.n()).done;){var l=i.value;try{return m.texElementImage2D.apply(m,r[l]),M(),j<0&&(j=l,console.info("[nodality] texElementImage2D signature discovered: form",l,"(declared arity "+m.texElementImage2D.length+")")),void(D=!0)}catch(e){o.push("form"+l+" -> "+(e&&e.name?e.name:"?")+": "+(e&&e.message?e.message:e))}}}catch(e){a.e(e)}finally{a.f()}W("texElementImage2D rejected all known signatures (arity "+m.texElementImage2D.length+"): "+o.join(" | "))}},W=function(t){if(!O&&"live"===I){for(I="snapshot",console.warn("[nodality] live raster backend failed ("+t+") - falling back to snapshot."),p.removeEventListener("paint",P);x.firstChild;)e.appendChild(x.firstChild);x.parentNode===p&&p.removeChild(x),p.removeAttribute("layoutsubtree"),p.style.cssText="position:absolute;top:0;left:0;"+"width:".concat(n.width,"px;height:").concat(n.height,"px;")+"pointer-events:none;z-index:2147483000;",p.setAttribute("aria-hidden","true"),p.setAttribute("data-nodality-raster","snapshot-fallback"),L()}};f&&(p.addEventListener("paint",P),setTimeout(function(){O||"live"!==I||D||W("no paint event within 1500ms")},1500));var B=[.5*p.width,.5*p.height],U=function(e){var t=p.getBoundingClientRect(),r=e.touches?e.touches[0]:e;B=[(r.clientX-t.left)*i,(r.clientY-t.top)*i]};e.addEventListener("mousemove",U,{passive:!0}),e.addEventListener("touchmove",U,{passive:!0});var z=0,N=!0,G=function(){if(!O){if(N&&D){for(var e="undefined"!=typeof performance?performance.now():S+16,t=Math.max(0,(e-S)/1e3),r=0,n=R;r<n.length;r++){var i=n[r];A(i,t)}if(m.bindFramebuffer(m.FRAMEBUFFER,null),m.useProgram(k),m.viewport(0,0,p.width,p.height),m.clearColor(0,0,0,0),m.clear(m.COLOR_BUFFER_BIT),m.uniform2f(_("u_res"),p.width,p.height),m.uniform2f(_("u_mouse"),B[0],B[1]),m.uniform1f(_("u_time"),e/1e3),T.length>0)for(var o={w:p.width,h:p.height,mouseX:B[0],mouseY:B[1],dt:t,t:e/1e3},a=0,l=T;a<l.length;a++){var c,u=l[a],h=s(u.def.tick(u.state,o));try{for(h.s();!(c=h.n()).done;){var d=c.value;E(_("u".concat(u.i,"_").concat(d.name)),d.kind,d.value)}}catch(e){h.e(e)}finally{h.f()}}m.activeTexture(m.TEXTURE0),m.bindTexture(m.TEXTURE_2D,C),m.uniform1i(_("u_tex"),0);for(var f=1,v=0,y=R;v<y.length;v++){var g=y[v],x=g.def.solver.samplers;for(var b in x)m.activeTexture(m.TEXTURE0+f),m.bindTexture(m.TEXTURE_2D,g.targets[x[b]].a.tex),m.uniform1i(_("u".concat(g.i,"_").concat(b)),f),f++}m.activeTexture(m.TEXTURE0),S=e,m.drawArrays(m.TRIANGLES,0,3)}z=requestAnimationFrame(G)}},X=null;"undefined"!=typeof IntersectionObserver&&(X=new IntersectionObserver(function(e){var t=a(e,1)[0];N=t.isIntersecting})).observe(e);var H=null,q=0;"undefined"!=typeof ResizeObserver&&(H=new ResizeObserver(function(){clearTimeout(q),q=setTimeout(function(){if(!O&&"snapshot"===I){var e=r();n.width=e.width,n.height=e.height,p.width=Math.round(e.width*i),p.height=Math.round(e.height*i),p.style.width=e.width+"px",p.style.height=e.height+"px",L()}},150)})).observe(e);var Y=0,V=function(){clearTimeout(Y),Y=setTimeout(function(){if(!O){if("snapshot"===I){var t=r();return n.width=t.width,n.height=t.height,p.width=Math.round(t.width*i),p.height=Math.round(t.height*i),p.style.width=t.width+"px",p.style.height=t.height+"px",void L()}var o=e.clientWidth||e.parentElement&&e.parentElement.clientWidth||n.width;p.style.width=o+"px",setTimeout(function(){if(!O&&"live"===I){var e=Math.max(2,Math.round(x.getBoundingClientRect().height))||n.height;n.width=o,n.height=e,p.style.height=e+"px",p.width=Math.round(o*i),p.height=Math.round(e*i),P()}},50)}},150)};return"undefined"!=typeof window&&window.addEventListener("resize",V),"live"===I?z=requestAnimationFrame(G):L().then(function(){z=requestAnimationFrame(G)}),{canvas:p,refresh:function(){return"live"===I?P():L()},destroy:function(){O=!0,cancelAnimationFrame(z),clearTimeout(q),clearTimeout(Y),X&&X.disconnect(),H&&H.disconnect(),"undefined"!=typeof window&&window.removeEventListener("resize",V),e.removeEventListener("mousemove",U),e.removeEventListener("touchmove",U),p.removeEventListener("paint",P);for(var t=0,r=R;t<r.length;t++){var n=r[t];for(var i in n.cleanup(),n.progs)m.deleteProgram(n.progs[i].prog)}for(R.length=0;x!==e&&x.firstChild;)e.appendChild(x.firstChild);e.style.visibility="",p.remove()}}}(t.res,e)}catch(e){return void console.warn("[nodality] raster pipeline skipped:",e)}if(t._rasterHandle)return}++r<80&&setTimeout(n,50)}};setTimeout(n,0)}}},{key:"isHidden",value:function(e){e&&(this.res.style.display="none")}},{key:"theme",value:function(e){var t=this;return e&&"object"===y(e)?(this._themeMap=e,this._applyTheme(o.mode),this._themeUnsub||(this._themeUnsub=o.subscribe(function(e){return t._applyTheme(e)})),this):this}},{key:"destroy",value:function(){return"function"==typeof this._themeUnsub&&(this._themeUnsub(),this._themeUnsub=null),this.res&&this.res.parentNode&&this.res.parentNode.removeChild(this.res),this}},{key:"_applyTheme",value:function(e){if(!this._noTheme&&this.res)if(this._themeMap){var t=this._themeMap[e];if(!t)return;for(var r in t)this.res.style[r]=t[r]}else{var n=o.defaults&&o.defaults[e];if(n)for(var i in this._themeOriginal||(this._themeOriginal={}),n)i in this._themeOriginal||(this._themeOriginal[i]=this.res.style[i]||""),this._themeOriginal[i]||(this.res.style[i]=n[i])}}},{key:"keySet",value:function(e){if(this.temporaryVal=1,Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]&&null!=e[t].key&&(this.res.style[e[t].key]=e[t].value);return this}return this.res.style[e.key]=e.value,this}},{key:"commonMethods",value:function(e){var t={exact:"fontSize",cursor:"cursor",width:"width",maxWidth:"maxWidth",height:"height",maxHeight:"maxHeight",radius:"borderRadius",lineHeight:"lineHeight",background:"background",font:"fontFamily",opacity:"opacity",gap:"gap",minHeight:"minHeight",position:"position",inset:"inset",top:"top",right:"right",bottom:"bottom",left:"left",zIndex:"zIndex",flex:"flex",flexShrink:"flexShrink",flexGrow:"flexGrow",flexBasis:"flexBasis",flexWrap:"flexWrap",alignSelf:"alignSelf",display:"display",gridTemplateColumns:"gridTemplateColumns",gridTemplateRows:"gridTemplateRows",rowGap:"rowGap",columnGap:"columnGap",letterSpacing:"letterSpacing",textTransform:"textTransform",whiteSpace:"whiteSpace",overflowWrap:"overflowWrap",wordBreak:"wordBreak",wordWrap:"wordWrap",boxShadow:"boxShadow",backdropFilter:"backdropFilter",WebkitBackdropFilter:"WebkitBackdropFilter",overflow:"overflow",overflowX:"overflowX",overflowY:"overflowY",WebkitOverflowScrolling:"WebkitOverflowScrolling",WebkitTapHighlightColor:"WebkitTapHighlightColor",minWidth:"minWidth",boxSizing:"boxSizing",pointerEvents:"pointerEvents",userSelect:"userSelect",WebkitUserSelect:"WebkitUserSelect",textAlign:"textAlign",transition:"transition"};for(var r in t)null!=e[r]&&(this.res.style[t[r]]=e[r]);return"string"==typeof e.transform&&(this.res.style.transform=e.transform),e.pad&&this.pad(e.pad),e.mar&&this.mar(e.mar),e.respad&&this.respad(e.respad),e.resmar&&this.resmar(e.resmar),e.hover&&this.hover(e.hover),e.size&&this.fluidCopy(e.size),e.resprop&&this.resprop(e.resprop,e),e.keySet&&this.keySet(e.keySet),e.noTheme&&(this._noTheme=!0),e.theme&&this.theme(e.theme),e.hide&&this.isHidden(e.hide),e.raster&&this.rasterize(e.raster),e.transform&&"object"===y(e.transform)&&this.reactOnTransform(e.transform),void 0!==e.opacity&&(this.res.style.opacity=e.opacity),e.bold?this.res.style.fontWeight="bold":null!=e.weight&&(this.res.style.fontWeight=e.weight),this}},{key:"hover",value:function(e){var t=this;if(e.border){var r=e.border.width;this.res.style.border=r?"".concat(r,"px solid transparent"):"1px solid transparent"}var n=this.options&&this.options.borderObj;return n&&(this.res.style.border="".concat(n.width,"px solid ").concat(n.color)),this.prevColor=this.res.style.backgroundColor,this.foreColor=this.res.style.color,this.prevBorder=this.res.style.border,this.prevBoxShadow=this.res.style.boxShadow,e.animation&&(this.res.style.transition="".concat(e.animation),this.res.style.transionProperty="background, color, transform"),this.prevTransform=this.res.style.transform,this.res.onmouseout=function(){t.res.style.backgroundColor="".concat(t.prevColor),t.res.style.color="".concat(t.foreColor),t.res.style.border=t.prevBorder,null==e.scale&&null==e.transform||(t.res.style.transform=t.prevTransform||""),null!=e.boxShadow&&(t.res.style.boxShadow=t.prevBoxShadow||"")},this.res.onmouseover=function(){if(t.res.style.color=e.color,t.res.style.backgroundColor=e.background,e.border){var r,n=e.border.width,i=null!==(r=e.border.color)&&void 0!==r?r:"#2ECC71";t.res.style.border=n?"".concat(n,"px solid ").concat(i):"1px solid #2ECC71"}if(null!=e.scale||null!=e.transform){var o=t.prevTransform?"".concat(t.prevTransform," "):"",a=[];null!=e.transform&&a.push(e.transform),null!=e.scale&&a.push("scale(".concat(e.scale,")")),t.res.style.transform="".concat(o).concat(a.join(" "))}null!=e.boxShadow&&(t.res.style.boxShadow=e.boxShadow)},this}},{key:"onScroll",value:function(e){var t=this,r=function(e){if(null==e)return{num:0,unit:"px"};var t=String(e).match(/^(-?[\d.]+)(.*)$/);return t?{num:parseFloat(t[1]),unit:t[2]||"px"}:{num:0,unit:"px"}},n=function(e){var r=e&&null!=e.tx?e.tx:"0px",n=e&&null!=e.ty?e.ty:"0px";t.res.style.transform="translate3d(".concat(r,", ").concat(n,", 0)")};"opacity"===e.value?this.res.style.opacity=e.valMin:"scale"===e.value?this.res.style.transform="scale(".concat(e.valMin,")"):"trn"===e.value&&n(e.valMin);var i=function(){if("trn"!==e.value){var i=t.smartRange(window.scrollY,{min:e.from,max:e.to},{min:e.valMin,max:e.valMax});"opacity"===e.value?t.res.style.opacity=i:"scale"===e.value&&(t.res.style.transform="scale(".concat(i,")"))}else{for(var o={},a=["tx","ty"],s=0;s<a.length;s++){var l=a[s],c=e.valMin&&null!=e.valMin[l],u=e.valMax&&null!=e.valMax[l];if(c||u){var h=r(c?e.valMin[l]:u?e.valMax[l]:"0px"),d=r(u?e.valMax[l]:c?e.valMin[l]:"0px"),f=t.smartRange(window.scrollY,{min:e.from,max:e.to},{min:h.num,max:d.num});o[l]="".concat(f).concat(h.unit)}}n(o)}};window.addEventListener("scroll",i),0===e.from&&i()}},{key:"setAny",value:function(e){this[Object.keys(e)[0]]=[Object.values(e)[0]]}},{key:"setID",value:function(e){this.id=e}},{key:"setPrevText",value:function(e){this.prevText=e}},{key:"getCSS",value:function(){return this.css}},{key:"getPX",value:function(e){return{xs:"0px",sm:"576px",md:"768px",lg:"992px",xl:"1200px",xxl:"1400px",mxxl:"1800px"}[e]||"Invalid breakpoint"}},{key:"_setupResponsiveManager",value:function(){var e=this;this._responsiveTasks=this._responsiveTasks||[];var t=function(){e._responsiveTasks.forEach(function(e){e()})};this._responsiveHandler||(this._responsiveHandler=t,window.addEventListener("resize",t)),setTimeout(function(){t()},0)}},{key:"resprop",value:function(e,t){var r=this;this.options=t;var n={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]},i=["resprop","breakpoint","value","values","range"];e.forEach(function(e){void 0!==n[e.breakpoint]?e.range=n[e.breakpoint]:Array.isArray(e.breakpoint)&&2===e.breakpoint.length?e.range=[parseInt(e.breakpoint[0],10),parseInt(e.breakpoint[1],10)]:e.range=[0,parseInt(e.breakpoint,10)]}),e.sort(function(e,t){return e.range[1]-t.range[1]});var o=e.find(function(e){return"default"===e.breakpoint});for(var a in o||(o={breakpoint:"default",range:n.default},e.unshift(o)),this.prevStyles={},this.res.style)this.res.style.hasOwnProperty(a)&&isNaN(parseInt(a))&&(this.prevStyles[a]=this.res.style[a]);var s=new Set;e.forEach(function(e){Object.keys(e).forEach(function(e){i.includes(e)||"range"===e||s.add(e)})}),s.forEach(function(e){void 0===o[e]&&(o[e]=r.options[e]||"initial")}),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var t=window.innerWidth,n=o,a=0;a<e.length;a++){var l=e[a],c=p(l.range,2),u=c[0],h=c[1];if("default"!==l.breakpoint&&t>=u&&t<=h){n=l;break}}for(var d in s.forEach(function(e){if("keySet"===e){var t=o[e];t&&t.key&&(r.res.style[t.key]=t.value)}else r.res.style[e]=o[e]}),n)if("exact"===d&&(console.log("APPL"),console.log(n),console.log(r.set),r.set(n)),!i.includes(d)&&"range"!==d){var f=n[d];"keySet"===d&&f&&f.key?r.res.style[f.key]=f.value:"function"==typeof r[d]?r[d](f):r.res.style[d]=f}}),this._setupResponsiveManager()}},{key:"respad",value:function(e){var t=this,r={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]};e.forEach(function(e){void 0!==r[e.breakpoint]?e.range=r[e.breakpoint]:Array.isArray(e.breakpoint)&&2===e.breakpoint.length?e.range=[parseInt(e.breakpoint[0],10),parseInt(e.breakpoint[1],10)]:e.range=[parseInt(e.breakpoint,10),1e5]}),e.sort(function(e,t){return e.range[0]-t.range[0]});var n=e.find(function(e){return"default"===e.breakpoint});n||(n={breakpoint:"default",range:r.default},e.unshift(n)),void 0===n.values&&(n.values=this.options.pad||null),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var r=window.innerWidth,i=n,o=0;o<e.length;o++){var a=e[o],s=p(a.range,2),l=s[0],c=s[1];if("default"!==a.breakpoint&&r>=l&&r<=c){i=a;break}}var u=void 0!==i.values?i.values:n.values;null!=u&&t.pad(u)}),this._setupResponsiveManager()}},{key:"_applyResponsive",value:function(e,t){var r={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]};e.forEach(function(e){if(void 0!==r[e.breakpoint])e.range=r[e.breakpoint];else{var t=parseInt(e.breakpoint,10);e.range=[t,1e5]}}),e.sort(function(e,t){return e.range[0]-t.range[0]});var n=e.find(function(e){return"default"===e.breakpoint})||{breakpoint:"default",range:r.default},i=function(){for(var r=window.innerWidth,i=n,o=0;o<e.length;o++){var a=e[o],s=p(a.range,2),l=s[0],c=s[1];if("default"!==a.breakpoint&&r>=l&&r<=c){i=a;break}}t(i)};this._responsiveHandler&&window.removeEventListener("resize",this._responsiveHandler),this._responsiveHandler=i,window.addEventListener("resize",i),setTimeout(function(){i()},0)}},{key:"resmar",value:function(e){var t=this,r={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]};e.forEach(function(e){void 0!==r[e.breakpoint]?e.range=r[e.breakpoint]:Array.isArray(e.breakpoint)&&2===e.breakpoint.length?e.range=[parseInt(e.breakpoint[0],10),parseInt(e.breakpoint[1],10)]:e.range=[parseInt(e.breakpoint,10),1e5]}),e.sort(function(e,t){return e.range[0]-t.range[0]});var n=e.find(function(e){return"default"===e.breakpoint});n||(n={breakpoint:"default",range:r.default},e.unshift(n)),void 0===n.values&&(n.values=this.options.pad||null),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var r=window.innerWidth,i=n,o=0;o<e.length;o++){var a=e[o],s=p(a.range,2),l=s[0],c=s[1];if("default"!==a.breakpoint&&r>=l&&r<=c){i=a;break}}var u=void 0!==i.values?i.values:n.values;null!=u&&t.mar(u)}),this._setupResponsiveManager()}},{key:"isNumber",value:function(e){return"number"==typeof e&&!isNaN(e)}},{key:"pad",value:function(e){for(var t=0;t<e.length;t++)for(var r=Object.keys(e[t]),n=0;n<r.length;n++)for(var i=r[n],o=e[t][i],a=0;a<i.length;a++)switch(i[a]){case"a":this.res.style.padding=this.isNumber(o)?"".concat(o,"px"):o;break;case"t":this.res.style.paddingTop=this.isNumber(o)?"".concat(o,"px"):o;break;case"l":this.res.style.paddingLeft=this.isNumber(o)?"".concat(o,"px"):o;break;case"r":this.res.style.paddingRight=this.isNumber(o)?"".concat(o,"px"):o;break;case"b":this.res.style.paddingBottom=this.isNumber(o)?"".concat(o,"px"):o}return this}},{key:"as",value:function(e){return this.res.style.alignSelf=e,this}},{key:"mar",value:function(e){if("center"===e)return this.res.style.marginLeft="auto",this.res.style.marginRight="auto",this;for(var t=0;t<e.length;t++)for(var r=Object.keys(e[t]),n=0;n<r.length;n++){for(var i=r[n],o=e[t][i],a=0;a<i.length;a++)switch(i[a]){case"a":"auto"===o?(this.res.style.marginLeft="auto",this.res.style.marginRight="auto"):this.res.style.margin=this.isNumber(o)?"".concat(o,"px"):o;break;case"t":this.res.style.marginTop=this.isNumber(o)?"".concat(o,"px"):o;break;case"l":this.res.style.marginLeft=this.isNumber(o)?"".concat(o,"px"):o;break;case"r":this.res.style.marginRight=this.isNumber(o)?"".concat(o,"px"):o;break;case"b":this.res.style.marginBottom=this.isNumber(o)?"".concat(o,"px"):o}"center"===i&&!0===o&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto"),"auto"===o&&(i.includes("l")||i.includes("r"))&&(i.includes("l")&&(this.res.style.marginLeft="auto"),i.includes("r")&&(this.res.style.marginRight="auto"))}return this}},{key:"smartRange",value:function(e,t,r){e<t.min&&(e=t.min),e>t.max&&(e=t.max);var n=(e-t.min)/(t.max-t.min);t.min>t.max&&(n=(e-t.max)/(t.min-t.max));var i=(r.min-r.max)*n-r.min;if(i=Math.abs(i),r.min<r.max){var o=(r.max+Math.abs(r.min))*n;i=r.min+o}return i}},{key:"gpos",value:function(e){return this.res.style.gridColumn=e.col,this.res.style.gridRow=e.row,this}},{key:"fluidCopy",value:function(e){if(e instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var t=document.createTextNode(this.text);return this.res.appendChild(t),this.res.style.fontSize=e.exact,this}if("S1"===e){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var r=document.createTextNode(this.text);this.res.appendChild(r),this.res.style.fontSize="calc(1.625rem + 5.075vw)"}if("S2"===e){this.prevStylex=this.res.style,this.res=document.createElement("h2"),this.res.style.cssText=this.prevStylex.cssText;var n=document.createTextNode(this.text);this.res.appendChild(n),this.res.style.fontSize="calc(1.500rem + 4.3vw)"}if("S3"===e){this.prevStylex=this.res.style,this.res=document.createElement("h3"),this.res.style.cssText=this.prevStylex.cssText;var i=document.createTextNode(this.text);this.res.appendChild(i),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===e){this.prevStylex=this.res.style,this.res=document.createElement("h4"),this.res.style.cssText=this.prevStylex.cssText;var o=document.createTextNode(this.text);this.res.appendChild(o),this.res.style.fontSize="calc(1.250rem + 2.75vw)"}if("S5"===e){this.prevStylex=this.res.style,this.res=document.createElement("h5"),this.res.style.cssText=this.prevStylex.cssText;var a=document.createTextNode(this.text);this.res.appendChild(a),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===e&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}},{key:"setIndex",value:function(e){this.index=e}},{key:"borderObj",value:function(e){var t,r=null!==(t=e.type)&&void 0!==t?t:"solid";return this.res.style.border="".concat(e.width," ").concat(r," ").concat(e.color),void 0!==e.radius&&(this.res.style.borderRadius=e.radius),this}},{key:"setPref",value:function(e){this.preffersId=e}},{key:"setClass",value:function(e){this.class=e}},{key:"setTags",value:function(e){this.openTag=e.open,this.closeTag=e.close,console.log("TAGS SET"),console.log(e)}},{key:"chainReact",value:function(e,t,r){var n=this;console.log("0P"),this.ap=!1,this.cta=0,this.once=!1;var i,o=f(e);try{for(o.s();!(i=o.n()).done;){var a=i.value;a.range||(a.range=["0px","999999px"])}}catch(e){o.e(e)}finally{o.f()}e.sort(function(e,t){return parseInt(e.range[0])-parseInt(t.range[0])});var s=function(i){var o=window.visualViewport.width,a=[],s=[];n.resCopy=n.res,n.storedQueries=e.map(function(e){return e.target}).filter(function(e){return null!=e});var l,c=f(e);try{for(c.s();!(l=c.n()).done;){var u=l.value;n.counterIndex++;var h=p(u.range,2),d=h[0],v=h[1],m=parseInt(d),y=parseInt(v),g=!0;if(u.target){g=!1;for(var x=0;x<u.target.length;x++)u.target[x]===t&&(g=!0)}o>=m&&o<=y&&g&&(a.push(u.log),s.push(u),u.op&&u.op.margin&&(n.useMargin=u.op.margin))}}catch(e){c.e(e)}finally{c.f()}if(r&&!r.includes("background")&&(n.res.style.background="",n.res.style.backgroundColor=""),n.res.style.textShadow="",r&&!r.includes("border")&&(n.res.style.border=""),r&&!r.includes("margin")&&(n.res.style.margin=""),n.res.style["-webkit-text-fill-color"]="",n.res.style["-webkit-text-stroke-color"]="",n.res.style["-webkit-text-stroke-width"]="",n.res.style.filter="",n.options.background&&(console.log(n.options.background),n.res.style.background=n.options.background),a.includes("gradient"),(a.includes("gradient")||a.includes("shadow"))&&(n.res.style.position="relative"),a.includes("blast")){var b,w=s.filter(function(e){return"blast"===e.log})[0].op.color,k=null!==(b=s.filter(function(e){return"blast"===e.log})[0].op.width)&&void 0!==b?b:"1px";"FlexRowLayoutElement"===n.getType()||"LayoutWrapperElement"===n.getType()?(n.res.style.border="".concat("number"==typeof k?k+"px":k," solid orange"),n.res.style.display="inline-block","FlexRowLayoutElement"===n.getType()&&(n.res.style.display="flex"),n.res.style.boxSizing="border-box",n.res.style.transformOrigin="center",n.blastTarget=n.res):(n.text,n.res.style["-webkit-text-fill-color"]="transparent",n.res.style["-webkit-text-stroke-color"]=w,n.res.style["-webkit-text-stroke-width"]="".concat(k))}if(a.includes("filter")){var _=s.filter(function(e){return"filter"===e.log})[0].op.filter;n.res.style.filter=_}if(a.includes("background")&&(n.res.style.backgroundColor="green"),a.includes("gradient")&&("LayoutWrapperElement"!==n.getType()&&"FlexRowLayoutElement"!==n.getType()&&(n.res.style["-webkit-text-fill-color"]="transparent"),n.res.style.background=n.globalGradient,"LayoutWrapperElement"!==n.getType()&&"FlexRowLayoutElement"!==n.getType()&&(n.res.style["background-clip"]="text")),a.includes("shadow")){var E,T,S,R,A=n.options.shadow.op;console.log("OP IS",A);var C=null!==(E=A.steps)&&void 0!==E?E:1,M=null!==(T=A.colors)&&void 0!==T?T:["gray"],D=null!==(S=A.movements)&&void 0!==S?S:["3px","3px"],O=null!==(R=A.radius)&&void 0!==R?R:"3px";if(1===D.length&&(D=[D[0],D[0]]),"FlexRowLayoutElement"===n.getType()||"LayoutWrapperElement"===n.getType()){for(var I=[],F=0;F<C;F++){var L,j=null!==(L=M[F])&&void 0!==L?L:M[0],P=D[0],W=D[1];I.push("".concat(P," ").concat(W," ").concat(O," ").concat(j))}n.res.style.boxShadow=I.join(", ")}else{for(var B=[],U=0;U<C;U++){var z,N=null!==(z=M[U])&&void 0!==z?z:M[0],G=D[0],X=D[1];B.push("drop-shadow(".concat(G," ").concat(X," ").concat(O," ").concat(N,")"))}n.res.style.filter=B.join(" ")}}if(a.includes("margin"))for(x=0;x<e.length;x++)if(e[x].op){var H=e[x].op.offsets;H&&void 0!==n.index&&(n.res.style.margin=H[Number(n.index)]+"px")}if(a.includes("spana")||a.includes("span")){var q=document.createElement("div");if(q.setAttribute("id","oroa"),Object.assign(q.style,{position:"absolute",inset:"0",background:"linear-gradient(90deg, rgb(52,152,219), rgb(26,188,156))",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",pointerEvents:"none"}),n.res&&n.res.querySelector("span"))return;n.res=n.resCopy,n.res.textContent="",n.options.span&&(Array.isArray(n.options.span)?n.options.span:[n.options.span]).forEach(function(e){if(e.op&&"span"===e.op.name&&Array.isArray(e.op.parts)){var t=0,r=n.prevText||"";if(e.op.parts.forEach(function(e){var i=e.text,o=e.style||{};if(t<r.length){var a=r.indexOf(i,t);if(a>t){var s=r.substring(t,a);n.res.appendChild(new n.constructor(s).setup({type:"span",id:o.id,animation:o.animation}).set({}).render())}t=a+i.length}var l=new n.constructor(i).setup({type:"span",id:o.id,animation:o.animation}).set(o).render();n.res.appendChild(l)}),t<r.length){var i=r.substring(t);n.res.appendChild(new n.constructor(i).setup({type:"span"}).set({}).render())}}})}else{var Y=new n.constructor(n.prevText).set({}).render();n.prevText&&n.prevText.length>0&&i&&n.res.appendChild(Y)}if(a.includes("animation")){if(n.options.animation&&!n.hasAnimated&&!n.options.animation.op.fireAt){console.warn(n.openTag),n.hasAnimated=!0;var V=n.options.animation.op;window.addEventListener("sidebar:open",function(){n.res.animate(V.keyframesOpen,V.openOptions)}),window.addEventListener("sidebar:closed",function(){n.res.animate(V.keyframesClose,V.closeOptions)}),n.res.animate(V.keyframesClose,{duration:0,fill:"forwards"}),n.openTag&&n.closeTag&&(window.addEventListener(n.openTag,function(){n.res.animate(V.keyframesOpen,V.openOptions)}),window.addEventListener(n.closeTag,function(){n.res.animate(V.keyframesClose,V.closeOptions)}))}if(n.options.animation&&n.options.animation.op.fireAt&&n.options.animation.op.fireAt.endsWith("px")){var $=n.options.animation.op;n.res.animate($.keyframesClose,{duration:0,fill:"forwards"});var J=function(){window.scrollY>parseFloat($.fireAt)&&(n.res.animate($.keyframesOpen,$.openOptions),window.removeEventListener("scroll",J))};window.addEventListener("scroll",J)}if(n.options.animation&&"inview"===n.options.animation.op.fireAt){var Q=n.options.animation.op;n.res.animate(Q.keyframesClose,{duration:0,fill:"forwards"});var K=!1;new IntersectionObserver(function(e,t){e.forEach(function(e){e.isIntersecting&&!K&&(K=!0,n.res.animate(Q.keyframesOpen,Q.openOptions),t.disconnect())})}).observe(n.res)}}};this.options.animation||window.addEventListener("resize",function(){return s()}),s()}},{key:"maxWidth",value:function(e){return this.res.style.maxWidth=e,this}},{key:"removeQuotesFromFirstWord",value:function(e){return e.replace(/"([^"]+)":/g,"$1:")}},{key:"arrayMargin",value:function(e,t){return e.includes("left")&&(this.res.style.marginLeft=t),e.includes("right")&&(this.res.style.marginRight=t),e.includes("top")&&(this.res.style.marginTop=t),e.includes("bottom")&&(this.res.style.marginBottom=t),e.includes("all")&&(this.res.style.margin=t),t||(this.res.style.marginBottom=e),this}}],t&&g(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}());module.exports=t})();
|
|
1
|
+
(()=>{"use strict";var e={d:(t,r)=>{for(var n in r)e.o(r,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:r[n]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r:e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})}},t={};function r(e){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},r(e)}e.r(t),e.d(t,{Wrapper:()=>O});var n="nodality.theme.mode",i="nodality:theme",o={mode:function(){try{var e=localStorage.getItem(n);if("light"===e||"dark"===e)return e}catch(e){}return"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}(),tokens:{light:{},dark:{}},defaults:{light:{color:"#111"},dark:{}},setDefaults:function(e){return e&&"object"===r(e)&&(e.light&&(this.defaults.light=Object.assign({},this.defaults.light,e.light)),e.dark&&(this.defaults.dark=Object.assign({},this.defaults.dark,e.dark)),this._broadcast()),this},setTokens:function(e){return e&&"object"===r(e)&&(e.light&&Object.assign(this.tokens.light,e.light),e.dark&&Object.assign(this.tokens.dark,e.dark)),this},get current(){return this.tokens[this.mode]||{}},set:function(e){if("light"!==e&&"dark"!==e)return this;if(e===this.mode)return this;this.mode=e;try{localStorage.setItem(n,e)}catch(e){}return this._broadcast(),this},toggle:function(){return this.set("dark"===this.mode?"light":"dark")},subscribe:function(e){if("undefined"==typeof document)return function(){};var t=function(t){return e(t.detail.mode,t.detail.tokens)};document.addEventListener(i,t);try{e(this.mode,this.current)}catch(e){}return function(){return document.removeEventListener(i,t)}},_broadcast:function(){"undefined"!=typeof document&&document.dispatchEvent(new CustomEvent(i,{detail:{mode:this.mode,tokens:this.current}}))}};function a(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||l(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=l(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function l(e,t){if(e){if("string"==typeof e)return c(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?c(e,t):void 0}}function c(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}var u={mouse:function(e){return{x:e.mouseX,y:e.mouseY,amt:1}},hover:function(e){return{x:e.mouseX,y:e.mouseY,amt:e.hover}},scroll:function(e){return{x:.5*e.w,y:e.h*e.scroll,amt:1}},time:function(e){return{x:e.w*(.5+.34*Math.cos(.6*e.t)),y:e.h*(.5+.34*Math.sin(.8*e.t)),amt:1}}},d=Object.keys(u),f={hexalize:{stage:"cell",decl:function(e){return"uniform float ".concat(e,"size;")},code:function(e){return"\n {\n vec2 hp = warped / ".concat(e,"size;\n vec2 hr = vec2(1.0, 1.7320508), hh = hr * 0.5;\n vec2 ha = mod(hp, hr) - hh, hb = mod(hp - hh, hr) - hh;\n vec2 gv = dot(ha, ha) < dot(hb, hb) ? ha : hb;\n center = (hp - gv) * ").concat(e,"size;\n gv = abs(gv);\n edge = max(edge, smoothstep(0.44, 0.5,\n max(dot(gv, normalize(vec2(1.0, 1.7320508))), gv.x)));\n }")},uniforms:function(e,t){return{size:["1f",(e.size||24)*t]}}},offset:{stage:"warp",defaultDriver:"mouse",decl:function(e){return"uniform float ".concat(e,"strength; uniform float ").concat(e,"radius;\n uniform vec2 ").concat(e,"dpos; uniform float ").concat(e,"damt;")},code:function(e){return"\n {\n float d = length(warped - ".concat(e,"dpos);\n float fall = 1.0 - smoothstep(0.0, ").concat(e,"radius, d);\n vec2 dir = d > 0.5 ? (warped - ").concat(e,"dpos) / d : vec2(0.0);\n warped -= dir * ").concat(e,"strength * fall * ").concat(e,"damt;\n }")},uniforms:function(e,t){return{strength:["1f",(e.strength||20)*t],radius:["1f",(e.radius||260)*t]}}},duotone:{stage:"color",decl:function(e){return"uniform vec3 ".concat(e,"a; uniform vec3 ").concat(e,"b; uniform float ").concat(e,"radius;\n uniform vec2 ").concat(e,"dpos; uniform float ").concat(e,"damt;")},code:function(e,t){return"\n {\n float lum = dot(col, vec3(0.299, 0.587, 0.114));\n vec3 duo = mix(".concat(e,"a, ").concat(e,"b, lum);\n ").concat(t.by?"float mask = (1.0 - smoothstep(".concat(e,"radius * 0.35, ").concat(e,"radius,\n length(center - ").concat(e,"dpos))) * ").concat(e,"damt;"):"float mask = 1.0;","\n col = mix(col, duo, mask);\n }")},uniforms:function(e,t){var r=e.colors||["#104B87","#E8FF00"];return{a:["3fv",h(r[0])],b:["3fv",h(r[1])],radius:["1f",(e.radius||220)*t]}}},edges:{stage:"color",decl:function(e){return"uniform vec3 ".concat(e,"color; uniform float ").concat(e,"strength;")},code:function(e){return"\n {\n edgeCol = ".concat(e,"color;\n edgeCov = max(edgeCov, edge * ").concat(e,"strength);\n }")},uniforms:function(e){return{color:["3fv",h(e.color||"#FFFFFF")],strength:["1f",null!=e.strength?e.strength:1]}}},halftone:{stage:"color",decl:function(e){return"\n uniform float ".concat(e,"size;\n uniform float ").concat(e,"angle;\n uniform vec3 ").concat(e,"ink;\n uniform vec3 ").concat(e,"paper;\n uniform float ").concat(e,"soft;\n uniform float ").concat(e,"radius;\n uniform vec2 ").concat(e,"dpos;\n uniform float ").concat(e,"damt;")},code:function(e,t){return"\n {\n float lum = dot(col, vec3(0.299, 0.587, 0.114));\n float sz = ".concat(e,"size;").concat(t.by?"\n float fd = 1.0 - smoothstep(0.0, ".concat(e,"radius, length(frag - ").concat(e,"dpos));\n sz *= 1.0 + fd * ").concat(e,"damt * 1.8;"):"","\n // Screen angle: rotating the grid is what stops the dots\n // reading as a horizontal/vertical texture.\n float ca = cos(").concat(e,"angle), sa = sin(").concat(e,"angle);\n vec2 rp = vec2(ca * frag.x - sa * frag.y,\n sa * frag.x + ca * frag.y) / max(sz, 1.0);\n vec2 cell = fract(rp) - 0.5;\n // Dot radius from tone: darker tone prints a bigger dot.\n // sqrt because ink coverage goes as area, not radius.\n float rr = sqrt(clamp(1.0 - lum, 0.0, 1.0)) * 0.55;\n float dm = smoothstep(rr, rr - ").concat(e,"soft, length(cell));\n col = mix(").concat(e,"paper, ").concat(e,"ink, dm);\n }")},uniforms:function(e,t){return{size:["1f",(e.size||6)*t],angle:["1f",(null!=e.angle?e.angle:15)*Math.PI/180],ink:["3fv",h(e.ink||"#0B1B2B")],paper:["3fv",h(e.paper||"#FFFFFF")],soft:["1f",null!=e.softness?e.softness:.08],radius:["1f",(e.radius||220)*t]}}},aberration:{stage:"displace",chroma:!0,decl:function(e){return"\n uniform float ".concat(e,"amount;\n uniform float ").concat(e,"radius;\n uniform vec2 ").concat(e,"dpos;\n uniform float ").concat(e,"damt;")},code:function(e,t){return"\n {\n vec2 ctr = ".concat(t.by?"".concat(e,"dpos"):"u_res * 0.5",";\n vec2 dv = sampleP - ctr;\n float dl = length(dv);\n vec2 dir = dl > 0.5 ? dv / dl : vec2(0.0);\n ").concat(t.by?"float amt = ".concat(e,"amount * ").concat(e,"damt *\n (1.0 - smoothstep(0.0, ").concat(e,"radius, dl));"):"float amt = ".concat(e,"amount * (dl / max(length(u_res) * 0.5, 1.0));"),"\n chroma += dir * amt;\n }")},uniforms:function(e,t){return{amount:["1f",(null!=e.amount?e.amount:6)*t],radius:["1f",(e.radius||240)*t]}}},stir:{stage:["warp","color"],decl:function(e){return"\n uniform sampler2D ".concat(e,"vel;\n uniform sampler2D ").concat(e,"dye;\n uniform float ").concat(e,"strength;\n uniform float ").concat(e,"dyemix;\n uniform float ").concat(e,"intensity;\n uniform float ").concat(e,"sheen;\n uniform vec3 ").concat(e,"tint;")},code:function(e,t,r){return"warp"===r?"\n {\n // frag/warped are top-down pixels, the field is bottom-up\n // [0,1]: flip y going in, and flip the y of the vector coming\n // out so the content drags WITH the pointer.\n vec2 fuv = vec2(warped.x / u_res.x, 1.0 - warped.y / u_res.y);\n vec2 v = texture2D(".concat(e,"vel, clamp(fuv, 0.001, 0.999)).xy;\n warped += vec2(v.x, -v.y) * ").concat(e,"strength;\n }"):"\n {\n // Sampled at the CONTINUOUS warped position, never at the\n // cell centre: a cell op upstream (hexalize) snaps the cell\n // centre to one point per tile, which would quantise the\n // liquid into flat per-hex patches instead of smooth swirls.\n vec2 suv = vec2(warped.x / u_res.x, 1.0 - warped.y / u_res.y);\n vec3 dc = texture2D(".concat(e,"dye, clamp(suv, 0.001, 0.999)).rgb;\n float mag = length(dc);\n // Colour is carried IN the dye field and advected with it, so\n // a ribbon keeps its hue while the flow folds it. Deriving\n // colour from the local flow direction instead would make\n // neighbouring pixels jump hue and read as confetti.\n vec3 liquid = mag > 1e-4 ? clamp(dc / mag * 1.25, 0.0, 1.0) : ").concat(e,"tint;\n float amt = clamp((1.0 - exp(-mag * ").concat(e,"intensity)) * ").concat(e,"dyemix, 0.0, 1.0);\n // Straight-alpha OVER so a later overlay op (blobs) still\n // composites correctly on top of the liquid.\n float na = amt + ovA * (1.0 - amt);\n ovCol = (liquid * amt + ovCol * ovA * (1.0 - amt)) / max(na, 1e-4);\n ovA = na;\n\n // Faint sheen on the content itself where the flow is fast.\n float sp = length(texture2D(").concat(e,"vel, clamp(suv, 0.001, 0.999)).xy);\n col = mix(col, ").concat(e,"tint, (1.0 - exp(-sp * 0.7)) * ").concat(e,"sheen);\n }")},uniforms:function(e,t){return{strength:["1f",(null!=e.strength?e.strength:26)*t],sheen:["1f",null!=e.sheen?e.sheen:.15],tint:["3fv",h(e.tint||"#7FD4FF")],dyemix:["1f",null!=e.dye?e.dye:.85],intensity:["1f",null!=e.intensity?e.intensity:1.6]}},solver:{resolutions:function(e){return{sim:Math.max(32,Math.min(e.resolution||128,512)),dye:Math.max(64,Math.min(e.dyeResolution||512,1024))}},targets:{velocity:{double:!0,res:"sim",fmt:"rg",smooth:!0},dye:{double:!0,res:"dye",fmt:"rgba",smooth:!0},pressure:{double:!0,res:"sim",fmt:"r",smooth:!1},divergence:{double:!1,res:"sim",fmt:"r",smooth:!1},vorticity:{double:!1,res:"sim",fmt:"r",smooth:!1}},samplers:{vel:"velocity",dye:"dye"},programs:{splat:"\nprecision highp float;\nuniform sampler2D u_src;\nuniform vec2 u_texel;\nuniform vec2 u_point;\nuniform vec3 u_amount;\nuniform float u_radius;\nuniform float u_aspect;\nvoid main() {\n vec2 uv = gl_FragCoord.xy * u_texel;\n vec2 d = uv - u_point;\n if (u_aspect >= 1.0) d.y /= u_aspect; else d.x *= u_aspect;\n float g = exp(-dot(d, d) / max(u_radius * u_radius, 1e-6));\n gl_FragColor = vec4(texture2D(u_src, uv).xyz + u_amount * g, 1.0);\n}",advect:"\nprecision highp float;\nuniform sampler2D u_vel;\nuniform sampler2D u_src;\nuniform vec2 u_texel;\nuniform float u_dt;\nuniform float u_diss;\nvoid main() {\n vec2 uv = gl_FragCoord.xy * u_texel;\n vec2 back = uv - texture2D(u_vel, uv).xy * u_dt;\n gl_FragColor = vec4(texture2D(u_src, clamp(back, 0.0, 1.0)).xyz * u_diss, 1.0);\n}",curl:"\nprecision highp float;\nuniform sampler2D u_vel;\nuniform vec2 u_texel;\nvoid main() {\n vec2 uv = gl_FragCoord.xy * u_texel;\n float r = texture2D(u_vel, uv + vec2(u_texel.x, 0.0)).y;\n float l = texture2D(u_vel, uv - vec2(u_texel.x, 0.0)).y;\n float t = texture2D(u_vel, uv + vec2(0.0, u_texel.y)).x;\n float b = texture2D(u_vel, uv - vec2(0.0, u_texel.y)).x;\n gl_FragColor = vec4(0.5 * ((r - l) - (t - b)), 0.0, 0.0, 1.0);\n}",confine:"\nprecision highp float;\nuniform sampler2D u_vel;\nuniform sampler2D u_curl;\nuniform vec2 u_texel;\nuniform float u_eps;\nuniform float u_dt;\nvoid main() {\n vec2 uv = gl_FragCoord.xy * u_texel;\n float r = texture2D(u_curl, uv + vec2(u_texel.x, 0.0)).x;\n float l = texture2D(u_curl, uv - vec2(u_texel.x, 0.0)).x;\n float t = texture2D(u_curl, uv + vec2(0.0, u_texel.y)).x;\n float b = texture2D(u_curl, uv - vec2(0.0, u_texel.y)).x;\n float c = texture2D(u_curl, uv).x;\n vec2 grad = 0.5 * vec2(abs(r) - abs(l), abs(t) - abs(b));\n vec2 n = grad / (length(grad) + 1e-5);\n vec2 force = u_eps * c * vec2(n.y, -n.x);\n vec2 v = texture2D(u_vel, uv).xy + force * u_dt;\n gl_FragColor = vec4(clamp(v, -64.0, 64.0), 0.0, 1.0);\n}",divergence:"\nprecision highp float;\nuniform sampler2D u_vel;\nuniform vec2 u_texel;\nvoid main() {\n vec2 uv = gl_FragCoord.xy * u_texel;\n float r = texture2D(u_vel, uv + vec2(u_texel.x, 0.0)).x;\n float l = texture2D(u_vel, uv - vec2(u_texel.x, 0.0)).x;\n float t = texture2D(u_vel, uv + vec2(0.0, u_texel.y)).y;\n float b = texture2D(u_vel, uv - vec2(0.0, u_texel.y)).y;\n vec2 c = texture2D(u_vel, uv).xy;\n if (uv.x - u_texel.x < 0.0) l = -c.x;\n if (uv.x + u_texel.x > 1.0) r = -c.x;\n if (uv.y - u_texel.y < 0.0) b = -c.y;\n if (uv.y + u_texel.y > 1.0) t = -c.y;\n gl_FragColor = vec4(0.5 * ((r - l) + (t - b)), 0.0, 0.0, 1.0);\n}",jacobi:"\nprecision highp float;\nuniform sampler2D u_p;\nuniform sampler2D u_div;\nuniform vec2 u_texel;\nvoid main() {\n vec2 uv = gl_FragCoord.xy * u_texel;\n float r = texture2D(u_p, uv + vec2(u_texel.x, 0.0)).x;\n float l = texture2D(u_p, uv - vec2(u_texel.x, 0.0)).x;\n float t = texture2D(u_p, uv + vec2(0.0, u_texel.y)).x;\n float b = texture2D(u_p, uv - vec2(0.0, u_texel.y)).x;\n float d = texture2D(u_div, uv).x;\n gl_FragColor = vec4((r + l + t + b - d) * 0.25, 0.0, 0.0, 1.0);\n}",subtract:"\nprecision highp float;\nuniform sampler2D u_p;\nuniform sampler2D u_vel;\nuniform vec2 u_texel;\nvoid main() {\n vec2 uv = gl_FragCoord.xy * u_texel;\n float r = texture2D(u_p, uv + vec2(u_texel.x, 0.0)).x;\n float l = texture2D(u_p, uv - vec2(u_texel.x, 0.0)).x;\n float t = texture2D(u_p, uv + vec2(0.0, u_texel.y)).x;\n float b = texture2D(u_p, uv - vec2(0.0, u_texel.y)).x;\n vec2 v = texture2D(u_vel, uv).xy - 0.5 * vec2(r - l, t - b);\n gl_FragColor = vec4(v, 0.0, 1.0);\n}",decay:"\nprecision highp float;\nuniform sampler2D u_tex;\nuniform vec2 u_texel;\nuniform float u_value;\nvoid main() {\n gl_FragColor = texture2D(u_tex, gl_FragCoord.xy * u_texel) * u_value;\n}"},splatColor:function(e,t,r){var n=null!=e.dyeAmount?e.dyeAmount:.6;if(!e.rainbow){var i=h(e.tint||"#7FD4FF");return[i[0]*n,i[1]*n,i[2]*n]}var o=Math.atan2(r,t);return[(.5+.5*Math.cos(o))*n,(.5+.5*Math.cos(o+2.0944))*n,(.5+.5*Math.cos(o+4.1888))*n]},step:function(e,t,r){var n=Math.min(r.dt,1/30),i=1/e.res.sim,o=1/e.res.dye,a=function(e,t){return Math.pow(e,60*t)};if(r.moving){var s=null!=t.force?t.force:1;e.use("splat"),e.f1("u_radius",null!=t.radius?t.radius:.1),e.f1("u_aspect",r.aspect),e.f2("u_point",r.px,r.py),e.f2("u_texel",i,i),e.smp("u_src",e.read("velocity"),0),e.f3("u_amount",r.dx*s,r.dy*s,0),e.blit(e.write("velocity")),e.swap("velocity"),e.f2("u_texel",o,o),e.smp("u_src",e.read("dye"),0),e.f3("u_amount",r.col[0],r.col[1],r.col[2]),e.blit(e.write("dye")),e.swap("dye")}e.use("curl"),e.f2("u_texel",i,i),e.smp("u_vel",e.read("velocity"),0),e.blit(e.single("vorticity")),e.use("confine"),e.f2("u_texel",i,i),e.f1("u_eps",null!=t.curl?t.curl:2.2),e.f1("u_dt",n),e.smp("u_vel",e.read("velocity"),0),e.smp("u_curl",e.single("vorticity"),1),e.blit(e.write("velocity")),e.swap("velocity"),e.use("divergence"),e.f2("u_texel",i,i),e.smp("u_vel",e.read("velocity"),0),e.blit(e.single("divergence")),e.use("decay"),e.f2("u_texel",i,i),e.f1("u_value",a(null!=t.pressure?t.pressure:.8,n)),e.smp("u_tex",e.read("pressure"),0),e.blit(e.write("pressure")),e.swap("pressure"),e.use("jacobi"),e.f2("u_texel",i,i),e.smp("u_div",e.single("divergence"),1);for(var l=Math.max(1,Math.min(t.pressureIterations||6,40)),c=0;c<l;c++)e.smp("u_p",e.read("pressure"),0),e.blit(e.write("pressure")),e.swap("pressure");e.use("subtract"),e.f2("u_texel",i,i),e.smp("u_p",e.read("pressure"),0),e.smp("u_vel",e.read("velocity"),1),e.blit(e.write("velocity")),e.swap("velocity"),e.use("advect"),e.f1("u_dt",n),e.f2("u_texel",i,i),e.smp("u_vel",e.read("velocity"),0),e.smp("u_src",e.read("velocity"),0),e.f1("u_diss",a(null!=t.decay?t.decay:.985,n)),e.blit(e.write("velocity")),e.swap("velocity"),e.f2("u_texel",o,o),e.smp("u_vel",e.read("velocity"),0),e.smp("u_src",e.read("dye"),1),e.f1("u_diss",a(null!=t.dyeFade?t.dyeFade:.97,n)),e.blit(e.write("dye")),e.swap("dye")}}},blobs:{stage:"color",overlay:!0,mips:!0,decl:function(e){return"\n uniform vec3 ".concat(e,"blobs[").concat(12,"];\n uniform int ").concat(e,"count;\n uniform vec3 ").concat(e,"tint;\n uniform float ").concat(e,"refract;\n uniform float ").concat(e,"rim;\n uniform float ").concat(e,"alpha;\n uniform float ").concat(e,"irid;\n uniform float ").concat(e,"disp;\n uniform float ").concat(e,"frost;\n float ").concat(e,"hash(vec3 v) {\n return fract(sin(dot(v, vec3(21.9898, 63.233, 41.719))) * 41739.317);\n }\n float ").concat(e,"noise(vec3 v) {\n vec3 f = floor(v);\n vec3 r = v - f;\n r = r * r * (3.0 - 2.0 * r);\n float c000 = ").concat(e,"hash(f);\n float c100 = ").concat(e,"hash(f + vec3(1.0, 0.0, 0.0));\n float c010 = ").concat(e,"hash(f + vec3(0.0, 1.0, 0.0));\n float c110 = ").concat(e,"hash(f + vec3(1.0, 1.0, 0.0));\n float c001 = ").concat(e,"hash(f + vec3(0.0, 0.0, 1.0));\n float c101 = ").concat(e,"hash(f + vec3(1.0, 0.0, 1.0));\n float c011 = ").concat(e,"hash(f + vec3(0.0, 1.0, 1.0));\n float c111 = ").concat(e,"hash(f + vec3(1.0, 1.0, 1.0));\n return mix(\n mix(mix(c000, c100, r.x), mix(c010, c110, r.x), r.y),\n mix(mix(c001, c101, r.x), mix(c011, c111, r.x), r.y), r.z);\n }")},code:function(e){return"\n {\n float field = 0.0;\n vec2 grad = vec2(0.0);\n for (int bi = 0; bi < ".concat(12,"; bi++) {\n if (bi >= ").concat(e,"count) break;\n vec2 bd = frag - ").concat(e,"blobs[bi].xy;\n float br = ").concat(e,"blobs[bi].z;\n float dd = max(dot(bd, bd), 1.0);\n field += (br * br) / dd;\n grad += (-2.0 * (br * br) / (dd * dd)) * bd;\n }\n float bmask = smoothstep(0.6, 1.0, field);\n if (bmask > 0.003) {\n float gmag = length(grad);\n vec2 g2 = gmag > 1e-6 ? -grad / gmag : vec2(0.0);\n // Pseudo-3D surface normal from the 2D field. For a\n // metaball field (sum of r^2/d^2), 1/sqrt(field) IS the\n // normalized radial position: 0 at the centre, 1 at the\n // surface. That yields a true hemisphere profile — the\n // curvature (and therefore refraction) varies smoothly\n // across the WHOLE disc, not just an edge annulus.\n float s = clamp(inversesqrt(max(field, 1e-4)), 0.0, 1.0);\n vec3 n = normalize(vec3(g2 * s, sqrt(max(1.0 - s * s, 0.004))));\n vec3 rd = vec3(0.0, 0.0, -1.0);\n\n // Dispersion: refract each channel with a slightly\n // different index (water-glass ~1.33). Near the rim the\n // exit direction flattens (|z| -> 0), so the sampling\n // offsets stretch — producing the smooth concentric\n // colour-fringed bands of a thick lens.\n float ca = 0.03 * ").concat(e,"disp;\n vec3 tR = refract(rd, n, 1.0 / (1.33 - ca));\n vec3 tG = refract(rd, n, 1.0 / 1.33);\n vec3 tB = refract(rd, n, 1.0 / (1.33 + ca));\n vec2 oR = tR.xy * (").concat(e,"refract / max(abs(tR.z), 0.3));\n vec2 oG = tG.xy * (").concat(e,"refract / max(abs(tG.z), 0.3));\n vec2 oB = tB.xy * (").concat(e,"refract / max(abs(tB.z), 0.3));\n\n // Blur grows with how far the ray was bent (mip bias), so\n // strongly-refracted regions smear smoothly instead of\n // showing sharp displaced copies. frost adds a base blur.\n float lod = ").concat(e,"frost * 5.0 + log2(1.0 + length(oG) * 0.035);\n vec2 px = 1.0 / u_res;\n vec4 sG = texture2D(u_tex, clamp(uv + oG * px, 0.002, 0.998), lod);\n vec3 refr;\n refr.r = texture2D(u_tex, clamp(uv + oR * px, 0.002, 0.998), lod).r;\n refr.g = sG.g;\n refr.b = texture2D(u_tex, clamp(uv + oB * px, 0.002, 0.998), lod).b;\n // Blend in (approximately) linear light for clean fringes.\n refr = pow(max(refr, 0.0), vec3(2.2));\n\n vec3 tintLin = pow(").concat(e,"tint, vec3(2.2));\n vec3 bodyLin = mix(tintLin * 0.35, refr, sG.a);\n\n // Glass darkens toward the silhouette (absorption), the\n // opposite of an additive glow ring.\n float edge = pow(1.0 - clamp(n.z, 0.0, 1.0), 1.5);\n bodyLin *= 1.0 - 0.35 * ").concat(e,"rim * edge;\n vec3 body = pow(max(bodyLin, 0.0), vec3(1.0 / 2.2));\n\n // Sparse iridescent glints: two drifting value-noise\n // fields sampled on the reflection direction, one warm\n // one cool, sharpened hard so only sparkles survive.\n vec3 rf = reflect(rd, n);\n float nA = ").concat(e,"noise(rf * 2.3 + u_time * 0.5);\n float nB = ").concat(e,"noise(rf * 2.3 - u_time * 0.5);\n vec3 glint = pow(max(vec3(0.30, 0.52, 0.86) * nA +\n vec3(0.80, 0.56, 0.34) * nB, 0.0), vec3(6.0));\n body += glint * ").concat(e,"irid;\n\n // Small hard specular from a fixed key light.\n vec3 L = normalize(vec3(-0.5, 0.7, 0.6));\n float spec = pow(max(dot(reflect(-L, n), vec3(0.0, 0.0, 1.0)), 0.0), 60.0);\n body += spec * 0.35;\n\n ovCol = body;\n ovA = max(ovA, bmask * ").concat(e,"alpha);\n }\n }")},uniforms:function(e,t){return{tint:["3fv",h(e.color||"#EAF4EE")],refract:["1f",(null!=e.refract?e.refract:70)*t],rim:["1f",null!=e.rim?e.rim:.6],alpha:["1f",null!=e.alpha?e.alpha:1],irid:["1f",null!=e.iridescence?e.iridescence:.8],disp:["1f",null!=e.dispersion?e.dispersion:1],frost:["1f",null!=e.frost?e.frost:.25]}},init:function(e,t,r,n){for(var i=(e.radius||46)*t,o=Math.max(1,Math.min(null!=e.trail?e.trail:7,12)),a=[],s=0,l=0;l<o;l++){var c=Math.pow(.86,l);a.push(c),s+=c*c}for(var u=Math.sqrt(s),d=a.map(function(e){return i*e/u}),f=a.map(function(e,t){return.85*i*Math.pow(.955,t)}),h=function(e,t){return e+Math.random()*(t-e)},p=Math.max(0,Math.min((e.count||1)-1,12-o)),m=[],v=0;v<p;v++){var y=h(0,2*Math.PI),g=h(30,80)*t;m.push({x:h(i,r-i),y:h(i,n-i),r:i*h(.45,.8),vx:Math.cos(y)*g,vy:Math.sin(y)*g,phase:h(0,2*Math.PI)})}for(var x={x:.5*r,y:.55*n},b=[],w=0;w<o;w++)b.push({x:x.x,y:x.y});return{head:x,chain:b,nTrail:o,drifters:m,trailIdleR:d,trailMoveR:f,stretch:0,seg:.9*i}},tick:function(e,t){var r=Math.min(t.dt,.05),n=t.w,i=t.h,o=1-Math.exp(9*-r);e.head.x+=(t.mouseX-e.head.x)*o,e.head.y+=(t.mouseY-e.head.y)*o;var a=e.chain;a[0].x=e.head.x,a[0].y=e.head.y;for(var l=1-Math.exp(16*-r),c=1;c<a.length;c++){var u=a[c-1],d=a[c],f=u.x-d.x,h=u.y-d.y,p=Math.hypot(f,h)||1e-4,m=e.seg;p>m&&(d.x+=f*(1-m/p),d.y+=h*(1-m/p)),d.x+=(u.x-d.x)*l,d.y+=(u.y-d.y)*l}var v=a[a.length-1],y=Math.hypot(v.x-e.head.x,v.y-e.head.y),g=Math.max(1,e.seg*(e.nTrail-1)),x=Math.min(1,y/g);e.stretch+=(x-e.stretch)*(1-Math.exp(8*-r));var b,w=s(e.drifters);try{for(w.s();!(b=w.n()).done;){var k=b.value;k.x+=k.vx*r,k.y+=k.vy*r,k.x<k.r?(k.x=k.r,k.vx=Math.abs(k.vx)):k.x>n-k.r&&(k.x=n-k.r,k.vx=-Math.abs(k.vx)),k.y<k.r?(k.y=k.r,k.vy=Math.abs(k.vy)):k.y>i-k.r&&(k.y=i-k.r,k.vy=-Math.abs(k.vy)),k.phase+=1.6*r}}catch(e){w.e(e)}finally{w.f()}for(var _=new Float32Array(36),E=e.stretch,T=0;T<e.nTrail;T++){var S=a[T];_[3*T]=S.x,_[3*T+1]=S.y,_[3*T+2]=e.trailIdleR[T]+(e.trailMoveR[T]-e.trailIdleR[T])*E}return e.drifters.forEach(function(t,r){var n=e.nTrail+r;_[3*n]=t.x,_[3*n+1]=t.y,_[3*n+2]=t.r*(1+.12*Math.sin(t.phase))}),[{name:"blobs",kind:"3fv",value:_},{name:"count",kind:"1i",value:e.nTrail+e.drifters.length}]}}};function h(e){return[1,3,5].map(function(t){return parseInt(e.slice(t,t+2),16)/255})}Object.keys(f);var p="attribute vec2 a; void main(){ gl_Position = vec4(a, 0.0, 1.0); }";function m(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=y(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function v(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||y(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function y(e,t){if(e){if("string"==typeof e)return g(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?g(e,t):void 0}}function g(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function x(e){return x="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},x(e)}function b(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,w(n.key),n)}}function w(e){var t=function(e){if("object"!=x(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=x(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==x(t)?t:t+""}function k(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=E(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,i=function(){};return{s:i,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,s=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){s=!0,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(s)throw o}}}}function _(e){return _="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},_(e)}function E(e,t){if(e){if("string"==typeof e)return T(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?T(e,t):void 0}}function T(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function S(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,R(n.key),n)}}function R(e){var t=function(e){if("object"!=_(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=_(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==_(t)?t:t+""}function A(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(A=function(){return!!e})()}function C(){return C="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=M(e)););return e}(e,t);if(n){var i=Object.getOwnPropertyDescriptor(n,t);return i.get?i.get.call(arguments.length<3?e:r):i.value}},C.apply(null,arguments)}function M(e){return M=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},M(e)}function D(e,t){return D=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},D(e,t)}var O=function(e){function t(e){var r;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(e,t,r){return t=M(t),function(e,t){if(t&&("object"==_(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e)}(e,A()?Reflect.construct(t,r||[],M(e).constructor):t.apply(e,r))}(this,t)).res=null,r.setup(e),r.code=[],r.isLast=!1,r.constrObj=e,r.code.push("\n new Wrapper() \n"),r}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&D(e,t)}(t,e),r=t,n=[{key:"isLasta",value:function(){return this.isLast=!0,this}},{key:"toCode",value:function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;if(this.code=[],this.excludeFromCodeTrue)return[""];var r=" ".repeat(t),n="".concat(r,'new Wrapper("').concat(this.constrObj,'")');if(this.constrObj||(n="".concat(r,"new Wrapper()")),Object.keys(this.obj).length){var i=Object.fromEntries(Object.entries(this.obj).filter(function(e){var t=function(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=r){var n,i,o,a,s=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(s.push(n.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return s}}(e,t)||E(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}(e,2);return t[0],null!==t[1]})),o=JSON.stringify(i,null,2).replace(/"([^"]+)":/g,"$1:");n+="\n".concat(r," .set(").concat(o,")")}return null!==(e=this.items)&&void 0!==e&&e.length&&(n+="\n".concat(r," .add([\n")+this.items.map(function(e){return e.toCode(t+4)}).join(",\n")+"\n".concat(r," ])")),[n+="\n".concat(r)]}},{key:"getType",value:function(){return"LayoutWrapperElement"}},{key:"setArea",value:function(e){return this.res.style.gridArea=e,this}},{key:"removeQuotesFromFirstWord",value:function(e){return e.replace(/"([^"]+)":/g,"$1:")}},{key:"clicked",value:function(e){return this.res.addEventListener("click",e),this}},{key:"onTap",value:function(e){return this.res.addEventListener("click",e),this}},{key:"gpos",value:function(e){return this.res.style.gridColumn=e.col,this.res.style.gridRow=e.row,this}},{key:"set",value:function(e){this.obj=e,this.commonMethods(e),e.onTap&&this.onTap(e.onTap);var r=".set({";e.isHidden&&this.isHidden(e.isHidden),e.scale&&(this.res.style.scale=e.scale),e.scale&&(r+="scale: ".concat(e.scale)),e.keySet&&this.keySet(e.keySet),e.resprop&&this.resprop(e.resprop),e.position&&(this.res.style.position=e.position),void 0!==e.top&&(this.res.style.top=e.top),e.pad&&this.pad(e.pad),e.mar&&this.mar(e.mar),e.arrpad&&(r+="pad: {sides: [".concat(e.arrpad.sides.map(function(e){return'"'.concat(e,'"')}).join(", "),'], value: "').concat(e.arrpad.value,'"}, ')),e.gpos&&this.gpos(e.gpos);var n,i,o,a=[],s=e.transform&&"object"===_(e.transform);if(e.stroke||e.gradient||e.span||e.backgroundOp||e.layout||e.shadow||e.animation||e.filtera||s){e.gradient&&(this.globalGradient=e.gradient.op.gradient,"radial"===e.gradient.op.direction&&(this.globalGradient="radial-gradient(circle at center, orange, green)")),e.stroke&&(n=t,i=this,"function"==typeof(o=C(M(1&3?n.prototype:n),"setAny",i))?function(e){return o.apply(i,e)}:o)([{globalBlast:"".concat(e.stroke.op.width," ").concat(e.stroke.op.color)}]),e.span&&(e.span.prevText=this.text);var l=[e.stroke,e.gradient,e.animation,e.span,e.backgroundOp,e.layout,e.marginOp,e.shadow,e.animation,e.filtera,s?e.transform:void 0];l=l.filter(function(e){return null!=e});for(var c=0;c<l.length;c++)a.push({range:l[c].range,log:l[c].op.name,target:l[c].target,op:l[c].op});var u=[];e.borderObj&&u.push("border"),e.background&&u.push("background"),e.mar&&u.push("margin"),e.animation&&u.push("animation"),e.span&&u.push("span"),s&&u.push("transform"),e.gradient&&u.push("gradient"),e.blast,console.log("CARA IS "),console.log(a),this.options=e,this.chainReact(a,this.options.id,u)}if(e.centerColumn&&(this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.alignItems="center",e.centerColumn&&(r+="centerColumn: ".concat(e.centerColumn,","))),e.mboth&&(this.res.style.marginRight="auto")&&(this.res.style.marginLeft="auto"),e.mar&&this.mar(e.mar),e.sticky&&this.sticky(),e.transition&&(this.res.style.transition=e.transition),e.class&&this.res.setAttribute("class",e.class),e.ga&&(this.res.style.gridArea=e.ga),e.opacity&&(0==e.opacity&&(this.res.style.opacity=0),e.opacity&&(this.res.style.opacity=e.opacity)),e.maxHeight&&(this.res.style.maxHeight=e.maxHeight),e.id&&this.res.setAttribute("id",e.id),e.arrpad&&this.arrayPadding(e.arrpad.sides,e.arrpad.value),e.arrpad&&(r+="arrpad: {sides: [".concat(e.arrpad.sides.map(function(e){return'"'.concat(e,'"')}).join(", "),'], value: "').concat(e.arrpad.value,'"}, ')),e.arrayMargin&&this.arrayMargin(e.arrayMargin.sides,e.arrayMargin.value),e.arrayMargin&&(r+='\n arrayMargin: {sides: ["'.concat(e.arrayMargin.sides,'"], value: "').concat(e.arrayMargin.value,'"},')),e.center&&this.toCenter(e.center),e.center&&(r+='center: "'.concat(e.center,'",')),e.simpleCenter&&this.simpleCenter(),e.simpleCenter&&(r+='center: "'.concat(e.simpleCenter,'",')),e.filter&&(this.res.style.backdropFilter="blur(3px)"),e.radius&&this.corner(e.radius),e.radius&&(r+='\n radius: "'.concat(e.radius,'",')),e.border&&this.border(e.border),e.simpleBorder&&(this.res.style.border=e.simpleBorder),e.width&&this.width(e.width),e.width&&(r+='\n width: "'.concat(e.width,'",')),e.overflow&&(r+='\n overflow: "'.concat(e.overflow,'",')),e.height&&this.heightNoAuto(e.height),e.height&&(r+='\n height: "'.concat(e.height,'",')),e.align&&this.flexAlign(e.align),e.align&&(r+='\n align: "'.concat(e.align,'",')),e.borderObj&&(this.res.style.border="".concat(e.borderObj.width," solid ").concat(e.borderObj.color),void 0!==e.borderObj.radius&&(this.res.style.borderRadius=e.borderObj.radius)),e.borderObja&&(this.res.style.border="".concat(e.borderObja.width," solid ").concat(e.borderObja.color),void 0!==e.borderObja.radius&&(this.res.style.borderRadius=e.borderObja.radius)),e.font&&this.font(e.font),e.font&&(r+='font: "'.concat(e.font,'",')),e.maxWidth&&this.maxWidth(e.maxWidth),e.flexCenter&&this.flexc(e.flexCenter),e.multipad&&this.makeMultiPad(e.multipad),e.multimargin&&this.makeMultiMargin(e.multimargin),e.color&&this.color(e.color),e.background&&this.background(e.background),e.background&&(r+='background: "'.concat(e.background,'",')),e.weight&&this.weight(e.weight),e.paddings&&this.paddingo(e.paddings),e.area&&this.setArea(e.area),e.area&&(r+='area: "'.concat(e.area,'"')),e.column&&this.makeCol(),e.column&&(r+='\n column: "'.concat(e.column,'",')),e.alignIts&&(this.res.style.background="gray"),e.alignIts&&(this.res.style.alignItems="flex-start"),e.alignIts&&(this.res.style.justifyItems="flex-start"),e.customAlign&&(this.res.style.alignItems=e.customAlign),e.customJustify&&(this.res.style.justifyItems=e.customJustify),e.disp&&(this.res.style.display=e.disp),e.flexDir&&(this.res.style.flexDirection=e.flexDir),e.flexDir&&(this.res.style.display="flex"),e.flexDir&&(r+='\n flexDir: "'.concat(e.flexDir,'",')),e.zIndex&&(this.res.style.zIndex=e.zIndex),e.transform&&"object"===_(e.transform)&&this.reactOnTransform(e.transform),e.name&&(this.name=e.name),e.responsive&&this.rsp(e.responsive),e.stretch){e.stretch&&this.stretch(e.stretch);var d=this.removeQuotesFromFirstWord(JSON.stringify(e.stretch));r+="\n stretch: ".concat(d,",")}for(var f in e)if("margin"===f){var h=e[f];if(Array.isArray(h)&&h.length>0){var p,m=k(h);try{for(m.s();!(p=m.n()).done;){var v=p.value;v.hasOwnProperty("top")&&(this.res.style.marginTop=v.top),v.hasOwnProperty("right")&&(this.res.style.marginRight=v.right),v.hasOwnProperty("bottom")&&(this.res.style.marginBottom=v.bottom),v.hasOwnProperty("left")&&(this.res.style.marginLeft=v.left)}}catch(e){m.e(e)}finally{m.f()}}}return 8===(r+="})\n").length&&(r=""),this.code.push(r),this}},{key:"rsp",value:function(e){var t=this;this.res.style.display="flex";var r=e.sequence.split("-"),n=function(){var n=e.ranges;"0px"!==n[0]&&n.unshift("0px");for(var i=0;i<n.length-1;i++)(window.matchMedia("(min-width: ".concat(n[i],") and (max-width: ").concat(n[i+1],")")).matches||window.matchMedia("(min-width: ".concat(n[n.length-1],")")).matches)&&("row"===r[i]&&(t.res.style.flexDirection="row",t.res.style.border="3px solid green"),"col"===r[i]&&(t.res.style.flexDirection="column",t.res.style.border="3px solid purple"));return t};window.addEventListener("resize",n),n()}},{key:"sticky",value:function(){return this.res.style.position="sticky",this.res.style.top=0,this}},{key:"toSticky",value:function(){return this.res.style.position="sticky",this.res.style.top="0",this}},{key:"stretch",value:function(e){var t=this,r=function(){window.matchMedia("(max-width: ".concat(e.at,")")).matches?t.res.style.width="auto":window.matchMedia("(max-device-width: 415px)").matches?t.res.style.width="100%":t.res.style.width=e.backTo};r(),window.addEventListener("resize",r)}},{key:"makeCol",value:function(){return this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.alignItems="flex-start",this}},{key:"paddingo",value:function(e){return this.res.style.padding=e,this}},{key:"toCenter",value:function(e){return this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.justifyContent="center","both"===e&&(this.res.style.alignItems="center"),this}},{key:"simpleCenter",value:function(){return this.res.style.justifyContent="center",this.res.style.justifyItems="center",this.res.style.alignContent="center",this.res.style.alignItems="center",this}},{key:"color",value:function(e){return this.res.style.color=e,this}},{key:"weight",value:function(e){return this.res.style.fontWeight=e,this}},{key:"makeMultiPad",value:function(e){for(var t=0;t<e.length;t++)"left"===e[t].side&&(this.res.style.paddingLeft=e[t].value),"right"===e[t].side&&(this.res.style.paddingRight=e[t].value);return this}},{key:"makeMultiMargin",value:function(e){this.res.style.zIndex="1";for(var t=0;t<e.length;t++)"left"===e[t].side&&(this.res.style.marginLeft=e[t].value),"right"===e[t].side&&(this.res.style.marginRight=e[t].value),"top"===e[t].side&&(this.res.style.marginTop=e[t].value),"bottom"===e[t].side&&(this.res.style.marginBottom=e[t].value);return this}},{key:"flexc",value:function(e){return this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.justifyContent="center",this}},{key:"maxWidth",value:function(e){return this.res.style.maxWidth=e,this}},{key:"font",value:function(e){return this.res.style.fontFamily=e,this}},{key:"flexAlign",value:function(e){return this.res.style.display="flex",this.res.style.justifyContent="flex-start",this.res.style.alignItems="flex-start","center"===e?(this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.alignItems="center",this):this}},{key:"width",value:function(e){return this.res.style.width=e,this}},{key:"heightNoAuto",value:function(e){return this.res.style.height=e,this}},{key:"border",value:function(e){return this.res.style.borderRadius="".concat(e.radius,"px"),this.res.style.padding="0.25em",this.res.style.border="".concat(e.width,"px solid ").concat(e.color),this}},{key:"toCol",value:function(){return this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.justifyContent="center",this.res.style.alignItems="center",this}},{key:"add",value:function(e){this.items=e,this.code.push(".add([ \n");var t=e.map(function(t,r){return t.toCode().flatMap(function(e){return e}).join("")+(r<e.length-1?",":"")}).join("");this.code.push(t);for(var r=0;r<e.length;r++)if(void 0!==e[r]&&void 0!==e[r].toCode){var n=e[r].render();this.res.appendChild(n)}return this.code.push("])"),this}},{key:"arrayPadding",value:function(e,t){return e.includes("left")&&(this.res.style.paddingLeft=t),e.includes("right")&&(this.res.style.paddingRight=t),e.includes("top")&&(this.res.style.paddingTop=t),e.includes("bottom")&&(this.res.style.paddingBottom=t),this}},{key:"arrayMargin",value:function(e,t){return t||(this.res.style.marginLeft="".concat(e[0],"px"),this.res.style.marginTop="".concat(e[1],"px"),this.res.style.marginRight="".concat(e[2],"px"),this.res.style.marginBottom="".concat(e[3],"px")),e.includes("left")&&(this.res.style.marginLeft=t),e.includes("right")&&(this.res.style.marginRight=t),e.includes("top")&&(this.res.style.marginTop=t),e.includes("bottom")&&(this.res.style.marginBottom=t),this}},{key:"setWidth",value:function(e){this.res.style.width="100vw"}},{key:"setHeight",value:function(e){return this.res.style.height="".concat(e),this}},{key:"setup",value:function(e){var t=null;return e?(e.isLink&&(t=document.createElement("a")),"aside"===e&&(t=document.createElement("aside")),"article"===e&&(t=document.createElement("article")),"main"===e&&(t=document.createElement("main")),"section"===e&&(t=document.createElement("section")),"header"===e&&(t=document.createElement("header")),"footer"===e&&(t=document.createElement("footer"))):t=document.createElement("div"),e&&e.isLink&&(t.style.textDecoration="none",t.setAttribute("href",e.child)),this.res=t,this.res.style.margin=0,this.res.style.padding=0,e&&!0===e.hideOverflow&&(this.res.style.overflow="hidden",this.res.style.overflowY="scroll"),e&&!0===e.center&&(this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.justifyContent="center",this.res.style.alignItems="center"),e&&"left"===e.align&&(this.res.style.alignItems="flex-start"),e&&"right"===e.align&&(this.res.style.alignItems="flex-end"),e&&e.height&&(this.res.style.height=e.height),e&&e.width&&(this.res.style.width=e.width,this.res.style.marginLeft="auto",this.res.style.marginRight="auto",window.matchMedia("(max-device-width: 415px)").matches&&(this.res.style.width="95%")),this}},{key:"height",value:function(e){return this.res.style.width="auto",this.res.style.height="".concat(e),this}},{key:"size",value:function(e,t){return this.w=e,this.h=t,this.w?this.res.style.width=this.w:this.res.style.width=window.innerWidth,this.h?this.res.style.height=this.h:this.res.style.height=window.innerHeight,this}},{key:"background",value:function(e){return this.res.style.background=e,this}},{key:"corner",value:function(e){return this.res.style.borderRadius=e,this}},{key:"padding",value:function(e,t,r,n){return this.res.style.paddingLeft=e,this.res.style.paddingTop=t,this.res.style.paddingRight=r,this.res.style.paddingBottom=n,this}},{key:"margin",value:function(e,t,r,n){return this.res.style.marginLeft=e,this.res.style.marginTop=t,this.res.style.marginRight=r,this.res.style.marginBottom=n,this}},{key:"itemWidth",value:function(e){for(var t=0;t<this.res.childNodes.length;t++)this.res.childNodes[t].style.width=e;return this}},{key:"apply",value:function(e){var t=this,r=function(){for(var r=0;r<e.length;r++){var n=e[r],i=window.matchMedia("(max-width: ".concat(n.width,"px)"));n.device&&(i=window.matchMedia("(max-device-width: ".concat(n.width,"px)")),alert(n.device)),i.matches&&Object.assign(t.res.style,n.styles)}},n=window.matchMedia("(max-width: ".concat(e[0].width,"px)"));return e[0].device&&(n=window.matchMedia("(max-device-width: ".concat(e[0].width,"px)"))),n.matches||Object.assign(this.res.style,e[0].styles),r(),window.addEventListener("resize",r),this}},{key:"mount",value:function(e){document.querySelector(e).appendChild(this.res)}},{key:"render",value:function(e){return e?(document.querySelector("#mount"),document.querySelector(e).appendChild(this.res),this):this.res}}],n&&S(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(function(){return e=function e(){var t,r,n,i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=this,n=function(e){if(console.log("LOBJO IS"),console.log("REPO"),console.log(i.res),console.log(e),e.transform||e.op){console.log("SIMPLIFIED"),console.log(e.transform),console.log(e.op);var t=e.op;e.transform||(t=e.op),t.duration||(t.duration="3s-ease-in-out"),console.log("ENTERING"),console.log(t),i.setDefault=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0px";return 0===e.length?t+" ":e};var r=function(){var r="",n="",o="",a="",s="",l="",c="",u="",d="";if(console.log("ERRA - still nested"),console.log(t),0!==t.values.length){console.warn(t),t.values.forEach(function(e){e.startsWith("tx:")&&(r=e.replace("tx:","")),e.startsWith("ty:")&&(n=e.replace("ty:","")),e.startsWith("tz:")?o=e.replace("tz:",""):e.startsWith("scale(")?a=e:e.startsWith("skew(")?s=e:e.startsWith("rotate(")?l=function(e){var t=e.match(/rotate\(([^)]+)\)/);if(!t)return e;var r=t[1].split(",").map(function(e){return e.trim()});return 1===r.length?"rotate(".concat(r[0],")"):2===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],")"):3===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],") rotate(").concat(r[2],")"):e}(e):e.startsWith("perspective(")?c=e:e.startsWith("matrix(")?u=e:e.startsWith("opacity:")&&(d=e.replace("opacity:",""))}),r=i.setDefault(r),n=i.setDefault(n),o=i.setDefault(o);var f="";if("0px"!=n&&"0px"!=r&&"0px"!=o?f+="translate3d(".concat(r,", ").concat(n,", ").concat(o,")"):"0px"==n&&"0px"==r||(f+="translate(".concat(r,", ").concat(n,")")),a&&(f+=" ".concat(a)),l&&(f+=" ".concat(l)),s&&(f+=" ".concat(s)),c&&(f+=" ".concat(c)),u&&(f+=" ".concat(u)),f){if(e.op.duration){var h=e.op.duration.replace(/^(\d+)(s)-/,function(e,t,r){return t/2+r+" "}),p="transform ".concat(h,", opacity ").concat(h);i.res.style.transition=p}else i.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";e.op.static&&(i.res.style.transition=""),(i.blastTarget||i.res).style.transform=f,i.res.style.opacity=d}else alert("OPE")}};t.on?i.res.addEventListener(t.on,function(){t.delay?setTimeout(function(){r()},t.delay):r()}):window.addEventListener("load",function(){t.delay?setTimeout(function(){r()},t.delay):r()});var n=function(){var e="";console.log("RESET"),console.log(t),t.values.forEach(function(t){t.startsWith("tx:")?e+="translateX(0) ":t.startsWith("ty:")?e+="translateY(0) ":t.startsWith("tz:")?e+="translateZ(0) ":t.startsWith("scale(")?e+="scale(1) ":t.startsWith("skew(")?e+="skew(0, 0) ":t.startsWith("rotate(")?e+="rotate(0) ":t.startsWith("perspective(")?e+="perspective(0) ":t.startsWith("matrix(")&&(e+="matrix(1, 0, 0, 1, 0, 0) "),i.res.style.opacity="1"}),e&&(i.res.style.transform=e.trim())};if(t.on)i.res.addEventListener("mouseout",function(){t.keep||n()});else{var o=1e3*parseFloat(t.duration),a=t.closeAfter?t.closeAfter:0;setTimeout(function(){t.keep||n()},o/2+a)}t.hardCSS&&(i.res.style.transform=t.hardCSS)}else alert("THIS FIRE WITH GRADIENT (invalid block"),console.log("INVALID BLOCKA"),console.log(e)},(r=w(r="reactOnTransform"))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,this.state={isExpanded:!1,isMovedUp:!1,isMovedDown:!1},this.openedElements=new WeakMap,"undefined"!=typeof document&&(this._themeUnsub=o.subscribe(function(e){return i._applyTheme(e)}),Promise.resolve().then(function(){return i._applyTheme(o.mode)}))},t=[{key:"rasterize",value:function(e){var t=this;if(e&&0!==e.length&&!this._rasterHandle&&"undefined"!=typeof document&&"undefined"!=typeof setTimeout){var r=0,n=function(){if(!t._rasterHandle){if(t.res&&t.res.isConnected){try{t._rasterHandle=function(e,t){if(!e||"undefined"==typeof document||"undefined"==typeof window)return null;if(!t||0===t.length)return null;if("function"==typeof window.matchMedia&&window.matchMedia("(prefers-reduced-motion: reduce)").matches)return null;if(e.querySelector&&e.querySelector(":scope > canvas[data-nodality-raster]"))return null;var r=function(){var t=e.getBoundingClientRect();return{width:Math.max(t.width,e.scrollWidth||0),height:Math.max(t.height,e.scrollHeight||0)}},n=r();if(n.width<2||n.height<2)return null;var i=Math.min(window.devicePixelRatio||1,2),o=t.some(function(e){return(f[e.op]||{}).overlay}),l=t.every(function(e){return(f[e.op]||{}).overlay}),c=!l&&!t.some(function(e){return!1===e.live}),h="undefined"!=typeof WebGL2RenderingContext&&"texElementImage2D"in WebGL2RenderingContext.prototype||"undefined"!=typeof WebGLRenderingContext&&"texElementImage2D"in WebGLRenderingContext.prototype,m=c&&h;c&&!m&&console.info("[nodality] HTML-in-Canvas API not available - raster ops fall back to snapshot capture.");var v=document.createElement("canvas");m&&v.setAttribute("layoutsubtree","");var y={alpha:!0,premultipliedAlpha:!1},g=v.getContext("webgl2",y)||v.getContext("webgl",y);if(!g)return null;var x="undefined"!=typeof WebGL2RenderingContext&&g instanceof WebGL2RenderingContext,b=x&&t.some(function(e){return(f[e.op]||{}).mips});m&&!("texElementImage2D"in g)&&(console.info("[nodality] texElementImage2D missing on the created context - snapshot fallback."),v.removeAttribute("layoutsubtree"),m=!1),"static"===window.getComputedStyle(e).position&&(e.style.position="relative"),v.width=Math.round(n.width*i),v.height=Math.round(n.height*i),v.setAttribute("data-nodality-raster",m?"live":"snapshot"),console.info("[nodality] raster backend:",m?"html-in-canvas (live)":"snapshot");var w=e;if(m){for(var k=document.createElement("div");e.firstChild;)k.appendChild(e.firstChild);v.appendChild(k),w=k,v.style.cssText="display:block;width:".concat(n.width,"px;height:").concat(n.height,"px;")}else v.style.cssText="position:absolute;top:0;left:0;"+"width:".concat(n.width,"px;height:").concat(n.height,"px;")+"pointer-events:none;z-index:2147483000;",v.setAttribute("aria-hidden","true");e.appendChild(v);var _=function(e,t){var r=g.createShader(e);if(g.shaderSource(r,t),g.compileShader(r),!g.getShaderParameter(r,g.COMPILE_STATUS))throw new Error("[nodality] raster shader: "+g.getShaderInfoLog(r));return r},E=g.createProgram();g.attachShader(E,_(g.VERTEX_SHADER,p)),g.attachShader(E,_(g.FRAGMENT_SHADER,function(e){var t="",r="",n="",i="",o="";e.forEach(function(e,a){var s=f[e.op];if(s){var l="u".concat(a,"_");t+=s.decl(l,e)+"\n",(Array.isArray(s.stage)?s.stage:[s.stage]).forEach(function(t){var a=s.code(l,e,t)+"\n";"warp"===t?r+=a:"cell"===t?n+=a:"displace"===t?i+=a:o+=a})}});var a=e.some(function(e){return"edges"===e.op})?"":" col *= 1.0 - edge * 0.55;",s=e.some(function(e){return(f[e.op]||{}).chroma})?"\n vec2 cpx = vec2(chroma.x, -chroma.y) / u_res;\n col.r = texture2D(u_tex, clamp(uv + cpx, 0.001, 0.999)).r;\n col.b = texture2D(u_tex, clamp(uv - cpx, 0.001, 0.999)).b;":"";return"\nprecision highp float;\nuniform sampler2D u_tex;\nuniform vec2 u_res;\nuniform vec2 u_mouse;\nuniform float u_time;\n".concat(t,"\nvoid main() {\n vec2 frag = vec2(gl_FragCoord.x, u_res.y - gl_FragCoord.y);\n vec2 warped = frag;\n").concat(r,"\n vec2 center = warped;\n float edge = 0.0;\n").concat(n,"\n vec2 sampleP = warped;\n vec2 chroma = vec2(0.0);\n").concat(i,"\n vec2 uv = vec2(sampleP.x / u_res.x, 1.0 - sampleP.y / u_res.y);\n vec4 tex = texture2D(u_tex, clamp(uv, 0.001, 0.999));\n vec3 col = tex.rgb;").concat(s,"\n vec3 edgeCol = vec3(1.0);\n float edgeCov = 0.0;\n vec3 ovCol = vec3(0.0);\n float ovA = 0.0;\n").concat(o,"\n").concat(a,"\n // content OVER border\n float baseA = tex.a + edgeCov * (1.0 - tex.a);\n vec3 baseRGB = (col * tex.a + edgeCol * edgeCov * (1.0 - tex.a)) / max(baseA, 1e-4);\n // overlay OVER (content+border)\n float outA = ovA + baseA * (1.0 - ovA);\n vec3 outRGB = (ovCol * ovA + baseRGB * baseA * (1.0 - ovA)) / max(outA, 1e-4);\n gl_FragColor = vec4(outRGB, outA);\n}")}(t))),g.bindAttribLocation(E,0,"a"),g.linkProgram(E),g.useProgram(E),g.bindBuffer(g.ARRAY_BUFFER,g.createBuffer()),g.bufferData(g.ARRAY_BUFFER,new Float32Array([-1,-1,3,-1,-1,3]),g.STATIC_DRAW),g.enableVertexAttribArray(0),g.vertexAttribPointer(0,2,g.FLOAT,!1,0,0);var T=function(e){return g.getUniformLocation(E,e)},S=function(e,t,r){"1f"===t?g.uniform1f(e,r):"1i"===t?g.uniform1i(e,r):"2fv"===t?g.uniform2fv(e,r):"3fv"===t&&g.uniform3fv(e,r)};t.forEach(function(e,t){var r=f[e.op];if(r&&r.uniforms){var n=r.uniforms(e,i);for(var o in n)S(T("u".concat(t,"_").concat(o)),n[o][0],n[o][1])}});var R=[];t.forEach(function(e,t){var r=f[e.op];r&&"function"==typeof r.init&&R.push({i:t,def:r,state:r.init(e,i,v.width,v.height)})});var A="undefined"!=typeof performance?performance.now():0,C=[];t.forEach(function(e,t){var r=f[e.op];if(r&&r.solver){var n=function(e,t){var r=f[e.op];if(!x||!g.getExtension("EXT_color_buffer_float"))return console.info("[nodality] '"+e.op+"' needs WebGL2 float render targets - op skipped."),null;g.getExtension("OES_texture_float_linear");var n=r.solver.resolutions(e),i={r:[g.R16F,g.RED],rg:[g.RG16F,g.RG],rgba:[g.RGBA16F,g.RGBA]},o=[],s=function(e,t,r){var n=a(i[t],2),s=n[0],l=n[1],c=g.createTexture();g.bindTexture(g.TEXTURE_2D,c);var u=r?g.LINEAR:g.NEAREST;g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MIN_FILTER,u),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MAG_FILTER,u),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_S,g.CLAMP_TO_EDGE),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_T,g.CLAMP_TO_EDGE),g.texImage2D(g.TEXTURE_2D,0,s,e,e,0,l,g.HALF_FLOAT,null);var d=g.createFramebuffer();g.bindFramebuffer(g.FRAMEBUFFER,d),g.framebufferTexture2D(g.FRAMEBUFFER,g.COLOR_ATTACHMENT0,g.TEXTURE_2D,c,0);var f=g.checkFramebufferStatus(g.FRAMEBUFFER)===g.FRAMEBUFFER_COMPLETE;g.viewport(0,0,e,e),g.clearColor(0,0,0,1),g.clear(g.COLOR_BUFFER_BIT);var h={tex:c,fbo:d,size:e,ok:f};return o.push(h),h},l={},c=!0;for(var u in r.solver.targets){var d=r.solver.targets[u],h=n[d.res];d.double?(l[u]={a:s(h,d.fmt,d.smooth),b:s(h,d.fmt,d.smooth)},c=c&&l[u].a.ok&&l[u].b.ok):(l[u]={a:s(h,d.fmt,d.smooth)},c=c&&l[u].a.ok)}g.bindFramebuffer(g.FRAMEBUFFER,null);var m=function(){return o.forEach(function(e){g.deleteFramebuffer(e.fbo),g.deleteTexture(e.tex)})};if(!c)return console.info("[nodality] '"+e.op+"' float targets incomplete - op skipped."),m(),null;var v={};try{for(var y in r.solver.programs){var b=g.createProgram();if(g.attachShader(b,_(g.VERTEX_SHADER,p)),g.attachShader(b,_(g.FRAGMENT_SHADER,r.solver.programs[y])),g.bindAttribLocation(b,0,"a"),g.linkProgram(b),!g.getProgramParameter(b,g.LINK_STATUS))throw new Error(y+": "+g.getProgramInfoLog(b));v[y]={prog:b,loc:{}}}}catch(t){for(var w in console.warn("[nodality] '"+e.op+"' solver programs failed:",t),m(),v)g.deleteProgram(v[w].prog);return null}return g.useProgram(E),{i:t,node:e,def:r,res:n,targets:l,progs:v,cleanup:m,prevX:.5,prevY:.5,primed:!1}}(e,t);n&&C.push(n)}});var M=function(e,t){var r=null,n={res:e.res,use:function(t){r=e.progs[t],g.useProgram(r.prog)},u:function(e){return e in r.loc||(r.loc[e]=g.getUniformLocation(r.prog,e)),r.loc[e]},f1:function(e,t){g.uniform1f(n.u(e),t)},f2:function(e,t,r){g.uniform2f(n.u(e),t,r)},f3:function(e,t,r,i){g.uniform3f(n.u(e),t,r,i)},smp:function(e,t,r){g.activeTexture(g.TEXTURE0+r),g.bindTexture(g.TEXTURE_2D,t.tex),g.uniform1i(n.u(e),r)},read:function(t){return e.targets[t].a},write:function(t){return e.targets[t].b},single:function(t){return e.targets[t].a},swap:function(t){var r=e.targets[t],n=r.a;r.a=r.b,r.b=n},blit:function(e){g.bindFramebuffer(g.FRAMEBUFFER,e.fbo),g.viewport(0,0,e.size,e.size),g.drawArrays(g.TRIANGLES,0,3)}},i=U[0]/v.width,o=1-U[1]/v.height,a=0,s=0;e.primed&&(a=(i-e.prevX)/Math.max(t,.001),s=(o-e.prevY)/Math.max(t,.001)),e.prevX=i,e.prevY=o,e.primed=!0;var l=Math.abs(a)+Math.abs(s)>.001;e.def.solver.step(n,e.node,{dt:t,px:i,py:o,dx:a,dy:s,moving:l,aspect:v.width/Math.max(v.height,1),col:e.def.solver.splatColor(e.node,a,s)})},D=g.createTexture();g.bindTexture(g.TEXTURE_2D,D),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_MIN_FILTER,b?g.LINEAR_MIPMAP_LINEAR:g.LINEAR),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_S,g.CLAMP_TO_EDGE),g.texParameteri(g.TEXTURE_2D,g.TEXTURE_WRAP_T,g.CLAMP_TO_EDGE),g.pixelStorei(g.UNPACK_FLIP_Y_WEBGL,!0);var O=function(){b&&g.generateMipmap(g.TEXTURE_2D)},I=!1,F=!1,L=m?"live":"snapshot",j=!1,P=function(){if(o){var t=function(){var t="IMG"===e.tagName?e:e.querySelector?e.querySelector("img"):null;return t&&t.complete&&t.naturalWidth>0?t:null}();if(t)try{return g.bindTexture(g.TEXTURE_2D,D),g.texImage2D(g.TEXTURE_2D,0,g.RGBA,g.RGBA,g.UNSIGNED_BYTE,t),O(),I=!0,Promise.resolve()}catch(e){}else if(!j){var r="IMG"===e.tagName?e:e.querySelector&&e.querySelector("img");r&&(j=!0,r.addEventListener("load",function(){F||P()},{once:!0}))}}v.style.display="none";var a=e.style.visibility;e.style.visibility="";var s=function(e,t,r,n){return new Promise(function(i,o){var a=(new XMLSerializer).serializeToString(e),s='<svg xmlns="http://www.w3.org/2000/svg" width="'.concat(t*n,'" height="').concat(r*n,'" viewBox="0 0 ').concat(t," ").concat(r,'">')+'<foreignObject width="100%" height="100%">'+'<div xmlns="http://www.w3.org/1999/xhtml">'.concat(a,"</div>")+"</foreignObject></svg>",l=new Image;l.onload=function(){return i(l)},l.onerror=o,l.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent(s)})}(e,n.width,n.height,i).then(function(t){F||(g.bindTexture(g.TEXTURE_2D,D),g.texImage2D(g.TEXTURE_2D,0,g.RGBA,g.RGBA,g.UNSIGNED_BYTE,t),O(),I=!0,e.style.visibility=l?"":"hidden",v.style.visibility="visible")}).catch(function(t){e.style.visibility=a,console.warn("[nodality] raster snapshot failed:",t)});return v.style.display="",s},W=-1,B=function(){if(!F&&"live"===L){g.bindTexture(g.TEXTURE_2D,D);var e,t=g.RGBA8||32856,r=[[g.TEXTURE_2D,t,w],[g.TEXTURE_2D,0,g.RGBA,g.RGBA,g.UNSIGNED_BYTE,w],[g.TEXTURE_2D,0,t,w],[g.TEXTURE_2D,0,w]];if(W>=0)e=[W];else{e=[0,1,2,3];var n={3:0,6:1,4:2}[g.texElementImage2D.length];null!=n&&(e.splice(e.indexOf(n),1),e.unshift(n))}var i,o=[],a=s(e);try{for(a.s();!(i=a.n()).done;){var l=i.value;try{return g.texElementImage2D.apply(g,r[l]),O(),W<0&&(W=l,console.info("[nodality] texElementImage2D signature discovered: form",l,"(declared arity "+g.texElementImage2D.length+")")),void(I=!0)}catch(e){o.push("form"+l+" -> "+(e&&e.name?e.name:"?")+": "+(e&&e.message?e.message:e))}}}catch(e){a.e(e)}finally{a.f()}z("texElementImage2D rejected all known signatures (arity "+g.texElementImage2D.length+"): "+o.join(" | "))}},z=function(t){if(!F&&"live"===L){for(L="snapshot",console.warn("[nodality] live raster backend failed ("+t+") - falling back to snapshot."),v.removeEventListener("paint",B);w.firstChild;)e.appendChild(w.firstChild);w.parentNode===v&&v.removeChild(w),v.removeAttribute("layoutsubtree"),v.style.cssText="position:absolute;top:0;left:0;"+"width:".concat(n.width,"px;height:").concat(n.height,"px;")+"pointer-events:none;z-index:2147483000;",v.setAttribute("aria-hidden","true"),v.setAttribute("data-nodality-raster","snapshot-fallback"),P()}};m&&(v.addEventListener("paint",B),setTimeout(function(){F||"live"!==L||I||z("no paint event within 1500ms")},1500));var U=[.5*v.width,.5*v.height],N=function(e){var t=v.getBoundingClientRect(),r=e.touches?e.touches[0]:e;U=[(r.clientX-t.left)*i,(r.clientY-t.top)*i]};e.addEventListener("mousemove",N,{passive:!0}),e.addEventListener("touchmove",N,{passive:!0});var G=0,X=0,H=function(){G=1},q=function(){G=0};e.addEventListener("mouseenter",H,{passive:!0}),e.addEventListener("mouseleave",q,{passive:!0});var Y=[];t.forEach(function(e,t){var r=f[e.op]||{},n=e.by||r.defaultDriver;n&&u[n]?Y.push({i:t,fn:u[n]}):e.by&&console.warn("[nodality] unknown driver '"+e.by+"' on op '"+e.op+"' - known drivers: "+d.join(", "))});var V=function(){if("undefined"==typeof window)return.5;var t=e.getBoundingClientRect(),r=window.innerHeight||1;return Math.max(0,Math.min(1,(r-t.top)/(r+t.height)))},$=0,J=!0,Q=function(){if(!F){if(J&&I){for(var e="undefined"!=typeof performance?performance.now():A+16,t=Math.max(0,(e-A)/1e3),r=0,n=C;r<n.length;r++){var i=n[r];M(i,t)}if(g.bindFramebuffer(g.FRAMEBUFFER,null),g.useProgram(E),g.viewport(0,0,v.width,v.height),g.clearColor(0,0,0,0),g.clear(g.COLOR_BUFFER_BIT),g.uniform2f(T("u_res"),v.width,v.height),g.uniform2f(T("u_mouse"),U[0],U[1]),g.uniform1f(T("u_time"),e/1e3),Y.length>0){X+=(G-X)*(1-Math.exp(8*-t));for(var o={mouseX:U[0],mouseY:U[1],w:v.width,h:v.height,t:e/1e3,hover:X,scroll:V()},a=0,l=Y;a<l.length;a++){var c=l[a],u=c.fn(o);g.uniform2f(T("u".concat(c.i,"_dpos")),u.x,u.y),g.uniform1f(T("u".concat(c.i,"_damt")),u.amt)}}if(R.length>0)for(var d={w:v.width,h:v.height,mouseX:U[0],mouseY:U[1],dt:t,t:e/1e3},f=0,h=R;f<h.length;f++){var p,m=h[f],y=s(m.def.tick(m.state,d));try{for(y.s();!(p=y.n()).done;){var x=p.value;S(T("u".concat(m.i,"_").concat(x.name)),x.kind,x.value)}}catch(e){y.e(e)}finally{y.f()}}g.activeTexture(g.TEXTURE0),g.bindTexture(g.TEXTURE_2D,D),g.uniform1i(T("u_tex"),0);for(var b=1,w=0,k=C;w<k.length;w++){var _=k[w],O=_.def.solver.samplers;for(var L in O)g.activeTexture(g.TEXTURE0+b),g.bindTexture(g.TEXTURE_2D,_.targets[O[L]].a.tex),g.uniform1i(T("u".concat(_.i,"_").concat(L)),b),b++}g.activeTexture(g.TEXTURE0),A=e,g.drawArrays(g.TRIANGLES,0,3)}$=requestAnimationFrame(Q)}},K=null;"undefined"!=typeof IntersectionObserver&&(K=new IntersectionObserver(function(e){var t=a(e,1)[0];J=t.isIntersecting})).observe(e);var Z=null,ee=0;"undefined"!=typeof ResizeObserver&&(Z=new ResizeObserver(function(){clearTimeout(ee),ee=setTimeout(function(){if(!F&&"snapshot"===L){var e=r();n.width=e.width,n.height=e.height,v.width=Math.round(e.width*i),v.height=Math.round(e.height*i),v.style.width=e.width+"px",v.style.height=e.height+"px",P()}},150)})).observe(e);var te=0,re=function(){clearTimeout(te),te=setTimeout(function(){if(!F){if("snapshot"===L){var t=r();return n.width=t.width,n.height=t.height,v.width=Math.round(t.width*i),v.height=Math.round(t.height*i),v.style.width=t.width+"px",v.style.height=t.height+"px",void P()}var o=e.clientWidth||e.parentElement&&e.parentElement.clientWidth||n.width;v.style.width=o+"px",setTimeout(function(){if(!F&&"live"===L){var e=Math.max(2,Math.round(w.getBoundingClientRect().height))||n.height;n.width=o,n.height=e,v.style.height=e+"px",v.width=Math.round(o*i),v.height=Math.round(e*i),B()}},50)}},150)};return"undefined"!=typeof window&&window.addEventListener("resize",re),"live"===L?$=requestAnimationFrame(Q):P().then(function(){$=requestAnimationFrame(Q)}),{canvas:v,refresh:function(){return"live"===L?B():P()},destroy:function(){F=!0,cancelAnimationFrame($),clearTimeout(ee),clearTimeout(te),K&&K.disconnect(),Z&&Z.disconnect(),"undefined"!=typeof window&&window.removeEventListener("resize",re),e.removeEventListener("mousemove",N),e.removeEventListener("touchmove",N),e.removeEventListener("mouseenter",H),e.removeEventListener("mouseleave",q),v.removeEventListener("paint",B);for(var t=0,r=C;t<r.length;t++){var n=r[t];for(var i in n.cleanup(),n.progs)g.deleteProgram(n.progs[i].prog)}for(C.length=0;w!==e&&w.firstChild;)e.appendChild(w.firstChild);e.style.visibility="",v.remove()}}}(t.res,e)}catch(e){return void console.warn("[nodality] raster pipeline skipped:",e)}if(t._rasterHandle)return}++r<80&&setTimeout(n,50)}};setTimeout(n,0)}}},{key:"isHidden",value:function(e){e&&(this.res.style.display="none")}},{key:"theme",value:function(e){var t=this;return e&&"object"===x(e)?(this._themeMap=e,this._applyTheme(o.mode),this._themeUnsub||(this._themeUnsub=o.subscribe(function(e){return t._applyTheme(e)})),this):this}},{key:"destroy",value:function(){return"function"==typeof this._themeUnsub&&(this._themeUnsub(),this._themeUnsub=null),this.res&&this.res.parentNode&&this.res.parentNode.removeChild(this.res),this}},{key:"_applyTheme",value:function(e){if(!this._noTheme&&this.res)if(this._themeMap){var t=this._themeMap[e];if(!t)return;for(var r in t)this.res.style[r]=t[r]}else{var n=o.defaults&&o.defaults[e];if(n)for(var i in this._themeOriginal||(this._themeOriginal={}),n)i in this._themeOriginal||(this._themeOriginal[i]=this.res.style[i]||""),this._themeOriginal[i]||(this.res.style[i]=n[i])}}},{key:"keySet",value:function(e){if(this.temporaryVal=1,Array.isArray(e)){for(var t=0;t<e.length;t++)e[t]&&null!=e[t].key&&(this.res.style[e[t].key]=e[t].value);return this}return this.res.style[e.key]=e.value,this}},{key:"commonMethods",value:function(e){var t={exact:"fontSize",cursor:"cursor",width:"width",maxWidth:"maxWidth",height:"height",maxHeight:"maxHeight",radius:"borderRadius",lineHeight:"lineHeight",background:"background",font:"fontFamily",opacity:"opacity",gap:"gap",minHeight:"minHeight",position:"position",inset:"inset",top:"top",right:"right",bottom:"bottom",left:"left",zIndex:"zIndex",flex:"flex",flexShrink:"flexShrink",flexGrow:"flexGrow",flexBasis:"flexBasis",flexWrap:"flexWrap",alignSelf:"alignSelf",display:"display",gridTemplateColumns:"gridTemplateColumns",gridTemplateRows:"gridTemplateRows",rowGap:"rowGap",columnGap:"columnGap",letterSpacing:"letterSpacing",textTransform:"textTransform",whiteSpace:"whiteSpace",overflowWrap:"overflowWrap",wordBreak:"wordBreak",wordWrap:"wordWrap",boxShadow:"boxShadow",backdropFilter:"backdropFilter",WebkitBackdropFilter:"WebkitBackdropFilter",overflow:"overflow",overflowX:"overflowX",overflowY:"overflowY",WebkitOverflowScrolling:"WebkitOverflowScrolling",WebkitTapHighlightColor:"WebkitTapHighlightColor",minWidth:"minWidth",boxSizing:"boxSizing",pointerEvents:"pointerEvents",userSelect:"userSelect",WebkitUserSelect:"WebkitUserSelect",textAlign:"textAlign",transition:"transition"};for(var r in t)null!=e[r]&&(this.res.style[t[r]]=e[r]);return"string"==typeof e.transform&&(this.res.style.transform=e.transform),e.pad&&this.pad(e.pad),e.mar&&this.mar(e.mar),e.respad&&this.respad(e.respad),e.resmar&&this.resmar(e.resmar),e.hover&&this.hover(e.hover),e.size&&this.fluidCopy(e.size),e.resprop&&this.resprop(e.resprop,e),e.keySet&&this.keySet(e.keySet),e.noTheme&&(this._noTheme=!0),e.theme&&this.theme(e.theme),e.hide&&this.isHidden(e.hide),e.raster&&this.rasterize(e.raster),e.transform&&"object"===x(e.transform)&&this.reactOnTransform(e.transform),void 0!==e.opacity&&(this.res.style.opacity=e.opacity),e.bold?this.res.style.fontWeight="bold":null!=e.weight&&(this.res.style.fontWeight=e.weight),this}},{key:"hover",value:function(e){var t=this;if(e.border){var r=e.border.width;this.res.style.border=r?"".concat(r,"px solid transparent"):"1px solid transparent"}var n=this.options&&this.options.borderObj;return n&&(this.res.style.border="".concat(n.width,"px solid ").concat(n.color)),this.prevColor=this.res.style.backgroundColor,this.foreColor=this.res.style.color,this.prevBorder=this.res.style.border,this.prevBoxShadow=this.res.style.boxShadow,e.animation&&(this.res.style.transition="".concat(e.animation),this.res.style.transionProperty="background, color, transform"),this.prevTransform=this.res.style.transform,this.res.onmouseout=function(){t.res.style.backgroundColor="".concat(t.prevColor),t.res.style.color="".concat(t.foreColor),t.res.style.border=t.prevBorder,null==e.scale&&null==e.transform||(t.res.style.transform=t.prevTransform||""),null!=e.boxShadow&&(t.res.style.boxShadow=t.prevBoxShadow||"")},this.res.onmouseover=function(){if(t.res.style.color=e.color,t.res.style.backgroundColor=e.background,e.border){var r,n=e.border.width,i=null!==(r=e.border.color)&&void 0!==r?r:"#2ECC71";t.res.style.border=n?"".concat(n,"px solid ").concat(i):"1px solid #2ECC71"}if(null!=e.scale||null!=e.transform){var o=t.prevTransform?"".concat(t.prevTransform," "):"",a=[];null!=e.transform&&a.push(e.transform),null!=e.scale&&a.push("scale(".concat(e.scale,")")),t.res.style.transform="".concat(o).concat(a.join(" "))}null!=e.boxShadow&&(t.res.style.boxShadow=e.boxShadow)},this}},{key:"onScroll",value:function(e){var t=this,r=function(e){if(null==e)return{num:0,unit:"px"};var t=String(e).match(/^(-?[\d.]+)(.*)$/);return t?{num:parseFloat(t[1]),unit:t[2]||"px"}:{num:0,unit:"px"}},n=function(e){var r=e&&null!=e.tx?e.tx:"0px",n=e&&null!=e.ty?e.ty:"0px";t.res.style.transform="translate3d(".concat(r,", ").concat(n,", 0)")};"opacity"===e.value?this.res.style.opacity=e.valMin:"scale"===e.value?this.res.style.transform="scale(".concat(e.valMin,")"):"trn"===e.value&&n(e.valMin);var i=function(){if("trn"!==e.value){var i=t.smartRange(window.scrollY,{min:e.from,max:e.to},{min:e.valMin,max:e.valMax});"opacity"===e.value?t.res.style.opacity=i:"scale"===e.value&&(t.res.style.transform="scale(".concat(i,")"))}else{for(var o={},a=["tx","ty"],s=0;s<a.length;s++){var l=a[s],c=e.valMin&&null!=e.valMin[l],u=e.valMax&&null!=e.valMax[l];if(c||u){var d=r(c?e.valMin[l]:u?e.valMax[l]:"0px"),f=r(u?e.valMax[l]:c?e.valMin[l]:"0px"),h=t.smartRange(window.scrollY,{min:e.from,max:e.to},{min:d.num,max:f.num});o[l]="".concat(h).concat(d.unit)}}n(o)}};window.addEventListener("scroll",i),0===e.from&&i()}},{key:"setAny",value:function(e){this[Object.keys(e)[0]]=[Object.values(e)[0]]}},{key:"setID",value:function(e){this.id=e}},{key:"setPrevText",value:function(e){this.prevText=e}},{key:"getCSS",value:function(){return this.css}},{key:"getPX",value:function(e){return{xs:"0px",sm:"576px",md:"768px",lg:"992px",xl:"1200px",xxl:"1400px",mxxl:"1800px"}[e]||"Invalid breakpoint"}},{key:"_setupResponsiveManager",value:function(){var e=this;this._responsiveTasks=this._responsiveTasks||[];var t=function(){e._responsiveTasks.forEach(function(e){e()})};this._responsiveHandler||(this._responsiveHandler=t,window.addEventListener("resize",t)),setTimeout(function(){t()},0)}},{key:"resprop",value:function(e,t){var r=this;this.options=t;var n={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]},i=["resprop","breakpoint","value","values","range"];e.forEach(function(e){void 0!==n[e.breakpoint]?e.range=n[e.breakpoint]:Array.isArray(e.breakpoint)&&2===e.breakpoint.length?e.range=[parseInt(e.breakpoint[0],10),parseInt(e.breakpoint[1],10)]:e.range=[0,parseInt(e.breakpoint,10)]}),e.sort(function(e,t){return e.range[1]-t.range[1]});var o=e.find(function(e){return"default"===e.breakpoint});for(var a in o||(o={breakpoint:"default",range:n.default},e.unshift(o)),this.prevStyles={},this.res.style)this.res.style.hasOwnProperty(a)&&isNaN(parseInt(a))&&(this.prevStyles[a]=this.res.style[a]);var s=new Set;e.forEach(function(e){Object.keys(e).forEach(function(e){i.includes(e)||"range"===e||s.add(e)})}),s.forEach(function(e){void 0===o[e]&&(o[e]=r.options[e]||"initial")}),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var t=window.innerWidth,n=o,a=0;a<e.length;a++){var l=e[a],c=v(l.range,2),u=c[0],d=c[1];if("default"!==l.breakpoint&&t>=u&&t<=d){n=l;break}}for(var f in s.forEach(function(e){if("keySet"===e){var t=o[e];t&&t.key&&(r.res.style[t.key]=t.value)}else r.res.style[e]=o[e]}),n)if("exact"===f&&(console.log("APPL"),console.log(n),console.log(r.set),r.set(n)),!i.includes(f)&&"range"!==f){var h=n[f];"keySet"===f&&h&&h.key?r.res.style[h.key]=h.value:"function"==typeof r[f]?r[f](h):r.res.style[f]=h}}),this._setupResponsiveManager()}},{key:"respad",value:function(e){var t=this,r={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]};e.forEach(function(e){void 0!==r[e.breakpoint]?e.range=r[e.breakpoint]:Array.isArray(e.breakpoint)&&2===e.breakpoint.length?e.range=[parseInt(e.breakpoint[0],10),parseInt(e.breakpoint[1],10)]:e.range=[parseInt(e.breakpoint,10),1e5]}),e.sort(function(e,t){return e.range[0]-t.range[0]});var n=e.find(function(e){return"default"===e.breakpoint});n||(n={breakpoint:"default",range:r.default},e.unshift(n)),void 0===n.values&&(n.values=this.options.pad||null),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var r=window.innerWidth,i=n,o=0;o<e.length;o++){var a=e[o],s=v(a.range,2),l=s[0],c=s[1];if("default"!==a.breakpoint&&r>=l&&r<=c){i=a;break}}var u=void 0!==i.values?i.values:n.values;null!=u&&t.pad(u)}),this._setupResponsiveManager()}},{key:"_applyResponsive",value:function(e,t){var r={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]};e.forEach(function(e){if(void 0!==r[e.breakpoint])e.range=r[e.breakpoint];else{var t=parseInt(e.breakpoint,10);e.range=[t,1e5]}}),e.sort(function(e,t){return e.range[0]-t.range[0]});var n=e.find(function(e){return"default"===e.breakpoint})||{breakpoint:"default",range:r.default},i=function(){for(var r=window.innerWidth,i=n,o=0;o<e.length;o++){var a=e[o],s=v(a.range,2),l=s[0],c=s[1];if("default"!==a.breakpoint&&r>=l&&r<=c){i=a;break}}t(i)};this._responsiveHandler&&window.removeEventListener("resize",this._responsiveHandler),this._responsiveHandler=i,window.addEventListener("resize",i),setTimeout(function(){i()},0)}},{key:"resmar",value:function(e){var t=this,r={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]};e.forEach(function(e){void 0!==r[e.breakpoint]?e.range=r[e.breakpoint]:Array.isArray(e.breakpoint)&&2===e.breakpoint.length?e.range=[parseInt(e.breakpoint[0],10),parseInt(e.breakpoint[1],10)]:e.range=[parseInt(e.breakpoint,10),1e5]}),e.sort(function(e,t){return e.range[0]-t.range[0]});var n=e.find(function(e){return"default"===e.breakpoint});n||(n={breakpoint:"default",range:r.default},e.unshift(n)),void 0===n.values&&(n.values=this.options.pad||null),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var r=window.innerWidth,i=n,o=0;o<e.length;o++){var a=e[o],s=v(a.range,2),l=s[0],c=s[1];if("default"!==a.breakpoint&&r>=l&&r<=c){i=a;break}}var u=void 0!==i.values?i.values:n.values;null!=u&&t.mar(u)}),this._setupResponsiveManager()}},{key:"isNumber",value:function(e){return"number"==typeof e&&!isNaN(e)}},{key:"pad",value:function(e){for(var t=0;t<e.length;t++)for(var r=Object.keys(e[t]),n=0;n<r.length;n++)for(var i=r[n],o=e[t][i],a=0;a<i.length;a++)switch(i[a]){case"a":this.res.style.padding=this.isNumber(o)?"".concat(o,"px"):o;break;case"t":this.res.style.paddingTop=this.isNumber(o)?"".concat(o,"px"):o;break;case"l":this.res.style.paddingLeft=this.isNumber(o)?"".concat(o,"px"):o;break;case"r":this.res.style.paddingRight=this.isNumber(o)?"".concat(o,"px"):o;break;case"b":this.res.style.paddingBottom=this.isNumber(o)?"".concat(o,"px"):o}return this}},{key:"as",value:function(e){return this.res.style.alignSelf=e,this}},{key:"mar",value:function(e){if("center"===e)return this.res.style.marginLeft="auto",this.res.style.marginRight="auto",this;for(var t=0;t<e.length;t++)for(var r=Object.keys(e[t]),n=0;n<r.length;n++){for(var i=r[n],o=e[t][i],a=0;a<i.length;a++)switch(i[a]){case"a":"auto"===o?(this.res.style.marginLeft="auto",this.res.style.marginRight="auto"):this.res.style.margin=this.isNumber(o)?"".concat(o,"px"):o;break;case"t":this.res.style.marginTop=this.isNumber(o)?"".concat(o,"px"):o;break;case"l":this.res.style.marginLeft=this.isNumber(o)?"".concat(o,"px"):o;break;case"r":this.res.style.marginRight=this.isNumber(o)?"".concat(o,"px"):o;break;case"b":this.res.style.marginBottom=this.isNumber(o)?"".concat(o,"px"):o}"center"===i&&!0===o&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto"),"auto"===o&&(i.includes("l")||i.includes("r"))&&(i.includes("l")&&(this.res.style.marginLeft="auto"),i.includes("r")&&(this.res.style.marginRight="auto"))}return this}},{key:"smartRange",value:function(e,t,r){e<t.min&&(e=t.min),e>t.max&&(e=t.max);var n=(e-t.min)/(t.max-t.min);t.min>t.max&&(n=(e-t.max)/(t.min-t.max));var i=(r.min-r.max)*n-r.min;if(i=Math.abs(i),r.min<r.max){var o=(r.max+Math.abs(r.min))*n;i=r.min+o}return i}},{key:"gpos",value:function(e){return this.res.style.gridColumn=e.col,this.res.style.gridRow=e.row,this}},{key:"fluidCopy",value:function(e){if(e instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var t=document.createTextNode(this.text);return this.res.appendChild(t),this.res.style.fontSize=e.exact,this}if("S1"===e){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var r=document.createTextNode(this.text);this.res.appendChild(r),this.res.style.fontSize="calc(1.625rem + 5.075vw)"}if("S2"===e){this.prevStylex=this.res.style,this.res=document.createElement("h2"),this.res.style.cssText=this.prevStylex.cssText;var n=document.createTextNode(this.text);this.res.appendChild(n),this.res.style.fontSize="calc(1.500rem + 4.3vw)"}if("S3"===e){this.prevStylex=this.res.style,this.res=document.createElement("h3"),this.res.style.cssText=this.prevStylex.cssText;var i=document.createTextNode(this.text);this.res.appendChild(i),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===e){this.prevStylex=this.res.style,this.res=document.createElement("h4"),this.res.style.cssText=this.prevStylex.cssText;var o=document.createTextNode(this.text);this.res.appendChild(o),this.res.style.fontSize="calc(1.250rem + 2.75vw)"}if("S5"===e){this.prevStylex=this.res.style,this.res=document.createElement("h5"),this.res.style.cssText=this.prevStylex.cssText;var a=document.createTextNode(this.text);this.res.appendChild(a),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===e&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}},{key:"setIndex",value:function(e){this.index=e}},{key:"borderObj",value:function(e){var t,r=null!==(t=e.type)&&void 0!==t?t:"solid";return this.res.style.border="".concat(e.width," ").concat(r," ").concat(e.color),void 0!==e.radius&&(this.res.style.borderRadius=e.radius),this}},{key:"setPref",value:function(e){this.preffersId=e}},{key:"setClass",value:function(e){this.class=e}},{key:"setTags",value:function(e){this.openTag=e.open,this.closeTag=e.close,console.log("TAGS SET"),console.log(e)}},{key:"chainReact",value:function(e,t,r){var n=this;console.log("0P"),this.ap=!1,this.cta=0,this.once=!1;var i,o=m(e);try{for(o.s();!(i=o.n()).done;){var a=i.value;a.range||(a.range=["0px","999999px"])}}catch(e){o.e(e)}finally{o.f()}e.sort(function(e,t){return parseInt(e.range[0])-parseInt(t.range[0])});var s=function(i){var o=window.visualViewport.width,a=[],s=[];n.resCopy=n.res,n.storedQueries=e.map(function(e){return e.target}).filter(function(e){return null!=e});var l,c=m(e);try{for(c.s();!(l=c.n()).done;){var u=l.value;n.counterIndex++;var d=v(u.range,2),f=d[0],h=d[1],p=parseInt(f),y=parseInt(h),g=!0;if(u.target){g=!1;for(var x=0;x<u.target.length;x++)u.target[x]===t&&(g=!0)}o>=p&&o<=y&&g&&(a.push(u.log),s.push(u),u.op&&u.op.margin&&(n.useMargin=u.op.margin))}}catch(e){c.e(e)}finally{c.f()}if(r&&!r.includes("background")&&(n.res.style.background="",n.res.style.backgroundColor=""),n.res.style.textShadow="",r&&!r.includes("border")&&(n.res.style.border=""),r&&!r.includes("margin")&&(n.res.style.margin=""),n.res.style["-webkit-text-fill-color"]="",n.res.style["-webkit-text-stroke-color"]="",n.res.style["-webkit-text-stroke-width"]="",n.res.style.filter="",n.options.background&&(console.log(n.options.background),n.res.style.background=n.options.background),a.includes("gradient"),(a.includes("gradient")||a.includes("shadow"))&&(n.res.style.position="relative"),a.includes("blast")){var b,w=s.filter(function(e){return"blast"===e.log})[0].op.color,k=null!==(b=s.filter(function(e){return"blast"===e.log})[0].op.width)&&void 0!==b?b:"1px";"FlexRowLayoutElement"===n.getType()||"LayoutWrapperElement"===n.getType()?(n.res.style.border="".concat("number"==typeof k?k+"px":k," solid orange"),n.res.style.display="inline-block","FlexRowLayoutElement"===n.getType()&&(n.res.style.display="flex"),n.res.style.boxSizing="border-box",n.res.style.transformOrigin="center",n.blastTarget=n.res):(n.text,n.res.style["-webkit-text-fill-color"]="transparent",n.res.style["-webkit-text-stroke-color"]=w,n.res.style["-webkit-text-stroke-width"]="".concat(k))}if(a.includes("filter")){var _=s.filter(function(e){return"filter"===e.log})[0].op.filter;n.res.style.filter=_}if(a.includes("background")&&(n.res.style.backgroundColor="green"),a.includes("gradient")&&("LayoutWrapperElement"!==n.getType()&&"FlexRowLayoutElement"!==n.getType()&&(n.res.style["-webkit-text-fill-color"]="transparent"),n.res.style.background=n.globalGradient,"LayoutWrapperElement"!==n.getType()&&"FlexRowLayoutElement"!==n.getType()&&(n.res.style["background-clip"]="text")),a.includes("shadow")){var E,T,S,R,A=n.options.shadow.op;console.log("OP IS",A);var C=null!==(E=A.steps)&&void 0!==E?E:1,M=null!==(T=A.colors)&&void 0!==T?T:["gray"],D=null!==(S=A.movements)&&void 0!==S?S:["3px","3px"],O=null!==(R=A.radius)&&void 0!==R?R:"3px";if(1===D.length&&(D=[D[0],D[0]]),"FlexRowLayoutElement"===n.getType()||"LayoutWrapperElement"===n.getType()){for(var I=[],F=0;F<C;F++){var L,j=null!==(L=M[F])&&void 0!==L?L:M[0],P=D[0],W=D[1];I.push("".concat(P," ").concat(W," ").concat(O," ").concat(j))}n.res.style.boxShadow=I.join(", ")}else{for(var B=[],z=0;z<C;z++){var U,N=null!==(U=M[z])&&void 0!==U?U:M[0],G=D[0],X=D[1];B.push("drop-shadow(".concat(G," ").concat(X," ").concat(O," ").concat(N,")"))}n.res.style.filter=B.join(" ")}}if(a.includes("margin"))for(x=0;x<e.length;x++)if(e[x].op){var H=e[x].op.offsets;H&&void 0!==n.index&&(n.res.style.margin=H[Number(n.index)]+"px")}if(a.includes("spana")||a.includes("span")){var q=document.createElement("div");if(q.setAttribute("id","oroa"),Object.assign(q.style,{position:"absolute",inset:"0",background:"linear-gradient(90deg, rgb(52,152,219), rgb(26,188,156))",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",pointerEvents:"none"}),n.res&&n.res.querySelector("span"))return;n.res=n.resCopy,n.res.textContent="",n.options.span&&(Array.isArray(n.options.span)?n.options.span:[n.options.span]).forEach(function(e){if(e.op&&"span"===e.op.name&&Array.isArray(e.op.parts)){var t=0,r=n.prevText||"";if(e.op.parts.forEach(function(e){var i=e.text,o=e.style||{};if(t<r.length){var a=r.indexOf(i,t);if(a>t){var s=r.substring(t,a);n.res.appendChild(new n.constructor(s).setup({type:"span",id:o.id,animation:o.animation}).set({}).render())}t=a+i.length}var l=new n.constructor(i).setup({type:"span",id:o.id,animation:o.animation}).set(o).render();n.res.appendChild(l)}),t<r.length){var i=r.substring(t);n.res.appendChild(new n.constructor(i).setup({type:"span"}).set({}).render())}}})}else{var Y=new n.constructor(n.prevText).set({}).render();n.prevText&&n.prevText.length>0&&i&&n.res.appendChild(Y)}if(a.includes("animation")){if(n.options.animation&&!n.hasAnimated&&!n.options.animation.op.fireAt){console.warn(n.openTag),n.hasAnimated=!0;var V=n.options.animation.op;window.addEventListener("sidebar:open",function(){n.res.animate(V.keyframesOpen,V.openOptions)}),window.addEventListener("sidebar:closed",function(){n.res.animate(V.keyframesClose,V.closeOptions)}),n.res.animate(V.keyframesClose,{duration:0,fill:"forwards"}),n.openTag&&n.closeTag&&(window.addEventListener(n.openTag,function(){n.res.animate(V.keyframesOpen,V.openOptions)}),window.addEventListener(n.closeTag,function(){n.res.animate(V.keyframesClose,V.closeOptions)}))}if(n.options.animation&&n.options.animation.op.fireAt&&n.options.animation.op.fireAt.endsWith("px")){var $=n.options.animation.op;n.res.animate($.keyframesClose,{duration:0,fill:"forwards"});var J=function(){window.scrollY>parseFloat($.fireAt)&&(n.res.animate($.keyframesOpen,$.openOptions),window.removeEventListener("scroll",J))};window.addEventListener("scroll",J)}if(n.options.animation&&"inview"===n.options.animation.op.fireAt){var Q=n.options.animation.op;n.res.animate(Q.keyframesClose,{duration:0,fill:"forwards"});var K=!1;new IntersectionObserver(function(e,t){e.forEach(function(e){e.isIntersecting&&!K&&(K=!0,n.res.animate(Q.keyframesOpen,Q.openOptions),t.disconnect())})}).observe(n.res)}}};this.options.animation||window.addEventListener("resize",function(){return s()}),s()}},{key:"maxWidth",value:function(e){return this.res.style.maxWidth=e,this}},{key:"removeQuotesFromFirstWord",value:function(e){return e.replace(/"([^"]+)":/g,"$1:")}},{key:"arrayMargin",value:function(e,t){return e.includes("left")&&(this.res.style.marginLeft=t),e.includes("right")&&(this.res.style.marginRight=t),e.includes("top")&&(this.res.style.marginTop=t),e.includes("bottom")&&(this.res.style.marginBottom=t),e.includes("all")&&(this.res.style.margin=t),t||(this.res.style.marginBottom=e),this}}],t&&b(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}());module.exports=t})();
|