You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
3 lines
66 KiB
JavaScript
3 lines
66 KiB
JavaScript
5 years ago
|
/*! markmap-lib v0.7.11 | MIT License */
|
||
|
define(["exports"],(function(t){"use strict";function n(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}var e,r;1===(e=n).length&&(r=e,e=function(t,e){return n(r(t),e)});function i(t,n){var e,r,i=t.length,o=-1;if(null==n){for(;++o<i;)if(null!=(e=t[o])&&e>=e)for(r=e;++o<i;)null!=(e=t[o])&&e>r&&(r=e)}else for(;++o<i;)if(null!=(e=n(t[o],o,t))&&e>=e)for(r=e;++o<i;)null!=(e=n(t[o],o,t))&&e>r&&(r=e);return r}function o(t,n){var e,r,i=t.length,o=-1;if(null==n){for(;++o<i;)if(null!=(e=t[o])&&e>=e)for(r=e;++o<i;)null!=(e=t[o])&&r>e&&(r=e)}else for(;++o<i;)if(null!=(e=n(t[o],o,t))&&e>=e)for(r=e;++o<i;)null!=(e=n(t[o],o,t))&&r>e&&(r=e);return r}var a={value:function(){}};function s(){for(var t,n=0,e=arguments.length,r={};n<e;++n){if(!(t=arguments[n]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new u(r)}function u(t){this._=t}function l(t,n){return t.trim().split(/^|\s+/).map((function(t){var e="",r=t.indexOf(".");if(r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!n.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}}))}function c(t,n){for(var e,r=0,i=t.length;r<i;++r)if((e=t[r]).name===n)return e.value}function h(t,n,e){for(var r=0,i=t.length;r<i;++r)if(t[r].name===n){t[r]=a,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=e&&t.push({name:n,value:e}),t}u.prototype=s.prototype={constructor:u,on:function(t,n){var e,r=this._,i=l(t+"",r),o=-1,a=i.length;if(!(arguments.length<2)){if(null!=n&&"function"!=typeof n)throw new Error("invalid callback: "+n);for(;++o<a;)if(e=(t=i[o]).type)r[e]=h(r[e],t.name,n);else if(null==n)for(e in r)r[e]=h(r[e],t.name,null);return this}for(;++o<a;)if((e=(t=i[o]).type)&&(e=c(r[e],t.name)))return e},copy:function(){var t={},n=this._;for(var e in n)t[e]=n[e].slice();return new u(t)},call:function(t,n){if((e=arguments.length-2)>0)for(var e,r,i=new Array(e),o=0;o<e;++o)i[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,e=(r=this._[t]).length;o<e;++o)r[o].value.apply(n,i)},apply:function(t,n,e){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,o=r.length;i<o;++i)r[i].value.apply(n,e)}};var f="http://www.w3.org/1999/xhtml",p={svg:"http://www.w3.org/2000/svg",xhtml:f,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function d(t){var n=t+="",e=n.indexOf(":");return e>=0&&"xmlns"!==(n=t.slice(0,e))&&(t=t.slice(e+1)),p.hasOwnProperty(n)?{space:p[n],local:t}:t}function m(t){return function(){var n=this.ownerDocument,e=this.namespaceURI;return e===f&&n.documentElement.namespaceURI===f?n.createElement(t):n.createElementNS(e,t)}}function g(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function y(t){var n=d(t);return(n.local?g:m)(n)}function v(){}function _(t){return null==t?v:function(){return this.querySelector(t)}}function w(){return[]}function x(t){return null==t?w:function(){return this.querySelectorAll(t)}}function b(t){return function(){return this.matches(t)}}function z(t){return new Array(t.length)}function k(t,n){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=n}k.prototype={constructor:k,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,n){return this._parent.insertBefore(t,n)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function M(t,n,e,r,i,o){for(var a,s=0,u=n.length,l=o.length;s<l;++s)(a=n[s])?(a.__data__=o[s],r[s]=a):e[s]=new k(t,o[s]);for(;s<u;++s)(a=n[s])&&(i[s]=a)}function E(t,n,e,r,i,o,a){var s,u,l,c={},h=n.length,f=o.length,p=new Array(h);for(s=0;s<h;++s)(u=n[s])&&(p[s]=l="$"+a.call(u,u.__data__,s,n),l in c?i[s]=u:c[l]=u);for(s=0;s<f;++s)(u=c[l="$"+a.call(t,o[s],s,o)])?(r[s]=u,u.__data__=o[s],c[l]=null):e[s]=new k(t,o[s]);for(s=0;s<h;++s)(u=n[s])&&c[p[s]]===u&&(i[s]=u)}function S(t,n){return t<n?-1:t>n?1:t>=n?0:NaN}function A(t){return function(){this.removeAttribute(t)}}fun
|