https://chiemgaukorn.de/cdn/shop/t/3/assets/theme-editor-event-han…?v=114462069356338668731744275111
1export const ThemeEditorEventHandlerMixin=Base=>class extends Base{connectedCallback(){Shopify.designMode&&(this.boundEventMap=this.createThemeEditorEventMap(),Object.entries(this.boundEventMap).forEach(([event,boundHandler])=>{(event.includes("section")?document:this).addEventListener(event,boundHandler)}),typeof this.onSectionLoad=="function"&&this.onSectionLoad())}disconnectedCallback(){Shopify.designMode&&(Object.entries(this.boundEventMap).forEach(([event,boundHandler])=>{event.includes("section")&&document.removeEventListener(event,boundHandler)}),typeof this.onSectionUnload=="function"&&this.onSectionUnload())}createThemeEditorEventMap(){return["shopify:section:select","shopify:section:deselect","shopify:section:reorder","shopify:block:select","shopify:block:deselect"].reduce((acc,eventName)=>{const methodName=this.convertEventToMethodName(eventName);return typeof this[methodName]=="function"&&(acc[eventName]=this.createEventBoundHandler(this[methodName])),acc},{})}convertEventToMethodName(eventName){const capitalize=str=>str.charAt(0).toUpperCase()+str.slice(1);return`on${eventName.split(":").slice(1).map(capitalize).join("")}`}createEventBoundHandler(handler){return event=>{event.detail&&event.detail.sectionId===this.sectionId&&handler.call(this,event)}}}; 2//# sourceMappingURL=/cdn/shop/t/3/assets/theme-editor-event-handler-mixin.js.map?v=114462069356338668731744275111
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.