nodality 1.0.0-beta.99 → 1.0.0
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/KeyframeAnimation.cjs.js.LICENSE.txt +1 -1
- package/dist/KeyframeAnimation.esm.js.LICENSE.txt +1 -1
- package/dist/animator.cjs.js.LICENSE.txt +1 -1
- package/dist/animator.esm.js.LICENSE.txt +1 -1
- package/dist/audionew.cjs.js.LICENSE.txt +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.LICENSE.txt +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.LICENSE.txt +1 -1
- package/dist/checkbox.esm.js.LICENSE.txt +1 -1
- package/dist/circle.cjs.js.LICENSE.txt +1 -1
- package/dist/circle.esm.js.LICENSE.txt +1 -1
- package/dist/code.cjs.js.LICENSE.txt +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.LICENSE.txt +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.LICENSE.txt +1 -1
- package/dist/flexCard.esm.js.LICENSE.txt +1 -1
- package/dist/flexGrid.cjs.js.LICENSE.txt +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.LICENSE.txt +1 -1
- package/dist/floatingInput.esm.js.LICENSE.txt +1 -1
- package/dist/free.cjs.js.LICENSE.txt +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.LICENSE.txt +1 -1
- package/dist/image.esm.js.LICENSE.txt +1 -1
- package/dist/imagePicker.cjs.js.LICENSE.txt +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.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.LICENSE.txt +1 -1
- package/dist/picker.esm.js.LICENSE.txt +1 -1
- package/dist/polygon.cjs.js.LICENSE.txt +1 -1
- package/dist/polygon.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.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.LICENSE.txt +1 -1
- package/dist/sideNavBar.esm.js.LICENSE.txt +1 -1
- package/dist/simpleBar.cjs.js.LICENSE.txt +1 -1
- package/dist/simpleBar.esm.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.LICENSE.txt +1 -1
- package/dist/text.esm.js.LICENSE.txt +1 -1
- package/dist/textField.cjs.js.LICENSE.txt +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/wrap.cjs.js.LICENSE.txt +1 -1
- package/dist/wrap.esm.js.LICENSE.txt +1 -1
- package/dist/zoomCard.cjs.js.LICENSE.txt +1 -1
- package/dist/zoomCard.esm.js.LICENSE.txt +1 -1
- package/layout/DEPRECATED-PARAGRAPH.js +1 -1
- package/layout/animator.js +8 -2
- 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 +6 -4
- package/layout/betaMobileBar.js +2 -2
- 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 +4 -1
- package/layout/custom.js +1 -1
- package/layout/divImage.js +1 -1
- package/layout/dropdown.js +1 -1
- package/layout/dropdown2025.js +2 -2
- 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 +5 -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 +45 -3
- 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 +2 -2
- 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 +6 -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 +72 -12
- package/lib/elementMapper.js +29 -27
- package/lib/linkGetter.js +1 -1
- package/lib/scrollvideo.js +1 -1
- package/package.json +20 -6
package/dist/table.cjs.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see table.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,s,a,i=[],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)&&(i.push(n.value),i.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return i}}(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 a,i=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(l)throw a}}}}function s(e,t){if(e){if("string"==typeof e)return a(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)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function l(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function u(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return f(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)?f(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,i=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){i=!0,s=e},f:function(){try{a||null==r.return||r.return()}finally{if(i)throw s}}}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function y(e,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 h(){return h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=v(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}},h.apply(null,arguments)}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}e.r(t),e.d(t,{Table:()=>g});var g=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=v(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||[],v(e).constructor):t.apply(e,r))}(this,t)).res=document.createElement("table"),e.res.style.borderCollapse="separate",e.res.style.borderSpacing="0",e.res.style.overflow="hidden",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&&m(e,t)}(t,e),r=t,n=[{key:"add",value:function(e){this.data=e,this.datas=e;var t=Object.keys(e[0]);return this.generateTable(this.res,e),this.generateTableHead(this.res,t),this}},{key:"style",value:function(e){return e.font&&(this.res.style.fontFamily=e.font),this}},{key:"getType",value:function(){return"LayoutWrapperElement"}},{key:"set",value:function(e){return e.cellPadding&&this.cellPadding(e.cellPadding),e.cellAlign&&this.cellAlign(e.cellAlign),e.style&&this.style(e.style),e.headStyle&&this.headStyle(e.headStyle),e.border&&this.border(e.border),e.center&&this.center(e.center),e.borderRadius&&this.borderRadius(e.borderRadius),e.gradient&&(this.res.style.background=e.gradient.op.gradient,this.res.style.backgroundClip="padding-box"),this.obj=e,this.options=e,this.callReact(e),this}},{key:"callReact",value:function(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),e.stroke&&(r=t,n=this,"function"==typeof(o=h(v(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 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(e){return null!=e}));for(var i=0;i<a.length;i++)s.push({range:a[i].range,log:a[i].op.name,target:a[i].target,op:a[i].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"),l.push("border"),console.log("ARA IS ",s),this.chainReact(s,this.options.id,l)}}},{key:"toCode",value:function(){var e=JSON.stringify(this.data,null,2),t=JSON.stringify(this.obj,null,2);return e=e.replace(/"(\w+)"\s*:/g,"$1:"),t=t.replace(/"(\w+)"\s*:/g,"$1:"),["new Table()\n .add(".concat(e,")\n .set(").concat(t,")")]}},{key:"borderRadius",value:function(e){return this.res.style.borderRadius="".concat(4*e,"px"),this.res.style.overflow="hidden",this}},{key:"center",value:function(){return this.res.style.marginLeft="auto",this.res.style.marginRight="auto",this}},{key:"cellPadding",value:function(e){var t,r=u(this.res.rows);try{for(r.s();!(t=r.n()).done;){var n,o=u(t.value.cells);try{for(o.s();!(n=o.n()).done;)n.value.style.padding=e}catch(e){o.e(e)}finally{o.f()}}}catch(e){r.e(e)}finally{r.f()}return this}},{key:"cellAlign",value:function(e){var t,r=u(this.res.rows);try{for(r.s();!(t=r.n()).done;){var n,o=u(t.value.cells);try{for(o.s();!(n=o.n()).done;)n.value.style.textAlign=e}catch(e){o.e(e)}finally{o.f()}}}catch(e){r.e(e)}finally{r.f()}return this}},{key:"headStyle",value:function(e){var t=this.res.rows[0];return t&&(t.style.color=e.color,e.background&&(t.style.backgroundColor=e.background)),this}},{key:"border",value:function(e){var t;this.res.style.borderCollapse="separate",this.res.style.borderSpacing="0",this.res.style.border=e,this.res.style.borderRadius="12px";var r,n=u(this.res.rows);try{for(n.s();!(r=n.n()).done;){var o,s=u(r.value.cells);try{for(s.s();!(o=s.n()).done;)o.value.style.border="none"}catch(e){s.e(e)}finally{s.f()}}}catch(e){n.e(e)}finally{n.f()}for(var a=0;a<this.res.rows.length-1;a++){var i,l=u(this.res.rows[a].cells);try{for(l.s();!(i=l.n()).done;)i.value.style.borderBottom=e}catch(e){l.e(e)}finally{l.f()}}var c,f=(null===(t=this.res.rows[0])||void 0===t?void 0:t.cells.length)||0,y=u(this.res.rows);try{for(y.s();!(c=y.n()).done;)for(var p=c.value,d=0;d<f-1;d++)p.cells[d].style.borderRight=e}catch(e){y.e(e)}finally{y.f()}return this}},{key:"generateTableHead",value:function(e,t){var r,n=e.createTHead().insertRow(),o=u(t);try{for(o.s();!(r=o.n()).done;){var s=r.value,a=document.createElement("th");a.textContent=s,n.appendChild(a)}}catch(e){o.e(e)}finally{o.f()}}},{key:"generateTable",value:function(e,t){var r,n=u(t);try{for(n.s();!(r=n.n()).done;){var o=r.value,s=e.insertRow();for(var a in o)s.insertCell().textContent=o[a]}}catch(e){n.e(e)}finally{n.f()}}},{key:"render",value:function(e){var t=document.createElement("div");if(t.style.overflowX="auto",t.appendChild(this.res),!e)return t;document.querySelector(e).appendChild(t)}}],n&&y(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="",a="",i="",l="",c="",u="",f="";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(")?a=e:e.startsWith("skew(")?i=e:e.startsWith("rotate(")?l=function(e){var t=e.match(/rotate\(([^)]+)\)/);if(!t)return e;var r=t[1].split(",").map((function(e){return e.trim()}));return 1===r.length?"rotate(".concat(r[0],")"):2===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],")"):3===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],") rotate(").concat(r[2],")"):e}(e):e.startsWith("perspective(")?c=e:e.startsWith("matrix(")?u=e:e.startsWith("opacity:")&&(f=e.replace("opacity:",""))})),r=o.setDefault(r),n=o.setDefault(n),s=o.setDefault(s);var y="";if("0px"!=n&&"0px"!=r&&"0px"!=s?y+="translate3d(".concat(r,", ").concat(n,", ").concat(s,")"):"0px"==n&&"0px"==r||(y+="translate(".concat(r,", ").concat(n,")")),a&&(y+=" ".concat(a)),l&&(y+=" ".concat(l)),i&&(y+=" ".concat(i)),c&&(y+=" ".concat(c)),u&&(y+=" ".concat(u)),y){if(e.op.transform.duration){var p=e.op.transform.duration.replace(/^(\d+)(s)-/,(function(e,t,r){return t/2+r+" "})),d="transform ".concat(p,", opacity ").concat(p);o.res.style.transition=d}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=y,o.res.style.opacity=f}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),a=t.closeAfter?t.closeAfter:0;setTimeout((function(){t.keep||n()}),s/2+a)}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:"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;console.log("RES STYLE"),console.log(e),this.prevStyles={};for(var r=0;r<this.res.style.length;r++){var n=this.res.style[r];this.prevStyles[n]=this.res.style[n],console.log("kio")}var o=function(){for(var r in t.prevStyles)t.res.style[r]=t.prevStyles[r];console.log("mkio");for(var n=0;n<e.length;n++){var o=e[n].breakpoint,s="(max-width: ".concat(o,")");if(console.log("testing media query:",s,window.matchMedia(s).matches),window.matchMedia(s).matches)for(var a in e[n])"breakpoint"!==a&&(console.log("ukio"),t.res.style[a]=e[n][a])}};window.addEventListener("resize",o),o()}},{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],a=0;a<o.length;a++)switch(o[a]){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],a=0;a<o.length;a++){switch(o[a]){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[a]&&(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 a=document.createTextNode(this.text);this.res.appendChild(a),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===e&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}},{key:"setIndex",value:function(e){this.index=e}},{key:"borderObj",value:function(e){var t,r=null!==(t=e.type)&&void 0!==t?t:"solid";return this.res.style.border="".concat(e.width," ").concat(r," ").concat(e.color),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 a,i=o(e);try{for(i.s();!(a=i.n()).done;){var l=a.value;l.range||(l.range=["0px","999999px"])}}catch(e){i.e(e)}finally{i.f()}e.sort((function(e,t){return parseInt(e.range[0])-parseInt(t.range[0])}));var c=function(a){var i=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,f=o(e);try{for(f.s();!(u=f.n()).done;){var y=u.value;s.counterIndex++;var p=n(y.range,2),d=p[0],h=p[1],v=parseInt(d),m=parseInt(h),g=!0;if(y.target){g=!1;for(var b=0;b<y.target.length;b++)y.target[b]===t&&(g=!0)}i>=v&&i<=m&&g&&(l.push(y.log),c.push(y),y.op&&y.op.margin&&(s.useMargin=y.op.margin))}}catch(e){f.e(e)}finally{f.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")){var T,O="",E=0;for(b=0;b<s.options.shadow.op.steps;b++){var C;O+="drop-shadow(".concat(E+=3,"px ").concat(E,"px ").concat(E,"px ").concat(null!==(C=s.options.shadow.color)&&void 0!==C?C:"gray",") ")}"FlexRowLayoutElement"===s.getType()||"LayoutWrapperElement"===s.getType()?s.res.style.boxShadow="".concat(E,"px ").concat(E,"px ").concat(E,"px ").concat(null!==(T=s.options.shadow.color)&&void 0!==T?T:"gray"):s.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!==s.index&&(s.res.style.margin=j[Number(s.index)]+"px")}if(l.includes("spana")||l.includes("span")){if(s.res=s.resCopy,s.options.span){var A;for(A=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<A.op.parts.length;b++){var R=A.op.parts[b].style,L=new s.constructor(A.op.parts[b].text).setup({type:"span"}).set(R).render();s.res.appendChild(L)}}}else{var P=new s.constructor(s.prevText).set({}).render();s.prevText&&s.prevText.length>0&&a&&s.res.appendChild(P)}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 W=s.options.animation.op;s.res.animate(W.keyframesClose,{duration:0,fill:"forwards"});var N=function(){window.scrollY>parseFloat(W.fireAt)&&(s.res.animate(W.keyframesOpen,W.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 M=s.options.animation.op;s.res.animate(M.keyframesClose,{duration:0,fill:"forwards"}),new IntersectionObserver((function(e,t){e.forEach((function(e){e.isIntersecting&&(s.res.animate(M.keyframesOpen,M.openOptions),t.disconnect())}))})).observe(s.res)}}};this.options.animation||window.addEventListener("resize",(function(){return c()})),c()}},{key:"maxWidth",value:function(e){return this.res.style.maxWidth=e,this}},{key:"removeQuotesFromFirstWord",value:function(e){return e.replace(/"([^"]+)":/g,"$1:")}},{key:"arrayMargin",value:function(e,t){return e.includes("left")&&(this.res.style.marginLeft=t),e.includes("right")&&(this.res.style.marginRight=t),e.includes("top")&&(this.res.style.marginTop=t),e.includes("bottom")&&(this.res.style.marginBottom=t),e.includes("all")&&(this.res.style.margin=t),t||(this.res.style.marginBottom=e),this}}],t&&i(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}());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,a,s,i=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(i.push(n.value),i.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 i}}(e,t)||a(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function o(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=a(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,i=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){l=!0,s=e},f:function(){try{i||null==r.return||r.return()}finally{if(l)throw s}}}}function a(e,t){if(e){if("string"==typeof e)return s(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?s(e,t):void 0}}function s(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function i(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,l(n.key),n)}}function l(e){var t=function(e){if("object"!=r(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var n=t.call(e,"string");if("object"!=r(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==r(t)?t:t+""}function c(e){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},c(e)}function u(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return f(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)?f(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,i=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){i=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(i)throw a}}}}function f(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function y(e,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 h(){return h="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(e,t,r){var n=function(e,t){for(;!{}.hasOwnProperty.call(e,t)&&null!==(e=v(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}},h.apply(null,arguments)}function v(e){return v=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},v(e)}function m(e,t){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},m(e,t)}e.r(t),e.d(t,{Table:()=>g});var g=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=v(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||[],v(e).constructor):t.apply(e,r))}(this,t)).res=document.createElement("table"),e.res.style.borderCollapse="separate",e.res.style.borderSpacing="0",e.res.style.overflow="hidden",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&&m(e,t)}(t,e),r=t,n=[{key:"add",value:function(e){this.data=e,this.datas=e;var t=Object.keys(e[0]);return this.generateTable(this.res,e),this.generateTableHead(this.res,t),this}},{key:"style",value:function(e){return e.font&&(this.res.style.fontFamily=e.font),this}},{key:"getType",value:function(){return"LayoutWrapperElement"}},{key:"set",value:function(e){return e.cellPadding&&this.cellPadding(e.cellPadding),e.cellAlign&&this.cellAlign(e.cellAlign),e.style&&this.style(e.style),e.headStyle&&this.headStyle(e.headStyle),e.border&&this.border(e.border),e.center&&this.center(e.center),e.borderRadius&&this.borderRadius(e.borderRadius),e.gradient&&(this.res.style.background=e.gradient.op.gradient,this.res.style.backgroundClip="padding-box"),this.obj=e,this.options=e,this.callReact(e),this}},{key:"callReact",value:function(e){var r,n,o,a=[];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(o=h(v(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 i=0;i<s.length;i++)a.push({range:s[i].range,log:s[i].op.name,target:s[i].target,op:s[i].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"),l.push("border"),console.log("ARA IS ",a),this.chainReact(a,this.options.id,l)}}},{key:"toCode",value:function(){var e=JSON.stringify(this.data,null,2),t=JSON.stringify(this.obj,null,2);return e=e.replace(/"(\w+)"\s*:/g,"$1:"),t=t.replace(/"(\w+)"\s*:/g,"$1:"),["new Table()\n .add(".concat(e,")\n .set(").concat(t,")")]}},{key:"borderRadius",value:function(e){return this.res.style.borderRadius="".concat(4*e,"px"),this.res.style.overflow="hidden",this}},{key:"center",value:function(){return this.res.style.marginLeft="auto",this.res.style.marginRight="auto",this}},{key:"cellPadding",value:function(e){var t,r=u(this.res.rows);try{for(r.s();!(t=r.n()).done;){var n,o=u(t.value.cells);try{for(o.s();!(n=o.n()).done;)n.value.style.padding=e}catch(e){o.e(e)}finally{o.f()}}}catch(e){r.e(e)}finally{r.f()}return this}},{key:"cellAlign",value:function(e){var t,r=u(this.res.rows);try{for(r.s();!(t=r.n()).done;){var n,o=u(t.value.cells);try{for(o.s();!(n=o.n()).done;)n.value.style.textAlign=e}catch(e){o.e(e)}finally{o.f()}}}catch(e){r.e(e)}finally{r.f()}return this}},{key:"headStyle",value:function(e){var t=this.res.rows[0];return t&&(t.style.color=e.color,e.background&&(t.style.backgroundColor=e.background)),this}},{key:"border",value:function(e){var t;this.res.style.borderCollapse="separate",this.res.style.borderSpacing="0",this.res.style.border=e,this.res.style.borderRadius="12px";var r,n=u(this.res.rows);try{for(n.s();!(r=n.n()).done;){var o,a=u(r.value.cells);try{for(a.s();!(o=a.n()).done;)o.value.style.border="none"}catch(e){a.e(e)}finally{a.f()}}}catch(e){n.e(e)}finally{n.f()}for(var s=0;s<this.res.rows.length-1;s++){var i,l=u(this.res.rows[s].cells);try{for(l.s();!(i=l.n()).done;)i.value.style.borderBottom=e}catch(e){l.e(e)}finally{l.f()}}var c,f=(null===(t=this.res.rows[0])||void 0===t?void 0:t.cells.length)||0,y=u(this.res.rows);try{for(y.s();!(c=y.n()).done;)for(var p=c.value,d=0;d<f-1;d++)p.cells[d].style.borderRight=e}catch(e){y.e(e)}finally{y.f()}return this}},{key:"generateTableHead",value:function(e,t){var r,n=e.createTHead().insertRow(),o=u(t);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=document.createElement("th");s.textContent=a,n.appendChild(s)}}catch(e){o.e(e)}finally{o.f()}}},{key:"generateTable",value:function(e,t){var r,n=u(t);try{for(n.s();!(r=n.n()).done;){var o=r.value,a=e.insertRow();for(var s in o)a.insertCell().textContent=o[s]}}catch(e){n.e(e)}finally{n.f()}}},{key:"render",value:function(e){var t=document.createElement("div");if(t.style.overflowX="auto",t.appendChild(this.res),!e)return t;document.querySelector(e).appendChild(t)}}],n&&y(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="",a="",s="",i="",l="",c="",u="",f="";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:")?a=e.replace("tz:",""):e.startsWith("scale(")?s=e:e.startsWith("skew(")?i=e:e.startsWith("rotate(")?l=function(e){var t=e.match(/rotate\(([^)]+)\)/);if(!t)return e;var r=t[1].split(",").map((function(e){return e.trim()}));return 1===r.length?"rotate(".concat(r[0],")"):2===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],")"):3===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],") rotate(").concat(r[2],")"):e}(e):e.startsWith("perspective(")?c=e:e.startsWith("matrix(")?u=e:e.startsWith("opacity:")&&(f=e.replace("opacity:",""))})),r=o.setDefault(r),n=o.setDefault(n),a=o.setDefault(a);var y="";if("0px"!=n&&"0px"!=r&&"0px"!=a?y+="translate3d(".concat(r,", ").concat(n,", ").concat(a,")"):"0px"==n&&"0px"==r||(y+="translate(".concat(r,", ").concat(n,")")),s&&(y+=" ".concat(s)),l&&(y+=" ".concat(l)),i&&(y+=" ".concat(i)),c&&(y+=" ".concat(c)),u&&(y+=" ".concat(u)),y){if(e.op.transform.duration){var p=e.op.transform.duration.replace(/^(\d+)(s)-/,(function(e,t,r){return t/2+r+" "})),d="transform ".concat(p,", opacity ").concat(p);o.res.style.transition=d}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=y,o.res.style.opacity=f}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 a=1e3*parseFloat(t.duration),s=t.closeAfter?t.closeAfter:0;setTimeout((function(){t.keep||n()}),a/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:"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;console.log("RES STYLE"),console.log(e),this.prevStyles={};for(var r=0;r<this.res.style.length;r++){var n=this.res.style[r];this.prevStyles[n]=this.res.style[n],console.log("kio")}var o=function(){for(var r in t.prevStyles)t.res.style[r]=t.prevStyles[r];console.log("mkio");for(var n=0;n<e.length;n++){var o=e[n].breakpoint,a="(max-width: ".concat(o,")");if(console.log("testing media query:",a,window.matchMedia(a).matches),window.matchMedia(a).matches)for(var s in e[n])"breakpoint"!==s&&(console.log("ukio"),t.res.style[s]=e[n][s])}};window.addEventListener("resize",o),o()}},{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],a=e[t][o],s=0;s<o.length;s++)switch(o[s]){case"a":this.res.style.padding=this.isNumber(a)?"".concat(a,"px"):a;break;case"t":this.res.style.paddingTop=this.isNumber(a)?"".concat(a,"px"):a;break;case"l":this.res.style.paddingLeft=this.isNumber(a)?"".concat(a,"px"):a;break;case"r":this.res.style.paddingRight=this.isNumber(a)?"".concat(a,"px"):a;break;case"b":this.res.style.paddingBottom=this.isNumber(a)?"".concat(a,"px"):a}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],a=e[t][o],s=0;s<o.length;s++){switch(o[s]){case"a":this.res.style.margin=this.isNumber(a)?"".concat(a,"px"):a;break;case"t":this.res.style.marginTop=this.isNumber(a)?"".concat(a,"px"):a;break;case"l":this.res.style.marginLeft=this.isNumber(a)?"".concat(a,"px"):a;break;case"r":this.res.style.marginRight=this.isNumber(a)?"".concat(a,"px"):a;break;case"b":this.res.style.marginBottom=this.isNumber(a)?"".concat(a,"px"):a}"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 a=(r.max+Math.abs(r.min))*n;o=r.min+a}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 a=document.createTextNode(this.text);this.res.appendChild(a),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 a=this;console.log("0P"),this.ap=!1,this.cta=0,this.once=!1;var s,i=o(e);try{for(i.s();!(s=i.n()).done;){var l=s.value;l.range||(l.range=["0px","999999px"])}}catch(e){i.e(e)}finally{i.f()}e.sort((function(e,t){return parseInt(e.range[0])-parseInt(t.range[0])}));var c=function(s){var i=window.visualViewport.width,l=[],c=[];a.resCopy=a.res,a.storedQueries=e.map((function(e){return e.target})).filter((function(e){return null!=e}));var u,f=o(e);try{for(f.s();!(u=f.n()).done;){var y=u.value;a.counterIndex++;var p=n(y.range,2),d=p[0],h=p[1],v=parseInt(d),m=parseInt(h),g=!0;if(y.target){g=!1;for(var b=0;b<y.target.length;b++)y.target[b]===t&&(g=!0)}i>=v&&i<=m&&g&&(l.push(y.log),c.push(y),y.op&&y.op.margin&&(a.useMargin=y.op.margin))}}catch(e){f.e(e)}finally{f.f()}if(r&&!r.includes("background")&&(a.res.style.background="",a.res.style.backgroundColor=""),a.res.style.textShadow="",r&&!r.includes("border")&&(a.res.style.border=""),r&&!r.includes("margin")&&(a.res.style.margin=""),a.res.style["-webkit-text-fill-color"]="",a.res.style["-webkit-text-stroke-color"]="",a.res.style["-webkit-text-stroke-width"]="",a.res.style.filter="",a.options.background&&(console.log(a.options.background),a.res.style.background=a.options.background),l.includes("gradient"),(l.includes("gradient")||l.includes("shadow"))&&(a.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"===a.getType()||"LayoutWrapperElement"===a.getType()?(a.res.style.border="".concat("number"==typeof k?k+"px":k," solid orange"),a.res.style.display="inline-block","FlexRowLayoutElement"===a.getType()&&(a.res.style.display="flex"),a.res.style.boxSizing="border-box",a.res.style.transformOrigin="center",a.blastTarget=a.res):(a.text&&(a.res.textContent=a.text),a.res.style["-webkit-text-fill-color"]="transparent",a.res.style["-webkit-text-stroke-color"]=w,a.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;a.res.style.filter=S}if(l.includes("background")&&(a.res.style.backgroundColor="green"),l.includes("gradient")&&("LayoutWrapperElement"!==a.getType()&&"FlexRowLayoutElement"!==a.getType()&&(a.res.style["-webkit-text-fill-color"]="transparent"),a.res.style.background=a.globalGradient,"LayoutWrapperElement"!==a.getType()&&"FlexRowLayoutElement"!==a.getType()&&(a.res.style["background-clip"]="text")),l.includes("shadow")){var T,O="",E=0;for(b=0;b<a.options.shadow.op.steps;b++){var C;O+="drop-shadow(".concat(E+=3,"px ").concat(E,"px ").concat(E,"px ").concat(null!==(C=a.options.shadow.color)&&void 0!==C?C:"gray",") ")}"FlexRowLayoutElement"===a.getType()||"LayoutWrapperElement"===a.getType()?a.res.style.boxShadow="".concat(E,"px ").concat(E,"px ").concat(E,"px ").concat(null!==(T=a.options.shadow.color)&&void 0!==T?T:"gray"):a.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!==a.index&&(a.res.style.margin=j[Number(a.index)]+"px")}if(l.includes("spana")||l.includes("span")){if(a.res=a.resCopy,a.options.span){var A;for(A=Array.isArray(a.options.span)?a.options.span.filter((function(e){return"span"===e.op.name}))[0]:a.options.span,a.res.textContent="",b=0;b<A.op.parts.length;b++){var R=A.op.parts[b].style,L=new a.constructor(A.op.parts[b].text).setup({type:"span"}).set(R).render();a.res.appendChild(L)}}}else{var P=new a.constructor(a.prevText).set({}).render();a.prevText&&a.prevText.length>0&&s&&a.res.appendChild(P)}if(l.includes("animation")){if(a.options.animation&&!a.hasAnimated&&!a.options.animation.op.fireAt){console.warn(a.openTag),a.hasAnimated=!0;var I=a.options.animation.op;window.addEventListener("sidebar:open",(function(){a.res.animate(I.keyframesOpen,I.openOptions)})),window.addEventListener("sidebar:closed",(function(){a.res.animate(I.keyframesClose,I.closeOptions)})),a.res.animate(I.keyframesClose,{duration:0,fill:"forwards"}),a.openTag&&a.closeTag&&(window.addEventListener(a.openTag,(function(){a.res.animate(I.keyframesOpen,I.openOptions)})),window.addEventListener(a.closeTag,(function(){a.res.animate(I.keyframesClose,I.closeOptions)})))}if(a.options.animation&&a.options.animation.op.fireAt&&a.options.animation.op.fireAt.endsWith("px")){var W=a.options.animation.op;a.res.animate(W.keyframesClose,{duration:0,fill:"forwards"});var N=function(){window.scrollY>parseFloat(W.fireAt)&&(a.res.animate(W.keyframesOpen,W.openOptions),window.removeEventListener("scroll",N))};window.addEventListener("scroll",N)}if(a.options.animation&&a.options.animation.op.fireAt&&"inview"===a.options.animation.op.fireAt){var M=a.options.animation.op;a.res.animate(M.keyframesClose,{duration:0,fill:"forwards"}),new IntersectionObserver((function(e,t){e.forEach((function(e){e.isIntersecting&&(a.res.animate(M.keyframesOpen,M.openOptions),t.disconnect())}))})).observe(a.res)}}};this.options.animation||window.addEventListener("resize",(function(){return c()})),c()}},{key:"maxWidth",value:function(e){return this.res.style.maxWidth=e,this}},{key:"removeQuotesFromFirstWord",value:function(e){return e.replace(/"([^"]+)":/g,"$1:")}},{key:"arrayMargin",value:function(e,t){return e.includes("left")&&(this.res.style.marginLeft=t),e.includes("right")&&(this.res.style.marginRight=t),e.includes("top")&&(this.res.style.marginTop=t),e.includes("bottom")&&(this.res.style.marginBottom=t),e.includes("all")&&(this.res.style.margin=t),t||(this.res.style.marginBottom=e),this}}],t&&i(e.prototype,t),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,t}());module.exports=t})();
|
package/dist/table.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see table.esm.js.LICENSE.txt */
|
|
2
|
-
function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){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,a,i=[],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)&&(i.push(n.value),i.length!==t);l=!0);}catch(e){c=!0,o=e}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw o}}return i}}(e,t)||n(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 r(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=n(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,s=function(){};return{s,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},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 a,i=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){l=!0,a=e},f:function(){try{i||null==r.return||r.return()}finally{if(l)throw a}}}}function n(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 s(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,a(n.key),n)}}function a(t){var r=function(t){if("object"!=e(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=e(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==e(r)?r:r+""}var i=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="",a="",i="",l="",c="",u="",f="";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(")?a=e:e.startsWith("skew(")?i=e:e.startsWith("rotate(")?l=function(e){var t=e.match(/rotate\(([^)]+)\)/);if(!t)return e;var r=t[1].split(",").map((function(e){return e.trim()}));return 1===r.length?"rotate(".concat(r[0],")"):2===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],")"):3===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],") rotate(").concat(r[2],")"):e}(e):e.startsWith("perspective(")?c=e:e.startsWith("matrix(")?u=e:e.startsWith("opacity:")&&(f=e.replace("opacity:",""))})),r=o.setDefault(r),n=o.setDefault(n),s=o.setDefault(s);var y="";if("0px"!=n&&"0px"!=r&&"0px"!=s?y+="translate3d(".concat(r,", ").concat(n,", ").concat(s,")"):"0px"==n&&"0px"==r||(y+="translate(".concat(r,", ").concat(n,")")),a&&(y+=" ".concat(a)),l&&(y+=" ".concat(l)),i&&(y+=" ".concat(i)),c&&(y+=" ".concat(c)),u&&(y+=" ".concat(u)),y){if(e.op.transform.duration){var p=e.op.transform.duration.replace(/^(\d+)(s)-/,(function(e,t,r){return t/2+r+" "})),d="transform ".concat(p,", opacity ").concat(p);o.res.style.transition=d}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=y,o.res.style.opacity=f}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),a=t.closeAfter?t.closeAfter:0;setTimeout((function(){t.keep||n()}),s/2+a)}t.hardCSS&&(o.res.style.transform=t.hardCSS)}else alert("THIS FIRE WITH GRADIENT (invalid block"),console.log("INVALID BLOCKA"),console.log(e)},(r=a(r="reactOnTransform"))in t?Object.defineProperty(t,r,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[r]=n,this.state={isExpanded:!1,isMovedUp:!1,isMovedDown:!1}},n=[{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;console.log("RES STYLE"),console.log(e),this.prevStyles={};for(var r=0;r<this.res.style.length;r++){var n=this.res.style[r];this.prevStyles[n]=this.res.style[n],console.log("kio")}var o=function(){for(var r in t.prevStyles)t.res.style[r]=t.prevStyles[r];console.log("mkio");for(var n=0;n<e.length;n++){var o=e[n].breakpoint,s="(max-width: ".concat(o,")");if(console.log("testing media query:",s,window.matchMedia(s).matches),window.matchMedia(s).matches)for(var a in e[n])"breakpoint"!==a&&(console.log("ukio"),t.res.style[a]=e[n][a])}};window.addEventListener("resize",o),o()}},{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],a=0;a<o.length;a++)switch(o[a]){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],a=0;a<o.length;a++){switch(o[a]){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[a]&&(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 a=document.createTextNode(this.text);this.res.appendChild(a),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===e&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}},{key:"setIndex",value:function(e){this.index=e}},{key:"borderObj",value:function(e){var t,r=null!==(t=e.type)&&void 0!==t?t:"solid";return this.res.style.border="".concat(e.width," ").concat(r," ").concat(e.color),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,n,o){var s=this;console.log("0P"),this.ap=!1,this.cta=0,this.once=!1;var a,i=r(e);try{for(i.s();!(a=i.n()).done;){var l=a.value;l.range||(l.range=["0px","999999px"])}}catch(e){i.e(e)}finally{i.f()}e.sort((function(e,t){return parseInt(e.range[0])-parseInt(t.range[0])}));var c=function(a){var i=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,f=r(e);try{for(f.s();!(u=f.n()).done;){var y=u.value;s.counterIndex++;var p=t(y.range,2),d=p[0],h=p[1],v=parseInt(d),m=parseInt(h),g=!0;if(y.target){g=!1;for(var b=0;b<y.target.length;b++)y.target[b]===n&&(g=!0)}i>=v&&i<=m&&g&&(l.push(y.log),c.push(y),y.op&&y.op.margin&&(s.useMargin=y.op.margin))}}catch(e){f.e(e)}finally{f.f()}if(o&&!o.includes("background")&&(s.res.style.background="",s.res.style.backgroundColor=""),s.res.style.textShadow="",o&&!o.includes("border")&&(s.res.style.border=""),o&&!o.includes("margin")&&(s.res.style.margin=""),s.res.style["-webkit-text-fill-color"]="",s.res.style["-webkit-text-stroke-color"]="",s.res.style["-webkit-text-stroke-width"]="",s.res.style.filter="",s.options.background&&(console.log(s.options.background),s.res.style.background=s.options.background),l.includes("gradient"),(l.includes("gradient")||l.includes("shadow"))&&(s.res.style.position="relative"),l.includes("blast")){var x,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")){var T,O="",E=0;for(b=0;b<s.options.shadow.op.steps;b++){var C;O+="drop-shadow(".concat(E+=3,"px ").concat(E,"px ").concat(E,"px ").concat(null!==(C=s.options.shadow.color)&&void 0!==C?C:"gray",") ")}"FlexRowLayoutElement"===s.getType()||"LayoutWrapperElement"===s.getType()?s.res.style.boxShadow="".concat(E,"px ").concat(E,"px ").concat(E,"px ").concat(null!==(T=s.options.shadow.color)&&void 0!==T?T:"gray"):s.res.style.filter=O}if(l.includes("margin"))for(b=0;b<e.length;b++)if(e[b].op){var A=e[b].op.offsets;A&&void 0!==s.index&&(s.res.style.margin=A[Number(s.index)]+"px")}if(l.includes("spana")||l.includes("span")){if(s.res=s.resCopy,s.options.span){var R;for(R=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<R.op.parts.length;b++){var j=R.op.parts[b].style,L=new s.constructor(R.op.parts[b].text).setup({type:"span"}).set(j).render();s.res.appendChild(L)}}}else{var P=new s.constructor(s.prevText).set({}).render();s.prevText&&s.prevText.length>0&&a&&s.res.appendChild(P)}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 W=s.options.animation.op;s.res.animate(W.keyframesClose,{duration:0,fill:"forwards"});var N=function(){window.scrollY>parseFloat(W.fireAt)&&(s.res.animate(W.keyframesOpen,W.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 M=s.options.animation.op;s.res.animate(M.keyframesClose,{duration:0,fill:"forwards"}),new IntersectionObserver((function(e,t){e.forEach((function(e){e.isIntersecting&&(s.res.animate(M.keyframesOpen,M.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}}],n&&s(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function l(e){return l="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},l(e)}function c(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return u(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)?u(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,i=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){i=!0,s=e},f:function(){try{a||null==r.return||r.return()}finally{if(i)throw s}}}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,y(n.key),n)}}function y(e){var t=function(e){if("object"!=l(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==l(t)?t:t+""}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=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 v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}var m=function(){function e(){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(e,t,r){return t=h(t),function(e,t){if(t&&("object"==l(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,p()?Reflect.construct(t,r||[],h(e).constructor):t.apply(e,r))}(this,e)).res=document.createElement("table"),t.res.style.borderCollapse="separate",t.res.style.borderSpacing="0",t.res.style.overflow="hidden",t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(e,i),t=e,r=[{key:"add",value:function(e){this.data=e,this.datas=e;var t=Object.keys(e[0]);return this.generateTable(this.res,e),this.generateTableHead(this.res,t),this}},{key:"style",value:function(e){return e.font&&(this.res.style.fontFamily=e.font),this}},{key:"getType",value:function(){return"LayoutWrapperElement"}},{key:"set",value:function(e){return e.cellPadding&&this.cellPadding(e.cellPadding),e.cellAlign&&this.cellAlign(e.cellAlign),e.style&&this.style(e.style),e.headStyle&&this.headStyle(e.headStyle),e.border&&this.border(e.border),e.center&&this.center(e.center),e.borderRadius&&this.borderRadius(e.borderRadius),e.gradient&&(this.res.style.background=e.gradient.op.gradient,this.res.style.backgroundClip="padding-box"),this.obj=e,this.options=e,this.callReact(e),this}},{key:"callReact",value:function(t){var r,n,o,s=[];if(t.stroke||t.gradient||t.span||t.backgroundOp||t.layout||t.shadow||t.animation||t.filtera||t.transform){t.gradient&&(this.globalGradient=t.gradient.op.gradient),t.stroke&&(r=e,n=this,"function"==typeof(o=d(h(1&3?r.prototype:r),"setAny",n))?function(e){return o.apply(n,e)}:o)([{globalBlast:"".concat(t.stroke.op.width," ").concat(t.stroke.op.color)}]),t.span&&(t.span.prevText=this.text);var a=[t.stroke,t.gradient,t.animation,t.span,t.backgroundOp,t.layout,t.marginOp,t.shadow,t.animation,t.filtera,t.transform];a=a.filter((function(e){return null!=e}));for(var i=0;i<a.length;i++)s.push({range:a[i].range,log:a[i].op.name,target:a[i].target,op:a[i].op});var l=[];t.borderObj&&l.push("border"),t.background&&l.push("background"),t.mar&&l.push("margin"),t.animation&&l.push("animation"),t.span&&l.push("span"),l.push("border"),console.log("ARA IS ",s),this.chainReact(s,this.options.id,l)}}},{key:"toCode",value:function(){var e=JSON.stringify(this.data,null,2),t=JSON.stringify(this.obj,null,2);return e=e.replace(/"(\w+)"\s*:/g,"$1:"),t=t.replace(/"(\w+)"\s*:/g,"$1:"),["new Table()\n .add(".concat(e,")\n .set(").concat(t,")")]}},{key:"borderRadius",value:function(e){return this.res.style.borderRadius="".concat(4*e,"px"),this.res.style.overflow="hidden",this}},{key:"center",value:function(){return this.res.style.marginLeft="auto",this.res.style.marginRight="auto",this}},{key:"cellPadding",value:function(e){var t,r=c(this.res.rows);try{for(r.s();!(t=r.n()).done;){var n,o=c(t.value.cells);try{for(o.s();!(n=o.n()).done;)n.value.style.padding=e}catch(e){o.e(e)}finally{o.f()}}}catch(e){r.e(e)}finally{r.f()}return this}},{key:"cellAlign",value:function(e){var t,r=c(this.res.rows);try{for(r.s();!(t=r.n()).done;){var n,o=c(t.value.cells);try{for(o.s();!(n=o.n()).done;)n.value.style.textAlign=e}catch(e){o.e(e)}finally{o.f()}}}catch(e){r.e(e)}finally{r.f()}return this}},{key:"headStyle",value:function(e){var t=this.res.rows[0];return t&&(t.style.color=e.color,e.background&&(t.style.backgroundColor=e.background)),this}},{key:"border",value:function(e){var t;this.res.style.borderCollapse="separate",this.res.style.borderSpacing="0",this.res.style.border=e,this.res.style.borderRadius="12px";var r,n=c(this.res.rows);try{for(n.s();!(r=n.n()).done;){var o,s=c(r.value.cells);try{for(s.s();!(o=s.n()).done;)o.value.style.border="none"}catch(e){s.e(e)}finally{s.f()}}}catch(e){n.e(e)}finally{n.f()}for(var a=0;a<this.res.rows.length-1;a++){var i,l=c(this.res.rows[a].cells);try{for(l.s();!(i=l.n()).done;)i.value.style.borderBottom=e}catch(e){l.e(e)}finally{l.f()}}var u,f=(null===(t=this.res.rows[0])||void 0===t?void 0:t.cells.length)||0,y=c(this.res.rows);try{for(y.s();!(u=y.n()).done;)for(var p=u.value,d=0;d<f-1;d++)p.cells[d].style.borderRight=e}catch(e){y.e(e)}finally{y.f()}return this}},{key:"generateTableHead",value:function(e,t){var r,n=e.createTHead().insertRow(),o=c(t);try{for(o.s();!(r=o.n()).done;){var s=r.value,a=document.createElement("th");a.textContent=s,n.appendChild(a)}}catch(e){o.e(e)}finally{o.f()}}},{key:"generateTable",value:function(e,t){var r,n=c(t);try{for(n.s();!(r=n.n()).done;){var o=r.value,s=e.insertRow();for(var a in o)s.insertCell().textContent=o[a]}}catch(e){n.e(e)}finally{n.f()}}},{key:"render",value:function(e){var t=document.createElement("div");if(t.style.overflowX="auto",t.appendChild(this.res),!e)return t;document.querySelector(e).appendChild(t)}}],r&&f(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r}();export{m as Table};
|
|
2
|
+
function e(t){return e="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},e(t)}function t(e,t){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,a,s,i=[],l=!0,c=!1;try{if(a=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=a.call(r)).done)&&(i.push(n.value),i.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 i}}(e,t)||n(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 r(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=n(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var o=0,a=function(){};return{s:a,n:function(){return o>=e.length?{done:!0}:{done:!1,value:e[o++]}},e:function(e){throw e},f:a}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,i=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return i=e.done,e},e:function(e){l=!0,s=e},f:function(){try{i||null==r.return||r.return()}finally{if(l)throw s}}}}function n(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,s(n.key),n)}}function s(t){var r=function(t){if("object"!=e(t)||!t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var n=r.call(t,"string");if("object"!=e(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==e(r)?r:r+""}var i=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="",a="",s="",i="",l="",c="",u="",f="";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:")?a=e.replace("tz:",""):e.startsWith("scale(")?s=e:e.startsWith("skew(")?i=e:e.startsWith("rotate(")?l=function(e){var t=e.match(/rotate\(([^)]+)\)/);if(!t)return e;var r=t[1].split(",").map((function(e){return e.trim()}));return 1===r.length?"rotate(".concat(r[0],")"):2===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],")"):3===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],") rotate(").concat(r[2],")"):e}(e):e.startsWith("perspective(")?c=e:e.startsWith("matrix(")?u=e:e.startsWith("opacity:")&&(f=e.replace("opacity:",""))})),r=o.setDefault(r),n=o.setDefault(n),a=o.setDefault(a);var y="";if("0px"!=n&&"0px"!=r&&"0px"!=a?y+="translate3d(".concat(r,", ").concat(n,", ").concat(a,")"):"0px"==n&&"0px"==r||(y+="translate(".concat(r,", ").concat(n,")")),s&&(y+=" ".concat(s)),l&&(y+=" ".concat(l)),i&&(y+=" ".concat(i)),c&&(y+=" ".concat(c)),u&&(y+=" ".concat(u)),y){if(e.op.transform.duration){var p=e.op.transform.duration.replace(/^(\d+)(s)-/,(function(e,t,r){return t/2+r+" "})),d="transform ".concat(p,", opacity ").concat(p);o.res.style.transition=d}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=y,o.res.style.opacity=f}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 a=1e3*parseFloat(t.duration),s=t.closeAfter?t.closeAfter:0;setTimeout((function(){t.keep||n()}),a/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=s(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}},n=[{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;console.log("RES STYLE"),console.log(e),this.prevStyles={};for(var r=0;r<this.res.style.length;r++){var n=this.res.style[r];this.prevStyles[n]=this.res.style[n],console.log("kio")}var o=function(){for(var r in t.prevStyles)t.res.style[r]=t.prevStyles[r];console.log("mkio");for(var n=0;n<e.length;n++){var o=e[n].breakpoint,a="(max-width: ".concat(o,")");if(console.log("testing media query:",a,window.matchMedia(a).matches),window.matchMedia(a).matches)for(var s in e[n])"breakpoint"!==s&&(console.log("ukio"),t.res.style[s]=e[n][s])}};window.addEventListener("resize",o),o()}},{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],a=e[t][o],s=0;s<o.length;s++)switch(o[s]){case"a":this.res.style.padding=this.isNumber(a)?"".concat(a,"px"):a;break;case"t":this.res.style.paddingTop=this.isNumber(a)?"".concat(a,"px"):a;break;case"l":this.res.style.paddingLeft=this.isNumber(a)?"".concat(a,"px"):a;break;case"r":this.res.style.paddingRight=this.isNumber(a)?"".concat(a,"px"):a;break;case"b":this.res.style.paddingBottom=this.isNumber(a)?"".concat(a,"px"):a}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],a=e[t][o],s=0;s<o.length;s++){switch(o[s]){case"a":this.res.style.margin=this.isNumber(a)?"".concat(a,"px"):a;break;case"t":this.res.style.marginTop=this.isNumber(a)?"".concat(a,"px"):a;break;case"l":this.res.style.marginLeft=this.isNumber(a)?"".concat(a,"px"):a;break;case"r":this.res.style.marginRight=this.isNumber(a)?"".concat(a,"px"):a;break;case"b":this.res.style.marginBottom=this.isNumber(a)?"".concat(a,"px"):a}"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 a=(r.max+Math.abs(r.min))*n;o=r.min+a}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 a=document.createTextNode(this.text);this.res.appendChild(a),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,n,o){var a=this;console.log("0P"),this.ap=!1,this.cta=0,this.once=!1;var s,i=r(e);try{for(i.s();!(s=i.n()).done;){var l=s.value;l.range||(l.range=["0px","999999px"])}}catch(e){i.e(e)}finally{i.f()}e.sort((function(e,t){return parseInt(e.range[0])-parseInt(t.range[0])}));var c=function(s){var i=window.visualViewport.width,l=[],c=[];a.resCopy=a.res,a.storedQueries=e.map((function(e){return e.target})).filter((function(e){return null!=e}));var u,f=r(e);try{for(f.s();!(u=f.n()).done;){var y=u.value;a.counterIndex++;var p=t(y.range,2),d=p[0],h=p[1],v=parseInt(d),m=parseInt(h),g=!0;if(y.target){g=!1;for(var b=0;b<y.target.length;b++)y.target[b]===n&&(g=!0)}i>=v&&i<=m&&g&&(l.push(y.log),c.push(y),y.op&&y.op.margin&&(a.useMargin=y.op.margin))}}catch(e){f.e(e)}finally{f.f()}if(o&&!o.includes("background")&&(a.res.style.background="",a.res.style.backgroundColor=""),a.res.style.textShadow="",o&&!o.includes("border")&&(a.res.style.border=""),o&&!o.includes("margin")&&(a.res.style.margin=""),a.res.style["-webkit-text-fill-color"]="",a.res.style["-webkit-text-stroke-color"]="",a.res.style["-webkit-text-stroke-width"]="",a.res.style.filter="",a.options.background&&(console.log(a.options.background),a.res.style.background=a.options.background),l.includes("gradient"),(l.includes("gradient")||l.includes("shadow"))&&(a.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"===a.getType()||"LayoutWrapperElement"===a.getType()?(a.res.style.border="".concat("number"==typeof k?k+"px":k," solid orange"),a.res.style.display="inline-block","FlexRowLayoutElement"===a.getType()&&(a.res.style.display="flex"),a.res.style.boxSizing="border-box",a.res.style.transformOrigin="center",a.blastTarget=a.res):(a.text&&(a.res.textContent=a.text),a.res.style["-webkit-text-fill-color"]="transparent",a.res.style["-webkit-text-stroke-color"]=w,a.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;a.res.style.filter=S}if(l.includes("background")&&(a.res.style.backgroundColor="green"),l.includes("gradient")&&("LayoutWrapperElement"!==a.getType()&&"FlexRowLayoutElement"!==a.getType()&&(a.res.style["-webkit-text-fill-color"]="transparent"),a.res.style.background=a.globalGradient,"LayoutWrapperElement"!==a.getType()&&"FlexRowLayoutElement"!==a.getType()&&(a.res.style["background-clip"]="text")),l.includes("shadow")){var T,O="",E=0;for(b=0;b<a.options.shadow.op.steps;b++){var C;O+="drop-shadow(".concat(E+=3,"px ").concat(E,"px ").concat(E,"px ").concat(null!==(C=a.options.shadow.color)&&void 0!==C?C:"gray",") ")}"FlexRowLayoutElement"===a.getType()||"LayoutWrapperElement"===a.getType()?a.res.style.boxShadow="".concat(E,"px ").concat(E,"px ").concat(E,"px ").concat(null!==(T=a.options.shadow.color)&&void 0!==T?T:"gray"):a.res.style.filter=O}if(l.includes("margin"))for(b=0;b<e.length;b++)if(e[b].op){var A=e[b].op.offsets;A&&void 0!==a.index&&(a.res.style.margin=A[Number(a.index)]+"px")}if(l.includes("spana")||l.includes("span")){if(a.res=a.resCopy,a.options.span){var R;for(R=Array.isArray(a.options.span)?a.options.span.filter((function(e){return"span"===e.op.name}))[0]:a.options.span,a.res.textContent="",b=0;b<R.op.parts.length;b++){var j=R.op.parts[b].style,L=new a.constructor(R.op.parts[b].text).setup({type:"span"}).set(j).render();a.res.appendChild(L)}}}else{var P=new a.constructor(a.prevText).set({}).render();a.prevText&&a.prevText.length>0&&s&&a.res.appendChild(P)}if(l.includes("animation")){if(a.options.animation&&!a.hasAnimated&&!a.options.animation.op.fireAt){console.warn(a.openTag),a.hasAnimated=!0;var I=a.options.animation.op;window.addEventListener("sidebar:open",(function(){a.res.animate(I.keyframesOpen,I.openOptions)})),window.addEventListener("sidebar:closed",(function(){a.res.animate(I.keyframesClose,I.closeOptions)})),a.res.animate(I.keyframesClose,{duration:0,fill:"forwards"}),a.openTag&&a.closeTag&&(window.addEventListener(a.openTag,(function(){a.res.animate(I.keyframesOpen,I.openOptions)})),window.addEventListener(a.closeTag,(function(){a.res.animate(I.keyframesClose,I.closeOptions)})))}if(a.options.animation&&a.options.animation.op.fireAt&&a.options.animation.op.fireAt.endsWith("px")){var W=a.options.animation.op;a.res.animate(W.keyframesClose,{duration:0,fill:"forwards"});var N=function(){window.scrollY>parseFloat(W.fireAt)&&(a.res.animate(W.keyframesOpen,W.openOptions),window.removeEventListener("scroll",N))};window.addEventListener("scroll",N)}if(a.options.animation&&a.options.animation.op.fireAt&&"inview"===a.options.animation.op.fireAt){var M=a.options.animation.op;a.res.animate(M.keyframesClose,{duration:0,fill:"forwards"}),new IntersectionObserver((function(e,t){e.forEach((function(e){e.isIntersecting&&(a.res.animate(M.keyframesOpen,M.openOptions),t.disconnect())}))})).observe(a.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}}],n&&a(e.prototype,n),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,n}();function l(e){return l="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},l(e)}function c(e,t){var r="undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(!r){if(Array.isArray(e)||(r=function(e,t){if(e){if("string"==typeof e)return u(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)?u(e,t):void 0}}(e))||t&&e&&"number"==typeof e.length){r&&(e=r);var n=0,o=function(){};return{s:o,n:function(){return n>=e.length?{done:!0}:{done:!1,value:e[n++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,s=!0,i=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return s=e.done,e},e:function(e){i=!0,a=e},f:function(){try{s||null==r.return||r.return()}finally{if(i)throw a}}}}function u(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function f(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,y(n.key),n)}}function y(e){var t=function(e){if("object"!=l(e)||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==l(t)?t:t+""}function p(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(p=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 v(e,t){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},v(e,t)}var m=function(){function e(){var t;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(e,t,r){return t=h(t),function(e,t){if(t&&("object"==l(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,p()?Reflect.construct(t,r||[],h(e).constructor):t.apply(e,r))}(this,e)).res=document.createElement("table"),t.res.style.borderCollapse="separate",t.res.style.borderSpacing="0",t.res.style.overflow="hidden",t}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),Object.defineProperty(e,"prototype",{writable:!1}),t&&v(e,t)}(e,i),t=e,r=[{key:"add",value:function(e){this.data=e,this.datas=e;var t=Object.keys(e[0]);return this.generateTable(this.res,e),this.generateTableHead(this.res,t),this}},{key:"style",value:function(e){return e.font&&(this.res.style.fontFamily=e.font),this}},{key:"getType",value:function(){return"LayoutWrapperElement"}},{key:"set",value:function(e){return e.cellPadding&&this.cellPadding(e.cellPadding),e.cellAlign&&this.cellAlign(e.cellAlign),e.style&&this.style(e.style),e.headStyle&&this.headStyle(e.headStyle),e.border&&this.border(e.border),e.center&&this.center(e.center),e.borderRadius&&this.borderRadius(e.borderRadius),e.gradient&&(this.res.style.background=e.gradient.op.gradient,this.res.style.backgroundClip="padding-box"),this.obj=e,this.options=e,this.callReact(e),this}},{key:"callReact",value:function(t){var r,n,o,a=[];if(t.stroke||t.gradient||t.span||t.backgroundOp||t.layout||t.shadow||t.animation||t.filtera||t.transform){t.gradient&&(this.globalGradient=t.gradient.op.gradient,"radial"===t.gradient.op.direction&&(this.globalGradient="radial-gradient(circle at center, orange, green)")),t.stroke&&(r=e,n=this,"function"==typeof(o=d(h(1&3?r.prototype:r),"setAny",n))?function(e){return o.apply(n,e)}:o)([{globalBlast:"".concat(t.stroke.op.width," ").concat(t.stroke.op.color)}]),t.span&&(t.span.prevText=this.text);var s=[t.stroke,t.gradient,t.animation,t.span,t.backgroundOp,t.layout,t.marginOp,t.shadow,t.animation,t.filtera,t.transform];s=s.filter((function(e){return null!=e}));for(var i=0;i<s.length;i++)a.push({range:s[i].range,log:s[i].op.name,target:s[i].target,op:s[i].op});var l=[];t.borderObj&&l.push("border"),t.background&&l.push("background"),t.mar&&l.push("margin"),t.animation&&l.push("animation"),t.span&&l.push("span"),l.push("border"),console.log("ARA IS ",a),this.chainReact(a,this.options.id,l)}}},{key:"toCode",value:function(){var e=JSON.stringify(this.data,null,2),t=JSON.stringify(this.obj,null,2);return e=e.replace(/"(\w+)"\s*:/g,"$1:"),t=t.replace(/"(\w+)"\s*:/g,"$1:"),["new Table()\n .add(".concat(e,")\n .set(").concat(t,")")]}},{key:"borderRadius",value:function(e){return this.res.style.borderRadius="".concat(4*e,"px"),this.res.style.overflow="hidden",this}},{key:"center",value:function(){return this.res.style.marginLeft="auto",this.res.style.marginRight="auto",this}},{key:"cellPadding",value:function(e){var t,r=c(this.res.rows);try{for(r.s();!(t=r.n()).done;){var n,o=c(t.value.cells);try{for(o.s();!(n=o.n()).done;)n.value.style.padding=e}catch(e){o.e(e)}finally{o.f()}}}catch(e){r.e(e)}finally{r.f()}return this}},{key:"cellAlign",value:function(e){var t,r=c(this.res.rows);try{for(r.s();!(t=r.n()).done;){var n,o=c(t.value.cells);try{for(o.s();!(n=o.n()).done;)n.value.style.textAlign=e}catch(e){o.e(e)}finally{o.f()}}}catch(e){r.e(e)}finally{r.f()}return this}},{key:"headStyle",value:function(e){var t=this.res.rows[0];return t&&(t.style.color=e.color,e.background&&(t.style.backgroundColor=e.background)),this}},{key:"border",value:function(e){var t;this.res.style.borderCollapse="separate",this.res.style.borderSpacing="0",this.res.style.border=e,this.res.style.borderRadius="12px";var r,n=c(this.res.rows);try{for(n.s();!(r=n.n()).done;){var o,a=c(r.value.cells);try{for(a.s();!(o=a.n()).done;)o.value.style.border="none"}catch(e){a.e(e)}finally{a.f()}}}catch(e){n.e(e)}finally{n.f()}for(var s=0;s<this.res.rows.length-1;s++){var i,l=c(this.res.rows[s].cells);try{for(l.s();!(i=l.n()).done;)i.value.style.borderBottom=e}catch(e){l.e(e)}finally{l.f()}}var u,f=(null===(t=this.res.rows[0])||void 0===t?void 0:t.cells.length)||0,y=c(this.res.rows);try{for(y.s();!(u=y.n()).done;)for(var p=u.value,d=0;d<f-1;d++)p.cells[d].style.borderRight=e}catch(e){y.e(e)}finally{y.f()}return this}},{key:"generateTableHead",value:function(e,t){var r,n=e.createTHead().insertRow(),o=c(t);try{for(o.s();!(r=o.n()).done;){var a=r.value,s=document.createElement("th");s.textContent=a,n.appendChild(s)}}catch(e){o.e(e)}finally{o.f()}}},{key:"generateTable",value:function(e,t){var r,n=c(t);try{for(n.s();!(r=n.n()).done;){var o=r.value,a=e.insertRow();for(var s in o)a.insertCell().textContent=o[s]}}catch(e){n.e(e)}finally{n.f()}}},{key:"render",value:function(e){var t=document.createElement("div");if(t.style.overflowX="auto",t.appendChild(this.res),!e)return t;document.querySelector(e).appendChild(t)}}],r&&f(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r}();export{m as Table};
|
package/layout/animator.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* nodality v1.0.0
|
|
2
|
+
* nodality v1.0.0
|
|
3
3
|
* (c) 2025 Filip Vabrousek
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -1474,6 +1474,7 @@ window.addEventListener(this.openTag, () => {
|
|
|
1474
1474
|
|
|
1475
1475
|
window.addEventListener('resize', () => checkQueries());
|
|
1476
1476
|
}
|
|
1477
|
+
|
|
1477
1478
|
checkQueries();
|
|
1478
1479
|
}
|
|
1479
1480
|
|
|
@@ -1592,13 +1593,18 @@ console.log(obj); // Why obj.op.transform not working for link
|
|
|
1592
1593
|
if (matrix) transformValue += ` ${matrix}`;
|
|
1593
1594
|
|
|
1594
1595
|
if (transformValue) {
|
|
1595
|
-
// alert("/")
|
|
1596
|
+
// alert("/")
|
|
1596
1597
|
|
|
1597
1598
|
if (obj.op.transform.duration){ // transform 3s in and out takes 8 secs instead of 6....
|
|
1598
1599
|
let newStr = obj.op.transform.duration.replace(/^(\d+)(s)-/, (_, n, s) => n / 2 + s + " ");
|
|
1600
|
+
//alert(newStr);
|
|
1601
|
+
|
|
1602
|
+
//newStr = "6s";
|
|
1599
1603
|
let trans = `transform ${newStr}, opacity ${newStr}`; // Reset transition
|
|
1600
1604
|
this.res.style.transition = trans;
|
|
1605
|
+
|
|
1601
1606
|
} else {
|
|
1607
|
+
|
|
1602
1608
|
this.res.style.transition = "transform 3s ease-in-out, opacity 3s ease-in-out"; // Reset transition
|
|
1603
1609
|
}
|
|
1604
1610
|
|
package/layout/audio.js
CHANGED
package/layout/audionew.js
CHANGED
package/layout/base-2.js
CHANGED
package/layout/base.js
CHANGED
package/layout/betaDesktopBar.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* nodality v1.0.0
|
|
2
|
+
* nodality v1.0.0
|
|
3
3
|
* (c) 2025 Filip Vabrousek
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -20,6 +20,7 @@ class /*Beta*/DesktopBar extends Animator { // add set method for background col
|
|
|
20
20
|
this.navContent = document.createElement('div');
|
|
21
21
|
this.navContent.classList.add('navbar-content');
|
|
22
22
|
this.navContent.style.width = "100%";
|
|
23
|
+
this.navContent.style.alignItems = "center";
|
|
23
24
|
|
|
24
25
|
this.navbarHeader.appendChild(this.brand);
|
|
25
26
|
this.navbarHeader.appendChild(this.navContent);
|
|
@@ -50,16 +51,17 @@ class /*Beta*/DesktopBar extends Animator { // add set method for background col
|
|
|
50
51
|
}
|
|
51
52
|
// {
|
|
52
53
|
// [{"a": 21}]
|
|
53
|
-
this.setStyles();
|
|
54
|
+
this.setStyles(obj);
|
|
54
55
|
return this;
|
|
55
56
|
}
|
|
56
57
|
|
|
57
58
|
setStyles() {
|
|
58
59
|
this.navbar.style.display = 'flex';
|
|
59
60
|
this.navbar.style.flexDirection = 'column';
|
|
61
|
+
|
|
60
62
|
this.navbar.style.padding = '1rem';
|
|
61
|
-
this.navbar.style.backgroundColor = '#333';
|
|
62
|
-
this.navbar.style.color = 'white';
|
|
63
|
+
this.navbar.style.backgroundColor = this.obj.background ?? '#333';
|
|
64
|
+
//this.navbar.style.color = 'white';
|
|
63
65
|
|
|
64
66
|
this.navbarHeader.style.display = 'flex';
|
|
65
67
|
this.navbarHeader.style.alignItems = 'center';
|
package/layout/betaMobileBar.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* nodality v1.0.0
|
|
2
|
+
* nodality v1.0.0
|
|
3
3
|
* (c) 2025 Filip Vabrousek
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -232,7 +232,7 @@ if (obj.brand && typeof newTextInstance.render === "function") {
|
|
|
232
232
|
|
|
233
233
|
this.toggleButton.style.background = 'none';
|
|
234
234
|
this.toggleButton.style.border = 'none';
|
|
235
|
-
this.toggleButton.style.color = this.hamburgerColour ?? '
|
|
235
|
+
this.toggleButton.style.color = this.hamburgerColour ?? '#34495e';
|
|
236
236
|
this.toggleButton.style.fontSize = '1.5rem';
|
|
237
237
|
this.toggleButton.style.cursor = 'pointer';
|
|
238
238
|
|
package/layout/box.js
CHANGED
package/layout/button.js
CHANGED
package/layout/cards.js
CHANGED
package/layout/center.js
CHANGED
package/layout/checkbox.js
CHANGED
package/layout/circle.js
CHANGED
package/layout/cleanRow.js
CHANGED
package/layout/code.js
CHANGED
package/layout/container.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*!
|
|
2
|
-
* nodality v1.0.0
|
|
2
|
+
* nodality v1.0.0
|
|
3
3
|
* (c) 2025 Filip Vabrousek
|
|
4
4
|
* License: MIT
|
|
5
5
|
*/
|
|
@@ -165,6 +165,9 @@ code = `${pad}new Wrapper()`;
|
|
|
165
165
|
if (obj.stroke || obj.gradient || obj.span || obj.backgroundOp || obj.layout || obj.shadow || obj.animation || obj.filtera || obj.transform){
|
|
166
166
|
if (obj.gradient){
|
|
167
167
|
this.globalGradient = obj.gradient.op.gradient;
|
|
168
|
+
if (obj.gradient.op.direction === "radial") {
|
|
169
|
+
this.globalGradient = "radial-gradient(circle at center, orange, green)";
|
|
170
|
+
}
|
|
168
171
|
}
|
|
169
172
|
|
|
170
173
|
|
package/layout/custom.js
CHANGED
package/layout/divImage.js
CHANGED
package/layout/dropdown.js
CHANGED