@rocketspark/domain-checker
Version:
Embeddable Domain Checker for Rocketspark
13 lines • 5.2 kB
JavaScript
/*!
*
* @rocketspark/domain-checker v1.0.12
* git+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],{7402:function(t,e,n){n.d(e,{d:function(){return a},i:function(){return s},s:function(){return r}});var i=n(6919);const a=(t,e=0)=>{let n;return(...i)=>{clearTimeout(n),n=setTimeout(t,e,...i)}},s=(t,e,n)=>{const a=(void 0!==t.target?t.target:n).tagName.toLowerCase().replace("rs-",""),s=t.detail,r={},o=e.get(a)||{};let l=!1;Object.keys(s).forEach((t=>{if(s[t]){const e=`item-${t}`;o[e]||(l=!0),r[e]=!0}})),l||Object.keys(r).length===Object.keys(o).length||(l=!0),l&&(e.set(a,r),(0,i.f)(n))},r=(t,e,n,i=!1)=>{!e&&!n||i||null!==t&&(t.style.display="block",setTimeout((function(){t.style.opacity="1"}),150))}},6833:function(t,e,n){n.r(e),n.d(e,{rs_item:function(){return r}});var i=n(6919),a=n(9041),s=n(7402);const r=class{constructor(t){(0,i.r)(this,t),this.itemStyles=new Map,this.disabled=!1,this.type="button",this.appearance="none",this.gap=0,this.padding=!1,this.flex=!1}rsItem(t){(0,s.i)(t,this.itemStyles,this.el)}componentDidRender(){(0,a.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:n,target:s}=this,r={},o=this.isClickable()?void 0===e?"button":"a":"div",l="button"===o?{type:this.type}:{href:e,rel:n,target:s};return this.itemStyles.forEach((t=>{Object.assign(r,t)})),(0,i.h)(i.H,{key:"b547fec8aa44b424326b0a38c4c06d2e2cb64b8a",class:Object.assign(Object.assign({},r),{"rs-item--padding":this.padding,"rs-item--flex":this.flex})},(0,i.h)(o,Object.assign({key:"b8289b414e109476b1c9599ee1d7d7e88cef9157"},l,{class:{"item-native":!0,"no-flex-gap-support":!(0,a.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,i.h)("slot",{key:"00ef898c68768ae618cc7f6075d52d55ac825a6e",name:"start"}),(0,i.h)("slot",{key:"4f36b173e3d20f439f8f8538fc2c59ac6a2dd55c"}),(0,i.h)("slot",{key:"620273c8414c367e5d082560a988805b601267c1",name:"end"})))}get el(){return(0,i.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}"},9041:function(t,e,n){n.d(e,{S:function(){return o},a:function(){return r},f:function(){return i},o:function(){return s}});const i=()=>{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 a(t,e,n,i,a={}){let s=e;Array.isArray(e)?s=Array.from(e):Array.isArray(e)||(s=[e]);let r=n;return Array.isArray(n)||(r=[n]),s.forEach((e=>{r.forEach((n=>{e[t](n,i,Object.assign({capture:!1},a))}))})),[e,n,i,a]}const s=a.bind(null,"addEventListener"),r=a.bind(null,"removeEventListener"),o=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