Current section
Files
Jump to
Current section
Files
priv/static/octantis.min.js
var Octantis=(()=>{var a=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var o=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var n=(e,t)=>{for(var s in t)a(e,s,{get:t[s],enumerable:!0})},r=(e,t,s,d)=>{if(t&&typeof t=="object"||typeof t=="function")for(let i of o(t))!l.call(e,i)&&i!==s&&a(e,i,{get:()=>t[i],enumerable:!(d=h(t,i))||d.enumerable});return e};var c=e=>r(a({},"__esModule",{value:!0}),e);var m={};n(m,{AppBridgeNavManu:()=>k,OctantisInteractable:()=>_,ShopifyAppBridgeModal:()=>p,ShopifyModal:()=>v,ShopifyToastHook:()=>u});var v={mounted(){id=this.el.id,this.handleEvent(`octantis:modal_show_${id}`,e=>this.liveSocket.execJS(this.el,this.el.getAttribute("data-show"))),this.handleEvent(`octantis:modal_hide_${id}`,e=>this.liveSocket.execJS(this.el,this.el.getAttribute("data-hide")))}},p={mounted(){id=this.el.id,window.addEventListener(`polaris:app_bridge_modal_show_${id}`,e=>this.el.show()),window.addEventListener(`polaris:app_bridge_modal_hide_${id}`,e=>this.el.hide()),this.handleEvent(`octantis:app_bridge_modal_show_${id}`,e=>this.liveSocket.execJS(this.el,this.el.getAttribute("data-show"))),this.handleEvent(`octantis:app_bridge_modal_hide_${id}`,e=>this.liveSocket.execJS(this.el,this.el.getAttribute("data-hide")))}},_={mounted(){this.handleEvent(`octantis:interactable_${this.el.id}`,e=>this.liveSocket.execJS(this.el,this.el.getAttribute(e.key)))}},u={mounted(){shopify.toast.show(this.el.dataset.message,{onDismiss:()=>{this.pushEvent("lv:clear-flash",{value:{key:this.el.dataset.kind}})},isError:this.el.dataset.kind=="error"})},updated(){shopify.toast.show(this.el.dataset.message,{onDismiss:()=>{this.pushEvent("lv:clear-flash",{value:{key:this.el.dataset.kind}})},isError:this.el.dataset.kind=="error"})}},k={mounted(){this.el.addEventListener("click",e=>{e.preventDefault(),this.liveSocket.execJS(this.el,this.el.getAttribute("data-nav-event"))})}};return c(m);})();