nodality 1.0.121 → 1.0.124
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/theme.cjs.js +1 -0
- package/dist/theme.esm.js +1 -0
- package/dist/transform-anim.cjs.js +1 -1
- package/dist/transform-anim.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/.claude/settings.local.json +15 -0
- package/layout/animator.js +139 -22
- 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 +5 -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/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/switcher.js +1 -1
- package/layout/table.js +1 -1
- package/layout/text-field.js +1 -1
- package/layout/text.js +2 -2
- 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/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/scroll-video.js +1 -1
- package/lib/stacker.js +1 -1
- package/lib/theme.js +92 -0
- package/lib/transform-anim.js +9 -10
- package/package.json +1 -1
package/dist/radio.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var
|
|
1
|
+
(()=>{"use strict";var e={d:(t,o)=>{for(var n in o)e.o(o,n)&&!e.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:o[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={};e.r(t),e.d(t,{RadioGroup:()=>i});function o(e){return o="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},o(e)}function n(e,t){for(var o=0;o<t.length;o++){var n=t[o];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"!=o(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=o(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==o(t)?t:t+""}!function(){try{var e=localStorage.getItem("nodality.theme.mode");if("light"===e||"dark"===e)return e}catch(e){}"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches}();var i=function(){return e=function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.el=null,this.radioCount=0},(t=[{key:"set",value:function(e){this.options=e,console.log("ORARA"),console.log(this.options),this.radioCount=e.items.length;for(var t=document.createElement("div"),o=e.items,n=0;n<o.length;n++){var r=document.createElement("label");o.font&&(r.style.font=o.font),o.color&&(r.style.color=o.color),o.exact&&(r.style.fontSize=o.exact);var i=document.createTextNode(o[n]);r.appendChild(i),r.setAttribute("for",o[n]);var l=document.createElement("input");l.setAttribute("type","radio"),l.setAttribute("id","S".concat(n)),l.setAttribute("value",o[n].split(" ").join("")),l.style.appearance="none",l.style.width="20px",l.style.height="20px",l.style.border=this.options.tint?"2px solid ".concat(this.options.tint):"2px solid #007BFF",l.style.borderRadius="50%",l.style.outline="none",l.style.cursor="pointer",l.style.transition="0.3s",this.options.font&&(r.style.fontFamily=this.options.font),e.multiple?l.setAttribute("name",o[n].split(" ").join("")):l.setAttribute("name",e.name),t.appendChild(l),t.appendChild(r),t.innerHTML+="</br>"}return this.el=t,this.responsive(),this}},{key:"padding",value:function(e){return this.el.style.padding=e,this}},{key:"getCheckedValues",value:function(){console.log("NOW");for(var e=[],t=0;t<this.radioCount;t++)if(document.querySelector("#S".concat(t)).checked){var o=document.querySelector("#S".concat(t));console.log("VALUE IS "+o.value),e.push(o.value)}return e}},{key:"toCode",value:function(){var e=JSON.stringify(this.options,null,4);return e=e.replace(/"(\w+)"(?=\s*:)/g,"$1"),["new RadioGroup().set(".concat(e,")")]}},{key:"responsive",value:function(){return window.matchMedia("(max-device-width: 415px)").matches&&(this.el.style.fontSize="1.7em"),this}},{key:"render",value:function(e){var t=this;if(!e){console.log("MULA");for(var o=function(){var e=t.el.children[n];"[object HTMLInputElement]"===e.toString()&&e.addEventListener("change",function(){if(e.checked){e.style.backgroundColor=t.options.tint?t.options.tint:"#007BFF",e.style.boxShadow=t.options.tint?"0 0 0 2px ".concat(t.options.tint," inset"):"0 0 0 2px #0056b3 inset";for(var o=0;o<t.el.children.length;o++){var n=t.el.children[o];"INPUT"===n.tagName&&"radio"===n.type&&!1===t.options.multiple&&n!==e&&(n.style.backgroundColor="transparent",n.style.boxShadow="none")}}else e.style.backgroundColor="transparent",e.style.boxShadow="none"})},n=0;n<this.el.children.length;n++)o();return this.el}document.querySelector(e).appendChild(this.el)}}])&&n(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();window.RadioGroup=i,module.exports=t})();
|
package/dist/radio.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,o(i.key),i)}}function o(e){var o=function(e){if("object"!=t(e)||!e)return e;var o=e[Symbol.toPrimitive];if(void 0!==o){var n=o.call(e,"string");if("object"!=t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==t(o)?o:o+""}!function(){try{var t=localStorage.getItem("nodality.theme.mode");if("light"===t||"dark"===t)return t}catch(t){}"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches}();var n=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.el=null,this.radioCount=0},(o=[{key:"set",value:function(t){this.options=t,console.log("ORARA"),console.log(this.options),this.radioCount=t.items.length;for(var e=document.createElement("div"),o=t.items,n=0;n<o.length;n++){var i=document.createElement("label");o.font&&(i.style.font=o.font),o.color&&(i.style.color=o.color),o.exact&&(i.style.fontSize=o.exact);var r=document.createTextNode(o[n]);i.appendChild(r),i.setAttribute("for",o[n]);var l=document.createElement("input");l.setAttribute("type","radio"),l.setAttribute("id","S".concat(n)),l.setAttribute("value",o[n].split(" ").join("")),l.style.appearance="none",l.style.width="20px",l.style.height="20px",l.style.border=this.options.tint?"2px solid ".concat(this.options.tint):"2px solid #007BFF",l.style.borderRadius="50%",l.style.outline="none",l.style.cursor="pointer",l.style.transition="0.3s",this.options.font&&(i.style.fontFamily=this.options.font),t.multiple?l.setAttribute("name",o[n].split(" ").join("")):l.setAttribute("name",t.name),e.appendChild(l),e.appendChild(i),e.innerHTML+="</br>"}return this.el=e,this.responsive(),this}},{key:"padding",value:function(t){return this.el.style.padding=t,this}},{key:"getCheckedValues",value:function(){console.log("NOW");for(var t=[],e=0;e<this.radioCount;e++)if(document.querySelector("#S".concat(e)).checked){var o=document.querySelector("#S".concat(e));console.log("VALUE IS "+o.value),t.push(o.value)}return t}},{key:"toCode",value:function(){var t=JSON.stringify(this.options,null,4);return t=t.replace(/"(\w+)"(?=\s*:)/g,"$1"),["new RadioGroup().set(".concat(t,")")]}},{key:"responsive",value:function(){return window.matchMedia("(max-device-width: 415px)").matches&&(this.el.style.fontSize="1.7em"),this}},{key:"render",value:function(t){var e=this;if(!t){console.log("MULA");for(var o=function(){var t=e.el.children[n];"[object HTMLInputElement]"===t.toString()&&t.addEventListener("change",function(){if(t.checked){t.style.backgroundColor=e.options.tint?e.options.tint:"#007BFF",t.style.boxShadow=e.options.tint?"0 0 0 2px ".concat(e.options.tint," inset"):"0 0 0 2px #0056b3 inset";for(var o=0;o<e.el.children.length;o++){var n=e.el.children[o];"INPUT"===n.tagName&&"radio"===n.type&&!1===e.options.multiple&&n!==t&&(n.style.backgroundColor="transparent",n.style.boxShadow="none")}}else t.style.backgroundColor="transparent",t.style.boxShadow="none"})},n=0;n<this.el.children.length;n++)o();return this.el}document.querySelector(t).appendChild(this.el)}}])&&e(t.prototype,o),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,o}();window.RadioGroup=n;export{n as RadioGroup};
|
package/dist/range.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},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 n(e){return n="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},n(e)}function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,i(r.key),r)}}function i(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}e.
|
|
1
|
+
(()=>{"use strict";var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},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={};e.r(t),e.d(t,{Range:()=>a});function n(e){return n="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},n(e)}function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,i(r.key),r)}}function i(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}!function(){try{var e=localStorage.getItem("nodality.theme.mode");if("light"===e||"dark"===e)return e}catch(e){}"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches}();var a=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.el=null,this.minLabel=null,this.maxLabel=null,this.currentLabel=null},(t=[{key:"padding",value:function(e){return this.el.style.padding=e,this}},{key:"toCode",value:function(){var e=JSON.stringify(this.options,null,4);return["new Range().set(".concat(e,")")]}},{key:"set",value:function(e){var t,n,r=this;this.options=e;var i=document.createElement("input");if(i.setAttribute("id","slider"),i.setAttribute("type","range"),i.setAttribute("min",e.min),i.setAttribute("max",e.max),i.setAttribute("value",e.min),i.style.width=null!==(t=e.width)&&void 0!==t?t:"100%",!e.plain){var a,l;i.style.setProperty("-webkit-appearance","none"),i.style.appearance="none",i.style.height="9px",i.style.background=null!==(a=e.style.trackColor)&&void 0!==a?a:"orange",i.style.borderRadius="5px";var o="\n #slider::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 25px;\n height: 25px;\n border-radius: 50%;\n background: ".concat(null!==(l=e.style.thumbColor)&&void 0!==l?l:"4CAF50",";\n cursor: pointer;\n }\n "),u=document.createElement("style");u.appendChild(document.createTextNode(o)),document.head.appendChild(u)}var d=document.createElement("div");d.style.display="flex",d.style.flexDirection="column",d.style.alignItems="center",d.style.width="100%";var s=document.createElement("div");if(s.style.display="flex",s.style.justifyContent="space-between",s.style.width=null!==(n=e.width)&&void 0!==n?n:"100%",this.minLabel=document.createElement("span"),this.minLabel.textContent=e.min,this.maxLabel=document.createElement("span"),this.maxLabel.textContent=e.max,this.currentLabel=document.createElement("span"),this.currentLabel.textContent=i.value,e.font&&(this.currentLabel.style.fontFamily=e.font),e.font&&(this.minLabel.style.fontFamily=e.font),e.font&&(this.maxLabel.style.fontFamily=e.font),e.plain||(s.appendChild(this.minLabel),s.appendChild(this.currentLabel),s.appendChild(this.maxLabel)),i.addEventListener("input",function(){r.currentLabel.textContent=i.value}),window.matchMedia("(max-device-width: 415px)").matches)if(e.plain)i.style.width="80%";else{var c,p;i.style.height="20px",i.style.background=null!==(c=e.style.trackColor)&&void 0!==c?c:"1abc9C",i.style.borderRadius="10px",i.style.fontSize="3rem",i.style.width="80%";var y="\n #slider::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 25px;\n height: 25px;\n border-radius: 50%;\n background: ".concat(null!==(p=e.style.thumbColor)&&void 0!==p?p:"blue",";\n cursor: pointer;\n }\n "),m=document.createElement("style");m.appendChild(document.createTextNode(y)),document.head.appendChild(m)}return d.appendChild(s),d.appendChild(i),this.el=d,this}},{key:"value",value:function(){return this.el.querySelector("#slider").value}},{key:"render",value:function(e){if(!e)return this.el;document.querySelector(e).appendChild(this.el)}}])&&r(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();window.Range=a,module.exports=t})();
|
package/dist/range.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function e(t){return e="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(t)}function t(e,t){for(var i=0;i<t.length;i++){var r=t[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,n(r.key),r)}}function n(t){var n=function(t){if("object"!=e(t)||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,"string");if("object"!=e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==e(n)?n:n+""}!function(){try{var e=localStorage.getItem("nodality.theme.mode");if("light"===e||"dark"===e)return e}catch(e){}"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches}();var i=function(){return e=function e(t){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.el=null,this.minLabel=null,this.maxLabel=null,this.currentLabel=null},(n=[{key:"padding",value:function(e){return this.el.style.padding=e,this}},{key:"toCode",value:function(){var e=JSON.stringify(this.options,null,4);return["new Range().set(".concat(e,")")]}},{key:"set",value:function(e){var t,n,i=this;this.options=e;var r=document.createElement("input");if(r.setAttribute("id","slider"),r.setAttribute("type","range"),r.setAttribute("min",e.min),r.setAttribute("max",e.max),r.setAttribute("value",e.min),r.style.width=null!==(t=e.width)&&void 0!==t?t:"100%",!e.plain){var a,l;r.style.setProperty("-webkit-appearance","none"),r.style.appearance="none",r.style.height="9px",r.style.background=null!==(a=e.style.trackColor)&&void 0!==a?a:"orange",r.style.borderRadius="5px";var o="\n #slider::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 25px;\n height: 25px;\n border-radius: 50%;\n background: ".concat(null!==(l=e.style.thumbColor)&&void 0!==l?l:"4CAF50",";\n cursor: pointer;\n }\n "),u=document.createElement("style");u.appendChild(document.createTextNode(o)),document.head.appendChild(u)}var s=document.createElement("div");s.style.display="flex",s.style.flexDirection="column",s.style.alignItems="center",s.style.width="100%";var d=document.createElement("div");if(d.style.display="flex",d.style.justifyContent="space-between",d.style.width=null!==(n=e.width)&&void 0!==n?n:"100%",this.minLabel=document.createElement("span"),this.minLabel.textContent=e.min,this.maxLabel=document.createElement("span"),this.maxLabel.textContent=e.max,this.currentLabel=document.createElement("span"),this.currentLabel.textContent=r.value,e.font&&(this.currentLabel.style.fontFamily=e.font),e.font&&(this.minLabel.style.fontFamily=e.font),e.font&&(this.maxLabel.style.fontFamily=e.font),e.plain||(d.appendChild(this.minLabel),d.appendChild(this.currentLabel),d.appendChild(this.maxLabel)),r.addEventListener("input",function(){i.currentLabel.textContent=r.value}),window.matchMedia("(max-device-width: 415px)").matches)if(e.plain)r.style.width="80%";else{var c,p;r.style.height="20px",r.style.background=null!==(c=e.style.trackColor)&&void 0!==c?c:"1abc9C",r.style.borderRadius="10px",r.style.fontSize="3rem",r.style.width="80%";var h="\n #slider::-webkit-slider-thumb {\n -webkit-appearance: none;\n appearance: none;\n width: 25px;\n height: 25px;\n border-radius: 50%;\n background: ".concat(null!==(p=e.style.thumbColor)&&void 0!==p?p:"blue",";\n cursor: pointer;\n }\n "),m=document.createElement("style");m.appendChild(document.createTextNode(h)),document.head.appendChild(m)}return s.appendChild(d),s.appendChild(r),this.el=s,this}},{key:"value",value:function(){return this.el.querySelector("#slider").value}},{key:"render",value:function(e){if(!e)return this.el;document.querySelector(e).appendChild(this.el)}}])&&t(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();window.Range=i;export{i as Range};
|
package/dist/side-bar.cjs.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{"use strict";var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},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 n(e){return n="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},n(e)}function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,i(r.key),r)}}function i(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function o(){return o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=l(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},o.apply(null,arguments)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}e.
|
|
1
|
+
(()=>{"use strict";var e={d:(t,n)=>{for(var r in n)e.o(n,r)&&!e.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:n[r]})},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={};e.r(t),e.d(t,{SideBar:()=>a});function n(e){return n="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},n(e)}function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,i(r.key),r)}}function i(e){var t=function(e){if("object"!=n(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==n(t)?t:t+""}function o(){return o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,n){var r=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=l(e)););return e}(e,t);if(r){var i=Object.getOwnPropertyDescriptor(r,t);return i.get?i.get.call(arguments.length<3?e:n):i.value}},o.apply(null,arguments)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}!function(){try{var e=localStorage.getItem("nodality.theme.mode");if("light"===e||"dark"===e)return e}catch(e){}"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches}();var a=function(){function e(t,n){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.ele=null,this.width="16em",this.height="100vh",this.els=t}return t=e,n=[{key:"setup",value:function(t){var n,r,i=this;t.tags&&(n=this,"function"==typeof(r=o(l(e.prototype),"setTags",n))?function(e){return r.apply(n,e)}:r)([t.tags]),t.width&&(this.width=t.width),t.height&&(this.height=t.height);var a=document.createElement("div");a.style.position="absolute";var s=document.createElement("button");s.style.position="absolute",s.style.background="white",s.style.opacity=.8,s.style.border="none",s.width="1.5em",s.height="1.5em",s.style.borderRadius="50%",s.style.zIndex=2;var c=document.createTextNode("☰");s.appendChild(c),s.style.fontSize="2em",window.matchMedia("(max-device-width: 400px)").matches&&(s.style.fontSize="6em"),window.matchMedia("(max-device-width: 400px)").matches&&t.fullMobile&&(this.width="100vw"),a.appendChild(s);var d=document.createElement("div");return d.style.position="absolute",d.style.backgroundColor="#fff",d.style.flexDirection="column",d.style.display="flex",d.style.alignItems="center",d.style.margin=0,d.style.padding=0,d.style.width=this.width,d.style.margin=0,d.style.marginTop="-10px",d.style.paddingTop="1em",d.style.paddingBottom="1em",d.style.height="".concat(this.height),d.style.transform="translateX(-".concat(this.width,")"),d.style.transition="all 0.80s",a.appendChild(d),this.hidden=!1,s.addEventListener("click",function(){i.hidden=!i.hidden;for(var e=0;e<d.children.length;e++)"☰"!==d.textContent&&(i.hidden?d.style.transform="translateX(0em)":d.style.transform="translateX(-".concat(i.width,")"))}),this.ele=a,this.els&&this.items(this.els),this}},{key:"background",value:function(e){return this.ele.children[1].style.backgroundColor=e.color,this.ele.children[1].style.opacity=e.opacity,this}},{key:"items",value:function(e){this.itemCount=e.length;for(var t=0;t<e.length;t++)this.ele.children[1].appendChild(e[t].render());return this}},{key:"render",value:function(e){return e?(document.querySelector(e).style.padding=0,document.querySelector(e).style.margin=0,document.querySelector(e).appendChild(this.ele),this.ele):this.ele}}],n&&r(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n}();module.exports=t})();
|
package/dist/side-bar.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){for(var i=0;i<e.length;i++){var r=e[i];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,n(r.key),r)}}function n(e){var n=function(e){if("object"!=t(e)||!e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var i=n.call(e,"string");if("object"!=t(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==t(n)?n:n+""}function i(){return i="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,n){var i=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=r(t)););return t}(t,e);if(i){var o=Object.getOwnPropertyDescriptor(i,e);return o.get?o.get.call(arguments.length<3?t:n):o.value}},i.apply(null,arguments)}function r(t){return r=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},r(t)}!function(){try{var t=localStorage.getItem("nodality.theme.mode");if("light"===t||"dark"===t)return t}catch(t){}"undefined"!=typeof window&&window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches}();var o=function(){function t(e,n){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.ele=null,this.width="16em",this.height="100vh",this.els=e}return n=t,o=[{key:"setup",value:function(e){var n,o,l=this;e.tags&&(n=this,"function"==typeof(o=i(r(t.prototype),"setTags",n))?function(t){return o.apply(n,t)}:o)([e.tags]),e.width&&(this.width=e.width),e.height&&(this.height=e.height);var a=document.createElement("div");a.style.position="absolute";var s=document.createElement("button");s.style.position="absolute",s.style.background="white",s.style.opacity=.8,s.style.border="none",s.width="1.5em",s.height="1.5em",s.style.borderRadius="50%",s.style.zIndex=2;var c=document.createTextNode("☰");s.appendChild(c),s.style.fontSize="2em",window.matchMedia("(max-device-width: 400px)").matches&&(s.style.fontSize="6em"),window.matchMedia("(max-device-width: 400px)").matches&&e.fullMobile&&(this.width="100vw"),a.appendChild(s);var d=document.createElement("div");return d.style.position="absolute",d.style.backgroundColor="#fff",d.style.flexDirection="column",d.style.display="flex",d.style.alignItems="center",d.style.margin=0,d.style.padding=0,d.style.width=this.width,d.style.margin=0,d.style.marginTop="-10px",d.style.paddingTop="1em",d.style.paddingBottom="1em",d.style.height="".concat(this.height),d.style.transform="translateX(-".concat(this.width,")"),d.style.transition="all 0.80s",a.appendChild(d),this.hidden=!1,s.addEventListener("click",function(){l.hidden=!l.hidden;for(var t=0;t<d.children.length;t++)"☰"!==d.textContent&&(l.hidden?d.style.transform="translateX(0em)":d.style.transform="translateX(-".concat(l.width,")"))}),this.ele=a,this.els&&this.items(this.els),this}},{key:"background",value:function(t){return this.ele.children[1].style.backgroundColor=t.color,this.ele.children[1].style.opacity=t.opacity,this}},{key:"items",value:function(t){this.itemCount=t.length;for(var e=0;e<t.length;e++)this.ele.children[1].appendChild(t[e].render());return this}},{key:"render",value:function(t){return t?(document.querySelector(t).style.padding=0,document.querySelector(t).style.margin=0,document.querySelector(t).appendChild(this.ele),this.ele):this.ele}}],o&&e(n.prototype,o),Object.defineProperty(n,"prototype",{writable:!1}),n;var n,o}();export{o as SideBar};
|
package/dist/side-nav-bar.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)}function n(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=s(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function o(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,o,s,i,a=[],l=!0,c=!1;try{if(s=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=s.call(r)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw o}}return a}}(e,t)||s(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){if(e){if("string"==typeof e)return i(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)?i(e,t):void 0}}function i(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 a(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,l(n.key),n)}}function l(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}function c(e){return c="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},c(e)}function u(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return p(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)?p(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 s,i=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){a=!0,s=e},f:function(){try{i||null==r.return||r.return()}finally{if(a)throw s}}}}function p(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 d(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,f(n.key),n)}}function f(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(h=function(){return!!e})()}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}e.r(t),e.d(t,{SideNav:()=>m});var m=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,r){return t=y(t),function(e,t){if(t&&("object"==c(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,h()?Reflect.construct(t,r||[],y(e).constructor):t.apply(e,r))}(this,t)}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&&v(e,t)}(t,e),r=t,(n=[{key:"setup",value:function(e){return this.obj=e,this.setTags(this.obj.tags),this.animate=void 0===this.obj.animate||this.obj.animate,this.res=this.createSideNav(e),this.res.style.position="relative",this.res.style.zIndex=3,this.closed=!0,this}},{key:"toggleSideNav",value:function(e){var t=this;this.closed=!this.closed;var r=this.res.children[0];if(this.closed)if(r.style.overflowX="hidden",e.style.opacity=1,this.animate){this.ope=r.animate([{transform:"translateX(0)"},{transform:"translateX(100%)"}],{duration:300,fill:"forwards"}),this.ope.finished.then(function(){var e=new CustomEvent(t.obj.tags.close);window.dispatchEvent(e)});var n,o=-1,s=u(r.children);try{for(s.s();!(n=s.n()).done;){var i=n.value;if(o+=1,this.masterEL[o]){var a,l=u(i.children);try{for(l.s();!(a=l.n()).done;){var c=a.value,p=this.masterEL[o].options.animation;p&&this.mappedIDS.includes(c.id)&&c.animate(p.op.keyframesClose,p.op.closeOptions)}}catch(e){l.e(e)}finally{l.f()}}}}catch(e){s.e(e)}finally{s.f()}}else r.style.display="none";else{r.style.overflowX="none";var d,f=-1,h=u(r.children);try{for(h.s();!(d=h.n()).done;){var y=d.value;f+=1;var v,m=u(y.children);try{for(m.s();!(v=m.n()).done;){var g=v.value;if(this.mappedIDS.includes(g.id)&&void 0!==this.masterEL[0]){var b=this.masterEL[f].options.animation;if(b){console.log("OPEN KEYFRAMES"),console.log(b.op.keyframesOpen);var x=b.op.openOptions;x.delay||(x.delay=1),x.duration||(x.duration=300),console.log(x),g.animate(b.op.keyframesOpen,x)}}}}catch(e){m.e(e)}finally{m.f()}}}catch(e){h.e(e)}finally{h.f()}e.style.opacity=0,this.animate?(r.style.display="flex",this.opeClose=r.animate([{transform:"translateX(100%)"},{transform:"translateX(0)"}],{duration:300,fill:"forwards"}),this.opeClose.finished.then(function(){var e=new CustomEvent(t.obj.tags.open);window.dispatchEvent(e)})):r.style.display="flex"}}},{key:"createToggleButton",value:function(e){var t=document.createElement("button");return t.innerText="☰",t.style.padding="10px 20px",t.style.backgroundColor="transparent",t.style.color=null!=e?e:"#3498db",t.style.border="none",t.style.borderRadius="5px",t.style.cursor="pointer",t.style.zIndex=1,t.style.fontSize="1.6rem",this.obj.fixed&&(t.style.position="fixed"),t}},{key:"createCloseButton",value:function(e){var t=document.createElement("button");return t.innerText="×",t.style.fontSize="1.6rem",t.style.padding="10px 20px",t.style.backgroundColor="transparent",t.style.color=null!=e?e:"black",t.style.border="none",t.style.borderRadius="5px",t.style.cursor="pointer",t.style.zIndex=1,t.style.alignSelf="flex-end",t}},{key:"createSideNav",value:function(e){var t=this,r=document.createElement("div");r.style.display="flex",r.style.justifyContent="flex-end";var n=document.createElement("div");n.style.display="none",n.style.background=this.obj.background||"#1abc9c",n.style.height="100%",window.matchMedia("(max-device-width: 415px)").matches?n.style.width="100%":n.style.width=this.obj.width||"400px",n.style.position="fixed",n.style.right=0,this.animate&&(n.style.transform="translateX(100%)"),n.style.flexDirection="column",n.style.justifyContent="flex-start";var o=this.createToggleButton(this.obj.hamColour.opened),s=this.createCloseButton(this.obj.hamColour.closed);return o.addEventListener("click",function(){return t.toggleSideNav(o)}),s.addEventListener("click",function(){return t.toggleSideNav(o)}),n.appendChild(s),r.appendChild(n),r.appendChild(o),r}},{key:"items",value:function(e){this.masterEL=e.items.filter(function(e){return void 0!==e.link}),console.log("EXTRACT IDs"),console.log(e);var t=e.items.filter(function(e){return void 0===e.items}).map(function(e){return e.id});if(this.mappedIDS=t,this.item=e,this.res.children[0].appendChild(e.render()),void 0!==this.masterEL[0]){console.log("ANNAX"),console.log(this.masterEL[0]);var r=this.masterEL[0].options.animation;if(r){var n,o=u(this.res.children[0].children);try{for(o.s();!(n=o.n()).done;){var s,i=u(n.value.children);try{for(i.s();!(s=i.n()).done;){var a=s.value;if(this.mappedIDS.includes(a.id)){var l=r.op.closeOptions;l.delay=0,console.log("ANNAX"),console.log("SETTING INITIAL STATE ZEROING THE DELAY"),console.log(r.op.keyframesClose),console.log(l),a.animate(r.op.keyframesClose,r.op.closeOptions)}}}catch(e){i.e(e)}finally{i.f()}}}catch(e){o.e(e)}finally{o.f()}}}return this}},{key:"toCode",value:function(){var e="new SideNav().setup(".concat(this.formatObj(this.obj),")");if(this.item){var t=this.item.toCode?this.item.toCode().join(""):this.formatObj(this.item);t=t.replace(/,\s*(\.set\(|\.add\()/g,"\n $1"),e+=".items(".concat(t,")")}return e}},{key:"formatObj",value:function(e){return JSON.stringify(e,null,2).replace(/"(\w+)"\s*:/g,"$1:")}},{key:"render",value:function(e){return e&&document.querySelector(e).appendChild(this.res),this.res}}])&&d(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(function(){return e=function e(){var t,r,n,o=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(o.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),o.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="",s="",i="",a="",l="",c="",u="",p="";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:")?s=e.replace("tz:",""):e.startsWith("scale(")?i=e:e.startsWith("skew(")?a=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:")&&(p=e.replace("opacity:",""))}),r=o.setDefault(r),n=o.setDefault(n),s=o.setDefault(s);var d="";if("0px"!=n&&"0px"!=r&&"0px"!=s?d+="translate3d(".concat(r,", ").concat(n,", ").concat(s,")"):"0px"==n&&"0px"==r||(d+="translate(".concat(r,", ").concat(n,")")),i&&(d+=" ".concat(i)),l&&(d+=" ".concat(l)),a&&(d+=" ".concat(a)),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+" "}),h="transform ".concat(f,", opacity ").concat(f);o.res.style.transition=h}else o.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";e.op.static&&(o.res.style.transition=""),(o.blastTarget||o.res).style.transform=d,o.res.style.opacity=p}else alert("OPE")}};t.on?o.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) "),o.res.style.opacity="1"}),e&&(o.res.style.transform=e.trim())};if(t.on)o.res.addEventListener("mouseout",function(){t.keep||n()});else{var s=1e3*parseFloat(t.duration),i=t.closeAfter?t.closeAfter:0;setTimeout(function(){t.keep||n()},s/2+i)}t.hardCSS&&(o.res.style.transform=t.hardCSS)}else alert("THIS FIRE WITH GRADIENT (invalid block"),console.log("INVALID BLOCKA"),console.log(e)},(r=l(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},t=[{key:"isHidden",value:function(e){e&&(this.res.style.display="none")}},{key:"keySet",value:function(e){return this.temporaryVal=1,this.res.style[e.key]=e.value,this}},{key:"commonMethods",value:function(e){var t={exact:"fontSize",zIndex:"zIndex",position:"position",top:"top",cursor:"cursor",width:"width",maxWidth:"maxWidth",height:"height",maxHeight:"maxHeight",radius:"borderRadius",lineHeight:"lineHeight",background:"background",font:"fontFamily",opacity:"opacity"};for(var r in t)null!=e[r]&&(this.res.style[t[r]]=e[r]);return 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.hide&&this.isHidden(e.hide),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.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,e.animation&&(this.res.style.transition="".concat(e.animation),this.res.style.transionProperty="background, color"),this.res.onmouseout=function(){t.res.style.backgroundColor="".concat(t.prevColor),t.res.style.color="".concat(t.foreColor),t.res.style.border=t.prevBorder},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,o=null!==(r=e.border.color)&&void 0!==r?r:"#2ECC71";t.res.style.border=n?"".concat(n,"px solid ").concat(o):"1px solid #2ECC71"}},this}},{key:"onScroll",value:function(e){var t=this;"opacity"===e.value?this.res.style.opacity=e.valMin:"scale"===e.value&&(this.res.style.transform="scale(".concat(e.valMax,")")),window.addEventListener("scroll",function(){var r=t.smartRange(window.scrollY,{min:e.from,max:e.to},{min:e.valMin,max:e.valMax});"opacity"===e.value?t.res.style.opacity=r:"scale"===e.value&&(t.res.style.transform="scale(".concat(r,")"))})}},{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]},s=["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 i=e.find(function(e){return"default"===e.breakpoint});for(var a in i||(i={breakpoint:"default",range:n.default},e.unshift(i)),this.prevStyles={},this.res.style)this.res.style.hasOwnProperty(a)&&isNaN(parseInt(a))&&(this.prevStyles[a]=this.res.style[a]);var l=new Set;e.forEach(function(e){Object.keys(e).forEach(function(e){s.includes(e)||"range"===e||l.add(e)})}),l.forEach(function(e){void 0===i[e]&&(i[e]=r.options[e]||"initial")}),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var t=window.innerWidth,n=i,a=0;a<e.length;a++){var c=e[a],u=o(c.range,2),p=u[0],d=u[1];if("default"!==c.breakpoint&&t>=p&&t<=d){n=c;break}}for(var f in l.forEach(function(e){if("keySet"===e){var t=i[e];t&&t.key&&(r.res.style[t.key]=t.value)}else r.res.style[e]=i[e]}),n)if("exact"===f&&(console.log("APPL"),console.log(n),console.log(r.set),r.set(n)),!s.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,s=n,i=0;i<e.length;i++){var a=e[i],l=o(a.range,2),c=l[0],u=l[1];if("default"!==a.breakpoint&&r>=c&&r<=u){s=a;break}}var p=void 0!==s.values?s.values:n.values;null!=p&&t.pad(p)}),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},s=function(){for(var r=window.innerWidth,s=n,i=0;i<e.length;i++){var a=e[i],l=o(a.range,2),c=l[0],u=l[1];if("default"!==a.breakpoint&&r>=c&&r<=u){s=a;break}}t(s)};this._responsiveHandler&&window.removeEventListener("resize",this._responsiveHandler),this._responsiveHandler=s,window.addEventListener("resize",s),setTimeout(function(){s()},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,s=n,i=0;i<e.length;i++){var a=e[i],l=o(a.range,2),c=l[0],u=l[1];if("default"!==a.breakpoint&&r>=c&&r<=u){s=a;break}}var p=void 0!==s.values?s.values:n.values;null!=p&&t.mar(p)}),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 o=r[n],s=e[t][o],i=0;i<o.length;i++)switch(o[i]){case"a":this.res.style.padding=this.isNumber(s)?"".concat(s,"px"):s;break;case"t":this.res.style.paddingTop=this.isNumber(s)?"".concat(s,"px"):s;break;case"l":this.res.style.paddingLeft=this.isNumber(s)?"".concat(s,"px"):s;break;case"r":this.res.style.paddingRight=this.isNumber(s)?"".concat(s,"px"):s;break;case"b":this.res.style.paddingBottom=this.isNumber(s)?"".concat(s,"px"):s}return this}},{key:"as",value:function(e){return this.res.style.alignSelf=e,this}},{key:"mar",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 o=r[n],s=e[t][o],i=0;i<o.length;i++){switch(o[i]){case"a":this.res.style.margin=this.isNumber(s)?"".concat(s,"px"):s;break;case"t":this.res.style.marginTop=this.isNumber(s)?"".concat(s,"px"):s;break;case"l":this.res.style.marginLeft=this.isNumber(s)?"".concat(s,"px"):s;break;case"r":this.res.style.marginRight=this.isNumber(s)?"".concat(s,"px"):s;break;case"b":this.res.style.marginBottom=this.isNumber(s)?"".concat(s,"px"):s}"auto"===o[i]&&(this.res.style.marginLeft="auto",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 o=(r.min-r.max)*n-r.min;if(o=Math.abs(o),r.min<r.max){var s=(r.max+Math.abs(r.min))*n;o=r.min+s}return o}},{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 o=document.createTextNode(this.text);this.res.appendChild(o),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 s=document.createTextNode(this.text);this.res.appendChild(s),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 i=document.createTextNode(this.text);this.res.appendChild(i),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),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 s=this;console.log("0P"),this.ap=!1,this.cta=0,this.once=!1;var i,a=n(e);try{for(a.s();!(i=a.n()).done;){var l=i.value;l.range||(l.range=["0px","999999px"])}}catch(e){a.e(e)}finally{a.f()}e.sort(function(e,t){return parseInt(e.range[0])-parseInt(t.range[0])});var c=function(i){var a=window.visualViewport.width,l=[],c=[];s.resCopy=s.res,s.storedQueries=e.map(function(e){return e.target}).filter(function(e){return null!=e});var u,p=n(e);try{for(p.s();!(u=p.n()).done;){var d=u.value;s.counterIndex++;var f=o(d.range,2),h=f[0],y=f[1],v=parseInt(h),m=parseInt(y),g=!0;if(d.target){g=!1;for(var b=0;b<d.target.length;b++)d.target[b]===t&&(g=!0)}a>=v&&a<=m&&g&&(l.push(d.log),c.push(d),d.op&&d.op.margin&&(s.useMargin=d.op.margin))}}catch(e){p.e(e)}finally{p.f()}if(r&&!r.includes("background")&&(s.res.style.background="",s.res.style.backgroundColor=""),s.res.style.textShadow="",r&&!r.includes("border")&&(s.res.style.border=""),r&&!r.includes("margin")&&(s.res.style.margin=""),s.res.style["-webkit-text-fill-color"]="",s.res.style["-webkit-text-stroke-color"]="",s.res.style["-webkit-text-stroke-width"]="",s.res.style.filter="",s.options.background&&(console.log(s.options.background),s.res.style.background=s.options.background),l.includes("gradient"),(l.includes("gradient")||l.includes("shadow"))&&(s.res.style.position="relative"),l.includes("blast")){var x,k=c.filter(function(e){return"blast"===e.log})[0].op.color,w=null!==(x=c.filter(function(e){return"blast"===e.log})[0].op.width)&&void 0!==x?x:"1px";"FlexRowLayoutElement"===s.getType()||"LayoutWrapperElement"===s.getType()?(s.res.style.border="".concat("number"==typeof w?w+"px":w," solid orange"),s.res.style.display="inline-block","FlexRowLayoutElement"===s.getType()&&(s.res.style.display="flex"),s.res.style.boxSizing="border-box",s.res.style.transformOrigin="center",s.blastTarget=s.res):(s.text,s.res.style["-webkit-text-fill-color"]="transparent",s.res.style["-webkit-text-stroke-color"]=k,s.res.style["-webkit-text-stroke-width"]="".concat(w))}if(l.includes("filter")){var S=c.filter(function(e){return"filter"===e.log})[0].op.filter;s.res.style.filter=S}if(l.includes("background")&&(s.res.style.backgroundColor="green"),l.includes("gradient")&&("LayoutWrapperElement"!==s.getType()&&"FlexRowLayoutElement"!==s.getType()&&(s.res.style["-webkit-text-fill-color"]="transparent"),s.res.style.background=s.globalGradient,"LayoutWrapperElement"!==s.getType()&&"FlexRowLayoutElement"!==s.getType()&&(s.res.style["background-clip"]="text")),l.includes("shadow")){var E,T,O,C,j=s.options.shadow.op;console.log("OP IS",j);var I=null!==(E=j.steps)&&void 0!==E?E:1,A=null!==(T=j.colors)&&void 0!==T?T:["gray"],L=null!==(O=j.movements)&&void 0!==O?O:["3px","3px"],N=null!==(C=j.radius)&&void 0!==C?C:"3px";if(1===L.length&&(L=[L[0],L[0]]),"FlexRowLayoutElement"===s.getType()||"LayoutWrapperElement"===s.getType()){for(var W=[],R=0;R<I;R++){var P,_=null!==(P=A[R])&&void 0!==P?P:A[0],z=L[0],M=L[1];W.push("".concat(z," ").concat(M," ").concat(N," ").concat(_))}s.res.style.boxShadow=W.join(", ")}else{for(var D=[],B=0;B<I;B++){var F,H=null!==(F=A[B])&&void 0!==F?F:A[0],X=L[0],Y=L[1];D.push("drop-shadow(".concat(X," ").concat(Y," ").concat(N," ").concat(H,")"))}s.res.style.filter=D.join(" ")}}if(l.includes("margin"))for(b=0;b<e.length;b++)if(e[b].op){var G=e[b].op.offsets;G&&void 0!==s.index&&(s.res.style.margin=G[Number(s.index)]+"px")}if(l.includes("spana")||l.includes("span")){var $=document.createElement("div");if($.setAttribute("id","oroa"),Object.assign($.style,{position:"absolute",inset:"0",background:"linear-gradient(90deg, rgb(52,152,219), rgb(26,188,156))",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",pointerEvents:"none"}),s.res&&s.res.querySelector("span"))return;s.res=s.resCopy,s.res.textContent="",s.options.span&&(Array.isArray(s.options.span)?s.options.span:[s.options.span]).forEach(function(e){if(e.op&&"span"===e.op.name&&Array.isArray(e.op.parts)){var t=0,r=s.prevText||"";if(e.op.parts.forEach(function(e){var n=e.text,o=e.style||{};if(t<r.length){var i=r.indexOf(n,t);if(i>t){var a=r.substring(t,i);s.res.appendChild(new s.constructor(a).setup({type:"span",id:o.id,animation:o.animation}).set({}).render())}t=i+n.length}var l=new s.constructor(n).setup({type:"span",id:o.id,animation:o.animation}).set(o).render();s.res.appendChild(l)}),t<r.length){var n=r.substring(t);s.res.appendChild(new s.constructor(n).setup({type:"span"}).set({}).render())}}})}else{var U=new s.constructor(s.prevText).set({}).render();s.prevText&&s.prevText.length>0&&i&&s.res.appendChild(U)}if(l.includes("animation")){if(s.options.animation&&!s.hasAnimated&&!s.options.animation.op.fireAt){console.warn(s.openTag),s.hasAnimated=!0;var V=s.options.animation.op;window.addEventListener("sidebar:open",function(){s.res.animate(V.keyframesOpen,V.openOptions)}),window.addEventListener("sidebar:closed",function(){s.res.animate(V.keyframesClose,V.closeOptions)}),s.res.animate(V.keyframesClose,{duration:0,fill:"forwards"}),s.openTag&&s.closeTag&&(window.addEventListener(s.openTag,function(){s.res.animate(V.keyframesOpen,V.openOptions)}),window.addEventListener(s.closeTag,function(){s.res.animate(V.keyframesClose,V.closeOptions)}))}if(s.options.animation&&s.options.animation.op.fireAt&&s.options.animation.op.fireAt.endsWith("px")){var q=s.options.animation.op;s.res.animate(q.keyframesClose,{duration:0,fill:"forwards"});var J=function(){window.scrollY>parseFloat(q.fireAt)&&(s.res.animate(q.keyframesOpen,q.openOptions),window.removeEventListener("scroll",J))};window.addEventListener("scroll",J)}if(s.options.animation&&"inview"===s.options.animation.op.fireAt){var K=s.options.animation.op;s.res.animate(K.keyframesClose,{duration:0,fill:"forwards"});var Q=!1;new IntersectionObserver(function(e,t){e.forEach(function(e){e.isIntersecting&&!Q&&(Q=!0,s.res.animate(K.keyframesOpen,K.openOptions),t.disconnect())})}).observe(s.res)}}};this.options.animation||window.addEventListener("resize",function(){return c()}),c()}},{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&&a(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,{SideNav:()=>x});var n="nodality.theme.mode",o="nodality:theme",i={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:"#111111"},dark:{color:"#eeeeee"}},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(o,t);try{e(this.mode,this.current)}catch(e){}return function(){return document.removeEventListener(o,t)}},_broadcast:function(){"undefined"!=typeof document&&document.dispatchEvent(new CustomEvent(o,{detail:{mode:this.mode,tokens:this.current}}))}};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,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,s=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){a=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw i}}}}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,o,i,s,a=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw o}}return a}}(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 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}function u(e){return u="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},u(e)}function d(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,f(n.key),n)}}function f(e){var t=function(e){if("object"!=u(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=u(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==u(t)?t:t+""}function p(e){return p="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},p(e)}function h(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return y(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)?y(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,s=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){a=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw i}}}}function y(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 v(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,m(n.key),n)}}function m(e){var t=function(e){if("object"!=p(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==p(t)?t:t+""}function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(g=function(){return!!e})()}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function k(e,t){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k(e,t)}var x=function(e){function t(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),function(e,t,r){return t=b(t),function(e,t){if(t&&("object"==p(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,g()?Reflect.construct(t,r||[],b(e).constructor):t.apply(e,r))}(this,t)}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&&k(e,t)}(t,e),r=t,(n=[{key:"setup",value:function(e){return this.obj=e,this.setTags(this.obj.tags),this.animate=void 0===this.obj.animate||this.obj.animate,this.res=this.createSideNav(e),this.res.style.position="relative",this.res.style.zIndex=3,this.closed=!0,this}},{key:"toggleSideNav",value:function(e){var t=this;this.closed=!this.closed;var r=this.res.children[0];if(this.closed)if(r.style.overflowX="hidden",e.style.opacity=1,this.animate){this.ope=r.animate([{transform:"translateX(0)"},{transform:"translateX(100%)"}],{duration:300,fill:"forwards"}),this.ope.finished.then(function(){var e=new CustomEvent(t.obj.tags.close);window.dispatchEvent(e)});var n,o=-1,i=h(r.children);try{for(i.s();!(n=i.n()).done;){var s=n.value;if(o+=1,this.masterEL[o]){var a,l=h(s.children);try{for(l.s();!(a=l.n()).done;){var c=a.value,u=this.masterEL[o].options.animation;u&&this.mappedIDS.includes(c.id)&&c.animate(u.op.keyframesClose,u.op.closeOptions)}}catch(e){l.e(e)}finally{l.f()}}}}catch(e){i.e(e)}finally{i.f()}}else r.style.display="none";else{r.style.overflowX="none";var d,f=-1,p=h(r.children);try{for(p.s();!(d=p.n()).done;){var y=d.value;f+=1;var v,m=h(y.children);try{for(m.s();!(v=m.n()).done;){var g=v.value;if(this.mappedIDS.includes(g.id)&&void 0!==this.masterEL[0]){var b=this.masterEL[f].options.animation;if(b){console.log("OPEN KEYFRAMES"),console.log(b.op.keyframesOpen);var k=b.op.openOptions;k.delay||(k.delay=1),k.duration||(k.duration=300),console.log(k),g.animate(b.op.keyframesOpen,k)}}}}catch(e){m.e(e)}finally{m.f()}}}catch(e){p.e(e)}finally{p.f()}e.style.opacity=0,this.animate?(r.style.display="flex",this.opeClose=r.animate([{transform:"translateX(100%)"},{transform:"translateX(0)"}],{duration:300,fill:"forwards"}),this.opeClose.finished.then(function(){var e=new CustomEvent(t.obj.tags.open);window.dispatchEvent(e)})):r.style.display="flex"}}},{key:"createToggleButton",value:function(e){var t=document.createElement("button");return t.innerText="☰",t.style.padding="10px 20px",t.style.backgroundColor="transparent",t.style.color=null!=e?e:"#3498db",t.style.border="none",t.style.borderRadius="5px",t.style.cursor="pointer",t.style.zIndex=1,t.style.fontSize="1.6rem",this.obj.fixed&&(t.style.position="fixed"),t}},{key:"createCloseButton",value:function(e){var t=document.createElement("button");return t.innerText="×",t.style.fontSize="1.6rem",t.style.padding="10px 20px",t.style.backgroundColor="transparent",t.style.color=null!=e?e:"black",t.style.border="none",t.style.borderRadius="5px",t.style.cursor="pointer",t.style.zIndex=1,t.style.alignSelf="flex-end",t}},{key:"createSideNav",value:function(e){var t=this,r=document.createElement("div");r.style.display="flex",r.style.justifyContent="flex-end";var n=document.createElement("div");n.style.display="none",n.style.background=this.obj.background||"#1abc9c",n.style.height="100%",window.matchMedia("(max-device-width: 415px)").matches?n.style.width="100%":n.style.width=this.obj.width||"400px",n.style.position="fixed",n.style.right=0,this.animate&&(n.style.transform="translateX(100%)"),n.style.flexDirection="column",n.style.justifyContent="flex-start";var o=this.createToggleButton(this.obj.hamColour.opened),i=this.createCloseButton(this.obj.hamColour.closed);return o.addEventListener("click",function(){return t.toggleSideNav(o)}),i.addEventListener("click",function(){return t.toggleSideNav(o)}),n.appendChild(i),r.appendChild(n),r.appendChild(o),r}},{key:"items",value:function(e){this.masterEL=e.items.filter(function(e){return void 0!==e.link}),console.log("EXTRACT IDs"),console.log(e);var t=e.items.filter(function(e){return void 0===e.items}).map(function(e){return e.id});if(this.mappedIDS=t,this.item=e,this.res.children[0].appendChild(e.render()),void 0!==this.masterEL[0]){console.log("ANNAX"),console.log(this.masterEL[0]);var r=this.masterEL[0].options.animation;if(r){var n,o=h(this.res.children[0].children);try{for(o.s();!(n=o.n()).done;){var i,s=h(n.value.children);try{for(s.s();!(i=s.n()).done;){var a=i.value;if(this.mappedIDS.includes(a.id)){var l=r.op.closeOptions;l.delay=0,console.log("ANNAX"),console.log("SETTING INITIAL STATE ZEROING THE DELAY"),console.log(r.op.keyframesClose),console.log(l),a.animate(r.op.keyframesClose,r.op.closeOptions)}}}catch(e){s.e(e)}finally{s.f()}}}catch(e){o.e(e)}finally{o.f()}}}return this}},{key:"toCode",value:function(){var e="new SideNav().setup(".concat(this.formatObj(this.obj),")");if(this.item){var t=this.item.toCode?this.item.toCode().join(""):this.formatObj(this.item);t=t.replace(/,\s*(\.set\(|\.add\()/g,"\n $1"),e+=".items(".concat(t,")")}return e}},{key:"formatObj",value:function(e){return JSON.stringify(e,null,2).replace(/"(\w+)"\s*:/g,"$1:")}},{key:"render",value:function(e){return e&&document.querySelector(e).appendChild(this.res),this.res}}])&&v(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(function(){return e=function e(){var t,r,n,o=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(o.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),o.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="",i="",s="",a="",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:")?i=e.replace("tz:",""):e.startsWith("scale(")?s=e:e.startsWith("skew(")?a=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=o.setDefault(r),n=o.setDefault(n),i=o.setDefault(i);var f="";if("0px"!=n&&"0px"!=r&&"0px"!=i?f+="translate3d(".concat(r,", ").concat(n,", ").concat(i,")"):"0px"==n&&"0px"==r||(f+="translate(".concat(r,", ").concat(n,")")),s&&(f+=" ".concat(s)),l&&(f+=" ".concat(l)),a&&(f+=" ".concat(a)),c&&(f+=" ".concat(c)),u&&(f+=" ".concat(u)),f){if(e.op.duration){var p=e.op.duration.replace(/^(\d+)(s)-/,function(e,t,r){return t/2+r+" "}),h="transform ".concat(p,", opacity ").concat(p);o.res.style.transition=h}else o.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";e.op.static&&(o.res.style.transition=""),(o.blastTarget||o.res).style.transform=f,o.res.style.opacity=d}else alert("OPE")}};t.on?o.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) "),o.res.style.opacity="1"}),e&&(o.res.style.transform=e.trim())};if(t.on)o.res.addEventListener("mouseout",function(){t.keep||n()});else{var i=1e3*parseFloat(t.duration),s=t.closeAfter?t.closeAfter:0;setTimeout(function(){t.keep||n()},i/2+s)}t.hardCSS&&(o.res.style.transform=t.hardCSS)}else alert("THIS FIRE WITH GRADIENT (invalid block"),console.log("INVALID BLOCKA"),console.log(e)},(r=f(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=i.subscribe(function(e){return o._applyTheme(e)}),Promise.resolve().then(function(){return o._applyTheme(i.mode)}))},t=[{key:"isHidden",value:function(e){e&&(this.res.style.display="none")}},{key:"theme",value:function(e){var t=this;return e&&"object"===u(e)?(this._themeMap=e,this._applyTheme(i.mode),this._themeUnsub||(this._themeUnsub=i.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=i.defaults&&i.defaults[e];if(n){if(!this._themeOriginal)for(var o in this._themeOriginal={},n)this._themeOriginal[o]=this.res.style[o]||"";for(var s in n)this._themeOriginal[s]||(this.res.style[s]=n[s])}}}},{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",zIndex:"zIndex",position:"position",top:"top",cursor:"cursor",width:"width",maxWidth:"maxWidth",height:"height",maxHeight:"maxHeight",radius:"borderRadius",lineHeight:"lineHeight",background:"background",font:"fontFamily",opacity:"opacity"};for(var r in t)null!=e[r]&&(this.res.style[t[r]]=e[r]);return 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.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.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,e.animation&&(this.res.style.transition="".concat(e.animation),this.res.style.transionProperty="background, color"),this.res.onmouseout=function(){t.res.style.backgroundColor="".concat(t.prevColor),t.res.style.color="".concat(t.foreColor),t.res.style.border=t.prevBorder},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,o=null!==(r=e.border.color)&&void 0!==r?r:"#2ECC71";t.res.style.border=n?"".concat(n,"px solid ").concat(o):"1px solid #2ECC71"}},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 o=function(){if("trn"!==e.value){var o=t.smartRange(window.scrollY,{min:e.from,max:e.to},{min:e.valMin,max:e.valMax});"opacity"===e.value?t.res.style.opacity=o:"scale"===e.value&&(t.res.style.transform="scale(".concat(o,")"))}else{for(var i={},s=["tx","ty"],a=0;a<s.length;a++){var l=s[a],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"),p=t.smartRange(window.scrollY,{min:e.from,max:e.to},{min:d.num,max:f.num});i[l]="".concat(p).concat(d.unit)}}n(i)}};window.addEventListener("scroll",o),0===e.from&&o()}},{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]},o=["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 i=e.find(function(e){return"default"===e.breakpoint});for(var s in i||(i={breakpoint:"default",range:n.default},e.unshift(i)),this.prevStyles={},this.res.style)this.res.style.hasOwnProperty(s)&&isNaN(parseInt(s))&&(this.prevStyles[s]=this.res.style[s]);var l=new Set;e.forEach(function(e){Object.keys(e).forEach(function(e){o.includes(e)||"range"===e||l.add(e)})}),l.forEach(function(e){void 0===i[e]&&(i[e]=r.options[e]||"initial")}),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var t=window.innerWidth,n=i,s=0;s<e.length;s++){var c=e[s],u=a(c.range,2),d=u[0],f=u[1];if("default"!==c.breakpoint&&t>=d&&t<=f){n=c;break}}for(var p in l.forEach(function(e){if("keySet"===e){var t=i[e];t&&t.key&&(r.res.style[t.key]=t.value)}else r.res.style[e]=i[e]}),n)if("exact"===p&&(console.log("APPL"),console.log(n),console.log(r.set),r.set(n)),!o.includes(p)&&"range"!==p){var h=n[p];"keySet"===p&&h&&h.key?r.res.style[h.key]=h.value:"function"==typeof r[p]?r[p](h):r.res.style[p]=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,o=n,i=0;i<e.length;i++){var s=e[i],l=a(s.range,2),c=l[0],u=l[1];if("default"!==s.breakpoint&&r>=c&&r<=u){o=s;break}}var d=void 0!==o.values?o.values:n.values;null!=d&&t.pad(d)}),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},o=function(){for(var r=window.innerWidth,o=n,i=0;i<e.length;i++){var s=e[i],l=a(s.range,2),c=l[0],u=l[1];if("default"!==s.breakpoint&&r>=c&&r<=u){o=s;break}}t(o)};this._responsiveHandler&&window.removeEventListener("resize",this._responsiveHandler),this._responsiveHandler=o,window.addEventListener("resize",o),setTimeout(function(){o()},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,o=n,i=0;i<e.length;i++){var s=e[i],l=a(s.range,2),c=l[0],u=l[1];if("default"!==s.breakpoint&&r>=c&&r<=u){o=s;break}}var d=void 0!==o.values?o.values:n.values;null!=d&&t.mar(d)}),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 o=r[n],i=e[t][o],s=0;s<o.length;s++)switch(o[s]){case"a":this.res.style.padding=this.isNumber(i)?"".concat(i,"px"):i;break;case"t":this.res.style.paddingTop=this.isNumber(i)?"".concat(i,"px"):i;break;case"l":this.res.style.paddingLeft=this.isNumber(i)?"".concat(i,"px"):i;break;case"r":this.res.style.paddingRight=this.isNumber(i)?"".concat(i,"px"):i;break;case"b":this.res.style.paddingBottom=this.isNumber(i)?"".concat(i,"px"):i}return this}},{key:"as",value:function(e){return this.res.style.alignSelf=e,this}},{key:"mar",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 o=r[n],i=e[t][o],s=0;s<o.length;s++){switch(o[s]){case"a":this.res.style.margin=this.isNumber(i)?"".concat(i,"px"):i;break;case"t":this.res.style.marginTop=this.isNumber(i)?"".concat(i,"px"):i;break;case"l":this.res.style.marginLeft=this.isNumber(i)?"".concat(i,"px"):i;break;case"r":this.res.style.marginRight=this.isNumber(i)?"".concat(i,"px"):i;break;case"b":this.res.style.marginBottom=this.isNumber(i)?"".concat(i,"px"):i}"auto"===o[s]&&(this.res.style.marginLeft="auto",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 o=(r.min-r.max)*n-r.min;if(o=Math.abs(o),r.min<r.max){var i=(r.max+Math.abs(r.min))*n;o=r.min+i}return o}},{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 o=document.createTextNode(this.text);this.res.appendChild(o),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 i=document.createTextNode(this.text);this.res.appendChild(i),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 s=document.createTextNode(this.text);this.res.appendChild(s),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),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 o,i=s(e);try{for(i.s();!(o=i.n()).done;){var l=o.value;l.range||(l.range=["0px","999999px"])}}catch(e){i.e(e)}finally{i.f()}e.sort(function(e,t){return parseInt(e.range[0])-parseInt(t.range[0])});var c=function(o){var i=window.visualViewport.width,l=[],c=[];n.resCopy=n.res,n.storedQueries=e.map(function(e){return e.target}).filter(function(e){return null!=e});var u,d=s(e);try{for(d.s();!(u=d.n()).done;){var f=u.value;n.counterIndex++;var p=a(f.range,2),h=p[0],y=p[1],v=parseInt(h),m=parseInt(y),g=!0;if(f.target){g=!1;for(var b=0;b<f.target.length;b++)f.target[b]===t&&(g=!0)}i>=v&&i<=m&&g&&(l.push(f.log),c.push(f),f.op&&f.op.margin&&(n.useMargin=f.op.margin))}}catch(e){d.e(e)}finally{d.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),l.includes("gradient"),(l.includes("gradient")||l.includes("shadow"))&&(n.res.style.position="relative"),l.includes("blast")){var k,x=c.filter(function(e){return"blast"===e.log})[0].op.color,w=null!==(k=c.filter(function(e){return"blast"===e.log})[0].op.width)&&void 0!==k?k:"1px";"FlexRowLayoutElement"===n.getType()||"LayoutWrapperElement"===n.getType()?(n.res.style.border="".concat("number"==typeof w?w+"px":w," 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"]=x,n.res.style["-webkit-text-stroke-width"]="".concat(w))}if(l.includes("filter")){var S=c.filter(function(e){return"filter"===e.log})[0].op.filter;n.res.style.filter=S}if(l.includes("background")&&(n.res.style.backgroundColor="green"),l.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")),l.includes("shadow")){var T,E,O,C,j=n.options.shadow.op;console.log("OP IS",j);var I=null!==(T=j.steps)&&void 0!==T?T:1,_=null!==(E=j.colors)&&void 0!==E?E:["gray"],A=null!==(O=j.movements)&&void 0!==O?O:["3px","3px"],L=null!==(C=j.radius)&&void 0!==C?C:"3px";if(1===A.length&&(A=[A[0],A[0]]),"FlexRowLayoutElement"===n.getType()||"LayoutWrapperElement"===n.getType()){for(var N=[],M=0;M<I;M++){var W,R=null!==(W=_[M])&&void 0!==W?W:_[0],P=A[0],z=A[1];N.push("".concat(P," ").concat(z," ").concat(L," ").concat(R))}n.res.style.boxShadow=N.join(", ")}else{for(var D=[],B=0;B<I;B++){var F,H=null!==(F=_[B])&&void 0!==F?F:_[0],X=A[0],U=A[1];D.push("drop-shadow(".concat(X," ").concat(U," ").concat(L," ").concat(H,")"))}n.res.style.filter=D.join(" ")}}if(l.includes("margin"))for(b=0;b<e.length;b++)if(e[b].op){var Y=e[b].op.offsets;Y&&void 0!==n.index&&(n.res.style.margin=Y[Number(n.index)]+"px")}if(l.includes("spana")||l.includes("span")){var G=document.createElement("div");if(G.setAttribute("id","oroa"),Object.assign(G.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 o=e.text,i=e.style||{};if(t<r.length){var s=r.indexOf(o,t);if(s>t){var a=r.substring(t,s);n.res.appendChild(new n.constructor(a).setup({type:"span",id:i.id,animation:i.animation}).set({}).render())}t=s+o.length}var l=new n.constructor(o).setup({type:"span",id:i.id,animation:i.animation}).set(i).render();n.res.appendChild(l)}),t<r.length){var o=r.substring(t);n.res.appendChild(new n.constructor(o).setup({type:"span"}).set({}).render())}}})}else{var $=new n.constructor(n.prevText).set({}).render();n.prevText&&n.prevText.length>0&&o&&n.res.appendChild($)}if(l.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 q=n.options.animation.op;n.res.animate(q.keyframesClose,{duration:0,fill:"forwards"});var J=function(){window.scrollY>parseFloat(q.fireAt)&&(n.res.animate(q.keyframesOpen,q.openOptions),window.removeEventListener("scroll",J))};window.addEventListener("scroll",J)}if(n.options.animation&&"inview"===n.options.animation.op.fireAt){var K=n.options.animation.op;n.res.animate(K.keyframesClose,{duration:0,fill:"forwards"});var Q=!1;new IntersectionObserver(function(e,t){e.forEach(function(e){e.isIntersecting&&!Q&&(Q=!0,n.res.animate(K.keyframesOpen,K.openOptions),t.disconnect())})}).observe(n.res)}}};this.options.animation||window.addEventListener("resize",function(){return c()}),c()}},{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&&d(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}());module.exports=t})();
|
package/dist/side-nav-bar.esm.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
var e={};function t(e){return t="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},t(e)}function r(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=o(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,s=function(){};return{s,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:s}}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 i,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,i=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function n(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,o,s,i,a=[],l=!0,c=!1;try{if(s=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=s.call(r)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw o}}return a}}(e,t)||o(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 o(e,t){if(e){if("string"==typeof e)return s(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)?s(e,t):void 0}}function s(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 i(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,a(n.key),n)}}function a(e){var r=function(e){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,"string");if("object"!=t(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==t(r)?r:r+""}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]})},e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var l=function(){return e=function e(){var t,r,n,o=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(o.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),o.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="",s="",i="",a="",l="",c="",u="",p="";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:")?s=e.replace("tz:",""):e.startsWith("scale(")?i=e:e.startsWith("skew(")?a=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:")&&(p=e.replace("opacity:",""))}),r=o.setDefault(r),n=o.setDefault(n),s=o.setDefault(s);var f="";if("0px"!=n&&"0px"!=r&&"0px"!=s?f+="translate3d(".concat(r,", ").concat(n,", ").concat(s,")"):"0px"==n&&"0px"==r||(f+="translate(".concat(r,", ").concat(n,")")),i&&(f+=" ".concat(i)),l&&(f+=" ".concat(l)),a&&(f+=" ".concat(a)),c&&(f+=" ".concat(c)),u&&(f+=" ".concat(u)),f){if(e.op.duration){var d=e.op.duration.replace(/^(\d+)(s)-/,function(e,t,r){return t/2+r+" "}),h="transform ".concat(d,", opacity ").concat(d);o.res.style.transition=h}else o.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";e.op.static&&(o.res.style.transition=""),(o.blastTarget||o.res).style.transform=f,o.res.style.opacity=p}else alert("OPE")}};t.on?o.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) "),o.res.style.opacity="1"}),e&&(o.res.style.transform=e.trim())};if(t.on)o.res.addEventListener("mouseout",function(){t.keep||n()});else{var s=1e3*parseFloat(t.duration),i=t.closeAfter?t.closeAfter:0;setTimeout(function(){t.keep||n()},s/2+i)}t.hardCSS&&(o.res.style.transform=t.hardCSS)}else alert("THIS FIRE WITH GRADIENT (invalid block"),console.log("INVALID BLOCKA"),console.log(e)},(r=a(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},t=[{key:"isHidden",value:function(e){e&&(this.res.style.display="none")}},{key:"keySet",value:function(e){return this.temporaryVal=1,this.res.style[e.key]=e.value,this}},{key:"commonMethods",value:function(e){var t={exact:"fontSize",zIndex:"zIndex",position:"position",top:"top",cursor:"cursor",width:"width",maxWidth:"maxWidth",height:"height",maxHeight:"maxHeight",radius:"borderRadius",lineHeight:"lineHeight",background:"background",font:"fontFamily",opacity:"opacity"};for(var r in t)null!=e[r]&&(this.res.style[t[r]]=e[r]);return 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.hide&&this.isHidden(e.hide),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.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,e.animation&&(this.res.style.transition="".concat(e.animation),this.res.style.transionProperty="background, color"),this.res.onmouseout=function(){t.res.style.backgroundColor="".concat(t.prevColor),t.res.style.color="".concat(t.foreColor),t.res.style.border=t.prevBorder},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,o=null!==(r=e.border.color)&&void 0!==r?r:"#2ECC71";t.res.style.border=n?"".concat(n,"px solid ").concat(o):"1px solid #2ECC71"}},this}},{key:"onScroll",value:function(e){var t=this;"opacity"===e.value?this.res.style.opacity=e.valMin:"scale"===e.value&&(this.res.style.transform="scale(".concat(e.valMax,")")),window.addEventListener("scroll",function(){var r=t.smartRange(window.scrollY,{min:e.from,max:e.to},{min:e.valMin,max:e.valMax});"opacity"===e.value?t.res.style.opacity=r:"scale"===e.value&&(t.res.style.transform="scale(".concat(r,")"))})}},{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 o={default:[0,1e5],xs:[0,575],sm:[576,767],md:[768,991],lg:[992,1199],xl:[1200,1399],xxl:[1400,1e5]},s=["resprop","breakpoint","value","values","range"];e.forEach(function(e){void 0!==o[e.breakpoint]?e.range=o[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 i=e.find(function(e){return"default"===e.breakpoint});for(var a in i||(i={breakpoint:"default",range:o.default},e.unshift(i)),this.prevStyles={},this.res.style)this.res.style.hasOwnProperty(a)&&isNaN(parseInt(a))&&(this.prevStyles[a]=this.res.style[a]);var l=new Set;e.forEach(function(e){Object.keys(e).forEach(function(e){s.includes(e)||"range"===e||l.add(e)})}),l.forEach(function(e){void 0===i[e]&&(i[e]=r.options[e]||"initial")}),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var t=window.innerWidth,o=i,a=0;a<e.length;a++){var c=e[a],u=n(c.range,2),p=u[0],f=u[1];if("default"!==c.breakpoint&&t>=p&&t<=f){o=c;break}}for(var d in l.forEach(function(e){if("keySet"===e){var t=i[e];t&&t.key&&(r.res.style[t.key]=t.value)}else r.res.style[e]=i[e]}),o)if("exact"===d&&(console.log("APPL"),console.log(o),console.log(r.set),r.set(o)),!s.includes(d)&&"range"!==d){var h=o[d];"keySet"===d&&h&&h.key?r.res.style[h.key]=h.value:"function"==typeof r[d]?r[d](h):r.res.style[d]=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 o=e.find(function(e){return"default"===e.breakpoint});o||(o={breakpoint:"default",range:r.default},e.unshift(o)),void 0===o.values&&(o.values=this.options.pad||null),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var r=window.innerWidth,s=o,i=0;i<e.length;i++){var a=e[i],l=n(a.range,2),c=l[0],u=l[1];if("default"!==a.breakpoint&&r>=c&&r<=u){s=a;break}}var p=void 0!==s.values?s.values:o.values;null!=p&&t.pad(p)}),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 o=e.find(function(e){return"default"===e.breakpoint})||{breakpoint:"default",range:r.default},s=function(){for(var r=window.innerWidth,s=o,i=0;i<e.length;i++){var a=e[i],l=n(a.range,2),c=l[0],u=l[1];if("default"!==a.breakpoint&&r>=c&&r<=u){s=a;break}}t(s)};this._responsiveHandler&&window.removeEventListener("resize",this._responsiveHandler),this._responsiveHandler=s,window.addEventListener("resize",s),setTimeout(function(){s()},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 o=e.find(function(e){return"default"===e.breakpoint});o||(o={breakpoint:"default",range:r.default},e.unshift(o)),void 0===o.values&&(o.values=this.options.pad||null),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var r=window.innerWidth,s=o,i=0;i<e.length;i++){var a=e[i],l=n(a.range,2),c=l[0],u=l[1];if("default"!==a.breakpoint&&r>=c&&r<=u){s=a;break}}var p=void 0!==s.values?s.values:o.values;null!=p&&t.mar(p)}),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 o=r[n],s=e[t][o],i=0;i<o.length;i++)switch(o[i]){case"a":this.res.style.padding=this.isNumber(s)?"".concat(s,"px"):s;break;case"t":this.res.style.paddingTop=this.isNumber(s)?"".concat(s,"px"):s;break;case"l":this.res.style.paddingLeft=this.isNumber(s)?"".concat(s,"px"):s;break;case"r":this.res.style.paddingRight=this.isNumber(s)?"".concat(s,"px"):s;break;case"b":this.res.style.paddingBottom=this.isNumber(s)?"".concat(s,"px"):s}return this}},{key:"as",value:function(e){return this.res.style.alignSelf=e,this}},{key:"mar",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 o=r[n],s=e[t][o],i=0;i<o.length;i++){switch(o[i]){case"a":this.res.style.margin=this.isNumber(s)?"".concat(s,"px"):s;break;case"t":this.res.style.marginTop=this.isNumber(s)?"".concat(s,"px"):s;break;case"l":this.res.style.marginLeft=this.isNumber(s)?"".concat(s,"px"):s;break;case"r":this.res.style.marginRight=this.isNumber(s)?"".concat(s,"px"):s;break;case"b":this.res.style.marginBottom=this.isNumber(s)?"".concat(s,"px"):s}"auto"===o[i]&&(this.res.style.marginLeft="auto",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 o=(r.min-r.max)*n-r.min;if(o=Math.abs(o),r.min<r.max){var s=(r.max+Math.abs(r.min))*n;o=r.min+s}return o}},{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 o=document.createTextNode(this.text);this.res.appendChild(o),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 s=document.createTextNode(this.text);this.res.appendChild(s),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 i=document.createTextNode(this.text);this.res.appendChild(i),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),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,o){var s=this;console.log("0P"),this.ap=!1,this.cta=0,this.once=!1;var i,a=r(e);try{for(a.s();!(i=a.n()).done;){var l=i.value;l.range||(l.range=["0px","999999px"])}}catch(e){a.e(e)}finally{a.f()}e.sort(function(e,t){return parseInt(e.range[0])-parseInt(t.range[0])});var c=function(i){var a=window.visualViewport.width,l=[],c=[];s.resCopy=s.res,s.storedQueries=e.map(function(e){return e.target}).filter(function(e){return null!=e});var u,p=r(e);try{for(p.s();!(u=p.n()).done;){var f=u.value;s.counterIndex++;var d=n(f.range,2),h=d[0],y=d[1],v=parseInt(h),m=parseInt(y),g=!0;if(f.target){g=!1;for(var b=0;b<f.target.length;b++)f.target[b]===t&&(g=!0)}a>=v&&a<=m&&g&&(l.push(f.log),c.push(f),f.op&&f.op.margin&&(s.useMargin=f.op.margin))}}catch(e){p.e(e)}finally{p.f()}if(o&&!o.includes("background")&&(s.res.style.background="",s.res.style.backgroundColor=""),s.res.style.textShadow="",o&&!o.includes("border")&&(s.res.style.border=""),o&&!o.includes("margin")&&(s.res.style.margin=""),s.res.style["-webkit-text-fill-color"]="",s.res.style["-webkit-text-stroke-color"]="",s.res.style["-webkit-text-stroke-width"]="",s.res.style.filter="",s.options.background&&(console.log(s.options.background),s.res.style.background=s.options.background),l.includes("gradient"),(l.includes("gradient")||l.includes("shadow"))&&(s.res.style.position="relative"),l.includes("blast")){var x,k=c.filter(function(e){return"blast"===e.log})[0].op.color,w=null!==(x=c.filter(function(e){return"blast"===e.log})[0].op.width)&&void 0!==x?x:"1px";"FlexRowLayoutElement"===s.getType()||"LayoutWrapperElement"===s.getType()?(s.res.style.border="".concat("number"==typeof w?w+"px":w," solid orange"),s.res.style.display="inline-block","FlexRowLayoutElement"===s.getType()&&(s.res.style.display="flex"),s.res.style.boxSizing="border-box",s.res.style.transformOrigin="center",s.blastTarget=s.res):(s.text,s.res.style["-webkit-text-fill-color"]="transparent",s.res.style["-webkit-text-stroke-color"]=k,s.res.style["-webkit-text-stroke-width"]="".concat(w))}if(l.includes("filter")){var S=c.filter(function(e){return"filter"===e.log})[0].op.filter;s.res.style.filter=S}if(l.includes("background")&&(s.res.style.backgroundColor="green"),l.includes("gradient")&&("LayoutWrapperElement"!==s.getType()&&"FlexRowLayoutElement"!==s.getType()&&(s.res.style["-webkit-text-fill-color"]="transparent"),s.res.style.background=s.globalGradient,"LayoutWrapperElement"!==s.getType()&&"FlexRowLayoutElement"!==s.getType()&&(s.res.style["background-clip"]="text")),l.includes("shadow")){var E,T,C,O,I=s.options.shadow.op;console.log("OP IS",I);var j=null!==(E=I.steps)&&void 0!==E?E:1,A=null!==(T=I.colors)&&void 0!==T?T:["gray"],L=null!==(C=I.movements)&&void 0!==C?C:["3px","3px"],N=null!==(O=I.radius)&&void 0!==O?O:"3px";if(1===L.length&&(L=[L[0],L[0]]),"FlexRowLayoutElement"===s.getType()||"LayoutWrapperElement"===s.getType()){for(var W=[],R=0;R<j;R++){var P,_=null!==(P=A[R])&&void 0!==P?P:A[0],z=L[0],M=L[1];W.push("".concat(z," ").concat(M," ").concat(N," ").concat(_))}s.res.style.boxShadow=W.join(", ")}else{for(var D=[],B=0;B<j;B++){var F,H=null!==(F=A[B])&&void 0!==F?F:A[0],X=L[0],Y=L[1];D.push("drop-shadow(".concat(X," ").concat(Y," ").concat(N," ").concat(H,")"))}s.res.style.filter=D.join(" ")}}if(l.includes("margin"))for(b=0;b<e.length;b++)if(e[b].op){var G=e[b].op.offsets;G&&void 0!==s.index&&(s.res.style.margin=G[Number(s.index)]+"px")}if(l.includes("spana")||l.includes("span")){var $=document.createElement("div");if($.setAttribute("id","oroa"),Object.assign($.style,{position:"absolute",inset:"0",background:"linear-gradient(90deg, rgb(52,152,219), rgb(26,188,156))",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",pointerEvents:"none"}),s.res&&s.res.querySelector("span"))return;s.res=s.resCopy,s.res.textContent="",s.options.span&&(Array.isArray(s.options.span)?s.options.span:[s.options.span]).forEach(function(e){if(e.op&&"span"===e.op.name&&Array.isArray(e.op.parts)){var t=0,r=s.prevText||"";if(e.op.parts.forEach(function(e){var n=e.text,o=e.style||{};if(t<r.length){var i=r.indexOf(n,t);if(i>t){var a=r.substring(t,i);s.res.appendChild(new s.constructor(a).setup({type:"span",id:o.id,animation:o.animation}).set({}).render())}t=i+n.length}var l=new s.constructor(n).setup({type:"span",id:o.id,animation:o.animation}).set(o).render();s.res.appendChild(l)}),t<r.length){var n=r.substring(t);s.res.appendChild(new s.constructor(n).setup({type:"span"}).set({}).render())}}})}else{var U=new s.constructor(s.prevText).set({}).render();s.prevText&&s.prevText.length>0&&i&&s.res.appendChild(U)}if(l.includes("animation")){if(s.options.animation&&!s.hasAnimated&&!s.options.animation.op.fireAt){console.warn(s.openTag),s.hasAnimated=!0;var V=s.options.animation.op;window.addEventListener("sidebar:open",function(){s.res.animate(V.keyframesOpen,V.openOptions)}),window.addEventListener("sidebar:closed",function(){s.res.animate(V.keyframesClose,V.closeOptions)}),s.res.animate(V.keyframesClose,{duration:0,fill:"forwards"}),s.openTag&&s.closeTag&&(window.addEventListener(s.openTag,function(){s.res.animate(V.keyframesOpen,V.openOptions)}),window.addEventListener(s.closeTag,function(){s.res.animate(V.keyframesClose,V.closeOptions)}))}if(s.options.animation&&s.options.animation.op.fireAt&&s.options.animation.op.fireAt.endsWith("px")){var q=s.options.animation.op;s.res.animate(q.keyframesClose,{duration:0,fill:"forwards"});var J=function(){window.scrollY>parseFloat(q.fireAt)&&(s.res.animate(q.keyframesOpen,q.openOptions),window.removeEventListener("scroll",J))};window.addEventListener("scroll",J)}if(s.options.animation&&"inview"===s.options.animation.op.fireAt){var K=s.options.animation.op;s.res.animate(K.keyframesClose,{duration:0,fill:"forwards"});var Q=!1;new IntersectionObserver(function(e,t){e.forEach(function(e){e.isIntersecting&&!Q&&(Q=!0,s.res.animate(K.keyframesOpen,K.openOptions),t.disconnect())})}).observe(s.res)}}};this.options.animation||window.addEventListener("resize",function(){return c()}),c()}},{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&&i(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function c(e){return c="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},c(e)}function u(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return p(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)?p(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 s,i=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){a=!0,s=e},f:function(){try{i||null==r.return||r.return()}finally{if(a)throw s}}}}function p(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 f(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,d(n.key),n)}}function d(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}function h(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(h=function(){return!!e})()}function y(e){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},y(e)}function v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}var m=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t,r){return t=y(t),function(e,t){if(t&&("object"==c(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,h()?Reflect.construct(t,r||[],y(e).constructor):t.apply(e,r))}(this,e)}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&&v(e,t)}(e,l),t=e,(r=[{key:"setup",value:function(e){return this.obj=e,this.setTags(this.obj.tags),this.animate=void 0===this.obj.animate||this.obj.animate,this.res=this.createSideNav(e),this.res.style.position="relative",this.res.style.zIndex=3,this.closed=!0,this}},{key:"toggleSideNav",value:function(e){var t=this;this.closed=!this.closed;var r=this.res.children[0];if(this.closed)if(r.style.overflowX="hidden",e.style.opacity=1,this.animate){this.ope=r.animate([{transform:"translateX(0)"},{transform:"translateX(100%)"}],{duration:300,fill:"forwards"}),this.ope.finished.then(function(){var e=new CustomEvent(t.obj.tags.close);window.dispatchEvent(e)});var n,o=-1,s=u(r.children);try{for(s.s();!(n=s.n()).done;){var i=n.value;if(o+=1,this.masterEL[o]){var a,l=u(i.children);try{for(l.s();!(a=l.n()).done;){var c=a.value,p=this.masterEL[o].options.animation;p&&this.mappedIDS.includes(c.id)&&c.animate(p.op.keyframesClose,p.op.closeOptions)}}catch(e){l.e(e)}finally{l.f()}}}}catch(e){s.e(e)}finally{s.f()}}else r.style.display="none";else{r.style.overflowX="none";var f,d=-1,h=u(r.children);try{for(h.s();!(f=h.n()).done;){var y=f.value;d+=1;var v,m=u(y.children);try{for(m.s();!(v=m.n()).done;){var g=v.value;if(this.mappedIDS.includes(g.id)&&void 0!==this.masterEL[0]){var b=this.masterEL[d].options.animation;if(b){console.log("OPEN KEYFRAMES"),console.log(b.op.keyframesOpen);var x=b.op.openOptions;x.delay||(x.delay=1),x.duration||(x.duration=300),console.log(x),g.animate(b.op.keyframesOpen,x)}}}}catch(e){m.e(e)}finally{m.f()}}}catch(e){h.e(e)}finally{h.f()}e.style.opacity=0,this.animate?(r.style.display="flex",this.opeClose=r.animate([{transform:"translateX(100%)"},{transform:"translateX(0)"}],{duration:300,fill:"forwards"}),this.opeClose.finished.then(function(){var e=new CustomEvent(t.obj.tags.open);window.dispatchEvent(e)})):r.style.display="flex"}}},{key:"createToggleButton",value:function(e){var t=document.createElement("button");return t.innerText="☰",t.style.padding="10px 20px",t.style.backgroundColor="transparent",t.style.color=null!=e?e:"#3498db",t.style.border="none",t.style.borderRadius="5px",t.style.cursor="pointer",t.style.zIndex=1,t.style.fontSize="1.6rem",this.obj.fixed&&(t.style.position="fixed"),t}},{key:"createCloseButton",value:function(e){var t=document.createElement("button");return t.innerText="×",t.style.fontSize="1.6rem",t.style.padding="10px 20px",t.style.backgroundColor="transparent",t.style.color=null!=e?e:"black",t.style.border="none",t.style.borderRadius="5px",t.style.cursor="pointer",t.style.zIndex=1,t.style.alignSelf="flex-end",t}},{key:"createSideNav",value:function(e){var t=this,r=document.createElement("div");r.style.display="flex",r.style.justifyContent="flex-end";var n=document.createElement("div");n.style.display="none",n.style.background=this.obj.background||"#1abc9c",n.style.height="100%",window.matchMedia("(max-device-width: 415px)").matches?n.style.width="100%":n.style.width=this.obj.width||"400px",n.style.position="fixed",n.style.right=0,this.animate&&(n.style.transform="translateX(100%)"),n.style.flexDirection="column",n.style.justifyContent="flex-start";var o=this.createToggleButton(this.obj.hamColour.opened),s=this.createCloseButton(this.obj.hamColour.closed);return o.addEventListener("click",function(){return t.toggleSideNav(o)}),s.addEventListener("click",function(){return t.toggleSideNav(o)}),n.appendChild(s),r.appendChild(n),r.appendChild(o),r}},{key:"items",value:function(e){this.masterEL=e.items.filter(function(e){return void 0!==e.link}),console.log("EXTRACT IDs"),console.log(e);var t=e.items.filter(function(e){return void 0===e.items}).map(function(e){return e.id});if(this.mappedIDS=t,this.item=e,this.res.children[0].appendChild(e.render()),void 0!==this.masterEL[0]){console.log("ANNAX"),console.log(this.masterEL[0]);var r=this.masterEL[0].options.animation;if(r){var n,o=u(this.res.children[0].children);try{for(o.s();!(n=o.n()).done;){var s,i=u(n.value.children);try{for(i.s();!(s=i.n()).done;){var a=s.value;if(this.mappedIDS.includes(a.id)){var l=r.op.closeOptions;l.delay=0,console.log("ANNAX"),console.log("SETTING INITIAL STATE ZEROING THE DELAY"),console.log(r.op.keyframesClose),console.log(l),a.animate(r.op.keyframesClose,r.op.closeOptions)}}}catch(e){i.e(e)}finally{i.f()}}}catch(e){o.e(e)}finally{o.f()}}}return this}},{key:"toCode",value:function(){var e="new SideNav().setup(".concat(this.formatObj(this.obj),")");if(this.item){var t=this.item.toCode?this.item.toCode().join(""):this.formatObj(this.item);t=t.replace(/,\s*(\.set\(|\.add\()/g,"\n $1"),e+=".items(".concat(t,")")}return e}},{key:"formatObj",value:function(e){return JSON.stringify(e,null,2).replace(/"(\w+)"\s*:/g,"$1:")}},{key:"render",value:function(e){return e&&document.querySelector(e).appendChild(this.res),this.res}}])&&f(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r}();export{m as SideNav};
|
|
1
|
+
var e={};function t(e){return t="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},t(e)}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]})},e.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var r="nodality.theme.mode",n="nodality:theme",o={mode:function(){try{var e=localStorage.getItem(r);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:"#111111"},dark:{color:"#eeeeee"}},setDefaults:function(e){return e&&"object"===t(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"===t(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(r,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(n,t);try{e(this.mode,this.current)}catch(e){}return function(){return document.removeEventListener(n,t)}},_broadcast:function(){"undefined"!=typeof document&&document.dispatchEvent(new CustomEvent(n,{detail:{mode:this.mode,tokens:this.current}}))}};function i(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=a(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,s=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){l=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(l)throw i}}}}function s(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,o,i,s,a=[],l=!0,c=!1;try{if(i=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw o}}return a}}(e,t)||a(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 a(e,t){if(e){if("string"==typeof e)return l(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)?l(e,t):void 0}}function l(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 c(e){return c="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},c(e)}function u(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,f(n.key),n)}}function f(e){var t=function(e){if("object"!=c(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==c(t)?t:t+""}var d=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="",s="",a="",l="",c="",u="",f="";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(")?s=e:e.startsWith("skew(")?a=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:")&&(f=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,")")),s&&(d+=" ".concat(s)),l&&(d+=" ".concat(l)),a&&(d+=" ".concat(a)),c&&(d+=" ".concat(c)),u&&(d+=" ".concat(u)),d){if(e.op.duration){var p=e.op.duration.replace(/^(\d+)(s)-/,function(e,t,r){return t/2+r+" "}),h="transform ".concat(p,", opacity ").concat(p);i.res.style.transition=h}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=f}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),s=t.closeAfter?t.closeAfter:0;setTimeout(function(){t.keep||n()},o/2+s)}t.hardCSS&&(i.res.style.transform=t.hardCSS)}else alert("THIS FIRE WITH GRADIENT (invalid block"),console.log("INVALID BLOCKA"),console.log(e)},(r=f(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:"isHidden",value:function(e){e&&(this.res.style.display="none")}},{key:"theme",value:function(e){var t=this;return e&&"object"===c(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){if(!this._themeOriginal)for(var i in this._themeOriginal={},n)this._themeOriginal[i]=this.res.style[i]||"";for(var s in n)this._themeOriginal[s]||(this.res.style[s]=n[s])}}}},{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",zIndex:"zIndex",position:"position",top:"top",cursor:"cursor",width:"width",maxWidth:"maxWidth",height:"height",maxHeight:"maxHeight",radius:"borderRadius",lineHeight:"lineHeight",background:"background",font:"fontFamily",opacity:"opacity"};for(var r in t)null!=e[r]&&(this.res.style[t[r]]=e[r]);return 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.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.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,e.animation&&(this.res.style.transition="".concat(e.animation),this.res.style.transionProperty="background, color"),this.res.onmouseout=function(){t.res.style.backgroundColor="".concat(t.prevColor),t.res.style.color="".concat(t.foreColor),t.res.style.border=t.prevBorder},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,o=null!==(r=e.border.color)&&void 0!==r?r:"#2ECC71";t.res.style.border=n?"".concat(n,"px solid ").concat(o):"1px solid #2ECC71"}},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 o=function(){if("trn"!==e.value){var o=t.smartRange(window.scrollY,{min:e.from,max:e.to},{min:e.valMin,max:e.valMax});"opacity"===e.value?t.res.style.opacity=o:"scale"===e.value&&(t.res.style.transform="scale(".concat(o,")"))}else{for(var i={},s=["tx","ty"],a=0;a<s.length;a++){var l=s[a],c=e.valMin&&null!=e.valMin[l],u=e.valMax&&null!=e.valMax[l];if(c||u){var f=r(c?e.valMin[l]:u?e.valMax[l]:"0px"),d=r(u?e.valMax[l]:c?e.valMin[l]:"0px"),p=t.smartRange(window.scrollY,{min:e.from,max:e.to},{min:f.num,max:d.num});i[l]="".concat(p).concat(f.unit)}}n(i)}};window.addEventListener("scroll",o),0===e.from&&o()}},{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]},o=["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 i=e.find(function(e){return"default"===e.breakpoint});for(var a in i||(i={breakpoint:"default",range:n.default},e.unshift(i)),this.prevStyles={},this.res.style)this.res.style.hasOwnProperty(a)&&isNaN(parseInt(a))&&(this.prevStyles[a]=this.res.style[a]);var l=new Set;e.forEach(function(e){Object.keys(e).forEach(function(e){o.includes(e)||"range"===e||l.add(e)})}),l.forEach(function(e){void 0===i[e]&&(i[e]=r.options[e]||"initial")}),this._responsiveTasks=this._responsiveTasks||[],this._responsiveTasks.push(function(){for(var t=window.innerWidth,n=i,a=0;a<e.length;a++){var c=e[a],u=s(c.range,2),f=u[0],d=u[1];if("default"!==c.breakpoint&&t>=f&&t<=d){n=c;break}}for(var p in l.forEach(function(e){if("keySet"===e){var t=i[e];t&&t.key&&(r.res.style[t.key]=t.value)}else r.res.style[e]=i[e]}),n)if("exact"===p&&(console.log("APPL"),console.log(n),console.log(r.set),r.set(n)),!o.includes(p)&&"range"!==p){var h=n[p];"keySet"===p&&h&&h.key?r.res.style[h.key]=h.value:"function"==typeof r[p]?r[p](h):r.res.style[p]=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,o=n,i=0;i<e.length;i++){var a=e[i],l=s(a.range,2),c=l[0],u=l[1];if("default"!==a.breakpoint&&r>=c&&r<=u){o=a;break}}var f=void 0!==o.values?o.values:n.values;null!=f&&t.pad(f)}),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},o=function(){for(var r=window.innerWidth,o=n,i=0;i<e.length;i++){var a=e[i],l=s(a.range,2),c=l[0],u=l[1];if("default"!==a.breakpoint&&r>=c&&r<=u){o=a;break}}t(o)};this._responsiveHandler&&window.removeEventListener("resize",this._responsiveHandler),this._responsiveHandler=o,window.addEventListener("resize",o),setTimeout(function(){o()},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,o=n,i=0;i<e.length;i++){var a=e[i],l=s(a.range,2),c=l[0],u=l[1];if("default"!==a.breakpoint&&r>=c&&r<=u){o=a;break}}var f=void 0!==o.values?o.values:n.values;null!=f&&t.mar(f)}),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 o=r[n],i=e[t][o],s=0;s<o.length;s++)switch(o[s]){case"a":this.res.style.padding=this.isNumber(i)?"".concat(i,"px"):i;break;case"t":this.res.style.paddingTop=this.isNumber(i)?"".concat(i,"px"):i;break;case"l":this.res.style.paddingLeft=this.isNumber(i)?"".concat(i,"px"):i;break;case"r":this.res.style.paddingRight=this.isNumber(i)?"".concat(i,"px"):i;break;case"b":this.res.style.paddingBottom=this.isNumber(i)?"".concat(i,"px"):i}return this}},{key:"as",value:function(e){return this.res.style.alignSelf=e,this}},{key:"mar",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 o=r[n],i=e[t][o],s=0;s<o.length;s++){switch(o[s]){case"a":this.res.style.margin=this.isNumber(i)?"".concat(i,"px"):i;break;case"t":this.res.style.marginTop=this.isNumber(i)?"".concat(i,"px"):i;break;case"l":this.res.style.marginLeft=this.isNumber(i)?"".concat(i,"px"):i;break;case"r":this.res.style.marginRight=this.isNumber(i)?"".concat(i,"px"):i;break;case"b":this.res.style.marginBottom=this.isNumber(i)?"".concat(i,"px"):i}"auto"===o[s]&&(this.res.style.marginLeft="auto",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 o=(r.min-r.max)*n-r.min;if(o=Math.abs(o),r.min<r.max){var i=(r.max+Math.abs(r.min))*n;o=r.min+i}return o}},{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 o=document.createTextNode(this.text);this.res.appendChild(o),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 i=document.createTextNode(this.text);this.res.appendChild(i),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 s=document.createTextNode(this.text);this.res.appendChild(s),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),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 o,a=i(e);try{for(a.s();!(o=a.n()).done;){var l=o.value;l.range||(l.range=["0px","999999px"])}}catch(e){a.e(e)}finally{a.f()}e.sort(function(e,t){return parseInt(e.range[0])-parseInt(t.range[0])});var c=function(o){var a=window.visualViewport.width,l=[],c=[];n.resCopy=n.res,n.storedQueries=e.map(function(e){return e.target}).filter(function(e){return null!=e});var u,f=i(e);try{for(f.s();!(u=f.n()).done;){var d=u.value;n.counterIndex++;var p=s(d.range,2),h=p[0],y=p[1],v=parseInt(h),m=parseInt(y),g=!0;if(d.target){g=!1;for(var b=0;b<d.target.length;b++)d.target[b]===t&&(g=!0)}a>=v&&a<=m&&g&&(l.push(d.log),c.push(d),d.op&&d.op.margin&&(n.useMargin=d.op.margin))}}catch(e){f.e(e)}finally{f.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),l.includes("gradient"),(l.includes("gradient")||l.includes("shadow"))&&(n.res.style.position="relative"),l.includes("blast")){var k,x=c.filter(function(e){return"blast"===e.log})[0].op.color,w=null!==(k=c.filter(function(e){return"blast"===e.log})[0].op.width)&&void 0!==k?k:"1px";"FlexRowLayoutElement"===n.getType()||"LayoutWrapperElement"===n.getType()?(n.res.style.border="".concat("number"==typeof w?w+"px":w," 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"]=x,n.res.style["-webkit-text-stroke-width"]="".concat(w))}if(l.includes("filter")){var S=c.filter(function(e){return"filter"===e.log})[0].op.filter;n.res.style.filter=S}if(l.includes("background")&&(n.res.style.backgroundColor="green"),l.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")),l.includes("shadow")){var T,E,O,C,j=n.options.shadow.op;console.log("OP IS",j);var I=null!==(T=j.steps)&&void 0!==T?T:1,_=null!==(E=j.colors)&&void 0!==E?E:["gray"],A=null!==(O=j.movements)&&void 0!==O?O:["3px","3px"],L=null!==(C=j.radius)&&void 0!==C?C:"3px";if(1===A.length&&(A=[A[0],A[0]]),"FlexRowLayoutElement"===n.getType()||"LayoutWrapperElement"===n.getType()){for(var N=[],W=0;W<I;W++){var R,M=null!==(R=_[W])&&void 0!==R?R:_[0],P=A[0],z=A[1];N.push("".concat(P," ").concat(z," ").concat(L," ").concat(M))}n.res.style.boxShadow=N.join(", ")}else{for(var D=[],B=0;B<I;B++){var F,H=null!==(F=_[B])&&void 0!==F?F:_[0],X=A[0],U=A[1];D.push("drop-shadow(".concat(X," ").concat(U," ").concat(L," ").concat(H,")"))}n.res.style.filter=D.join(" ")}}if(l.includes("margin"))for(b=0;b<e.length;b++)if(e[b].op){var Y=e[b].op.offsets;Y&&void 0!==n.index&&(n.res.style.margin=Y[Number(n.index)]+"px")}if(l.includes("spana")||l.includes("span")){var G=document.createElement("div");if(G.setAttribute("id","oroa"),Object.assign(G.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 o=e.text,i=e.style||{};if(t<r.length){var s=r.indexOf(o,t);if(s>t){var a=r.substring(t,s);n.res.appendChild(new n.constructor(a).setup({type:"span",id:i.id,animation:i.animation}).set({}).render())}t=s+o.length}var l=new n.constructor(o).setup({type:"span",id:i.id,animation:i.animation}).set(i).render();n.res.appendChild(l)}),t<r.length){var o=r.substring(t);n.res.appendChild(new n.constructor(o).setup({type:"span"}).set({}).render())}}})}else{var $=new n.constructor(n.prevText).set({}).render();n.prevText&&n.prevText.length>0&&o&&n.res.appendChild($)}if(l.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 q=n.options.animation.op;n.res.animate(q.keyframesClose,{duration:0,fill:"forwards"});var J=function(){window.scrollY>parseFloat(q.fireAt)&&(n.res.animate(q.keyframesOpen,q.openOptions),window.removeEventListener("scroll",J))};window.addEventListener("scroll",J)}if(n.options.animation&&"inview"===n.options.animation.op.fireAt){var K=n.options.animation.op;n.res.animate(K.keyframesClose,{duration:0,fill:"forwards"});var Q=!1;new IntersectionObserver(function(e,t){e.forEach(function(e){e.isIntersecting&&!Q&&(Q=!0,n.res.animate(K.keyframesOpen,K.openOptions),t.disconnect())})}).observe(n.res)}}};this.options.animation||window.addEventListener("resize",function(){return c()}),c()}},{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&&u(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}();function p(e){return p="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},p(e)}function h(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return y(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)?y(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}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 i,s=!0,a=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){a=!0,i=e},f:function(){try{s||null==r.return||r.return()}finally{if(a)throw i}}}}function y(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 v(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,m(n.key),n)}}function m(e){var t=function(e){if("object"!=p(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==p(t)?t:t+""}function g(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}))}catch(e){}return(g=function(){return!!e})()}function b(e){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},b(e)}function k(e,t){return k=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},k(e,t)}var x=function(){function e(){return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),function(e,t,r){return t=b(t),function(e,t){if(t&&("object"==p(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,g()?Reflect.construct(t,r||[],b(e).constructor):t.apply(e,r))}(this,e)}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&&k(e,t)}(e,d),t=e,(r=[{key:"setup",value:function(e){return this.obj=e,this.setTags(this.obj.tags),this.animate=void 0===this.obj.animate||this.obj.animate,this.res=this.createSideNav(e),this.res.style.position="relative",this.res.style.zIndex=3,this.closed=!0,this}},{key:"toggleSideNav",value:function(e){var t=this;this.closed=!this.closed;var r=this.res.children[0];if(this.closed)if(r.style.overflowX="hidden",e.style.opacity=1,this.animate){this.ope=r.animate([{transform:"translateX(0)"},{transform:"translateX(100%)"}],{duration:300,fill:"forwards"}),this.ope.finished.then(function(){var e=new CustomEvent(t.obj.tags.close);window.dispatchEvent(e)});var n,o=-1,i=h(r.children);try{for(i.s();!(n=i.n()).done;){var s=n.value;if(o+=1,this.masterEL[o]){var a,l=h(s.children);try{for(l.s();!(a=l.n()).done;){var c=a.value,u=this.masterEL[o].options.animation;u&&this.mappedIDS.includes(c.id)&&c.animate(u.op.keyframesClose,u.op.closeOptions)}}catch(e){l.e(e)}finally{l.f()}}}}catch(e){i.e(e)}finally{i.f()}}else r.style.display="none";else{r.style.overflowX="none";var f,d=-1,p=h(r.children);try{for(p.s();!(f=p.n()).done;){var y=f.value;d+=1;var v,m=h(y.children);try{for(m.s();!(v=m.n()).done;){var g=v.value;if(this.mappedIDS.includes(g.id)&&void 0!==this.masterEL[0]){var b=this.masterEL[d].options.animation;if(b){console.log("OPEN KEYFRAMES"),console.log(b.op.keyframesOpen);var k=b.op.openOptions;k.delay||(k.delay=1),k.duration||(k.duration=300),console.log(k),g.animate(b.op.keyframesOpen,k)}}}}catch(e){m.e(e)}finally{m.f()}}}catch(e){p.e(e)}finally{p.f()}e.style.opacity=0,this.animate?(r.style.display="flex",this.opeClose=r.animate([{transform:"translateX(100%)"},{transform:"translateX(0)"}],{duration:300,fill:"forwards"}),this.opeClose.finished.then(function(){var e=new CustomEvent(t.obj.tags.open);window.dispatchEvent(e)})):r.style.display="flex"}}},{key:"createToggleButton",value:function(e){var t=document.createElement("button");return t.innerText="☰",t.style.padding="10px 20px",t.style.backgroundColor="transparent",t.style.color=null!=e?e:"#3498db",t.style.border="none",t.style.borderRadius="5px",t.style.cursor="pointer",t.style.zIndex=1,t.style.fontSize="1.6rem",this.obj.fixed&&(t.style.position="fixed"),t}},{key:"createCloseButton",value:function(e){var t=document.createElement("button");return t.innerText="×",t.style.fontSize="1.6rem",t.style.padding="10px 20px",t.style.backgroundColor="transparent",t.style.color=null!=e?e:"black",t.style.border="none",t.style.borderRadius="5px",t.style.cursor="pointer",t.style.zIndex=1,t.style.alignSelf="flex-end",t}},{key:"createSideNav",value:function(e){var t=this,r=document.createElement("div");r.style.display="flex",r.style.justifyContent="flex-end";var n=document.createElement("div");n.style.display="none",n.style.background=this.obj.background||"#1abc9c",n.style.height="100%",window.matchMedia("(max-device-width: 415px)").matches?n.style.width="100%":n.style.width=this.obj.width||"400px",n.style.position="fixed",n.style.right=0,this.animate&&(n.style.transform="translateX(100%)"),n.style.flexDirection="column",n.style.justifyContent="flex-start";var o=this.createToggleButton(this.obj.hamColour.opened),i=this.createCloseButton(this.obj.hamColour.closed);return o.addEventListener("click",function(){return t.toggleSideNav(o)}),i.addEventListener("click",function(){return t.toggleSideNav(o)}),n.appendChild(i),r.appendChild(n),r.appendChild(o),r}},{key:"items",value:function(e){this.masterEL=e.items.filter(function(e){return void 0!==e.link}),console.log("EXTRACT IDs"),console.log(e);var t=e.items.filter(function(e){return void 0===e.items}).map(function(e){return e.id});if(this.mappedIDS=t,this.item=e,this.res.children[0].appendChild(e.render()),void 0!==this.masterEL[0]){console.log("ANNAX"),console.log(this.masterEL[0]);var r=this.masterEL[0].options.animation;if(r){var n,o=h(this.res.children[0].children);try{for(o.s();!(n=o.n()).done;){var i,s=h(n.value.children);try{for(s.s();!(i=s.n()).done;){var a=i.value;if(this.mappedIDS.includes(a.id)){var l=r.op.closeOptions;l.delay=0,console.log("ANNAX"),console.log("SETTING INITIAL STATE ZEROING THE DELAY"),console.log(r.op.keyframesClose),console.log(l),a.animate(r.op.keyframesClose,r.op.closeOptions)}}}catch(e){s.e(e)}finally{s.f()}}}catch(e){o.e(e)}finally{o.f()}}}return this}},{key:"toCode",value:function(){var e="new SideNav().setup(".concat(this.formatObj(this.obj),")");if(this.item){var t=this.item.toCode?this.item.toCode().join(""):this.formatObj(this.item);t=t.replace(/,\s*(\.set\(|\.add\()/g,"\n $1"),e+=".items(".concat(t,")")}return e}},{key:"formatObj",value:function(e){return JSON.stringify(e,null,2).replace(/"(\w+)"\s*:/g,"$1:")}},{key:"render",value:function(e){return e&&document.querySelector(e).appendChild(this.res),this.res}}])&&v(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r}();export{x as SideNav};
|