nodality 1.0.50 → 1.0.52
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.cjs.js.LICENSE.txt +1 -1
- package/dist/animator.esm.js +1 -1
- package/dist/animator.esm.js.LICENSE.txt +1 -1
- package/dist/appleanim.cjs.js.LICENSE.txt +1 -1
- package/dist/appleanim.esm.js.LICENSE.txt +1 -1
- package/dist/audionew.cjs.js +1 -1
- package/dist/audionew.cjs.js.LICENSE.txt +1 -1
- package/dist/audionew.esm.js +1 -1
- package/dist/audionew.esm.js.LICENSE.txt +1 -1
- package/dist/base.cjs.js.LICENSE.txt +1 -1
- package/dist/base.esm.js.LICENSE.txt +1 -1
- package/dist/betaDesktopBar.esm.js +1 -1
- package/dist/betaDesktopBar.esm.js.LICENSE.txt +1 -1
- package/dist/betaMobileBar.esm.js +1 -1
- package/dist/betaMobileBar.esm.js.LICENSE.txt +1 -1
- package/dist/bundle.umd.js +1 -1
- package/dist/bundle.umd.js.LICENSE.txt +1 -1
- package/dist/button.cjs.js +1 -1
- package/dist/button.cjs.js.LICENSE.txt +1 -1
- package/dist/button.esm.js +1 -1
- package/dist/button.esm.js.LICENSE.txt +1 -1
- package/dist/cardGetter.cjs.js.LICENSE.txt +1 -1
- package/dist/cardGetter.esm.js.LICENSE.txt +1 -1
- package/dist/center.cjs.js.LICENSE.txt +1 -1
- package/dist/center.esm.js.LICENSE.txt +1 -1
- package/dist/checkbox.cjs.js +1 -1
- package/dist/checkbox.cjs.js.LICENSE.txt +1 -1
- package/dist/checkbox.esm.js +1 -1
- package/dist/checkbox.esm.js.LICENSE.txt +1 -1
- package/dist/code.cjs.js +1 -1
- package/dist/code.cjs.js.LICENSE.txt +1 -1
- package/dist/code.esm.js +1 -1
- package/dist/code.esm.js.LICENSE.txt +1 -1
- package/dist/container.cjs.js +1 -1
- package/dist/container.cjs.js.LICENSE.txt +1 -1
- package/dist/container.esm.js +1 -1
- package/dist/container.esm.js.LICENSE.txt +1 -1
- package/dist/datalist.cjs.js.LICENSE.txt +1 -1
- package/dist/datalist.esm.js.LICENSE.txt +1 -1
- package/dist/designer.cjs.js +1 -1
- package/dist/designer.cjs.js.LICENSE.txt +1 -1
- package/dist/designer.esm.js +1 -1
- package/dist/designer.esm.js.LICENSE.txt +1 -1
- package/dist/dropdown.cjs.js +1 -1
- package/dist/dropdown.cjs.js.LICENSE.txt +1 -1
- package/dist/dropdown.esm.js +1 -1
- package/dist/dropdown.esm.js.LICENSE.txt +1 -1
- package/dist/elementMapper.cjs.js +1 -1
- package/dist/elementMapper.cjs.js.LICENSE.txt +1 -1
- package/dist/elementMapper.esm.js +1 -1
- package/dist/elementMapper.esm.js.LICENSE.txt +1 -1
- package/dist/finalresult.esm.js +1 -1
- package/dist/finalresult.esm.js.LICENSE.txt +1 -1
- package/dist/flexCard.cjs.js +1 -1
- package/dist/flexCard.cjs.js.LICENSE.txt +1 -1
- package/dist/flexCard.esm.js +1 -1
- package/dist/flexCard.esm.js.LICENSE.txt +1 -1
- package/dist/flexGrid.cjs.js +1 -1
- package/dist/flexGrid.cjs.js.LICENSE.txt +1 -1
- package/dist/flexGrid.esm.js +1 -1
- package/dist/flexGrid.esm.js.LICENSE.txt +1 -1
- package/dist/flexRow.cjs.js +1 -1
- package/dist/flexRow.cjs.js.LICENSE.txt +1 -1
- package/dist/flexRow.esm.js +1 -1
- package/dist/flexRow.esm.js.LICENSE.txt +1 -1
- package/dist/floatingInput.cjs.js +1 -1
- package/dist/floatingInput.cjs.js.LICENSE.txt +1 -1
- package/dist/floatingInput.esm.js +1 -1
- package/dist/floatingInput.esm.js.LICENSE.txt +1 -1
- package/dist/free.cjs.js +1 -1
- package/dist/free.cjs.js.LICENSE.txt +1 -1
- package/dist/free.esm.js +1 -1
- package/dist/free.esm.js.LICENSE.txt +1 -1
- package/dist/horizontalScroller.esm.js.LICENSE.txt +1 -1
- package/dist/image.cjs.js +1 -1
- package/dist/image.cjs.js.LICENSE.txt +1 -1
- package/dist/image.esm.js +1 -1
- package/dist/image.esm.js.LICENSE.txt +1 -1
- package/dist/imagePicker.cjs.js +1 -1
- package/dist/imagePicker.cjs.js.LICENSE.txt +1 -1
- package/dist/imagePicker.esm.js +1 -1
- package/dist/imagePicker.esm.js.LICENSE.txt +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.LICENSE.txt +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.LICENSE.txt +1 -1
- package/dist/link.cjs.js +1 -1
- package/dist/link.cjs.js.LICENSE.txt +1 -1
- package/dist/link.esm.js +1 -1
- package/dist/link.esm.js.LICENSE.txt +1 -1
- package/dist/linkGetter.cjs.js +1 -1
- package/dist/linkGetter.cjs.js.LICENSE.txt +1 -1
- package/dist/linkGetter.esm.js +1 -1
- package/dist/linkGetter.esm.js.LICENSE.txt +1 -1
- package/dist/metaAdder.cjs.js.LICENSE.txt +1 -1
- package/dist/metaAdder.esm.js.LICENSE.txt +1 -1
- package/dist/modal2025.cjs.js.LICENSE.txt +1 -1
- package/dist/modal2025.esm.js.LICENSE.txt +1 -1
- package/dist/multiswitchers.esm.js +1 -1
- package/dist/multiswitchers.esm.js.LICENSE.txt +1 -1
- package/dist/newNavBar.cjs.js +1 -1
- package/dist/newNavBar.cjs.js.LICENSE.txt +1 -1
- package/dist/newNavBar.esm.js +1 -1
- package/dist/newNavBar.esm.js.LICENSE.txt +1 -1
- package/dist/picker.cjs.js +1 -1
- package/dist/picker.cjs.js.LICENSE.txt +1 -1
- package/dist/picker.esm.js +1 -1
- package/dist/picker.esm.js.LICENSE.txt +1 -1
- package/dist/progress.cjs.js.LICENSE.txt +1 -1
- package/dist/progress.esm.js.LICENSE.txt +1 -1
- package/dist/radio.cjs.js.LICENSE.txt +1 -1
- package/dist/radio.esm.js.LICENSE.txt +1 -1
- package/dist/range.cjs.js.LICENSE.txt +1 -1
- package/dist/range.esm.js.LICENSE.txt +1 -1
- package/dist/scrollvideo.cjs.js +1 -1
- package/dist/scrollvideo.cjs.js.LICENSE.txt +1 -1
- package/dist/scrollvideo.esm.js.LICENSE.txt +1 -1
- package/dist/sideBar.cjs.js.LICENSE.txt +1 -1
- package/dist/sideBar.esm.js.LICENSE.txt +1 -1
- package/dist/sideNavBar.cjs.js +1 -1
- package/dist/sideNavBar.cjs.js.LICENSE.txt +1 -1
- package/dist/sideNavBar.esm.js +1 -1
- package/dist/sideNavBar.esm.js.LICENSE.txt +1 -1
- package/dist/simpleBar.cjs.js +1 -1
- package/dist/simpleBar.cjs.js.LICENSE.txt +1 -1
- package/dist/simpleBar.esm.js +1 -1
- package/dist/simpleBar.esm.js.LICENSE.txt +1 -1
- package/dist/slider2025.cjs.js +1 -1
- package/dist/slider2025.cjs.js.LICENSE.txt +1 -1
- package/dist/slider2025.esm.js +1 -1
- package/dist/slider2025.esm.js.LICENSE.txt +1 -1
- package/dist/spacer.cjs.js.LICENSE.txt +1 -1
- package/dist/stack.cjs.js.LICENSE.txt +1 -1
- package/dist/stack.esm.js.LICENSE.txt +1 -1
- package/dist/stacker.cjs.js.LICENSE.txt +1 -1
- package/dist/stacker.esm.js.LICENSE.txt +1 -1
- package/dist/table.cjs.js +1 -1
- package/dist/table.cjs.js.LICENSE.txt +1 -1
- package/dist/table.esm.js +1 -1
- package/dist/table.esm.js.LICENSE.txt +1 -1
- package/dist/text.cjs.js +1 -1
- package/dist/text.cjs.js.LICENSE.txt +1 -1
- package/dist/text.esm.js +1 -1
- package/dist/text.esm.js.LICENSE.txt +1 -1
- package/dist/textField.cjs.js +1 -1
- package/dist/textField.cjs.js.LICENSE.txt +1 -1
- package/dist/textField.esm.js +1 -1
- package/dist/textField.esm.js.LICENSE.txt +1 -1
- package/dist/transformanim.cjs.js.LICENSE.txt +1 -1
- package/dist/transformanim.esm.js.LICENSE.txt +1 -1
- package/dist/ulist.cjs.js +1 -1
- package/dist/ulist.cjs.js.LICENSE.txt +1 -1
- package/dist/ulist.esm.js +1 -1
- package/dist/ulist.esm.js.LICENSE.txt +1 -1
- package/dist/video.esm.js +1 -1
- package/dist/video.esm.js.LICENSE.txt +1 -1
- package/dist/wrap.cjs.js.LICENSE.txt +1 -1
- package/dist/wrap.esm.js.LICENSE.txt +1 -1
- package/dist/zoomCard.cjs.js +1 -1
- package/dist/zoomCard.cjs.js.LICENSE.txt +1 -1
- package/dist/zoomCard.esm.js +1 -1
- package/dist/zoomCard.esm.js.LICENSE.txt +1 -1
- package/layout/DEPRECATED-PARAGRAPH.js +1 -1
- package/layout/animator.js +41 -5
- 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/betaDesktopBar.js +1 -1
- package/layout/betaMobileBar.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/cleanRow.js +1 -1
- package/layout/code.js +1 -1
- package/layout/container.js +1 -1
- package/layout/custom.js +1 -1
- package/layout/divImage.js +1 -1
- package/layout/dropdown.js +1 -1
- package/layout/dropdown2025.js +1 -1
- package/layout/emptyElement.js +1 -1
- package/layout/externalStylesheet.js +1 -1
- package/layout/flexCard.js +1 -1
- package/layout/flexGrid.js +1 -1
- package/layout/flexrow.js +1 -1
- package/layout/footer.js +1 -1
- package/layout/formComponents/custom.js +1 -1
- package/layout/formComponents/dataList.js +1 -1
- package/layout/formComponents/floatingInput.js +1 -1
- package/layout/formComponents/form-all.js +1 -1
- package/layout/formComponents/form.js +1 -1
- package/layout/formComponents/imagePicker.js +1 -1
- package/layout/formComponents/picker.js +1 -1
- package/layout/formComponents/radio.js +1 -1
- package/layout/formComponents/radiogroup.js +1 -1
- package/layout/formComponents/range.js +1 -1
- package/layout/free.js +1 -1
- package/layout/grid-new.js +1 -1
- package/layout/grid.js +1 -1
- package/layout/gridSwitcher.js +1 -1
- package/layout/group.js +1 -1
- package/layout/header.js +1 -1
- package/layout/horizontalScroller.js +1 -1
- package/layout/image-old.js +1 -1
- package/layout/image.js +1 -1
- package/layout/index.js +1 -1
- package/layout/label.js +1 -1
- package/layout/link.js +1 -1
- package/layout/list-OLD.js +1 -1
- package/layout/list.js +1 -1
- package/layout/metaAdder.js +1 -1
- package/layout/modal2025.js +1 -1
- package/layout/modernwrap.js +1 -1
- package/layout/multiswitcher.js +1 -1
- package/layout/multiswitcherBeta.js +1 -1
- package/layout/navBar-OLD.js +1 -1
- package/layout/navBar.js +1 -1
- package/layout/navFactor/customDiv.js +1 -1
- package/layout/newFlatAdder.js +1 -1
- package/layout/newNavBar copy 2.js +1 -1
- package/layout/newNavBar copy.js +1 -1
- package/layout/newNavBar.js +1 -1
- package/layout/offsetContainer.js +1 -1
- package/layout/polygon.js +1 -1
- package/layout/progress.js +1 -1
- package/layout/row.js +1 -1
- package/layout/savedNewNavBar.js +1 -1
- package/layout/scrollvideo.js +1 -1
- package/layout/sideBar.js +1 -1
- package/layout/sideNavBar.js +1 -1
- package/layout/simpleBar.js +1 -1
- package/layout/slider2025.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.js +1 -1
- package/layout/textField.js +1 -1
- package/layout/ulist.js +1 -1
- package/layout/video.js +1 -1
- package/layout/withoutNew.js +1 -1
- package/layout/wrap.js +1 -1
- package/layout/zoomCard.js +1 -1
- package/lib/AppleAnim.js +1 -1
- package/lib/KeyframeAnimation.js +1 -1
- package/lib/Stacker.js +1 -1
- package/lib/TransformAnim.js +1 -1
- package/lib/cardGetter.js +1 -1
- package/lib/designer.js +1 -1
- package/lib/elementMapper.js +1 -1
- package/lib/linkGetter.js +1 -1
- package/lib/scrollvideo.js +1 -1
- package/package.json +1 -1
package/dist/flexCard.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see flexCard.cjs.js.LICENSE.txt */
|
|
2
|
-
(()=>{"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){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,s,i,o,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,s=e}finally{try{if(!l&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw s}}return a}}(e,t)||i(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=i(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 o,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,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw o}}}}function i(e,t){if(e){if("string"==typeof e)return o(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)?o(e,t):void 0}}function o(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){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,p(n.key),n)}}function p(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 d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(d=function(){return!!e})()}function y(){return y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=f(e)););return e}(e,t);if(n){var s=Object.getOwnPropertyDescriptor(n,t);return s.get?s.get.call(arguments.length<3?e:r):s.value}},y.apply(null,arguments)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}e.r(t),e.d(t,{Card:()=>m});var m=function(e){function t(e,r){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,r){return t=f(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,d()?Reflect.construct(t,r||[],f(e).constructor):t.apply(e,r))}(this,t)).text=e,n.url=r,n.setup(),n}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&&h(e,t)}(t,e),r=t,n=[{key:"getType",value:function(){return"LayoutWrapperElement"}},{key:"setup",value:function(){window.matchMedia("(max-device-width: 415px)");var e=document.createElement("div");return e.style.display="flex",e.style.flexDirection="column",e.style.alignItems="center",e.style.backgroundColor="#fff",e.style.fontFamily="Arial",e.style.width="100%",e.style.overflow="hidden",this.res=e,this}},{key:"set",value:function(e){if(this.obj=e,e.background&&(this.res.style.background=e.background),e.border&&(this.res.style.border=e.border),e.radius&&(this.res.style.borderRadius=e.radius),e.arrayPadding){var t=e.arrayPadding.sides.map((function(e){return'"'.concat(e,'"')})).join(", ");e.arrayPadding&&this.arrayPadding(e.arrayPadding.sides,e.arrayPadding.value),e.arrayPadding&&"\n arrayPadding: {sides: [".concat(t,'], value: "').concat(e.arrayPadding.value,'"},')}return e.arrayMargin&&this.arrayMargin(e.arrayMargin.sides,e.arrayMargin.value),e.arrayMargin&&"\n arrayMargin: {sides: [".concat(e.arrayMargin.sides.map((function(e){return'"'.concat(e,'", ')})),'], value: "').concat(e.arrayMargin.value,'"},'),e.width&&(this.res.style.width=e.width),this.options=e,this.callReact(e),this}},{key:"callReact",value:function(e){var r,n,s,i=[];if(e.stroke||e.gradient||e.span||e.backgroundOp||e.layout||e.shadow||e.animation||e.filtera||e.transform){e.gradient&&(this.globalGradient=e.gradient.op.gradient,"radial"===e.gradient.op.direction&&(this.globalGradient="radial-gradient(circle at center, orange, green)")),e.stroke&&(r=t,n=this,"function"==typeof(s=y(f(1&3?r.prototype:r),"setAny",n))?function(e){return s.apply(n,e)}:s)([{globalBlast:"".concat(e.stroke.op.width," ").concat(e.stroke.op.color)}]),e.span&&(e.span.prevText=this.text);var o=[e.stroke,e.gradient,e.animation,e.span,e.backgroundOp,e.layout,e.marginOp,e.shadow,e.animation,e.filtera,e.transform];o=o.filter((function(e){return null!=e}));for(var a=0;a<o.length;a++)i.push({range:o[a].range,log:o[a].op.name,target:o[a].target,op:o[a].op});var l=[];e.borderObj&&l.push("border"),e.backgroundOp&&l.push("background"),e.mar&&l.push("margin"),e.animation&&l.push("animation"),e.span&&l.push("span"),l.push("border"),console.log("ARA IS ",i),this.chainReact(i,this.options.id,l)}}},{key:"arrayPadding",value:function(e,t){return t||(this.res.style.marginLeft="".concat(e[0],"px"),this.res.style.marginTop="".concat(e[1],"px"),this.res.style.marginRight="".concat(e[2],"px"),this.res.style.marginBottom="".concat(e[3],"px")),"all"===e[0]&&(this.res.style.paddingLeft=t,this.res.style.paddingTop=t,this.res.style.paddingRight=t,this.res.style.paddingBottom=t),e.includes("left")&&(this.res.style.paddingLeft=t),e.includes("right")&&(this.res.style.paddingRight=t),e.includes("top")&&(this.res.style.paddingTop=t),e.includes("bottom")&&(this.res.style.paddingBottom=t),t||(this.res.style.paddingBottom=e),this}},{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}},{key:"frame",value:function(e){return e.height&&(this.res.style.height=e.height),e.width&&(this.res.style.width=e.width),this}},{key:"scale",value:function(e){var t=this;return this.res.style.width,this.res.style.transition="0.5s all",this.res.addEventListener("mouseover",(function(){t.res.style.width,t.res.style.transform="scale(1.04)"})),this.res.addEventListener("mouseout",(function(){t.res.style.width,t.res.style.transform="scale(1.0)"})),this}},{key:"background",value:function(e){return this.res.style.backgroundColor=e,this}},{key:"color",value:function(e){return this.res.style.color=e,this}},{key:"padding",value:function(e){return this.res.style.padding="".concat(e,"px"),this}},{key:"items",value:function(e){for(var t=0;t<e.length;t++)this.res.appendChild(e[t].render());return this}},{key:"shadow",value:function(){return this.res.style.boxShadow="1px 1px 20px rgba(0, 0, 0, 0.60)",this}},{key:"round",value:function(e){return this.res.style.borderRadius="".concat(e,"px"),this}},{key:"render",value:function(e){if(!e)return this.res;document.querySelector(e).appendChild(this.res)}}],n&&u(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(function(){return e=function e(){var t,r,n,s=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(e),e.transform||e.op&&e.op.transform){var t=e.transform;e.transform||(t=e.op.transform),t.duration||(t.duration="3s-ease-in-out"),s.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="",o="",a="",l="",c="",u="",p="";if(0!==t.values.length){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(")?o=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=s.setDefault(r),n=s.setDefault(n),i=s.setDefault(i);var d="";if("0px"!=n&&"0px"!=r&&"0px"!=i?d+="translate3d(".concat(r,", ").concat(n,", ").concat(i,")"):"0px"==n&&"0px"==r||(d+="translate(".concat(r,", ").concat(n,")")),o&&(d+=" ".concat(o)),l&&(d+=" ".concat(l)),a&&(d+=" ".concat(a)),c&&(d+=" ".concat(c)),u&&(d+=" ".concat(u)),d){if(e.op.transform.duration){var y=e.op.transform.duration.replace(/^(\d+)(s)-/,(function(e,t,r){return t/2+r+" "})),f="transform ".concat(y,", opacity ").concat(y);s.res.style.transition=f}else s.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";e.op.transform.static&&(s.res.style.transition=""),(s.blastTarget||s.res).style.transform=d,s.res.style.opacity=p}else alert("OPE")}};t.on?s.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="";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) "),s.res.style.opacity="1"})),e&&(s.res.style.transform=e.trim())};if(t.on)s.res.addEventListener("mouseout",(function(){t.keep||n()}));else{var i=1e3*parseFloat(t.duration),o=t.closeAfter?t.closeAfter:0;setTimeout((function(){t.keep||n()}),i/2+o)}t.hardCSS&&(s.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}},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:"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:"respad",value:function(e){var t=this,r=function(){t.pad(e[0].values);for(var r=0;r<e.length;r++){var n=e[r].breakpoint;window.matchMedia("(min-width: ".concat(t.getPX(n))).matches&&t.pad(e[r].values)}};window.addEventListener("resize",r),r()}},{key:"resmar",value:function(e){var t=this,r=function(){t.mar(e[0].values);for(var r=0;r<e.length;r++){var n=e[r].breakpoint;window.matchMedia("(max-width: ".concat(t.getPX(n))).matches&&t.mar(e[r].values)}};window.addEventListener("resize",r),r()}},{key:"resprop",value:function(e){var t=this,r={default:0,xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400};console.log("RES STYLE"),console.log(e),this.prevStyles={};for(var n=0;n<this.res.style.length;n++){var s=this.res.style[n];this.prevStyles[s]=this.res.style[s],console.log("kio")}e.forEach((function(e){void 0!==r[e.breakpoint]?e._value=r[e.breakpoint]:e._value=parseInt(e.breakpoint,10)})),e.sort((function(e,t){return e._value-t._value})),console.log("Sorted breakpoints:",e);var i=function(){for(var r in t.prevStyles)t.res.style[r]=t.prevStyles[r];for(var n=window.innerWidth,s=null,i=0;i<e.length;i++)if(n<=e[i]._value){s=e[i];break}if(s)for(var o in console.log("Applying styles for",s.breakpoint),s)"breakpoint"!==o&&"_value"!==o&&(t.res.style[o]=s[o])};window.addEventListener("resize",i),i()}},{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 s=r[n],i=e[t][s],o=0;o<s.length;o++)switch(s[o]){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 s=r[n],i=e[t][s],o=0;o<s.length;o++){switch(s[o]){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"===s[o]&&(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 s=(r.min-r.max)*n-r.min;if(s=Math.abs(s),r.min<r.max){var i=(r.max+Math.abs(r.min))*n;s=r.min+i}return s}},{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 s=document.createTextNode(this.text);this.res.appendChild(s),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 o=document.createTextNode(this.text);this.res.appendChild(o),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 i=this;console.log("0P"),this.ap=!1,this.cta=0,this.once=!1;var o,a=s(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=[];i.resCopy=i.res,i.storedQueries=e.map((function(e){return e.target})).filter((function(e){return null!=e}));var u,p=s(e);try{for(p.s();!(u=p.n()).done;){var d=u.value;i.counterIndex++;var y=n(d.range,2),f=y[0],h=y[1],m=parseInt(f),v=parseInt(h),g=!0;if(d.target){g=!1;for(var b=0;b<d.target.length;b++)d.target[b]===t&&(g=!0)}a>=m&&a<=v&&g&&(l.push(d.log),c.push(d),d.op&&d.op.margin&&(i.useMargin=d.op.margin))}}catch(e){p.e(e)}finally{p.f()}if(r&&!r.includes("background")&&(i.res.style.background="",i.res.style.backgroundColor=""),i.res.style.textShadow="",r&&!r.includes("border")&&(i.res.style.border=""),r&&!r.includes("margin")&&(i.res.style.margin=""),i.res.style["-webkit-text-fill-color"]="",i.res.style["-webkit-text-stroke-color"]="",i.res.style["-webkit-text-stroke-width"]="",i.res.style.filter="",i.options.background&&(console.log(i.options.background),i.res.style.background=i.options.background),l.includes("gradient"),(l.includes("gradient")||l.includes("shadow"))&&(i.res.style.position="relative"),l.includes("blast")){var x,w=c.filter((function(e){return"blast"===e.log}))[0].op.color,k=null!==(x=c.filter((function(e){return"blast"===e.log}))[0].op.width)&&void 0!==x?x:"1px";"FlexRowLayoutElement"===i.getType()||"LayoutWrapperElement"===i.getType()?(i.res.style.border="".concat("number"==typeof k?k+"px":k," solid orange"),i.res.style.display="inline-block","FlexRowLayoutElement"===i.getType()&&(i.res.style.display="flex"),i.res.style.boxSizing="border-box",i.res.style.transformOrigin="center",i.blastTarget=i.res):(i.text&&(i.res.textContent=i.text),i.res.style["-webkit-text-fill-color"]="transparent",i.res.style["-webkit-text-stroke-color"]=w,i.res.style["-webkit-text-stroke-width"]="".concat(k))}if(l.includes("filter")){var S=c.filter((function(e){return"filter"===e.log}))[0].op.filter;i.res.style.filter=S}if(l.includes("background")&&(i.res.style.backgroundColor="green"),l.includes("gradient")&&("LayoutWrapperElement"!==i.getType()&&"FlexRowLayoutElement"!==i.getType()&&(i.res.style["-webkit-text-fill-color"]="transparent"),i.res.style.background=i.globalGradient,"LayoutWrapperElement"!==i.getType()&&"FlexRowLayoutElement"!==i.getType()&&(i.res.style["background-clip"]="text")),l.includes("shadow")){var T,O="",E=0;for(b=0;b<i.options.shadow.op.steps;b++){var L;O+="drop-shadow(".concat(E+=3,"px ").concat(E,"px ").concat(E,"px ").concat(null!==(L=i.options.shadow.color)&&void 0!==L?L:"gray",") ")}"FlexRowLayoutElement"===i.getType()||"LayoutWrapperElement"===i.getType()?i.res.style.boxShadow="".concat(E,"px ").concat(E,"px ").concat(E,"px ").concat(null!==(T=i.options.shadow.color)&&void 0!==T?T:"gray"):i.res.style.filter=O}if(l.includes("margin"))for(b=0;b<e.length;b++)if(e[b].op){var P=e[b].op.offsets;P&&void 0!==i.index&&(i.res.style.margin=P[Number(i.index)]+"px")}if(l.includes("spana")||l.includes("span")){if(i.res=i.resCopy,i.options.span){var j;for(j=Array.isArray(i.options.span)?i.options.span.filter((function(e){return"span"===e.op.name}))[0]:i.options.span,i.res.textContent="",b=0;b<j.op.parts.length;b++){var C=j.op.parts[b].style,R=new i.constructor(j.op.parts[b].text).setup({type:"span"}).set(C).render();i.res.appendChild(R)}}}else{var A=new i.constructor(i.prevText).set({}).render();i.prevText&&i.prevText.length>0&&o&&i.res.appendChild(A)}if(l.includes("animation")){if(i.options.animation&&!i.hasAnimated&&!i.options.animation.op.fireAt){console.warn(i.openTag),i.hasAnimated=!0;var W=i.options.animation.op;window.addEventListener("sidebar:open",(function(){i.res.animate(W.keyframesOpen,W.openOptions)})),window.addEventListener("sidebar:closed",(function(){i.res.animate(W.keyframesClose,W.closeOptions)})),i.res.animate(W.keyframesClose,{duration:0,fill:"forwards"}),i.openTag&&i.closeTag&&(window.addEventListener(i.openTag,(function(){i.res.animate(W.keyframesOpen,W.openOptions)})),window.addEventListener(i.closeTag,(function(){i.res.animate(W.keyframesClose,W.closeOptions)})))}if(i.options.animation&&i.options.animation.op.fireAt&&i.options.animation.op.fireAt.endsWith("px")){var I=i.options.animation.op;i.res.animate(I.keyframesClose,{duration:0,fill:"forwards"});var M=function(){window.scrollY>parseFloat(I.fireAt)&&(i.res.animate(I.keyframesOpen,I.openOptions),window.removeEventListener("scroll",M))};window.addEventListener("scroll",M)}if(i.options.animation&&i.options.animation.op.fireAt&&"inview"===i.options.animation.op.fireAt){var N=i.options.animation.op;i.res.animate(N.keyframesClose,{duration:0,fill:"forwards"}),new IntersectionObserver((function(e,t){e.forEach((function(e){e.isIntersecting&&(i.res.animate(N.keyframesOpen,N.openOptions),t.disconnect())}))})).observe(i.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})();
|
|
2
|
+
(()=>{"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){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,s,i,o,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,s=e}finally{try{if(!l&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw s}}return a}}(e,t)||i(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function s(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=i(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 o,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,o=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw o}}}}function i(e,t){if(e){if("string"==typeof e)return o(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)?o(e,t):void 0}}function o(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){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,p(n.key),n)}}function p(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 d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(d=function(){return!!e})()}function y(){return y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=f(e)););return e}(e,t);if(n){var s=Object.getOwnPropertyDescriptor(n,t);return s.get?s.get.call(arguments.length<3?e:r):s.value}},y.apply(null,arguments)}function f(e){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},f(e)}function h(e,t){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},h(e,t)}e.r(t),e.d(t,{Card:()=>m});var m=function(e){function t(e,r){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(e,t,r){return t=f(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,d()?Reflect.construct(t,r||[],f(e).constructor):t.apply(e,r))}(this,t)).text=e,n.url=r,n.setup(),n}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&&h(e,t)}(t,e),r=t,n=[{key:"getType",value:function(){return"LayoutWrapperElement"}},{key:"setup",value:function(){window.matchMedia("(max-device-width: 415px)");var e=document.createElement("div");return e.style.display="flex",e.style.flexDirection="column",e.style.alignItems="center",e.style.backgroundColor="#fff",e.style.fontFamily="Arial",e.style.width="100%",e.style.overflow="hidden",this.res=e,this}},{key:"set",value:function(e){if(this.obj=e,e.background&&(this.res.style.background=e.background),e.border&&(this.res.style.border=e.border),e.radius&&(this.res.style.borderRadius=e.radius),e.arrayPadding){var t=e.arrayPadding.sides.map((function(e){return'"'.concat(e,'"')})).join(", ");e.arrayPadding&&this.arrayPadding(e.arrayPadding.sides,e.arrayPadding.value),e.arrayPadding&&"\n arrayPadding: {sides: [".concat(t,'], value: "').concat(e.arrayPadding.value,'"},')}return e.arrayMargin&&this.arrayMargin(e.arrayMargin.sides,e.arrayMargin.value),e.arrayMargin&&"\n arrayMargin: {sides: [".concat(e.arrayMargin.sides.map((function(e){return'"'.concat(e,'", ')})),'], value: "').concat(e.arrayMargin.value,'"},'),e.width&&(this.res.style.width=e.width),this.options=e,this.callReact(e),this}},{key:"callReact",value:function(e){var r,n,s,i=[];if(e.stroke||e.gradient||e.span||e.backgroundOp||e.layout||e.shadow||e.animation||e.filtera||e.transform){e.gradient&&(this.globalGradient=e.gradient.op.gradient,"radial"===e.gradient.op.direction&&(this.globalGradient="radial-gradient(circle at center, orange, green)")),e.stroke&&(r=t,n=this,"function"==typeof(s=y(f(1&3?r.prototype:r),"setAny",n))?function(e){return s.apply(n,e)}:s)([{globalBlast:"".concat(e.stroke.op.width," ").concat(e.stroke.op.color)}]),e.span&&(e.span.prevText=this.text);var o=[e.stroke,e.gradient,e.animation,e.span,e.backgroundOp,e.layout,e.marginOp,e.shadow,e.animation,e.filtera,e.transform];o=o.filter((function(e){return null!=e}));for(var a=0;a<o.length;a++)i.push({range:o[a].range,log:o[a].op.name,target:o[a].target,op:o[a].op});var l=[];e.borderObj&&l.push("border"),e.backgroundOp&&l.push("background"),e.mar&&l.push("margin"),e.animation&&l.push("animation"),e.span&&l.push("span"),l.push("border"),console.log("ARA IS ",i),this.chainReact(i,this.options.id,l)}}},{key:"arrayPadding",value:function(e,t){return t||(this.res.style.marginLeft="".concat(e[0],"px"),this.res.style.marginTop="".concat(e[1],"px"),this.res.style.marginRight="".concat(e[2],"px"),this.res.style.marginBottom="".concat(e[3],"px")),"all"===e[0]&&(this.res.style.paddingLeft=t,this.res.style.paddingTop=t,this.res.style.paddingRight=t,this.res.style.paddingBottom=t),e.includes("left")&&(this.res.style.paddingLeft=t),e.includes("right")&&(this.res.style.paddingRight=t),e.includes("top")&&(this.res.style.paddingTop=t),e.includes("bottom")&&(this.res.style.paddingBottom=t),t||(this.res.style.paddingBottom=e),this}},{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}},{key:"frame",value:function(e){return e.height&&(this.res.style.height=e.height),e.width&&(this.res.style.width=e.width),this}},{key:"scale",value:function(e){var t=this;return this.res.style.width,this.res.style.transition="0.5s all",this.res.addEventListener("mouseover",(function(){t.res.style.width,t.res.style.transform="scale(1.04)"})),this.res.addEventListener("mouseout",(function(){t.res.style.width,t.res.style.transform="scale(1.0)"})),this}},{key:"background",value:function(e){return this.res.style.backgroundColor=e,this}},{key:"color",value:function(e){return this.res.style.color=e,this}},{key:"padding",value:function(e){return this.res.style.padding="".concat(e,"px"),this}},{key:"items",value:function(e){for(var t=0;t<e.length;t++)this.res.appendChild(e[t].render());return this}},{key:"shadow",value:function(){return this.res.style.boxShadow="1px 1px 20px rgba(0, 0, 0, 0.60)",this}},{key:"round",value:function(e){return this.res.style.borderRadius="".concat(e,"px"),this}},{key:"render",value:function(e){if(!e)return this.res;document.querySelector(e).appendChild(this.res)}}],n&&u(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(function(){return e=function e(){var t,r,n,s=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(e),e.transform||e.op&&e.op.transform){var t=e.transform;e.transform||(t=e.op.transform),t.duration||(t.duration="3s-ease-in-out"),s.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="",o="",a="",l="",c="",u="",p="";if(0!==t.values.length){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(")?o=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=s.setDefault(r),n=s.setDefault(n),i=s.setDefault(i);var d="";if("0px"!=n&&"0px"!=r&&"0px"!=i?d+="translate3d(".concat(r,", ").concat(n,", ").concat(i,")"):"0px"==n&&"0px"==r||(d+="translate(".concat(r,", ").concat(n,")")),o&&(d+=" ".concat(o)),l&&(d+=" ".concat(l)),a&&(d+=" ".concat(a)),c&&(d+=" ".concat(c)),u&&(d+=" ".concat(u)),d){if(e.op.transform.duration){var y=e.op.transform.duration.replace(/^(\d+)(s)-/,(function(e,t,r){return t/2+r+" "})),f="transform ".concat(y,", opacity ").concat(y);s.res.style.transition=f}else s.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";e.op.transform.static&&(s.res.style.transition=""),(s.blastTarget||s.res).style.transform=d,s.res.style.opacity=p}else alert("OPE")}};t.on?s.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="";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) "),s.res.style.opacity="1"})),e&&(s.res.style.transform=e.trim())};if(t.on)s.res.addEventListener("mouseout",(function(){t.keep||n()}));else{var i=1e3*parseFloat(t.duration),o=t.closeAfter?t.closeAfter:0;setTimeout((function(){t.keep||n()}),i/2+o)}t.hardCSS&&(s.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}},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:"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:"respad",value:function(e){var t=this,r=function(){t.pad(e[0].values);for(var r=0;r<e.length;r++){var n=e[r].breakpoint;window.matchMedia("(min-width: ".concat(t.getPX(n))).matches&&t.pad(e[r].values)}};window.addEventListener("resize",r),r()}},{key:"resmar",value:function(e){var t=this,r=function(){t.mar(e[0].values);for(var r=0;r<e.length;r++){var n=e[r].breakpoint;window.matchMedia("(max-width: ".concat(t.getPX(n))).matches&&t.mar(e[r].values)}};window.addEventListener("resize",r),r()}},{key:"resprop",value:function(e){var t=this,r={default:0,xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400};console.log("RES STYLE"),console.log(e),this.prevStyles={};for(var n=0;n<this.res.style.length;n++){var s=this.res.style[n];this.prevStyles[s]=this.res.style[s],console.log("kio")}e.forEach((function(e){void 0!==r[e.breakpoint]?e._value=r[e.breakpoint]:e._value=parseInt(e.breakpoint,10)})),e.sort((function(e,t){return e._value-t._value})),console.log("Sorted breakpoints:",e);var i=function(){for(var r in t.prevStyles)t.res.style[r]=t.prevStyles[r];for(var n=window.innerWidth,s=null,i=0;i<e.length;i++)if(n<=e[i]._value){s=e[i];break}if(s)for(var o in console.log("Applying styles for",s.breakpoint),s)"breakpoint"!==o&&"_value"!==o&&(t.res.style[o]=s[o])};window.addEventListener("resize",i),i()}},{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 s=r[n],i=e[t][s],o=0;o<s.length;o++)switch(s[o]){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 s=r[n],i=e[t][s],o=0;o<s.length;o++){switch(s[o]){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"===s[o]&&(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 s=(r.min-r.max)*n-r.min;if(s=Math.abs(s),r.min<r.max){var i=(r.max+Math.abs(r.min))*n;s=r.min+i}return s}},{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 s=document.createTextNode(this.text);this.res.appendChild(s),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 o=document.createTextNode(this.text);this.res.appendChild(o),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 i=this;console.log("0P"),this.ap=!1,this.cta=0,this.once=!1;var o,a=s(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=[];i.resCopy=i.res,i.storedQueries=e.map((function(e){return e.target})).filter((function(e){return null!=e}));var u,p=s(e);try{for(p.s();!(u=p.n()).done;){var d=u.value;i.counterIndex++;var y=n(d.range,2),f=y[0],h=y[1],m=parseInt(f),v=parseInt(h),g=!0;if(d.target){g=!1;for(var b=0;b<d.target.length;b++)d.target[b]===t&&(g=!0)}a>=m&&a<=v&&g&&(l.push(d.log),c.push(d),d.op&&d.op.margin&&(i.useMargin=d.op.margin))}}catch(e){p.e(e)}finally{p.f()}if(r&&!r.includes("background")&&(i.res.style.background="",i.res.style.backgroundColor=""),i.res.style.textShadow="",r&&!r.includes("border")&&(i.res.style.border=""),r&&!r.includes("margin")&&(i.res.style.margin=""),i.res.style["-webkit-text-fill-color"]="",i.res.style["-webkit-text-stroke-color"]="",i.res.style["-webkit-text-stroke-width"]="",i.res.style.filter="",i.options.background&&(console.log(i.options.background),i.res.style.background=i.options.background),l.includes("gradient"),(l.includes("gradient")||l.includes("shadow"))&&(i.res.style.position="relative"),l.includes("blast")){var x,w=c.filter((function(e){return"blast"===e.log}))[0].op.color,k=null!==(x=c.filter((function(e){return"blast"===e.log}))[0].op.width)&&void 0!==x?x:"1px";"FlexRowLayoutElement"===i.getType()||"LayoutWrapperElement"===i.getType()?(i.res.style.border="".concat("number"==typeof k?k+"px":k," solid orange"),i.res.style.display="inline-block","FlexRowLayoutElement"===i.getType()&&(i.res.style.display="flex"),i.res.style.boxSizing="border-box",i.res.style.transformOrigin="center",i.blastTarget=i.res):(i.text&&(i.res.textContent=i.text),i.res.style["-webkit-text-fill-color"]="transparent",i.res.style["-webkit-text-stroke-color"]=w,i.res.style["-webkit-text-stroke-width"]="".concat(k))}if(l.includes("filter")){var S=c.filter((function(e){return"filter"===e.log}))[0].op.filter;i.res.style.filter=S}if(l.includes("background")&&(i.res.style.backgroundColor="green"),l.includes("gradient")&&("LayoutWrapperElement"!==i.getType()&&"FlexRowLayoutElement"!==i.getType()&&(i.res.style["-webkit-text-fill-color"]="transparent"),i.res.style.background=i.globalGradient,"LayoutWrapperElement"!==i.getType()&&"FlexRowLayoutElement"!==i.getType()&&(i.res.style["background-clip"]="text")),l.includes("shadow"))if("FlexRowLayoutElement"===i.getType()||"LayoutWrapperElement"===i.getType()){for(var T=[],O=0,E=0;E<i.options.shadow.op.steps;E++){var j;O+=3,T.push("".concat(O,"px ").concat(O,"px ").concat(O,"px ").concat(null!==(j=i.options.shadow.op.colors[E])&&void 0!==j?j:"gray"))}i.res.style.boxShadow=T.join(", ")}else{for(var L=[],P=0,C=0;C<i.options.shadow.op.steps;C++){var R;P+=3,L.push("drop-shadow(".concat(P,"px ").concat(P,"px ").concat(P,"px ").concat(null!==(R=i.options.shadow.op.colors[C])&&void 0!==R?R:"gray",")"))}i.res.style.filter=L.join(" ")}if(l.includes("margin"))for(b=0;b<e.length;b++)if(e[b].op){var A=e[b].op.offsets;A&&void 0!==i.index&&(i.res.style.margin=A[Number(i.index)]+"px")}if(l.includes("spana")||l.includes("span")){if(i.res=i.resCopy,i.options.span){var W;for(W=Array.isArray(i.options.span)?i.options.span.filter((function(e){return"span"===e.op.name}))[0]:i.options.span,i.res.textContent="",b=0;b<W.op.parts.length;b++){var I=W.op.parts[b].style,M=new i.constructor(W.op.parts[b].text).setup({type:"span"}).set(I).render();i.res.appendChild(M)}}}else{var N=new i.constructor(i.prevText).set({}).render();i.prevText&&i.prevText.length>0&&o&&i.res.appendChild(N)}if(l.includes("animation")){if(i.options.animation&&!i.hasAnimated&&!i.options.animation.op.fireAt){console.warn(i.openTag),i.hasAnimated=!0;var _=i.options.animation.op;window.addEventListener("sidebar:open",(function(){i.res.animate(_.keyframesOpen,_.openOptions)})),window.addEventListener("sidebar:closed",(function(){i.res.animate(_.keyframesClose,_.closeOptions)})),i.res.animate(_.keyframesClose,{duration:0,fill:"forwards"}),i.openTag&&i.closeTag&&(window.addEventListener(i.openTag,(function(){i.res.animate(_.keyframesOpen,_.openOptions)})),window.addEventListener(i.closeTag,(function(){i.res.animate(_.keyframesClose,_.closeOptions)})))}if(i.options.animation&&i.options.animation.op.fireAt&&i.options.animation.op.fireAt.endsWith("px")){var z=i.options.animation.op;i.res.animate(z.keyframesClose,{duration:0,fill:"forwards"});var B=function(){window.scrollY>parseFloat(z.fireAt)&&(i.res.animate(z.keyframesOpen,z.openOptions),window.removeEventListener("scroll",B))};window.addEventListener("scroll",B)}if(i.options.animation&&i.options.animation.op.fireAt&&"inview"===i.options.animation.op.fireAt){var D=i.options.animation.op;i.res.animate(D.keyframesClose,{duration:0,fill:"forwards"}),new IntersectionObserver((function(e,t){e.forEach((function(e){e.isIntersecting&&(i.res.animate(D.keyframesOpen,D.openOptions),t.disconnect())}))})).observe(i.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})();
|
package/dist/flexCard.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see flexCard.esm.js.LICENSE.txt */
|
|
2
|
-
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){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,s,i,a,o=[],l=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(o.push(n.value),o.length!==e);l=!0);}catch(t){c=!0,s=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw s}}return o}}(t,e)||n(t,e)||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 r(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=n(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var s=0,i=function(){};return{s:i,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){l=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function n(t,e){if(t){if("string"==typeof t)return s(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,e):void 0}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,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+""}var o=function(){return t=function t(){var e,r,n,s=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=function(t){if(console.log("LOBJO IS"),console.log(t),t.transform||t.op&&t.op.transform){var e=t.transform;t.transform||(e=t.op.transform),e.duration||(e.duration="3s-ease-in-out"),s.setDefault=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0px";return 0===t.length?e+" ":t};var r=function(){var r="",n="",i="",a="",o="",l="",c="",u="",p="";if(0!==e.values.length){e.values.forEach((function(t){t.startsWith("tx:")&&(r=t.replace("tx:","")),t.startsWith("ty:")&&(n=t.replace("ty:","")),t.startsWith("tz:")?i=t.replace("tz:",""):t.startsWith("scale(")?a=t:t.startsWith("skew(")?o=t:t.startsWith("rotate(")?l=function(t){var e=t.match(/rotate\(([^)]+)\)/);if(!e)return t;var r=e[1].split(",").map((function(t){return t.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],")"):t}(t):t.startsWith("perspective(")?c=t:t.startsWith("matrix(")?u=t:t.startsWith("opacity:")&&(p=t.replace("opacity:",""))})),r=s.setDefault(r),n=s.setDefault(n),i=s.setDefault(i);var d="";if("0px"!=n&&"0px"!=r&&"0px"!=i?d+="translate3d(".concat(r,", ").concat(n,", ").concat(i,")"):"0px"==n&&"0px"==r||(d+="translate(".concat(r,", ").concat(n,")")),a&&(d+=" ".concat(a)),l&&(d+=" ".concat(l)),o&&(d+=" ".concat(o)),c&&(d+=" ".concat(c)),u&&(d+=" ".concat(u)),d){if(t.op.transform.duration){var y=t.op.transform.duration.replace(/^(\d+)(s)-/,(function(t,e,r){return e/2+r+" "})),f="transform ".concat(y,", opacity ").concat(y);s.res.style.transition=f}else s.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";t.op.transform.static&&(s.res.style.transition=""),(s.blastTarget||s.res).style.transform=d,s.res.style.opacity=p}else alert("OPE")}};e.on?s.res.addEventListener(e.on,(function(){e.delay?setTimeout((function(){r()}),e.delay):r()})):window.addEventListener("load",(function(){e.delay?setTimeout((function(){r()}),e.delay):r()}));var n=function(){var t="";e.values.forEach((function(e){e.startsWith("tx:")?t+="translateX(0) ":e.startsWith("ty:")?t+="translateY(0) ":e.startsWith("tz:")?t+="translateZ(0) ":e.startsWith("scale(")?t+="scale(1) ":e.startsWith("skew(")?t+="skew(0, 0) ":e.startsWith("rotate(")?t+="rotate(0) ":e.startsWith("perspective(")?t+="perspective(0) ":e.startsWith("matrix(")&&(t+="matrix(1, 0, 0, 1, 0, 0) "),s.res.style.opacity="1"})),t&&(s.res.style.transform=t.trim())};if(e.on)s.res.addEventListener("mouseout",(function(){e.keep||n()}));else{var i=1e3*parseFloat(e.duration),a=e.closeAfter?e.closeAfter:0;setTimeout((function(){e.keep||n()}),i/2+a)}e.hardCSS&&(s.res.style.transform=e.hardCSS)}else alert("THIS FIRE WITH GRADIENT (invalid block"),console.log("INVALID BLOCKA"),console.log(t)},(r=a(r="reactOnTransform"))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,this.state={isExpanded:!1,isMovedUp:!1,isMovedDown:!1}},n=[{key:"isHidden",value:function(t){t&&(this.res.style.display="none")}},{key:"keySet",value:function(t){return this.temporaryVal=1,this.res.style[t.key]=t.value,this}},{key:"onScroll",value:function(t){var e=this;"opacity"===t.value?this.res.style.opacity=t.valMin:"scale"===t.value&&(this.res.style.transform="scale(".concat(t.valMax,")")),window.addEventListener("scroll",(function(){var r=e.smartRange(window.scrollY,{min:t.from,max:t.to},{min:t.valMin,max:t.valMax});"opacity"===t.value?e.res.style.opacity=r:"scale"===t.value&&(e.res.style.transform="scale(".concat(r,")"))}))}},{key:"setAny",value:function(t){this[Object.keys(t)[0]]=[Object.values(t)[0]]}},{key:"setID",value:function(t){this.id=t}},{key:"setPrevText",value:function(t){this.prevText=t}},{key:"getCSS",value:function(){return this.css}},{key:"getPX",value:function(t){return{xs:"0px",sm:"576px",md:"768px",lg:"992px",xl:"1200px",xxl:"1400px",mxxl:"1800px"}[t]||"Invalid breakpoint"}},{key:"respad",value:function(t){var e=this,r=function(){e.pad(t[0].values);for(var r=0;r<t.length;r++){var n=t[r].breakpoint;window.matchMedia("(min-width: ".concat(e.getPX(n))).matches&&e.pad(t[r].values)}};window.addEventListener("resize",r),r()}},{key:"resmar",value:function(t){var e=this,r=function(){e.mar(t[0].values);for(var r=0;r<t.length;r++){var n=t[r].breakpoint;window.matchMedia("(max-width: ".concat(e.getPX(n))).matches&&e.mar(t[r].values)}};window.addEventListener("resize",r),r()}},{key:"resprop",value:function(t){var e=this,r={default:0,xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400};console.log("RES STYLE"),console.log(t),this.prevStyles={};for(var n=0;n<this.res.style.length;n++){var s=this.res.style[n];this.prevStyles[s]=this.res.style[s],console.log("kio")}t.forEach((function(t){void 0!==r[t.breakpoint]?t._value=r[t.breakpoint]:t._value=parseInt(t.breakpoint,10)})),t.sort((function(t,e){return t._value-e._value})),console.log("Sorted breakpoints:",t);var i=function(){for(var r in e.prevStyles)e.res.style[r]=e.prevStyles[r];for(var n=window.innerWidth,s=null,i=0;i<t.length;i++)if(n<=t[i]._value){s=t[i];break}if(s)for(var a in console.log("Applying styles for",s.breakpoint),s)"breakpoint"!==a&&"_value"!==a&&(e.res.style[a]=s[a])};window.addEventListener("resize",i),i()}},{key:"isNumber",value:function(t){return"number"==typeof t&&!isNaN(t)}},{key:"pad",value:function(t){for(var e=0;e<t.length;e++)for(var r=Object.keys(t[e]),n=0;n<r.length;n++)for(var s=r[n],i=t[e][s],a=0;a<s.length;a++)switch(s[a]){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(t){return this.res.style.alignSelf=t,this}},{key:"mar",value:function(t){for(var e=0;e<t.length;e++)for(var r=Object.keys(t[e]),n=0;n<r.length;n++)for(var s=r[n],i=t[e][s],a=0;a<s.length;a++){switch(s[a]){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"===s[a]&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto")}return this}},{key:"smartRange",value:function(t,e,r){t<e.min&&(t=e.min),t>e.max&&(t=e.max);var n=(t-e.min)/(e.max-e.min);e.min>e.max&&(n=(t-e.max)/(e.min-e.max));var s=(r.min-r.max)*n-r.min;if(s=Math.abs(s),r.min<r.max){var i=(r.max+Math.abs(r.min))*n;s=r.min+i}return s}},{key:"gpos",value:function(t){return this.res.style.gridColumn=t.col,this.res.style.gridRow=t.row,this}},{key:"fluidCopy",value:function(t){if(t instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var e=document.createTextNode(this.text);return this.res.appendChild(e),this.res.style.fontSize=t.exact,this}if("S1"===t){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"===t){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"===t){this.prevStylex=this.res.style,this.res=document.createElement("h3"),this.res.style.cssText=this.prevStylex.cssText;var s=document.createTextNode(this.text);this.res.appendChild(s),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===t){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"===t){this.prevStylex=this.res.style,this.res=document.createElement("h5"),this.res.style.cssText=this.prevStylex.cssText;var a=document.createTextNode(this.text);this.res.appendChild(a),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===t&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}},{key:"setIndex",value:function(t){this.index=t}},{key:"borderObj",value:function(t){var e,r=null!==(e=t.type)&&void 0!==e?e:"solid";return this.res.style.border="".concat(t.width," ").concat(r," ").concat(t.color),this.res.style.borderRadius=t.radius,this}},{key:"setPref",value:function(t){this.preffersId=t}},{key:"setClass",value:function(t){this.class=t}},{key:"setTags",value:function(t){this.openTag=t.open,this.closeTag=t.close,console.log("TAGS SET"),console.log(t)}},{key:"chainReact",value:function(t,n,s){var i=this;console.log("0P"),this.ap=!1,this.cta=0,this.once=!1;var a,o=r(t);try{for(o.s();!(a=o.n()).done;){var l=a.value;l.range||(l.range=["0px","999999px"])}}catch(t){o.e(t)}finally{o.f()}t.sort((function(t,e){return parseInt(t.range[0])-parseInt(e.range[0])}));var c=function(a){var o=window.visualViewport.width,l=[],c=[];i.resCopy=i.res,i.storedQueries=t.map((function(t){return t.target})).filter((function(t){return null!=t}));var u,p=r(t);try{for(p.s();!(u=p.n()).done;){var d=u.value;i.counterIndex++;var y=e(d.range,2),f=y[0],h=y[1],m=parseInt(f),v=parseInt(h),g=!0;if(d.target){g=!1;for(var b=0;b<d.target.length;b++)d.target[b]===n&&(g=!0)}o>=m&&o<=v&&g&&(l.push(d.log),c.push(d),d.op&&d.op.margin&&(i.useMargin=d.op.margin))}}catch(t){p.e(t)}finally{p.f()}if(s&&!s.includes("background")&&(i.res.style.background="",i.res.style.backgroundColor=""),i.res.style.textShadow="",s&&!s.includes("border")&&(i.res.style.border=""),s&&!s.includes("margin")&&(i.res.style.margin=""),i.res.style["-webkit-text-fill-color"]="",i.res.style["-webkit-text-stroke-color"]="",i.res.style["-webkit-text-stroke-width"]="",i.res.style.filter="",i.options.background&&(console.log(i.options.background),i.res.style.background=i.options.background),l.includes("gradient"),(l.includes("gradient")||l.includes("shadow"))&&(i.res.style.position="relative"),l.includes("blast")){var x,w=c.filter((function(t){return"blast"===t.log}))[0].op.color,k=null!==(x=c.filter((function(t){return"blast"===t.log}))[0].op.width)&&void 0!==x?x:"1px";"FlexRowLayoutElement"===i.getType()||"LayoutWrapperElement"===i.getType()?(i.res.style.border="".concat("number"==typeof k?k+"px":k," solid orange"),i.res.style.display="inline-block","FlexRowLayoutElement"===i.getType()&&(i.res.style.display="flex"),i.res.style.boxSizing="border-box",i.res.style.transformOrigin="center",i.blastTarget=i.res):(i.text&&(i.res.textContent=i.text),i.res.style["-webkit-text-fill-color"]="transparent",i.res.style["-webkit-text-stroke-color"]=w,i.res.style["-webkit-text-stroke-width"]="".concat(k))}if(l.includes("filter")){var S=c.filter((function(t){return"filter"===t.log}))[0].op.filter;i.res.style.filter=S}if(l.includes("background")&&(i.res.style.backgroundColor="green"),l.includes("gradient")&&("LayoutWrapperElement"!==i.getType()&&"FlexRowLayoutElement"!==i.getType()&&(i.res.style["-webkit-text-fill-color"]="transparent"),i.res.style.background=i.globalGradient,"LayoutWrapperElement"!==i.getType()&&"FlexRowLayoutElement"!==i.getType()&&(i.res.style["background-clip"]="text")),l.includes("shadow")){var T,E="",O=0;for(b=0;b<i.options.shadow.op.steps;b++){var L;E+="drop-shadow(".concat(O+=3,"px ").concat(O,"px ").concat(O,"px ").concat(null!==(L=i.options.shadow.color)&&void 0!==L?L:"gray",") ")}"FlexRowLayoutElement"===i.getType()||"LayoutWrapperElement"===i.getType()?i.res.style.boxShadow="".concat(O,"px ").concat(O,"px ").concat(O,"px ").concat(null!==(T=i.options.shadow.color)&&void 0!==T?T:"gray"):i.res.style.filter=E}if(l.includes("margin"))for(b=0;b<t.length;b++)if(t[b].op){var P=t[b].op.offsets;P&&void 0!==i.index&&(i.res.style.margin=P[Number(i.index)]+"px")}if(l.includes("spana")||l.includes("span")){if(i.res=i.resCopy,i.options.span){var j;for(j=Array.isArray(i.options.span)?i.options.span.filter((function(t){return"span"===t.op.name}))[0]:i.options.span,i.res.textContent="",b=0;b<j.op.parts.length;b++){var C=j.op.parts[b].style,R=new i.constructor(j.op.parts[b].text).setup({type:"span"}).set(C).render();i.res.appendChild(R)}}}else{var A=new i.constructor(i.prevText).set({}).render();i.prevText&&i.prevText.length>0&&a&&i.res.appendChild(A)}if(l.includes("animation")){if(i.options.animation&&!i.hasAnimated&&!i.options.animation.op.fireAt){console.warn(i.openTag),i.hasAnimated=!0;var W=i.options.animation.op;window.addEventListener("sidebar:open",(function(){i.res.animate(W.keyframesOpen,W.openOptions)})),window.addEventListener("sidebar:closed",(function(){i.res.animate(W.keyframesClose,W.closeOptions)})),i.res.animate(W.keyframesClose,{duration:0,fill:"forwards"}),i.openTag&&i.closeTag&&(window.addEventListener(i.openTag,(function(){i.res.animate(W.keyframesOpen,W.openOptions)})),window.addEventListener(i.closeTag,(function(){i.res.animate(W.keyframesClose,W.closeOptions)})))}if(i.options.animation&&i.options.animation.op.fireAt&&i.options.animation.op.fireAt.endsWith("px")){var I=i.options.animation.op;i.res.animate(I.keyframesClose,{duration:0,fill:"forwards"});var M=function(){window.scrollY>parseFloat(I.fireAt)&&(i.res.animate(I.keyframesOpen,I.openOptions),window.removeEventListener("scroll",M))};window.addEventListener("scroll",M)}if(i.options.animation&&i.options.animation.op.fireAt&&"inview"===i.options.animation.op.fireAt){var N=i.options.animation.op;i.res.animate(N.keyframesClose,{duration:0,fill:"forwards"}),new IntersectionObserver((function(t,e){t.forEach((function(t){t.isIntersecting&&(i.res.animate(N.keyframesOpen,N.openOptions),e.disconnect())}))})).observe(i.res)}}};this.options.animation||window.addEventListener("resize",(function(){return c()})),c()}},{key:"maxWidth",value:function(t){return this.res.style.maxWidth=t,this}},{key:"removeQuotesFromFirstWord",value:function(t){return t.replace(/"([^"]+)":/g,"$1:")}},{key:"arrayMargin",value:function(t,e){return t.includes("left")&&(this.res.style.marginLeft=e),t.includes("right")&&(this.res.style.marginRight=e),t.includes("top")&&(this.res.style.marginTop=e),t.includes("bottom")&&(this.res.style.marginBottom=e),t.includes("all")&&(this.res.style.margin=e),e||(this.res.style.marginBottom=t),this}}],n&&i(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n}();function l(t){return l="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},l(t)}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function u(t){var e=function(t){if("object"!=l(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==l(e)?e:e+""}function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(p=function(){return!!t})()}function d(){return d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=y(t)););return t}(t,e);if(n){var s=Object.getOwnPropertyDescriptor(n,e);return s.get?s.get.call(arguments.length<3?t:r):s.value}},d.apply(null,arguments)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function f(t,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},f(t,e)}var h=function(){function t(e,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(t,e,r){return e=y(e),function(t,e){if(e&&("object"==l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,p()?Reflect.construct(e,r||[],y(t).constructor):e.apply(t,r))}(this,t)).text=e,n.url=r,n.setup(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}(t,o),e=t,r=[{key:"getType",value:function(){return"LayoutWrapperElement"}},{key:"setup",value:function(){window.matchMedia("(max-device-width: 415px)");var t=document.createElement("div");return t.style.display="flex",t.style.flexDirection="column",t.style.alignItems="center",t.style.backgroundColor="#fff",t.style.fontFamily="Arial",t.style.width="100%",t.style.overflow="hidden",this.res=t,this}},{key:"set",value:function(t){if(this.obj=t,t.background&&(this.res.style.background=t.background),t.border&&(this.res.style.border=t.border),t.radius&&(this.res.style.borderRadius=t.radius),t.arrayPadding){var e=t.arrayPadding.sides.map((function(t){return'"'.concat(t,'"')})).join(", ");t.arrayPadding&&this.arrayPadding(t.arrayPadding.sides,t.arrayPadding.value),t.arrayPadding&&"\n arrayPadding: {sides: [".concat(e,'], value: "').concat(t.arrayPadding.value,'"},')}return t.arrayMargin&&this.arrayMargin(t.arrayMargin.sides,t.arrayMargin.value),t.arrayMargin&&"\n arrayMargin: {sides: [".concat(t.arrayMargin.sides.map((function(t){return'"'.concat(t,'", ')})),'], value: "').concat(t.arrayMargin.value,'"},'),t.width&&(this.res.style.width=t.width),this.options=t,this.callReact(t),this}},{key:"callReact",value:function(e){var r,n,s,i=[];if(e.stroke||e.gradient||e.span||e.backgroundOp||e.layout||e.shadow||e.animation||e.filtera||e.transform){e.gradient&&(this.globalGradient=e.gradient.op.gradient,"radial"===e.gradient.op.direction&&(this.globalGradient="radial-gradient(circle at center, orange, green)")),e.stroke&&(r=t,n=this,"function"==typeof(s=d(y(1&3?r.prototype:r),"setAny",n))?function(t){return s.apply(n,t)}:s)([{globalBlast:"".concat(e.stroke.op.width," ").concat(e.stroke.op.color)}]),e.span&&(e.span.prevText=this.text);var a=[e.stroke,e.gradient,e.animation,e.span,e.backgroundOp,e.layout,e.marginOp,e.shadow,e.animation,e.filtera,e.transform];a=a.filter((function(t){return null!=t}));for(var o=0;o<a.length;o++)i.push({range:a[o].range,log:a[o].op.name,target:a[o].target,op:a[o].op});var l=[];e.borderObj&&l.push("border"),e.backgroundOp&&l.push("background"),e.mar&&l.push("margin"),e.animation&&l.push("animation"),e.span&&l.push("span"),l.push("border"),console.log("ARA IS ",i),this.chainReact(i,this.options.id,l)}}},{key:"arrayPadding",value:function(t,e){return e||(this.res.style.marginLeft="".concat(t[0],"px"),this.res.style.marginTop="".concat(t[1],"px"),this.res.style.marginRight="".concat(t[2],"px"),this.res.style.marginBottom="".concat(t[3],"px")),"all"===t[0]&&(this.res.style.paddingLeft=e,this.res.style.paddingTop=e,this.res.style.paddingRight=e,this.res.style.paddingBottom=e),t.includes("left")&&(this.res.style.paddingLeft=e),t.includes("right")&&(this.res.style.paddingRight=e),t.includes("top")&&(this.res.style.paddingTop=e),t.includes("bottom")&&(this.res.style.paddingBottom=e),e||(this.res.style.paddingBottom=t),this}},{key:"arrayMargin",value:function(t,e){return t.includes("left")&&(this.res.style.marginLeft=e),t.includes("right")&&(this.res.style.marginRight=e),t.includes("top")&&(this.res.style.marginTop=e),t.includes("bottom")&&(this.res.style.marginBottom=e),t.includes("all")&&(this.res.style.margin=e),e||(this.res.style.marginBottom=t),this}},{key:"frame",value:function(t){return t.height&&(this.res.style.height=t.height),t.width&&(this.res.style.width=t.width),this}},{key:"scale",value:function(t){var e=this;return this.res.style.width,this.res.style.transition="0.5s all",this.res.addEventListener("mouseover",(function(){e.res.style.width,e.res.style.transform="scale(1.04)"})),this.res.addEventListener("mouseout",(function(){e.res.style.width,e.res.style.transform="scale(1.0)"})),this}},{key:"background",value:function(t){return this.res.style.backgroundColor=t,this}},{key:"color",value:function(t){return this.res.style.color=t,this}},{key:"padding",value:function(t){return this.res.style.padding="".concat(t,"px"),this}},{key:"items",value:function(t){for(var e=0;e<t.length;e++)this.res.appendChild(t[e].render());return this}},{key:"shadow",value:function(){return this.res.style.boxShadow="1px 1px 20px rgba(0, 0, 0, 0.60)",this}},{key:"round",value:function(t){return this.res.style.borderRadius="".concat(t,"px"),this}},{key:"render",value:function(t){if(!t)return this.res;document.querySelector(t).appendChild(this.res)}}],r&&c(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r}();export{h as Card};
|
|
2
|
+
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){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,s,i,o,a=[],l=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=i.call(r)).done)&&(a.push(n.value),a.length!==e);l=!0);}catch(t){c=!0,s=t}finally{try{if(!l&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw s}}return a}}(t,e)||n(t,e)||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 r(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=n(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var s=0,i=function(){};return{s:i,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var o,a=!0,l=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){l=!0,o=t},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw o}}}}function n(t,e){if(t){if("string"==typeof t)return s(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(t,e):void 0}}function s(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,o(n.key),n)}}function o(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+""}var a=function(){return t=function t(){var e,r,n,s=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=function(t){if(console.log("LOBJO IS"),console.log(t),t.transform||t.op&&t.op.transform){var e=t.transform;t.transform||(e=t.op.transform),e.duration||(e.duration="3s-ease-in-out"),s.setDefault=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0px";return 0===t.length?e+" ":t};var r=function(){var r="",n="",i="",o="",a="",l="",c="",u="",p="";if(0!==e.values.length){e.values.forEach((function(t){t.startsWith("tx:")&&(r=t.replace("tx:","")),t.startsWith("ty:")&&(n=t.replace("ty:","")),t.startsWith("tz:")?i=t.replace("tz:",""):t.startsWith("scale(")?o=t:t.startsWith("skew(")?a=t:t.startsWith("rotate(")?l=function(t){var e=t.match(/rotate\(([^)]+)\)/);if(!e)return t;var r=e[1].split(",").map((function(t){return t.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],")"):t}(t):t.startsWith("perspective(")?c=t:t.startsWith("matrix(")?u=t:t.startsWith("opacity:")&&(p=t.replace("opacity:",""))})),r=s.setDefault(r),n=s.setDefault(n),i=s.setDefault(i);var d="";if("0px"!=n&&"0px"!=r&&"0px"!=i?d+="translate3d(".concat(r,", ").concat(n,", ").concat(i,")"):"0px"==n&&"0px"==r||(d+="translate(".concat(r,", ").concat(n,")")),o&&(d+=" ".concat(o)),l&&(d+=" ".concat(l)),a&&(d+=" ".concat(a)),c&&(d+=" ".concat(c)),u&&(d+=" ".concat(u)),d){if(t.op.transform.duration){var f=t.op.transform.duration.replace(/^(\d+)(s)-/,(function(t,e,r){return e/2+r+" "})),y="transform ".concat(f,", opacity ").concat(f);s.res.style.transition=y}else s.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";t.op.transform.static&&(s.res.style.transition=""),(s.blastTarget||s.res).style.transform=d,s.res.style.opacity=p}else alert("OPE")}};e.on?s.res.addEventListener(e.on,(function(){e.delay?setTimeout((function(){r()}),e.delay):r()})):window.addEventListener("load",(function(){e.delay?setTimeout((function(){r()}),e.delay):r()}));var n=function(){var t="";e.values.forEach((function(e){e.startsWith("tx:")?t+="translateX(0) ":e.startsWith("ty:")?t+="translateY(0) ":e.startsWith("tz:")?t+="translateZ(0) ":e.startsWith("scale(")?t+="scale(1) ":e.startsWith("skew(")?t+="skew(0, 0) ":e.startsWith("rotate(")?t+="rotate(0) ":e.startsWith("perspective(")?t+="perspective(0) ":e.startsWith("matrix(")&&(t+="matrix(1, 0, 0, 1, 0, 0) "),s.res.style.opacity="1"})),t&&(s.res.style.transform=t.trim())};if(e.on)s.res.addEventListener("mouseout",(function(){e.keep||n()}));else{var i=1e3*parseFloat(e.duration),o=e.closeAfter?e.closeAfter:0;setTimeout((function(){e.keep||n()}),i/2+o)}e.hardCSS&&(s.res.style.transform=e.hardCSS)}else alert("THIS FIRE WITH GRADIENT (invalid block"),console.log("INVALID BLOCKA"),console.log(t)},(r=o(r="reactOnTransform"))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,this.state={isExpanded:!1,isMovedUp:!1,isMovedDown:!1}},n=[{key:"isHidden",value:function(t){t&&(this.res.style.display="none")}},{key:"keySet",value:function(t){return this.temporaryVal=1,this.res.style[t.key]=t.value,this}},{key:"onScroll",value:function(t){var e=this;"opacity"===t.value?this.res.style.opacity=t.valMin:"scale"===t.value&&(this.res.style.transform="scale(".concat(t.valMax,")")),window.addEventListener("scroll",(function(){var r=e.smartRange(window.scrollY,{min:t.from,max:t.to},{min:t.valMin,max:t.valMax});"opacity"===t.value?e.res.style.opacity=r:"scale"===t.value&&(e.res.style.transform="scale(".concat(r,")"))}))}},{key:"setAny",value:function(t){this[Object.keys(t)[0]]=[Object.values(t)[0]]}},{key:"setID",value:function(t){this.id=t}},{key:"setPrevText",value:function(t){this.prevText=t}},{key:"getCSS",value:function(){return this.css}},{key:"getPX",value:function(t){return{xs:"0px",sm:"576px",md:"768px",lg:"992px",xl:"1200px",xxl:"1400px",mxxl:"1800px"}[t]||"Invalid breakpoint"}},{key:"respad",value:function(t){var e=this,r=function(){e.pad(t[0].values);for(var r=0;r<t.length;r++){var n=t[r].breakpoint;window.matchMedia("(min-width: ".concat(e.getPX(n))).matches&&e.pad(t[r].values)}};window.addEventListener("resize",r),r()}},{key:"resmar",value:function(t){var e=this,r=function(){e.mar(t[0].values);for(var r=0;r<t.length;r++){var n=t[r].breakpoint;window.matchMedia("(max-width: ".concat(e.getPX(n))).matches&&e.mar(t[r].values)}};window.addEventListener("resize",r),r()}},{key:"resprop",value:function(t){var e=this,r={default:0,xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400};console.log("RES STYLE"),console.log(t),this.prevStyles={};for(var n=0;n<this.res.style.length;n++){var s=this.res.style[n];this.prevStyles[s]=this.res.style[s],console.log("kio")}t.forEach((function(t){void 0!==r[t.breakpoint]?t._value=r[t.breakpoint]:t._value=parseInt(t.breakpoint,10)})),t.sort((function(t,e){return t._value-e._value})),console.log("Sorted breakpoints:",t);var i=function(){for(var r in e.prevStyles)e.res.style[r]=e.prevStyles[r];for(var n=window.innerWidth,s=null,i=0;i<t.length;i++)if(n<=t[i]._value){s=t[i];break}if(s)for(var o in console.log("Applying styles for",s.breakpoint),s)"breakpoint"!==o&&"_value"!==o&&(e.res.style[o]=s[o])};window.addEventListener("resize",i),i()}},{key:"isNumber",value:function(t){return"number"==typeof t&&!isNaN(t)}},{key:"pad",value:function(t){for(var e=0;e<t.length;e++)for(var r=Object.keys(t[e]),n=0;n<r.length;n++)for(var s=r[n],i=t[e][s],o=0;o<s.length;o++)switch(s[o]){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(t){return this.res.style.alignSelf=t,this}},{key:"mar",value:function(t){for(var e=0;e<t.length;e++)for(var r=Object.keys(t[e]),n=0;n<r.length;n++)for(var s=r[n],i=t[e][s],o=0;o<s.length;o++){switch(s[o]){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"===s[o]&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto")}return this}},{key:"smartRange",value:function(t,e,r){t<e.min&&(t=e.min),t>e.max&&(t=e.max);var n=(t-e.min)/(e.max-e.min);e.min>e.max&&(n=(t-e.max)/(e.min-e.max));var s=(r.min-r.max)*n-r.min;if(s=Math.abs(s),r.min<r.max){var i=(r.max+Math.abs(r.min))*n;s=r.min+i}return s}},{key:"gpos",value:function(t){return this.res.style.gridColumn=t.col,this.res.style.gridRow=t.row,this}},{key:"fluidCopy",value:function(t){if(t instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var e=document.createTextNode(this.text);return this.res.appendChild(e),this.res.style.fontSize=t.exact,this}if("S1"===t){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"===t){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"===t){this.prevStylex=this.res.style,this.res=document.createElement("h3"),this.res.style.cssText=this.prevStylex.cssText;var s=document.createTextNode(this.text);this.res.appendChild(s),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===t){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"===t){this.prevStylex=this.res.style,this.res=document.createElement("h5"),this.res.style.cssText=this.prevStylex.cssText;var o=document.createTextNode(this.text);this.res.appendChild(o),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===t&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}},{key:"setIndex",value:function(t){this.index=t}},{key:"borderObj",value:function(t){var e,r=null!==(e=t.type)&&void 0!==e?e:"solid";return this.res.style.border="".concat(t.width," ").concat(r," ").concat(t.color),this.res.style.borderRadius=t.radius,this}},{key:"setPref",value:function(t){this.preffersId=t}},{key:"setClass",value:function(t){this.class=t}},{key:"setTags",value:function(t){this.openTag=t.open,this.closeTag=t.close,console.log("TAGS SET"),console.log(t)}},{key:"chainReact",value:function(t,n,s){var i=this;console.log("0P"),this.ap=!1,this.cta=0,this.once=!1;var o,a=r(t);try{for(a.s();!(o=a.n()).done;){var l=o.value;l.range||(l.range=["0px","999999px"])}}catch(t){a.e(t)}finally{a.f()}t.sort((function(t,e){return parseInt(t.range[0])-parseInt(e.range[0])}));var c=function(o){var a=window.visualViewport.width,l=[],c=[];i.resCopy=i.res,i.storedQueries=t.map((function(t){return t.target})).filter((function(t){return null!=t}));var u,p=r(t);try{for(p.s();!(u=p.n()).done;){var d=u.value;i.counterIndex++;var f=e(d.range,2),y=f[0],h=f[1],m=parseInt(y),v=parseInt(h),g=!0;if(d.target){g=!1;for(var b=0;b<d.target.length;b++)d.target[b]===n&&(g=!0)}a>=m&&a<=v&&g&&(l.push(d.log),c.push(d),d.op&&d.op.margin&&(i.useMargin=d.op.margin))}}catch(t){p.e(t)}finally{p.f()}if(s&&!s.includes("background")&&(i.res.style.background="",i.res.style.backgroundColor=""),i.res.style.textShadow="",s&&!s.includes("border")&&(i.res.style.border=""),s&&!s.includes("margin")&&(i.res.style.margin=""),i.res.style["-webkit-text-fill-color"]="",i.res.style["-webkit-text-stroke-color"]="",i.res.style["-webkit-text-stroke-width"]="",i.res.style.filter="",i.options.background&&(console.log(i.options.background),i.res.style.background=i.options.background),l.includes("gradient"),(l.includes("gradient")||l.includes("shadow"))&&(i.res.style.position="relative"),l.includes("blast")){var x,w=c.filter((function(t){return"blast"===t.log}))[0].op.color,k=null!==(x=c.filter((function(t){return"blast"===t.log}))[0].op.width)&&void 0!==x?x:"1px";"FlexRowLayoutElement"===i.getType()||"LayoutWrapperElement"===i.getType()?(i.res.style.border="".concat("number"==typeof k?k+"px":k," solid orange"),i.res.style.display="inline-block","FlexRowLayoutElement"===i.getType()&&(i.res.style.display="flex"),i.res.style.boxSizing="border-box",i.res.style.transformOrigin="center",i.blastTarget=i.res):(i.text&&(i.res.textContent=i.text),i.res.style["-webkit-text-fill-color"]="transparent",i.res.style["-webkit-text-stroke-color"]=w,i.res.style["-webkit-text-stroke-width"]="".concat(k))}if(l.includes("filter")){var S=c.filter((function(t){return"filter"===t.log}))[0].op.filter;i.res.style.filter=S}if(l.includes("background")&&(i.res.style.backgroundColor="green"),l.includes("gradient")&&("LayoutWrapperElement"!==i.getType()&&"FlexRowLayoutElement"!==i.getType()&&(i.res.style["-webkit-text-fill-color"]="transparent"),i.res.style.background=i.globalGradient,"LayoutWrapperElement"!==i.getType()&&"FlexRowLayoutElement"!==i.getType()&&(i.res.style["background-clip"]="text")),l.includes("shadow"))if("FlexRowLayoutElement"===i.getType()||"LayoutWrapperElement"===i.getType()){for(var T=[],E=0,O=0;O<i.options.shadow.op.steps;O++){var L;E+=3,T.push("".concat(E,"px ").concat(E,"px ").concat(E,"px ").concat(null!==(L=i.options.shadow.op.colors[O])&&void 0!==L?L:"gray"))}i.res.style.boxShadow=T.join(", ")}else{for(var j=[],P=0,C=0;C<i.options.shadow.op.steps;C++){var R;P+=3,j.push("drop-shadow(".concat(P,"px ").concat(P,"px ").concat(P,"px ").concat(null!==(R=i.options.shadow.op.colors[C])&&void 0!==R?R:"gray",")"))}i.res.style.filter=j.join(" ")}if(l.includes("margin"))for(b=0;b<t.length;b++)if(t[b].op){var A=t[b].op.offsets;A&&void 0!==i.index&&(i.res.style.margin=A[Number(i.index)]+"px")}if(l.includes("spana")||l.includes("span")){if(i.res=i.resCopy,i.options.span){var W;for(W=Array.isArray(i.options.span)?i.options.span.filter((function(t){return"span"===t.op.name}))[0]:i.options.span,i.res.textContent="",b=0;b<W.op.parts.length;b++){var I=W.op.parts[b].style,M=new i.constructor(W.op.parts[b].text).setup({type:"span"}).set(I).render();i.res.appendChild(M)}}}else{var N=new i.constructor(i.prevText).set({}).render();i.prevText&&i.prevText.length>0&&o&&i.res.appendChild(N)}if(l.includes("animation")){if(i.options.animation&&!i.hasAnimated&&!i.options.animation.op.fireAt){console.warn(i.openTag),i.hasAnimated=!0;var z=i.options.animation.op;window.addEventListener("sidebar:open",(function(){i.res.animate(z.keyframesOpen,z.openOptions)})),window.addEventListener("sidebar:closed",(function(){i.res.animate(z.keyframesClose,z.closeOptions)})),i.res.animate(z.keyframesClose,{duration:0,fill:"forwards"}),i.openTag&&i.closeTag&&(window.addEventListener(i.openTag,(function(){i.res.animate(z.keyframesOpen,z.openOptions)})),window.addEventListener(i.closeTag,(function(){i.res.animate(z.keyframesClose,z.closeOptions)})))}if(i.options.animation&&i.options.animation.op.fireAt&&i.options.animation.op.fireAt.endsWith("px")){var B=i.options.animation.op;i.res.animate(B.keyframesClose,{duration:0,fill:"forwards"});var _=function(){window.scrollY>parseFloat(B.fireAt)&&(i.res.animate(B.keyframesOpen,B.openOptions),window.removeEventListener("scroll",_))};window.addEventListener("scroll",_)}if(i.options.animation&&i.options.animation.op.fireAt&&"inview"===i.options.animation.op.fireAt){var D=i.options.animation.op;i.res.animate(D.keyframesClose,{duration:0,fill:"forwards"}),new IntersectionObserver((function(t,e){t.forEach((function(t){t.isIntersecting&&(i.res.animate(D.keyframesOpen,D.openOptions),e.disconnect())}))})).observe(i.res)}}};this.options.animation||window.addEventListener("resize",(function(){return c()})),c()}},{key:"maxWidth",value:function(t){return this.res.style.maxWidth=t,this}},{key:"removeQuotesFromFirstWord",value:function(t){return t.replace(/"([^"]+)":/g,"$1:")}},{key:"arrayMargin",value:function(t,e){return t.includes("left")&&(this.res.style.marginLeft=e),t.includes("right")&&(this.res.style.marginRight=e),t.includes("top")&&(this.res.style.marginTop=e),t.includes("bottom")&&(this.res.style.marginBottom=e),t.includes("all")&&(this.res.style.margin=e),e||(this.res.style.marginBottom=t),this}}],n&&i(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n}();function l(t){return l="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},l(t)}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function u(t){var e=function(t){if("object"!=l(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==l(e)?e:e+""}function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(p=function(){return!!t})()}function d(){return d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=f(t)););return t}(t,e);if(n){var s=Object.getOwnPropertyDescriptor(n,e);return s.get?s.get.call(arguments.length<3?t:r):s.value}},d.apply(null,arguments)}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}var h=function(){function t(e,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(n=function(t,e,r){return e=f(e),function(t,e){if(e&&("object"==l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,p()?Reflect.construct(e,r||[],f(t).constructor):e.apply(t,r))}(this,t)).text=e,n.url=r,n.setup(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&y(t,e)}(t,a),e=t,r=[{key:"getType",value:function(){return"LayoutWrapperElement"}},{key:"setup",value:function(){window.matchMedia("(max-device-width: 415px)");var t=document.createElement("div");return t.style.display="flex",t.style.flexDirection="column",t.style.alignItems="center",t.style.backgroundColor="#fff",t.style.fontFamily="Arial",t.style.width="100%",t.style.overflow="hidden",this.res=t,this}},{key:"set",value:function(t){if(this.obj=t,t.background&&(this.res.style.background=t.background),t.border&&(this.res.style.border=t.border),t.radius&&(this.res.style.borderRadius=t.radius),t.arrayPadding){var e=t.arrayPadding.sides.map((function(t){return'"'.concat(t,'"')})).join(", ");t.arrayPadding&&this.arrayPadding(t.arrayPadding.sides,t.arrayPadding.value),t.arrayPadding&&"\n arrayPadding: {sides: [".concat(e,'], value: "').concat(t.arrayPadding.value,'"},')}return t.arrayMargin&&this.arrayMargin(t.arrayMargin.sides,t.arrayMargin.value),t.arrayMargin&&"\n arrayMargin: {sides: [".concat(t.arrayMargin.sides.map((function(t){return'"'.concat(t,'", ')})),'], value: "').concat(t.arrayMargin.value,'"},'),t.width&&(this.res.style.width=t.width),this.options=t,this.callReact(t),this}},{key:"callReact",value:function(e){var r,n,s,i=[];if(e.stroke||e.gradient||e.span||e.backgroundOp||e.layout||e.shadow||e.animation||e.filtera||e.transform){e.gradient&&(this.globalGradient=e.gradient.op.gradient,"radial"===e.gradient.op.direction&&(this.globalGradient="radial-gradient(circle at center, orange, green)")),e.stroke&&(r=t,n=this,"function"==typeof(s=d(f(1&3?r.prototype:r),"setAny",n))?function(t){return s.apply(n,t)}:s)([{globalBlast:"".concat(e.stroke.op.width," ").concat(e.stroke.op.color)}]),e.span&&(e.span.prevText=this.text);var o=[e.stroke,e.gradient,e.animation,e.span,e.backgroundOp,e.layout,e.marginOp,e.shadow,e.animation,e.filtera,e.transform];o=o.filter((function(t){return null!=t}));for(var a=0;a<o.length;a++)i.push({range:o[a].range,log:o[a].op.name,target:o[a].target,op:o[a].op});var l=[];e.borderObj&&l.push("border"),e.backgroundOp&&l.push("background"),e.mar&&l.push("margin"),e.animation&&l.push("animation"),e.span&&l.push("span"),l.push("border"),console.log("ARA IS ",i),this.chainReact(i,this.options.id,l)}}},{key:"arrayPadding",value:function(t,e){return e||(this.res.style.marginLeft="".concat(t[0],"px"),this.res.style.marginTop="".concat(t[1],"px"),this.res.style.marginRight="".concat(t[2],"px"),this.res.style.marginBottom="".concat(t[3],"px")),"all"===t[0]&&(this.res.style.paddingLeft=e,this.res.style.paddingTop=e,this.res.style.paddingRight=e,this.res.style.paddingBottom=e),t.includes("left")&&(this.res.style.paddingLeft=e),t.includes("right")&&(this.res.style.paddingRight=e),t.includes("top")&&(this.res.style.paddingTop=e),t.includes("bottom")&&(this.res.style.paddingBottom=e),e||(this.res.style.paddingBottom=t),this}},{key:"arrayMargin",value:function(t,e){return t.includes("left")&&(this.res.style.marginLeft=e),t.includes("right")&&(this.res.style.marginRight=e),t.includes("top")&&(this.res.style.marginTop=e),t.includes("bottom")&&(this.res.style.marginBottom=e),t.includes("all")&&(this.res.style.margin=e),e||(this.res.style.marginBottom=t),this}},{key:"frame",value:function(t){return t.height&&(this.res.style.height=t.height),t.width&&(this.res.style.width=t.width),this}},{key:"scale",value:function(t){var e=this;return this.res.style.width,this.res.style.transition="0.5s all",this.res.addEventListener("mouseover",(function(){e.res.style.width,e.res.style.transform="scale(1.04)"})),this.res.addEventListener("mouseout",(function(){e.res.style.width,e.res.style.transform="scale(1.0)"})),this}},{key:"background",value:function(t){return this.res.style.backgroundColor=t,this}},{key:"color",value:function(t){return this.res.style.color=t,this}},{key:"padding",value:function(t){return this.res.style.padding="".concat(t,"px"),this}},{key:"items",value:function(t){for(var e=0;e<t.length;e++)this.res.appendChild(t[e].render());return this}},{key:"shadow",value:function(){return this.res.style.boxShadow="1px 1px 20px rgba(0, 0, 0, 0.60)",this}},{key:"round",value:function(t){return this.res.style.borderRadius="".concat(t,"px"),this}},{key:"render",value:function(t){if(!t)return this.res;document.querySelector(t).appendChild(this.res)}}],r&&c(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r}();export{h as Card};
|
package/dist/flexGrid.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see flexGrid.cjs.js.LICENSE.txt */
|
|
2
|
-
(()=>{"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){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)||i(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){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=i(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,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,s=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw s}}}}function i(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 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){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,p(n.key),n)}}function p(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 f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(f=function(){return!!e})()}function d(){return d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},d.apply(null,arguments)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}e.r(t),e.d(t,{FlexGrid:()=>m});var m=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,r){return t=h(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,f()?Reflect.construct(t,r||[],h(e).constructor):t.apply(e,r))}(this,t)).code=[],e.setup(),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&&y(e,t)}(t,e),r=t,n=[{key:"toCode",value:function(){return this.code}},{key:"setup",value:function(){this.code.push("new FlexGrid()"),this.code.push(".setup()");var e=document.createElement("div");return e.style.display="flex",e.style.padding=0,e.style.margin=0,this.res=e,this}},{key:"getType",value:function(){return"FlexRowLayoutElement"}},{key:"set",value:function(e){this.code.push(".set({"),e.gap&&this.code.push("gap: ".concat(e.gap)),e.gap&&(this.res.style.gap=e.gap),e.width&&this.code.push('width: "'.concat(e.width,'",')),e.flex&&(this.res.style.flex=e.flex),e.flex&&this.code.push("flex: ".concat(e.flex,",")),e.maxWidth&&(this.res.style.maxWidth=e.maxWidth),e.maxWidth&&this.code.push('maxWidth: "'.concat(e.maxWidth,'",')),e.maxWidth&&(this.res.style.minWidth="400px"),e.maxWidth&&(this.res.style.marginLeft="auto"),e.maxWidth&&(this.res.style.marginRight="auto"),e.width&&(this.res.style.width="".concat(e.width)),e.wrap&&(this.res.style.flexWrap="wrap"),e.wrap&&this.code.push("wrap: ".concat(e.wrap,",")),e.align&&(this.res.style.justifyContent=e.align),e.align&&this.code.push("align: ".concat(e.align,",")),e.colat&&this.toColumnAt(e.colat),e.colat&&this.code.push('\n colat: "'.concat(e.colat,'",')),this.code.push("}),");var t=e;return this.callReact(t),this}},{key:"callReact",value:function(e){this.options=e;var r,n,o,i=[];if(e.stroke||e.gradient||e.span||e.backgroundOp||e.layout||e.shadow||e.animation||e.filtera||e.transform){e.gradient&&(this.globalGradient=e.gradient.op.gradient,"radial"===e.gradient.op.direction&&(this.globalGradient="radial-gradient(orange, green)")),e.stroke&&(r=t,n=this,"function"==typeof(o=d(h(1&3?r.prototype:r),"setAny",n))?function(e){return o.apply(n,e)}:o)([{globalBlast:"".concat(e.stroke.op.width," ").concat(e.stroke.op.color)}]),e.span&&(e.span.prevText=this.text);var s=[e.stroke,e.gradient,e.animation,e.span,e.backgroundOp,e.layout,e.marginOp,e.shadow,e.animation,e.filtera,e.transform];s=s.filter((function(e){return null!=e}));for(var a=0;a<s.length;a++)i.push({range:s[a].range,log:s[a].op.name,target:s[a].target,op:s[a].op});var l=[];e.borderObj&&l.push("border"),e.background&&l.push("background"),e.mar&&l.push("margin"),e.animation&&l.push("animation"),e.span&&l.push("span"),console.log("ARA IS "),console.log(i),this.chainReact(i,e.id,l)}}},{key:"toColumnAt",value:function(e){var t=this;if(!this.columnAlways){var r=function(){var r=window.matchMedia("(max-width: ".concat(e,")")),n=window.matchMedia("(max-device-width: 415px)");r.matches||n.matches?(t.res.style.flexDirection="column",t.res.style.alignItems="center"):t.res.style.flexDirection="row"};r(),window.addEventListener("resize",r)}}},{key:"flex",value:function(e){return this.arra=Array.from(e.replace(/\s/g,"")),this.areas=Array.from(Array(e.replace(/\s/g,"")).join("")),this.save='"'.concat(e,'"'),this}},{key:"padding",value:function(e){return this.res.style.padding="".concat(e,"px"),this}},{key:"center",value:function(){return this.res.style.marginLeft="auto",this.res.style.marginRight="auto",this}},{key:"items",value:function(e){this.items=e,this.code.push("\n .items([");for(var t=0;t<e.length;t++){var r=e[t];if(null!=r){var n=r.render();void 0!==r.toCode&&this.code.push(r.toCode().flatMap((function(e){return e}))),this.res.appendChild(n)}}return this.code.push("\n ])"),this}},{key:"width",value:function(e){return this.res.style.width=e,this}},{key:"border",value:function(e,t){return this.res.style.border="".concat(t,"px solid ").concat(e),this}},{key:"adjust",value:function(e){var t=this,r=function(){var r=window.matchMedia("(max-device-width: 415px)");if(window.innerWidth<e||r.matches)for(var n=0;n<t.res.children.length;n++)t.res.children[n].style.flex="",t.res.children[n].style.width="100%";else for(n=0;n<t.res.children.length;n++)t.res.children[n].style.flex="".concat(t.arra[n])};return r(),window.addEventListener("resize",r),this}},{key:"render",value:function(e){if(!e)return this.res;document.querySelector("body").style.margin=0,document.querySelector("body").style.padding=0,document.querySelector(e).appendChild(this.res)}}],n&&u(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(e),e.transform||e.op&&e.op.transform){var t=e.transform;e.transform||(t=e.op.transform),t.duration||(t.duration="3s-ease-in-out"),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="",p="";if(0!==t.values.length){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:")&&(p=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.transform.duration){var d=e.op.transform.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.transform.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="";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=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}},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:"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:"respad",value:function(e){var t=this,r=function(){t.pad(e[0].values);for(var r=0;r<e.length;r++){var n=e[r].breakpoint;window.matchMedia("(min-width: ".concat(t.getPX(n))).matches&&t.pad(e[r].values)}};window.addEventListener("resize",r),r()}},{key:"resmar",value:function(e){var t=this,r=function(){t.mar(e[0].values);for(var r=0;r<e.length;r++){var n=e[r].breakpoint;window.matchMedia("(max-width: ".concat(t.getPX(n))).matches&&t.mar(e[r].values)}};window.addEventListener("resize",r),r()}},{key:"resprop",value:function(e){var t=this,r={default:0,xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400};console.log("RES STYLE"),console.log(e),this.prevStyles={};for(var n=0;n<this.res.style.length;n++){var o=this.res.style[n];this.prevStyles[o]=this.res.style[o],console.log("kio")}e.forEach((function(e){void 0!==r[e.breakpoint]?e._value=r[e.breakpoint]:e._value=parseInt(e.breakpoint,10)})),e.sort((function(e,t){return e._value-t._value})),console.log("Sorted breakpoints:",e);var i=function(){for(var r in t.prevStyles)t.res.style[r]=t.prevStyles[r];for(var n=window.innerWidth,o=null,i=0;i<e.length;i++)if(n<=e[i]._value){o=e[i];break}if(o)for(var s in console.log("Applying styles for",o.breakpoint),o)"breakpoint"!==s&&"_value"!==s&&(t.res.style[s]=o[s])};window.addEventListener("resize",i),i()}},{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 i=this;console.log("0P"),this.ap=!1,this.cta=0,this.once=!1;var s,a=o(e);try{for(a.s();!(s=a.n()).done;){var l=s.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(s){var a=window.visualViewport.width,l=[],c=[];i.resCopy=i.res,i.storedQueries=e.map((function(e){return e.target})).filter((function(e){return null!=e}));var u,p=o(e);try{for(p.s();!(u=p.n()).done;){var f=u.value;i.counterIndex++;var d=n(f.range,2),h=d[0],y=d[1],m=parseInt(h),v=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>=m&&a<=v&&g&&(l.push(f.log),c.push(f),f.op&&f.op.margin&&(i.useMargin=f.op.margin))}}catch(e){p.e(e)}finally{p.f()}if(r&&!r.includes("background")&&(i.res.style.background="",i.res.style.backgroundColor=""),i.res.style.textShadow="",r&&!r.includes("border")&&(i.res.style.border=""),r&&!r.includes("margin")&&(i.res.style.margin=""),i.res.style["-webkit-text-fill-color"]="",i.res.style["-webkit-text-stroke-color"]="",i.res.style["-webkit-text-stroke-width"]="",i.res.style.filter="",i.options.background&&(console.log(i.options.background),i.res.style.background=i.options.background),l.includes("gradient"),(l.includes("gradient")||l.includes("shadow"))&&(i.res.style.position="relative"),l.includes("blast")){var x,w=c.filter((function(e){return"blast"===e.log}))[0].op.color,k=null!==(x=c.filter((function(e){return"blast"===e.log}))[0].op.width)&&void 0!==x?x:"1px";"FlexRowLayoutElement"===i.getType()||"LayoutWrapperElement"===i.getType()?(i.res.style.border="".concat("number"==typeof k?k+"px":k," solid orange"),i.res.style.display="inline-block","FlexRowLayoutElement"===i.getType()&&(i.res.style.display="flex"),i.res.style.boxSizing="border-box",i.res.style.transformOrigin="center",i.blastTarget=i.res):(i.text&&(i.res.textContent=i.text),i.res.style["-webkit-text-fill-color"]="transparent",i.res.style["-webkit-text-stroke-color"]=w,i.res.style["-webkit-text-stroke-width"]="".concat(k))}if(l.includes("filter")){var S=c.filter((function(e){return"filter"===e.log}))[0].op.filter;i.res.style.filter=S}if(l.includes("background")&&(i.res.style.backgroundColor="green"),l.includes("gradient")&&("LayoutWrapperElement"!==i.getType()&&"FlexRowLayoutElement"!==i.getType()&&(i.res.style["-webkit-text-fill-color"]="transparent"),i.res.style.background=i.globalGradient,"LayoutWrapperElement"!==i.getType()&&"FlexRowLayoutElement"!==i.getType()&&(i.res.style["background-clip"]="text")),l.includes("shadow")){var T,O="",E=0;for(b=0;b<i.options.shadow.op.steps;b++){var W;O+="drop-shadow(".concat(E+=3,"px ").concat(E,"px ").concat(E,"px ").concat(null!==(W=i.options.shadow.color)&&void 0!==W?W:"gray",") ")}"FlexRowLayoutElement"===i.getType()||"LayoutWrapperElement"===i.getType()?i.res.style.boxShadow="".concat(E,"px ").concat(E,"px ").concat(E,"px ").concat(null!==(T=i.options.shadow.color)&&void 0!==T?T:"gray"):i.res.style.filter=O}if(l.includes("margin"))for(b=0;b<e.length;b++)if(e[b].op){var j=e[b].op.offsets;j&&void 0!==i.index&&(i.res.style.margin=j[Number(i.index)]+"px")}if(l.includes("spana")||l.includes("span")){if(i.res=i.resCopy,i.options.span){var C;for(C=Array.isArray(i.options.span)?i.options.span.filter((function(e){return"span"===e.op.name}))[0]:i.options.span,i.res.textContent="",b=0;b<C.op.parts.length;b++){var L=C.op.parts[b].style,A=new i.constructor(C.op.parts[b].text).setup({type:"span"}).set(L).render();i.res.appendChild(A)}}}else{var R=new i.constructor(i.prevText).set({}).render();i.prevText&&i.prevText.length>0&&s&&i.res.appendChild(R)}if(l.includes("animation")){if(i.options.animation&&!i.hasAnimated&&!i.options.animation.op.fireAt){console.warn(i.openTag),i.hasAnimated=!0;var P=i.options.animation.op;window.addEventListener("sidebar:open",(function(){i.res.animate(P.keyframesOpen,P.openOptions)})),window.addEventListener("sidebar:closed",(function(){i.res.animate(P.keyframesClose,P.closeOptions)})),i.res.animate(P.keyframesClose,{duration:0,fill:"forwards"}),i.openTag&&i.closeTag&&(window.addEventListener(i.openTag,(function(){i.res.animate(P.keyframesOpen,P.openOptions)})),window.addEventListener(i.closeTag,(function(){i.res.animate(P.keyframesClose,P.closeOptions)})))}if(i.options.animation&&i.options.animation.op.fireAt&&i.options.animation.op.fireAt.endsWith("px")){var I=i.options.animation.op;i.res.animate(I.keyframesClose,{duration:0,fill:"forwards"});var N=function(){window.scrollY>parseFloat(I.fireAt)&&(i.res.animate(I.keyframesOpen,I.openOptions),window.removeEventListener("scroll",N))};window.addEventListener("scroll",N)}if(i.options.animation&&i.options.animation.op.fireAt&&"inview"===i.options.animation.op.fireAt){var M=i.options.animation.op;i.res.animate(M.keyframesClose,{duration:0,fill:"forwards"}),new IntersectionObserver((function(e,t){e.forEach((function(e){e.isIntersecting&&(i.res.animate(M.keyframesOpen,M.openOptions),t.disconnect())}))})).observe(i.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})();
|
|
2
|
+
(()=>{"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){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 o(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 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){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,p(n.key),n)}}function p(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 f(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(f=function(){return!!e})()}function d(){return d="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=h(e)););return e}(e,t);if(n){var o=Object.getOwnPropertyDescriptor(n,t);return o.get?o.get.call(arguments.length<3?e:r):o.value}},d.apply(null,arguments)}function h(e){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},h(e)}function y(e,t){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},y(e,t)}e.r(t),e.d(t,{FlexGrid:()=>m});var m=function(e){function t(){var e;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(e,t,r){return t=h(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,f()?Reflect.construct(t,r||[],h(e).constructor):t.apply(e,r))}(this,t)).code=[],e.setup(),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&&y(e,t)}(t,e),r=t,n=[{key:"toCode",value:function(){return this.code}},{key:"setup",value:function(){this.code.push("new FlexGrid()"),this.code.push(".setup()");var e=document.createElement("div");return e.style.display="flex",e.style.padding=0,e.style.margin=0,this.res=e,this}},{key:"getType",value:function(){return"FlexRowLayoutElement"}},{key:"set",value:function(e){this.code.push(".set({"),e.gap&&this.code.push("gap: ".concat(e.gap)),e.gap&&(this.res.style.gap=e.gap),e.width&&this.code.push('width: "'.concat(e.width,'",')),e.flex&&(this.res.style.flex=e.flex),e.flex&&this.code.push("flex: ".concat(e.flex,",")),e.maxWidth&&(this.res.style.maxWidth=e.maxWidth),e.maxWidth&&this.code.push('maxWidth: "'.concat(e.maxWidth,'",')),e.maxWidth&&(this.res.style.minWidth="400px"),e.maxWidth&&(this.res.style.marginLeft="auto"),e.maxWidth&&(this.res.style.marginRight="auto"),e.width&&(this.res.style.width="".concat(e.width)),e.wrap&&(this.res.style.flexWrap="wrap"),e.wrap&&this.code.push("wrap: ".concat(e.wrap,",")),e.align&&(this.res.style.justifyContent=e.align),e.align&&this.code.push("align: ".concat(e.align,",")),e.colat&&this.toColumnAt(e.colat),e.colat&&this.code.push('\n colat: "'.concat(e.colat,'",')),this.code.push("}),");var t=e;return this.callReact(t),this}},{key:"callReact",value:function(e){this.options=e;var r,n,o,s=[];if(e.stroke||e.gradient||e.span||e.backgroundOp||e.layout||e.shadow||e.animation||e.filtera||e.transform){e.gradient&&(this.globalGradient=e.gradient.op.gradient,"radial"===e.gradient.op.direction&&(this.globalGradient="radial-gradient(orange, green)")),e.stroke&&(r=t,n=this,"function"==typeof(o=d(h(1&3?r.prototype:r),"setAny",n))?function(e){return o.apply(n,e)}:o)([{globalBlast:"".concat(e.stroke.op.width," ").concat(e.stroke.op.color)}]),e.span&&(e.span.prevText=this.text);var i=[e.stroke,e.gradient,e.animation,e.span,e.backgroundOp,e.layout,e.marginOp,e.shadow,e.animation,e.filtera,e.transform];i=i.filter((function(e){return null!=e}));for(var a=0;a<i.length;a++)s.push({range:i[a].range,log:i[a].op.name,target:i[a].target,op:i[a].op});var l=[];e.borderObj&&l.push("border"),e.background&&l.push("background"),e.mar&&l.push("margin"),e.animation&&l.push("animation"),e.span&&l.push("span"),console.log("ARA IS "),console.log(s),this.chainReact(s,e.id,l)}}},{key:"toColumnAt",value:function(e){var t=this;if(!this.columnAlways){var r=function(){var r=window.matchMedia("(max-width: ".concat(e,")")),n=window.matchMedia("(max-device-width: 415px)");r.matches||n.matches?(t.res.style.flexDirection="column",t.res.style.alignItems="center"):t.res.style.flexDirection="row"};r(),window.addEventListener("resize",r)}}},{key:"flex",value:function(e){return this.arra=Array.from(e.replace(/\s/g,"")),this.areas=Array.from(Array(e.replace(/\s/g,"")).join("")),this.save='"'.concat(e,'"'),this}},{key:"padding",value:function(e){return this.res.style.padding="".concat(e,"px"),this}},{key:"center",value:function(){return this.res.style.marginLeft="auto",this.res.style.marginRight="auto",this}},{key:"items",value:function(e){this.items=e,this.code.push("\n .items([");for(var t=0;t<e.length;t++){var r=e[t];if(null!=r){var n=r.render();void 0!==r.toCode&&this.code.push(r.toCode().flatMap((function(e){return e}))),this.res.appendChild(n)}}return this.code.push("\n ])"),this}},{key:"width",value:function(e){return this.res.style.width=e,this}},{key:"border",value:function(e,t){return this.res.style.border="".concat(t,"px solid ").concat(e),this}},{key:"adjust",value:function(e){var t=this,r=function(){var r=window.matchMedia("(max-device-width: 415px)");if(window.innerWidth<e||r.matches)for(var n=0;n<t.res.children.length;n++)t.res.children[n].style.flex="",t.res.children[n].style.width="100%";else for(n=0;n<t.res.children.length;n++)t.res.children[n].style.flex="".concat(t.arra[n])};return r(),window.addEventListener("resize",r),this}},{key:"render",value:function(e){if(!e)return this.res;document.querySelector("body").style.margin=0,document.querySelector("body").style.padding=0,document.querySelector(e).appendChild(this.res)}}],n&&u(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(e),e.transform||e.op&&e.op.transform){var t=e.transform;e.transform||(t=e.op.transform),t.duration||(t.duration="3s-ease-in-out"),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(0!==t.values.length){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.transform.duration){var d=e.op.transform.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.transform.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="";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}},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:"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:"respad",value:function(e){var t=this,r=function(){t.pad(e[0].values);for(var r=0;r<e.length;r++){var n=e[r].breakpoint;window.matchMedia("(min-width: ".concat(t.getPX(n))).matches&&t.pad(e[r].values)}};window.addEventListener("resize",r),r()}},{key:"resmar",value:function(e){var t=this,r=function(){t.mar(e[0].values);for(var r=0;r<e.length;r++){var n=e[r].breakpoint;window.matchMedia("(max-width: ".concat(t.getPX(n))).matches&&t.mar(e[r].values)}};window.addEventListener("resize",r),r()}},{key:"resprop",value:function(e){var t=this,r={default:0,xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400};console.log("RES STYLE"),console.log(e),this.prevStyles={};for(var n=0;n<this.res.style.length;n++){var o=this.res.style[n];this.prevStyles[o]=this.res.style[o],console.log("kio")}e.forEach((function(e){void 0!==r[e.breakpoint]?e._value=r[e.breakpoint]:e._value=parseInt(e.breakpoint,10)})),e.sort((function(e,t){return e._value-t._value})),console.log("Sorted breakpoints:",e);var s=function(){for(var r in t.prevStyles)t.res.style[r]=t.prevStyles[r];for(var n=window.innerWidth,o=null,s=0;s<e.length;s++)if(n<=e[s]._value){o=e[s];break}if(o)for(var i in console.log("Applying styles for",o.breakpoint),o)"breakpoint"!==i&&"_value"!==i&&(t.res.style[i]=o[i])};window.addEventListener("resize",s),s()}},{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=o(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=o(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],m=parseInt(h),v=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>=m&&a<=v&&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(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,w=c.filter((function(e){return"blast"===e.log}))[0].op.color,k=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 k?k+"px":k," 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.textContent=s.text),s.res.style["-webkit-text-fill-color"]="transparent",s.res.style["-webkit-text-stroke-color"]=w,s.res.style["-webkit-text-stroke-width"]="".concat(k))}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"))if("FlexRowLayoutElement"===s.getType()||"LayoutWrapperElement"===s.getType()){for(var T=[],O=0,E=0;E<s.options.shadow.op.steps;E++){var j;O+=3,T.push("".concat(O,"px ").concat(O,"px ").concat(O,"px ").concat(null!==(j=s.options.shadow.op.colors[E])&&void 0!==j?j:"gray"))}s.res.style.boxShadow=T.join(", ")}else{for(var W=[],C=0,L=0;L<s.options.shadow.op.steps;L++){var A;C+=3,W.push("drop-shadow(".concat(C,"px ").concat(C,"px ").concat(C,"px ").concat(null!==(A=s.options.shadow.op.colors[L])&&void 0!==A?A:"gray",")"))}s.res.style.filter=W.join(" ")}if(l.includes("margin"))for(b=0;b<e.length;b++)if(e[b].op){var R=e[b].op.offsets;R&&void 0!==s.index&&(s.res.style.margin=R[Number(s.index)]+"px")}if(l.includes("spana")||l.includes("span")){if(s.res=s.resCopy,s.options.span){var P;for(P=Array.isArray(s.options.span)?s.options.span.filter((function(e){return"span"===e.op.name}))[0]:s.options.span,s.res.textContent="",b=0;b<P.op.parts.length;b++){var I=P.op.parts[b].style,N=new s.constructor(P.op.parts[b].text).setup({type:"span"}).set(I).render();s.res.appendChild(N)}}}else{var M=new s.constructor(s.prevText).set({}).render();s.prevText&&s.prevText.length>0&&i&&s.res.appendChild(M)}if(l.includes("animation")){if(s.options.animation&&!s.hasAnimated&&!s.options.animation.op.fireAt){console.warn(s.openTag),s.hasAnimated=!0;var z=s.options.animation.op;window.addEventListener("sidebar:open",(function(){s.res.animate(z.keyframesOpen,z.openOptions)})),window.addEventListener("sidebar:closed",(function(){s.res.animate(z.keyframesClose,z.closeOptions)})),s.res.animate(z.keyframesClose,{duration:0,fill:"forwards"}),s.openTag&&s.closeTag&&(window.addEventListener(s.openTag,(function(){s.res.animate(z.keyframesOpen,z.openOptions)})),window.addEventListener(s.closeTag,(function(){s.res.animate(z.keyframesClose,z.closeOptions)})))}if(s.options.animation&&s.options.animation.op.fireAt&&s.options.animation.op.fireAt.endsWith("px")){var _=s.options.animation.op;s.res.animate(_.keyframesClose,{duration:0,fill:"forwards"});var F=function(){window.scrollY>parseFloat(_.fireAt)&&(s.res.animate(_.keyframesOpen,_.openOptions),window.removeEventListener("scroll",F))};window.addEventListener("scroll",F)}if(s.options.animation&&s.options.animation.op.fireAt&&"inview"===s.options.animation.op.fireAt){var D=s.options.animation.op;s.res.animate(D.keyframesClose,{duration:0,fill:"forwards"}),new IntersectionObserver((function(e,t){e.forEach((function(e){e.isIntersecting&&(s.res.animate(D.keyframesOpen,D.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})();
|
package/dist/flexGrid.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see flexGrid.esm.js.LICENSE.txt */
|
|
2
|
-
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){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,s,i,a=[],l=!0,c=!1;try{if(s=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=s.call(r)).done)&&(a.push(n.value),a.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw o}}return a}}(t,e)||n(t,e)||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 r(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=n(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var o=0,s=function(){};return{s,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},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(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){l=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function n(t,e){if(t){if("string"==typeof t)return o(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}function i(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+""}var a=function(){return t=function t(){var e,r,n,o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=function(t){if(console.log("LOBJO IS"),console.log(t),t.transform||t.op&&t.op.transform){var e=t.transform;t.transform||(e=t.op.transform),e.duration||(e.duration="3s-ease-in-out"),o.setDefault=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0px";return 0===t.length?e+" ":t};var r=function(){var r="",n="",s="",i="",a="",l="",c="",u="",p="";if(0!==e.values.length){e.values.forEach((function(t){t.startsWith("tx:")&&(r=t.replace("tx:","")),t.startsWith("ty:")&&(n=t.replace("ty:","")),t.startsWith("tz:")?s=t.replace("tz:",""):t.startsWith("scale(")?i=t:t.startsWith("skew(")?a=t:t.startsWith("rotate(")?l=function(t){var e=t.match(/rotate\(([^)]+)\)/);if(!e)return t;var r=e[1].split(",").map((function(t){return t.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],")"):t}(t):t.startsWith("perspective(")?c=t:t.startsWith("matrix(")?u=t:t.startsWith("opacity:")&&(p=t.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(t.op.transform.duration){var h=t.op.transform.duration.replace(/^(\d+)(s)-/,(function(t,e,r){return e/2+r+" "})),d="transform ".concat(h,", opacity ").concat(h);o.res.style.transition=d}else o.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";t.op.transform.static&&(o.res.style.transition=""),(o.blastTarget||o.res).style.transform=f,o.res.style.opacity=p}else alert("OPE")}};e.on?o.res.addEventListener(e.on,(function(){e.delay?setTimeout((function(){r()}),e.delay):r()})):window.addEventListener("load",(function(){e.delay?setTimeout((function(){r()}),e.delay):r()}));var n=function(){var t="";e.values.forEach((function(e){e.startsWith("tx:")?t+="translateX(0) ":e.startsWith("ty:")?t+="translateY(0) ":e.startsWith("tz:")?t+="translateZ(0) ":e.startsWith("scale(")?t+="scale(1) ":e.startsWith("skew(")?t+="skew(0, 0) ":e.startsWith("rotate(")?t+="rotate(0) ":e.startsWith("perspective(")?t+="perspective(0) ":e.startsWith("matrix(")&&(t+="matrix(1, 0, 0, 1, 0, 0) "),o.res.style.opacity="1"})),t&&(o.res.style.transform=t.trim())};if(e.on)o.res.addEventListener("mouseout",(function(){e.keep||n()}));else{var s=1e3*parseFloat(e.duration),i=e.closeAfter?e.closeAfter:0;setTimeout((function(){e.keep||n()}),s/2+i)}e.hardCSS&&(o.res.style.transform=e.hardCSS)}else alert("THIS FIRE WITH GRADIENT (invalid block"),console.log("INVALID BLOCKA"),console.log(t)},(r=i(r="reactOnTransform"))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,this.state={isExpanded:!1,isMovedUp:!1,isMovedDown:!1}},n=[{key:"isHidden",value:function(t){t&&(this.res.style.display="none")}},{key:"keySet",value:function(t){return this.temporaryVal=1,this.res.style[t.key]=t.value,this}},{key:"onScroll",value:function(t){var e=this;"opacity"===t.value?this.res.style.opacity=t.valMin:"scale"===t.value&&(this.res.style.transform="scale(".concat(t.valMax,")")),window.addEventListener("scroll",(function(){var r=e.smartRange(window.scrollY,{min:t.from,max:t.to},{min:t.valMin,max:t.valMax});"opacity"===t.value?e.res.style.opacity=r:"scale"===t.value&&(e.res.style.transform="scale(".concat(r,")"))}))}},{key:"setAny",value:function(t){this[Object.keys(t)[0]]=[Object.values(t)[0]]}},{key:"setID",value:function(t){this.id=t}},{key:"setPrevText",value:function(t){this.prevText=t}},{key:"getCSS",value:function(){return this.css}},{key:"getPX",value:function(t){return{xs:"0px",sm:"576px",md:"768px",lg:"992px",xl:"1200px",xxl:"1400px",mxxl:"1800px"}[t]||"Invalid breakpoint"}},{key:"respad",value:function(t){var e=this,r=function(){e.pad(t[0].values);for(var r=0;r<t.length;r++){var n=t[r].breakpoint;window.matchMedia("(min-width: ".concat(e.getPX(n))).matches&&e.pad(t[r].values)}};window.addEventListener("resize",r),r()}},{key:"resmar",value:function(t){var e=this,r=function(){e.mar(t[0].values);for(var r=0;r<t.length;r++){var n=t[r].breakpoint;window.matchMedia("(max-width: ".concat(e.getPX(n))).matches&&e.mar(t[r].values)}};window.addEventListener("resize",r),r()}},{key:"resprop",value:function(t){var e=this,r={default:0,xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400};console.log("RES STYLE"),console.log(t),this.prevStyles={};for(var n=0;n<this.res.style.length;n++){var o=this.res.style[n];this.prevStyles[o]=this.res.style[o],console.log("kio")}t.forEach((function(t){void 0!==r[t.breakpoint]?t._value=r[t.breakpoint]:t._value=parseInt(t.breakpoint,10)})),t.sort((function(t,e){return t._value-e._value})),console.log("Sorted breakpoints:",t);var s=function(){for(var r in e.prevStyles)e.res.style[r]=e.prevStyles[r];for(var n=window.innerWidth,o=null,s=0;s<t.length;s++)if(n<=t[s]._value){o=t[s];break}if(o)for(var i in console.log("Applying styles for",o.breakpoint),o)"breakpoint"!==i&&"_value"!==i&&(e.res.style[i]=o[i])};window.addEventListener("resize",s),s()}},{key:"isNumber",value:function(t){return"number"==typeof t&&!isNaN(t)}},{key:"pad",value:function(t){for(var e=0;e<t.length;e++)for(var r=Object.keys(t[e]),n=0;n<r.length;n++)for(var o=r[n],s=t[e][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(t){return this.res.style.alignSelf=t,this}},{key:"mar",value:function(t){for(var e=0;e<t.length;e++)for(var r=Object.keys(t[e]),n=0;n<r.length;n++)for(var o=r[n],s=t[e][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(t,e,r){t<e.min&&(t=e.min),t>e.max&&(t=e.max);var n=(t-e.min)/(e.max-e.min);e.min>e.max&&(n=(t-e.max)/(e.min-e.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(t){return this.res.style.gridColumn=t.col,this.res.style.gridRow=t.row,this}},{key:"fluidCopy",value:function(t){if(t instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var e=document.createTextNode(this.text);return this.res.appendChild(e),this.res.style.fontSize=t.exact,this}if("S1"===t){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"===t){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"===t){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"===t){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"===t){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"===t&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}},{key:"setIndex",value:function(t){this.index=t}},{key:"borderObj",value:function(t){var e,r=null!==(e=t.type)&&void 0!==e?e:"solid";return this.res.style.border="".concat(t.width," ").concat(r," ").concat(t.color),this.res.style.borderRadius=t.radius,this}},{key:"setPref",value:function(t){this.preffersId=t}},{key:"setClass",value:function(t){this.class=t}},{key:"setTags",value:function(t){this.openTag=t.open,this.closeTag=t.close,console.log("TAGS SET"),console.log(t)}},{key:"chainReact",value:function(t,n,o){var s=this;console.log("0P"),this.ap=!1,this.cta=0,this.once=!1;var i,a=r(t);try{for(a.s();!(i=a.n()).done;){var l=i.value;l.range||(l.range=["0px","999999px"])}}catch(t){a.e(t)}finally{a.f()}t.sort((function(t,e){return parseInt(t.range[0])-parseInt(e.range[0])}));var c=function(i){var a=window.visualViewport.width,l=[],c=[];s.resCopy=s.res,s.storedQueries=t.map((function(t){return t.target})).filter((function(t){return null!=t}));var u,p=r(t);try{for(p.s();!(u=p.n()).done;){var f=u.value;s.counterIndex++;var h=e(f.range,2),d=h[0],y=h[1],m=parseInt(d),v=parseInt(y),g=!0;if(f.target){g=!1;for(var x=0;x<f.target.length;x++)f.target[x]===n&&(g=!0)}a>=m&&a<=v&&g&&(l.push(f.log),c.push(f),f.op&&f.op.margin&&(s.useMargin=f.op.margin))}}catch(t){p.e(t)}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 b,w=c.filter((function(t){return"blast"===t.log}))[0].op.color,k=null!==(b=c.filter((function(t){return"blast"===t.log}))[0].op.width)&&void 0!==b?b:"1px";"FlexRowLayoutElement"===s.getType()||"LayoutWrapperElement"===s.getType()?(s.res.style.border="".concat("number"==typeof k?k+"px":k," 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.textContent=s.text),s.res.style["-webkit-text-fill-color"]="transparent",s.res.style["-webkit-text-stroke-color"]=w,s.res.style["-webkit-text-stroke-width"]="".concat(k))}if(l.includes("filter")){var S=c.filter((function(t){return"filter"===t.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 T,E="",O=0;for(x=0;x<s.options.shadow.op.steps;x++){var W;E+="drop-shadow(".concat(O+=3,"px ").concat(O,"px ").concat(O,"px ").concat(null!==(W=s.options.shadow.color)&&void 0!==W?W:"gray",") ")}"FlexRowLayoutElement"===s.getType()||"LayoutWrapperElement"===s.getType()?s.res.style.boxShadow="".concat(O,"px ").concat(O,"px ").concat(O,"px ").concat(null!==(T=s.options.shadow.color)&&void 0!==T?T:"gray"):s.res.style.filter=E}if(l.includes("margin"))for(x=0;x<t.length;x++)if(t[x].op){var C=t[x].op.offsets;C&&void 0!==s.index&&(s.res.style.margin=C[Number(s.index)]+"px")}if(l.includes("spana")||l.includes("span")){if(s.res=s.resCopy,s.options.span){var L;for(L=Array.isArray(s.options.span)?s.options.span.filter((function(t){return"span"===t.op.name}))[0]:s.options.span,s.res.textContent="",x=0;x<L.op.parts.length;x++){var A=L.op.parts[x].style,j=new s.constructor(L.op.parts[x].text).setup({type:"span"}).set(A).render();s.res.appendChild(j)}}}else{var R=new s.constructor(s.prevText).set({}).render();s.prevText&&s.prevText.length>0&&i&&s.res.appendChild(R)}if(l.includes("animation")){if(s.options.animation&&!s.hasAnimated&&!s.options.animation.op.fireAt){console.warn(s.openTag),s.hasAnimated=!0;var I=s.options.animation.op;window.addEventListener("sidebar:open",(function(){s.res.animate(I.keyframesOpen,I.openOptions)})),window.addEventListener("sidebar:closed",(function(){s.res.animate(I.keyframesClose,I.closeOptions)})),s.res.animate(I.keyframesClose,{duration:0,fill:"forwards"}),s.openTag&&s.closeTag&&(window.addEventListener(s.openTag,(function(){s.res.animate(I.keyframesOpen,I.openOptions)})),window.addEventListener(s.closeTag,(function(){s.res.animate(I.keyframesClose,I.closeOptions)})))}if(s.options.animation&&s.options.animation.op.fireAt&&s.options.animation.op.fireAt.endsWith("px")){var P=s.options.animation.op;s.res.animate(P.keyframesClose,{duration:0,fill:"forwards"});var N=function(){window.scrollY>parseFloat(P.fireAt)&&(s.res.animate(P.keyframesOpen,P.openOptions),window.removeEventListener("scroll",N))};window.addEventListener("scroll",N)}if(s.options.animation&&s.options.animation.op.fireAt&&"inview"===s.options.animation.op.fireAt){var z=s.options.animation.op;s.res.animate(z.keyframesClose,{duration:0,fill:"forwards"}),new IntersectionObserver((function(t,e){t.forEach((function(t){t.isIntersecting&&(s.res.animate(z.keyframesOpen,z.openOptions),e.disconnect())}))})).observe(s.res)}}};this.options.animation||window.addEventListener("resize",(function(){return c()})),c()}},{key:"maxWidth",value:function(t){return this.res.style.maxWidth=t,this}},{key:"removeQuotesFromFirstWord",value:function(t){return t.replace(/"([^"]+)":/g,"$1:")}},{key:"arrayMargin",value:function(t,e){return t.includes("left")&&(this.res.style.marginLeft=e),t.includes("right")&&(this.res.style.marginRight=e),t.includes("top")&&(this.res.style.marginTop=e),t.includes("bottom")&&(this.res.style.marginBottom=e),t.includes("all")&&(this.res.style.margin=e),e||(this.res.style.marginBottom=t),this}}],n&&s(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n}();function l(t){return l="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},l(t)}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function u(t){var e=function(t){if("object"!=l(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==l(e)?e:e+""}function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(p=function(){return!!t})()}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},f.apply(null,arguments)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function d(t,e){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},d(t,e)}var y=function(){function t(){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(t,e,r){return e=h(e),function(t,e){if(e&&("object"==l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,p()?Reflect.construct(e,r||[],h(t).constructor):e.apply(t,r))}(this,t)).code=[],e.setup(),e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}(t,a),e=t,r=[{key:"toCode",value:function(){return this.code}},{key:"setup",value:function(){this.code.push("new FlexGrid()"),this.code.push(".setup()");var t=document.createElement("div");return t.style.display="flex",t.style.padding=0,t.style.margin=0,this.res=t,this}},{key:"getType",value:function(){return"FlexRowLayoutElement"}},{key:"set",value:function(t){this.code.push(".set({"),t.gap&&this.code.push("gap: ".concat(t.gap)),t.gap&&(this.res.style.gap=t.gap),t.width&&this.code.push('width: "'.concat(t.width,'",')),t.flex&&(this.res.style.flex=t.flex),t.flex&&this.code.push("flex: ".concat(t.flex,",")),t.maxWidth&&(this.res.style.maxWidth=t.maxWidth),t.maxWidth&&this.code.push('maxWidth: "'.concat(t.maxWidth,'",')),t.maxWidth&&(this.res.style.minWidth="400px"),t.maxWidth&&(this.res.style.marginLeft="auto"),t.maxWidth&&(this.res.style.marginRight="auto"),t.width&&(this.res.style.width="".concat(t.width)),t.wrap&&(this.res.style.flexWrap="wrap"),t.wrap&&this.code.push("wrap: ".concat(t.wrap,",")),t.align&&(this.res.style.justifyContent=t.align),t.align&&this.code.push("align: ".concat(t.align,",")),t.colat&&this.toColumnAt(t.colat),t.colat&&this.code.push('\n colat: "'.concat(t.colat,'",')),this.code.push("}),");var e=t;return this.callReact(e),this}},{key:"callReact",value:function(e){this.options=e;var r,n,o,s=[];if(e.stroke||e.gradient||e.span||e.backgroundOp||e.layout||e.shadow||e.animation||e.filtera||e.transform){e.gradient&&(this.globalGradient=e.gradient.op.gradient,"radial"===e.gradient.op.direction&&(this.globalGradient="radial-gradient(orange, green)")),e.stroke&&(r=t,n=this,"function"==typeof(o=f(h(1&3?r.prototype:r),"setAny",n))?function(t){return o.apply(n,t)}:o)([{globalBlast:"".concat(e.stroke.op.width," ").concat(e.stroke.op.color)}]),e.span&&(e.span.prevText=this.text);var i=[e.stroke,e.gradient,e.animation,e.span,e.backgroundOp,e.layout,e.marginOp,e.shadow,e.animation,e.filtera,e.transform];i=i.filter((function(t){return null!=t}));for(var a=0;a<i.length;a++)s.push({range:i[a].range,log:i[a].op.name,target:i[a].target,op:i[a].op});var l=[];e.borderObj&&l.push("border"),e.background&&l.push("background"),e.mar&&l.push("margin"),e.animation&&l.push("animation"),e.span&&l.push("span"),console.log("ARA IS "),console.log(s),this.chainReact(s,e.id,l)}}},{key:"toColumnAt",value:function(t){var e=this;if(!this.columnAlways){var r=function(){var r=window.matchMedia("(max-width: ".concat(t,")")),n=window.matchMedia("(max-device-width: 415px)");r.matches||n.matches?(e.res.style.flexDirection="column",e.res.style.alignItems="center"):e.res.style.flexDirection="row"};r(),window.addEventListener("resize",r)}}},{key:"flex",value:function(t){return this.arra=Array.from(t.replace(/\s/g,"")),this.areas=Array.from(Array(t.replace(/\s/g,"")).join("")),this.save='"'.concat(t,'"'),this}},{key:"padding",value:function(t){return this.res.style.padding="".concat(t,"px"),this}},{key:"center",value:function(){return this.res.style.marginLeft="auto",this.res.style.marginRight="auto",this}},{key:"items",value:function(t){this.items=t,this.code.push("\n .items([");for(var e=0;e<t.length;e++){var r=t[e];if(null!=r){var n=r.render();void 0!==r.toCode&&this.code.push(r.toCode().flatMap((function(t){return t}))),this.res.appendChild(n)}}return this.code.push("\n ])"),this}},{key:"width",value:function(t){return this.res.style.width=t,this}},{key:"border",value:function(t,e){return this.res.style.border="".concat(e,"px solid ").concat(t),this}},{key:"adjust",value:function(t){var e=this,r=function(){var r=window.matchMedia("(max-device-width: 415px)");if(window.innerWidth<t||r.matches)for(var n=0;n<e.res.children.length;n++)e.res.children[n].style.flex="",e.res.children[n].style.width="100%";else for(n=0;n<e.res.children.length;n++)e.res.children[n].style.flex="".concat(e.arra[n])};return r(),window.addEventListener("resize",r),this}},{key:"render",value:function(t){if(!t)return this.res;document.querySelector("body").style.margin=0,document.querySelector("body").style.padding=0,document.querySelector(t).appendChild(this.res)}}],r&&c(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r}();export{y as FlexGrid};
|
|
2
|
+
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){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,o,s,i,a=[],l=!0,c=!1;try{if(s=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=s.call(r)).done)&&(a.push(n.value),a.length!==e);l=!0);}catch(t){c=!0,o=t}finally{try{if(!l&&null!=r.return&&(i=r.return(),Object(i)!==i))return}finally{if(c)throw o}}return a}}(t,e)||n(t,e)||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 r(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=n(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var o=0,s=function(){};return{s,n:function(){return o>=t.length?{done:!0}:{done:!1,value:t[o++]}},e:function(t){throw t},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(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){l=!0,i=t},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw i}}}}function n(t,e){if(t){if("string"==typeof t)return o(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?o(t,e):void 0}}function o(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,i(n.key),n)}}function i(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+""}var a=function(){return t=function t(){var e,r,n,o=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,n=function(t){if(console.log("LOBJO IS"),console.log(t),t.transform||t.op&&t.op.transform){var e=t.transform;t.transform||(e=t.op.transform),e.duration||(e.duration="3s-ease-in-out"),o.setDefault=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0px";return 0===t.length?e+" ":t};var r=function(){var r="",n="",s="",i="",a="",l="",c="",u="",p="";if(0!==e.values.length){e.values.forEach((function(t){t.startsWith("tx:")&&(r=t.replace("tx:","")),t.startsWith("ty:")&&(n=t.replace("ty:","")),t.startsWith("tz:")?s=t.replace("tz:",""):t.startsWith("scale(")?i=t:t.startsWith("skew(")?a=t:t.startsWith("rotate(")?l=function(t){var e=t.match(/rotate\(([^)]+)\)/);if(!e)return t;var r=e[1].split(",").map((function(t){return t.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],")"):t}(t):t.startsWith("perspective(")?c=t:t.startsWith("matrix(")?u=t:t.startsWith("opacity:")&&(p=t.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(t.op.transform.duration){var h=t.op.transform.duration.replace(/^(\d+)(s)-/,(function(t,e,r){return e/2+r+" "})),d="transform ".concat(h,", opacity ").concat(h);o.res.style.transition=d}else o.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";t.op.transform.static&&(o.res.style.transition=""),(o.blastTarget||o.res).style.transform=f,o.res.style.opacity=p}else alert("OPE")}};e.on?o.res.addEventListener(e.on,(function(){e.delay?setTimeout((function(){r()}),e.delay):r()})):window.addEventListener("load",(function(){e.delay?setTimeout((function(){r()}),e.delay):r()}));var n=function(){var t="";e.values.forEach((function(e){e.startsWith("tx:")?t+="translateX(0) ":e.startsWith("ty:")?t+="translateY(0) ":e.startsWith("tz:")?t+="translateZ(0) ":e.startsWith("scale(")?t+="scale(1) ":e.startsWith("skew(")?t+="skew(0, 0) ":e.startsWith("rotate(")?t+="rotate(0) ":e.startsWith("perspective(")?t+="perspective(0) ":e.startsWith("matrix(")&&(t+="matrix(1, 0, 0, 1, 0, 0) "),o.res.style.opacity="1"})),t&&(o.res.style.transform=t.trim())};if(e.on)o.res.addEventListener("mouseout",(function(){e.keep||n()}));else{var s=1e3*parseFloat(e.duration),i=e.closeAfter?e.closeAfter:0;setTimeout((function(){e.keep||n()}),s/2+i)}e.hardCSS&&(o.res.style.transform=e.hardCSS)}else alert("THIS FIRE WITH GRADIENT (invalid block"),console.log("INVALID BLOCKA"),console.log(t)},(r=i(r="reactOnTransform"))in e?Object.defineProperty(e,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[r]=n,this.state={isExpanded:!1,isMovedUp:!1,isMovedDown:!1}},n=[{key:"isHidden",value:function(t){t&&(this.res.style.display="none")}},{key:"keySet",value:function(t){return this.temporaryVal=1,this.res.style[t.key]=t.value,this}},{key:"onScroll",value:function(t){var e=this;"opacity"===t.value?this.res.style.opacity=t.valMin:"scale"===t.value&&(this.res.style.transform="scale(".concat(t.valMax,")")),window.addEventListener("scroll",(function(){var r=e.smartRange(window.scrollY,{min:t.from,max:t.to},{min:t.valMin,max:t.valMax});"opacity"===t.value?e.res.style.opacity=r:"scale"===t.value&&(e.res.style.transform="scale(".concat(r,")"))}))}},{key:"setAny",value:function(t){this[Object.keys(t)[0]]=[Object.values(t)[0]]}},{key:"setID",value:function(t){this.id=t}},{key:"setPrevText",value:function(t){this.prevText=t}},{key:"getCSS",value:function(){return this.css}},{key:"getPX",value:function(t){return{xs:"0px",sm:"576px",md:"768px",lg:"992px",xl:"1200px",xxl:"1400px",mxxl:"1800px"}[t]||"Invalid breakpoint"}},{key:"respad",value:function(t){var e=this,r=function(){e.pad(t[0].values);for(var r=0;r<t.length;r++){var n=t[r].breakpoint;window.matchMedia("(min-width: ".concat(e.getPX(n))).matches&&e.pad(t[r].values)}};window.addEventListener("resize",r),r()}},{key:"resmar",value:function(t){var e=this,r=function(){e.mar(t[0].values);for(var r=0;r<t.length;r++){var n=t[r].breakpoint;window.matchMedia("(max-width: ".concat(e.getPX(n))).matches&&e.mar(t[r].values)}};window.addEventListener("resize",r),r()}},{key:"resprop",value:function(t){var e=this,r={default:0,xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400};console.log("RES STYLE"),console.log(t),this.prevStyles={};for(var n=0;n<this.res.style.length;n++){var o=this.res.style[n];this.prevStyles[o]=this.res.style[o],console.log("kio")}t.forEach((function(t){void 0!==r[t.breakpoint]?t._value=r[t.breakpoint]:t._value=parseInt(t.breakpoint,10)})),t.sort((function(t,e){return t._value-e._value})),console.log("Sorted breakpoints:",t);var s=function(){for(var r in e.prevStyles)e.res.style[r]=e.prevStyles[r];for(var n=window.innerWidth,o=null,s=0;s<t.length;s++)if(n<=t[s]._value){o=t[s];break}if(o)for(var i in console.log("Applying styles for",o.breakpoint),o)"breakpoint"!==i&&"_value"!==i&&(e.res.style[i]=o[i])};window.addEventListener("resize",s),s()}},{key:"isNumber",value:function(t){return"number"==typeof t&&!isNaN(t)}},{key:"pad",value:function(t){for(var e=0;e<t.length;e++)for(var r=Object.keys(t[e]),n=0;n<r.length;n++)for(var o=r[n],s=t[e][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(t){return this.res.style.alignSelf=t,this}},{key:"mar",value:function(t){for(var e=0;e<t.length;e++)for(var r=Object.keys(t[e]),n=0;n<r.length;n++)for(var o=r[n],s=t[e][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(t,e,r){t<e.min&&(t=e.min),t>e.max&&(t=e.max);var n=(t-e.min)/(e.max-e.min);e.min>e.max&&(n=(t-e.max)/(e.min-e.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(t){return this.res.style.gridColumn=t.col,this.res.style.gridRow=t.row,this}},{key:"fluidCopy",value:function(t){if(t instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var e=document.createTextNode(this.text);return this.res.appendChild(e),this.res.style.fontSize=t.exact,this}if("S1"===t){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"===t){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"===t){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"===t){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"===t){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"===t&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}},{key:"setIndex",value:function(t){this.index=t}},{key:"borderObj",value:function(t){var e,r=null!==(e=t.type)&&void 0!==e?e:"solid";return this.res.style.border="".concat(t.width," ").concat(r," ").concat(t.color),this.res.style.borderRadius=t.radius,this}},{key:"setPref",value:function(t){this.preffersId=t}},{key:"setClass",value:function(t){this.class=t}},{key:"setTags",value:function(t){this.openTag=t.open,this.closeTag=t.close,console.log("TAGS SET"),console.log(t)}},{key:"chainReact",value:function(t,n,o){var s=this;console.log("0P"),this.ap=!1,this.cta=0,this.once=!1;var i,a=r(t);try{for(a.s();!(i=a.n()).done;){var l=i.value;l.range||(l.range=["0px","999999px"])}}catch(t){a.e(t)}finally{a.f()}t.sort((function(t,e){return parseInt(t.range[0])-parseInt(e.range[0])}));var c=function(i){var a=window.visualViewport.width,l=[],c=[];s.resCopy=s.res,s.storedQueries=t.map((function(t){return t.target})).filter((function(t){return null!=t}));var u,p=r(t);try{for(p.s();!(u=p.n()).done;){var f=u.value;s.counterIndex++;var h=e(f.range,2),d=h[0],y=h[1],m=parseInt(d),v=parseInt(y),g=!0;if(f.target){g=!1;for(var x=0;x<f.target.length;x++)f.target[x]===n&&(g=!0)}a>=m&&a<=v&&g&&(l.push(f.log),c.push(f),f.op&&f.op.margin&&(s.useMargin=f.op.margin))}}catch(t){p.e(t)}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 b,w=c.filter((function(t){return"blast"===t.log}))[0].op.color,k=null!==(b=c.filter((function(t){return"blast"===t.log}))[0].op.width)&&void 0!==b?b:"1px";"FlexRowLayoutElement"===s.getType()||"LayoutWrapperElement"===s.getType()?(s.res.style.border="".concat("number"==typeof k?k+"px":k," 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.textContent=s.text),s.res.style["-webkit-text-fill-color"]="transparent",s.res.style["-webkit-text-stroke-color"]=w,s.res.style["-webkit-text-stroke-width"]="".concat(k))}if(l.includes("filter")){var S=c.filter((function(t){return"filter"===t.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"))if("FlexRowLayoutElement"===s.getType()||"LayoutWrapperElement"===s.getType()){for(var T=[],E=0,O=0;O<s.options.shadow.op.steps;O++){var W;E+=3,T.push("".concat(E,"px ").concat(E,"px ").concat(E,"px ").concat(null!==(W=s.options.shadow.op.colors[O])&&void 0!==W?W:"gray"))}s.res.style.boxShadow=T.join(", ")}else{for(var C=[],j=0,L=0;L<s.options.shadow.op.steps;L++){var A;j+=3,C.push("drop-shadow(".concat(j,"px ").concat(j,"px ").concat(j,"px ").concat(null!==(A=s.options.shadow.op.colors[L])&&void 0!==A?A:"gray",")"))}s.res.style.filter=C.join(" ")}if(l.includes("margin"))for(x=0;x<t.length;x++)if(t[x].op){var R=t[x].op.offsets;R&&void 0!==s.index&&(s.res.style.margin=R[Number(s.index)]+"px")}if(l.includes("spana")||l.includes("span")){if(s.res=s.resCopy,s.options.span){var I;for(I=Array.isArray(s.options.span)?s.options.span.filter((function(t){return"span"===t.op.name}))[0]:s.options.span,s.res.textContent="",x=0;x<I.op.parts.length;x++){var P=I.op.parts[x].style,N=new s.constructor(I.op.parts[x].text).setup({type:"span"}).set(P).render();s.res.appendChild(N)}}}else{var z=new s.constructor(s.prevText).set({}).render();s.prevText&&s.prevText.length>0&&i&&s.res.appendChild(z)}if(l.includes("animation")){if(s.options.animation&&!s.hasAnimated&&!s.options.animation.op.fireAt){console.warn(s.openTag),s.hasAnimated=!0;var M=s.options.animation.op;window.addEventListener("sidebar:open",(function(){s.res.animate(M.keyframesOpen,M.openOptions)})),window.addEventListener("sidebar:closed",(function(){s.res.animate(M.keyframesClose,M.closeOptions)})),s.res.animate(M.keyframesClose,{duration:0,fill:"forwards"}),s.openTag&&s.closeTag&&(window.addEventListener(s.openTag,(function(){s.res.animate(M.keyframesOpen,M.openOptions)})),window.addEventListener(s.closeTag,(function(){s.res.animate(M.keyframesClose,M.closeOptions)})))}if(s.options.animation&&s.options.animation.op.fireAt&&s.options.animation.op.fireAt.endsWith("px")){var _=s.options.animation.op;s.res.animate(_.keyframesClose,{duration:0,fill:"forwards"});var D=function(){window.scrollY>parseFloat(_.fireAt)&&(s.res.animate(_.keyframesOpen,_.openOptions),window.removeEventListener("scroll",D))};window.addEventListener("scroll",D)}if(s.options.animation&&s.options.animation.op.fireAt&&"inview"===s.options.animation.op.fireAt){var F=s.options.animation.op;s.res.animate(F.keyframesClose,{duration:0,fill:"forwards"}),new IntersectionObserver((function(t,e){t.forEach((function(t){t.isIntersecting&&(s.res.animate(F.keyframesOpen,F.openOptions),e.disconnect())}))})).observe(s.res)}}};this.options.animation||window.addEventListener("resize",(function(){return c()})),c()}},{key:"maxWidth",value:function(t){return this.res.style.maxWidth=t,this}},{key:"removeQuotesFromFirstWord",value:function(t){return t.replace(/"([^"]+)":/g,"$1:")}},{key:"arrayMargin",value:function(t,e){return t.includes("left")&&(this.res.style.marginLeft=e),t.includes("right")&&(this.res.style.marginRight=e),t.includes("top")&&(this.res.style.marginTop=e),t.includes("bottom")&&(this.res.style.marginBottom=e),t.includes("all")&&(this.res.style.margin=e),e||(this.res.style.marginBottom=t),this}}],n&&s(t.prototype,n),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,n}();function l(t){return l="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},l(t)}function c(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function u(t){var e=function(t){if("object"!=l(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==l(e)?e:e+""}function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(p=function(){return!!t})()}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},f.apply(null,arguments)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function d(t,e){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},d(t,e)}var y=function(){function t(){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(t,e,r){return e=h(e),function(t,e){if(e&&("object"==l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,p()?Reflect.construct(e,r||[],h(t).constructor):e.apply(t,r))}(this,t)).code=[],e.setup(),e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}(t,a),e=t,r=[{key:"toCode",value:function(){return this.code}},{key:"setup",value:function(){this.code.push("new FlexGrid()"),this.code.push(".setup()");var t=document.createElement("div");return t.style.display="flex",t.style.padding=0,t.style.margin=0,this.res=t,this}},{key:"getType",value:function(){return"FlexRowLayoutElement"}},{key:"set",value:function(t){this.code.push(".set({"),t.gap&&this.code.push("gap: ".concat(t.gap)),t.gap&&(this.res.style.gap=t.gap),t.width&&this.code.push('width: "'.concat(t.width,'",')),t.flex&&(this.res.style.flex=t.flex),t.flex&&this.code.push("flex: ".concat(t.flex,",")),t.maxWidth&&(this.res.style.maxWidth=t.maxWidth),t.maxWidth&&this.code.push('maxWidth: "'.concat(t.maxWidth,'",')),t.maxWidth&&(this.res.style.minWidth="400px"),t.maxWidth&&(this.res.style.marginLeft="auto"),t.maxWidth&&(this.res.style.marginRight="auto"),t.width&&(this.res.style.width="".concat(t.width)),t.wrap&&(this.res.style.flexWrap="wrap"),t.wrap&&this.code.push("wrap: ".concat(t.wrap,",")),t.align&&(this.res.style.justifyContent=t.align),t.align&&this.code.push("align: ".concat(t.align,",")),t.colat&&this.toColumnAt(t.colat),t.colat&&this.code.push('\n colat: "'.concat(t.colat,'",')),this.code.push("}),");var e=t;return this.callReact(e),this}},{key:"callReact",value:function(e){this.options=e;var r,n,o,s=[];if(e.stroke||e.gradient||e.span||e.backgroundOp||e.layout||e.shadow||e.animation||e.filtera||e.transform){e.gradient&&(this.globalGradient=e.gradient.op.gradient,"radial"===e.gradient.op.direction&&(this.globalGradient="radial-gradient(orange, green)")),e.stroke&&(r=t,n=this,"function"==typeof(o=f(h(1&3?r.prototype:r),"setAny",n))?function(t){return o.apply(n,t)}:o)([{globalBlast:"".concat(e.stroke.op.width," ").concat(e.stroke.op.color)}]),e.span&&(e.span.prevText=this.text);var i=[e.stroke,e.gradient,e.animation,e.span,e.backgroundOp,e.layout,e.marginOp,e.shadow,e.animation,e.filtera,e.transform];i=i.filter((function(t){return null!=t}));for(var a=0;a<i.length;a++)s.push({range:i[a].range,log:i[a].op.name,target:i[a].target,op:i[a].op});var l=[];e.borderObj&&l.push("border"),e.background&&l.push("background"),e.mar&&l.push("margin"),e.animation&&l.push("animation"),e.span&&l.push("span"),console.log("ARA IS "),console.log(s),this.chainReact(s,e.id,l)}}},{key:"toColumnAt",value:function(t){var e=this;if(!this.columnAlways){var r=function(){var r=window.matchMedia("(max-width: ".concat(t,")")),n=window.matchMedia("(max-device-width: 415px)");r.matches||n.matches?(e.res.style.flexDirection="column",e.res.style.alignItems="center"):e.res.style.flexDirection="row"};r(),window.addEventListener("resize",r)}}},{key:"flex",value:function(t){return this.arra=Array.from(t.replace(/\s/g,"")),this.areas=Array.from(Array(t.replace(/\s/g,"")).join("")),this.save='"'.concat(t,'"'),this}},{key:"padding",value:function(t){return this.res.style.padding="".concat(t,"px"),this}},{key:"center",value:function(){return this.res.style.marginLeft="auto",this.res.style.marginRight="auto",this}},{key:"items",value:function(t){this.items=t,this.code.push("\n .items([");for(var e=0;e<t.length;e++){var r=t[e];if(null!=r){var n=r.render();void 0!==r.toCode&&this.code.push(r.toCode().flatMap((function(t){return t}))),this.res.appendChild(n)}}return this.code.push("\n ])"),this}},{key:"width",value:function(t){return this.res.style.width=t,this}},{key:"border",value:function(t,e){return this.res.style.border="".concat(e,"px solid ").concat(t),this}},{key:"adjust",value:function(t){var e=this,r=function(){var r=window.matchMedia("(max-device-width: 415px)");if(window.innerWidth<t||r.matches)for(var n=0;n<e.res.children.length;n++)e.res.children[n].style.flex="",e.res.children[n].style.width="100%";else for(n=0;n<e.res.children.length;n++)e.res.children[n].style.flex="".concat(e.arra[n])};return r(),window.addEventListener("resize",r),this}},{key:"render",value:function(t){if(!t)return this.res;document.querySelector("body").style.margin=0,document.querySelector("body").style.padding=0,document.querySelector(t).appendChild(this.res)}}],r&&c(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r}();export{y as FlexGrid};
|