trilium/libraries/fancytree/jquery.fancytree-all-deps.min.js

2 lines
124 KiB
JavaScript
Raw Normal View History

2019-06-01 00:50:41 +08:00
!function(S){S.ui=S.ui||{};S.ui.version="1.12.1";var r,n=0,a=Array.prototype.slice;S.cleanData=(r=S.cleanData,function(e){var t,n,i;for(i=0;null!=(n=e[i]);i++)try{(t=S._data(n,"events"))&&t.remove&&S(n).triggerHandler("remove")}catch(e){}r(e)}),S.widget=function(e,n,t){var i,r,o,s={},a=e.split(".")[0],l=a+"-"+(e=e.split(".")[1]);return t||(t=n,n=S.Widget),S.isArray(t)&&(t=S.extend.apply(null,[{}].concat(t))),S.expr[":"][l.toLowerCase()]=function(e){return!!S.data(e,l)},S[a]=S[a]||{},i=S[a][e],r=S[a][e]=function(e,t){if(!this._createWidget)return new r(e,t);arguments.length&&this._createWidget(e,t)},S.extend(r,i,{version:t.version,_proto:S.extend({},t),_childConstructors:[]}),(o=new n).options=S.widget.extend({},o.options),S.each(t,function(t,o){S.isFunction(o)?s[t]=function(){function i(){return n.prototype[t].apply(this,arguments)}function r(e){return n.prototype[t].apply(this,e)}return function(){var e,t=this._super,n=this._superApply;return this._super=i,this._superApply=r,e=o.apply(this,arguments),this._super=t,this._superApply=n,e}}():s[t]=o}),r.prototype=S.widget.extend(o,{widgetEventPrefix:i&&o.widgetEventPrefix||e},s,{constructor:r,namespace:a,widgetName:e,widgetFullName:l}),i?(S.each(i._childConstructors,function(e,t){var n=t.prototype;S.widget(n.namespace+"."+n.widgetName,r,t._proto)}),delete i._childConstructors):n._childConstructors.push(r),S.widget.bridge(e,r),r},S.widget.extend=function(e){for(var t,n,i=a.call(arguments,1),r=0,o=i.length;r<o;r++)for(t in i[r])n=i[r][t],i[r].hasOwnProperty(t)&&void 0!==n&&(S.isPlainObject(n)?e[t]=S.isPlainObject(e[t])?S.widget.extend({},e[t],n):S.widget.extend({},n):e[t]=n);return e},S.widget.bridge=function(o,t){var s=t.prototype.widgetFullName||o;S.fn[o]=function(n){var e="string"==typeof n,i=a.call(arguments,1),r=this;return e?this.length||"instance"!==n?this.each(function(){var e,t=S.data(this,s);return"instance"===n?(r=t,!1):t?S.isFunction(t[n])&&"_"!==n.charAt(0)?(e=t[n].apply(t,i))!==t&&void 0!==e?(r=e&&e.jquery?r.pushStack(e.get()):e,!1):void 0:S.error("no such method '"+n+"' for "+o+" widget instance"):S.error("cannot call methods on "+o+" prior to initialization; attempted to call method '"+n+"'")}):r=void 0:(i.length&&(n=S.widget.extend.apply(null,[n].concat(i))),this.each(function(){var e=S.data(this,s);e?(e.option(n||{}),e._init&&e._init()):S.data(this,s,new t(n,this))})),r}},S.Widget=function(){},S.Widget._childConstructors=[],S.Widget.prototype={widgetName:"widget",widgetEventPrefix:"",defaultElement:"<div>",options:{classes:{},disabled:!1,create:null},_createWidget:function(e,t){t=S(t||this.defaultElement||this)[0],this.element=S(t),this.uuid=n++,this.eventNamespace="."+this.widgetName+this.uuid,this.bindings=S(),this.hoverable=S(),this.focusable=S(),this.classesElementLookup={},t!==this&&(S.data(t,this.widgetFullName,this),this._on(!0,this.element,{remove:function(e){e.target===t&&this.destroy()}}),this.document=S(t.style?t.ownerDocument:t.document||t),this.window=S(this.document[0].defaultView||this.document[0].parentWindow)),this.options=S.widget.extend({},this.options,this._getCreateOptions(),e),this._create(),this.options.disabled&&this._setOptionDisabled(this.options.disabled),this._trigger("create",null,this._getCreateEventData()),this._init()},_getCreateOptions:function(){return{}},_getCreateEventData:S.noop,_create:S.noop,_init:S.noop,destroy:function(){var n=this;this._destroy(),S.each(this.classesElementLookup,function(e,t){n._removeClass(t,e)}),this.element.off(this.eventNamespace).removeData(this.widgetFullName),this.widget().off(this.eventNamespace).removeAttr("aria-disabled"),this.bindings.off(this.eventNamespace)},_destroy:S.noop,widget:function(){return this.element},option:function(e,t){var n,i,r,o=e;if(0===arguments.length)return S.widget.extend({},this.options);if("string"==typeof e)if(o={},e=(n=e.split(".")).shift(),n.length){for(i=o[e]=S.widget.extend({},this.options[e]),r=0;r<n.length-1;r++)i[n[r]]=i[n[r]]||{},i=i[n[r]];if(e=n.pop(),1===arguments.length)return void 0===i[e]?null:i[e];i[e]=t}else{if(1===arguments.length)return void 0===
2018-11-07 02:35:42 +08:00
//# sourceMappingURL=jquery.fancytree-all-deps.min.js.map