Socket
Socket
Sign inDemoInstall

@fluid-topics/ft-loader

Package Overview
Dependencies
Maintainers
2
Versions
239
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@fluid-topics/ft-loader - npm Package Compare versions

Comparing version 0.3.32 to 0.3.33

2

build/ft-loader.min.js

@@ -17,3 +17,3 @@ !function(t){

*/
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,i=window.customElements.define,e=window.customElements.get,s=window.customElements,o=new WeakMap,n=new WeakMap,r=new WeakMap,a=new WeakMap;let l;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,o){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(o))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const a=o.prototype.attributeChangedCallback,l=new Set(o.observedAttributes||[]);u(o,l,a);const c={elementClass:o,connectedCallback:o.prototype.connectedCallback,disconnectedCallback:o.prototype.disconnectedCallback,adoptedCallback:o.prototype.adoptedCallback,attributeChangedCallback:a,formAssociated:o.formAssociated,formAssociatedCallback:o.prototype.formAssociatedCallback,formDisabledCallback:o.prototype.formDisabledCallback,formResetCallback:o.prototype.formResetCallback,formStateRestoreCallback:o.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,c),this._definitionsByClass.set(o,c);let h=e.call(s,t);h||(h=d(t),i.call(s,t,h)),this===window.customElements&&(r.set(o,c),c.standInClass=h);const p=this._awaitingUpgrade.get(t);if(p){this._awaitingUpgrade.delete(t);for(const t of p)n.delete(t),f(t,c,!0)}const v=this._whenDefinedPromises.get(t);return void 0!==v&&(v.resolve(o),this._whenDefinedPromises.delete(t)),o}upgrade(){y.push(this),s.upgrade.apply(s,arguments),y.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const i=this._getDefinition(t);if(void 0!==i)return Promise.resolve(i.elementClass);let e=this._whenDefinedPromises.get(t);return void 0===e&&(e={},e.promise=new Promise((t=>e.resolve=t)),this._whenDefinedPromises.set(t,e)),e.promise}_upgradeWhenDefined(t,i,e){let s=this._awaitingUpgrade.get(i);s||this._awaitingUpgrade.set(i,s=new Set),e?s.add(t):s.delete(t)}},window.HTMLElement=function(){let i=l;if(i)return l=void 0,i;const e=r.get(this.constructor);if(!e)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return i=Reflect.construct(t,[],e.standInClass),Object.setPrototypeOf(i,this.constructor.prototype),o.set(i,e),i},window.HTMLElement.prototype=t.prototype;const c=t=>t===document||t instanceof ShadowRoot,h=t=>{let i=t.getRootNode();if(!c(i)){const t=y[y.length-1];if(t instanceof CustomElementRegistry)return t;i=t.getRootNode(),c(i)||(i=a.get(i)?.getRootNode()||document)}return i.customElements},d=i=>class{static get formAssociated(){return!0}constructor(){const e=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(e,HTMLElement.prototype);const s=h(e)||window.customElements,o=s._getDefinition(i);return o?f(e,o):n.set(e,s),e}connectedCallback(){const t=o.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,i,!0)}disconnectedCallback(){const t=o.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,i,!1)}adoptedCallback(){o.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=o.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=o.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=o.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=o.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},u=(t,i,e)=>{if(0===i.size||void 0===e)return;const s=t.prototype.setAttribute;s&&(t.prototype.setAttribute=function(t,o){const n=t.toLowerCase();if(i.has(n)){const t=this.getAttribute(n);s.call(this,n,o),e.call(this,n,t,o)}else s.call(this,n,o)});const o=t.prototype.removeAttribute;o&&(t.prototype.removeAttribute=function(t){const s=t.toLowerCase();if(i.has(s)){const t=this.getAttribute(s);o.call(this,s),e.call(this,s,t,null)}else o.call(this,s)})},p=i=>{const e=Object.getPrototypeOf(i);if(e!==window.HTMLElement)return e===t||"HTMLElement"===e?.prototype?.constructor?.name?Object.setPrototypeOf(i,window.HTMLElement):p(e)},f=(t,i,e=!1)=>{Object.setPrototypeOf(t,i.elementClass.prototype),o.set(t,i),l=t;try{new i.elementClass}catch(t){p(i.elementClass),new i.elementClass}i.observedAttributes.forEach((e=>{t.hasAttribute(e)&&i.attributeChangedCallback.call(t,e,null,t.getAttribute(e))})),e&&i.connectedCallback&&t.isConnected&&i.connectedCallback.call(t)},v=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const i=v.apply(this,arguments);return t.customElements&&(i.customElements=t.customElements),i};let y=[document];const m=(t,i,e)=>{const s=(e?Object.getPrototypeOf(e):t.prototype)[i];t.prototype[i]=function(){y.push(this);const t=s.apply(e||this,arguments);return void 0!==t&&a.set(t,this),y.pop(),t}};m(ShadowRoot,"createElement",document),m(ShadowRoot,"importNode",document),m(Element,"insertAdjacentHTML");const b=(t,i)=>{const e=Object.getOwnPropertyDescriptor(t.prototype,i);Object.defineProperty(t.prototype,i,{...e,set(t){y.push(this),e.set.call(this,t),y.pop()}})};if(b(Element,"innerHTML"),b(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,i=HTMLElement.prototype.attachInternals,e=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...e){const s=i.call(this,...e);return t.set(s,this),s},e.forEach((i=>{const e=window.ElementInternals.prototype,s=e[i];e[i]=function(...i){const e=t.get(this);if(!0!==o.get(e).formAssociated)throw new DOMException(`Failed to execute ${s} on 'ElementInternals': The target element is not a form-associated custom element.`);s?.call(this,...i)}}));class s extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class n{constructor(t){const i=new Map;t.forEach(((t,e)=>{const s=t.getAttribute("name"),o=i.get(s)||[];this[+e]=t,o.push(t),i.set(s,o)})),this.length=t.length,i.forEach(((t,i)=>{t&&(1===t.length?this[i]=t[0]:this[i]=new s(t))}))}namedItem(t){return this[t]}}const r=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=r.get.call(this,[]),i=[];for(const e of t){const t=o.get(e);t&&!0!==t.formAssociated||i.push(e)}return new n(i)}})}}try{window.customElements.define("custom-element",null)}catch(t){const i=window.customElements.define;window.customElements.define=(t,e,s)=>{try{i.bind(window.customElements)(t,e,s)}catch(i){console.info(t,e,s,i)}}}class i{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,i){return this.callbacks=[t],this.debounce(i)}queue(t,i){return this.callbacks.push(t),this.debounce(i)}cancel(){this.clearTimeout(),this.reject()}debounce(t){return null==this.promise&&(this.promise=new Promise(((t,i)=>{this.resolvePromise=t,this.rejectPromise=i}))),this.clearTimeout(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout),this.promise}async runCallbacks(){var t,i;const e=[...this.callbacks];this.callbacks=[];const s=null!==(t=this.rejectPromise)&&void 0!==t?t:()=>null,o=null!==(i=this.resolvePromise)&&void 0!==i?i:()=>null;this.clearPromise();for(let t of e)try{await t()}catch(t){s(t)}o()}clearTimeout(){null!=this._debounce&&window.clearTimeout(this._debounce)}reject(){this.rejectPromise&&(this.rejectPromise(),this.clearPromise())}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}}
if(!ShadowRoot.prototype.createElement){const t=window.HTMLElement,i=window.customElements.define,e=window.customElements.get,s=window.customElements,o=new WeakMap,n=new WeakMap,r=new WeakMap,a=new WeakMap;let l;window.CustomElementRegistry=class{constructor(){this._definitionsByTag=new Map,this._definitionsByClass=new Map,this._whenDefinedPromises=new Map,this._awaitingUpgrade=new Map}define(t,o){if(t=t.toLowerCase(),void 0!==this._getDefinition(t))throw new DOMException(`Failed to execute 'define' on 'CustomElementRegistry': the name "${t}" has already been used with this registry`);if(void 0!==this._definitionsByClass.get(o))throw new DOMException("Failed to execute 'define' on 'CustomElementRegistry': this constructor has already been used with this registry");const a=o.prototype.attributeChangedCallback,l=new Set(o.observedAttributes||[]);u(o,l,a);const c={elementClass:o,connectedCallback:o.prototype.connectedCallback,disconnectedCallback:o.prototype.disconnectedCallback,adoptedCallback:o.prototype.adoptedCallback,attributeChangedCallback:a,formAssociated:o.formAssociated,formAssociatedCallback:o.prototype.formAssociatedCallback,formDisabledCallback:o.prototype.formDisabledCallback,formResetCallback:o.prototype.formResetCallback,formStateRestoreCallback:o.prototype.formStateRestoreCallback,observedAttributes:l};this._definitionsByTag.set(t,c),this._definitionsByClass.set(o,c);let h=e.call(s,t);h||(h=d(t),i.call(s,t,h)),this===window.customElements&&(r.set(o,c),c.standInClass=h);const p=this._awaitingUpgrade.get(t);if(p){this._awaitingUpgrade.delete(t);for(const t of p)n.delete(t),f(t,c,!0)}const v=this._whenDefinedPromises.get(t);return void 0!==v&&(v.resolve(o),this._whenDefinedPromises.delete(t)),o}upgrade(){y.push(this),s.upgrade.apply(s,arguments),y.pop()}get(t){return this._definitionsByTag.get(t)?.elementClass}_getDefinition(t){return this._definitionsByTag.get(t)}whenDefined(t){const i=this._getDefinition(t);if(void 0!==i)return Promise.resolve(i.elementClass);let e=this._whenDefinedPromises.get(t);return void 0===e&&(e={},e.promise=new Promise((t=>e.resolve=t)),this._whenDefinedPromises.set(t,e)),e.promise}_upgradeWhenDefined(t,i,e){let s=this._awaitingUpgrade.get(i);s||this._awaitingUpgrade.set(i,s=new Set),e?s.add(t):s.delete(t)}},window.HTMLElement=function(){let i=l;if(i)return l=void 0,i;const e=r.get(this.constructor);if(!e)throw new TypeError("Illegal constructor (custom element class must be registered with global customElements registry to be newable)");return i=Reflect.construct(t,[],e.standInClass),Object.setPrototypeOf(i,this.constructor.prototype),o.set(i,e),i},window.HTMLElement.prototype=t.prototype;const c=t=>t===document||t instanceof ShadowRoot,h=t=>{let i=t.getRootNode();if(!c(i)){const t=y[y.length-1];if(t instanceof CustomElementRegistry)return t;i=t.getRootNode(),c(i)||(i=a.get(i)?.getRootNode()||document)}return i.customElements},d=i=>class{static get formAssociated(){return!0}constructor(){const e=Reflect.construct(t,[],this.constructor);Object.setPrototypeOf(e,HTMLElement.prototype);const s=h(e)||window.customElements,o=s._getDefinition(i);return o?f(e,o):n.set(e,s),e}connectedCallback(){const t=o.get(this);t?t.connectedCallback&&t.connectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,i,!0)}disconnectedCallback(){const t=o.get(this);t?t.disconnectedCallback&&t.disconnectedCallback.apply(this,arguments):n.get(this)._upgradeWhenDefined(this,i,!1)}adoptedCallback(){o.get(this)?.adoptedCallback?.apply(this,arguments)}formAssociatedCallback(){const t=o.get(this);t&&t.formAssociated&&t?.formAssociatedCallback?.apply(this,arguments)}formDisabledCallback(){const t=o.get(this);t?.formAssociated&&t?.formDisabledCallback?.apply(this,arguments)}formResetCallback(){const t=o.get(this);t?.formAssociated&&t?.formResetCallback?.apply(this,arguments)}formStateRestoreCallback(){const t=o.get(this);t?.formAssociated&&t?.formStateRestoreCallback?.apply(this,arguments)}},u=(t,i,e)=>{if(0===i.size||void 0===e)return;const s=t.prototype.setAttribute;s&&(t.prototype.setAttribute=function(t,o){const n=t.toLowerCase();if(i.has(n)){const t=this.getAttribute(n);s.call(this,n,o),e.call(this,n,t,o)}else s.call(this,n,o)});const o=t.prototype.removeAttribute;o&&(t.prototype.removeAttribute=function(t){const s=t.toLowerCase();if(i.has(s)){const t=this.getAttribute(s);o.call(this,s),e.call(this,s,t,null)}else o.call(this,s)})},p=i=>{const e=Object.getPrototypeOf(i);if(e!==window.HTMLElement)return e===t||"HTMLElement"===e?.prototype?.constructor?.name?Object.setPrototypeOf(i,window.HTMLElement):p(e)},f=(t,i,e=!1)=>{Object.setPrototypeOf(t,i.elementClass.prototype),o.set(t,i),l=t;try{new i.elementClass}catch(t){p(i.elementClass),new i.elementClass}i.observedAttributes.forEach((e=>{t.hasAttribute(e)&&i.attributeChangedCallback.call(t,e,null,t.getAttribute(e))})),e&&i.connectedCallback&&t.isConnected&&i.connectedCallback.call(t)},v=Element.prototype.attachShadow;Element.prototype.attachShadow=function(t){const i=v.apply(this,arguments);return t.customElements&&(i.customElements=t.customElements),i};let y=[document];const m=(t,i,e)=>{const s=(e?Object.getPrototypeOf(e):t.prototype)[i];t.prototype[i]=function(){y.push(this);const t=s.apply(e||this,arguments);return void 0!==t&&a.set(t,this),y.pop(),t}};m(ShadowRoot,"createElement",document),m(ShadowRoot,"importNode",document),m(Element,"insertAdjacentHTML");const b=(t,i)=>{const e=Object.getOwnPropertyDescriptor(t.prototype,i);Object.defineProperty(t.prototype,i,{...e,set(t){y.push(this),e.set.call(this,t),y.pop()}})};if(b(Element,"innerHTML"),b(ShadowRoot,"innerHTML"),Object.defineProperty(window,"customElements",{value:new CustomElementRegistry,configurable:!0,writable:!0}),window.ElementInternals&&window.ElementInternals.prototype.setFormValue){const t=new WeakMap,i=HTMLElement.prototype.attachInternals,e=["setFormValue","setValidity","checkValidity","reportValidity"];HTMLElement.prototype.attachInternals=function(...e){const s=i.call(this,...e);return t.set(s,this),s},e.forEach((i=>{const e=window.ElementInternals.prototype,s=e[i];e[i]=function(...i){const e=t.get(this);if(!0!==o.get(e).formAssociated)throw new DOMException(`Failed to execute ${s} on 'ElementInternals': The target element is not a form-associated custom element.`);s?.call(this,...i)}}));class s extends Array{constructor(t){super(...t),this._elements=t}get value(){return this._elements.find((t=>!0===t.checked))?.value||""}}class n{constructor(t){const i=new Map;t.forEach(((t,e)=>{const s=t.getAttribute("name"),o=i.get(s)||[];this[+e]=t,o.push(t),i.set(s,o)})),this.length=t.length,i.forEach(((t,i)=>{t&&(1===t.length?this[i]=t[0]:this[i]=new s(t))}))}namedItem(t){return this[t]}}const r=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"elements");Object.defineProperty(HTMLFormElement.prototype,"elements",{get:function(){const t=r.get.call(this,[]),i=[];for(const e of t){const t=o.get(e);t&&!0!==t.formAssociated||i.push(e)}return new n(i)}})}}try{window.customElements.define("custom-element",null)}catch(t){const i=window.customElements.define;window.customElements.define=(t,e,s)=>{try{i.bind(window.customElements)(t,e,s)}catch(i){console.info(t,e,s,i)}}}class i{constructor(t=0){this.timeout=t,this.callbacks=[]}run(t,i){return this.callbacks=[t],this.debounce(i)}queue(t,i){return this.callbacks.push(t),this.debounce(i)}cancel(){this.clearTimeout(),this.resolvePromise&&this.resolvePromise(!1),this.clearPromise()}debounce(t){return null==this.promise&&(this.promise=new Promise(((t,i)=>{this.resolvePromise=t,this.rejectPromise=i}))),this.clearTimeout(),this._debounce=window.setTimeout((()=>this.runCallbacks()),null!=t?t:this.timeout),this.promise}async runCallbacks(){var t,i;const e=[...this.callbacks];this.callbacks=[];const s=null!==(t=this.rejectPromise)&&void 0!==t?t:()=>null,o=null!==(i=this.resolvePromise)&&void 0!==i?i:()=>null;this.clearPromise();for(let t of e)try{await t()}catch(t){return void s(t)}o(!0)}clearTimeout(){null!=this._debounce&&window.clearTimeout(this._debounce)}clearPromise(){this.promise=void 0,this.resolvePromise=void 0,this.rejectPromise=void 0}}
/**

@@ -20,0 +20,0 @@ * @license

{
"name": "@fluid-topics/ft-loader",
"version": "0.3.32",
"version": "0.3.33",
"description": "A fluid-topics loader component",

@@ -22,6 +22,6 @@ "keywords": [

"dependencies": {
"@fluid-topics/ft-wc-utils": "0.3.32",
"@fluid-topics/ft-wc-utils": "0.3.33",
"lit": "2.2.8"
},
"gitHead": "27bd400b0630590c76a67d175875b5ac7f03f4d9"
"gitHead": "ba3783b220d3a5d359b452072054ab8210b0b45b"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc