@rocketspark/domain-checker
Version:
Embeddable Domain Checker for Rocketspark
13 lines • 5.17 kB
JavaScript
/*!
*
* @rocketspark/domain-checker v0.0.34
* https://github.com/rocketspark/domain-checker.git
*
* Copyright (c) Lee Reichardt and project contributors.
*
* This source code is licensed under the no license license found in the
* LICENSE file in the root directory of this source tree.
*
*/
;(self.webpackChunkDomainChecker=self.webpackChunkDomainChecker||[]).push([[833],{2419:function(t,e,i){i.d(e,{d:function(){return s},i:function(){return o},s:function(){return r}});var n=i(7915);const s=(t,e=0)=>{let i;return(...n)=>{clearTimeout(i),i=setTimeout(t,e,...n)}},o=(t,e,i)=>{const s=(void 0!==t.target?t.target:i).tagName.toLowerCase().replace("rs-",""),o=t.detail,r={},a=e.get(s)||{};let l=!1;Object.keys(o).forEach((t=>{if(o[t]){const e=`item-${t}`;a[e]||(l=!0),r[e]=!0}})),l||Object.keys(r).length===Object.keys(a).length||(l=!0),l&&(e.set(s,r),(0,n.f)(i))},r=(t,e,i,n=!1)=>{!e&&!i||n||null!==t&&(t.style.display="block",setTimeout((function(){t.style.opacity="1"}),150))}},6833:function(t,e,i){i.r(e),i.d(e,{rs_item:function(){return r}});var n=i(7915),s=i(4700),o=i(2419);const r=class{constructor(t){(0,n.r)(this,t),this.itemStyles=new Map,this.disabled=!1,this.href=void 0,this.rel=void 0,this.target=void 0,this.type="button",this.appearance="none",this.justifyContent=void 0,this.alignItems=void 0,this.alignContent=void 0,this.justifyItems=void 0,this.gap=0,this.flexWrap=void 0,this.flexDirection=void 0,this.padding=!1,this.flex=!1}rsItem(t){(0,o.i)(t,this.itemStyles,this.el)}componentDidRender(){(0,s.f)()||(this.item.style.setProperty("--fgp-gap-row",`${this.gap.toString()}px`),this.item.style.setProperty("--fgp-gap-column",`${this.gap.toString()}px`),this.item.style.setProperty("--fgp-gap",`${this.gap.toString()}px`))}isClickable(){return void 0!==this.href}render(){const{disabled:t,href:e,rel:i,target:o}=this,r={},a=this.isClickable()?void 0===e?"button":"a":"div",l="button"===a?{type:this.type}:{href:e,rel:i,target:o};return this.itemStyles.forEach((t=>{Object.assign(r,t)})),(0,n.h)(n.H,{class:Object.assign(Object.assign({},r),{"rs-item--padding":this.padding,"rs-item--flex":this.flex})},(0,n.h)(a,Object.assign({},l,{class:{"item-native":!0,"no-flex-gap-support":!(0,s.f)()},ref:t=>this.item=t,style:{"flex-direction":this.flexDirection,"align-items":this.alignItems,"justify-content":this.justifyContent,"align-content":this.alignContent,"justify-items":this.justifyItems,gap:`${this.gap}px`,"flex-wrap":this.flexWrap},disabled:t}),(0,n.h)("slot",{name:"start"}),(0,n.h)("slot",null),(0,n.h)("slot",{name:"end"})))}get el(){return(0,n.g)(this)}};r.style=":host{display:block;box-sizing:border-box;position:relative}.item-native{text-decoration:none;color:inherit}:host(.rs-item--padding){padding:8px}:host(.rs-item--flex){width:100%}:host(.rs-item--flex) .item-native{display:flex;flex-direction:row;align-items:center}:host([appearance='outline']){box-shadow:inset 0 0 0 1px var(--rs-color-light);border-radius:8px}:host([appearance='shadow']){box-shadow:0 1px 4px rgba(195, 213, 226, 0.50041);border-radius:8px}:host([appearance='none']){box-shadow:none;border-radius:0}::slotted([slot='start']){margin-right:7px}::slotted([slot='end']){margin-left:7px}:host([align-content='space-between']) .item-native ::slotted([slot='start']),:host([align-content='space-between']) .item-native ::slotted([slot='end']),:host([align-content='space-evenly']) .item-native ::slotted([slot='start']),:host([align-content='space-evenly']) .item-native ::slotted([slot='end']),:host([align-content='space-around']) .item-native ::slotted([slot='start']),:host([align-content='space-around']) .item-native ::slotted([slot='end']){margin:0}:host .item-native.no-flex-gap-support ::slotted(*){--fgp-margin-top:calc(var(--fgp-gap-row));--fgp-margin-left:calc(var(--fgp-gap-column));margin-top:var(--fgp-margin-top) !important;margin-left:var(--fgp-margin-left) !important}.no-flex-gap-support{--has-fgp:initial;--fgp-margin-top:calc(var(--fgp-gap-row, 0px) * -1);--fgp-margin-left:calc(var(--fgp-gap-column, 0px) * -1);display:flex;gap:var(--fgp-gap, 0px);margin-top:var(--fgp-margin-top, 0) !important;margin-left:var(--fgp-margin-left, 0) !important}"},4700:function(t,e,i){i.d(e,{S:function(){return a},a:function(){return r},f:function(){return n},o:function(){return o}});const n=()=>{const t=document.createElement("div");t.style.display="flex",t.style.flexDirection="column",t.style.rowGap="1px",t.appendChild(document.createElement("div")),t.appendChild(document.createElement("div")),document.body.appendChild(t);const e=1===t.scrollHeight;return t.parentNode.removeChild(t),e};function s(t,e,i,n,s={}){let o=e;Array.isArray(e)?o=Array.from(e):Array.isArray(e)||(o=[e]);let r=i;return Array.isArray(i)||(r=[i]),o.forEach((e=>{r.forEach((i=>{e[t](i,n,Object.assign({capture:!1},s))}))})),[e,i,n,s]}const o=s.bind(null,"addEventListener"),r=s.bind(null,"removeEventListener"),a=t=>{if(!t||"[object Function]"!==Object.prototype.toString.call(t))return;let e;window.addEventListener("scroll",(function(){window.clearTimeout(e),e=setTimeout((function(){t()}),66)}),!1)}}}]);
//# sourceMappingURL=833.index.js.map