nodality 1.0.0-beta.7 → 1.0.0-beta.71
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/LICENSE +21 -0
- package/README.md +108 -0
- package/dist/animator.cjs.js +2 -1
- package/dist/animator.cjs.js.LICENSE.txt +5 -0
- package/dist/animator.esm.js +2 -1
- package/dist/animator.esm.js.LICENSE.txt +5 -0
- package/dist/appleanim.cjs.js +2 -0
- package/dist/appleanim.cjs.js.LICENSE.txt +5 -0
- package/dist/appleanim.esm.js +2 -0
- package/dist/appleanim.esm.js.LICENSE.txt +5 -0
- package/dist/audionew.cjs.js +2 -1
- package/dist/audionew.cjs.js.LICENSE.txt +5 -0
- package/dist/audionew.esm.js +2 -1
- package/dist/audionew.esm.js.LICENSE.txt +5 -0
- package/dist/base.cjs.js +2 -1
- package/dist/base.cjs.js.LICENSE.txt +5 -0
- package/dist/base.esm.js +2 -1
- package/dist/base.esm.js.LICENSE.txt +5 -0
- package/dist/betaDesktopBar.esm.js +2 -1
- package/dist/betaDesktopBar.esm.js.LICENSE.txt +5 -0
- package/dist/betaMobileBar.esm.js +2 -1
- package/dist/betaMobileBar.esm.js.LICENSE.txt +5 -0
- package/dist/bundle.umd.js +2 -1
- package/dist/bundle.umd.js.LICENSE.txt +5 -0
- package/dist/button.cjs.js +2 -1
- package/dist/button.cjs.js.LICENSE.txt +5 -0
- package/dist/button.esm.js +2 -1
- package/dist/button.esm.js.LICENSE.txt +5 -0
- package/dist/cardGetter.cjs.js +2 -1
- package/dist/cardGetter.cjs.js.LICENSE.txt +5 -0
- package/dist/cardGetter.esm.js +2 -1
- package/dist/cardGetter.esm.js.LICENSE.txt +5 -0
- package/dist/center.cjs.js +2 -1
- package/dist/center.cjs.js.LICENSE.txt +5 -0
- package/dist/center.esm.js +2 -1
- package/dist/center.esm.js.LICENSE.txt +5 -0
- package/dist/checkbox.cjs.js +2 -1
- package/dist/checkbox.cjs.js.LICENSE.txt +5 -0
- package/dist/checkbox.esm.js +2 -1
- package/dist/checkbox.esm.js.LICENSE.txt +5 -0
- package/dist/code.cjs.js +2 -1
- package/dist/code.cjs.js.LICENSE.txt +5 -0
- package/dist/code.esm.js +2 -1
- package/dist/code.esm.js.LICENSE.txt +5 -0
- package/dist/container.cjs.js +2 -1
- package/dist/container.cjs.js.LICENSE.txt +5 -0
- package/dist/container.esm.js +2 -1
- package/dist/container.esm.js.LICENSE.txt +5 -0
- package/dist/datalist.cjs.js +2 -1
- package/dist/datalist.cjs.js.LICENSE.txt +5 -0
- package/dist/datalist.esm.js +2 -1
- package/dist/datalist.esm.js.LICENSE.txt +5 -0
- package/dist/designer.cjs.js +2 -1
- package/dist/designer.cjs.js.LICENSE.txt +5 -0
- package/dist/designer.esm.js +2 -1
- package/dist/designer.esm.js.LICENSE.txt +5 -0
- package/dist/dropdown.cjs.js +2 -1
- package/dist/dropdown.cjs.js.LICENSE.txt +5 -0
- package/dist/dropdown.esm.js +2 -1
- package/dist/dropdown.esm.js.LICENSE.txt +5 -0
- package/dist/elementMapper.cjs.js +2 -1
- package/dist/elementMapper.cjs.js.LICENSE.txt +5 -0
- package/dist/elementMapper.esm.js +2 -1
- package/dist/elementMapper.esm.js.LICENSE.txt +5 -0
- package/dist/finalresult.esm.js +2 -1
- package/dist/finalresult.esm.js.LICENSE.txt +5 -0
- package/dist/flexCard.cjs.js +2 -1
- package/dist/flexCard.cjs.js.LICENSE.txt +5 -0
- package/dist/flexCard.esm.js +2 -1
- package/dist/flexCard.esm.js.LICENSE.txt +5 -0
- package/dist/flexGrid.cjs.js +2 -1
- package/dist/flexGrid.cjs.js.LICENSE.txt +5 -0
- package/dist/flexGrid.esm.js +2 -1
- package/dist/flexGrid.esm.js.LICENSE.txt +5 -0
- package/dist/flexRow.cjs.js +2 -1
- package/dist/flexRow.cjs.js.LICENSE.txt +5 -0
- package/dist/flexRow.esm.js +2 -1
- package/dist/flexRow.esm.js.LICENSE.txt +5 -0
- package/dist/floatingInput.cjs.js +2 -1
- package/dist/floatingInput.cjs.js.LICENSE.txt +5 -0
- package/dist/floatingInput.esm.js +2 -1
- package/dist/floatingInput.esm.js.LICENSE.txt +5 -0
- package/dist/free.cjs.js +2 -1
- package/dist/free.cjs.js.LICENSE.txt +5 -0
- package/dist/free.esm.js +2 -1
- package/dist/free.esm.js.LICENSE.txt +5 -0
- package/dist/horizontalScroller.esm.js +2 -1
- package/dist/horizontalScroller.esm.js.LICENSE.txt +5 -0
- package/dist/image.cjs.js +2 -1
- package/dist/image.cjs.js.LICENSE.txt +5 -0
- package/dist/image.esm.js +2 -1
- package/dist/image.esm.js.LICENSE.txt +5 -0
- package/dist/imagePicker.cjs.js +2 -1
- package/dist/imagePicker.cjs.js.LICENSE.txt +5 -0
- package/dist/imagePicker.esm.js +2 -1
- package/dist/imagePicker.esm.js.LICENSE.txt +5 -0
- package/dist/index.cjs.js +2 -1
- package/dist/index.cjs.js.LICENSE.txt +5 -0
- package/dist/index.esm.js +2 -1
- package/dist/index.esm.js.LICENSE.txt +5 -0
- package/dist/link.cjs.js +2 -1
- package/dist/link.cjs.js.LICENSE.txt +5 -0
- package/dist/link.esm.js +2 -1
- package/dist/link.esm.js.LICENSE.txt +5 -0
- package/dist/linkGetter.cjs.js +2 -1
- package/dist/linkGetter.cjs.js.LICENSE.txt +5 -0
- package/dist/linkGetter.esm.js +2 -1
- package/dist/linkGetter.esm.js.LICENSE.txt +5 -0
- package/dist/metaAdder.cjs.js +2 -1
- package/dist/metaAdder.cjs.js.LICENSE.txt +5 -0
- package/dist/metaAdder.esm.js +2 -1
- package/dist/metaAdder.esm.js.LICENSE.txt +5 -0
- package/dist/modal2025.cjs.js +2 -1
- package/dist/modal2025.cjs.js.LICENSE.txt +5 -0
- package/dist/modal2025.esm.js +2 -1
- package/dist/modal2025.esm.js.LICENSE.txt +5 -0
- package/dist/multiswitchers.esm.js +2 -1
- package/dist/multiswitchers.esm.js.LICENSE.txt +5 -0
- package/dist/newNavBar.cjs.js +2 -1
- package/dist/newNavBar.cjs.js.LICENSE.txt +5 -0
- package/dist/newNavBar.esm.js +2 -1
- package/dist/newNavBar.esm.js.LICENSE.txt +5 -0
- package/dist/picker.cjs.js +2 -1
- package/dist/picker.cjs.js.LICENSE.txt +5 -0
- package/dist/picker.esm.js +2 -1
- package/dist/picker.esm.js.LICENSE.txt +5 -0
- package/dist/progress.cjs.js +2 -1
- package/dist/progress.cjs.js.LICENSE.txt +5 -0
- package/dist/progress.esm.js +2 -1
- package/dist/progress.esm.js.LICENSE.txt +5 -0
- package/dist/radio.cjs.js +2 -1
- package/dist/radio.cjs.js.LICENSE.txt +5 -0
- package/dist/radio.esm.js +2 -1
- package/dist/radio.esm.js.LICENSE.txt +5 -0
- package/dist/range.cjs.js +2 -1
- package/dist/range.cjs.js.LICENSE.txt +5 -0
- package/dist/range.esm.js +2 -1
- package/dist/range.esm.js.LICENSE.txt +5 -0
- package/dist/scrollvideo.cjs.js +2 -0
- package/dist/scrollvideo.cjs.js.LICENSE.txt +5 -0
- package/dist/scrollvideo.esm.js +2 -0
- package/dist/scrollvideo.esm.js.LICENSE.txt +5 -0
- package/dist/sideBar.cjs.js +2 -1
- package/dist/sideBar.cjs.js.LICENSE.txt +5 -0
- package/dist/sideBar.esm.js +2 -1
- package/dist/sideBar.esm.js.LICENSE.txt +5 -0
- package/dist/sideNavBar.cjs.js +2 -1
- package/dist/sideNavBar.cjs.js.LICENSE.txt +5 -0
- package/dist/sideNavBar.esm.js +2 -1
- package/dist/sideNavBar.esm.js.LICENSE.txt +5 -0
- package/dist/simpleBar.cjs.js +2 -1
- package/dist/simpleBar.cjs.js.LICENSE.txt +5 -0
- package/dist/simpleBar.esm.js +2 -1
- package/dist/simpleBar.esm.js.LICENSE.txt +5 -0
- package/dist/stack.cjs.js +2 -1
- package/dist/stack.cjs.js.LICENSE.txt +5 -0
- package/dist/stack.esm.js +2 -1
- package/dist/stack.esm.js.LICENSE.txt +5 -0
- package/dist/stacker.cjs.js +2 -0
- package/dist/stacker.cjs.js.LICENSE.txt +5 -0
- package/dist/stacker.esm.js +2 -0
- package/dist/stacker.esm.js.LICENSE.txt +5 -0
- package/dist/table.cjs.js +2 -1
- package/dist/table.cjs.js.LICENSE.txt +5 -0
- package/dist/table.esm.js +2 -1
- package/dist/table.esm.js.LICENSE.txt +5 -0
- package/dist/text.cjs.js +2 -1
- package/dist/text.cjs.js.LICENSE.txt +5 -0
- package/dist/text.esm.js +2 -1
- package/dist/text.esm.js.LICENSE.txt +5 -0
- package/dist/textField.cjs.js +2 -1
- package/dist/textField.cjs.js.LICENSE.txt +5 -0
- package/dist/textField.esm.js +2 -1
- package/dist/textField.esm.js.LICENSE.txt +5 -0
- package/dist/transformanim.cjs.js +2 -0
- package/dist/transformanim.cjs.js.LICENSE.txt +5 -0
- package/dist/transformanim.esm.js +2 -0
- package/dist/transformanim.esm.js.LICENSE.txt +5 -0
- package/dist/wrap.cjs.js +2 -1
- package/dist/wrap.cjs.js.LICENSE.txt +5 -0
- package/dist/wrap.esm.js +2 -1
- package/dist/wrap.esm.js.LICENSE.txt +5 -0
- package/dist/zoomCard.cjs.js +2 -1
- package/dist/zoomCard.cjs.js.LICENSE.txt +5 -0
- package/dist/zoomCard.esm.js +2 -1
- package/dist/zoomCard.esm.js.LICENSE.txt +5 -0
- package/layout/DEPRECATED-PARAGRAPH.js +6 -0
- package/layout/animator.js +5 -2
- package/layout/audio.js +6 -0
- package/layout/audionew.js +6 -0
- package/layout/base-2.js +6 -0
- package/layout/base.js +6 -0
- package/layout/betaDesktopBar.js +6 -0
- package/layout/betaMobileBar.js +6 -0
- package/layout/box.js +6 -0
- package/layout/button.js +6 -0
- package/layout/cards.js +6 -0
- package/layout/center.js +6 -0
- package/layout/checkbox.js +6 -0
- package/layout/cleanRow.js +6 -0
- package/layout/code.js +6 -0
- package/layout/container.js +6 -0
- package/layout/custom.js +6 -0
- package/layout/divImage.js +6 -0
- package/layout/dropdown.js +6 -0
- package/layout/dropdown2025.js +6 -0
- package/layout/emptyElement.js +6 -0
- package/layout/externalStylesheet.js +6 -0
- package/layout/flexCard.js +6 -0
- package/layout/flexGrid.js +6 -0
- package/layout/flexrow.js +6 -0
- package/layout/footer.js +6 -0
- package/layout/formComponents/custom.js +6 -0
- package/layout/formComponents/dataList.js +6 -0
- package/layout/formComponents/floatingInput.js +5 -0
- package/layout/formComponents/form-all.js +6 -0
- package/layout/formComponents/form.js +5 -0
- package/layout/formComponents/imagePicker.js +6 -0
- package/layout/formComponents/picker.js +6 -0
- package/layout/formComponents/radio.js +6 -0
- package/layout/formComponents/radiogroup.js +6 -0
- package/layout/formComponents/range.js +6 -0
- package/layout/free.js +6 -0
- package/layout/grid-new.js +6 -0
- package/layout/grid.js +6 -0
- package/layout/gridSwitcher.js +6 -0
- package/layout/group.js +6 -0
- package/layout/header.js +6 -0
- package/layout/horizontalScroller.js +6 -0
- package/layout/image-old.js +6 -0
- package/layout/image.js +6 -0
- package/layout/index.js +22 -0
- package/layout/label.js +6 -0
- package/layout/link.js +6 -0
- package/layout/list-OLD.js +6 -0
- package/layout/list.js +6 -0
- package/layout/metaAdder.js +6 -0
- package/layout/modal2025.js +6 -0
- package/layout/modernwrap.js +6 -0
- package/layout/multiswitcher.js +6 -0
- package/layout/multiswitcherBeta.js +6 -0
- package/layout/navBar-OLD.js +6 -0
- package/layout/navBar.js +6 -0
- package/layout/navFactor/customDiv.js +5 -1
- package/layout/newFlatAdder.js +6 -0
- package/layout/newNavBar copy 2.js +6 -0
- package/layout/newNavBar copy.js +6 -0
- package/layout/newNavBar.js +6 -0
- package/layout/offsetContainer.js +6 -0
- package/layout/progress.js +6 -0
- package/layout/row.js +6 -0
- package/layout/savedNewNavBar.js +6 -0
- package/layout/scrollvideo.js +6 -0
- package/layout/sideBar.js +6 -0
- package/layout/sideNavBar.js +6 -0
- package/layout/simpleBar.js +6 -0
- package/layout/slider2025.js +6 -0
- package/layout/spacer.js +6 -0
- package/layout/stack.js +6 -0
- package/layout/styler.js +6 -0
- package/layout/switcher.js +6 -0
- package/layout/table.js +6 -0
- package/layout/text.js +9 -1
- package/layout/textField.js +6 -0
- package/layout/ulist.js +6 -0
- package/layout/video.js +6 -0
- package/layout/withoutNew.js +6 -0
- package/layout/wrap.js +6 -0
- package/layout/zoomCard.js +6 -0
- package/lib/AppleAnim.js +794 -0
- package/lib/Stacker.js +40 -0
- package/lib/TransformAnim.js +517 -0
- package/lib/cardGetter.js +6 -0
- package/lib/designer.js +217 -14
- package/lib/elementMapper.js +15 -8
- package/lib/linkGetter.js +6 -0
- package/lib/scrollvideo.js +129 -0
- package/package.json +23 -4
package/dist/code.esm.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
class t{constructor(){this.state={isExpanded:!1,isMovedUp:!1,isMovedDown:!1}}keySet(t){return this.temporaryVal=1,this.res.style[t.key]=t.value,this}onScroll(t){"opacity"===t.value?this.res.style.opacity=t.valMin:"scale"===t.value&&(this.res.style.transform=`scale(${t.valMax})`),window.addEventListener("scroll",(()=>{let e=this.smartRange(window.scrollY,{min:t.from,max:t.to},{min:t.valMin,max:t.valMax});"opacity"===t.value?this.res.style.opacity=e:"scale"===t.value&&(this.res.style.transform=`scale(${e})`)}))}setAny(t){this[Object.keys(t)[0]]=[Object.values(t)[0]]}setID(t){this.id=t}setPrevText(t){this.prevText=t}getCSS(){return this.css}getPX(t){return{xs:"0px",sm:"576px",md:"768px",lg:"992px",xl:"1200px",xxl:"1400px",mxxl:"1800px"}[t]||"Invalid breakpoint"}respad(t){const e=()=>{this.pad(t[0].values);for(let e=0;e<t.length;e++){let s=t[e].breakpoint;window.matchMedia(`(min-width: ${this.getPX(s)}`).matches&&this.pad(t[e].values)}};window.addEventListener("resize",e),e()}resmar(t){const e=()=>{this.mar(t[0].values);for(let e=0;e<t.length;e++){let s=t[e].breakpoint;window.matchMedia(`(max-width: ${this.getPX(s)}`).matches&&this.mar(t[e].values)}};window.addEventListener("resize",e),e()}resprop(t){this.prevBackground=this.res.style.background,this.prevWidth=this.res.style.width,this.prevHeight=this.res.style.height,this.prevBorder=this.res.style.border;const e=()=>{this.res.style.background=this.prevBackground,this.res.style.width=this.prevWidth,this.res.style.height=this.prevHeight,this.res.style.border=this.prevBorder;for(let e=0;e<t.length;e++){let s=t[e].breakpoint;if(window.matchMedia(`(max-width: ${this.getPX(s)}`).matches){const s={};for(const i in t[e])"breakpoint"!==i&&(s[i]=t[e][i]);this.set(s)}}};window.addEventListener("resize",e),e()}isNumber(t){return"number"==typeof t&&!isNaN(t)}pad(t){for(let e=0;e<t.length;e++){let s=Object.keys(t[e]);for(let i=0;i<s.length;i++){let r=s[i],a=t[e][r];for(let t=0;t<r.length;t++)switch(r[t]){case"a":this.res.style.padding=this.isNumber(a)?`${a}px`:a;break;case"t":this.res.style.paddingTop=this.isNumber(a)?`${a}px`:a;break;case"l":this.res.style.paddingLeft=this.isNumber(a)?`${a}px`:a;break;case"r":this.res.style.paddingRight=this.isNumber(a)?`${a}px`:a;break;case"b":this.res.style.paddingBottom=this.isNumber(a)?`${a}px`:a}}}return this}as(t){return this.res.style.alignSelf=t,this}mar(t){for(let e=0;e<t.length;e++){let s=Object.keys(t[e]);for(let i=0;i<s.length;i++){let r=s[i],a=t[e][r];for(let t=0;t<r.length;t++){switch(r[t]){case"a":this.res.style.margin=this.isNumber(a)?`${a}px`:a;break;case"t":this.res.style.marginTop=this.isNumber(a)?`${a}px`:a;break;case"l":this.res.style.marginLeft=this.isNumber(a)?`${a}px`:a;break;case"r":this.res.style.marginRight=this.isNumber(a)?`${a}px`:a;break;case"b":this.res.style.marginBottom=this.isNumber(a)?`${a}px`:a}"auto"===r[t]&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto")}}}return this}smartRange(t,e,s){t<e.min&&(t=e.min),t>e.max&&(t=e.max);let i=(t-e.min)/(e.max-e.min);e.min>e.max&&(i=(t-e.max)/(e.min-e.max));let r=(s.min-s.max)*i-s.min;if(r=Math.abs(r),s.min<s.max){let t=(s.max+Math.abs(s.min))*i;r=s.min+t}return r}gpos(t){return this.res.style.gridColumn=t.col,this.res.style.gridRow=t.row,this}fluidCopy(t){if(t instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;let e=document.createTextNode(this.text);return this.res.appendChild(e),this.res.style.fontSize=t.exact,this}if("S1"===t){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;let t=document.createTextNode(this.text);this.res.appendChild(t),this.res.style.fontSize="calc(1.625rem + 5.075vw)"}if("S2"===t){this.prevStylex=this.res.style,this.res=document.createElement("h2"),this.res.style.cssText=this.prevStylex.cssText;let t=document.createTextNode(this.text);this.res.appendChild(t),this.res.style.fontSize="calc(1.500rem + 4.3vw)"}if("S3"===t){this.prevStylex=this.res.style,this.res=document.createElement("h3"),this.res.style.cssText=this.prevStylex.cssText;let t=document.createTextNode(this.text);this.res.appendChild(t),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===t){this.prevStylex=this.res.style,this.res=document.createElement("h4"),this.res.style.cssText=this.prevStylex.cssText;let t=document.createTextNode(this.text);this.res.appendChild(t),this.res.style.fontSize="calc(1.250rem + 2.75vw)"}if("S5"===t){this.prevStylex=this.res.style,this.res=document.createElement("h5"),this.res.style.cssText=this.prevStylex.cssText;let t=document.createTextNode(this.text);this.res.appendChild(t),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===t&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}setIndex(t){this.index=t}borderObj(t){let e=t.type??"solid";return this.res.style.border=`${t.width} ${e} ${t.color}`,this.res.style.borderRadius=t.radius,this}protoReact(t,e){t.sort(((t,e)=>parseInt(t.range[0])-parseInt(e.range[0])));const s=()=>{const s=window.innerWidth;let i="";this.storedQueries=t.map((t=>t.target)).filter((t=>null!=t));for(const a of t){this.counterIndex++;const[t,o]=a.range,n=parseInt(t),l=parseInt(o);let h=!0;if(a.target){h=!1;for(var r=0;r<a.target.length;r++)a.target[r]===e&&(h=!0)}s>=n&&s<=l&&h&&("gradient"===a.log&&(i+="gradient"),"blast"===a.log&&(i+="blast"),"animation"===a.log&&(i+="animation"),"shadow"===a.log&&(i+="shadow"),"span"===a.log&&(i+="span"),"filter"===a.log&&(i+="filter"),"background"===a.log&&(i+="background"))}this.res.style.margin="";let a=this.res.style.color;for(t.map((t=>t.log)).filter((t=>null!=t)).includes("gradient")&&(this.res.style.WebkitBackgroundClip="",this.res.style.background=""),this.res.style["-webkit-text-stroke"]="",this.res.style.filter="",this.res.style.textShadow="",this.res.style.border="";this.res.firstChild;)this.res.removeChild(this.res.firstChild);if(this.res.textContent=this.text,""===i&&(this.res.style["-webkit-text-fill-color"]="",this.res.style.color=a),"blast"===i){for(r=0;r<t.length;r++){const e=t[r].op.offsets;e&&void 0!==this.index&&(this.res.style.margin=e[Number(this.index)]+"px")}for(this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-text-stroke"]=this.globalBlast,r=0;r<t.length;r++){const e=t[r].op.offsets;e&&void 0!==this.index&&(this.res.style.margin=e[Number(this.index)]+"px")}}if("gradient"===i&&(this.res.style["-webkit-text-fill-color"]="transparent",this.res.style.background=this.globalGradient,this.res.style["-webkit-background-clip"]="text",this.res.style.border="1px solid orange"),"background"===i&&(this.res.style.background="orange"),"gradientblast"===i&&(this.res.style["-webkit-text-fill-color"]="transparent",this.res.style.background=this.globalGradient,this.res.style["-webkit-background-clip"]="text",this.res.style["-webkit-text-stroke"]=this.globalBlast),"gradientanimation"===i&&(this.res.style["-webkit-text-fill-color"]="transparent",this.res.style.background=this.globalGradient,this.res.style["-webkit-background-clip"]="text"),"gradientanimationshadow"===i&&(this.res.style["-webkit-text-fill-color"]="transparent",this.res.style.background=this.globalGradient,this.res.style["-webkit-background-clip"]="text",this.res.style.textShadow=this.globalShadow),"animationshadow"===i&&(this.res.style["-webkit-text-fill-color"]="",this.res.style.textShadow=this.globalShadow),"shadow"===i&&(this.res.style["-webkit-text-fill-color"]="",this.res.style.textShadow=this.globalShadow),"span"===i&&this.options.span){let t;for(t=Array.isArray(this.options.span)?this.options.span.filter((t=>"span"===t.op.name))[0]:this.options.span,this.res.textContent="",r=0;r<t.op.parts.length;r++){let e=t.op.parts[r].style,s=new Text(t.op.parts[r].text).setup({type:"span"}).set(e).render();this.res.appendChild(s)}}if("filter"===i){let t=this.options.filtera.op.filter;this.res.style.filter=t,this.res.style.border="8px solid orange"}};window.addEventListener("resize",s),s()}setPref(t){this.preffersId=t}setClass(t){this.class=t}betaReact(t,e){this.ap=!1,this.cta=0,this.once=!1,t.sort(((t,e)=>parseInt(t.range[0])-parseInt(e.range[0])));const s=()=>{const s=window.innerWidth;let i="";this.resCopy=this.res,this.storedQueries=t.map((t=>t.target)).filter((t=>null!=t));for(const a of t){this.counterIndex++;const[t,o]=a.range,n=parseInt(t),l=parseInt(o);let h=!0;if(a.target){h=!1;for(var r=0;r<a.target.length;r++)a.target[r]===e&&(h=!0)}s>=n&&s<=l&&h&&("blast"===a.log&&(i+="blast"),"shadow"===a.log&&(i+="shadow"),"background"===a.log&&(i+="background"),"gradient"===a.log&&(i+="gradient"),"spana"===a.log&&(i+="spana"),"layout"===a.log&&(i+="layout"),"margin"===a.log&&(i+="margin"),a.op&&a.op.margin&&(this.useMargin=a.op.margin))}if(this.res.style.background="",this.res.style.backgroundColor="",this.res.style.textShadow="",this.res.style.border="",this.res.style.margin="",this.res.style["-webkit-text-fill-color"]="",this.res.style["-webkit-text-stroke"]="",this.res.style["-webkit-text-stroke-width"]="","background"===i&&(this.res.style.backgroundColor="green"),"margin"===i)for(r=0;r<t.length;r++){if(!t[r].op)continue;const e=t[r].op.offsets;e&&void 0!==this.index&&(this.res.style.margin=e[Number(this.index)]+"px")}if("blastbackgroundmargin"===i){for(r=0;r<t.length;r++){if(!t[r].op)continue;const e=t[r].op.offsets;e&&void 0!==this.index&&(this.res.style.margin=e[Number(this.index)]+"px")}this.res.style.backgroundColor="green","FlexRowLayoutElement"===this.getType()?this.res.style.border="1px solid orange":(this.res.textContent=this.text,this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-text-stroke-color"]="orange",this.res.style["-webkit-text-stroke-width"]="1px"),this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-text-stroke-color"]="orange",this.res.style["-webkit-text-stroke-width"]="1px"}if("blastbackground"===i){for(r=0;r<t.length;r++){if(!t[r].op)continue;const e=t[r].op.offsets;e&&void 0!==this.index&&(this.res.style.margin=e[Number(this.index)]+"px")}this.res.style.backgroundColor="green",this.useMargin?this.res.style.margin="1rem":this.res.setAttribute("id","iofhwoiefhoih"),"FlexRowLayoutElement"===this.getType()?this.res.style.border="1px solid orange":(this.res.textContent=this.text,this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-text-stroke-color"]="orange",this.res.style["-webkit-text-stroke-width"]="1px"),this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-text-stroke-color"]="orange",this.res.style["-webkit-text-stroke-width"]="1px"}if("layout"===i&&(this.res.style.alignSelf="start",this.res.style.border="1px solid purple"),"blast"===i){for(r=0;r<t.length;r++){if(!t[r].op)continue;const e=t[r].op.offsets;e&&void 0!==this.index&&(this.res.style.margin=e[Number(this.index)]+"px")}"FlexRowLayoutElement"===this.getType()?this.res.style.border="1px solid orange":(this.res.textContent=this.text,this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-background-clip"]="text",this.res.style["-webkit-text-stroke-color"]="orange",this.res.style["-webkit-text-stroke-width"]="1px"),this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-text-stroke"]="orange",this.res.style["-webkit-text-stroke-width"]="1px"}"blastgradientbackground"===i&&(this.res.style.border="1px solid yellow",this.res.style["-webkit-text-stroke-color"]="orange",this.res.style["-webkit-text-stroke-width"]="1px"),"gradient"===i&&(this.res.style.background="linear-gradient(to left, #3498db, #1abc9c)","FlexRowLayoutElement"===this.getType()||(this.res.children[0]&&this.res.removeChild(this.res.children[0]),this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-background-clip"]="text",this.res.textContent=this.text)),"shadow"===i&&("FlexRowLayoutElement"===this.getType()||(this.res.children[0]&&this.res.removeChild(this.res.children[0]),this.res.style["-webkit-text-fill-color"]="",this.res.style["-webkit-text-fill-color"]="",this.res.style.textShadow="#1abc9cff -6px 6px , #1abc9c40 -12px 12px",this.res.textContent=this.text))};window.addEventListener("resize",s),s()}cssGen(t,e,s,i){return this.css=[""],[""]}chainReact(t,e,s){this.cssGen(t,e,this.class,void 0!==this.class),this.ap=!1,this.cta=0,this.once=!1;for(let e of t)e.range||(e.range=["0px","999999px"]);t.sort(((t,e)=>parseInt(t.range[0])-parseInt(e.range[0])));const i=()=>{const i=window.visualViewport.width;let r=[],a=[];this.resCopy=this.res,this.storedQueries=t.map((t=>t.target)).filter((t=>null!=t));for(const s of t){this.counterIndex++;const[t,n]=s.range,l=parseInt(t),h=parseInt(n);let d=!0;if(s.target){d=!1;for(var o=0;o<s.target.length;o++)s.target[o]===e&&(d=!0)}i>=l&&i<=h&&d&&(r.push(s.log),a.push(s),s.op&&s.op.margin&&(this.useMargin=s.op.margin))}if(s&&!s.includes("background")&&(this.res.style.background="",this.res.style.backgroundColor=""),this.res.style.textShadow="",s&&!s.includes("border")&&(this.res.style.border=""),s&&!s.includes("margin")&&(this.res.style.margin=""),this.res.style["-webkit-text-fill-color"]="",this.res.style["-webkit-text-stroke-color"]="",this.res.style["-webkit-text-stroke-width"]="",this.res.style.filter="",(r.includes("gradient")||r.includes("shadow"))&&(this.res.style.position="relative",this.res.style.zIndex=-1),r.includes("blast")){let t=a.filter((t=>"blast"===t.log))[0].op.color,e=a.filter((t=>"blast"===t.log))[0].op.width??"1px";"FlexRowLayoutElement"===this.getType()?this.res.style.border=`${e}px solid orange`:(this.res.textContent=this.text,this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-text-stroke-color"]=t,this.res.style["-webkit-text-stroke-width"]=`${e}`)}if(r.includes("filter")){let t=a.filter((t=>"filter"===t.log))[0].op.filter;this.res.style.filter=t}if(r.includes("background")&&(this.res.style.backgroundColor="green"),r.includes("gradient")&&(this.res.style["-webkit-text-fill-color"]="transparent",this.res.style.background=this.globalGradient,this.res.style["background-clip"]="text"),r.includes("shadow"))if("FlexRowLayoutElement"===this.getType());else{let t="",e=0;for(o=0;o<this.options.shadow.op.steps;o++)e+=3,t+=`drop-shadow(${e}px ${e}px ${e}px gray) `;this.res.style.filter=t}if(r.includes("margin"))for(o=0;o<t.length;o++){if(!t[o].op)continue;const e=t[o].op.offsets;e&&void 0!==this.index&&(this.res.style.margin=e[Number(this.index)]+"px")}if(r.includes("animation")){if(this.options.animation&&!this.hasAnimated&&!this.options.animation.op.fireAt){this.hasAnimated=!0;let t=this.options.animation.op;this.res.animate(t.keyframesClose,{duration:0,fill:"forwards"}),this.res.animate(t.keyframesOpen,t.openOptions)}if(this.options.animation&&this.options.animation.op.fireAt&&this.options.animation.op.fireAt.endsWith("px")){let t=this.options.animation.op;this.res.animate(t.keyframesClose,{duration:0,fill:"forwards"});const e=()=>{window.scrollY>parseFloat(t.fireAt)&&(this.res.animate(t.keyframesOpen,t.openOptions),window.removeEventListener("scroll",e))};window.addEventListener("scroll",e)}if(this.options.animation&&this.options.animation.op.fireAt&&"inview"===this.options.animation.op.fireAt){let t=this.options.animation.op;this.res.animate(t.keyframesClose,{duration:0,fill:"forwards"}),new IntersectionObserver(((e,s)=>{e.forEach((e=>{e.isIntersecting&&(this.res.animate(t.keyframesOpen,t.openOptions),s.disconnect())}))})).observe(this.res)}}};window.addEventListener("resize",i),i()}reactOnTransform=t=>{if(t.transform||t.op&&t.op.transform){let e=t.transform;t.transform||(e=t.op.transform),e.duration||(e.duration="3s-ease-in-out"),this.setDefault=(t,e="0px")=>0===t.length?e+" ":t;const s=t=>{const e=t.match(/rotate\(([^)]+)\)/);if(!e)return t;const s=e[1].split(",").map((t=>t.trim()));return 1===s.length?`rotate(${s[0]})`:2===s.length?`rotateX(${s[0]}) rotateY(${s[1]})`:3===s.length?`rotateX(${s[0]}) rotateY(${s[1]}) rotate(${s[2]})`:t},i=()=>{let i="",r="",a="",o="",n="",l="",h="",d="",p="";if(0===e.values.length)return;e.values.forEach((t=>{t.startsWith("tx:")&&(i=t.replace("tx:","")),t.startsWith("ty:")&&(r=t.replace("ty:","")),t.startsWith("tz:")?a=t.replace("tz:",""):t.startsWith("scale(")?o=t:t.startsWith("skew(")?n=t:t.startsWith("rotate(")?l=s(t):t.startsWith("perspective(")?h=t:t.startsWith("matrix(")?d=t:t.startsWith("opacity:")&&(p=t.replace("opacity:",""))})),i=this.setDefault(i),r=this.setDefault(r),a=this.setDefault(a);let c="";if("0px"!=r&&"0px"!=i&&"0px"!=a?c+=`translate3d(${i}, ${r}, ${a})`:"0px"==r&&"0px"==i||(c+=`translate(${i}, ${r})`),o&&(c+=` ${o}`),l&&(c+=` ${l}`),n&&(c+=` ${n}`),h&&(c+=` ${h}`),d&&(c+=` ${d}`),c){if(t.op.transform.duration){let e=t.op.transform.duration.replace(/^(\d+)(s)-/,((t,e,s)=>e/2+s+" ")),s=`transform ${e}, opacity ${e}`;this.res.style.transition=s}else this.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";this.res.style.transform=c,this.res.style.opacity=p}};e.on?this.res.addEventListener(e.on,(()=>{e.delay?setTimeout((()=>{i()}),e.delay):i()})):window.addEventListener("load",(()=>{e.delay?setTimeout((()=>{i()}),e.delay):i()}));const r=()=>{let t="";e.values.forEach((e=>{e.startsWith("tx:")?t+="translateX(0) ":e.startsWith("ty:")?t+="translateY(0) ":e.startsWith("tz:")?t+="translateZ(0) ":e.startsWith("scale(")?t+="scale(1) ":e.startsWith("skew(")?t+="skew(0, 0) ":e.startsWith("rotate(")?t+="rotate(0) ":e.startsWith("perspective(")?t+="perspective(0) ":e.startsWith("matrix(")&&(t+="matrix(1, 0, 0, 1, 0, 0) "),this.res.style.opacity="1"})),t&&(this.res.style.transform=t.trim())};if(e.on)this.res.addEventListener("mouseout",(()=>{e.keep||r()}));else{let t=1e3*parseFloat(e.duration),s=e.closeAfter?e.closeAfter:0;setTimeout((()=>{e.keep||r()}),t/2+s)}}};maxWidth(t){return this.res.style.maxWidth=t,this}removeQuotesFromFirstWord(t){return t.replace(/"([^"]+)":/g,"$1:")}arrayMargin(t,e){return t.includes("left")&&(this.res.style.marginLeft=e),t.includes("right")&&(this.res.style.marginRight=e),t.includes("top")&&(this.res.style.marginTop=e),t.includes("bottom")&&(this.res.style.marginBottom=e),t.includes("all")&&(this.res.style.margin=e),e||(this.res.style.marginBottom=t),this}navBarExpand(){return this.res.style.backgroundColor="green",this.res.animate([{transform:"scaleY(3.0)"}],{duration:2e3,iterations:1,fill:"both"}),this}scrollFade(t,e){return this.res.style.visibility="hidden",this.faden(t,e,"scroll"),this}expand(t){return!1===this.state.isExpanded?"click"===t.on?this.res.addEventListener("click",(()=>{this.innerExpand(t)})):this.innerExpand(t):this.innerExpandBack(t),this.state.isExpanded=!this.state.isExpanded,this}move(t){return"click"===t.on?this.res.addEventListener("click",(()=>{this.moveUpa(t)})):("up"===t.direction&&this.moveUpa(t),"down"===t.direction&&this.moveDowna(t),this.state.isMovedUp=!this.state.isMovedUp,"left"===t.direction&&this.moveLeft(t)),this}moveLeft(t){return this.res.animate([{transform:"translateX(0px)"},{transform:`translateX(-${t.distance})`}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}moveUpa(t){return!1===this.state.isMovedUp?this.res.animate([{transform:"translateX(0px)"},{transform:`translateY(-${t.distance})`}],{duration:900,iterations:t.iterations,fill:"both"}).play():this.res.animate([{transform:"translateX(0px)"},{transform:`translateY(${t.distance})`}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}moveDowna(t){return!1===this.state.isMovedDown?this.res.animate([{transform:"translateX(0px)"},{transform:`translateY(${t.distance})`}],{duration:900,iterations:t.iterations,fill:"both"}).play():this.res.animate([{transform:"translateX(0px)"},{transform:`translateY(-${t.distance})`}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}moveUpaBack(t){return this.res.animate([{transform:"translateX(0px)"}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}innerExpandBack(t){this.res.animate([{width:this.prevWidth,height:this.prevHeight}],{duration:900,iterations:t.iterations,fill:"both"})}innerExpand(t){return this.prevWidth=this.res.style.width,this.prevHeight=this.res.style.height,this.res.animate([{width:this.prevWidth,height:this.prevHeight},{width:t.width??this.prevWidth,height:t.height??this.prevHeight}],{duration:900,iterations:t.iterations,fill:"both"}),this}fade(t){return this.res.style.visibility="hidden",this.faden(t.duration,t.from,"load"),t.finalOpacity&&(this.finalOpacity=t.finalOpacity),this}faden(t,e,s){return this.res.style.visibility="hidden",this.scrolled=!1,window.addEventListener(s,(()=>{this.res.style.visibility="visible";var i=window.innerHeight;(this.res.getBoundingClientRect().top-i<=0||"load"==s)&&0==this.scrolled&&("left"==e&&this.res.animate([{transform:"translateX(-30px)"},{transform:"translateX(0px)"}],{duration:t,iterations:1}),"right"==e&&this.res.animate([{transform:"translateX(30px)"},{transform:"translateX(0px)"}],{duration:t,iterations:1}),"top"==e&&this.res.animate([{transform:"translateY(-30px)"},{transform:"translateY(0px)"}],{duration:t,iterations:1}),"bottom"==e&&this.res.animate([{transform:"translateY(30px)"},{transform:"translateY(0px)"}],{duration:t,iterations:1}),this.res.animate([{opacity:"0.0"},{opacity:"1.0"}],{duration:t,iterations:1}),this.scrolled=!0)})),this}}class e extends t{constructor(){super(),this.res=document.createElement("code"),this.pre=document.createElement("pre"),this.res.style.background="#18232e",this.res.style.display="block",this.res.style.width="auto",this.res.style.height="auto",this.res.style.color="white",this.res.style.borderRadius="1rem",this.pre.appendChild(this.res)}set(t){return t.code&&(this.pre.children[0].innerHTML=t.code),t.class&&this.pre.children[0].setAttribute("class",`${t.class}`),t.pad&&this.pad(t.pad),t.mar&&this.mar(t.mar),t.respad&&this.respad(t.respad),t.resmar&&this.resmar(t.resmar),t.resprop&&this.resprop(t.resprop),t.width&&(this.res.style.width=t.width),t.background&&(this.res.style.background=t.background),t.color&&(this.res.style.color=t.color),t.borderRadius&&(this.res.style.background=t.borderRadius),t.borderObj&&(this.res.style.border=`${t.borderObj.width} solid ${t.borderObj.color}`,this.res.style.borderRadius=`${t.borderObj.radius}`),this}render(t){return t&&document.querySelector(t).appendChild(this.pre),this.res}}export{e as Code};
|
|
1
|
+
/*! For license information please see code.esm.js.LICENSE.txt */
|
|
2
|
+
function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var s,n,i,a,o=[],l=!0,c=!1;try{if(i=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(s=i.call(r)).done)&&(o.push(s.value),o.length!==e);l=!0);}catch(t){c=!0,n=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw n}}return o}}(t,e)||s(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=s(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var n=0,i=function(){};return{s:i,n:function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){l=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function s(t,e){if(t){if("string"==typeof t)return n(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,s=Array(e);r<e;r++)s[r]=t[r];return s}function i(t,e){for(var r=0;r<e.length;r++){var s=e[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,a(s.key),s)}}function a(e){var r=function(e){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var s=r.call(e,"string");if("object"!=t(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==t(r)?r:r+""}var o=function(){return t=function t(){var e,r,s,n=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,s=function(t){if(t.transform||t.op&&t.op.transform){var e=t.transform;t.transform||(e=t.op.transform),e.duration||(e.duration="3s-ease-in-out"),n.setDefault=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0px";return 0===t.length?e+" ":t};var r=function(){var r="",s="",i="",a="",o="",l="",c="",u="",d="";if(0!==e.values.length){e.values.forEach((function(t){t.startsWith("tx:")&&(r=t.replace("tx:","")),t.startsWith("ty:")&&(s=t.replace("ty:","")),t.startsWith("tz:")?i=t.replace("tz:",""):t.startsWith("scale(")?a=t:t.startsWith("skew(")?o=t:t.startsWith("rotate(")?l=function(t){var e=t.match(/rotate\(([^)]+)\)/);if(!e)return t;var r=e[1].split(",").map((function(t){return t.trim()}));return 1===r.length?"rotate(".concat(r[0],")"):2===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],")"):3===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],") rotate(").concat(r[2],")"):t}(t):t.startsWith("perspective(")?c=t:t.startsWith("matrix(")?u=t:t.startsWith("opacity:")&&(d=t.replace("opacity:",""))})),r=n.setDefault(r),s=n.setDefault(s),i=n.setDefault(i);var f="";if("0px"!=s&&"0px"!=r&&"0px"!=i?f+="translate3d(".concat(r,", ").concat(s,", ").concat(i,")"):"0px"==s&&"0px"==r||(f+="translate(".concat(r,", ").concat(s,")")),a&&(f+=" ".concat(a)),l&&(f+=" ".concat(l)),o&&(f+=" ".concat(o)),c&&(f+=" ".concat(c)),u&&(f+=" ".concat(u)),f){if(t.op.transform.duration){var h=t.op.transform.duration.replace(/^(\d+)(s)-/,(function(t,e,r){return e/2+r+" "})),p="transform ".concat(h,", opacity ").concat(h);n.res.style.transition=p}else n.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";n.res.style.transform=f,n.res.style.opacity=d}}};e.on?n.res.addEventListener(e.on,(function(){e.delay?setTimeout((function(){r()}),e.delay):r()})):window.addEventListener("load",(function(){e.delay?setTimeout((function(){r()}),e.delay):r()}));var s=function(){var t="";e.values.forEach((function(e){e.startsWith("tx:")?t+="translateX(0) ":e.startsWith("ty:")?t+="translateY(0) ":e.startsWith("tz:")?t+="translateZ(0) ":e.startsWith("scale(")?t+="scale(1) ":e.startsWith("skew(")?t+="skew(0, 0) ":e.startsWith("rotate(")?t+="rotate(0) ":e.startsWith("perspective(")?t+="perspective(0) ":e.startsWith("matrix(")&&(t+="matrix(1, 0, 0, 1, 0, 0) "),n.res.style.opacity="1"})),t&&(n.res.style.transform=t.trim())};if(e.on)n.res.addEventListener("mouseout",(function(){e.keep||s()}));else{var i=1e3*parseFloat(e.duration),a=e.closeAfter?e.closeAfter:0;setTimeout((function(){e.keep||s()}),i/2+a)}}},(r=a(r="reactOnTransform"))in e?Object.defineProperty(e,r,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[r]=s,this.state={isExpanded:!1,isMovedUp:!1,isMovedDown:!1}},(s=[{key:"keySet",value:function(t){return this.temporaryVal=1,this.res.style[t.key]=t.value,this}},{key:"onScroll",value:function(t){var e=this;"opacity"===t.value?this.res.style.opacity=t.valMin:"scale"===t.value&&(this.res.style.transform="scale(".concat(t.valMax,")")),window.addEventListener("scroll",(function(){var r=e.smartRange(window.scrollY,{min:t.from,max:t.to},{min:t.valMin,max:t.valMax});"opacity"===t.value?e.res.style.opacity=r:"scale"===t.value&&(e.res.style.transform="scale(".concat(r,")"))}))}},{key:"setAny",value:function(t){this[Object.keys(t)[0]]=[Object.values(t)[0]]}},{key:"setID",value:function(t){this.id=t}},{key:"setPrevText",value:function(t){this.prevText=t}},{key:"getCSS",value:function(){return this.css}},{key:"getPX",value:function(t){return{xs:"0px",sm:"576px",md:"768px",lg:"992px",xl:"1200px",xxl:"1400px",mxxl:"1800px"}[t]||"Invalid breakpoint"}},{key:"respad",value:function(t){var e=this,r=function(){e.pad(t[0].values);for(var r=0;r<t.length;r++){var s=t[r].breakpoint;window.matchMedia("(min-width: ".concat(e.getPX(s))).matches&&e.pad(t[r].values)}};window.addEventListener("resize",r),r()}},{key:"resmar",value:function(t){var e=this,r=function(){e.mar(t[0].values);for(var r=0;r<t.length;r++){var s=t[r].breakpoint;window.matchMedia("(max-width: ".concat(e.getPX(s))).matches&&e.mar(t[r].values)}};window.addEventListener("resize",r),r()}},{key:"resprop",value:function(t){var e=this;this.prevBackground=this.res.style.background,this.prevWidth=this.res.style.width,this.prevHeight=this.res.style.height,this.prevBorder=this.res.style.border;var r=function(){e.res.style.background=e.prevBackground,e.res.style.width=e.prevWidth,e.res.style.height=e.prevHeight,e.res.style.border=e.prevBorder;for(var r=0;r<t.length;r++){var s=t[r].breakpoint;if(window.matchMedia("(max-width: ".concat(e.getPX(s))).matches){var n={};for(var i in t[r])"breakpoint"!==i&&(n[i]=t[r][i]);e.set(n)}}};window.addEventListener("resize",r),r()}},{key:"isNumber",value:function(t){return"number"==typeof t&&!isNaN(t)}},{key:"pad",value:function(t){for(var e=0;e<t.length;e++)for(var r=Object.keys(t[e]),s=0;s<r.length;s++)for(var n=r[s],i=t[e][n],a=0;a<n.length;a++)switch(n[a]){case"a":this.res.style.padding=this.isNumber(i)?"".concat(i,"px"):i;break;case"t":this.res.style.paddingTop=this.isNumber(i)?"".concat(i,"px"):i;break;case"l":this.res.style.paddingLeft=this.isNumber(i)?"".concat(i,"px"):i;break;case"r":this.res.style.paddingRight=this.isNumber(i)?"".concat(i,"px"):i;break;case"b":this.res.style.paddingBottom=this.isNumber(i)?"".concat(i,"px"):i}return this}},{key:"as",value:function(t){return this.res.style.alignSelf=t,this}},{key:"mar",value:function(t){for(var e=0;e<t.length;e++)for(var r=Object.keys(t[e]),s=0;s<r.length;s++)for(var n=r[s],i=t[e][n],a=0;a<n.length;a++){switch(n[a]){case"a":this.res.style.margin=this.isNumber(i)?"".concat(i,"px"):i;break;case"t":this.res.style.marginTop=this.isNumber(i)?"".concat(i,"px"):i;break;case"l":this.res.style.marginLeft=this.isNumber(i)?"".concat(i,"px"):i;break;case"r":this.res.style.marginRight=this.isNumber(i)?"".concat(i,"px"):i;break;case"b":this.res.style.marginBottom=this.isNumber(i)?"".concat(i,"px"):i}"auto"===n[a]&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto")}return this}},{key:"smartRange",value:function(t,e,r){t<e.min&&(t=e.min),t>e.max&&(t=e.max);var s=(t-e.min)/(e.max-e.min);e.min>e.max&&(s=(t-e.max)/(e.min-e.max));var n=(r.min-r.max)*s-r.min;if(n=Math.abs(n),r.min<r.max){var i=(r.max+Math.abs(r.min))*s;n=r.min+i}return n}},{key:"gpos",value:function(t){return this.res.style.gridColumn=t.col,this.res.style.gridRow=t.row,this}},{key:"fluidCopy",value:function(t){if(t instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var e=document.createTextNode(this.text);return this.res.appendChild(e),this.res.style.fontSize=t.exact,this}if("S1"===t){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var r=document.createTextNode(this.text);this.res.appendChild(r),this.res.style.fontSize="calc(1.625rem + 5.075vw)"}if("S2"===t){this.prevStylex=this.res.style,this.res=document.createElement("h2"),this.res.style.cssText=this.prevStylex.cssText;var s=document.createTextNode(this.text);this.res.appendChild(s),this.res.style.fontSize="calc(1.500rem + 4.3vw)"}if("S3"===t){this.prevStylex=this.res.style,this.res=document.createElement("h3"),this.res.style.cssText=this.prevStylex.cssText;var n=document.createTextNode(this.text);this.res.appendChild(n),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===t){this.prevStylex=this.res.style,this.res=document.createElement("h4"),this.res.style.cssText=this.prevStylex.cssText;var i=document.createTextNode(this.text);this.res.appendChild(i),this.res.style.fontSize="calc(1.250rem + 2.75vw)"}if("S5"===t){this.prevStylex=this.res.style,this.res=document.createElement("h5"),this.res.style.cssText=this.prevStylex.cssText;var a=document.createTextNode(this.text);this.res.appendChild(a),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===t&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}},{key:"setIndex",value:function(t){this.index=t}},{key:"borderObj",value:function(t){var e,r=null!==(e=t.type)&&void 0!==e?e:"solid";return this.res.style.border="".concat(t.width," ").concat(r," ").concat(t.color),this.res.style.borderRadius=t.radius,this}},{key:"protoReact",value:function(t,s){var n=this;t.sort((function(t,e){return parseInt(t.range[0])-parseInt(e.range[0])}));var i=function(){var i=window.innerWidth,a="";n.storedQueries=t.map((function(t){return t.target})).filter((function(t){return null!=t}));var o,l=r(t);try{for(l.s();!(o=l.n()).done;){var c=o.value;n.counterIndex++;var u=e(c.range,2),d=u[0],f=u[1],h=parseInt(d),p=parseInt(f),y=!0;if(c.target){y=!1;for(var m=0;m<c.target.length;m++)c.target[m]===s&&(y=!0)}i>=h&&i<=p&&y&&("gradient"===c.log&&(a+="gradient"),"blast"===c.log&&(a+="blast"),"animation"===c.log&&(a+="animation"),"shadow"===c.log&&(a+="shadow"),"span"===c.log&&(a+="span"),"filter"===c.log&&(a+="filter"),"background"===c.log&&(a+="background"))}}catch(t){l.e(t)}finally{l.f()}n.res.style.margin="";var v,b=n.res.style.color;for(t.map((function(t){return t.log})).filter((function(t){return null!=t})).includes("gradient")&&(n.res.style.WebkitBackgroundClip="",n.res.style.background=""),n.res.style["-webkit-text-stroke"]="",n.res.style.filter="",n.res.style.textShadow="",n.res.style.border="";n.res.firstChild;)n.res.removeChild(n.res.firstChild);if(n.res.textContent=n.text,""===a&&(n.res.style["-webkit-text-fill-color"]="",n.res.style.color=b),"blast"===a){for(m=0;m<t.length;m++){var g=t[m].op.offsets;g&&void 0!==n.index&&(n.res.style.margin=g[Number(n.index)]+"px")}for(n.res.style["-webkit-text-fill-color"]="transparent",n.res.style["-webkit-text-stroke"]=n.globalBlast,m=0;m<t.length;m++){var x=t[m].op.offsets;x&&void 0!==n.index&&(n.res.style.margin=x[Number(n.index)]+"px")}}if("gradient"===a&&(n.res.style["-webkit-text-fill-color"]="transparent",n.res.style.background=n.globalGradient,n.res.style["-webkit-background-clip"]="text",n.res.style.border="1px solid orange"),"background"===a&&(n.res.style.background="orange"),"gradientblast"===a&&(n.res.style["-webkit-text-fill-color"]="transparent",n.res.style.background=n.globalGradient,n.res.style["-webkit-background-clip"]="text",n.res.style["-webkit-text-stroke"]=n.globalBlast),"gradientanimation"===a&&(n.res.style["-webkit-text-fill-color"]="transparent",n.res.style.background=n.globalGradient,n.res.style["-webkit-background-clip"]="text"),"gradientanimationshadow"===a&&(n.res.style["-webkit-text-fill-color"]="transparent",n.res.style.background=n.globalGradient,n.res.style["-webkit-background-clip"]="text",n.res.style.textShadow=n.globalShadow),"animationshadow"===a&&(n.res.style["-webkit-text-fill-color"]="",n.res.style.textShadow=n.globalShadow),"shadow"===a&&(n.res.style["-webkit-text-fill-color"]="",n.res.style.textShadow=n.globalShadow),"span"===a&&n.options.span)for(v=Array.isArray(n.options.span)?n.options.span.filter((function(t){return"span"===t.op.name}))[0]:n.options.span,n.res.textContent="",m=0;m<v.op.parts.length;m++){var w=v.op.parts[m].style,k=new Text(v.op.parts[m].text).setup({type:"span"}).set(w).render();n.res.appendChild(k)}if("filter"===a){var S=n.options.filtera.op.filter;n.res.style.filter=S,n.res.style.border="8px solid orange"}};window.addEventListener("resize",i),i()}},{key:"setPref",value:function(t){this.preffersId=t}},{key:"setClass",value:function(t){this.class=t}},{key:"betaReact",value:function(t,s){var n=this;this.ap=!1,this.cta=0,this.once=!1,t.sort((function(t,e){return parseInt(t.range[0])-parseInt(e.range[0])}));var i=function(){var i=window.innerWidth,a="";n.resCopy=n.res,n.storedQueries=t.map((function(t){return t.target})).filter((function(t){return null!=t}));var o,l=r(t);try{for(l.s();!(o=l.n()).done;){var c=o.value;n.counterIndex++;var u=e(c.range,2),d=u[0],f=u[1],h=parseInt(d),p=parseInt(f),y=!0;if(c.target){y=!1;for(var m=0;m<c.target.length;m++)c.target[m]===s&&(y=!0)}i>=h&&i<=p&&y&&("blast"===c.log&&(a+="blast"),"shadow"===c.log&&(a+="shadow"),"background"===c.log&&(a+="background"),"gradient"===c.log&&(a+="gradient"),"spana"===c.log&&(a+="spana"),"layout"===c.log&&(a+="layout"),"margin"===c.log&&(a+="margin"),c.op&&c.op.margin&&(n.useMargin=c.op.margin))}}catch(t){l.e(t)}finally{l.f()}if(n.res.style.background="",n.res.style.backgroundColor="",n.res.style.textShadow="",n.res.style.border="",n.res.style.margin="",n.res.style["-webkit-text-fill-color"]="",n.res.style["-webkit-text-stroke"]="",n.res.style["-webkit-text-stroke-width"]="","background"===a&&(n.res.style.backgroundColor="green"),"margin"===a)for(m=0;m<t.length;m++)if(t[m].op){var v=t[m].op.offsets;v&&void 0!==n.index&&(n.res.style.margin=v[Number(n.index)]+"px")}if("blastbackgroundmargin"===a){for(m=0;m<t.length;m++)if(t[m].op){var b=t[m].op.offsets;b&&void 0!==n.index&&(n.res.style.margin=b[Number(n.index)]+"px")}n.res.style.backgroundColor="green","FlexRowLayoutElement"===n.getType()?n.res.style.border="1px solid orange":(n.res.textContent=n.text,n.res.style["-webkit-text-fill-color"]="transparent",n.res.style["-webkit-text-stroke-color"]="orange",n.res.style["-webkit-text-stroke-width"]="1px"),n.res.style["-webkit-text-fill-color"]="transparent",n.res.style["-webkit-text-stroke-color"]="orange",n.res.style["-webkit-text-stroke-width"]="1px"}if("blastbackground"===a){for(m=0;m<t.length;m++)if(t[m].op){var g=t[m].op.offsets;g&&void 0!==n.index&&(n.res.style.margin=g[Number(n.index)]+"px")}n.res.style.backgroundColor="green",n.useMargin?n.res.style.margin="1rem":n.res.setAttribute("id","iofhwoiefhoih"),"FlexRowLayoutElement"===n.getType()?n.res.style.border="1px solid orange":(n.res.textContent=n.text,n.res.style["-webkit-text-fill-color"]="transparent",n.res.style["-webkit-text-stroke-color"]="orange",n.res.style["-webkit-text-stroke-width"]="1px"),n.res.style["-webkit-text-fill-color"]="transparent",n.res.style["-webkit-text-stroke-color"]="orange",n.res.style["-webkit-text-stroke-width"]="1px"}if("layout"===a&&(n.res.style.alignSelf="start",n.res.style.border="1px solid purple"),"blast"===a){for(m=0;m<t.length;m++)if(t[m].op){var x=t[m].op.offsets;x&&void 0!==n.index&&(n.res.style.margin=x[Number(n.index)]+"px")}"FlexRowLayoutElement"===n.getType()?n.res.style.border="1px solid orange":(n.res.textContent=n.text,n.res.style["-webkit-text-fill-color"]="transparent",n.res.style["-webkit-background-clip"]="text",n.res.style["-webkit-text-stroke-color"]="orange",n.res.style["-webkit-text-stroke-width"]="1px"),n.res.style["-webkit-text-fill-color"]="transparent",n.res.style["-webkit-text-stroke"]="orange",n.res.style["-webkit-text-stroke-width"]="1px"}"blastgradientbackground"===a&&(n.res.style.border="1px solid yellow",n.res.style["-webkit-text-stroke-color"]="orange",n.res.style["-webkit-text-stroke-width"]="1px"),"gradient"===a&&(n.res.style.background="linear-gradient(to left, #3498db, #1abc9c)","FlexRowLayoutElement"===n.getType()||(n.res.children[0]&&n.res.removeChild(n.res.children[0]),n.res.style["-webkit-text-fill-color"]="transparent",n.res.style["-webkit-background-clip"]="text",n.res.textContent=n.text)),"shadow"===a&&("FlexRowLayoutElement"===n.getType()||(n.res.children[0]&&n.res.removeChild(n.res.children[0]),n.res.style["-webkit-text-fill-color"]="",n.res.style["-webkit-text-fill-color"]="",n.res.style.textShadow="#1abc9cff -6px 6px , #1abc9c40 -12px 12px",n.res.textContent=n.text))};window.addEventListener("resize",i),i()}},{key:"cssGen",value:function(t,e,r,s){return this.css=[""],[""]}},{key:"chainReact",value:function(t,s,n){var i=this;this.cssGen(t,s,this.class,void 0!==this.class),this.ap=!1,this.cta=0,this.once=!1;var a,o=r(t);try{for(o.s();!(a=o.n()).done;){var l=a.value;l.range||(l.range=["0px","999999px"])}}catch(t){o.e(t)}finally{o.f()}t.sort((function(t,e){return parseInt(t.range[0])-parseInt(e.range[0])}));var c=function(){var a=window.visualViewport.width,o=[],l=[];i.resCopy=i.res,i.storedQueries=t.map((function(t){return t.target})).filter((function(t){return null!=t}));var c,u=r(t);try{for(u.s();!(c=u.n()).done;){var d=c.value;i.counterIndex++;var f=e(d.range,2),h=f[0],p=f[1],y=parseInt(h),m=parseInt(p),v=!0;if(d.target){v=!1;for(var b=0;b<d.target.length;b++)d.target[b]===s&&(v=!0)}a>=y&&a<=m&&v&&(o.push(d.log),l.push(d),d.op&&d.op.margin&&(i.useMargin=d.op.margin))}}catch(t){u.e(t)}finally{u.f()}if(n&&!n.includes("background")&&(i.res.style.background="",i.res.style.backgroundColor=""),i.res.style.textShadow="",n&&!n.includes("border")&&(i.res.style.border=""),n&&!n.includes("margin")&&(i.res.style.margin=""),i.res.style["-webkit-text-fill-color"]="",i.res.style["-webkit-text-stroke-color"]="",i.res.style["-webkit-text-stroke-width"]="",i.res.style.filter="",(o.includes("gradient")||o.includes("shadow"))&&(i.res.style.position="relative",i.res.style.zIndex=-1),o.includes("blast")){var g,x=l.filter((function(t){return"blast"===t.log}))[0].op.color,w=null!==(g=l.filter((function(t){return"blast"===t.log}))[0].op.width)&&void 0!==g?g:"1px";"FlexRowLayoutElement"===i.getType()?i.res.style.border="".concat(w,"px solid orange"):(i.res.textContent=i.text,i.res.style["-webkit-text-fill-color"]="transparent",i.res.style["-webkit-text-stroke-color"]=x,i.res.style["-webkit-text-stroke-width"]="".concat(w))}if(o.includes("filter")){var k=l.filter((function(t){return"filter"===t.log}))[0].op.filter;i.res.style.filter=k}if(o.includes("background")&&(i.res.style.backgroundColor="green"),o.includes("gradient")&&(i.res.style["-webkit-text-fill-color"]="transparent",i.res.style.background=i.globalGradient,i.res.style["background-clip"]="text"),o.includes("shadow"))if("FlexRowLayoutElement"===i.getType());else{var S="",E=0;for(b=0;b<i.options.shadow.op.steps;b++)S+="drop-shadow(".concat(E+=3,"px ").concat(E,"px ").concat(E,"px gray) ");i.res.style.filter=S}if(o.includes("margin"))for(b=0;b<t.length;b++)if(t[b].op){var T=t[b].op.offsets;T&&void 0!==i.index&&(i.res.style.margin=T[Number(i.index)]+"px")}if(o.includes("animation")){if(i.options.animation&&!i.hasAnimated&&!i.options.animation.op.fireAt){i.hasAnimated=!0;var C=i.options.animation.op;i.res.animate(C.keyframesClose,{duration:0,fill:"forwards"}),i.res.animate(C.keyframesOpen,C.openOptions)}if(i.options.animation&&i.options.animation.op.fireAt&&i.options.animation.op.fireAt.endsWith("px")){var O=i.options.animation.op;i.res.animate(O.keyframesClose,{duration:0,fill:"forwards"});var j=function(){window.scrollY>parseFloat(O.fireAt)&&(i.res.animate(O.keyframesOpen,O.openOptions),window.removeEventListener("scroll",j))};window.addEventListener("scroll",j)}if(i.options.animation&&i.options.animation.op.fireAt&&"inview"===i.options.animation.op.fireAt){var W=i.options.animation.op;i.res.animate(W.keyframesClose,{duration:0,fill:"forwards"}),new IntersectionObserver((function(t,e){t.forEach((function(t){t.isIntersecting&&(i.res.animate(W.keyframesOpen,W.openOptions),e.disconnect())}))})).observe(i.res)}}};window.addEventListener("resize",c),c()}},{key:"maxWidth",value:function(t){return this.res.style.maxWidth=t,this}},{key:"removeQuotesFromFirstWord",value:function(t){return t.replace(/"([^"]+)":/g,"$1:")}},{key:"arrayMargin",value:function(t,e){return t.includes("left")&&(this.res.style.marginLeft=e),t.includes("right")&&(this.res.style.marginRight=e),t.includes("top")&&(this.res.style.marginTop=e),t.includes("bottom")&&(this.res.style.marginBottom=e),t.includes("all")&&(this.res.style.margin=e),e||(this.res.style.marginBottom=t),this}},{key:"navBarExpand",value:function(){return this.res.style.backgroundColor="green",this.res.animate([{transform:"scaleY(3.0)"}],{duration:2e3,iterations:1,fill:"both"}),this}},{key:"scrollFade",value:function(t,e){return this.res.style.visibility="hidden",this.faden(t,e,"scroll"),this}},{key:"expand",value:function(t){var e=this;return!1===this.state.isExpanded?"click"===t.on?this.res.addEventListener("click",(function(){e.innerExpand(t)})):this.innerExpand(t):this.innerExpandBack(t),this.state.isExpanded=!this.state.isExpanded,this}},{key:"move",value:function(t){var e=this;return"click"===t.on?this.res.addEventListener("click",(function(){e.moveUpa(t)})):("up"===t.direction&&this.moveUpa(t),"down"===t.direction&&this.moveDowna(t),this.state.isMovedUp=!this.state.isMovedUp,"left"===t.direction&&this.moveLeft(t)),this}},{key:"moveLeft",value:function(t){return this.res.animate([{transform:"translateX(0px)"},{transform:"translateX(-".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}},{key:"moveUpa",value:function(t){return!1===this.state.isMovedUp?this.res.animate([{transform:"translateX(0px)"},{transform:"translateY(-".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play():this.res.animate([{transform:"translateX(0px)"},{transform:"translateY(".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}},{key:"moveDowna",value:function(t){return!1===this.state.isMovedDown?this.res.animate([{transform:"translateX(0px)"},{transform:"translateY(".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play():this.res.animate([{transform:"translateX(0px)"},{transform:"translateY(-".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}},{key:"moveUpaBack",value:function(t){return this.res.animate([{transform:"translateX(0px)"}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}},{key:"innerExpandBack",value:function(t){this.res.animate([{width:this.prevWidth,height:this.prevHeight}],{duration:900,iterations:t.iterations,fill:"both"})}},{key:"innerExpand",value:function(t){var e,r;return this.prevWidth=this.res.style.width,this.prevHeight=this.res.style.height,this.res.animate([{width:this.prevWidth,height:this.prevHeight},{width:null!==(e=t.width)&&void 0!==e?e:this.prevWidth,height:null!==(r=t.height)&&void 0!==r?r:this.prevHeight}],{duration:900,iterations:t.iterations,fill:"both"}),this}},{key:"fade",value:function(t){return this.res.style.visibility="hidden",this.faden(t.duration,t.from,"load"),t.finalOpacity&&(this.finalOpacity=t.finalOpacity),this}},{key:"faden",value:function(t,e,r){var s=this;return this.res.style.visibility="hidden",this.scrolled=!1,window.addEventListener(r,(function(){s.res.style.visibility="visible";var n=window.innerHeight;(s.res.getBoundingClientRect().top-n<=0||"load"==r)&&0==s.scrolled&&("left"==e&&s.res.animate([{transform:"translateX(-30px)"},{transform:"translateX(0px)"}],{duration:t,iterations:1}),"right"==e&&s.res.animate([{transform:"translateX(30px)"},{transform:"translateX(0px)"}],{duration:t,iterations:1}),"top"==e&&s.res.animate([{transform:"translateY(-30px)"},{transform:"translateY(0px)"}],{duration:t,iterations:1}),"bottom"==e&&s.res.animate([{transform:"translateY(30px)"},{transform:"translateY(0px)"}],{duration:t,iterations:1}),s.res.animate([{opacity:"0.0"},{opacity:"1.0"}],{duration:t,iterations:1}),s.scrolled=!0)})),this}}])&&i(t.prototype,s),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,s}();function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function c(t,e){for(var r=0;r<e.length;r++){var s=e[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,u(s.key),s)}}function u(t){var e=function(t){if("object"!=l(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==l(e)?e:e+""}function d(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(d=function(){return!!t})()}function f(t){return f=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},f(t)}function h(t,e){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},h(t,e)}var p=function(){function t(){var e;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(e=function(t,e,r){return e=f(e),function(t,e){if(e&&("object"==l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,d()?Reflect.construct(e,r||[],f(t).constructor):e.apply(t,r))}(this,t)).res=document.createElement("code"),e.pre=document.createElement("pre"),e.res.style.background="#18232e",e.res.style.display="block",e.res.style.width="auto",e.res.style.height="auto",e.res.style.color="white",e.res.style.borderRadius="1rem",e.pre.appendChild(e.res),e}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&h(t,e)}(t,o),e=t,(r=[{key:"set",value:function(t){return t.code&&(this.pre.children[0].innerHTML=t.code),t.class&&this.pre.children[0].setAttribute("class","".concat(t.class)),t.pad&&this.pad(t.pad),t.mar&&this.mar(t.mar),t.respad&&this.respad(t.respad),t.resmar&&this.resmar(t.resmar),t.resprop&&this.resprop(t.resprop),t.width&&(this.res.style.width=t.width),t.background&&(this.res.style.background=t.background),t.color&&(this.res.style.color=t.color),t.borderRadius&&(this.res.style.background=t.borderRadius),t.borderObj&&(this.res.style.border="".concat(t.borderObj.width," solid ").concat(t.borderObj.color),this.res.style.borderRadius="".concat(t.borderObj.radius)),this}},{key:"render",value:function(t){return t&&document.querySelector(t).appendChild(this.pre),this.res}}])&&c(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r}();export{p as Code};
|
package/dist/container.cjs.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
(()=>{"use strict";var t={d:(e,s)=>{for(var i in s)t.o(s,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:s[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{Wrapper:()=>i});class s{constructor(){this.state={isExpanded:!1,isMovedUp:!1,isMovedDown:!1}}keySet(t){return this.temporaryVal=1,this.res.style[t.key]=t.value,this}onScroll(t){"opacity"===t.value?this.res.style.opacity=t.valMin:"scale"===t.value&&(this.res.style.transform=`scale(${t.valMax})`),window.addEventListener("scroll",(()=>{let e=this.smartRange(window.scrollY,{min:t.from,max:t.to},{min:t.valMin,max:t.valMax});"opacity"===t.value?this.res.style.opacity=e:"scale"===t.value&&(this.res.style.transform=`scale(${e})`)}))}setAny(t){this[Object.keys(t)[0]]=[Object.values(t)[0]]}setID(t){this.id=t}setPrevText(t){this.prevText=t}getCSS(){return this.css}getPX(t){return{xs:"0px",sm:"576px",md:"768px",lg:"992px",xl:"1200px",xxl:"1400px",mxxl:"1800px"}[t]||"Invalid breakpoint"}respad(t){const e=()=>{this.pad(t[0].values);for(let e=0;e<t.length;e++){let s=t[e].breakpoint;window.matchMedia(`(min-width: ${this.getPX(s)}`).matches&&this.pad(t[e].values)}};window.addEventListener("resize",e),e()}resmar(t){const e=()=>{this.mar(t[0].values);for(let e=0;e<t.length;e++){let s=t[e].breakpoint;window.matchMedia(`(max-width: ${this.getPX(s)}`).matches&&this.mar(t[e].values)}};window.addEventListener("resize",e),e()}resprop(t){this.prevBackground=this.res.style.background,this.prevWidth=this.res.style.width,this.prevHeight=this.res.style.height,this.prevBorder=this.res.style.border;const e=()=>{this.res.style.background=this.prevBackground,this.res.style.width=this.prevWidth,this.res.style.height=this.prevHeight,this.res.style.border=this.prevBorder;for(let e=0;e<t.length;e++){let s=t[e].breakpoint;if(window.matchMedia(`(max-width: ${this.getPX(s)}`).matches){const s={};for(const i in t[e])"breakpoint"!==i&&(s[i]=t[e][i]);this.set(s)}}};window.addEventListener("resize",e),e()}isNumber(t){return"number"==typeof t&&!isNaN(t)}pad(t){for(let e=0;e<t.length;e++){let s=Object.keys(t[e]);for(let i=0;i<s.length;i++){let r=s[i],a=t[e][r];for(let t=0;t<r.length;t++)switch(r[t]){case"a":this.res.style.padding=this.isNumber(a)?`${a}px`:a;break;case"t":this.res.style.paddingTop=this.isNumber(a)?`${a}px`:a;break;case"l":this.res.style.paddingLeft=this.isNumber(a)?`${a}px`:a;break;case"r":this.res.style.paddingRight=this.isNumber(a)?`${a}px`:a;break;case"b":this.res.style.paddingBottom=this.isNumber(a)?`${a}px`:a}}}return this}as(t){return this.res.style.alignSelf=t,this}mar(t){for(let e=0;e<t.length;e++){let s=Object.keys(t[e]);for(let i=0;i<s.length;i++){let r=s[i],a=t[e][r];for(let t=0;t<r.length;t++){switch(r[t]){case"a":this.res.style.margin=this.isNumber(a)?`${a}px`:a;break;case"t":this.res.style.marginTop=this.isNumber(a)?`${a}px`:a;break;case"l":this.res.style.marginLeft=this.isNumber(a)?`${a}px`:a;break;case"r":this.res.style.marginRight=this.isNumber(a)?`${a}px`:a;break;case"b":this.res.style.marginBottom=this.isNumber(a)?`${a}px`:a}"auto"===r[t]&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto")}}}return this}smartRange(t,e,s){t<e.min&&(t=e.min),t>e.max&&(t=e.max);let i=(t-e.min)/(e.max-e.min);e.min>e.max&&(i=(t-e.max)/(e.min-e.max));let r=(s.min-s.max)*i-s.min;if(r=Math.abs(r),s.min<s.max){let t=(s.max+Math.abs(s.min))*i;r=s.min+t}return r}gpos(t){return this.res.style.gridColumn=t.col,this.res.style.gridRow=t.row,this}fluidCopy(t){if(t instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;let e=document.createTextNode(this.text);return this.res.appendChild(e),this.res.style.fontSize=t.exact,this}if("S1"===t){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;let t=document.createTextNode(this.text);this.res.appendChild(t),this.res.style.fontSize="calc(1.625rem + 5.075vw)"}if("S2"===t){this.prevStylex=this.res.style,this.res=document.createElement("h2"),this.res.style.cssText=this.prevStylex.cssText;let t=document.createTextNode(this.text);this.res.appendChild(t),this.res.style.fontSize="calc(1.500rem + 4.3vw)"}if("S3"===t){this.prevStylex=this.res.style,this.res=document.createElement("h3"),this.res.style.cssText=this.prevStylex.cssText;let t=document.createTextNode(this.text);this.res.appendChild(t),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===t){this.prevStylex=this.res.style,this.res=document.createElement("h4"),this.res.style.cssText=this.prevStylex.cssText;let t=document.createTextNode(this.text);this.res.appendChild(t),this.res.style.fontSize="calc(1.250rem + 2.75vw)"}if("S5"===t){this.prevStylex=this.res.style,this.res=document.createElement("h5"),this.res.style.cssText=this.prevStylex.cssText;let t=document.createTextNode(this.text);this.res.appendChild(t),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===t&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}setIndex(t){this.index=t}borderObj(t){let e=t.type??"solid";return this.res.style.border=`${t.width} ${e} ${t.color}`,this.res.style.borderRadius=t.radius,this}protoReact(t,e){t.sort(((t,e)=>parseInt(t.range[0])-parseInt(e.range[0])));const s=()=>{const s=window.innerWidth;let i="";this.storedQueries=t.map((t=>t.target)).filter((t=>null!=t));for(const a of t){this.counterIndex++;const[t,n]=a.range,l=parseInt(t),o=parseInt(n);let h=!0;if(a.target){h=!1;for(var r=0;r<a.target.length;r++)a.target[r]===e&&(h=!0)}s>=l&&s<=o&&h&&("gradient"===a.log&&(i+="gradient"),"blast"===a.log&&(i+="blast"),"animation"===a.log&&(i+="animation"),"shadow"===a.log&&(i+="shadow"),"span"===a.log&&(i+="span"),"filter"===a.log&&(i+="filter"),"background"===a.log&&(i+="background"))}this.res.style.margin="";let a=this.res.style.color;for(t.map((t=>t.log)).filter((t=>null!=t)).includes("gradient")&&(this.res.style.WebkitBackgroundClip="",this.res.style.background=""),this.res.style["-webkit-text-stroke"]="",this.res.style.filter="",this.res.style.textShadow="",this.res.style.border="";this.res.firstChild;)this.res.removeChild(this.res.firstChild);if(this.res.textContent=this.text,""===i&&(this.res.style["-webkit-text-fill-color"]="",this.res.style.color=a),"blast"===i){for(r=0;r<t.length;r++){const e=t[r].op.offsets;e&&void 0!==this.index&&(this.res.style.margin=e[Number(this.index)]+"px")}for(this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-text-stroke"]=this.globalBlast,r=0;r<t.length;r++){const e=t[r].op.offsets;e&&void 0!==this.index&&(this.res.style.margin=e[Number(this.index)]+"px")}}if("gradient"===i&&(this.res.style["-webkit-text-fill-color"]="transparent",this.res.style.background=this.globalGradient,this.res.style["-webkit-background-clip"]="text",this.res.style.border="1px solid orange"),"background"===i&&(this.res.style.background="orange"),"gradientblast"===i&&(this.res.style["-webkit-text-fill-color"]="transparent",this.res.style.background=this.globalGradient,this.res.style["-webkit-background-clip"]="text",this.res.style["-webkit-text-stroke"]=this.globalBlast),"gradientanimation"===i&&(this.res.style["-webkit-text-fill-color"]="transparent",this.res.style.background=this.globalGradient,this.res.style["-webkit-background-clip"]="text"),"gradientanimationshadow"===i&&(this.res.style["-webkit-text-fill-color"]="transparent",this.res.style.background=this.globalGradient,this.res.style["-webkit-background-clip"]="text",this.res.style.textShadow=this.globalShadow),"animationshadow"===i&&(this.res.style["-webkit-text-fill-color"]="",this.res.style.textShadow=this.globalShadow),"shadow"===i&&(this.res.style["-webkit-text-fill-color"]="",this.res.style.textShadow=this.globalShadow),"span"===i&&this.options.span){let t;for(t=Array.isArray(this.options.span)?this.options.span.filter((t=>"span"===t.op.name))[0]:this.options.span,this.res.textContent="",r=0;r<t.op.parts.length;r++){let e=t.op.parts[r].style,s=new Text(t.op.parts[r].text).setup({type:"span"}).set(e).render();this.res.appendChild(s)}}if("filter"===i){let t=this.options.filtera.op.filter;this.res.style.filter=t,this.res.style.border="8px solid orange"}};window.addEventListener("resize",s),s()}setPref(t){this.preffersId=t}setClass(t){this.class=t}betaReact(t,e){this.ap=!1,this.cta=0,this.once=!1,t.sort(((t,e)=>parseInt(t.range[0])-parseInt(e.range[0])));const s=()=>{const s=window.innerWidth;let i="";this.resCopy=this.res,this.storedQueries=t.map((t=>t.target)).filter((t=>null!=t));for(const a of t){this.counterIndex++;const[t,n]=a.range,l=parseInt(t),o=parseInt(n);let h=!0;if(a.target){h=!1;for(var r=0;r<a.target.length;r++)a.target[r]===e&&(h=!0)}s>=l&&s<=o&&h&&("blast"===a.log&&(i+="blast"),"shadow"===a.log&&(i+="shadow"),"background"===a.log&&(i+="background"),"gradient"===a.log&&(i+="gradient"),"spana"===a.log&&(i+="spana"),"layout"===a.log&&(i+="layout"),"margin"===a.log&&(i+="margin"),a.op&&a.op.margin&&(this.useMargin=a.op.margin))}if(this.res.style.background="",this.res.style.backgroundColor="",this.res.style.textShadow="",this.res.style.border="",this.res.style.margin="",this.res.style["-webkit-text-fill-color"]="",this.res.style["-webkit-text-stroke"]="",this.res.style["-webkit-text-stroke-width"]="","background"===i&&(this.res.style.backgroundColor="green"),"margin"===i)for(r=0;r<t.length;r++){if(!t[r].op)continue;const e=t[r].op.offsets;e&&void 0!==this.index&&(this.res.style.margin=e[Number(this.index)]+"px")}if("blastbackgroundmargin"===i){for(r=0;r<t.length;r++){if(!t[r].op)continue;const e=t[r].op.offsets;e&&void 0!==this.index&&(this.res.style.margin=e[Number(this.index)]+"px")}this.res.style.backgroundColor="green","FlexRowLayoutElement"===this.getType()?this.res.style.border="1px solid orange":(this.res.textContent=this.text,this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-text-stroke-color"]="orange",this.res.style["-webkit-text-stroke-width"]="1px"),this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-text-stroke-color"]="orange",this.res.style["-webkit-text-stroke-width"]="1px"}if("blastbackground"===i){for(r=0;r<t.length;r++){if(!t[r].op)continue;const e=t[r].op.offsets;e&&void 0!==this.index&&(this.res.style.margin=e[Number(this.index)]+"px")}this.res.style.backgroundColor="green",this.useMargin?this.res.style.margin="1rem":this.res.setAttribute("id","iofhwoiefhoih"),"FlexRowLayoutElement"===this.getType()?this.res.style.border="1px solid orange":(this.res.textContent=this.text,this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-text-stroke-color"]="orange",this.res.style["-webkit-text-stroke-width"]="1px"),this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-text-stroke-color"]="orange",this.res.style["-webkit-text-stroke-width"]="1px"}if("layout"===i&&(this.res.style.alignSelf="start",this.res.style.border="1px solid purple"),"blast"===i){for(r=0;r<t.length;r++){if(!t[r].op)continue;const e=t[r].op.offsets;e&&void 0!==this.index&&(this.res.style.margin=e[Number(this.index)]+"px")}"FlexRowLayoutElement"===this.getType()?this.res.style.border="1px solid orange":(this.res.textContent=this.text,this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-background-clip"]="text",this.res.style["-webkit-text-stroke-color"]="orange",this.res.style["-webkit-text-stroke-width"]="1px"),this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-text-stroke"]="orange",this.res.style["-webkit-text-stroke-width"]="1px"}"blastgradientbackground"===i&&(this.res.style.border="1px solid yellow",this.res.style["-webkit-text-stroke-color"]="orange",this.res.style["-webkit-text-stroke-width"]="1px"),"gradient"===i&&(this.res.style.background="linear-gradient(to left, #3498db, #1abc9c)","FlexRowLayoutElement"===this.getType()||(this.res.children[0]&&this.res.removeChild(this.res.children[0]),this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-background-clip"]="text",this.res.textContent=this.text)),"shadow"===i&&("FlexRowLayoutElement"===this.getType()||(this.res.children[0]&&this.res.removeChild(this.res.children[0]),this.res.style["-webkit-text-fill-color"]="",this.res.style["-webkit-text-fill-color"]="",this.res.style.textShadow="#1abc9cff -6px 6px , #1abc9c40 -12px 12px",this.res.textContent=this.text))};window.addEventListener("resize",s),s()}cssGen(t,e,s,i){return this.css=[""],[""]}chainReact(t,e,s){this.cssGen(t,e,this.class,void 0!==this.class),this.ap=!1,this.cta=0,this.once=!1;for(let e of t)e.range||(e.range=["0px","999999px"]);t.sort(((t,e)=>parseInt(t.range[0])-parseInt(e.range[0])));const i=()=>{const i=window.visualViewport.width;let r=[],a=[];this.resCopy=this.res,this.storedQueries=t.map((t=>t.target)).filter((t=>null!=t));for(const s of t){this.counterIndex++;const[t,l]=s.range,o=parseInt(t),h=parseInt(l);let d=!0;if(s.target){d=!1;for(var n=0;n<s.target.length;n++)s.target[n]===e&&(d=!0)}i>=o&&i<=h&&d&&(r.push(s.log),a.push(s),s.op&&s.op.margin&&(this.useMargin=s.op.margin))}if(s&&!s.includes("background")&&(this.res.style.background="",this.res.style.backgroundColor=""),this.res.style.textShadow="",s&&!s.includes("border")&&(this.res.style.border=""),s&&!s.includes("margin")&&(this.res.style.margin=""),this.res.style["-webkit-text-fill-color"]="",this.res.style["-webkit-text-stroke-color"]="",this.res.style["-webkit-text-stroke-width"]="",this.res.style.filter="",(r.includes("gradient")||r.includes("shadow"))&&(this.res.style.position="relative",this.res.style.zIndex=-1),r.includes("blast")){let t=a.filter((t=>"blast"===t.log))[0].op.color,e=a.filter((t=>"blast"===t.log))[0].op.width??"1px";"FlexRowLayoutElement"===this.getType()?this.res.style.border=`${e}px solid orange`:(this.res.textContent=this.text,this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-text-stroke-color"]=t,this.res.style["-webkit-text-stroke-width"]=`${e}`)}if(r.includes("filter")){let t=a.filter((t=>"filter"===t.log))[0].op.filter;this.res.style.filter=t}if(r.includes("background")&&(this.res.style.backgroundColor="green"),r.includes("gradient")&&(this.res.style["-webkit-text-fill-color"]="transparent",this.res.style.background=this.globalGradient,this.res.style["background-clip"]="text"),r.includes("shadow"))if("FlexRowLayoutElement"===this.getType());else{let t="",e=0;for(n=0;n<this.options.shadow.op.steps;n++)e+=3,t+=`drop-shadow(${e}px ${e}px ${e}px gray) `;this.res.style.filter=t}if(r.includes("margin"))for(n=0;n<t.length;n++){if(!t[n].op)continue;const e=t[n].op.offsets;e&&void 0!==this.index&&(this.res.style.margin=e[Number(this.index)]+"px")}if(r.includes("animation")){if(this.options.animation&&!this.hasAnimated&&!this.options.animation.op.fireAt){this.hasAnimated=!0;let t=this.options.animation.op;this.res.animate(t.keyframesClose,{duration:0,fill:"forwards"}),this.res.animate(t.keyframesOpen,t.openOptions)}if(this.options.animation&&this.options.animation.op.fireAt&&this.options.animation.op.fireAt.endsWith("px")){let t=this.options.animation.op;this.res.animate(t.keyframesClose,{duration:0,fill:"forwards"});const e=()=>{window.scrollY>parseFloat(t.fireAt)&&(this.res.animate(t.keyframesOpen,t.openOptions),window.removeEventListener("scroll",e))};window.addEventListener("scroll",e)}if(this.options.animation&&this.options.animation.op.fireAt&&"inview"===this.options.animation.op.fireAt){let t=this.options.animation.op;this.res.animate(t.keyframesClose,{duration:0,fill:"forwards"}),new IntersectionObserver(((e,s)=>{e.forEach((e=>{e.isIntersecting&&(this.res.animate(t.keyframesOpen,t.openOptions),s.disconnect())}))})).observe(this.res)}}};window.addEventListener("resize",i),i()}reactOnTransform=t=>{if(t.transform||t.op&&t.op.transform){let e=t.transform;t.transform||(e=t.op.transform),e.duration||(e.duration="3s-ease-in-out"),this.setDefault=(t,e="0px")=>0===t.length?e+" ":t;const s=t=>{const e=t.match(/rotate\(([^)]+)\)/);if(!e)return t;const s=e[1].split(",").map((t=>t.trim()));return 1===s.length?`rotate(${s[0]})`:2===s.length?`rotateX(${s[0]}) rotateY(${s[1]})`:3===s.length?`rotateX(${s[0]}) rotateY(${s[1]}) rotate(${s[2]})`:t},i=()=>{let i="",r="",a="",n="",l="",o="",h="",d="",p="";if(0===e.values.length)return;e.values.forEach((t=>{t.startsWith("tx:")&&(i=t.replace("tx:","")),t.startsWith("ty:")&&(r=t.replace("ty:","")),t.startsWith("tz:")?a=t.replace("tz:",""):t.startsWith("scale(")?n=t:t.startsWith("skew(")?l=t:t.startsWith("rotate(")?o=s(t):t.startsWith("perspective(")?h=t:t.startsWith("matrix(")?d=t:t.startsWith("opacity:")&&(p=t.replace("opacity:",""))})),i=this.setDefault(i),r=this.setDefault(r),a=this.setDefault(a);let c="";if("0px"!=r&&"0px"!=i&&"0px"!=a?c+=`translate3d(${i}, ${r}, ${a})`:"0px"==r&&"0px"==i||(c+=`translate(${i}, ${r})`),n&&(c+=` ${n}`),o&&(c+=` ${o}`),l&&(c+=` ${l}`),h&&(c+=` ${h}`),d&&(c+=` ${d}`),c){if(t.op.transform.duration){let e=t.op.transform.duration.replace(/^(\d+)(s)-/,((t,e,s)=>e/2+s+" ")),s=`transform ${e}, opacity ${e}`;this.res.style.transition=s}else this.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";this.res.style.transform=c,this.res.style.opacity=p}};e.on?this.res.addEventListener(e.on,(()=>{e.delay?setTimeout((()=>{i()}),e.delay):i()})):window.addEventListener("load",(()=>{e.delay?setTimeout((()=>{i()}),e.delay):i()}));const r=()=>{let t="";e.values.forEach((e=>{e.startsWith("tx:")?t+="translateX(0) ":e.startsWith("ty:")?t+="translateY(0) ":e.startsWith("tz:")?t+="translateZ(0) ":e.startsWith("scale(")?t+="scale(1) ":e.startsWith("skew(")?t+="skew(0, 0) ":e.startsWith("rotate(")?t+="rotate(0) ":e.startsWith("perspective(")?t+="perspective(0) ":e.startsWith("matrix(")&&(t+="matrix(1, 0, 0, 1, 0, 0) "),this.res.style.opacity="1"})),t&&(this.res.style.transform=t.trim())};if(e.on)this.res.addEventListener("mouseout",(()=>{e.keep||r()}));else{let t=1e3*parseFloat(e.duration),s=e.closeAfter?e.closeAfter:0;setTimeout((()=>{e.keep||r()}),t/2+s)}}};maxWidth(t){return this.res.style.maxWidth=t,this}removeQuotesFromFirstWord(t){return t.replace(/"([^"]+)":/g,"$1:")}arrayMargin(t,e){return t.includes("left")&&(this.res.style.marginLeft=e),t.includes("right")&&(this.res.style.marginRight=e),t.includes("top")&&(this.res.style.marginTop=e),t.includes("bottom")&&(this.res.style.marginBottom=e),t.includes("all")&&(this.res.style.margin=e),e||(this.res.style.marginBottom=t),this}navBarExpand(){return this.res.style.backgroundColor="green",this.res.animate([{transform:"scaleY(3.0)"}],{duration:2e3,iterations:1,fill:"both"}),this}scrollFade(t,e){return this.res.style.visibility="hidden",this.faden(t,e,"scroll"),this}expand(t){return!1===this.state.isExpanded?"click"===t.on?this.res.addEventListener("click",(()=>{this.innerExpand(t)})):this.innerExpand(t):this.innerExpandBack(t),this.state.isExpanded=!this.state.isExpanded,this}move(t){return"click"===t.on?this.res.addEventListener("click",(()=>{this.moveUpa(t)})):("up"===t.direction&&this.moveUpa(t),"down"===t.direction&&this.moveDowna(t),this.state.isMovedUp=!this.state.isMovedUp,"left"===t.direction&&this.moveLeft(t)),this}moveLeft(t){return this.res.animate([{transform:"translateX(0px)"},{transform:`translateX(-${t.distance})`}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}moveUpa(t){return!1===this.state.isMovedUp?this.res.animate([{transform:"translateX(0px)"},{transform:`translateY(-${t.distance})`}],{duration:900,iterations:t.iterations,fill:"both"}).play():this.res.animate([{transform:"translateX(0px)"},{transform:`translateY(${t.distance})`}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}moveDowna(t){return!1===this.state.isMovedDown?this.res.animate([{transform:"translateX(0px)"},{transform:`translateY(${t.distance})`}],{duration:900,iterations:t.iterations,fill:"both"}).play():this.res.animate([{transform:"translateX(0px)"},{transform:`translateY(-${t.distance})`}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}moveUpaBack(t){return this.res.animate([{transform:"translateX(0px)"}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}innerExpandBack(t){this.res.animate([{width:this.prevWidth,height:this.prevHeight}],{duration:900,iterations:t.iterations,fill:"both"})}innerExpand(t){return this.prevWidth=this.res.style.width,this.prevHeight=this.res.style.height,this.res.animate([{width:this.prevWidth,height:this.prevHeight},{width:t.width??this.prevWidth,height:t.height??this.prevHeight}],{duration:900,iterations:t.iterations,fill:"both"}),this}fade(t){return this.res.style.visibility="hidden",this.faden(t.duration,t.from,"load"),t.finalOpacity&&(this.finalOpacity=t.finalOpacity),this}faden(t,e,s){return this.res.style.visibility="hidden",this.scrolled=!1,window.addEventListener(s,(()=>{this.res.style.visibility="visible";var i=window.innerHeight;(this.res.getBoundingClientRect().top-i<=0||"load"==s)&&0==this.scrolled&&("left"==e&&this.res.animate([{transform:"translateX(-30px)"},{transform:"translateX(0px)"}],{duration:t,iterations:1}),"right"==e&&this.res.animate([{transform:"translateX(30px)"},{transform:"translateX(0px)"}],{duration:t,iterations:1}),"top"==e&&this.res.animate([{transform:"translateY(-30px)"},{transform:"translateY(0px)"}],{duration:t,iterations:1}),"bottom"==e&&this.res.animate([{transform:"translateY(30px)"},{transform:"translateY(0px)"}],{duration:t,iterations:1}),this.res.animate([{opacity:"0.0"},{opacity:"1.0"}],{duration:t,iterations:1}),this.scrolled=!0)})),this}}class i extends s{constructor(t){super(),this.res=null,this.setup(t),this.code=[],this.isLast=!1,this.code.push("\n new Wrapper() \n")}isLasta(){return this.isLast=!0,this}toCode(){return this.code}getType(){return"LayoutWrapperElement"}setArea(t){return this.res.style.gridArea=t,this}removeQuotesFromFirstWord(t){return t.replace(/"([^"]+)":/g,"$1:")}clicked(t){return this.res.addEventListener("click",t),this}gpos(t){return this.res.style.gridColumn=t.col,this.res.style.gridRow=t.row,this}set(t){let e=".set({";if(t.pad&&this.pad(t.pad),t.arrpad&&(e+=`pad: {sides: [${t.arrpad.sides.map((t=>`"${t}"`)).join(", ")}], value: "${t.arrpad.value}"}, `),t.gpos&&this.gpos(t.gpos),t&&t.id&&t.stroke||t&&t.id&&t.gradient||t&&t.id&&t.span||t&&t.id&&t.layout){t.gradient,t.gradient&&(this.globalGradient=t.gradient.op.gradient),t.stroke&&super.setAny({globalBlast:`${t.stroke.op.width} ${t.stroke.op.color}`});let e=[t.stroke,t.gradient,t.animation,t.span,t.layout];e=e.filter((t=>null!=t));let i=[];for(var s=0;s<e.length;s++)i.push({range:e[s].range,log:e[s].op.name,target:e[s].target});this.res.setAttribute("id",t.id),this.betaReact(i,t.id)}t.socenter&&(this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.alignItems="center",t.socenter&&(e+=`socenter: ${t.socenter},`)),t.mboth&&(this.res.style.marginRight="auto")&&(this.res.style.marginLeft="auto"),t.mar&&this.mar(t.mar),t.sticky&&this.sticky(),t.transition&&(this.res.style.transition=t.transition),t.class&&this.res.setAttribute("class",t.class),t.ga&&(this.res.style.gridArea=t.ga),t.opacity&&(0==t.opacity&&(this.res.style.opacity=0),t.opacity&&(this.res.style.opacity=t.opacity)),t.maxHeight&&(this.res.style.maxHeight=t.maxHeight),t.id&&this.res.setAttribute("id",t.id),t.arrpad&&this.arrayPadding(t.arrpad.sides,t.arrpad.value),t.arrpad&&(e+=`arrpad: {sides: [${t.arrpad.sides.map((t=>`"${t}"`)).join(", ")}], value: "${t.arrpad.value}"}, `),t.arrayMargin&&this.arrayMargin(t.arrayMargin.sides,t.arrayMargin.value),t.arrayMargin&&(e+=`\n arrayMargin: {sides: ["${t.arrayMargin.sides}"], value: "${t.arrayMargin.value}"},`),t.center&&this.toCenter(t.center),t.center&&(e+=`center: "${t.center}",`),t.simpleCenter&&this.simpleCenter(),t.simpleCenter&&(e+=`center: "${t.simpleCenter}",`),t.filter&&(this.res.style.backdropFilter="blur(3px)"),t.radius&&this.corner(t.radius),t.radius&&(e+=`\n radius: "${t.radius}",`),t.border&&this.border(t.border),t.simpleBorder&&(this.res.style.border=t.simpleBorder),t.width&&this.width(t.width),t.width&&(e+=`\n width: "${t.width}",`),t.overflow&&(this.res.style.overflow="hidden"),t.overflow&&(e+=`\n overflow: "${t.overflow}",`),t.height&&this.heightNoAuto(t.height),t.height&&(e+=`\n height: "${t.height}",`),t.align&&this.flexAlign(t.align),t.align&&(e+=`\n align: "${t.align}",`),t.borderObj&&(this.res.style.borderRight=`${t.borderObj.width} solid ${t.borderObj.color}`,this.res.style.borderRadius=t.borderObj.radius),t.borderObja&&(this.res.style.border=`${t.borderObja.width} solid ${t.borderObja.color}`,this.res.style.borderRadius=t.borderObja.radius),t.font&&this.font(t.font),t.font&&(e+=`font: "${t.font}",`),t.maxWidth&&this.maxWidth(t.maxWidth),t.flexCenter&&this.flexc(t.flexCenter),t.multipad&&this.makeMultiPad(t.multipad),t.multimargin&&this.makeMultiMargin(t.multimargin),t.color&&this.color(t.color),t.background&&this.background(t.background),t.background&&(e+=`background: "${t.background}",`),t.weight&&this.weight(t.weight),t.paddings&&this.paddingo(t.paddings),t.area&&this.setArea(t.area),t.area&&(e+=`area: "${t.area}"`),t.column&&this.makeCol(),t.column&&(e+=`\n column: "${t.column}",`),t.alignIts&&(this.res.style.background="gray"),t.alignIts&&(this.res.style.alignItems="flex-start"),t.alignIts&&(this.res.style.justifyItems="flex-start"),t.customAlign&&(this.res.style.alignItems=t.customAlign),t.customJustify&&(this.res.style.justifyItems=t.customJustify),t.disp&&(this.res.style.display=t.disp),t.flexDir&&(this.res.style.flexDirection=t.flexDir),t.flexDir&&(this.res.style.display="flex"),t.flexDir&&(e+=`\n flexDir: "${t.flexDir}",`),t.zIndex&&(this.res.style.zIndex=t.zIndex),t.name&&(this.name=t.name),t.responsive&&this.rsp(t.responsive),t.stretch&&(t.stretch&&this.stretch(t.stretch),e+=`\n stretch: ${this.removeQuotesFromFirstWord(JSON.stringify(t.stretch))},`);for(let e in t)if("margin"===e){let s=t[e];if(Array.isArray(s)&&s.length>0)for(let t of s){let e=t;e.hasOwnProperty("top")&&(this.res.style.marginTop=e.top),e.hasOwnProperty("right")&&(this.res.style.marginRight=e.right),e.hasOwnProperty("bottom")&&(this.res.style.marginBottom=e.bottom),e.hasOwnProperty("left")&&(this.res.style.marginLeft=e.left)}}return e+="})\n",8===e.length&&(e=""),this.code.push(e),this}rsp(t){this.res.style.display="flex";let e=t.sequence.split("-");const s=()=>{let s=t.ranges;"0px"!==s[0]&&s.unshift("0px");for(var i=0;i<s.length-1;i++)(window.matchMedia(`(min-width: ${s[i]}) and (max-width: ${s[i+1]})`).matches||window.matchMedia(`(min-width: ${s[s.length-1]})`).matches)&&("row"===e[i]&&(this.res.style.flexDirection="row",this.res.style.border="3px solid green"),"col"===e[i]&&(this.res.style.flexDirection="column",this.res.style.border="3px solid purple"));return this};window.addEventListener("resize",s),s()}sticky(){return this.res.style.position="sticky",this.res.style.top=0,this}toSticky(){return this.res.style.position="sticky",this.res.style.top="0",this}stretch(t){const e=()=>{window.matchMedia(`(max-width: ${t.at})`).matches?this.res.style.width="auto":window.matchMedia("(max-device-width: 415px)").matches?this.res.style.width="100%":this.res.style.width=t.backTo};e(),window.addEventListener("resize",e)}makeCol(){return this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.alignItems="flex-start",this}paddingo(t){return this.res.style.padding=t,this}toCenter(t){return this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.justifyContent="center","both"===t&&(this.res.style.alignItems="center"),this}simpleCenter(){return this.res.style.justifyContent="center",this.res.style.justifyItems="center",this.res.style.alignContent="center",this.res.style.alignItems="center",this}color(t){return this.res.style.color=t,this}weight(t){return this.res.style.fontWeight=t,this}makeMultiPad(t){for(var e=0;e<t.length;e++)"left"===t[e].side&&(this.res.style.paddingLeft=t[e].value),"right"===t[e].side&&(this.res.style.paddingRight=t[e].value);return this}makeMultiMargin(t){this.res.style.zIndex="1";for(var e=0;e<t.length;e++)"left"===t[e].side&&(this.res.style.marginLeft=t[e].value),"right"===t[e].side&&(this.res.style.marginRight=t[e].value),"top"===t[e].side&&(this.res.style.marginTop=t[e].value),"bottom"===t[e].side&&(this.res.style.marginBottom=t[e].value);return this}flexc(t){return this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.justifyContent="center",this}maxWidth(t){return this.res.style.maxWidth=t,this}font(t){return this.res.style.fontFamily=t,this}flexAlign(t){return this.res.style.display="flex",this.res.style.justifyContent="flex-start",this.res.style.alignItems="flex-start","center"===t?(this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.alignItems="center",this):this}width(t){return this.res.style.width=t,this}heightNoAuto(t){return this.res.style.height=t,this}border(t){return this.res.style.borderRadius=`${t.radius}px`,this.res.style.padding="0.25em",this.res.style.border=`${t.width}px solid ${t.color}`,this}toCol(){return this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.justifyContent="center",this.res.style.alignItems="center",this}add(t){this.items=t,this.code.push(".add([ \n");let e=t.map(((e,s)=>e.toCode().flatMap((t=>t)).join("")+(s<t.length-1?",":""))).join("");this.code.push(e);for(var s=0;s<t.length;s++)if(void 0!==t[s]&&void 0!==t[s].toCode){let e=t[s].render();this.res.appendChild(e)}return this.code.push("])"),this}arrayPadding(t,e){return t.includes("left")&&(this.res.style.paddingLeft=e),t.includes("right")&&(this.res.style.paddingRight=e),t.includes("top")&&(this.res.style.paddingTop=e),t.includes("bottom")&&(this.res.style.paddingBottom=e),this}arrayMargin(t,e){return e||(this.res.style.marginLeft=`${t[0]}px`,this.res.style.marginTop=`${t[1]}px`,this.res.style.marginRight=`${t[2]}px`,this.res.style.marginBottom=`${t[3]}px`),t.includes("left")&&(this.res.style.marginLeft=e),t.includes("right")&&(this.res.style.marginRight=e),t.includes("top")&&(this.res.style.marginTop=e),t.includes("bottom")&&(this.res.style.marginBottom=e),this}setWidth(t){this.res.style.width="100vw"}setHeight(t){return this.res.style.height=`${t}`,this}setup(t){let e=t?document.createElement(t.isLink?"a":"div"):document.createElement("div");return t&&t.isLink&&(e.style.textDecoration="none",e.setAttribute("href",t.child)),this.res=e,this.res.style.margin=0,this.res.style.padding=0,t&&!0===t.hideOverflow&&(this.res.style.overflow="hidden",this.res.style.overflowY="scroll"),t&&!0===t.center&&(this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.justifyContent="center",this.res.style.alignItems="center"),t&&"left"===t.align&&(this.res.style.alignItems="flex-start"),t&&"right"===t.align&&(this.res.style.alignItems="flex-end"),t&&t.height&&(this.res.style.height=t.height),t&&t.width&&(this.res.style.width=t.width,this.res.style.marginLeft="auto",this.res.style.marginRight="auto",window.matchMedia("(max-device-width: 415px)").matches&&(this.res.style.width="95%")),this}height(t){return this.res.style.width="auto",this.res.style.height=`${t}`,this}size(t,e){return this.w=t,this.h=e,this.w?this.res.style.width=this.w:this.res.style.width=window.innerWidth,this.h?this.res.style.height=this.h:this.res.style.height=window.innerHeight,this}background(t){return this.res.style.background=t,this}corner(t){return this.res.style.borderRadius=t,this}padding(t,e,s,i){return this.res.style.paddingLeft=t,this.res.style.paddingTop=e,this.res.style.paddingRight=s,this.res.style.paddingBottom=i,this}margin(t,e,s,i){return this.res.style.marginLeft=t,this.res.style.marginTop=e,this.res.style.marginRight=s,this.res.style.marginBottom=i,this}itemWidth(t){for(var e=0;e<this.res.childNodes.length;e++)this.res.childNodes[e].style.width=t;return this}apply(t){const e=()=>{for(var e=0;e<t.length;e++){let s=t[e],i=window.matchMedia(`(max-width: ${s.width}px)`);s.device&&(i=window.matchMedia(`(max-device-width: ${s.width}px)`),alert(s.device)),i.matches&&Object.assign(this.res.style,s.styles)}};let s=window.matchMedia(`(max-width: ${t[0].width}px)`);return t[0].device&&(s=window.matchMedia(`(max-device-width: ${t[0].width}px)`)),s.matches||Object.assign(this.res.style,t[0].styles),e(),window.addEventListener("resize",e),this}mount(t){document.querySelector(t).appendChild(this.res)}render(t){return t?(document.querySelector("#mount"),document.querySelector(t).appendChild(this.res),this):this.res}}module.exports=e})();
|
|
1
|
+
/*! For license information please see container.cjs.js.LICENSE.txt */
|
|
2
|
+
(()=>{"use strict";var t={d:(e,r)=>{for(var s in r)t.o(r,s)&&!t.o(e,s)&&Object.defineProperty(e,s,{enumerable:!0,get:r[s]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function r(t){return r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r(t)}function s(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var s,i,n,a,o=[],l=!0,c=!1;try{if(n=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(s=n.call(r)).done)&&(o.push(s.value),o.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return o}}(t,e)||n(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function i(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=n(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var s=0,i=function(){};return{s:i,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){l=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function n(t,e){if(t){if("string"==typeof t)return a(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(t,e):void 0}}function a(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,s=Array(e);r<e;r++)s[r]=t[r];return s}function o(t,e){for(var r=0;r<e.length;r++){var s=e[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,l(s.key),s)}}function l(t){var e=function(t){if("object"!=r(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var s=e.call(t,"string");if("object"!=r(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==r(e)?e:e+""}function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function u(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return h(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?h(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var s=0,i=function(){};return{s:i,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,a=!0,o=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){o=!0,n=t},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw n}}}}function h(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,s=Array(e);r<e;r++)s[r]=t[r];return s}function d(t,e){for(var r=0;r<e.length;r++){var s=e[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,y(s.key),s)}}function y(t){var e=function(t){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(f=function(){return!!t})()}function p(){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var s=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=m(t)););return t}(t,e);if(s){var i=Object.getOwnPropertyDescriptor(s,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},p.apply(null,arguments)}function m(t){return m=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},m(t)}function g(t,e){return g=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},g(t,e)}t.r(e),t.d(e,{Wrapper:()=>v});var v=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,r){return e=m(e),function(t,e){if(e&&("object"==c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,f()?Reflect.construct(e,r||[],m(t).constructor):e.apply(t,r))}(this,e)).res=null,r.setup(t),r.code=[],r.isLast=!1,r.code.push("\n new Wrapper() \n"),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&g(t,e)}(e,t),r=e,s=[{key:"isLasta",value:function(){return this.isLast=!0,this}},{key:"toCode",value:function(){return this.code}},{key:"getType",value:function(){return"LayoutWrapperElement"}},{key:"setArea",value:function(t){return this.res.style.gridArea=t,this}},{key:"removeQuotesFromFirstWord",value:function(t){return t.replace(/"([^"]+)":/g,"$1:")}},{key:"clicked",value:function(t){return this.res.addEventListener("click",t),this}},{key:"gpos",value:function(t){return this.res.style.gridColumn=t.col,this.res.style.gridRow=t.row,this}},{key:"set",value:function(t){var r,s,i,n=".set({";if(t.pad&&this.pad(t.pad),t.arrpad&&(n+="pad: {sides: [".concat(t.arrpad.sides.map((function(t){return'"'.concat(t,'"')})).join(", "),'], value: "').concat(t.arrpad.value,'"}, ')),t.gpos&&this.gpos(t.gpos),t&&t.id&&t.stroke||t&&t.id&&t.gradient||t&&t.id&&t.span||t&&t.id&&t.layout){t.gradient,t.gradient&&(this.globalGradient=t.gradient.op.gradient),t.stroke&&(r=e,s=this,"function"==typeof(i=p(m(1&3?r.prototype:r),"setAny",s))?function(t){return i.apply(s,t)}:i)([{globalBlast:"".concat(t.stroke.op.width," ").concat(t.stroke.op.color)}]);var a=[t.stroke,t.gradient,t.animation,t.span,t.layout];a=a.filter((function(t){return null!=t}));for(var o=[],l=0;l<a.length;l++)o.push({range:a[l].range,log:a[l].op.name,target:a[l].target});this.res.setAttribute("id",t.id),this.betaReact(o,t.id)}if(t.socenter&&(this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.alignItems="center",t.socenter&&(n+="socenter: ".concat(t.socenter,","))),t.mboth&&(this.res.style.marginRight="auto")&&(this.res.style.marginLeft="auto"),t.mar&&this.mar(t.mar),t.sticky&&this.sticky(),t.transition&&(this.res.style.transition=t.transition),t.class&&this.res.setAttribute("class",t.class),t.ga&&(this.res.style.gridArea=t.ga),t.opacity&&(0==t.opacity&&(this.res.style.opacity=0),t.opacity&&(this.res.style.opacity=t.opacity)),t.maxHeight&&(this.res.style.maxHeight=t.maxHeight),t.id&&this.res.setAttribute("id",t.id),t.arrpad&&this.arrayPadding(t.arrpad.sides,t.arrpad.value),t.arrpad&&(n+="arrpad: {sides: [".concat(t.arrpad.sides.map((function(t){return'"'.concat(t,'"')})).join(", "),'], value: "').concat(t.arrpad.value,'"}, ')),t.arrayMargin&&this.arrayMargin(t.arrayMargin.sides,t.arrayMargin.value),t.arrayMargin&&(n+='\n arrayMargin: {sides: ["'.concat(t.arrayMargin.sides,'"], value: "').concat(t.arrayMargin.value,'"},')),t.center&&this.toCenter(t.center),t.center&&(n+='center: "'.concat(t.center,'",')),t.simpleCenter&&this.simpleCenter(),t.simpleCenter&&(n+='center: "'.concat(t.simpleCenter,'",')),t.filter&&(this.res.style.backdropFilter="blur(3px)"),t.radius&&this.corner(t.radius),t.radius&&(n+='\n radius: "'.concat(t.radius,'",')),t.border&&this.border(t.border),t.simpleBorder&&(this.res.style.border=t.simpleBorder),t.width&&this.width(t.width),t.width&&(n+='\n width: "'.concat(t.width,'",')),t.overflow&&(this.res.style.overflow="hidden"),t.overflow&&(n+='\n overflow: "'.concat(t.overflow,'",')),t.height&&this.heightNoAuto(t.height),t.height&&(n+='\n height: "'.concat(t.height,'",')),t.align&&this.flexAlign(t.align),t.align&&(n+='\n align: "'.concat(t.align,'",')),t.borderObj&&(this.res.style.borderRight="".concat(t.borderObj.width," solid ").concat(t.borderObj.color),this.res.style.borderRadius=t.borderObj.radius),t.borderObja&&(this.res.style.border="".concat(t.borderObja.width," solid ").concat(t.borderObja.color),this.res.style.borderRadius=t.borderObja.radius),t.font&&this.font(t.font),t.font&&(n+='font: "'.concat(t.font,'",')),t.maxWidth&&this.maxWidth(t.maxWidth),t.flexCenter&&this.flexc(t.flexCenter),t.multipad&&this.makeMultiPad(t.multipad),t.multimargin&&this.makeMultiMargin(t.multimargin),t.color&&this.color(t.color),t.background&&this.background(t.background),t.background&&(n+='background: "'.concat(t.background,'",')),t.weight&&this.weight(t.weight),t.paddings&&this.paddingo(t.paddings),t.area&&this.setArea(t.area),t.area&&(n+='area: "'.concat(t.area,'"')),t.column&&this.makeCol(),t.column&&(n+='\n column: "'.concat(t.column,'",')),t.alignIts&&(this.res.style.background="gray"),t.alignIts&&(this.res.style.alignItems="flex-start"),t.alignIts&&(this.res.style.justifyItems="flex-start"),t.customAlign&&(this.res.style.alignItems=t.customAlign),t.customJustify&&(this.res.style.justifyItems=t.customJustify),t.disp&&(this.res.style.display=t.disp),t.flexDir&&(this.res.style.flexDirection=t.flexDir),t.flexDir&&(this.res.style.display="flex"),t.flexDir&&(n+='\n flexDir: "'.concat(t.flexDir,'",')),t.zIndex&&(this.res.style.zIndex=t.zIndex),t.name&&(this.name=t.name),t.responsive&&this.rsp(t.responsive),t.stretch){t.stretch&&this.stretch(t.stretch);var c=this.removeQuotesFromFirstWord(JSON.stringify(t.stretch));n+="\n stretch: ".concat(c,",")}for(var h in t)if("margin"===h){var d=t[h];if(Array.isArray(d)&&d.length>0){var y,f=u(d);try{for(f.s();!(y=f.n()).done;){var g=y.value;g.hasOwnProperty("top")&&(this.res.style.marginTop=g.top),g.hasOwnProperty("right")&&(this.res.style.marginRight=g.right),g.hasOwnProperty("bottom")&&(this.res.style.marginBottom=g.bottom),g.hasOwnProperty("left")&&(this.res.style.marginLeft=g.left)}}catch(t){f.e(t)}finally{f.f()}}}return 8===(n+="})\n").length&&(n=""),this.code.push(n),this}},{key:"rsp",value:function(t){var e=this;this.res.style.display="flex";var r=t.sequence.split("-"),s=function(){var s=t.ranges;"0px"!==s[0]&&s.unshift("0px");for(var i=0;i<s.length-1;i++)(window.matchMedia("(min-width: ".concat(s[i],") and (max-width: ").concat(s[i+1],")")).matches||window.matchMedia("(min-width: ".concat(s[s.length-1],")")).matches)&&("row"===r[i]&&(e.res.style.flexDirection="row",e.res.style.border="3px solid green"),"col"===r[i]&&(e.res.style.flexDirection="column",e.res.style.border="3px solid purple"));return e};window.addEventListener("resize",s),s()}},{key:"sticky",value:function(){return this.res.style.position="sticky",this.res.style.top=0,this}},{key:"toSticky",value:function(){return this.res.style.position="sticky",this.res.style.top="0",this}},{key:"stretch",value:function(t){var e=this,r=function(){window.matchMedia("(max-width: ".concat(t.at,")")).matches?e.res.style.width="auto":window.matchMedia("(max-device-width: 415px)").matches?e.res.style.width="100%":e.res.style.width=t.backTo};r(),window.addEventListener("resize",r)}},{key:"makeCol",value:function(){return this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.alignItems="flex-start",this}},{key:"paddingo",value:function(t){return this.res.style.padding=t,this}},{key:"toCenter",value:function(t){return this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.justifyContent="center","both"===t&&(this.res.style.alignItems="center"),this}},{key:"simpleCenter",value:function(){return this.res.style.justifyContent="center",this.res.style.justifyItems="center",this.res.style.alignContent="center",this.res.style.alignItems="center",this}},{key:"color",value:function(t){return this.res.style.color=t,this}},{key:"weight",value:function(t){return this.res.style.fontWeight=t,this}},{key:"makeMultiPad",value:function(t){for(var e=0;e<t.length;e++)"left"===t[e].side&&(this.res.style.paddingLeft=t[e].value),"right"===t[e].side&&(this.res.style.paddingRight=t[e].value);return this}},{key:"makeMultiMargin",value:function(t){this.res.style.zIndex="1";for(var e=0;e<t.length;e++)"left"===t[e].side&&(this.res.style.marginLeft=t[e].value),"right"===t[e].side&&(this.res.style.marginRight=t[e].value),"top"===t[e].side&&(this.res.style.marginTop=t[e].value),"bottom"===t[e].side&&(this.res.style.marginBottom=t[e].value);return this}},{key:"flexc",value:function(t){return this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.justifyContent="center",this}},{key:"maxWidth",value:function(t){return this.res.style.maxWidth=t,this}},{key:"font",value:function(t){return this.res.style.fontFamily=t,this}},{key:"flexAlign",value:function(t){return this.res.style.display="flex",this.res.style.justifyContent="flex-start",this.res.style.alignItems="flex-start","center"===t?(this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.alignItems="center",this):this}},{key:"width",value:function(t){return this.res.style.width=t,this}},{key:"heightNoAuto",value:function(t){return this.res.style.height=t,this}},{key:"border",value:function(t){return this.res.style.borderRadius="".concat(t.radius,"px"),this.res.style.padding="0.25em",this.res.style.border="".concat(t.width,"px solid ").concat(t.color),this}},{key:"toCol",value:function(){return this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.justifyContent="center",this.res.style.alignItems="center",this}},{key:"add",value:function(t){this.items=t,this.code.push(".add([ \n");var e=t.map((function(e,r){return e.toCode().flatMap((function(t){return t})).join("")+(r<t.length-1?",":"")})).join("");this.code.push(e);for(var r=0;r<t.length;r++)if(void 0!==t[r]&&void 0!==t[r].toCode){var s=t[r].render();this.res.appendChild(s)}return this.code.push("])"),this}},{key:"arrayPadding",value:function(t,e){return t.includes("left")&&(this.res.style.paddingLeft=e),t.includes("right")&&(this.res.style.paddingRight=e),t.includes("top")&&(this.res.style.paddingTop=e),t.includes("bottom")&&(this.res.style.paddingBottom=e),this}},{key:"arrayMargin",value:function(t,e){return e||(this.res.style.marginLeft="".concat(t[0],"px"),this.res.style.marginTop="".concat(t[1],"px"),this.res.style.marginRight="".concat(t[2],"px"),this.res.style.marginBottom="".concat(t[3],"px")),t.includes("left")&&(this.res.style.marginLeft=e),t.includes("right")&&(this.res.style.marginRight=e),t.includes("top")&&(this.res.style.marginTop=e),t.includes("bottom")&&(this.res.style.marginBottom=e),this}},{key:"setWidth",value:function(t){this.res.style.width="100vw"}},{key:"setHeight",value:function(t){return this.res.style.height="".concat(t),this}},{key:"setup",value:function(t){var e=t?document.createElement(t.isLink?"a":"div"):document.createElement("div");return t&&t.isLink&&(e.style.textDecoration="none",e.setAttribute("href",t.child)),this.res=e,this.res.style.margin=0,this.res.style.padding=0,t&&!0===t.hideOverflow&&(this.res.style.overflow="hidden",this.res.style.overflowY="scroll"),t&&!0===t.center&&(this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.justifyContent="center",this.res.style.alignItems="center"),t&&"left"===t.align&&(this.res.style.alignItems="flex-start"),t&&"right"===t.align&&(this.res.style.alignItems="flex-end"),t&&t.height&&(this.res.style.height=t.height),t&&t.width&&(this.res.style.width=t.width,this.res.style.marginLeft="auto",this.res.style.marginRight="auto",window.matchMedia("(max-device-width: 415px)").matches&&(this.res.style.width="95%")),this}},{key:"height",value:function(t){return this.res.style.width="auto",this.res.style.height="".concat(t),this}},{key:"size",value:function(t,e){return this.w=t,this.h=e,this.w?this.res.style.width=this.w:this.res.style.width=window.innerWidth,this.h?this.res.style.height=this.h:this.res.style.height=window.innerHeight,this}},{key:"background",value:function(t){return this.res.style.background=t,this}},{key:"corner",value:function(t){return this.res.style.borderRadius=t,this}},{key:"padding",value:function(t,e,r,s){return this.res.style.paddingLeft=t,this.res.style.paddingTop=e,this.res.style.paddingRight=r,this.res.style.paddingBottom=s,this}},{key:"margin",value:function(t,e,r,s){return this.res.style.marginLeft=t,this.res.style.marginTop=e,this.res.style.marginRight=r,this.res.style.marginBottom=s,this}},{key:"itemWidth",value:function(t){for(var e=0;e<this.res.childNodes.length;e++)this.res.childNodes[e].style.width=t;return this}},{key:"apply",value:function(t){var e=this,r=function(){for(var r=0;r<t.length;r++){var s=t[r],i=window.matchMedia("(max-width: ".concat(s.width,"px)"));s.device&&(i=window.matchMedia("(max-device-width: ".concat(s.width,"px)")),alert(s.device)),i.matches&&Object.assign(e.res.style,s.styles)}},s=window.matchMedia("(max-width: ".concat(t[0].width,"px)"));return t[0].device&&(s=window.matchMedia("(max-device-width: ".concat(t[0].width,"px)"))),s.matches||Object.assign(this.res.style,t[0].styles),r(),window.addEventListener("resize",r),this}},{key:"mount",value:function(t){document.querySelector(t).appendChild(this.res)}},{key:"render",value:function(t){return t?(document.querySelector("#mount"),document.querySelector(t).appendChild(this.res),this):this.res}}],s&&d(r.prototype,s),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,s}(function(){return t=function t(){var e,r,s,i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,s=function(t){if(t.transform||t.op&&t.op.transform){var e=t.transform;t.transform||(e=t.op.transform),e.duration||(e.duration="3s-ease-in-out"),i.setDefault=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0px";return 0===t.length?e+" ":t};var r=function(){var r="",s="",n="",a="",o="",l="",c="",u="",h="";if(0!==e.values.length){e.values.forEach((function(t){t.startsWith("tx:")&&(r=t.replace("tx:","")),t.startsWith("ty:")&&(s=t.replace("ty:","")),t.startsWith("tz:")?n=t.replace("tz:",""):t.startsWith("scale(")?a=t:t.startsWith("skew(")?o=t:t.startsWith("rotate(")?l=function(t){var e=t.match(/rotate\(([^)]+)\)/);if(!e)return t;var r=e[1].split(",").map((function(t){return t.trim()}));return 1===r.length?"rotate(".concat(r[0],")"):2===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],")"):3===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],") rotate(").concat(r[2],")"):t}(t):t.startsWith("perspective(")?c=t:t.startsWith("matrix(")?u=t:t.startsWith("opacity:")&&(h=t.replace("opacity:",""))})),r=i.setDefault(r),s=i.setDefault(s),n=i.setDefault(n);var d="";if("0px"!=s&&"0px"!=r&&"0px"!=n?d+="translate3d(".concat(r,", ").concat(s,", ").concat(n,")"):"0px"==s&&"0px"==r||(d+="translate(".concat(r,", ").concat(s,")")),a&&(d+=" ".concat(a)),l&&(d+=" ".concat(l)),o&&(d+=" ".concat(o)),c&&(d+=" ".concat(c)),u&&(d+=" ".concat(u)),d){if(t.op.transform.duration){var y=t.op.transform.duration.replace(/^(\d+)(s)-/,(function(t,e,r){return e/2+r+" "})),f="transform ".concat(y,", opacity ").concat(y);i.res.style.transition=f}else i.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";i.res.style.transform=d,i.res.style.opacity=h}}};e.on?i.res.addEventListener(e.on,(function(){e.delay?setTimeout((function(){r()}),e.delay):r()})):window.addEventListener("load",(function(){e.delay?setTimeout((function(){r()}),e.delay):r()}));var s=function(){var t="";e.values.forEach((function(e){e.startsWith("tx:")?t+="translateX(0) ":e.startsWith("ty:")?t+="translateY(0) ":e.startsWith("tz:")?t+="translateZ(0) ":e.startsWith("scale(")?t+="scale(1) ":e.startsWith("skew(")?t+="skew(0, 0) ":e.startsWith("rotate(")?t+="rotate(0) ":e.startsWith("perspective(")?t+="perspective(0) ":e.startsWith("matrix(")&&(t+="matrix(1, 0, 0, 1, 0, 0) "),i.res.style.opacity="1"})),t&&(i.res.style.transform=t.trim())};if(e.on)i.res.addEventListener("mouseout",(function(){e.keep||s()}));else{var n=1e3*parseFloat(e.duration),a=e.closeAfter?e.closeAfter:0;setTimeout((function(){e.keep||s()}),n/2+a)}}},(r=l(r="reactOnTransform"))in e?Object.defineProperty(e,r,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[r]=s,this.state={isExpanded:!1,isMovedUp:!1,isMovedDown:!1}},(e=[{key:"keySet",value:function(t){return this.temporaryVal=1,this.res.style[t.key]=t.value,this}},{key:"onScroll",value:function(t){var e=this;"opacity"===t.value?this.res.style.opacity=t.valMin:"scale"===t.value&&(this.res.style.transform="scale(".concat(t.valMax,")")),window.addEventListener("scroll",(function(){var r=e.smartRange(window.scrollY,{min:t.from,max:t.to},{min:t.valMin,max:t.valMax});"opacity"===t.value?e.res.style.opacity=r:"scale"===t.value&&(e.res.style.transform="scale(".concat(r,")"))}))}},{key:"setAny",value:function(t){this[Object.keys(t)[0]]=[Object.values(t)[0]]}},{key:"setID",value:function(t){this.id=t}},{key:"setPrevText",value:function(t){this.prevText=t}},{key:"getCSS",value:function(){return this.css}},{key:"getPX",value:function(t){return{xs:"0px",sm:"576px",md:"768px",lg:"992px",xl:"1200px",xxl:"1400px",mxxl:"1800px"}[t]||"Invalid breakpoint"}},{key:"respad",value:function(t){var e=this,r=function(){e.pad(t[0].values);for(var r=0;r<t.length;r++){var s=t[r].breakpoint;window.matchMedia("(min-width: ".concat(e.getPX(s))).matches&&e.pad(t[r].values)}};window.addEventListener("resize",r),r()}},{key:"resmar",value:function(t){var e=this,r=function(){e.mar(t[0].values);for(var r=0;r<t.length;r++){var s=t[r].breakpoint;window.matchMedia("(max-width: ".concat(e.getPX(s))).matches&&e.mar(t[r].values)}};window.addEventListener("resize",r),r()}},{key:"resprop",value:function(t){var e=this;this.prevBackground=this.res.style.background,this.prevWidth=this.res.style.width,this.prevHeight=this.res.style.height,this.prevBorder=this.res.style.border;var r=function(){e.res.style.background=e.prevBackground,e.res.style.width=e.prevWidth,e.res.style.height=e.prevHeight,e.res.style.border=e.prevBorder;for(var r=0;r<t.length;r++){var s=t[r].breakpoint;if(window.matchMedia("(max-width: ".concat(e.getPX(s))).matches){var i={};for(var n in t[r])"breakpoint"!==n&&(i[n]=t[r][n]);e.set(i)}}};window.addEventListener("resize",r),r()}},{key:"isNumber",value:function(t){return"number"==typeof t&&!isNaN(t)}},{key:"pad",value:function(t){for(var e=0;e<t.length;e++)for(var r=Object.keys(t[e]),s=0;s<r.length;s++)for(var i=r[s],n=t[e][i],a=0;a<i.length;a++)switch(i[a]){case"a":this.res.style.padding=this.isNumber(n)?"".concat(n,"px"):n;break;case"t":this.res.style.paddingTop=this.isNumber(n)?"".concat(n,"px"):n;break;case"l":this.res.style.paddingLeft=this.isNumber(n)?"".concat(n,"px"):n;break;case"r":this.res.style.paddingRight=this.isNumber(n)?"".concat(n,"px"):n;break;case"b":this.res.style.paddingBottom=this.isNumber(n)?"".concat(n,"px"):n}return this}},{key:"as",value:function(t){return this.res.style.alignSelf=t,this}},{key:"mar",value:function(t){for(var e=0;e<t.length;e++)for(var r=Object.keys(t[e]),s=0;s<r.length;s++)for(var i=r[s],n=t[e][i],a=0;a<i.length;a++){switch(i[a]){case"a":this.res.style.margin=this.isNumber(n)?"".concat(n,"px"):n;break;case"t":this.res.style.marginTop=this.isNumber(n)?"".concat(n,"px"):n;break;case"l":this.res.style.marginLeft=this.isNumber(n)?"".concat(n,"px"):n;break;case"r":this.res.style.marginRight=this.isNumber(n)?"".concat(n,"px"):n;break;case"b":this.res.style.marginBottom=this.isNumber(n)?"".concat(n,"px"):n}"auto"===i[a]&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto")}return this}},{key:"smartRange",value:function(t,e,r){t<e.min&&(t=e.min),t>e.max&&(t=e.max);var s=(t-e.min)/(e.max-e.min);e.min>e.max&&(s=(t-e.max)/(e.min-e.max));var i=(r.min-r.max)*s-r.min;if(i=Math.abs(i),r.min<r.max){var n=(r.max+Math.abs(r.min))*s;i=r.min+n}return i}},{key:"gpos",value:function(t){return this.res.style.gridColumn=t.col,this.res.style.gridRow=t.row,this}},{key:"fluidCopy",value:function(t){if(t instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var e=document.createTextNode(this.text);return this.res.appendChild(e),this.res.style.fontSize=t.exact,this}if("S1"===t){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var r=document.createTextNode(this.text);this.res.appendChild(r),this.res.style.fontSize="calc(1.625rem + 5.075vw)"}if("S2"===t){this.prevStylex=this.res.style,this.res=document.createElement("h2"),this.res.style.cssText=this.prevStylex.cssText;var s=document.createTextNode(this.text);this.res.appendChild(s),this.res.style.fontSize="calc(1.500rem + 4.3vw)"}if("S3"===t){this.prevStylex=this.res.style,this.res=document.createElement("h3"),this.res.style.cssText=this.prevStylex.cssText;var i=document.createTextNode(this.text);this.res.appendChild(i),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===t){this.prevStylex=this.res.style,this.res=document.createElement("h4"),this.res.style.cssText=this.prevStylex.cssText;var n=document.createTextNode(this.text);this.res.appendChild(n),this.res.style.fontSize="calc(1.250rem + 2.75vw)"}if("S5"===t){this.prevStylex=this.res.style,this.res=document.createElement("h5"),this.res.style.cssText=this.prevStylex.cssText;var a=document.createTextNode(this.text);this.res.appendChild(a),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===t&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}},{key:"setIndex",value:function(t){this.index=t}},{key:"borderObj",value:function(t){var e,r=null!==(e=t.type)&&void 0!==e?e:"solid";return this.res.style.border="".concat(t.width," ").concat(r," ").concat(t.color),this.res.style.borderRadius=t.radius,this}},{key:"protoReact",value:function(t,e){var r=this;t.sort((function(t,e){return parseInt(t.range[0])-parseInt(e.range[0])}));var n=function(){var n=window.innerWidth,a="";r.storedQueries=t.map((function(t){return t.target})).filter((function(t){return null!=t}));var o,l=i(t);try{for(l.s();!(o=l.n()).done;){var c=o.value;r.counterIndex++;var u=s(c.range,2),h=u[0],d=u[1],y=parseInt(h),f=parseInt(d),p=!0;if(c.target){p=!1;for(var m=0;m<c.target.length;m++)c.target[m]===e&&(p=!0)}n>=y&&n<=f&&p&&("gradient"===c.log&&(a+="gradient"),"blast"===c.log&&(a+="blast"),"animation"===c.log&&(a+="animation"),"shadow"===c.log&&(a+="shadow"),"span"===c.log&&(a+="span"),"filter"===c.log&&(a+="filter"),"background"===c.log&&(a+="background"))}}catch(t){l.e(t)}finally{l.f()}r.res.style.margin="";var g,v=r.res.style.color;for(t.map((function(t){return t.log})).filter((function(t){return null!=t})).includes("gradient")&&(r.res.style.WebkitBackgroundClip="",r.res.style.background=""),r.res.style["-webkit-text-stroke"]="",r.res.style.filter="",r.res.style.textShadow="",r.res.style.border="";r.res.firstChild;)r.res.removeChild(r.res.firstChild);if(r.res.textContent=r.text,""===a&&(r.res.style["-webkit-text-fill-color"]="",r.res.style.color=v),"blast"===a){for(m=0;m<t.length;m++){var b=t[m].op.offsets;b&&void 0!==r.index&&(r.res.style.margin=b[Number(r.index)]+"px")}for(r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-text-stroke"]=r.globalBlast,m=0;m<t.length;m++){var x=t[m].op.offsets;x&&void 0!==r.index&&(r.res.style.margin=x[Number(r.index)]+"px")}}if("gradient"===a&&(r.res.style["-webkit-text-fill-color"]="transparent",r.res.style.background=r.globalGradient,r.res.style["-webkit-background-clip"]="text",r.res.style.border="1px solid orange"),"background"===a&&(r.res.style.background="orange"),"gradientblast"===a&&(r.res.style["-webkit-text-fill-color"]="transparent",r.res.style.background=r.globalGradient,r.res.style["-webkit-background-clip"]="text",r.res.style["-webkit-text-stroke"]=r.globalBlast),"gradientanimation"===a&&(r.res.style["-webkit-text-fill-color"]="transparent",r.res.style.background=r.globalGradient,r.res.style["-webkit-background-clip"]="text"),"gradientanimationshadow"===a&&(r.res.style["-webkit-text-fill-color"]="transparent",r.res.style.background=r.globalGradient,r.res.style["-webkit-background-clip"]="text",r.res.style.textShadow=r.globalShadow),"animationshadow"===a&&(r.res.style["-webkit-text-fill-color"]="",r.res.style.textShadow=r.globalShadow),"shadow"===a&&(r.res.style["-webkit-text-fill-color"]="",r.res.style.textShadow=r.globalShadow),"span"===a&&r.options.span)for(g=Array.isArray(r.options.span)?r.options.span.filter((function(t){return"span"===t.op.name}))[0]:r.options.span,r.res.textContent="",m=0;m<g.op.parts.length;m++){var w=g.op.parts[m].style,k=new Text(g.op.parts[m].text).setup({type:"span"}).set(w).render();r.res.appendChild(k)}if("filter"===a){var S=r.options.filtera.op.filter;r.res.style.filter=S,r.res.style.border="8px solid orange"}};window.addEventListener("resize",n),n()}},{key:"setPref",value:function(t){this.preffersId=t}},{key:"setClass",value:function(t){this.class=t}},{key:"betaReact",value:function(t,e){var r=this;this.ap=!1,this.cta=0,this.once=!1,t.sort((function(t,e){return parseInt(t.range[0])-parseInt(e.range[0])}));var n=function(){var n=window.innerWidth,a="";r.resCopy=r.res,r.storedQueries=t.map((function(t){return t.target})).filter((function(t){return null!=t}));var o,l=i(t);try{for(l.s();!(o=l.n()).done;){var c=o.value;r.counterIndex++;var u=s(c.range,2),h=u[0],d=u[1],y=parseInt(h),f=parseInt(d),p=!0;if(c.target){p=!1;for(var m=0;m<c.target.length;m++)c.target[m]===e&&(p=!0)}n>=y&&n<=f&&p&&("blast"===c.log&&(a+="blast"),"shadow"===c.log&&(a+="shadow"),"background"===c.log&&(a+="background"),"gradient"===c.log&&(a+="gradient"),"spana"===c.log&&(a+="spana"),"layout"===c.log&&(a+="layout"),"margin"===c.log&&(a+="margin"),c.op&&c.op.margin&&(r.useMargin=c.op.margin))}}catch(t){l.e(t)}finally{l.f()}if(r.res.style.background="",r.res.style.backgroundColor="",r.res.style.textShadow="",r.res.style.border="",r.res.style.margin="",r.res.style["-webkit-text-fill-color"]="",r.res.style["-webkit-text-stroke"]="",r.res.style["-webkit-text-stroke-width"]="","background"===a&&(r.res.style.backgroundColor="green"),"margin"===a)for(m=0;m<t.length;m++)if(t[m].op){var g=t[m].op.offsets;g&&void 0!==r.index&&(r.res.style.margin=g[Number(r.index)]+"px")}if("blastbackgroundmargin"===a){for(m=0;m<t.length;m++)if(t[m].op){var v=t[m].op.offsets;v&&void 0!==r.index&&(r.res.style.margin=v[Number(r.index)]+"px")}r.res.style.backgroundColor="green","FlexRowLayoutElement"===r.getType()?r.res.style.border="1px solid orange":(r.res.textContent=r.text,r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-text-stroke-color"]="orange",r.res.style["-webkit-text-stroke-width"]="1px"),r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-text-stroke-color"]="orange",r.res.style["-webkit-text-stroke-width"]="1px"}if("blastbackground"===a){for(m=0;m<t.length;m++)if(t[m].op){var b=t[m].op.offsets;b&&void 0!==r.index&&(r.res.style.margin=b[Number(r.index)]+"px")}r.res.style.backgroundColor="green",r.useMargin?r.res.style.margin="1rem":r.res.setAttribute("id","iofhwoiefhoih"),"FlexRowLayoutElement"===r.getType()?r.res.style.border="1px solid orange":(r.res.textContent=r.text,r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-text-stroke-color"]="orange",r.res.style["-webkit-text-stroke-width"]="1px"),r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-text-stroke-color"]="orange",r.res.style["-webkit-text-stroke-width"]="1px"}if("layout"===a&&(r.res.style.alignSelf="start",r.res.style.border="1px solid purple"),"blast"===a){for(m=0;m<t.length;m++)if(t[m].op){var x=t[m].op.offsets;x&&void 0!==r.index&&(r.res.style.margin=x[Number(r.index)]+"px")}"FlexRowLayoutElement"===r.getType()?r.res.style.border="1px solid orange":(r.res.textContent=r.text,r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-background-clip"]="text",r.res.style["-webkit-text-stroke-color"]="orange",r.res.style["-webkit-text-stroke-width"]="1px"),r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-text-stroke"]="orange",r.res.style["-webkit-text-stroke-width"]="1px"}"blastgradientbackground"===a&&(r.res.style.border="1px solid yellow",r.res.style["-webkit-text-stroke-color"]="orange",r.res.style["-webkit-text-stroke-width"]="1px"),"gradient"===a&&(r.res.style.background="linear-gradient(to left, #3498db, #1abc9c)","FlexRowLayoutElement"===r.getType()||(r.res.children[0]&&r.res.removeChild(r.res.children[0]),r.res.style["-webkit-text-fill-color"]="transparent",r.res.style["-webkit-background-clip"]="text",r.res.textContent=r.text)),"shadow"===a&&("FlexRowLayoutElement"===r.getType()||(r.res.children[0]&&r.res.removeChild(r.res.children[0]),r.res.style["-webkit-text-fill-color"]="",r.res.style["-webkit-text-fill-color"]="",r.res.style.textShadow="#1abc9cff -6px 6px , #1abc9c40 -12px 12px",r.res.textContent=r.text))};window.addEventListener("resize",n),n()}},{key:"cssGen",value:function(t,e,r,s){return this.css=[""],[""]}},{key:"chainReact",value:function(t,e,r){var n=this;this.cssGen(t,e,this.class,void 0!==this.class),this.ap=!1,this.cta=0,this.once=!1;var a,o=i(t);try{for(o.s();!(a=o.n()).done;){var l=a.value;l.range||(l.range=["0px","999999px"])}}catch(t){o.e(t)}finally{o.f()}t.sort((function(t,e){return parseInt(t.range[0])-parseInt(e.range[0])}));var c=function(){var a=window.visualViewport.width,o=[],l=[];n.resCopy=n.res,n.storedQueries=t.map((function(t){return t.target})).filter((function(t){return null!=t}));var c,u=i(t);try{for(u.s();!(c=u.n()).done;){var h=c.value;n.counterIndex++;var d=s(h.range,2),y=d[0],f=d[1],p=parseInt(y),m=parseInt(f),g=!0;if(h.target){g=!1;for(var v=0;v<h.target.length;v++)h.target[v]===e&&(g=!0)}a>=p&&a<=m&&g&&(o.push(h.log),l.push(h),h.op&&h.op.margin&&(n.useMargin=h.op.margin))}}catch(t){u.e(t)}finally{u.f()}if(r&&!r.includes("background")&&(n.res.style.background="",n.res.style.backgroundColor=""),n.res.style.textShadow="",r&&!r.includes("border")&&(n.res.style.border=""),r&&!r.includes("margin")&&(n.res.style.margin=""),n.res.style["-webkit-text-fill-color"]="",n.res.style["-webkit-text-stroke-color"]="",n.res.style["-webkit-text-stroke-width"]="",n.res.style.filter="",(o.includes("gradient")||o.includes("shadow"))&&(n.res.style.position="relative",n.res.style.zIndex=-1),o.includes("blast")){var b,x=l.filter((function(t){return"blast"===t.log}))[0].op.color,w=null!==(b=l.filter((function(t){return"blast"===t.log}))[0].op.width)&&void 0!==b?b:"1px";"FlexRowLayoutElement"===n.getType()?n.res.style.border="".concat(w,"px solid orange"):(n.res.textContent=n.text,n.res.style["-webkit-text-fill-color"]="transparent",n.res.style["-webkit-text-stroke-color"]=x,n.res.style["-webkit-text-stroke-width"]="".concat(w))}if(o.includes("filter")){var k=l.filter((function(t){return"filter"===t.log}))[0].op.filter;n.res.style.filter=k}if(o.includes("background")&&(n.res.style.backgroundColor="green"),o.includes("gradient")&&(n.res.style["-webkit-text-fill-color"]="transparent",n.res.style.background=n.globalGradient,n.res.style["background-clip"]="text"),o.includes("shadow"))if("FlexRowLayoutElement"===n.getType());else{var S="",C=0;for(v=0;v<n.options.shadow.op.steps;v++)S+="drop-shadow(".concat(C+=3,"px ").concat(C,"px ").concat(C,"px gray) ");n.res.style.filter=S}if(o.includes("margin"))for(v=0;v<t.length;v++)if(t[v].op){var O=t[v].op.offsets;O&&void 0!==n.index&&(n.res.style.margin=O[Number(n.index)]+"px")}if(o.includes("animation")){if(n.options.animation&&!n.hasAnimated&&!n.options.animation.op.fireAt){n.hasAnimated=!0;var j=n.options.animation.op;n.res.animate(j.keyframesClose,{duration:0,fill:"forwards"}),n.res.animate(j.keyframesOpen,j.openOptions)}if(n.options.animation&&n.options.animation.op.fireAt&&n.options.animation.op.fireAt.endsWith("px")){var E=n.options.animation.op;n.res.animate(E.keyframesClose,{duration:0,fill:"forwards"});var T=function(){window.scrollY>parseFloat(E.fireAt)&&(n.res.animate(E.keyframesOpen,E.openOptions),window.removeEventListener("scroll",T))};window.addEventListener("scroll",T)}if(n.options.animation&&n.options.animation.op.fireAt&&"inview"===n.options.animation.op.fireAt){var I=n.options.animation.op;n.res.animate(I.keyframesClose,{duration:0,fill:"forwards"}),new IntersectionObserver((function(t,e){t.forEach((function(t){t.isIntersecting&&(n.res.animate(I.keyframesOpen,I.openOptions),e.disconnect())}))})).observe(n.res)}}};window.addEventListener("resize",c),c()}},{key:"maxWidth",value:function(t){return this.res.style.maxWidth=t,this}},{key:"removeQuotesFromFirstWord",value:function(t){return t.replace(/"([^"]+)":/g,"$1:")}},{key:"arrayMargin",value:function(t,e){return t.includes("left")&&(this.res.style.marginLeft=e),t.includes("right")&&(this.res.style.marginRight=e),t.includes("top")&&(this.res.style.marginTop=e),t.includes("bottom")&&(this.res.style.marginBottom=e),t.includes("all")&&(this.res.style.margin=e),e||(this.res.style.marginBottom=t),this}},{key:"navBarExpand",value:function(){return this.res.style.backgroundColor="green",this.res.animate([{transform:"scaleY(3.0)"}],{duration:2e3,iterations:1,fill:"both"}),this}},{key:"scrollFade",value:function(t,e){return this.res.style.visibility="hidden",this.faden(t,e,"scroll"),this}},{key:"expand",value:function(t){var e=this;return!1===this.state.isExpanded?"click"===t.on?this.res.addEventListener("click",(function(){e.innerExpand(t)})):this.innerExpand(t):this.innerExpandBack(t),this.state.isExpanded=!this.state.isExpanded,this}},{key:"move",value:function(t){var e=this;return"click"===t.on?this.res.addEventListener("click",(function(){e.moveUpa(t)})):("up"===t.direction&&this.moveUpa(t),"down"===t.direction&&this.moveDowna(t),this.state.isMovedUp=!this.state.isMovedUp,"left"===t.direction&&this.moveLeft(t)),this}},{key:"moveLeft",value:function(t){return this.res.animate([{transform:"translateX(0px)"},{transform:"translateX(-".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}},{key:"moveUpa",value:function(t){return!1===this.state.isMovedUp?this.res.animate([{transform:"translateX(0px)"},{transform:"translateY(-".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play():this.res.animate([{transform:"translateX(0px)"},{transform:"translateY(".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}},{key:"moveDowna",value:function(t){return!1===this.state.isMovedDown?this.res.animate([{transform:"translateX(0px)"},{transform:"translateY(".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play():this.res.animate([{transform:"translateX(0px)"},{transform:"translateY(-".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}},{key:"moveUpaBack",value:function(t){return this.res.animate([{transform:"translateX(0px)"}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}},{key:"innerExpandBack",value:function(t){this.res.animate([{width:this.prevWidth,height:this.prevHeight}],{duration:900,iterations:t.iterations,fill:"both"})}},{key:"innerExpand",value:function(t){var e,r;return this.prevWidth=this.res.style.width,this.prevHeight=this.res.style.height,this.res.animate([{width:this.prevWidth,height:this.prevHeight},{width:null!==(e=t.width)&&void 0!==e?e:this.prevWidth,height:null!==(r=t.height)&&void 0!==r?r:this.prevHeight}],{duration:900,iterations:t.iterations,fill:"both"}),this}},{key:"fade",value:function(t){return this.res.style.visibility="hidden",this.faden(t.duration,t.from,"load"),t.finalOpacity&&(this.finalOpacity=t.finalOpacity),this}},{key:"faden",value:function(t,e,r){var s=this;return this.res.style.visibility="hidden",this.scrolled=!1,window.addEventListener(r,(function(){s.res.style.visibility="visible";var i=window.innerHeight;(s.res.getBoundingClientRect().top-i<=0||"load"==r)&&0==s.scrolled&&("left"==e&&s.res.animate([{transform:"translateX(-30px)"},{transform:"translateX(0px)"}],{duration:t,iterations:1}),"right"==e&&s.res.animate([{transform:"translateX(30px)"},{transform:"translateX(0px)"}],{duration:t,iterations:1}),"top"==e&&s.res.animate([{transform:"translateY(-30px)"},{transform:"translateY(0px)"}],{duration:t,iterations:1}),"bottom"==e&&s.res.animate([{transform:"translateY(30px)"},{transform:"translateY(0px)"}],{duration:t,iterations:1}),s.res.animate([{opacity:"0.0"},{opacity:"1.0"}],{duration:t,iterations:1}),s.scrolled=!0)})),this}}])&&o(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}());module.exports=e})();
|
package/dist/container.esm.js
CHANGED
|
@@ -1 +1,2 @@
|
|
|
1
|
-
class t{constructor(){this.state={isExpanded:!1,isMovedUp:!1,isMovedDown:!1}}keySet(t){return this.temporaryVal=1,this.res.style[t.key]=t.value,this}onScroll(t){"opacity"===t.value?this.res.style.opacity=t.valMin:"scale"===t.value&&(this.res.style.transform=`scale(${t.valMax})`),window.addEventListener("scroll",(()=>{let e=this.smartRange(window.scrollY,{min:t.from,max:t.to},{min:t.valMin,max:t.valMax});"opacity"===t.value?this.res.style.opacity=e:"scale"===t.value&&(this.res.style.transform=`scale(${e})`)}))}setAny(t){this[Object.keys(t)[0]]=[Object.values(t)[0]]}setID(t){this.id=t}setPrevText(t){this.prevText=t}getCSS(){return this.css}getPX(t){return{xs:"0px",sm:"576px",md:"768px",lg:"992px",xl:"1200px",xxl:"1400px",mxxl:"1800px"}[t]||"Invalid breakpoint"}respad(t){const e=()=>{this.pad(t[0].values);for(let e=0;e<t.length;e++){let s=t[e].breakpoint;window.matchMedia(`(min-width: ${this.getPX(s)}`).matches&&this.pad(t[e].values)}};window.addEventListener("resize",e),e()}resmar(t){const e=()=>{this.mar(t[0].values);for(let e=0;e<t.length;e++){let s=t[e].breakpoint;window.matchMedia(`(max-width: ${this.getPX(s)}`).matches&&this.mar(t[e].values)}};window.addEventListener("resize",e),e()}resprop(t){this.prevBackground=this.res.style.background,this.prevWidth=this.res.style.width,this.prevHeight=this.res.style.height,this.prevBorder=this.res.style.border;const e=()=>{this.res.style.background=this.prevBackground,this.res.style.width=this.prevWidth,this.res.style.height=this.prevHeight,this.res.style.border=this.prevBorder;for(let e=0;e<t.length;e++){let s=t[e].breakpoint;if(window.matchMedia(`(max-width: ${this.getPX(s)}`).matches){const s={};for(const i in t[e])"breakpoint"!==i&&(s[i]=t[e][i]);this.set(s)}}};window.addEventListener("resize",e),e()}isNumber(t){return"number"==typeof t&&!isNaN(t)}pad(t){for(let e=0;e<t.length;e++){let s=Object.keys(t[e]);for(let i=0;i<s.length;i++){let r=s[i],a=t[e][r];for(let t=0;t<r.length;t++)switch(r[t]){case"a":this.res.style.padding=this.isNumber(a)?`${a}px`:a;break;case"t":this.res.style.paddingTop=this.isNumber(a)?`${a}px`:a;break;case"l":this.res.style.paddingLeft=this.isNumber(a)?`${a}px`:a;break;case"r":this.res.style.paddingRight=this.isNumber(a)?`${a}px`:a;break;case"b":this.res.style.paddingBottom=this.isNumber(a)?`${a}px`:a}}}return this}as(t){return this.res.style.alignSelf=t,this}mar(t){for(let e=0;e<t.length;e++){let s=Object.keys(t[e]);for(let i=0;i<s.length;i++){let r=s[i],a=t[e][r];for(let t=0;t<r.length;t++){switch(r[t]){case"a":this.res.style.margin=this.isNumber(a)?`${a}px`:a;break;case"t":this.res.style.marginTop=this.isNumber(a)?`${a}px`:a;break;case"l":this.res.style.marginLeft=this.isNumber(a)?`${a}px`:a;break;case"r":this.res.style.marginRight=this.isNumber(a)?`${a}px`:a;break;case"b":this.res.style.marginBottom=this.isNumber(a)?`${a}px`:a}"auto"===r[t]&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto")}}}return this}smartRange(t,e,s){t<e.min&&(t=e.min),t>e.max&&(t=e.max);let i=(t-e.min)/(e.max-e.min);e.min>e.max&&(i=(t-e.max)/(e.min-e.max));let r=(s.min-s.max)*i-s.min;if(r=Math.abs(r),s.min<s.max){let t=(s.max+Math.abs(s.min))*i;r=s.min+t}return r}gpos(t){return this.res.style.gridColumn=t.col,this.res.style.gridRow=t.row,this}fluidCopy(t){if(t instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;let e=document.createTextNode(this.text);return this.res.appendChild(e),this.res.style.fontSize=t.exact,this}if("S1"===t){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;let t=document.createTextNode(this.text);this.res.appendChild(t),this.res.style.fontSize="calc(1.625rem + 5.075vw)"}if("S2"===t){this.prevStylex=this.res.style,this.res=document.createElement("h2"),this.res.style.cssText=this.prevStylex.cssText;let t=document.createTextNode(this.text);this.res.appendChild(t),this.res.style.fontSize="calc(1.500rem + 4.3vw)"}if("S3"===t){this.prevStylex=this.res.style,this.res=document.createElement("h3"),this.res.style.cssText=this.prevStylex.cssText;let t=document.createTextNode(this.text);this.res.appendChild(t),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===t){this.prevStylex=this.res.style,this.res=document.createElement("h4"),this.res.style.cssText=this.prevStylex.cssText;let t=document.createTextNode(this.text);this.res.appendChild(t),this.res.style.fontSize="calc(1.250rem + 2.75vw)"}if("S5"===t){this.prevStylex=this.res.style,this.res=document.createElement("h5"),this.res.style.cssText=this.prevStylex.cssText;let t=document.createTextNode(this.text);this.res.appendChild(t),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===t&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}setIndex(t){this.index=t}borderObj(t){let e=t.type??"solid";return this.res.style.border=`${t.width} ${e} ${t.color}`,this.res.style.borderRadius=t.radius,this}protoReact(t,e){t.sort(((t,e)=>parseInt(t.range[0])-parseInt(e.range[0])));const s=()=>{const s=window.innerWidth;let i="";this.storedQueries=t.map((t=>t.target)).filter((t=>null!=t));for(const a of t){this.counterIndex++;const[t,n]=a.range,l=parseInt(t),o=parseInt(n);let h=!0;if(a.target){h=!1;for(var r=0;r<a.target.length;r++)a.target[r]===e&&(h=!0)}s>=l&&s<=o&&h&&("gradient"===a.log&&(i+="gradient"),"blast"===a.log&&(i+="blast"),"animation"===a.log&&(i+="animation"),"shadow"===a.log&&(i+="shadow"),"span"===a.log&&(i+="span"),"filter"===a.log&&(i+="filter"),"background"===a.log&&(i+="background"))}this.res.style.margin="";let a=this.res.style.color;for(t.map((t=>t.log)).filter((t=>null!=t)).includes("gradient")&&(this.res.style.WebkitBackgroundClip="",this.res.style.background=""),this.res.style["-webkit-text-stroke"]="",this.res.style.filter="",this.res.style.textShadow="",this.res.style.border="";this.res.firstChild;)this.res.removeChild(this.res.firstChild);if(this.res.textContent=this.text,""===i&&(this.res.style["-webkit-text-fill-color"]="",this.res.style.color=a),"blast"===i){for(r=0;r<t.length;r++){const e=t[r].op.offsets;e&&void 0!==this.index&&(this.res.style.margin=e[Number(this.index)]+"px")}for(this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-text-stroke"]=this.globalBlast,r=0;r<t.length;r++){const e=t[r].op.offsets;e&&void 0!==this.index&&(this.res.style.margin=e[Number(this.index)]+"px")}}if("gradient"===i&&(this.res.style["-webkit-text-fill-color"]="transparent",this.res.style.background=this.globalGradient,this.res.style["-webkit-background-clip"]="text",this.res.style.border="1px solid orange"),"background"===i&&(this.res.style.background="orange"),"gradientblast"===i&&(this.res.style["-webkit-text-fill-color"]="transparent",this.res.style.background=this.globalGradient,this.res.style["-webkit-background-clip"]="text",this.res.style["-webkit-text-stroke"]=this.globalBlast),"gradientanimation"===i&&(this.res.style["-webkit-text-fill-color"]="transparent",this.res.style.background=this.globalGradient,this.res.style["-webkit-background-clip"]="text"),"gradientanimationshadow"===i&&(this.res.style["-webkit-text-fill-color"]="transparent",this.res.style.background=this.globalGradient,this.res.style["-webkit-background-clip"]="text",this.res.style.textShadow=this.globalShadow),"animationshadow"===i&&(this.res.style["-webkit-text-fill-color"]="",this.res.style.textShadow=this.globalShadow),"shadow"===i&&(this.res.style["-webkit-text-fill-color"]="",this.res.style.textShadow=this.globalShadow),"span"===i&&this.options.span){let t;for(t=Array.isArray(this.options.span)?this.options.span.filter((t=>"span"===t.op.name))[0]:this.options.span,this.res.textContent="",r=0;r<t.op.parts.length;r++){let e=t.op.parts[r].style,s=new Text(t.op.parts[r].text).setup({type:"span"}).set(e).render();this.res.appendChild(s)}}if("filter"===i){let t=this.options.filtera.op.filter;this.res.style.filter=t,this.res.style.border="8px solid orange"}};window.addEventListener("resize",s),s()}setPref(t){this.preffersId=t}setClass(t){this.class=t}betaReact(t,e){this.ap=!1,this.cta=0,this.once=!1,t.sort(((t,e)=>parseInt(t.range[0])-parseInt(e.range[0])));const s=()=>{const s=window.innerWidth;let i="";this.resCopy=this.res,this.storedQueries=t.map((t=>t.target)).filter((t=>null!=t));for(const a of t){this.counterIndex++;const[t,n]=a.range,l=parseInt(t),o=parseInt(n);let h=!0;if(a.target){h=!1;for(var r=0;r<a.target.length;r++)a.target[r]===e&&(h=!0)}s>=l&&s<=o&&h&&("blast"===a.log&&(i+="blast"),"shadow"===a.log&&(i+="shadow"),"background"===a.log&&(i+="background"),"gradient"===a.log&&(i+="gradient"),"spana"===a.log&&(i+="spana"),"layout"===a.log&&(i+="layout"),"margin"===a.log&&(i+="margin"),a.op&&a.op.margin&&(this.useMargin=a.op.margin))}if(this.res.style.background="",this.res.style.backgroundColor="",this.res.style.textShadow="",this.res.style.border="",this.res.style.margin="",this.res.style["-webkit-text-fill-color"]="",this.res.style["-webkit-text-stroke"]="",this.res.style["-webkit-text-stroke-width"]="","background"===i&&(this.res.style.backgroundColor="green"),"margin"===i)for(r=0;r<t.length;r++){if(!t[r].op)continue;const e=t[r].op.offsets;e&&void 0!==this.index&&(this.res.style.margin=e[Number(this.index)]+"px")}if("blastbackgroundmargin"===i){for(r=0;r<t.length;r++){if(!t[r].op)continue;const e=t[r].op.offsets;e&&void 0!==this.index&&(this.res.style.margin=e[Number(this.index)]+"px")}this.res.style.backgroundColor="green","FlexRowLayoutElement"===this.getType()?this.res.style.border="1px solid orange":(this.res.textContent=this.text,this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-text-stroke-color"]="orange",this.res.style["-webkit-text-stroke-width"]="1px"),this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-text-stroke-color"]="orange",this.res.style["-webkit-text-stroke-width"]="1px"}if("blastbackground"===i){for(r=0;r<t.length;r++){if(!t[r].op)continue;const e=t[r].op.offsets;e&&void 0!==this.index&&(this.res.style.margin=e[Number(this.index)]+"px")}this.res.style.backgroundColor="green",this.useMargin?this.res.style.margin="1rem":this.res.setAttribute("id","iofhwoiefhoih"),"FlexRowLayoutElement"===this.getType()?this.res.style.border="1px solid orange":(this.res.textContent=this.text,this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-text-stroke-color"]="orange",this.res.style["-webkit-text-stroke-width"]="1px"),this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-text-stroke-color"]="orange",this.res.style["-webkit-text-stroke-width"]="1px"}if("layout"===i&&(this.res.style.alignSelf="start",this.res.style.border="1px solid purple"),"blast"===i){for(r=0;r<t.length;r++){if(!t[r].op)continue;const e=t[r].op.offsets;e&&void 0!==this.index&&(this.res.style.margin=e[Number(this.index)]+"px")}"FlexRowLayoutElement"===this.getType()?this.res.style.border="1px solid orange":(this.res.textContent=this.text,this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-background-clip"]="text",this.res.style["-webkit-text-stroke-color"]="orange",this.res.style["-webkit-text-stroke-width"]="1px"),this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-text-stroke"]="orange",this.res.style["-webkit-text-stroke-width"]="1px"}"blastgradientbackground"===i&&(this.res.style.border="1px solid yellow",this.res.style["-webkit-text-stroke-color"]="orange",this.res.style["-webkit-text-stroke-width"]="1px"),"gradient"===i&&(this.res.style.background="linear-gradient(to left, #3498db, #1abc9c)","FlexRowLayoutElement"===this.getType()||(this.res.children[0]&&this.res.removeChild(this.res.children[0]),this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-background-clip"]="text",this.res.textContent=this.text)),"shadow"===i&&("FlexRowLayoutElement"===this.getType()||(this.res.children[0]&&this.res.removeChild(this.res.children[0]),this.res.style["-webkit-text-fill-color"]="",this.res.style["-webkit-text-fill-color"]="",this.res.style.textShadow="#1abc9cff -6px 6px , #1abc9c40 -12px 12px",this.res.textContent=this.text))};window.addEventListener("resize",s),s()}cssGen(t,e,s,i){return this.css=[""],[""]}chainReact(t,e,s){this.cssGen(t,e,this.class,void 0!==this.class),this.ap=!1,this.cta=0,this.once=!1;for(let e of t)e.range||(e.range=["0px","999999px"]);t.sort(((t,e)=>parseInt(t.range[0])-parseInt(e.range[0])));const i=()=>{const i=window.visualViewport.width;let r=[],a=[];this.resCopy=this.res,this.storedQueries=t.map((t=>t.target)).filter((t=>null!=t));for(const s of t){this.counterIndex++;const[t,l]=s.range,o=parseInt(t),h=parseInt(l);let d=!0;if(s.target){d=!1;for(var n=0;n<s.target.length;n++)s.target[n]===e&&(d=!0)}i>=o&&i<=h&&d&&(r.push(s.log),a.push(s),s.op&&s.op.margin&&(this.useMargin=s.op.margin))}if(s&&!s.includes("background")&&(this.res.style.background="",this.res.style.backgroundColor=""),this.res.style.textShadow="",s&&!s.includes("border")&&(this.res.style.border=""),s&&!s.includes("margin")&&(this.res.style.margin=""),this.res.style["-webkit-text-fill-color"]="",this.res.style["-webkit-text-stroke-color"]="",this.res.style["-webkit-text-stroke-width"]="",this.res.style.filter="",(r.includes("gradient")||r.includes("shadow"))&&(this.res.style.position="relative",this.res.style.zIndex=-1),r.includes("blast")){let t=a.filter((t=>"blast"===t.log))[0].op.color,e=a.filter((t=>"blast"===t.log))[0].op.width??"1px";"FlexRowLayoutElement"===this.getType()?this.res.style.border=`${e}px solid orange`:(this.res.textContent=this.text,this.res.style["-webkit-text-fill-color"]="transparent",this.res.style["-webkit-text-stroke-color"]=t,this.res.style["-webkit-text-stroke-width"]=`${e}`)}if(r.includes("filter")){let t=a.filter((t=>"filter"===t.log))[0].op.filter;this.res.style.filter=t}if(r.includes("background")&&(this.res.style.backgroundColor="green"),r.includes("gradient")&&(this.res.style["-webkit-text-fill-color"]="transparent",this.res.style.background=this.globalGradient,this.res.style["background-clip"]="text"),r.includes("shadow"))if("FlexRowLayoutElement"===this.getType());else{let t="",e=0;for(n=0;n<this.options.shadow.op.steps;n++)e+=3,t+=`drop-shadow(${e}px ${e}px ${e}px gray) `;this.res.style.filter=t}if(r.includes("margin"))for(n=0;n<t.length;n++){if(!t[n].op)continue;const e=t[n].op.offsets;e&&void 0!==this.index&&(this.res.style.margin=e[Number(this.index)]+"px")}if(r.includes("animation")){if(this.options.animation&&!this.hasAnimated&&!this.options.animation.op.fireAt){this.hasAnimated=!0;let t=this.options.animation.op;this.res.animate(t.keyframesClose,{duration:0,fill:"forwards"}),this.res.animate(t.keyframesOpen,t.openOptions)}if(this.options.animation&&this.options.animation.op.fireAt&&this.options.animation.op.fireAt.endsWith("px")){let t=this.options.animation.op;this.res.animate(t.keyframesClose,{duration:0,fill:"forwards"});const e=()=>{window.scrollY>parseFloat(t.fireAt)&&(this.res.animate(t.keyframesOpen,t.openOptions),window.removeEventListener("scroll",e))};window.addEventListener("scroll",e)}if(this.options.animation&&this.options.animation.op.fireAt&&"inview"===this.options.animation.op.fireAt){let t=this.options.animation.op;this.res.animate(t.keyframesClose,{duration:0,fill:"forwards"}),new IntersectionObserver(((e,s)=>{e.forEach((e=>{e.isIntersecting&&(this.res.animate(t.keyframesOpen,t.openOptions),s.disconnect())}))})).observe(this.res)}}};window.addEventListener("resize",i),i()}reactOnTransform=t=>{if(t.transform||t.op&&t.op.transform){let e=t.transform;t.transform||(e=t.op.transform),e.duration||(e.duration="3s-ease-in-out"),this.setDefault=(t,e="0px")=>0===t.length?e+" ":t;const s=t=>{const e=t.match(/rotate\(([^)]+)\)/);if(!e)return t;const s=e[1].split(",").map((t=>t.trim()));return 1===s.length?`rotate(${s[0]})`:2===s.length?`rotateX(${s[0]}) rotateY(${s[1]})`:3===s.length?`rotateX(${s[0]}) rotateY(${s[1]}) rotate(${s[2]})`:t},i=()=>{let i="",r="",a="",n="",l="",o="",h="",d="",p="";if(0===e.values.length)return;e.values.forEach((t=>{t.startsWith("tx:")&&(i=t.replace("tx:","")),t.startsWith("ty:")&&(r=t.replace("ty:","")),t.startsWith("tz:")?a=t.replace("tz:",""):t.startsWith("scale(")?n=t:t.startsWith("skew(")?l=t:t.startsWith("rotate(")?o=s(t):t.startsWith("perspective(")?h=t:t.startsWith("matrix(")?d=t:t.startsWith("opacity:")&&(p=t.replace("opacity:",""))})),i=this.setDefault(i),r=this.setDefault(r),a=this.setDefault(a);let c="";if("0px"!=r&&"0px"!=i&&"0px"!=a?c+=`translate3d(${i}, ${r}, ${a})`:"0px"==r&&"0px"==i||(c+=`translate(${i}, ${r})`),n&&(c+=` ${n}`),o&&(c+=` ${o}`),l&&(c+=` ${l}`),h&&(c+=` ${h}`),d&&(c+=` ${d}`),c){if(t.op.transform.duration){let e=t.op.transform.duration.replace(/^(\d+)(s)-/,((t,e,s)=>e/2+s+" ")),s=`transform ${e}, opacity ${e}`;this.res.style.transition=s}else this.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";this.res.style.transform=c,this.res.style.opacity=p}};e.on?this.res.addEventListener(e.on,(()=>{e.delay?setTimeout((()=>{i()}),e.delay):i()})):window.addEventListener("load",(()=>{e.delay?setTimeout((()=>{i()}),e.delay):i()}));const r=()=>{let t="";e.values.forEach((e=>{e.startsWith("tx:")?t+="translateX(0) ":e.startsWith("ty:")?t+="translateY(0) ":e.startsWith("tz:")?t+="translateZ(0) ":e.startsWith("scale(")?t+="scale(1) ":e.startsWith("skew(")?t+="skew(0, 0) ":e.startsWith("rotate(")?t+="rotate(0) ":e.startsWith("perspective(")?t+="perspective(0) ":e.startsWith("matrix(")&&(t+="matrix(1, 0, 0, 1, 0, 0) "),this.res.style.opacity="1"})),t&&(this.res.style.transform=t.trim())};if(e.on)this.res.addEventListener("mouseout",(()=>{e.keep||r()}));else{let t=1e3*parseFloat(e.duration),s=e.closeAfter?e.closeAfter:0;setTimeout((()=>{e.keep||r()}),t/2+s)}}};maxWidth(t){return this.res.style.maxWidth=t,this}removeQuotesFromFirstWord(t){return t.replace(/"([^"]+)":/g,"$1:")}arrayMargin(t,e){return t.includes("left")&&(this.res.style.marginLeft=e),t.includes("right")&&(this.res.style.marginRight=e),t.includes("top")&&(this.res.style.marginTop=e),t.includes("bottom")&&(this.res.style.marginBottom=e),t.includes("all")&&(this.res.style.margin=e),e||(this.res.style.marginBottom=t),this}navBarExpand(){return this.res.style.backgroundColor="green",this.res.animate([{transform:"scaleY(3.0)"}],{duration:2e3,iterations:1,fill:"both"}),this}scrollFade(t,e){return this.res.style.visibility="hidden",this.faden(t,e,"scroll"),this}expand(t){return!1===this.state.isExpanded?"click"===t.on?this.res.addEventListener("click",(()=>{this.innerExpand(t)})):this.innerExpand(t):this.innerExpandBack(t),this.state.isExpanded=!this.state.isExpanded,this}move(t){return"click"===t.on?this.res.addEventListener("click",(()=>{this.moveUpa(t)})):("up"===t.direction&&this.moveUpa(t),"down"===t.direction&&this.moveDowna(t),this.state.isMovedUp=!this.state.isMovedUp,"left"===t.direction&&this.moveLeft(t)),this}moveLeft(t){return this.res.animate([{transform:"translateX(0px)"},{transform:`translateX(-${t.distance})`}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}moveUpa(t){return!1===this.state.isMovedUp?this.res.animate([{transform:"translateX(0px)"},{transform:`translateY(-${t.distance})`}],{duration:900,iterations:t.iterations,fill:"both"}).play():this.res.animate([{transform:"translateX(0px)"},{transform:`translateY(${t.distance})`}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}moveDowna(t){return!1===this.state.isMovedDown?this.res.animate([{transform:"translateX(0px)"},{transform:`translateY(${t.distance})`}],{duration:900,iterations:t.iterations,fill:"both"}).play():this.res.animate([{transform:"translateX(0px)"},{transform:`translateY(-${t.distance})`}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}moveUpaBack(t){return this.res.animate([{transform:"translateX(0px)"}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}innerExpandBack(t){this.res.animate([{width:this.prevWidth,height:this.prevHeight}],{duration:900,iterations:t.iterations,fill:"both"})}innerExpand(t){return this.prevWidth=this.res.style.width,this.prevHeight=this.res.style.height,this.res.animate([{width:this.prevWidth,height:this.prevHeight},{width:t.width??this.prevWidth,height:t.height??this.prevHeight}],{duration:900,iterations:t.iterations,fill:"both"}),this}fade(t){return this.res.style.visibility="hidden",this.faden(t.duration,t.from,"load"),t.finalOpacity&&(this.finalOpacity=t.finalOpacity),this}faden(t,e,s){return this.res.style.visibility="hidden",this.scrolled=!1,window.addEventListener(s,(()=>{this.res.style.visibility="visible";var i=window.innerHeight;(this.res.getBoundingClientRect().top-i<=0||"load"==s)&&0==this.scrolled&&("left"==e&&this.res.animate([{transform:"translateX(-30px)"},{transform:"translateX(0px)"}],{duration:t,iterations:1}),"right"==e&&this.res.animate([{transform:"translateX(30px)"},{transform:"translateX(0px)"}],{duration:t,iterations:1}),"top"==e&&this.res.animate([{transform:"translateY(-30px)"},{transform:"translateY(0px)"}],{duration:t,iterations:1}),"bottom"==e&&this.res.animate([{transform:"translateY(30px)"},{transform:"translateY(0px)"}],{duration:t,iterations:1}),this.res.animate([{opacity:"0.0"},{opacity:"1.0"}],{duration:t,iterations:1}),this.scrolled=!0)})),this}}class e extends t{constructor(t){super(),this.res=null,this.setup(t),this.code=[],this.isLast=!1,this.code.push("\n new Wrapper() \n")}isLasta(){return this.isLast=!0,this}toCode(){return this.code}getType(){return"LayoutWrapperElement"}setArea(t){return this.res.style.gridArea=t,this}removeQuotesFromFirstWord(t){return t.replace(/"([^"]+)":/g,"$1:")}clicked(t){return this.res.addEventListener("click",t),this}gpos(t){return this.res.style.gridColumn=t.col,this.res.style.gridRow=t.row,this}set(t){let e=".set({";if(t.pad&&this.pad(t.pad),t.arrpad&&(e+=`pad: {sides: [${t.arrpad.sides.map((t=>`"${t}"`)).join(", ")}], value: "${t.arrpad.value}"}, `),t.gpos&&this.gpos(t.gpos),t&&t.id&&t.stroke||t&&t.id&&t.gradient||t&&t.id&&t.span||t&&t.id&&t.layout){t.gradient,t.gradient&&(this.globalGradient=t.gradient.op.gradient),t.stroke&&super.setAny({globalBlast:`${t.stroke.op.width} ${t.stroke.op.color}`});let e=[t.stroke,t.gradient,t.animation,t.span,t.layout];e=e.filter((t=>null!=t));let i=[];for(var s=0;s<e.length;s++)i.push({range:e[s].range,log:e[s].op.name,target:e[s].target});this.res.setAttribute("id",t.id),this.betaReact(i,t.id)}t.socenter&&(this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.alignItems="center",t.socenter&&(e+=`socenter: ${t.socenter},`)),t.mboth&&(this.res.style.marginRight="auto")&&(this.res.style.marginLeft="auto"),t.mar&&this.mar(t.mar),t.sticky&&this.sticky(),t.transition&&(this.res.style.transition=t.transition),t.class&&this.res.setAttribute("class",t.class),t.ga&&(this.res.style.gridArea=t.ga),t.opacity&&(0==t.opacity&&(this.res.style.opacity=0),t.opacity&&(this.res.style.opacity=t.opacity)),t.maxHeight&&(this.res.style.maxHeight=t.maxHeight),t.id&&this.res.setAttribute("id",t.id),t.arrpad&&this.arrayPadding(t.arrpad.sides,t.arrpad.value),t.arrpad&&(e+=`arrpad: {sides: [${t.arrpad.sides.map((t=>`"${t}"`)).join(", ")}], value: "${t.arrpad.value}"}, `),t.arrayMargin&&this.arrayMargin(t.arrayMargin.sides,t.arrayMargin.value),t.arrayMargin&&(e+=`\n arrayMargin: {sides: ["${t.arrayMargin.sides}"], value: "${t.arrayMargin.value}"},`),t.center&&this.toCenter(t.center),t.center&&(e+=`center: "${t.center}",`),t.simpleCenter&&this.simpleCenter(),t.simpleCenter&&(e+=`center: "${t.simpleCenter}",`),t.filter&&(this.res.style.backdropFilter="blur(3px)"),t.radius&&this.corner(t.radius),t.radius&&(e+=`\n radius: "${t.radius}",`),t.border&&this.border(t.border),t.simpleBorder&&(this.res.style.border=t.simpleBorder),t.width&&this.width(t.width),t.width&&(e+=`\n width: "${t.width}",`),t.overflow&&(this.res.style.overflow="hidden"),t.overflow&&(e+=`\n overflow: "${t.overflow}",`),t.height&&this.heightNoAuto(t.height),t.height&&(e+=`\n height: "${t.height}",`),t.align&&this.flexAlign(t.align),t.align&&(e+=`\n align: "${t.align}",`),t.borderObj&&(this.res.style.borderRight=`${t.borderObj.width} solid ${t.borderObj.color}`,this.res.style.borderRadius=t.borderObj.radius),t.borderObja&&(this.res.style.border=`${t.borderObja.width} solid ${t.borderObja.color}`,this.res.style.borderRadius=t.borderObja.radius),t.font&&this.font(t.font),t.font&&(e+=`font: "${t.font}",`),t.maxWidth&&this.maxWidth(t.maxWidth),t.flexCenter&&this.flexc(t.flexCenter),t.multipad&&this.makeMultiPad(t.multipad),t.multimargin&&this.makeMultiMargin(t.multimargin),t.color&&this.color(t.color),t.background&&this.background(t.background),t.background&&(e+=`background: "${t.background}",`),t.weight&&this.weight(t.weight),t.paddings&&this.paddingo(t.paddings),t.area&&this.setArea(t.area),t.area&&(e+=`area: "${t.area}"`),t.column&&this.makeCol(),t.column&&(e+=`\n column: "${t.column}",`),t.alignIts&&(this.res.style.background="gray"),t.alignIts&&(this.res.style.alignItems="flex-start"),t.alignIts&&(this.res.style.justifyItems="flex-start"),t.customAlign&&(this.res.style.alignItems=t.customAlign),t.customJustify&&(this.res.style.justifyItems=t.customJustify),t.disp&&(this.res.style.display=t.disp),t.flexDir&&(this.res.style.flexDirection=t.flexDir),t.flexDir&&(this.res.style.display="flex"),t.flexDir&&(e+=`\n flexDir: "${t.flexDir}",`),t.zIndex&&(this.res.style.zIndex=t.zIndex),t.name&&(this.name=t.name),t.responsive&&this.rsp(t.responsive),t.stretch&&(t.stretch&&this.stretch(t.stretch),e+=`\n stretch: ${this.removeQuotesFromFirstWord(JSON.stringify(t.stretch))},`);for(let e in t)if("margin"===e){let s=t[e];if(Array.isArray(s)&&s.length>0)for(let t of s){let e=t;e.hasOwnProperty("top")&&(this.res.style.marginTop=e.top),e.hasOwnProperty("right")&&(this.res.style.marginRight=e.right),e.hasOwnProperty("bottom")&&(this.res.style.marginBottom=e.bottom),e.hasOwnProperty("left")&&(this.res.style.marginLeft=e.left)}}return e+="})\n",8===e.length&&(e=""),this.code.push(e),this}rsp(t){this.res.style.display="flex";let e=t.sequence.split("-");const s=()=>{let s=t.ranges;"0px"!==s[0]&&s.unshift("0px");for(var i=0;i<s.length-1;i++)(window.matchMedia(`(min-width: ${s[i]}) and (max-width: ${s[i+1]})`).matches||window.matchMedia(`(min-width: ${s[s.length-1]})`).matches)&&("row"===e[i]&&(this.res.style.flexDirection="row",this.res.style.border="3px solid green"),"col"===e[i]&&(this.res.style.flexDirection="column",this.res.style.border="3px solid purple"));return this};window.addEventListener("resize",s),s()}sticky(){return this.res.style.position="sticky",this.res.style.top=0,this}toSticky(){return this.res.style.position="sticky",this.res.style.top="0",this}stretch(t){const e=()=>{window.matchMedia(`(max-width: ${t.at})`).matches?this.res.style.width="auto":window.matchMedia("(max-device-width: 415px)").matches?this.res.style.width="100%":this.res.style.width=t.backTo};e(),window.addEventListener("resize",e)}makeCol(){return this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.alignItems="flex-start",this}paddingo(t){return this.res.style.padding=t,this}toCenter(t){return this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.justifyContent="center","both"===t&&(this.res.style.alignItems="center"),this}simpleCenter(){return this.res.style.justifyContent="center",this.res.style.justifyItems="center",this.res.style.alignContent="center",this.res.style.alignItems="center",this}color(t){return this.res.style.color=t,this}weight(t){return this.res.style.fontWeight=t,this}makeMultiPad(t){for(var e=0;e<t.length;e++)"left"===t[e].side&&(this.res.style.paddingLeft=t[e].value),"right"===t[e].side&&(this.res.style.paddingRight=t[e].value);return this}makeMultiMargin(t){this.res.style.zIndex="1";for(var e=0;e<t.length;e++)"left"===t[e].side&&(this.res.style.marginLeft=t[e].value),"right"===t[e].side&&(this.res.style.marginRight=t[e].value),"top"===t[e].side&&(this.res.style.marginTop=t[e].value),"bottom"===t[e].side&&(this.res.style.marginBottom=t[e].value);return this}flexc(t){return this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.justifyContent="center",this}maxWidth(t){return this.res.style.maxWidth=t,this}font(t){return this.res.style.fontFamily=t,this}flexAlign(t){return this.res.style.display="flex",this.res.style.justifyContent="flex-start",this.res.style.alignItems="flex-start","center"===t?(this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.alignItems="center",this):this}width(t){return this.res.style.width=t,this}heightNoAuto(t){return this.res.style.height=t,this}border(t){return this.res.style.borderRadius=`${t.radius}px`,this.res.style.padding="0.25em",this.res.style.border=`${t.width}px solid ${t.color}`,this}toCol(){return this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.justifyContent="center",this.res.style.alignItems="center",this}add(t){this.items=t,this.code.push(".add([ \n");let e=t.map(((e,s)=>e.toCode().flatMap((t=>t)).join("")+(s<t.length-1?",":""))).join("");this.code.push(e);for(var s=0;s<t.length;s++)if(void 0!==t[s]&&void 0!==t[s].toCode){let e=t[s].render();this.res.appendChild(e)}return this.code.push("])"),this}arrayPadding(t,e){return t.includes("left")&&(this.res.style.paddingLeft=e),t.includes("right")&&(this.res.style.paddingRight=e),t.includes("top")&&(this.res.style.paddingTop=e),t.includes("bottom")&&(this.res.style.paddingBottom=e),this}arrayMargin(t,e){return e||(this.res.style.marginLeft=`${t[0]}px`,this.res.style.marginTop=`${t[1]}px`,this.res.style.marginRight=`${t[2]}px`,this.res.style.marginBottom=`${t[3]}px`),t.includes("left")&&(this.res.style.marginLeft=e),t.includes("right")&&(this.res.style.marginRight=e),t.includes("top")&&(this.res.style.marginTop=e),t.includes("bottom")&&(this.res.style.marginBottom=e),this}setWidth(t){this.res.style.width="100vw"}setHeight(t){return this.res.style.height=`${t}`,this}setup(t){let e=t?document.createElement(t.isLink?"a":"div"):document.createElement("div");return t&&t.isLink&&(e.style.textDecoration="none",e.setAttribute("href",t.child)),this.res=e,this.res.style.margin=0,this.res.style.padding=0,t&&!0===t.hideOverflow&&(this.res.style.overflow="hidden",this.res.style.overflowY="scroll"),t&&!0===t.center&&(this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.justifyContent="center",this.res.style.alignItems="center"),t&&"left"===t.align&&(this.res.style.alignItems="flex-start"),t&&"right"===t.align&&(this.res.style.alignItems="flex-end"),t&&t.height&&(this.res.style.height=t.height),t&&t.width&&(this.res.style.width=t.width,this.res.style.marginLeft="auto",this.res.style.marginRight="auto",window.matchMedia("(max-device-width: 415px)").matches&&(this.res.style.width="95%")),this}height(t){return this.res.style.width="auto",this.res.style.height=`${t}`,this}size(t,e){return this.w=t,this.h=e,this.w?this.res.style.width=this.w:this.res.style.width=window.innerWidth,this.h?this.res.style.height=this.h:this.res.style.height=window.innerHeight,this}background(t){return this.res.style.background=t,this}corner(t){return this.res.style.borderRadius=t,this}padding(t,e,s,i){return this.res.style.paddingLeft=t,this.res.style.paddingTop=e,this.res.style.paddingRight=s,this.res.style.paddingBottom=i,this}margin(t,e,s,i){return this.res.style.marginLeft=t,this.res.style.marginTop=e,this.res.style.marginRight=s,this.res.style.marginBottom=i,this}itemWidth(t){for(var e=0;e<this.res.childNodes.length;e++)this.res.childNodes[e].style.width=t;return this}apply(t){const e=()=>{for(var e=0;e<t.length;e++){let s=t[e],i=window.matchMedia(`(max-width: ${s.width}px)`);s.device&&(i=window.matchMedia(`(max-device-width: ${s.width}px)`),alert(s.device)),i.matches&&Object.assign(this.res.style,s.styles)}};let s=window.matchMedia(`(max-width: ${t[0].width}px)`);return t[0].device&&(s=window.matchMedia(`(max-device-width: ${t[0].width}px)`)),s.matches||Object.assign(this.res.style,t[0].styles),e(),window.addEventListener("resize",e),this}mount(t){document.querySelector(t).appendChild(this.res)}render(t){return t?(document.querySelector("#mount"),document.querySelector(t).appendChild(this.res),this):this.res}}export{e as Wrapper};
|
|
1
|
+
/*! For license information please see container.esm.js.LICENSE.txt */
|
|
2
|
+
function t(e){return t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t(e)}function e(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var s,i,n,a,o=[],l=!0,c=!1;try{if(n=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(s=n.call(r)).done)&&(o.push(s.value),o.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(c)throw i}}return o}}(t,e)||s(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function r(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=s(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var i=0,n=function(){};return{s:n,n:function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}},e:function(t){throw t},f:n}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var a,o=!0,l=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return o=t.done,t},e:function(t){l=!0,a=t},f:function(){try{o||null==r.return||r.return()}finally{if(l)throw a}}}}function s(t,e){if(t){if("string"==typeof t)return i(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?i(t,e):void 0}}function i(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,s=Array(e);r<e;r++)s[r]=t[r];return s}function n(t,e){for(var r=0;r<e.length;r++){var s=e[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,a(s.key),s)}}function a(e){var r=function(e){if("object"!=t(e)||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var s=r.call(e,"string");if("object"!=t(s))return s;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==t(r)?r:r+""}var o=function(){return t=function t(){var e,r,s,i=this;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),e=this,s=function(t){if(t.transform||t.op&&t.op.transform){var e=t.transform;t.transform||(e=t.op.transform),e.duration||(e.duration="3s-ease-in-out"),i.setDefault=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0px";return 0===t.length?e+" ":t};var r=function(){var r="",s="",n="",a="",o="",l="",c="",u="",h="";if(0!==e.values.length){e.values.forEach((function(t){t.startsWith("tx:")&&(r=t.replace("tx:","")),t.startsWith("ty:")&&(s=t.replace("ty:","")),t.startsWith("tz:")?n=t.replace("tz:",""):t.startsWith("scale(")?a=t:t.startsWith("skew(")?o=t:t.startsWith("rotate(")?l=function(t){var e=t.match(/rotate\(([^)]+)\)/);if(!e)return t;var r=e[1].split(",").map((function(t){return t.trim()}));return 1===r.length?"rotate(".concat(r[0],")"):2===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],")"):3===r.length?"rotateX(".concat(r[0],") rotateY(").concat(r[1],") rotate(").concat(r[2],")"):t}(t):t.startsWith("perspective(")?c=t:t.startsWith("matrix(")?u=t:t.startsWith("opacity:")&&(h=t.replace("opacity:",""))})),r=i.setDefault(r),s=i.setDefault(s),n=i.setDefault(n);var d="";if("0px"!=s&&"0px"!=r&&"0px"!=n?d+="translate3d(".concat(r,", ").concat(s,", ").concat(n,")"):"0px"==s&&"0px"==r||(d+="translate(".concat(r,", ").concat(s,")")),a&&(d+=" ".concat(a)),l&&(d+=" ".concat(l)),o&&(d+=" ".concat(o)),c&&(d+=" ".concat(c)),u&&(d+=" ".concat(u)),d){if(t.op.transform.duration){var y=t.op.transform.duration.replace(/^(\d+)(s)-/,(function(t,e,r){return e/2+r+" "})),f="transform ".concat(y,", opacity ").concat(y);i.res.style.transition=f}else i.res.style.transition="transform 3s ease-in-out, opacity 3s ease-in-out";i.res.style.transform=d,i.res.style.opacity=h}}};e.on?i.res.addEventListener(e.on,(function(){e.delay?setTimeout((function(){r()}),e.delay):r()})):window.addEventListener("load",(function(){e.delay?setTimeout((function(){r()}),e.delay):r()}));var s=function(){var t="";e.values.forEach((function(e){e.startsWith("tx:")?t+="translateX(0) ":e.startsWith("ty:")?t+="translateY(0) ":e.startsWith("tz:")?t+="translateZ(0) ":e.startsWith("scale(")?t+="scale(1) ":e.startsWith("skew(")?t+="skew(0, 0) ":e.startsWith("rotate(")?t+="rotate(0) ":e.startsWith("perspective(")?t+="perspective(0) ":e.startsWith("matrix(")&&(t+="matrix(1, 0, 0, 1, 0, 0) "),i.res.style.opacity="1"})),t&&(i.res.style.transform=t.trim())};if(e.on)i.res.addEventListener("mouseout",(function(){e.keep||s()}));else{var n=1e3*parseFloat(e.duration),a=e.closeAfter?e.closeAfter:0;setTimeout((function(){e.keep||s()}),n/2+a)}}},(r=a(r="reactOnTransform"))in e?Object.defineProperty(e,r,{value:s,enumerable:!0,configurable:!0,writable:!0}):e[r]=s,this.state={isExpanded:!1,isMovedUp:!1,isMovedDown:!1}},(s=[{key:"keySet",value:function(t){return this.temporaryVal=1,this.res.style[t.key]=t.value,this}},{key:"onScroll",value:function(t){var e=this;"opacity"===t.value?this.res.style.opacity=t.valMin:"scale"===t.value&&(this.res.style.transform="scale(".concat(t.valMax,")")),window.addEventListener("scroll",(function(){var r=e.smartRange(window.scrollY,{min:t.from,max:t.to},{min:t.valMin,max:t.valMax});"opacity"===t.value?e.res.style.opacity=r:"scale"===t.value&&(e.res.style.transform="scale(".concat(r,")"))}))}},{key:"setAny",value:function(t){this[Object.keys(t)[0]]=[Object.values(t)[0]]}},{key:"setID",value:function(t){this.id=t}},{key:"setPrevText",value:function(t){this.prevText=t}},{key:"getCSS",value:function(){return this.css}},{key:"getPX",value:function(t){return{xs:"0px",sm:"576px",md:"768px",lg:"992px",xl:"1200px",xxl:"1400px",mxxl:"1800px"}[t]||"Invalid breakpoint"}},{key:"respad",value:function(t){var e=this,r=function(){e.pad(t[0].values);for(var r=0;r<t.length;r++){var s=t[r].breakpoint;window.matchMedia("(min-width: ".concat(e.getPX(s))).matches&&e.pad(t[r].values)}};window.addEventListener("resize",r),r()}},{key:"resmar",value:function(t){var e=this,r=function(){e.mar(t[0].values);for(var r=0;r<t.length;r++){var s=t[r].breakpoint;window.matchMedia("(max-width: ".concat(e.getPX(s))).matches&&e.mar(t[r].values)}};window.addEventListener("resize",r),r()}},{key:"resprop",value:function(t){var e=this;this.prevBackground=this.res.style.background,this.prevWidth=this.res.style.width,this.prevHeight=this.res.style.height,this.prevBorder=this.res.style.border;var r=function(){e.res.style.background=e.prevBackground,e.res.style.width=e.prevWidth,e.res.style.height=e.prevHeight,e.res.style.border=e.prevBorder;for(var r=0;r<t.length;r++){var s=t[r].breakpoint;if(window.matchMedia("(max-width: ".concat(e.getPX(s))).matches){var i={};for(var n in t[r])"breakpoint"!==n&&(i[n]=t[r][n]);e.set(i)}}};window.addEventListener("resize",r),r()}},{key:"isNumber",value:function(t){return"number"==typeof t&&!isNaN(t)}},{key:"pad",value:function(t){for(var e=0;e<t.length;e++)for(var r=Object.keys(t[e]),s=0;s<r.length;s++)for(var i=r[s],n=t[e][i],a=0;a<i.length;a++)switch(i[a]){case"a":this.res.style.padding=this.isNumber(n)?"".concat(n,"px"):n;break;case"t":this.res.style.paddingTop=this.isNumber(n)?"".concat(n,"px"):n;break;case"l":this.res.style.paddingLeft=this.isNumber(n)?"".concat(n,"px"):n;break;case"r":this.res.style.paddingRight=this.isNumber(n)?"".concat(n,"px"):n;break;case"b":this.res.style.paddingBottom=this.isNumber(n)?"".concat(n,"px"):n}return this}},{key:"as",value:function(t){return this.res.style.alignSelf=t,this}},{key:"mar",value:function(t){for(var e=0;e<t.length;e++)for(var r=Object.keys(t[e]),s=0;s<r.length;s++)for(var i=r[s],n=t[e][i],a=0;a<i.length;a++){switch(i[a]){case"a":this.res.style.margin=this.isNumber(n)?"".concat(n,"px"):n;break;case"t":this.res.style.marginTop=this.isNumber(n)?"".concat(n,"px"):n;break;case"l":this.res.style.marginLeft=this.isNumber(n)?"".concat(n,"px"):n;break;case"r":this.res.style.marginRight=this.isNumber(n)?"".concat(n,"px"):n;break;case"b":this.res.style.marginBottom=this.isNumber(n)?"".concat(n,"px"):n}"auto"===i[a]&&(this.res.style.marginLeft="auto",this.res.style.marginRight="auto")}return this}},{key:"smartRange",value:function(t,e,r){t<e.min&&(t=e.min),t>e.max&&(t=e.max);var s=(t-e.min)/(e.max-e.min);e.min>e.max&&(s=(t-e.max)/(e.min-e.max));var i=(r.min-r.max)*s-r.min;if(i=Math.abs(i),r.min<r.max){var n=(r.max+Math.abs(r.min))*s;i=r.min+n}return i}},{key:"gpos",value:function(t){return this.res.style.gridColumn=t.col,this.res.style.gridRow=t.row,this}},{key:"fluidCopy",value:function(t){if(t instanceof Object){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var e=document.createTextNode(this.text);return this.res.appendChild(e),this.res.style.fontSize=t.exact,this}if("S1"===t){this.prevStylex=this.res.style,this.res=document.createElement("h1"),this.res.style.cssText=this.prevStylex.cssText;var r=document.createTextNode(this.text);this.res.appendChild(r),this.res.style.fontSize="calc(1.625rem + 5.075vw)"}if("S2"===t){this.prevStylex=this.res.style,this.res=document.createElement("h2"),this.res.style.cssText=this.prevStylex.cssText;var s=document.createTextNode(this.text);this.res.appendChild(s),this.res.style.fontSize="calc(1.500rem + 4.3vw)"}if("S3"===t){this.prevStylex=this.res.style,this.res=document.createElement("h3"),this.res.style.cssText=this.prevStylex.cssText;var i=document.createTextNode(this.text);this.res.appendChild(i),this.res.style.fontSize="calc(1.375rem + 3.525vw)"}if("S4"===t){this.prevStylex=this.res.style,this.res=document.createElement("h4"),this.res.style.cssText=this.prevStylex.cssText;var n=document.createTextNode(this.text);this.res.appendChild(n),this.res.style.fontSize="calc(1.250rem + 2.75vw)"}if("S5"===t){this.prevStylex=this.res.style,this.res=document.createElement("h5"),this.res.style.cssText=this.prevStylex.cssText;var a=document.createTextNode(this.text);this.res.appendChild(a),this.res.style.fontSize="calc(1.125rem + 1.975vw)"}return"S6"===t&&(this.res.style.fontSize="calc(1rem + 0.5vw)"),this}},{key:"setIndex",value:function(t){this.index=t}},{key:"borderObj",value:function(t){var e,r=null!==(e=t.type)&&void 0!==e?e:"solid";return this.res.style.border="".concat(t.width," ").concat(r," ").concat(t.color),this.res.style.borderRadius=t.radius,this}},{key:"protoReact",value:function(t,s){var i=this;t.sort((function(t,e){return parseInt(t.range[0])-parseInt(e.range[0])}));var n=function(){var n=window.innerWidth,a="";i.storedQueries=t.map((function(t){return t.target})).filter((function(t){return null!=t}));var o,l=r(t);try{for(l.s();!(o=l.n()).done;){var c=o.value;i.counterIndex++;var u=e(c.range,2),h=u[0],d=u[1],y=parseInt(h),f=parseInt(d),p=!0;if(c.target){p=!1;for(var m=0;m<c.target.length;m++)c.target[m]===s&&(p=!0)}n>=y&&n<=f&&p&&("gradient"===c.log&&(a+="gradient"),"blast"===c.log&&(a+="blast"),"animation"===c.log&&(a+="animation"),"shadow"===c.log&&(a+="shadow"),"span"===c.log&&(a+="span"),"filter"===c.log&&(a+="filter"),"background"===c.log&&(a+="background"))}}catch(t){l.e(t)}finally{l.f()}i.res.style.margin="";var g,v=i.res.style.color;for(t.map((function(t){return t.log})).filter((function(t){return null!=t})).includes("gradient")&&(i.res.style.WebkitBackgroundClip="",i.res.style.background=""),i.res.style["-webkit-text-stroke"]="",i.res.style.filter="",i.res.style.textShadow="",i.res.style.border="";i.res.firstChild;)i.res.removeChild(i.res.firstChild);if(i.res.textContent=i.text,""===a&&(i.res.style["-webkit-text-fill-color"]="",i.res.style.color=v),"blast"===a){for(m=0;m<t.length;m++){var b=t[m].op.offsets;b&&void 0!==i.index&&(i.res.style.margin=b[Number(i.index)]+"px")}for(i.res.style["-webkit-text-fill-color"]="transparent",i.res.style["-webkit-text-stroke"]=i.globalBlast,m=0;m<t.length;m++){var x=t[m].op.offsets;x&&void 0!==i.index&&(i.res.style.margin=x[Number(i.index)]+"px")}}if("gradient"===a&&(i.res.style["-webkit-text-fill-color"]="transparent",i.res.style.background=i.globalGradient,i.res.style["-webkit-background-clip"]="text",i.res.style.border="1px solid orange"),"background"===a&&(i.res.style.background="orange"),"gradientblast"===a&&(i.res.style["-webkit-text-fill-color"]="transparent",i.res.style.background=i.globalGradient,i.res.style["-webkit-background-clip"]="text",i.res.style["-webkit-text-stroke"]=i.globalBlast),"gradientanimation"===a&&(i.res.style["-webkit-text-fill-color"]="transparent",i.res.style.background=i.globalGradient,i.res.style["-webkit-background-clip"]="text"),"gradientanimationshadow"===a&&(i.res.style["-webkit-text-fill-color"]="transparent",i.res.style.background=i.globalGradient,i.res.style["-webkit-background-clip"]="text",i.res.style.textShadow=i.globalShadow),"animationshadow"===a&&(i.res.style["-webkit-text-fill-color"]="",i.res.style.textShadow=i.globalShadow),"shadow"===a&&(i.res.style["-webkit-text-fill-color"]="",i.res.style.textShadow=i.globalShadow),"span"===a&&i.options.span)for(g=Array.isArray(i.options.span)?i.options.span.filter((function(t){return"span"===t.op.name}))[0]:i.options.span,i.res.textContent="",m=0;m<g.op.parts.length;m++){var w=g.op.parts[m].style,k=new Text(g.op.parts[m].text).setup({type:"span"}).set(w).render();i.res.appendChild(k)}if("filter"===a){var S=i.options.filtera.op.filter;i.res.style.filter=S,i.res.style.border="8px solid orange"}};window.addEventListener("resize",n),n()}},{key:"setPref",value:function(t){this.preffersId=t}},{key:"setClass",value:function(t){this.class=t}},{key:"betaReact",value:function(t,s){var i=this;this.ap=!1,this.cta=0,this.once=!1,t.sort((function(t,e){return parseInt(t.range[0])-parseInt(e.range[0])}));var n=function(){var n=window.innerWidth,a="";i.resCopy=i.res,i.storedQueries=t.map((function(t){return t.target})).filter((function(t){return null!=t}));var o,l=r(t);try{for(l.s();!(o=l.n()).done;){var c=o.value;i.counterIndex++;var u=e(c.range,2),h=u[0],d=u[1],y=parseInt(h),f=parseInt(d),p=!0;if(c.target){p=!1;for(var m=0;m<c.target.length;m++)c.target[m]===s&&(p=!0)}n>=y&&n<=f&&p&&("blast"===c.log&&(a+="blast"),"shadow"===c.log&&(a+="shadow"),"background"===c.log&&(a+="background"),"gradient"===c.log&&(a+="gradient"),"spana"===c.log&&(a+="spana"),"layout"===c.log&&(a+="layout"),"margin"===c.log&&(a+="margin"),c.op&&c.op.margin&&(i.useMargin=c.op.margin))}}catch(t){l.e(t)}finally{l.f()}if(i.res.style.background="",i.res.style.backgroundColor="",i.res.style.textShadow="",i.res.style.border="",i.res.style.margin="",i.res.style["-webkit-text-fill-color"]="",i.res.style["-webkit-text-stroke"]="",i.res.style["-webkit-text-stroke-width"]="","background"===a&&(i.res.style.backgroundColor="green"),"margin"===a)for(m=0;m<t.length;m++)if(t[m].op){var g=t[m].op.offsets;g&&void 0!==i.index&&(i.res.style.margin=g[Number(i.index)]+"px")}if("blastbackgroundmargin"===a){for(m=0;m<t.length;m++)if(t[m].op){var v=t[m].op.offsets;v&&void 0!==i.index&&(i.res.style.margin=v[Number(i.index)]+"px")}i.res.style.backgroundColor="green","FlexRowLayoutElement"===i.getType()?i.res.style.border="1px solid orange":(i.res.textContent=i.text,i.res.style["-webkit-text-fill-color"]="transparent",i.res.style["-webkit-text-stroke-color"]="orange",i.res.style["-webkit-text-stroke-width"]="1px"),i.res.style["-webkit-text-fill-color"]="transparent",i.res.style["-webkit-text-stroke-color"]="orange",i.res.style["-webkit-text-stroke-width"]="1px"}if("blastbackground"===a){for(m=0;m<t.length;m++)if(t[m].op){var b=t[m].op.offsets;b&&void 0!==i.index&&(i.res.style.margin=b[Number(i.index)]+"px")}i.res.style.backgroundColor="green",i.useMargin?i.res.style.margin="1rem":i.res.setAttribute("id","iofhwoiefhoih"),"FlexRowLayoutElement"===i.getType()?i.res.style.border="1px solid orange":(i.res.textContent=i.text,i.res.style["-webkit-text-fill-color"]="transparent",i.res.style["-webkit-text-stroke-color"]="orange",i.res.style["-webkit-text-stroke-width"]="1px"),i.res.style["-webkit-text-fill-color"]="transparent",i.res.style["-webkit-text-stroke-color"]="orange",i.res.style["-webkit-text-stroke-width"]="1px"}if("layout"===a&&(i.res.style.alignSelf="start",i.res.style.border="1px solid purple"),"blast"===a){for(m=0;m<t.length;m++)if(t[m].op){var x=t[m].op.offsets;x&&void 0!==i.index&&(i.res.style.margin=x[Number(i.index)]+"px")}"FlexRowLayoutElement"===i.getType()?i.res.style.border="1px solid orange":(i.res.textContent=i.text,i.res.style["-webkit-text-fill-color"]="transparent",i.res.style["-webkit-background-clip"]="text",i.res.style["-webkit-text-stroke-color"]="orange",i.res.style["-webkit-text-stroke-width"]="1px"),i.res.style["-webkit-text-fill-color"]="transparent",i.res.style["-webkit-text-stroke"]="orange",i.res.style["-webkit-text-stroke-width"]="1px"}"blastgradientbackground"===a&&(i.res.style.border="1px solid yellow",i.res.style["-webkit-text-stroke-color"]="orange",i.res.style["-webkit-text-stroke-width"]="1px"),"gradient"===a&&(i.res.style.background="linear-gradient(to left, #3498db, #1abc9c)","FlexRowLayoutElement"===i.getType()||(i.res.children[0]&&i.res.removeChild(i.res.children[0]),i.res.style["-webkit-text-fill-color"]="transparent",i.res.style["-webkit-background-clip"]="text",i.res.textContent=i.text)),"shadow"===a&&("FlexRowLayoutElement"===i.getType()||(i.res.children[0]&&i.res.removeChild(i.res.children[0]),i.res.style["-webkit-text-fill-color"]="",i.res.style["-webkit-text-fill-color"]="",i.res.style.textShadow="#1abc9cff -6px 6px , #1abc9c40 -12px 12px",i.res.textContent=i.text))};window.addEventListener("resize",n),n()}},{key:"cssGen",value:function(t,e,r,s){return this.css=[""],[""]}},{key:"chainReact",value:function(t,s,i){var n=this;this.cssGen(t,s,this.class,void 0!==this.class),this.ap=!1,this.cta=0,this.once=!1;var a,o=r(t);try{for(o.s();!(a=o.n()).done;){var l=a.value;l.range||(l.range=["0px","999999px"])}}catch(t){o.e(t)}finally{o.f()}t.sort((function(t,e){return parseInt(t.range[0])-parseInt(e.range[0])}));var c=function(){var a=window.visualViewport.width,o=[],l=[];n.resCopy=n.res,n.storedQueries=t.map((function(t){return t.target})).filter((function(t){return null!=t}));var c,u=r(t);try{for(u.s();!(c=u.n()).done;){var h=c.value;n.counterIndex++;var d=e(h.range,2),y=d[0],f=d[1],p=parseInt(y),m=parseInt(f),g=!0;if(h.target){g=!1;for(var v=0;v<h.target.length;v++)h.target[v]===s&&(g=!0)}a>=p&&a<=m&&g&&(o.push(h.log),l.push(h),h.op&&h.op.margin&&(n.useMargin=h.op.margin))}}catch(t){u.e(t)}finally{u.f()}if(i&&!i.includes("background")&&(n.res.style.background="",n.res.style.backgroundColor=""),n.res.style.textShadow="",i&&!i.includes("border")&&(n.res.style.border=""),i&&!i.includes("margin")&&(n.res.style.margin=""),n.res.style["-webkit-text-fill-color"]="",n.res.style["-webkit-text-stroke-color"]="",n.res.style["-webkit-text-stroke-width"]="",n.res.style.filter="",(o.includes("gradient")||o.includes("shadow"))&&(n.res.style.position="relative",n.res.style.zIndex=-1),o.includes("blast")){var b,x=l.filter((function(t){return"blast"===t.log}))[0].op.color,w=null!==(b=l.filter((function(t){return"blast"===t.log}))[0].op.width)&&void 0!==b?b:"1px";"FlexRowLayoutElement"===n.getType()?n.res.style.border="".concat(w,"px solid orange"):(n.res.textContent=n.text,n.res.style["-webkit-text-fill-color"]="transparent",n.res.style["-webkit-text-stroke-color"]=x,n.res.style["-webkit-text-stroke-width"]="".concat(w))}if(o.includes("filter")){var k=l.filter((function(t){return"filter"===t.log}))[0].op.filter;n.res.style.filter=k}if(o.includes("background")&&(n.res.style.backgroundColor="green"),o.includes("gradient")&&(n.res.style["-webkit-text-fill-color"]="transparent",n.res.style.background=n.globalGradient,n.res.style["background-clip"]="text"),o.includes("shadow"))if("FlexRowLayoutElement"===n.getType());else{var S="",C=0;for(v=0;v<n.options.shadow.op.steps;v++)S+="drop-shadow(".concat(C+=3,"px ").concat(C,"px ").concat(C,"px gray) ");n.res.style.filter=S}if(o.includes("margin"))for(v=0;v<t.length;v++)if(t[v].op){var E=t[v].op.offsets;E&&void 0!==n.index&&(n.res.style.margin=E[Number(n.index)]+"px")}if(o.includes("animation")){if(n.options.animation&&!n.hasAnimated&&!n.options.animation.op.fireAt){n.hasAnimated=!0;var O=n.options.animation.op;n.res.animate(O.keyframesClose,{duration:0,fill:"forwards"}),n.res.animate(O.keyframesOpen,O.openOptions)}if(n.options.animation&&n.options.animation.op.fireAt&&n.options.animation.op.fireAt.endsWith("px")){var j=n.options.animation.op;n.res.animate(j.keyframesClose,{duration:0,fill:"forwards"});var T=function(){window.scrollY>parseFloat(j.fireAt)&&(n.res.animate(j.keyframesOpen,j.openOptions),window.removeEventListener("scroll",T))};window.addEventListener("scroll",T)}if(n.options.animation&&n.options.animation.op.fireAt&&"inview"===n.options.animation.op.fireAt){var I=n.options.animation.op;n.res.animate(I.keyframesClose,{duration:0,fill:"forwards"}),new IntersectionObserver((function(t,e){t.forEach((function(t){t.isIntersecting&&(n.res.animate(I.keyframesOpen,I.openOptions),e.disconnect())}))})).observe(n.res)}}};window.addEventListener("resize",c),c()}},{key:"maxWidth",value:function(t){return this.res.style.maxWidth=t,this}},{key:"removeQuotesFromFirstWord",value:function(t){return t.replace(/"([^"]+)":/g,"$1:")}},{key:"arrayMargin",value:function(t,e){return t.includes("left")&&(this.res.style.marginLeft=e),t.includes("right")&&(this.res.style.marginRight=e),t.includes("top")&&(this.res.style.marginTop=e),t.includes("bottom")&&(this.res.style.marginBottom=e),t.includes("all")&&(this.res.style.margin=e),e||(this.res.style.marginBottom=t),this}},{key:"navBarExpand",value:function(){return this.res.style.backgroundColor="green",this.res.animate([{transform:"scaleY(3.0)"}],{duration:2e3,iterations:1,fill:"both"}),this}},{key:"scrollFade",value:function(t,e){return this.res.style.visibility="hidden",this.faden(t,e,"scroll"),this}},{key:"expand",value:function(t){var e=this;return!1===this.state.isExpanded?"click"===t.on?this.res.addEventListener("click",(function(){e.innerExpand(t)})):this.innerExpand(t):this.innerExpandBack(t),this.state.isExpanded=!this.state.isExpanded,this}},{key:"move",value:function(t){var e=this;return"click"===t.on?this.res.addEventListener("click",(function(){e.moveUpa(t)})):("up"===t.direction&&this.moveUpa(t),"down"===t.direction&&this.moveDowna(t),this.state.isMovedUp=!this.state.isMovedUp,"left"===t.direction&&this.moveLeft(t)),this}},{key:"moveLeft",value:function(t){return this.res.animate([{transform:"translateX(0px)"},{transform:"translateX(-".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}},{key:"moveUpa",value:function(t){return!1===this.state.isMovedUp?this.res.animate([{transform:"translateX(0px)"},{transform:"translateY(-".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play():this.res.animate([{transform:"translateX(0px)"},{transform:"translateY(".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}},{key:"moveDowna",value:function(t){return!1===this.state.isMovedDown?this.res.animate([{transform:"translateX(0px)"},{transform:"translateY(".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play():this.res.animate([{transform:"translateX(0px)"},{transform:"translateY(-".concat(t.distance,")")}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}},{key:"moveUpaBack",value:function(t){return this.res.animate([{transform:"translateX(0px)"}],{duration:900,iterations:t.iterations,fill:"both"}).play(),this}},{key:"innerExpandBack",value:function(t){this.res.animate([{width:this.prevWidth,height:this.prevHeight}],{duration:900,iterations:t.iterations,fill:"both"})}},{key:"innerExpand",value:function(t){var e,r;return this.prevWidth=this.res.style.width,this.prevHeight=this.res.style.height,this.res.animate([{width:this.prevWidth,height:this.prevHeight},{width:null!==(e=t.width)&&void 0!==e?e:this.prevWidth,height:null!==(r=t.height)&&void 0!==r?r:this.prevHeight}],{duration:900,iterations:t.iterations,fill:"both"}),this}},{key:"fade",value:function(t){return this.res.style.visibility="hidden",this.faden(t.duration,t.from,"load"),t.finalOpacity&&(this.finalOpacity=t.finalOpacity),this}},{key:"faden",value:function(t,e,r){var s=this;return this.res.style.visibility="hidden",this.scrolled=!1,window.addEventListener(r,(function(){s.res.style.visibility="visible";var i=window.innerHeight;(s.res.getBoundingClientRect().top-i<=0||"load"==r)&&0==s.scrolled&&("left"==e&&s.res.animate([{transform:"translateX(-30px)"},{transform:"translateX(0px)"}],{duration:t,iterations:1}),"right"==e&&s.res.animate([{transform:"translateX(30px)"},{transform:"translateX(0px)"}],{duration:t,iterations:1}),"top"==e&&s.res.animate([{transform:"translateY(-30px)"},{transform:"translateY(0px)"}],{duration:t,iterations:1}),"bottom"==e&&s.res.animate([{transform:"translateY(30px)"},{transform:"translateY(0px)"}],{duration:t,iterations:1}),s.res.animate([{opacity:"0.0"},{opacity:"1.0"}],{duration:t,iterations:1}),s.scrolled=!0)})),this}}])&&n(t.prototype,s),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,s}();function l(t){return l="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},l(t)}function c(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return u(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?u(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var s=0,i=function(){};return{s:i,n:function(){return s>=t.length?{done:!0}:{done:!1,value:t[s++]}},e:function(t){throw t},f:i}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var n,a=!0,o=!1;return{s:function(){r=r.call(t)},n:function(){var t=r.next();return a=t.done,t},e:function(t){o=!0,n=t},f:function(){try{a||null==r.return||r.return()}finally{if(o)throw n}}}}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,s=Array(e);r<e;r++)s[r]=t[r];return s}function h(t,e){for(var r=0;r<e.length;r++){var s=e[r];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,d(s.key),s)}}function d(t){var e=function(t){if("object"!=l(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=l(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==l(e)?e:e+""}function y(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(y=function(){return!!t})()}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var s=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(s){var i=Object.getOwnPropertyDescriptor(s,e);return i.get?i.get.call(arguments.length<3?t:r):i.value}},f.apply(null,arguments)}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function m(t,e){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},m(t,e)}var g=function(){function t(e){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),(r=function(t,e,r){return e=p(e),function(t,e){if(e&&("object"==l(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,y()?Reflect.construct(e,r||[],p(t).constructor):e.apply(t,r))}(this,t)).res=null,r.setup(e),r.code=[],r.isLast=!1,r.code.push("\n new Wrapper() \n"),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&m(t,e)}(t,o),e=t,r=[{key:"isLasta",value:function(){return this.isLast=!0,this}},{key:"toCode",value:function(){return this.code}},{key:"getType",value:function(){return"LayoutWrapperElement"}},{key:"setArea",value:function(t){return this.res.style.gridArea=t,this}},{key:"removeQuotesFromFirstWord",value:function(t){return t.replace(/"([^"]+)":/g,"$1:")}},{key:"clicked",value:function(t){return this.res.addEventListener("click",t),this}},{key:"gpos",value:function(t){return this.res.style.gridColumn=t.col,this.res.style.gridRow=t.row,this}},{key:"set",value:function(e){var r,s,i,n=".set({";if(e.pad&&this.pad(e.pad),e.arrpad&&(n+="pad: {sides: [".concat(e.arrpad.sides.map((function(t){return'"'.concat(t,'"')})).join(", "),'], value: "').concat(e.arrpad.value,'"}, ')),e.gpos&&this.gpos(e.gpos),e&&e.id&&e.stroke||e&&e.id&&e.gradient||e&&e.id&&e.span||e&&e.id&&e.layout){e.gradient,e.gradient&&(this.globalGradient=e.gradient.op.gradient),e.stroke&&(r=t,s=this,"function"==typeof(i=f(p(1&3?r.prototype:r),"setAny",s))?function(t){return i.apply(s,t)}:i)([{globalBlast:"".concat(e.stroke.op.width," ").concat(e.stroke.op.color)}]);var a=[e.stroke,e.gradient,e.animation,e.span,e.layout];a=a.filter((function(t){return null!=t}));for(var o=[],l=0;l<a.length;l++)o.push({range:a[l].range,log:a[l].op.name,target:a[l].target});this.res.setAttribute("id",e.id),this.betaReact(o,e.id)}if(e.socenter&&(this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.alignItems="center",e.socenter&&(n+="socenter: ".concat(e.socenter,","))),e.mboth&&(this.res.style.marginRight="auto")&&(this.res.style.marginLeft="auto"),e.mar&&this.mar(e.mar),e.sticky&&this.sticky(),e.transition&&(this.res.style.transition=e.transition),e.class&&this.res.setAttribute("class",e.class),e.ga&&(this.res.style.gridArea=e.ga),e.opacity&&(0==e.opacity&&(this.res.style.opacity=0),e.opacity&&(this.res.style.opacity=e.opacity)),e.maxHeight&&(this.res.style.maxHeight=e.maxHeight),e.id&&this.res.setAttribute("id",e.id),e.arrpad&&this.arrayPadding(e.arrpad.sides,e.arrpad.value),e.arrpad&&(n+="arrpad: {sides: [".concat(e.arrpad.sides.map((function(t){return'"'.concat(t,'"')})).join(", "),'], value: "').concat(e.arrpad.value,'"}, ')),e.arrayMargin&&this.arrayMargin(e.arrayMargin.sides,e.arrayMargin.value),e.arrayMargin&&(n+='\n arrayMargin: {sides: ["'.concat(e.arrayMargin.sides,'"], value: "').concat(e.arrayMargin.value,'"},')),e.center&&this.toCenter(e.center),e.center&&(n+='center: "'.concat(e.center,'",')),e.simpleCenter&&this.simpleCenter(),e.simpleCenter&&(n+='center: "'.concat(e.simpleCenter,'",')),e.filter&&(this.res.style.backdropFilter="blur(3px)"),e.radius&&this.corner(e.radius),e.radius&&(n+='\n radius: "'.concat(e.radius,'",')),e.border&&this.border(e.border),e.simpleBorder&&(this.res.style.border=e.simpleBorder),e.width&&this.width(e.width),e.width&&(n+='\n width: "'.concat(e.width,'",')),e.overflow&&(this.res.style.overflow="hidden"),e.overflow&&(n+='\n overflow: "'.concat(e.overflow,'",')),e.height&&this.heightNoAuto(e.height),e.height&&(n+='\n height: "'.concat(e.height,'",')),e.align&&this.flexAlign(e.align),e.align&&(n+='\n align: "'.concat(e.align,'",')),e.borderObj&&(this.res.style.borderRight="".concat(e.borderObj.width," solid ").concat(e.borderObj.color),this.res.style.borderRadius=e.borderObj.radius),e.borderObja&&(this.res.style.border="".concat(e.borderObja.width," solid ").concat(e.borderObja.color),this.res.style.borderRadius=e.borderObja.radius),e.font&&this.font(e.font),e.font&&(n+='font: "'.concat(e.font,'",')),e.maxWidth&&this.maxWidth(e.maxWidth),e.flexCenter&&this.flexc(e.flexCenter),e.multipad&&this.makeMultiPad(e.multipad),e.multimargin&&this.makeMultiMargin(e.multimargin),e.color&&this.color(e.color),e.background&&this.background(e.background),e.background&&(n+='background: "'.concat(e.background,'",')),e.weight&&this.weight(e.weight),e.paddings&&this.paddingo(e.paddings),e.area&&this.setArea(e.area),e.area&&(n+='area: "'.concat(e.area,'"')),e.column&&this.makeCol(),e.column&&(n+='\n column: "'.concat(e.column,'",')),e.alignIts&&(this.res.style.background="gray"),e.alignIts&&(this.res.style.alignItems="flex-start"),e.alignIts&&(this.res.style.justifyItems="flex-start"),e.customAlign&&(this.res.style.alignItems=e.customAlign),e.customJustify&&(this.res.style.justifyItems=e.customJustify),e.disp&&(this.res.style.display=e.disp),e.flexDir&&(this.res.style.flexDirection=e.flexDir),e.flexDir&&(this.res.style.display="flex"),e.flexDir&&(n+='\n flexDir: "'.concat(e.flexDir,'",')),e.zIndex&&(this.res.style.zIndex=e.zIndex),e.name&&(this.name=e.name),e.responsive&&this.rsp(e.responsive),e.stretch){e.stretch&&this.stretch(e.stretch);var u=this.removeQuotesFromFirstWord(JSON.stringify(e.stretch));n+="\n stretch: ".concat(u,",")}for(var h in e)if("margin"===h){var d=e[h];if(Array.isArray(d)&&d.length>0){var y,m=c(d);try{for(m.s();!(y=m.n()).done;){var g=y.value;g.hasOwnProperty("top")&&(this.res.style.marginTop=g.top),g.hasOwnProperty("right")&&(this.res.style.marginRight=g.right),g.hasOwnProperty("bottom")&&(this.res.style.marginBottom=g.bottom),g.hasOwnProperty("left")&&(this.res.style.marginLeft=g.left)}}catch(t){m.e(t)}finally{m.f()}}}return 8===(n+="})\n").length&&(n=""),this.code.push(n),this}},{key:"rsp",value:function(t){var e=this;this.res.style.display="flex";var r=t.sequence.split("-"),s=function(){var s=t.ranges;"0px"!==s[0]&&s.unshift("0px");for(var i=0;i<s.length-1;i++)(window.matchMedia("(min-width: ".concat(s[i],") and (max-width: ").concat(s[i+1],")")).matches||window.matchMedia("(min-width: ".concat(s[s.length-1],")")).matches)&&("row"===r[i]&&(e.res.style.flexDirection="row",e.res.style.border="3px solid green"),"col"===r[i]&&(e.res.style.flexDirection="column",e.res.style.border="3px solid purple"));return e};window.addEventListener("resize",s),s()}},{key:"sticky",value:function(){return this.res.style.position="sticky",this.res.style.top=0,this}},{key:"toSticky",value:function(){return this.res.style.position="sticky",this.res.style.top="0",this}},{key:"stretch",value:function(t){var e=this,r=function(){window.matchMedia("(max-width: ".concat(t.at,")")).matches?e.res.style.width="auto":window.matchMedia("(max-device-width: 415px)").matches?e.res.style.width="100%":e.res.style.width=t.backTo};r(),window.addEventListener("resize",r)}},{key:"makeCol",value:function(){return this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.alignItems="flex-start",this}},{key:"paddingo",value:function(t){return this.res.style.padding=t,this}},{key:"toCenter",value:function(t){return this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.justifyContent="center","both"===t&&(this.res.style.alignItems="center"),this}},{key:"simpleCenter",value:function(){return this.res.style.justifyContent="center",this.res.style.justifyItems="center",this.res.style.alignContent="center",this.res.style.alignItems="center",this}},{key:"color",value:function(t){return this.res.style.color=t,this}},{key:"weight",value:function(t){return this.res.style.fontWeight=t,this}},{key:"makeMultiPad",value:function(t){for(var e=0;e<t.length;e++)"left"===t[e].side&&(this.res.style.paddingLeft=t[e].value),"right"===t[e].side&&(this.res.style.paddingRight=t[e].value);return this}},{key:"makeMultiMargin",value:function(t){this.res.style.zIndex="1";for(var e=0;e<t.length;e++)"left"===t[e].side&&(this.res.style.marginLeft=t[e].value),"right"===t[e].side&&(this.res.style.marginRight=t[e].value),"top"===t[e].side&&(this.res.style.marginTop=t[e].value),"bottom"===t[e].side&&(this.res.style.marginBottom=t[e].value);return this}},{key:"flexc",value:function(t){return this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.justifyContent="center",this}},{key:"maxWidth",value:function(t){return this.res.style.maxWidth=t,this}},{key:"font",value:function(t){return this.res.style.fontFamily=t,this}},{key:"flexAlign",value:function(t){return this.res.style.display="flex",this.res.style.justifyContent="flex-start",this.res.style.alignItems="flex-start","center"===t?(this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.alignItems="center",this):this}},{key:"width",value:function(t){return this.res.style.width=t,this}},{key:"heightNoAuto",value:function(t){return this.res.style.height=t,this}},{key:"border",value:function(t){return this.res.style.borderRadius="".concat(t.radius,"px"),this.res.style.padding="0.25em",this.res.style.border="".concat(t.width,"px solid ").concat(t.color),this}},{key:"toCol",value:function(){return this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.justifyContent="center",this.res.style.alignItems="center",this}},{key:"add",value:function(t){this.items=t,this.code.push(".add([ \n");var e=t.map((function(e,r){return e.toCode().flatMap((function(t){return t})).join("")+(r<t.length-1?",":"")})).join("");this.code.push(e);for(var r=0;r<t.length;r++)if(void 0!==t[r]&&void 0!==t[r].toCode){var s=t[r].render();this.res.appendChild(s)}return this.code.push("])"),this}},{key:"arrayPadding",value:function(t,e){return t.includes("left")&&(this.res.style.paddingLeft=e),t.includes("right")&&(this.res.style.paddingRight=e),t.includes("top")&&(this.res.style.paddingTop=e),t.includes("bottom")&&(this.res.style.paddingBottom=e),this}},{key:"arrayMargin",value:function(t,e){return e||(this.res.style.marginLeft="".concat(t[0],"px"),this.res.style.marginTop="".concat(t[1],"px"),this.res.style.marginRight="".concat(t[2],"px"),this.res.style.marginBottom="".concat(t[3],"px")),t.includes("left")&&(this.res.style.marginLeft=e),t.includes("right")&&(this.res.style.marginRight=e),t.includes("top")&&(this.res.style.marginTop=e),t.includes("bottom")&&(this.res.style.marginBottom=e),this}},{key:"setWidth",value:function(t){this.res.style.width="100vw"}},{key:"setHeight",value:function(t){return this.res.style.height="".concat(t),this}},{key:"setup",value:function(t){var e=t?document.createElement(t.isLink?"a":"div"):document.createElement("div");return t&&t.isLink&&(e.style.textDecoration="none",e.setAttribute("href",t.child)),this.res=e,this.res.style.margin=0,this.res.style.padding=0,t&&!0===t.hideOverflow&&(this.res.style.overflow="hidden",this.res.style.overflowY="scroll"),t&&!0===t.center&&(this.res.style.display="flex",this.res.style.flexDirection="column",this.res.style.justifyContent="center",this.res.style.alignItems="center"),t&&"left"===t.align&&(this.res.style.alignItems="flex-start"),t&&"right"===t.align&&(this.res.style.alignItems="flex-end"),t&&t.height&&(this.res.style.height=t.height),t&&t.width&&(this.res.style.width=t.width,this.res.style.marginLeft="auto",this.res.style.marginRight="auto",window.matchMedia("(max-device-width: 415px)").matches&&(this.res.style.width="95%")),this}},{key:"height",value:function(t){return this.res.style.width="auto",this.res.style.height="".concat(t),this}},{key:"size",value:function(t,e){return this.w=t,this.h=e,this.w?this.res.style.width=this.w:this.res.style.width=window.innerWidth,this.h?this.res.style.height=this.h:this.res.style.height=window.innerHeight,this}},{key:"background",value:function(t){return this.res.style.background=t,this}},{key:"corner",value:function(t){return this.res.style.borderRadius=t,this}},{key:"padding",value:function(t,e,r,s){return this.res.style.paddingLeft=t,this.res.style.paddingTop=e,this.res.style.paddingRight=r,this.res.style.paddingBottom=s,this}},{key:"margin",value:function(t,e,r,s){return this.res.style.marginLeft=t,this.res.style.marginTop=e,this.res.style.marginRight=r,this.res.style.marginBottom=s,this}},{key:"itemWidth",value:function(t){for(var e=0;e<this.res.childNodes.length;e++)this.res.childNodes[e].style.width=t;return this}},{key:"apply",value:function(t){var e=this,r=function(){for(var r=0;r<t.length;r++){var s=t[r],i=window.matchMedia("(max-width: ".concat(s.width,"px)"));s.device&&(i=window.matchMedia("(max-device-width: ".concat(s.width,"px)")),alert(s.device)),i.matches&&Object.assign(e.res.style,s.styles)}},s=window.matchMedia("(max-width: ".concat(t[0].width,"px)"));return t[0].device&&(s=window.matchMedia("(max-device-width: ".concat(t[0].width,"px)"))),s.matches||Object.assign(this.res.style,t[0].styles),r(),window.addEventListener("resize",r),this}},{key:"mount",value:function(t){document.querySelector(t).appendChild(this.res)}},{key:"render",value:function(t){return t?(document.querySelector("#mount"),document.querySelector(t).appendChild(this.res),this):this.res}}],r&&h(e.prototype,r),Object.defineProperty(e,"prototype",{writable:!1}),e;var e,r}();export{g as Wrapper};
|