stencil-quantum
Version:
Experience the quantum realm of stencil.
1 lines • 919 B
JavaScript
import{r as t,c as i,h as s,g as h}from"./p-e5446afd.js";import{P as o,t as r}from"./p-75cb2ba0.js";const l=class{constructor(s){t(this,s),this.update=i(this,"update",7)}componentWillLoad(){var t,i,s,h,l,a;try{this.name=null!==(s=null!==(i=null===(t=this.bind)||void 0===t?void 0:t.name)&&void 0!==i?i:this.name)&&void 0!==s?s:"",this.namespace=null!==(l=null===(h=this.bind)||void 0===h?void 0:h.namespace)&&void 0!==l?l:this.namespace,this.debug=(null===(a=this.bind)||void 0===a?void 0:a.debug)||this.debug,this.provider=o.create(this.el,this.name,this.value,this.namespace,this.debug),this.provider.listen((t=>{try{this.update.emit({value:t,provider:this.provider})}catch(t){r(this.el,t)}}),!0)}catch(t){r(this.el,t)}}onValue(t){try{this.provider.provide(t)}catch(t){r(this.el,t)}}render(){return s("slot",null)}get el(){return h(this)}static get watchers(){return{value:["onValue"]}}};export{l as quantum_provider}