PageSourceSearch

https://www.lacoquetakids.com/cdn/shop/t/291/assets/bao-custom-element.js?v=120880848527532757771761906981

js lacoquetakids.com collected 2026-09-26 18:43:08 UTC 3,688 bytes, 10 lines download raw bytes

1window.BAO.CustomElement=function({SuperClass=HTMLElement}={}){class CustomElement2 extends SuperClass{static get requiredElements(){return[]}static get requiredExternalElements(){return[]}constructor(){super(),this._hasBeenInitialised=!1,this.sections=[],this.els=this.getElements(this._getElementIdentifiers()),this.externalEls=this.getElements(this._getExternalElementIdentifiers(),this._externalElIdentifier,{context:document}),this.listeners=new window.BAO.Listeners,this.checkValidity()}connectedCallback(){this._hasBeenInitialised||(this._hasBeenInitialised=!0,this.setupListeners())}disconnectedCallback(){this.listeners.removeAll()}checkValidity(){if(this.constructor.requiredElements.length===0&&this.constructor.requiredExternalElements.length===0)return;const requiredElementsNotPresent=this.constructor.requiredElements.filter(name=>!(name in this.els)),requiredExternalElementsNotPresent=this.constructor.requiredExternalElements.filter(name=>!(name in this.externalEls));if(requiredElementsNotPresent.length===0&&requiredExternalElementsNotPresent.length===0)return;const requiredElementsMessages=requiredElementsNotPresent.map(name=>`- ${this._elIdentifier}="${name}"`).join(`
2`),requiredExternalElementsMessages=requiredExternalElementsNotPresent.map(name=>`- ${this._externalElIdentifier}="${name}"`).join(`
3`);let message="Has errors, please read below";requiredElementsNotPresent.length>0&&(message+=`
4        
5Missing required elements:
6  ${requiredElementsMessages}`),requiredExternalElementsNotPresent.length>0&&(message+=`
7    
8Missing external required elements:
9  ${requiredExternalElementsMessages}`),this.throwError(message)}throwError(message){throw`<${this.identifier}>: ${message}`}setupListeners(){}getElements(identifiers,elementIdentifier=this._elIdentifier,{context=this}={}){return identifiers.reduce((els,identifier)=>{const selector=this.key&&elementIdentifier===this._externalElIdentifier?`[${elementIdentifier}="${identifier}"][key="${this.key}"]`:`[${elementIdentifier}="${identifier}"]`,elements=Array.from(context.querySelectorAll(selector));return els[identifier]={exists:elements.length>0,elements,element:elements[0],selector},els},{})}_upgradeProperty(prop){if(this.hasOwnProperty(prop)){const value=this[prop];delete this[prop],this[prop]=value}}_getElementIdentifiers(){return Array.from(this.querySelectorAll(`[${this._elIdentifier}]`)).map(el=>el.getAttribute(this._elIdentifier))}_getExternalElementIdentifiers(){const selector=this.key?`[${this._externalElIdentifier}][key="${this.key}"]`:`[${this._externalElIdentifier}]`;return Array.from(document.querySelectorAll(selector)).map(el=>el.getAttribute(this._externalElIdentifier))}renderSections(stateSections){if(this.sections.length===0)return;const sectionsToRender=this.sections.filter(s=>s.section in stateSections).map(s=>Object.assign({},s,{html:stateSections[s.section]}));window.BAO.sectionRenderer.renderMultiple(sectionsToRender)}log(groupName,...otherItems){this.debug&&(console.group(groupName),otherItems.forEach(item=>console.log(item)),console.groupEnd())}get identifier(){const baseIdentifier=this.hasAttribute("is")?this.getAttribute("is"):this.localName.toLowerCase();return this.key&&this.key.trim().length?`${baseIdentifier}-${this.key.toLowerCase()}`:baseIdentifier}get debug(){return window.theme.isDevTheme}get key(){return this.getAttribute("key")}get hasBeenInitialised(){return this._hasBeenInitialised}get _elIdentifier(){return`data-${this.identifier}-el`}get _externalElIdentifier(){return`data-${this.identifier}-external-el`}}return CustomElement2};
10//# sourceMappingURL=/cdn/shop/t/291/assets/bao-custom-element.js.map?v=120880848527532757771761906981

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.