nodality 1.0.76 → 1.0.78
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/animator.cjs.js +1 -1
- package/dist/animator.cjs.js.LICENSE.txt +1 -1
- package/dist/animator.esm.js +1 -1
- package/dist/animator.esm.js.LICENSE.txt +1 -1
- package/dist/appleanim.cjs.js.LICENSE.txt +1 -1
- package/dist/appleanim.esm.js.LICENSE.txt +1 -1
- package/dist/audionew.cjs.js +1 -1
- package/dist/audionew.cjs.js.LICENSE.txt +1 -1
- package/dist/audionew.esm.js +1 -1
- package/dist/audionew.esm.js.LICENSE.txt +1 -1
- package/dist/base.cjs.js.LICENSE.txt +1 -1
- package/dist/base.esm.js.LICENSE.txt +1 -1
- package/dist/betaDesktopBar.esm.js +1 -1
- package/dist/betaDesktopBar.esm.js.LICENSE.txt +1 -1
- package/dist/betaMobileBar.esm.js +1 -1
- package/dist/betaMobileBar.esm.js.LICENSE.txt +1 -1
- package/dist/bundle.umd.js +1 -1
- package/dist/bundle.umd.js.LICENSE.txt +1 -1
- package/dist/button.cjs.js +1 -1
- package/dist/button.cjs.js.LICENSE.txt +1 -1
- package/dist/button.esm.js +1 -1
- package/dist/button.esm.js.LICENSE.txt +1 -1
- package/dist/cardGetter.cjs.js.LICENSE.txt +1 -1
- package/dist/cardGetter.esm.js.LICENSE.txt +1 -1
- package/dist/center.cjs.js +1 -1
- package/dist/center.cjs.js.LICENSE.txt +1 -1
- package/dist/center.esm.js +1 -1
- package/dist/center.esm.js.LICENSE.txt +1 -1
- package/dist/checkbox.cjs.js +1 -1
- package/dist/checkbox.cjs.js.LICENSE.txt +1 -1
- package/dist/checkbox.esm.js +1 -1
- package/dist/checkbox.esm.js.LICENSE.txt +1 -1
- package/dist/code.cjs.js +1 -1
- package/dist/code.cjs.js.LICENSE.txt +1 -1
- package/dist/code.esm.js +1 -1
- package/dist/code.esm.js.LICENSE.txt +1 -1
- package/dist/container.cjs.js +1 -1
- package/dist/container.cjs.js.LICENSE.txt +1 -1
- package/dist/container.esm.js +1 -1
- package/dist/container.esm.js.LICENSE.txt +1 -1
- package/dist/datalist.cjs.js.LICENSE.txt +1 -1
- package/dist/datalist.esm.js.LICENSE.txt +1 -1
- package/dist/designer.cjs.js +1 -1
- package/dist/designer.cjs.js.LICENSE.txt +1 -1
- package/dist/designer.esm.js +1 -1
- package/dist/designer.esm.js.LICENSE.txt +1 -1
- package/dist/dropdown.cjs.js +1 -1
- package/dist/dropdown.cjs.js.LICENSE.txt +1 -1
- package/dist/dropdown.esm.js +1 -1
- package/dist/dropdown.esm.js.LICENSE.txt +1 -1
- package/dist/elementMapper.cjs.js +1 -1
- package/dist/elementMapper.cjs.js.LICENSE.txt +1 -1
- package/dist/elementMapper.esm.js +1 -1
- package/dist/elementMapper.esm.js.LICENSE.txt +1 -1
- package/dist/finalresult.esm.js +1 -1
- package/dist/finalresult.esm.js.LICENSE.txt +1 -1
- package/dist/flexCard.cjs.js +1 -1
- package/dist/flexCard.cjs.js.LICENSE.txt +1 -1
- package/dist/flexCard.esm.js +1 -1
- package/dist/flexCard.esm.js.LICENSE.txt +1 -1
- package/dist/flexGrid.cjs.js +1 -1
- package/dist/flexGrid.cjs.js.LICENSE.txt +1 -1
- package/dist/flexGrid.esm.js +1 -1
- package/dist/flexGrid.esm.js.LICENSE.txt +1 -1
- package/dist/flexRow.cjs.js +1 -1
- package/dist/flexRow.cjs.js.LICENSE.txt +1 -1
- package/dist/flexRow.esm.js +1 -1
- package/dist/flexRow.esm.js.LICENSE.txt +1 -1
- package/dist/floatingInput.cjs.js +1 -1
- package/dist/floatingInput.cjs.js.LICENSE.txt +1 -1
- package/dist/floatingInput.esm.js +1 -1
- package/dist/floatingInput.esm.js.LICENSE.txt +1 -1
- package/dist/free.cjs.js +1 -1
- package/dist/free.cjs.js.LICENSE.txt +1 -1
- package/dist/free.esm.js +1 -1
- package/dist/free.esm.js.LICENSE.txt +1 -1
- package/dist/horizontalScroller.esm.js.LICENSE.txt +1 -1
- package/dist/image.cjs.js +1 -1
- package/dist/image.cjs.js.LICENSE.txt +1 -1
- package/dist/image.esm.js +1 -1
- package/dist/image.esm.js.LICENSE.txt +1 -1
- package/dist/imagePicker.cjs.js +1 -1
- package/dist/imagePicker.cjs.js.LICENSE.txt +1 -1
- package/dist/imagePicker.esm.js +1 -1
- package/dist/imagePicker.esm.js.LICENSE.txt +1 -1
- package/dist/index.cjs.js +1 -1
- package/dist/index.cjs.js.LICENSE.txt +1 -1
- package/dist/index.esm.js +1 -1
- package/dist/index.esm.js.LICENSE.txt +1 -1
- package/dist/link.cjs.js +1 -1
- package/dist/link.cjs.js.LICENSE.txt +1 -1
- package/dist/link.esm.js +1 -1
- package/dist/link.esm.js.LICENSE.txt +1 -1
- package/dist/linkGetter.cjs.js +1 -1
- package/dist/linkGetter.cjs.js.LICENSE.txt +1 -1
- package/dist/linkGetter.esm.js +1 -1
- package/dist/linkGetter.esm.js.LICENSE.txt +1 -1
- package/dist/metaAdder.cjs.js.LICENSE.txt +1 -1
- package/dist/metaAdder.esm.js.LICENSE.txt +1 -1
- package/dist/modal2025.cjs.js.LICENSE.txt +1 -1
- package/dist/modal2025.esm.js.LICENSE.txt +1 -1
- package/dist/multiswitchers.esm.js +1 -1
- package/dist/multiswitchers.esm.js.LICENSE.txt +1 -1
- package/dist/newNavBar.cjs.js +1 -1
- package/dist/newNavBar.cjs.js.LICENSE.txt +1 -1
- package/dist/newNavBar.esm.js +1 -1
- package/dist/newNavBar.esm.js.LICENSE.txt +1 -1
- package/dist/picker.cjs.js +1 -1
- package/dist/picker.cjs.js.LICENSE.txt +1 -1
- package/dist/picker.esm.js +1 -1
- package/dist/picker.esm.js.LICENSE.txt +1 -1
- package/dist/progress.cjs.js.LICENSE.txt +1 -1
- package/dist/progress.esm.js.LICENSE.txt +1 -1
- package/dist/radio.cjs.js.LICENSE.txt +1 -1
- package/dist/radio.esm.js.LICENSE.txt +1 -1
- package/dist/range.cjs.js.LICENSE.txt +1 -1
- package/dist/range.esm.js.LICENSE.txt +1 -1
- package/dist/scrollvideo.cjs.js +1 -1
- package/dist/scrollvideo.cjs.js.LICENSE.txt +1 -1
- package/dist/scrollvideo.esm.js.LICENSE.txt +1 -1
- package/dist/sideBar.cjs.js.LICENSE.txt +1 -1
- package/dist/sideBar.esm.js.LICENSE.txt +1 -1
- package/dist/sideNavBar.cjs.js +1 -1
- package/dist/sideNavBar.cjs.js.LICENSE.txt +1 -1
- package/dist/sideNavBar.esm.js +1 -1
- package/dist/sideNavBar.esm.js.LICENSE.txt +1 -1
- package/dist/simpleBar.cjs.js +1 -1
- package/dist/simpleBar.cjs.js.LICENSE.txt +1 -1
- package/dist/simpleBar.esm.js +1 -1
- package/dist/simpleBar.esm.js.LICENSE.txt +1 -1
- package/dist/slider2025.cjs.js +1 -1
- package/dist/slider2025.cjs.js.LICENSE.txt +1 -1
- package/dist/slider2025.esm.js +1 -1
- package/dist/slider2025.esm.js.LICENSE.txt +1 -1
- package/dist/spacer.cjs.js.LICENSE.txt +1 -1
- package/dist/stack.cjs.js.LICENSE.txt +1 -1
- package/dist/stack.esm.js.LICENSE.txt +1 -1
- package/dist/stacker.cjs.js.LICENSE.txt +1 -1
- package/dist/stacker.esm.js.LICENSE.txt +1 -1
- package/dist/table.cjs.js +1 -1
- package/dist/table.cjs.js.LICENSE.txt +1 -1
- package/dist/table.esm.js +1 -1
- package/dist/table.esm.js.LICENSE.txt +1 -1
- package/dist/text.cjs.js +1 -1
- package/dist/text.cjs.js.LICENSE.txt +1 -1
- package/dist/text.esm.js +1 -1
- package/dist/text.esm.js.LICENSE.txt +1 -1
- package/dist/textField.cjs.js +1 -1
- package/dist/textField.cjs.js.LICENSE.txt +1 -1
- package/dist/textField.esm.js +1 -1
- package/dist/textField.esm.js.LICENSE.txt +1 -1
- package/dist/transformanim.cjs.js.LICENSE.txt +1 -1
- package/dist/transformanim.esm.js.LICENSE.txt +1 -1
- package/dist/ulist.cjs.js +1 -1
- package/dist/ulist.cjs.js.LICENSE.txt +1 -1
- package/dist/ulist.esm.js +1 -1
- package/dist/ulist.esm.js.LICENSE.txt +1 -1
- package/dist/video.esm.js.LICENSE.txt +1 -1
- package/dist/wrap.cjs.js.LICENSE.txt +1 -1
- package/dist/wrap.esm.js.LICENSE.txt +1 -1
- package/dist/zoomCard.cjs.js +1 -1
- package/dist/zoomCard.cjs.js.LICENSE.txt +1 -1
- package/dist/zoomCard.esm.js +1 -1
- package/dist/zoomCard.esm.js.LICENSE.txt +1 -1
- package/layout/DEPRECATED-PARAGRAPH.js +1 -1
- package/layout/animator.js +114 -108
- package/layout/audio.js +1 -1
- package/layout/audionew.js +1 -1
- package/layout/base-2.js +1 -1
- package/layout/base.js +1 -1
- package/layout/betaDesktopBar.js +1 -1
- package/layout/betaMobileBar.js +1 -1
- package/layout/box.js +1 -1
- package/layout/button.js +1 -1
- package/layout/cards.js +1 -1
- package/layout/center.js +1 -1
- package/layout/checkbox.js +1 -1
- package/layout/circle.js +1 -1
- package/layout/cleanRow.js +1 -1
- package/layout/code.js +1 -1
- package/layout/container.js +1 -1
- package/layout/custom.js +1 -1
- package/layout/divImage.js +1 -1
- package/layout/dropdown.js +1 -1
- package/layout/dropdown2025.js +1 -1
- package/layout/emptyElement.js +1 -1
- package/layout/externalStylesheet.js +1 -1
- package/layout/flexCard.js +1 -1
- package/layout/flexGrid.js +1 -1
- package/layout/flexrow.js +1 -1
- package/layout/footer.js +1 -1
- package/layout/formComponents/custom.js +1 -1
- package/layout/formComponents/dataList.js +1 -1
- package/layout/formComponents/floatingInput.js +1 -1
- package/layout/formComponents/form-all.js +1 -1
- package/layout/formComponents/form.js +1 -1
- package/layout/formComponents/imagePicker.js +1 -1
- package/layout/formComponents/picker.js +1 -1
- package/layout/formComponents/radio.js +1 -1
- package/layout/formComponents/radiogroup.js +1 -1
- package/layout/formComponents/range.js +1 -1
- package/layout/free.js +1 -1
- package/layout/grid-new.js +1 -1
- package/layout/grid.js +1 -1
- package/layout/gridSwitcher.js +1 -1
- package/layout/group.js +1 -1
- package/layout/header.js +1 -1
- package/layout/horizontalScroller.js +1 -1
- package/layout/image-old.js +1 -1
- package/layout/image.js +1 -1
- package/layout/index.js +1 -1
- package/layout/label.js +1 -1
- package/layout/link.js +1 -1
- package/layout/list-OLD.js +1 -1
- package/layout/list.js +1 -1
- package/layout/metaAdder.js +1 -1
- package/layout/modal2025.js +1 -1
- package/layout/modernwrap.js +1 -1
- package/layout/multiswitcher.js +1 -1
- package/layout/multiswitcherBeta.js +1 -1
- package/layout/navBar-OLD.js +1 -1
- package/layout/navBar.js +1 -1
- package/layout/navFactor/customDiv.js +1 -1
- package/layout/newFlatAdder.js +1 -1
- package/layout/newNavBar copy 2.js +1 -1
- package/layout/newNavBar copy.js +1 -1
- package/layout/newNavBar.js +1 -1
- package/layout/offsetContainer.js +1 -1
- package/layout/polygon.js +1 -1
- package/layout/progress.js +1 -1
- package/layout/row.js +1 -1
- package/layout/savedNewNavBar.js +1 -1
- package/layout/scrollvideo.js +1 -1
- package/layout/sideBar.js +1 -1
- package/layout/sideNavBar.js +1 -1
- package/layout/simpleBar.js +1 -1
- package/layout/slider2025.js +1 -1
- package/layout/spacer.js +1 -1
- package/layout/stack.js +1 -1
- package/layout/styler.js +1 -1
- package/layout/switcher.js +1 -1
- package/layout/table.js +1 -1
- package/layout/text.js +3 -1
- package/layout/textField.js +1 -1
- package/layout/ulist.js +1 -1
- package/layout/video.js +1 -1
- package/layout/withoutNew.js +1 -1
- package/layout/wrap.js +1 -1
- package/layout/zoomCard.js +1 -1
- package/lib/AppleAnim.js +1 -1
- package/lib/KeyframeAnimation.js +1 -1
- package/lib/Stacker.js +1 -1
- package/lib/TransformAnim.js +1 -1
- package/lib/cardGetter.js +1 -1
- package/lib/designer.js +1 -1
- package/lib/elementMapper.js +1 -1
- package/lib/linkGetter.js +1 -1
- package/lib/scrollvideo.js +1 -1
- package/package.json +1 -1
package/dist/imagePicker.esm.js
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
/*! For license information please see imagePicker.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,i,o,s,a=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}(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 i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,s=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw s}}}}function n(e,t){if(e){if("string"==typeof e)return i(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function o(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 a=function(){return e=function e(){var t,r,n,i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=this,n=function(e){if(console.log("LOBJO IS"),console.log(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"),i.setDefault=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0px";return 0===e.length?t+" ":e};var r=function(){var r="",n="",o="",s="",a="",l="",c="",u="",d="";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:")?o=e.replace("tz:",""):e.startsWith("scale(")?s=e:e.startsWith("skew(")?a=e:e.startsWith("rotate(")?l=function(e){var t=e.match(/rotate\(([^)]+)\)/);if(!t)return e;var r=t[1].split(",").map((function(e){return e.trim()}));return 1===r.length?"rotate(".concat(r[0],")"):2===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],")"):3===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],") rotate(").concat(r[2],")"):e}(e):e.startsWith("perspective(")?c=e:e.startsWith("matrix(")?u=e:e.startsWith("opacity:")&&(d=e.replace("opacity:",""))})),r=i.setDefault(r),n=i.setDefault(n),o=i.setDefault(o);var p="";if("0px"!=n&&"0px"!=r&&"0px"!=o?p+="translate3d(".concat(r,", ").concat(n,", ").concat(o,")"):"0px"==n&&"0px"==r||(p+="translate(".concat(r,", ").concat(n,")")),s&&(p+=" ".concat(s)),l&&(p+=" ".concat(l)),a&&(p+=" ".concat(a)),c&&(p+=" ".concat(c)),u&&(p+=" ".concat(u)),p){if(e.op.transform.duration){var f=e.op.transform.duration.replace(/^(\d+)(s)-/,(function(e,t,r){return t/2+r+" "})),h="transform ".concat(f,", opacity ").concat(f);i.res.style.transition=h}else i.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";e.op.transform.static&&(i.res.style.transition=""),(i.blastTarget||i.res).style.transform=p,i.res.style.opacity=d}else alert("OPE")}};t.on?i.res.addEventListener(t.on,(function(){t.delay?setTimeout((function(){r()}),t.delay):r()})):window.addEventListener("load",(function(){t.delay?setTimeout((function(){r()}),t.delay):r()}));var n=function(){var e="";t.values.forEach((function(t){t.startsWith("tx:")?e+="translateX(0) ":t.startsWith("ty:")?e+="translateY(0) ":t.startsWith("tz:")?e+="translateZ(0) ":t.startsWith("scale(")?e+="scale(1) ":t.startsWith("skew(")?e+="skew(0, 0) ":t.startsWith("rotate(")?e+="rotate(0) ":t.startsWith("perspective(")?e+="perspective(0) ":t.startsWith("matrix(")&&(e+="matrix(1, 0, 0, 1, 0, 0) "),i.res.style.opacity="1"})),e&&(i.res.style.transform=e.trim())};if(t.on)i.res.addEventListener("mouseout",(function(){t.keep||n()}));else{var o=1e3*parseFloat(t.duration),s=t.closeAfter?t.closeAfter:0;setTimeout((function(){t.keep||n()}),o/2+s)}t.hardCSS&&(i.res.style.transform=t.hardCSS)}else alert("THIS FIRE WITH GRADIENT (invalid block"),console.log("INVALID BLOCKA"),console.log(e)},(r=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:"isHidden",value:function(e){e&&(this.res.style.display="none")}},{key:"keySet",value:function(e){return this.temporaryVal=1,this.res.style[e.key]=e.value,this}},{key:"commonMethods",value:function(e){var t={exact:"fontSize",zIndex:"zIndex",position:"position",top:"top",cursor:"cursor",width:"width",maxWidth:"maxWidth",height:"height",maxHeight:"maxHeight",radius:"borderRadius",lineHeight:"lineHeight",background:"background",font:"fontFamily",opacity:"opacity"};for(var r in t)null!=e[r]&&(this.res.style[t[r]]=e[r]);return e.pad&&this.pad(e.pad),e.mar&&this.mar(e.mar),e.respad&&this.respad(e.respad),e.resmar&&this.resmar(e.resmar),e.hover&&this.hover(e.hover),e.size&&this.fluidCopy(e.size),e.resprop&&this.resprop(e.resprop),e.keySet&&this.keySet(e.keySet),e.hide&&this.isHidden(e.hide),e.bold?this.res.style.fontWeight="bold":null!=e.weight&&(this.res.style.fontWeight=e.weight),this}},{key:"hover",value:function(e){var t=this;if(e.border){var r=e.border.width;this.res.style.border=r?"".concat(r,"px solid transparent"):"1px solid transparent"}var n=this.options.borderObj;return n&&(this.res.style.border="".concat(n.width,"px solid ").concat(n.color)),this.prevColor=this.res.style.backgroundColor,this.foreColor=this.res.style.color,this.prevBorder=this.res.style.border,e.animation&&(this.res.style.transition="".concat(e.animation),this.res.style.transionProperty="background, color"),this.res.onmouseout=function(){t.res.style.backgroundColor="".concat(t.prevColor),t.res.style.color="".concat(t.foreColor),t.res.style.border=t.prevBorder},this.res.onmouseover=function(){if(t.res.style.color=e.color,t.res.style.backgroundColor=e.background,e.border){var r,n=e.border.width,i=null!==(r=e.border.color)&&void 0!==r?r:"#2ECC71";t.res.style.border=n?"".concat(n,"px solid ").concat(i):"1px solid #2ECC71"}},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={default:0,xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400};e.forEach((function(e){void 0!==r[e.breakpoint]?e._value=r[e.breakpoint]:e._value=parseInt(e.breakpoint,10)})),e.sort((function(e,t){return e._value-t._value}));var n=function(){for(var r=window.innerWidth,n=null,i=0;i<e.length;i++)r>=e[i]._value&&(n=e[i]);n&&(console.log("Applying padding for",n.breakpoint),t.pad(n.values))};window.addEventListener("resize",n),n()}},{key:"resmar",value:function(e){var t=this,r={default:0,xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400};e.forEach((function(e){void 0!==r[e.breakpoint]?e._value=r[e.breakpoint]:e._value=parseInt(e.breakpoint,10)})),e.sort((function(e,t){return e._value-t._value}));var n=function(){for(var r=window.innerWidth,n=null,i=0;i<e.length;i++)r>=e[i]._value&&(n=e[i]);n&&(console.log("Applying margin for",n.breakpoint),t.mar(n.values))};window.addEventListener("resize",n),n()}},{key:"resprop",value:function(e){var t=this,r={default:0,xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400};console.log("RES STYLE"),console.log(e),this.prevStyles={};for(var n=0;n<this.res.style.length;n++){var i=this.res.style[n];this.prevStyles[i]=this.res.style[i],console.log("kio")}e.forEach((function(e){void 0!==r[e.breakpoint]?e._value=r[e.breakpoint]:e._value=parseInt(e.breakpoint,10)})),e.sort((function(e,t){return e._value-t._value})),console.log("Sorted breakpoints:",e);var o=function(){for(var r in t.prevStyles)t.res.style[r]=t.prevStyles[r];for(var n=window.innerWidth,i=null,o=0;o<e.length;o++)if(n<=e[o]._value){i=e[o];break}if(i)for(var s in console.log("Applying styles for",i.breakpoint),i)"breakpoint"!==s&&"_value"!==s&&(t.res.style[s]=i[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 i=r[n],o=e[t][i],s=0;s<i.length;s++)switch(i[s]){case"a":this.res.style.padding=this.isNumber(o)?"".concat(o,"px"):o;break;case"t":this.res.style.paddingTop=this.isNumber(o)?"".concat(o,"px"):o;break;case"l":this.res.style.paddingLeft=this.isNumber(o)?"".concat(o,"px"):o;break;case"r":this.res.style.paddingRight=this.isNumber(o)?"".concat(o,"px"):o;break;case"b":this.res.style.paddingBottom=this.isNumber(o)?"".concat(o,"px"):o}return this}},{key:"as",value:function(e){return this.res.style.alignSelf=e,this}},{key:"mar",value:function(e){for(var t=0;t<e.length;t++)for(var r=Object.keys(e[t]),n=0;n<r.length;n++)for(var i=r[n],o=e[t][i],s=0;s<i.length;s++){switch(i[s]){case"a":this.res.style.margin=this.isNumber(o)?"".concat(o,"px"):o;break;case"t":this.res.style.marginTop=this.isNumber(o)?"".concat(o,"px"):o;break;case"l":this.res.style.marginLeft=this.isNumber(o)?"".concat(o,"px"):o;break;case"r":this.res.style.marginRight=this.isNumber(o)?"".concat(o,"px"):o;break;case"b":this.res.style.marginBottom=this.isNumber(o)?"".concat(o,"px"):o}"auto"===i[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 i=(r.min-r.max)*n-r.min;if(i=Math.abs(i),r.min<r.max){var o=(r.max+Math.abs(r.min))*n;i=r.min+o}return i}},{key:"gpos",value:function(e){return this.res.style.gridColumn=e.col,this.res.style.gridRow=e.row,this}},{key:"fluidCopy",value:function(e){if(e instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var t=document.createTextNode(this.text);return this.res.appendChild(t),this.res.style.fontSize=e.exact,this}if("S1"===e){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var r=document.createTextNode(this.text);this.res.appendChild(r),this.res.style.fontSize="calc(1.625rem + 5.075vw)"}if("S2"===e){this.prevStylex=this.res.style,this.res=document.createElement("h2"),this.res.style.cssText=this.prevStylex.cssText;var n=document.createTextNode(this.text);this.res.appendChild(n),this.res.style.fontSize="calc(1.500rem + 4.3vw)"}if("S3"===e){this.prevStylex=this.res.style,this.res=document.createElement("h3"),this.res.style.cssText=this.prevStylex.cssText;var i=document.createTextNode(this.text);this.res.appendChild(i),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===e){this.prevStylex=this.res.style,this.res=document.createElement("h4"),this.res.style.cssText=this.prevStylex.cssText;var o=document.createTextNode(this.text);this.res.appendChild(o),this.res.style.fontSize="calc(1.250rem + 2.75vw)"}if("S5"===e){this.prevStylex=this.res.style,this.res=document.createElement("h5"),this.res.style.cssText=this.prevStylex.cssText;var 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,i){var o=this;console.log("0P"),this.ap=!1,this.cta=0,this.once=!1;var s,a=r(e);try{for(a.s();!(s=a.n()).done;){var l=s.value;l.range||(l.range=["0px","999999px"])}}catch(e){a.e(e)}finally{a.f()}e.sort((function(e,t){return parseInt(e.range[0])-parseInt(t.range[0])}));var c=function(s){var a=window.visualViewport.width,l=[],c=[];o.resCopy=o.res,o.storedQueries=e.map((function(e){return e.target})).filter((function(e){return null!=e}));var u,d=r(e);try{for(d.s();!(u=d.n()).done;){var p=u.value;o.counterIndex++;var f=t(p.range,2),h=f[0],y=f[1],v=parseInt(h),m=parseInt(y),b=!0;if(p.target){b=!1;for(var g=0;g<p.target.length;g++)p.target[g]===n&&(b=!0)}a>=v&&a<=m&&b&&(l.push(p.log),c.push(p),p.op&&p.op.margin&&(o.useMargin=p.op.margin))}}catch(e){d.e(e)}finally{d.f()}if(i&&!i.includes("background")&&(o.res.style.background="",o.res.style.backgroundColor=""),o.res.style.textShadow="",i&&!i.includes("border")&&(o.res.style.border=""),i&&!i.includes("margin")&&(o.res.style.margin=""),o.res.style["-webkit-text-fill-color"]="",o.res.style["-webkit-text-stroke-color"]="",o.res.style["-webkit-text-stroke-width"]="",o.res.style.filter="",o.options.background&&(console.log(o.options.background),o.res.style.background=o.options.background),l.includes("gradient"),(l.includes("gradient")||l.includes("shadow"))&&(o.res.style.position="relative"),l.includes("blast")){var x,k=c.filter((function(e){return"blast"===e.log}))[0].op.color,w=null!==(x=c.filter((function(e){return"blast"===e.log}))[0].op.width)&&void 0!==x?x:"1px";"FlexRowLayoutElement"===o.getType()||"LayoutWrapperElement"===o.getType()?(o.res.style.border="".concat("number"==typeof w?w+"px":w," solid orange"),o.res.style.display="inline-block","FlexRowLayoutElement"===o.getType()&&(o.res.style.display="flex"),o.res.style.boxSizing="border-box",o.res.style.transformOrigin="center",o.blastTarget=o.res):(o.text&&(o.res.textContent=o.text),o.res.style["-webkit-text-fill-color"]="transparent",o.res.style["-webkit-text-stroke-color"]=k,o.res.style["-webkit-text-stroke-width"]="".concat(w))}if(l.includes("filter")){var S=c.filter((function(e){return"filter"===e.log}))[0].op.filter;o.res.style.filter=S}if(l.includes("background")&&(o.res.style.backgroundColor="green"),l.includes("gradient")&&("LayoutWrapperElement"!==o.getType()&&"FlexRowLayoutElement"!==o.getType()&&(o.res.style["-webkit-text-fill-color"]="transparent"),o.res.style.background=o.globalGradient,"LayoutWrapperElement"!==o.getType()&&"FlexRowLayoutElement"!==o.getType()&&(o.res.style["background-clip"]="text")),l.includes("shadow")){var T,E,C,O,A=o.options.shadow.op;console.log("OP IS",A);var L=null!==(T=A.steps)&&void 0!==T?T:1,j=null!==(E=A.colors)&&void 0!==E?E:["gray"],W=null!==(C=A.movements)&&void 0!==C?C:["3px","3px"],I=null!==(O=A.radius)&&void 0!==O?O:"3px";if(1===W.length&&(W=[W[0],W[0]]),"FlexRowLayoutElement"===o.getType()||"LayoutWrapperElement"===o.getType()){for(var R=[],_=0;_<L;_++){var N,P=null!==(N=j[_])&&void 0!==N?N:j[0],z=W[0],F=W[1];R.push("".concat(z," ").concat(F," ").concat(I," ").concat(P))}o.res.style.boxShadow=R.join(", ")}else{for(var M=[],B=0;B<L;B++){var D,H=null!==(D=j[B])&&void 0!==D?D:j[0],Y=W[0],X=W[1];M.push("drop-shadow(".concat(Y," ").concat(X," ").concat(I," ").concat(H,")"))}o.res.style.filter=M.join(" ")}}if(l.includes("margin"))for(g=0;g<e.length;g++)if(e[g].op){var G=e[g].op.offsets;G&&void 0!==o.index&&(o.res.style.margin=G[Number(o.index)]+"px")}if(l.includes("spana")||l.includes("span"))o.res=o.resCopy,o.res.textContent="",o.options.span&&(Array.isArray(o.options.span)?o.options.span:[o.options.span]).forEach((function(e){if(e.op&&"span"===e.op.name&&Array.isArray(e.op.parts)){var t=0,r=o.prevText||"";if(e.op.parts.forEach((function(e){var n=e.text,i=e.style||{};if(t<r.length){var s=r.indexOf(n,t);if(s>t){var a=r.substring(t,s);o.res.appendChild(new o.constructor(a).setup({type:"span",id:i.id,animation:i.animation}).set({}).render())}t=s+n.length}var l=new o.constructor(n).setup({type:"span",id:i.id,animation:i.animation}).set(i).render();o.res.appendChild(l)})),t<r.length){var n=r.substring(t);o.res.appendChild(new o.constructor(n).setup({type:"span"}).set({}).render())}}}));else{var V=new o.constructor(o.prevText).set({}).render();o.prevText&&o.prevText.length>0&&s&&o.res.appendChild(V)}if(l.includes("animation")){if(o.options.animation&&!o.hasAnimated&&!o.options.animation.op.fireAt){console.warn(o.openTag),o.hasAnimated=!0;var $=o.options.animation.op;window.addEventListener("sidebar:open",(function(){o.res.animate($.keyframesOpen,$.openOptions)})),window.addEventListener("sidebar:closed",(function(){o.res.animate($.keyframesClose,$.closeOptions)})),o.res.animate($.keyframesClose,{duration:0,fill:"forwards"}),o.openTag&&o.closeTag&&(window.addEventListener(o.openTag,(function(){o.res.animate($.keyframesOpen,$.openOptions)})),window.addEventListener(o.closeTag,(function(){o.res.animate($.keyframesClose,$.closeOptions)})))}if(o.options.animation&&o.options.animation.op.fireAt&&o.options.animation.op.fireAt.endsWith("px")){var J=o.options.animation.op;o.res.animate(J.keyframesClose,{duration:0,fill:"forwards"});var Q=function(){window.scrollY>parseFloat(J.fireAt)&&(o.res.animate(J.keyframesOpen,J.openOptions),window.removeEventListener("scroll",Q))};window.addEventListener("scroll",Q)}if(o.options.animation&&o.options.animation.op.fireAt&&"inview"===o.options.animation.op.fireAt){var U=o.options.animation.op;o.res.animate(U.keyframesClose,{duration:0,fill:"forwards"}),new IntersectionObserver((function(e,t){e.forEach((function(e){e.isIntersecting&&(o.res.animate(U.keyframesOpen,U.openOptions),t.disconnect())}))})).observe(o.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&&o(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){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,u(n.key),n)}}function u(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 d(){try{var e=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(e){}return(d=function(){return!!e})()}function p(e){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},p(e)}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}var h=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=p(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,d()?Reflect.construct(t,r||[],p(e).constructor):t.apply(e,r))}(this,e)).el=null,t.file=null,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&&f(e,t)}(e,a),t=e,(r=[{key:"set",value:function(e){var t=this;this.options=e,this.okayColor=e.okayColor,window.matchMedia("(max-device-width: 415px)");var r=document.createElement("div");r.style.paddingBottom="1em",r.style.display="flex",document.createElement("div");var n=document.createElement("input");n.setAttribute("type","text"),n.style.display="none",n.style.margin="0.5em";var i=document.createElement("input");i.setAttribute("type","file"),i.setAttribute("name",e.name),e.accept&&(i.accept=e.accept),i.setAttribute("id",e.id),i.style.visibility="hidden",i.style.display="none",window.matchMedia("(max-device-width: 415px)").matches&&(i.style.fontSize="1rem");var o=document.createElement("label");return o.setAttribute("for",e.id),o.innerText=e.title,o.style.marginRight=12,o.style.padding="0.5em",e.color&&(o.style.color=e.color),e.background&&(o.style.background=e.background,o.style.padding="10"),i.addEventListener("change",(function(){n.style.display="block",e.hideField&&(n.style.display="none"),o.innerText="Change",t.file=i.files[0],t.onLoad(t.file),y[e.index]=t.file,n.setAttribute("value",t.file.name),n.setAttribute("readonly","true"),t.getLoaded(),t.highlight()})),r.appendChild(i),r.appendChild(o),r.appendChild(n),this.el=r,e.font&&this.font(e.font),e.radius&&this.borderRadius(e.radius),this}},{key:"borderRadius",value:function(e){return this.el.style.borderRadius=e,this}},{key:"addClass",value:function(e){return this.el.setAttribute("class",e),this}},{key:"font",value:function(e){return this.el.style.fontFamily=e,this}},{key:"bold",value:function(){return this.el.style.fontWeight="bold",this}},{key:"rounded",value:function(){return this.el.children[1].style.borderRadius="8px",this}},{key:"highlight",value:function(){return null===this.file?(this.hasFile=!1,this.el.children[1].style.background="red"):(this.hasFile=!0,this.okayColor?this.el.children[1].style.background=this.okayColor:this.el.children[1].style.background="#1abc9c"),this}},{key:"auto",value:function(){var e=function(){window.matchMedia("(max-device-width: 415px)").matches};return e(),window.addEventListener("resize",e),this}},{key:"onLoad",value:function(e){return this.returnObject(this.file),this}},{key:"getLoaded",value:function(){return this.file}},{key:"returnObject",value:function(e){return e}},{key:"loadCall",value:function(e){return this.func=e,this.func(this.file),this}},{key:"toCode",value:function(){var e=JSON.stringify(this.options,null,4);return e=e.replace(/"(\w+)"(?=\s*:)/g,"$1"),["new FilePickera().set(".concat(e,")")]}},{key:"render",value:function(e){return e?(document.querySelector(e).appendChild(this.el),this):this.el}}])&&c(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r}(),y=[];export{h as FilePickera};
|
|
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,i,o,s,a=[],l=!0,c=!1;try{if(o=(r=r.call(e)).next,0===t){if(Object(r)!==r)return;l=!1}else for(;!(l=(n=o.call(r)).done)&&(a.push(n.value),a.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=r.return&&(s=r.return(),Object(s)!==s))return}finally{if(c)throw i}}return a}}(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 i=0,o=function(){};return{s:o,n:function(){return i>=e.length?{done:!0}:{done:!1,value:e[i++]}},e:function(e){throw e},f:o}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var s,a=!0,l=!1;return{s:function(){r=r.call(e)},n:function(){var e=r.next();return a=e.done,e},e:function(e){l=!0,s=e},f:function(){try{a||null==r.return||r.return()}finally{if(l)throw s}}}}function n(e,t){if(e){if("string"==typeof e)return i(e,t);var r={}.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(e,t):void 0}}function i(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=Array(t);r<t;r++)n[r]=e[r];return n}function o(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 a=function(){return e=function e(){var t,r,n,i=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),t=this,n=function(e){if(console.log("LOBJO IS"),console.log(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"),i.setDefault=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0px";return 0===e.length?t+" ":e};var r=function(){var r="",n="",o="",s="",a="",l="",c="",u="",p="";if(0!==t.values.length){t.values.forEach((function(e){e.startsWith("tx:")&&(r=e.replace("tx:","")),e.startsWith("ty:")&&(n=e.replace("ty:","")),e.startsWith("tz:")?o=e.replace("tz:",""):e.startsWith("scale(")?s=e:e.startsWith("skew(")?a=e:e.startsWith("rotate(")?l=function(e){var t=e.match(/rotate\(([^)]+)\)/);if(!t)return e;var r=t[1].split(",").map((function(e){return e.trim()}));return 1===r.length?"rotate(".concat(r[0],")"):2===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],")"):3===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],") rotate(").concat(r[2],")"):e}(e):e.startsWith("perspective(")?c=e:e.startsWith("matrix(")?u=e:e.startsWith("opacity:")&&(p=e.replace("opacity:",""))})),r=i.setDefault(r),n=i.setDefault(n),o=i.setDefault(o);var d="";if("0px"!=n&&"0px"!=r&&"0px"!=o?d+="translate3d(".concat(r,", ").concat(n,", ").concat(o,")"):"0px"==n&&"0px"==r||(d+="translate(".concat(r,", ").concat(n,")")),s&&(d+=" ".concat(s)),l&&(d+=" ".concat(l)),a&&(d+=" ".concat(a)),c&&(d+=" ".concat(c)),u&&(d+=" ".concat(u)),d){if(e.op.transform.duration){var f=e.op.transform.duration.replace(/^(\d+)(s)-/,(function(e,t,r){return t/2+r+" "})),y="transform ".concat(f,", opacity ").concat(f);i.res.style.transition=y}else i.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";e.op.transform.static&&(i.res.style.transition=""),(i.blastTarget||i.res).style.transform=d,i.res.style.opacity=p}else alert("OPE")}};t.on?i.res.addEventListener(t.on,(function(){t.delay?setTimeout((function(){r()}),t.delay):r()})):window.addEventListener("load",(function(){t.delay?setTimeout((function(){r()}),t.delay):r()}));var n=function(){var e="";t.values.forEach((function(t){t.startsWith("tx:")?e+="translateX(0) ":t.startsWith("ty:")?e+="translateY(0) ":t.startsWith("tz:")?e+="translateZ(0) ":t.startsWith("scale(")?e+="scale(1) ":t.startsWith("skew(")?e+="skew(0, 0) ":t.startsWith("rotate(")?e+="rotate(0) ":t.startsWith("perspective(")?e+="perspective(0) ":t.startsWith("matrix(")&&(e+="matrix(1, 0, 0, 1, 0, 0) "),i.res.style.opacity="1"})),e&&(i.res.style.transform=e.trim())};if(t.on)i.res.addEventListener("mouseout",(function(){t.keep||n()}));else{var o=1e3*parseFloat(t.duration),s=t.closeAfter?t.closeAfter:0;setTimeout((function(){t.keep||n()}),o/2+s)}t.hardCSS&&(i.res.style.transform=t.hardCSS)}else alert("THIS FIRE WITH GRADIENT (invalid block"),console.log("INVALID BLOCKA"),console.log(e)},(r=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},this.openedElements=new WeakMap},n=[{key:"isHidden",value:function(e){e&&(this.res.style.display="none")}},{key:"keySet",value:function(e){return this.temporaryVal=1,this.res.style[e.key]=e.value,this}},{key:"commonMethods",value:function(e){var t={exact:"fontSize",zIndex:"zIndex",position:"position",top:"top",cursor:"cursor",width:"width",maxWidth:"maxWidth",height:"height",maxHeight:"maxHeight",radius:"borderRadius",lineHeight:"lineHeight",background:"background",font:"fontFamily",opacity:"opacity"};for(var r in t)null!=e[r]&&(this.res.style[t[r]]=e[r]);return e.pad&&this.pad(e.pad),e.mar&&this.mar(e.mar),e.respad&&this.respad(e.respad),e.resmar&&this.resmar(e.resmar),e.hover&&this.hover(e.hover),e.size&&this.fluidCopy(e.size),e.resprop&&this.resprop(e.resprop),e.keySet&&this.keySet(e.keySet),e.hide&&this.isHidden(e.hide),e.bold?this.res.style.fontWeight="bold":null!=e.weight&&(this.res.style.fontWeight=e.weight),this}},{key:"hover",value:function(e){var t=this;if(e.border){var r=e.border.width;this.res.style.border=r?"".concat(r,"px solid transparent"):"1px solid transparent"}var n=this.options.borderObj;return n&&(this.res.style.border="".concat(n.width,"px solid ").concat(n.color)),this.prevColor=this.res.style.backgroundColor,this.foreColor=this.res.style.color,this.prevBorder=this.res.style.border,e.animation&&(this.res.style.transition="".concat(e.animation),this.res.style.transionProperty="background, color"),this.res.onmouseout=function(){t.res.style.backgroundColor="".concat(t.prevColor),t.res.style.color="".concat(t.foreColor),t.res.style.border=t.prevBorder},this.res.onmouseover=function(){if(t.res.style.color=e.color,t.res.style.backgroundColor=e.background,e.border){var r,n=e.border.width,i=null!==(r=e.border.color)&&void 0!==r?r:"#2ECC71";t.res.style.border=n?"".concat(n,"px solid ").concat(i):"1px solid #2ECC71"}},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;this._applyResponsive(e,(function(e){console.log("Applying padding for",e.breakpoint),t.pad(e.values)}))}},{key:"_applyResponsive",value:function(e,t){var r={default:0,xs:0,sm:576,md:768,lg:992,xl:1200,xxl:1400};e.forEach((function(e){void 0!==r[e.breakpoint]?e._value=r[e.breakpoint]:e._value=parseInt(e.breakpoint,10)})),e.sort((function(e,t){return e._value-t._value}));var n=e.find((function(e){return"default"===e.breakpoint})),i=function(){for(var r=window.innerWidth,i=n||null,o=0;o<e.length;o++){var s=e[o];if("default"!==s.breakpoint&&r<=s._value){i=s;break}}i&&t(i)};this._responsiveHandler&&window.removeEventListener("resize",this._responsiveHandler),this._responsiveHandler=i,window.addEventListener("resize",i),i()}},{key:"resmar",value:function(e){var t=this;this._applyResponsive(e,(function(e){console.log("Applying margin for",e.breakpoint),t.mar(e.values)}))}},{key:"resprop",value:function(e){var t=this;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]}this._applyResponsive(e,(function(e){for(var r in console.log("Applying styles for",e.breakpoint),t.prevStyles)t.res.style[r]=t.prevStyles[r];for(var n in e)"breakpoint"!==n&&"_value"!==n&&"values"!==n&&(t.res.style[n]=e[n])}))}},{key:"isNumber",value:function(e){return"number"==typeof e&&!isNaN(e)}},{key:"pad",value:function(e){for(var t=0;t<e.length;t++)for(var r=Object.keys(e[t]),n=0;n<r.length;n++)for(var i=r[n],o=e[t][i],s=0;s<i.length;s++)switch(i[s]){case"a":this.res.style.padding=this.isNumber(o)?"".concat(o,"px"):o;break;case"t":this.res.style.paddingTop=this.isNumber(o)?"".concat(o,"px"):o;break;case"l":this.res.style.paddingLeft=this.isNumber(o)?"".concat(o,"px"):o;break;case"r":this.res.style.paddingRight=this.isNumber(o)?"".concat(o,"px"):o;break;case"b":this.res.style.paddingBottom=this.isNumber(o)?"".concat(o,"px"):o}return this}},{key:"as",value:function(e){return this.res.style.alignSelf=e,this}},{key:"mar",value:function(e){for(var t=0;t<e.length;t++)for(var r=Object.keys(e[t]),n=0;n<r.length;n++)for(var i=r[n],o=e[t][i],s=0;s<i.length;s++){switch(i[s]){case"a":this.res.style.margin=this.isNumber(o)?"".concat(o,"px"):o;break;case"t":this.res.style.marginTop=this.isNumber(o)?"".concat(o,"px"):o;break;case"l":this.res.style.marginLeft=this.isNumber(o)?"".concat(o,"px"):o;break;case"r":this.res.style.marginRight=this.isNumber(o)?"".concat(o,"px"):o;break;case"b":this.res.style.marginBottom=this.isNumber(o)?"".concat(o,"px"):o}"auto"===i[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 i=(r.min-r.max)*n-r.min;if(i=Math.abs(i),r.min<r.max){var o=(r.max+Math.abs(r.min))*n;i=r.min+o}return i}},{key:"gpos",value:function(e){return this.res.style.gridColumn=e.col,this.res.style.gridRow=e.row,this}},{key:"fluidCopy",value:function(e){if(e instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var t=document.createTextNode(this.text);return this.res.appendChild(t),this.res.style.fontSize=e.exact,this}if("S1"===e){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var r=document.createTextNode(this.text);this.res.appendChild(r),this.res.style.fontSize="calc(1.625rem + 5.075vw)"}if("S2"===e){this.prevStylex=this.res.style,this.res=document.createElement("h2"),this.res.style.cssText=this.prevStylex.cssText;var n=document.createTextNode(this.text);this.res.appendChild(n),this.res.style.fontSize="calc(1.500rem + 4.3vw)"}if("S3"===e){this.prevStylex=this.res.style,this.res=document.createElement("h3"),this.res.style.cssText=this.prevStylex.cssText;var i=document.createTextNode(this.text);this.res.appendChild(i),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===e){this.prevStylex=this.res.style,this.res=document.createElement("h4"),this.res.style.cssText=this.prevStylex.cssText;var o=document.createTextNode(this.text);this.res.appendChild(o),this.res.style.fontSize="calc(1.250rem + 2.75vw)"}if("S5"===e){this.prevStylex=this.res.style,this.res=document.createElement("h5"),this.res.style.cssText=this.prevStylex.cssText;var 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,i){var o=this;console.log("0P"),this.ap=!1,this.cta=0,this.once=!1;var s,a=r(e);try{for(a.s();!(s=a.n()).done;){var l=s.value;l.range||(l.range=["0px","999999px"])}}catch(e){a.e(e)}finally{a.f()}e.sort((function(e,t){return parseInt(e.range[0])-parseInt(t.range[0])}));var c=function(s){var a=window.visualViewport.width,l=[],c=[];o.resCopy=o.res,o.storedQueries=e.map((function(e){return e.target})).filter((function(e){return null!=e}));var u,p=r(e);try{for(p.s();!(u=p.n()).done;){var d=u.value;o.counterIndex++;var f=t(d.range,2),y=f[0],h=f[1],v=parseInt(y),m=parseInt(h),b=!0;if(d.target){b=!1;for(var g=0;g<d.target.length;g++)d.target[g]===n&&(b=!0)}a>=v&&a<=m&&b&&(l.push(d.log),c.push(d),d.op&&d.op.margin&&(o.useMargin=d.op.margin))}}catch(e){p.e(e)}finally{p.f()}if(i&&!i.includes("background")&&(o.res.style.background="",o.res.style.backgroundColor=""),o.res.style.textShadow="",i&&!i.includes("border")&&(o.res.style.border=""),i&&!i.includes("margin")&&(o.res.style.margin=""),o.res.style["-webkit-text-fill-color"]="",o.res.style["-webkit-text-stroke-color"]="",o.res.style["-webkit-text-stroke-width"]="",o.res.style.filter="",o.options.background&&(console.log(o.options.background),o.res.style.background=o.options.background),l.includes("gradient"),(l.includes("gradient")||l.includes("shadow"))&&(o.res.style.position="relative"),l.includes("blast")){var x,k=c.filter((function(e){return"blast"===e.log}))[0].op.color,w=null!==(x=c.filter((function(e){return"blast"===e.log}))[0].op.width)&&void 0!==x?x:"1px";"FlexRowLayoutElement"===o.getType()||"LayoutWrapperElement"===o.getType()?(o.res.style.border="".concat("number"==typeof w?w+"px":w," solid orange"),o.res.style.display="inline-block","FlexRowLayoutElement"===o.getType()&&(o.res.style.display="flex"),o.res.style.boxSizing="border-box",o.res.style.transformOrigin="center",o.blastTarget=o.res):(o.text,o.res.style["-webkit-text-fill-color"]="transparent",o.res.style["-webkit-text-stroke-color"]=k,o.res.style["-webkit-text-stroke-width"]="".concat(w))}if(l.includes("filter")){var S=c.filter((function(e){return"filter"===e.log}))[0].op.filter;o.res.style.filter=S}if(l.includes("background")&&(o.res.style.backgroundColor="green"),l.includes("gradient")&&("LayoutWrapperElement"!==o.getType()&&"FlexRowLayoutElement"!==o.getType()&&(o.res.style["-webkit-text-fill-color"]="transparent"),o.res.style.background=o.globalGradient,"LayoutWrapperElement"!==o.getType()&&"FlexRowLayoutElement"!==o.getType()&&(o.res.style["background-clip"]="text")),l.includes("shadow")){var T,E,C,O,A=o.options.shadow.op;console.log("OP IS",A);var j=null!==(T=A.steps)&&void 0!==T?T:1,L=null!==(E=A.colors)&&void 0!==E?E:["gray"],W=null!==(C=A.movements)&&void 0!==C?C:["3px","3px"],R=null!==(O=A.radius)&&void 0!==O?O:"3px";if(1===W.length&&(W=[W[0],W[0]]),"FlexRowLayoutElement"===o.getType()||"LayoutWrapperElement"===o.getType()){for(var I=[],N=0;N<j;N++){var P,z=null!==(P=L[N])&&void 0!==P?P:L[0],_=W[0],F=W[1];I.push("".concat(_," ").concat(F," ").concat(R," ").concat(z))}o.res.style.boxShadow=I.join(", ")}else{for(var M=[],B=0;B<j;B++){var H,D=null!==(H=L[B])&&void 0!==H?H:L[0],Y=W[0],X=W[1];M.push("drop-shadow(".concat(Y," ").concat(X," ").concat(R," ").concat(D,")"))}o.res.style.filter=M.join(" ")}}if(l.includes("margin"))for(g=0;g<e.length;g++)if(e[g].op){var G=e[g].op.offsets;G&&void 0!==o.index&&(o.res.style.margin=G[Number(o.index)]+"px")}if(l.includes("spana")||l.includes("span")){var V=document.createElement("div");if(V.setAttribute("id","oroa"),Object.assign(V.style,{position:"absolute",inset:"0",background:"linear-gradient(90deg, rgb(52,152,219), rgb(26,188,156))",WebkitBackgroundClip:"text",WebkitTextFillColor:"transparent",pointerEvents:"none"}),o.res&&o.res.querySelector("span"))return;o.res=o.resCopy,o.res.textContent="",o.options.span&&(Array.isArray(o.options.span)?o.options.span:[o.options.span]).forEach((function(e){if(e.op&&"span"===e.op.name&&Array.isArray(e.op.parts)){var t=0,r=o.prevText||"";if(e.op.parts.forEach((function(e){var n=e.text,i=e.style||{};if(t<r.length){var s=r.indexOf(n,t);if(s>t){var a=r.substring(t,s);o.res.appendChild(new o.constructor(a).setup({type:"span",id:i.id,animation:i.animation}).set({}).render())}t=s+n.length}var l=new o.constructor(n).setup({type:"span",id:i.id,animation:i.animation}).set(i).render();o.res.appendChild(l)})),t<r.length){var n=r.substring(t);o.res.appendChild(new o.constructor(n).setup({type:"span"}).set({}).render())}}}))}else{var $=new o.constructor(o.prevText).set({}).render();o.prevText&&o.prevText.length>0&&s&&o.res.appendChild($)}if(l.includes("animation")){if(o.options.animation&&!o.hasAnimated&&!o.options.animation.op.fireAt){console.warn(o.openTag),o.hasAnimated=!0;var q=o.options.animation.op;window.addEventListener("sidebar:open",(function(){o.res.animate(q.keyframesOpen,q.openOptions)})),window.addEventListener("sidebar:closed",(function(){o.res.animate(q.keyframesClose,q.closeOptions)})),o.res.animate(q.keyframesClose,{duration:0,fill:"forwards"}),o.openTag&&o.closeTag&&(window.addEventListener(o.openTag,(function(){o.res.animate(q.keyframesOpen,q.openOptions)})),window.addEventListener(o.closeTag,(function(){o.res.animate(q.keyframesClose,q.closeOptions)})))}if(o.options.animation&&o.options.animation.op.fireAt&&o.options.animation.op.fireAt.endsWith("px")){var J=o.options.animation.op;o.res.animate(J.keyframesClose,{duration:0,fill:"forwards"});var Q=function(){window.scrollY>parseFloat(J.fireAt)&&(o.res.animate(J.keyframesOpen,J.openOptions),window.removeEventListener("scroll",Q))};window.addEventListener("scroll",Q)}if(o.options.animation&&"inview"===o.options.animation.op.fireAt){var U=o.options.animation.op;o.res.animate(U.keyframesClose,{duration:0,fill:"forwards"});var K=!1;new IntersectionObserver((function(e,t){e.forEach((function(e){e.isIntersecting&&!K&&(K=!0,o.res.animate(U.keyframesOpen,U.openOptions),t.disconnect())}))})).observe(o.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&&o(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){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,u(n.key),n)}}function u(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(e){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},d(e)}function f(e,t){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(e,t){return e.__proto__=t,e},f(e,t)}var y=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=d(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||[],d(e).constructor):t.apply(e,r))}(this,e)).el=null,t.file=null,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&&f(e,t)}(e,a),t=e,(r=[{key:"set",value:function(e){var t=this;this.options=e,this.okayColor=e.okayColor,window.matchMedia("(max-device-width: 415px)");var r=document.createElement("div");r.style.paddingBottom="1em",r.style.display="flex",document.createElement("div");var n=document.createElement("input");n.setAttribute("type","text"),n.style.display="none",n.style.margin="0.5em";var i=document.createElement("input");i.setAttribute("type","file"),i.setAttribute("name",e.name),e.accept&&(i.accept=e.accept),i.setAttribute("id",e.id),i.style.visibility="hidden",i.style.display="none",window.matchMedia("(max-device-width: 415px)").matches&&(i.style.fontSize="1rem");var o=document.createElement("label");return o.setAttribute("for",e.id),o.innerText=e.title,o.style.marginRight=12,o.style.padding="0.5em",e.color&&(o.style.color=e.color),e.background&&(o.style.background=e.background,o.style.padding="10"),i.addEventListener("change",(function(){n.style.display="block",e.hideField&&(n.style.display="none"),o.innerText="Change",t.file=i.files[0],t.onLoad(t.file),h[e.index]=t.file,n.setAttribute("value",t.file.name),n.setAttribute("readonly","true"),t.getLoaded(),t.highlight()})),r.appendChild(i),r.appendChild(o),r.appendChild(n),this.el=r,e.font&&this.font(e.font),e.radius&&this.borderRadius(e.radius),this}},{key:"borderRadius",value:function(e){return this.el.style.borderRadius=e,this}},{key:"addClass",value:function(e){return this.el.setAttribute("class",e),this}},{key:"font",value:function(e){return this.el.style.fontFamily=e,this}},{key:"bold",value:function(){return this.el.style.fontWeight="bold",this}},{key:"rounded",value:function(){return this.el.children[1].style.borderRadius="8px",this}},{key:"highlight",value:function(){return null===this.file?(this.hasFile=!1,this.el.children[1].style.background="red"):(this.hasFile=!0,this.okayColor?this.el.children[1].style.background=this.okayColor:this.el.children[1].style.background="#1abc9c"),this}},{key:"auto",value:function(){var e=function(){window.matchMedia("(max-device-width: 415px)").matches};return e(),window.addEventListener("resize",e),this}},{key:"onLoad",value:function(e){return this.returnObject(this.file),this}},{key:"getLoaded",value:function(){return this.file}},{key:"returnObject",value:function(e){return e}},{key:"loadCall",value:function(e){return this.func=e,this.func(this.file),this}},{key:"toCode",value:function(){var e=JSON.stringify(this.options,null,4);return e=e.replace(/"(\w+)"(?=\s*:)/g,"$1"),["new FilePickera().set(".concat(e,")")]}},{key:"render",value:function(e){return e?(document.querySelector(e).appendChild(this.el),this):this.el}}])&&c(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,r}(),h=[];export{y as FilePickera};
|