zul.utl.Script=zk.$extends(zk.Widget,{$define:{content:function(a){a?(this._fn="function"==typeof a?a:new Function(a),this.desktop&&this._exec()):this._fn=null},src:function(a){a&&(this._srcrun=!1,this.desktop&&this._exec())},charset:null},_exec:function(){var a=this.packages;if(!a)return this._exec0();this.packages=null;zk.load(a);zk.loading?zk.afterLoad(this.proxy(this._exec0)):this._exec0()},_exec0:function(){var a=this,e=this._fn;e&&(this._fn=null,zk.afterMount(function(){e.apply(a)}));if(this._src&&
!this._srcrun){this._srcrun=!0;var b=document.createElement("script");b.id=this.uuid;b.type="text/javascript";b.charset=this._charset||"UTF-8";b.src=this._src;var c=this.$n();if(c){var d=c.nextSibling;jq(c).remove()}d?d.parentNode.insertBefore(b,d):document.body.appendChild(b)}this._node=jq(this.uuid,zk)[0];this._nodeSolved=!0},ignoreFlexSize_:function(a){return!0},redraw:function(){},bind_:function(){this.$supers(zul.utl.Script,"bind_",arguments);this._visible=!1;this._exec()},unbind_:function(){jq(this._node).remove();
this.$supers(zul.utl.Script,"unbind_",arguments)}});
