1346 lines
1.5 MiB
1346 lines
1.5 MiB
/*
|
|
THIS IS A GENERATED/BUNDLED FILE BY ESBUILD
|
|
if you want to view the source, please visit the github repository of this plugin
|
|
*/
|
|
|
|
var Dv=Object.create;var bl=Object.defineProperty;var bv=Object.getOwnPropertyDescriptor;var Ev=Object.getOwnPropertyNames;var Sv=Object.getPrototypeOf,Cv=Object.prototype.hasOwnProperty;var P6=r=>{throw TypeError(r)};var wv=(r,e,t)=>e in r?bl(r,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):r[e]=t;var Pe=(r,e)=>()=>(e||r((e={exports:{}}).exports,e),e.exports),El=(r,e)=>{for(var t in e)bl(r,t,{get:e[t],enumerable:!0})},B6=(r,e,t,i)=>{if(e&&typeof e=="object"||typeof e=="function")for(let s of Ev(e))!Cv.call(r,s)&&s!==t&&bl(r,s,{get:()=>e[s],enumerable:!(i=bv(e,s))||i.enumerable});return r};var St=(r,e,t)=>(t=r!=null?Dv(Sv(r)):{},B6(e||!r||!r.__esModule?bl(t,"default",{value:r,enumerable:!0}):t,r)),Tv=r=>B6(bl({},"__esModule",{value:!0}),r);var M0=(r,e,t)=>wv(r,typeof e!="symbol"?e+"":e,t),R6=(r,e,t)=>e.has(r)||P6("Cannot "+t);var O6=(r,e,t)=>(R6(r,e,"read from private field"),t?t.call(r):e.get(r)),G6=(r,e,t)=>e.has(r)?P6("Cannot add the same private member more than once"):e instanceof WeakSet?e.add(r):e.set(r,t),U6=(r,e,t,i)=>(R6(r,e,"write to private field"),i?i.call(r,t):e.set(r,t),t);var x7=Pe((qB,Ip)=>{"use strict";var _b=Object.prototype.hasOwnProperty,R0="~";function Il(){}Object.create&&(Il.prototype=Object.create(null),new Il().__proto__||(R0=!1));function Fb(r,e,t){this.fn=r,this.context=e,this.once=t||!1}function v7(r,e,t,i,s){if(typeof t!="function")throw new TypeError("The listener must be a function");var n=new Fb(t,i||r,s),o=R0?R0+e:e;return r._events[o]?r._events[o].fn?r._events[o]=[r._events[o],n]:r._events[o].push(n):(r._events[o]=n,r._eventsCount++),r}function Sh(r,e){--r._eventsCount===0?r._events=new Il:delete r._events[e]}function _0(){this._events=new Il,this._eventsCount=0}_0.prototype.eventNames=function(){var e=[],t,i;if(this._eventsCount===0)return e;for(i in t=this._events)_b.call(t,i)&&e.push(R0?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e};_0.prototype.listeners=function(e){var t=R0?R0+e:e,i=this._events[t];if(!i)return[];if(i.fn)return[i.fn];for(var s=0,n=i.length,o=new Array(n);s<n;s++)o[s]=i[s].fn;return o};_0.prototype.listenerCount=function(e){var t=R0?R0+e:e,i=this._events[t];return i?i.fn?1:i.length:0};_0.prototype.emit=function(e,t,i,s,n,o){var a=R0?R0+e:e;if(!this._events[a])return!1;var l=this._events[a],c=arguments.length,h,d;if(l.fn){switch(l.once&&this.removeListener(e,l.fn,void 0,!0),c){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,t),!0;case 3:return l.fn.call(l.context,t,i),!0;case 4:return l.fn.call(l.context,t,i,s),!0;case 5:return l.fn.call(l.context,t,i,s,n),!0;case 6:return l.fn.call(l.context,t,i,s,n,o),!0}for(d=1,h=new Array(c-1);d<c;d++)h[d-1]=arguments[d];l.fn.apply(l.context,h)}else{var p=l.length,g;for(d=0;d<p;d++)switch(l[d].once&&this.removeListener(e,l[d].fn,void 0,!0),c){case 1:l[d].fn.call(l[d].context);break;case 2:l[d].fn.call(l[d].context,t);break;case 3:l[d].fn.call(l[d].context,t,i);break;case 4:l[d].fn.call(l[d].context,t,i,s);break;default:if(!h)for(g=1,h=new Array(c-1);g<c;g++)h[g-1]=arguments[g];l[d].fn.apply(l[d].context,h)}}return!0};_0.prototype.on=function(e,t,i){return v7(this,e,t,i,!1)};_0.prototype.once=function(e,t,i){return v7(this,e,t,i,!0)};_0.prototype.removeListener=function(e,t,i,s){var n=R0?R0+e:e;if(!this._events[n])return this;if(!t)return Sh(this,n),this;var o=this._events[n];if(o.fn)o.fn===t&&(!s||o.once)&&(!i||o.context===i)&&Sh(this,n);else{for(var a=0,l=[],c=o.length;a<c;a++)(o[a].fn!==t||s&&!o[a].once||i&&o[a].context!==i)&&l.push(o[a]);l.length?this._events[n]=l.length===1?l[0]:l:Sh(this,n)}return this};_0.prototype.removeAllListeners=function(e){var t;return e?(t=R0?R0+e:e,this._events[t]&&Sh(this,t)):(this._events=new Il,this._eventsCount=0),this};_0.prototype.off=_0.prototype.removeListener;_0.prototype.addListener=_0.prototype.on;_0.prefixed=R0;_0.EventEmitter=_0;typeof Ip<"u"&&(Ip.exports=_0)});var C7=Pe((YB,Pp)=>{"use strict";Pp.exports=Th;Pp.exports.default=Th;function Th(r,e,t){t=t||2;var i=e&&e.length,s=i?e[0]*t:r.length,n=b7(r,0,s,t,!0),o=[];if(!n||n.next===n.prev)return o;var a,l,c,h,d,p,g;if(i&&(n=Mb(r,e,n,t)),r.length>80*t){a=c=r[0],l=h=r[1];for(var v=t;v<s;v+=t)d=r[v],p=r[v+1],d<a&&(a=d),p<l&&(l=p),d>c&&(c=d),p>h&&(h=p);g=Math.max(c-a,h-l),g=g!==0?32767/g:0}return Ll(n,o,t,a,l,g,0),o}function b7(r,e,t,i,s){var n,o;if(s===Np(r,e,t,i)>0)for(n=e;n<t;n+=i)o=D7(n,r[n],r[n+1],o);else for(n=t-i;n>=e;n-=i)o=D7(n,r[n],r[n+1],o);return o&&_h(o,o.next)&&(Nl(o),o=o.next),o}function zn(r,e){if(!r)return r;e||(e=r);var t=r,i;do if(i=!1,!t.steiner&&(_h(t,t.next)||kt(t.prev,t,t.next)===0)){if(Nl(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function Ll(r,e,t,i,s,n,o){if(r){!o&&n&&Ob(r,i,s,n);for(var a=r,l,c;r.prev!==r.next;){if(l=r.prev,c=r.next,n?kb(r,i,s,n):Ab(r)){e.push(l.i/t|0),e.push(r.i/t|0),e.push(c.i/t|0),Nl(r),r=c.next,a=c.next;continue}if(r=c,r===a){o?o===1?(r=Ib(zn(r),e,t),Ll(r,e,t,i,s,n,2)):o===2&&Lb(r,e,t,i,s,n):Ll(zn(r),e,t,i,s,n,1);break}}}}function Ab(r){var e=r.prev,t=r,i=r.next;if(kt(e,t,i)>=0)return!1;for(var s=e.x,n=t.x,o=i.x,a=e.y,l=t.y,c=i.y,h=s<n?s<o?s:o:n<o?n:o,d=a<l?a<c?a:c:l<c?l:c,p=s>n?s>o?s:o:n>o?n:o,g=a>l?a>c?a:c:l>c?l:c,v=i.next;v!==e;){if(v.x>=h&&v.x<=p&&v.y>=d&&v.y<=g&&$o(s,a,n,l,o,c,v.x,v.y)&&kt(v.prev,v,v.next)>=0)return!1;v=v.next}return!0}function kb(r,e,t,i){var s=r.prev,n=r,o=r.next;if(kt(s,n,o)>=0)return!1;for(var a=s.x,l=n.x,c=o.x,h=s.y,d=n.y,p=o.y,g=a<l?a<c?a:c:l<c?l:c,v=h<d?h<p?h:p:d<p?d:p,C=a>l?a>c?a:c:l>c?l:c,w=h>d?h>p?h:p:d>p?d:p,k=Lp(g,v,e,t,i),B=Lp(C,w,e,t,i),L=r.prevZ,T=r.nextZ;L&&L.z>=k&&T&&T.z<=B;){if(L.x>=g&&L.x<=C&&L.y>=v&&L.y<=w&&L!==s&&L!==o&&$o(a,h,l,d,c,p,L.x,L.y)&&kt(L.prev,L,L.next)>=0||(L=L.prevZ,T.x>=g&&T.x<=C&&T.y>=v&&T.y<=w&&T!==s&&T!==o&&$o(a,h,l,d,c,p,T.x,T.y)&&kt(T.prev,T,T.next)>=0))return!1;T=T.nextZ}for(;L&&L.z>=k;){if(L.x>=g&&L.x<=C&&L.y>=v&&L.y<=w&&L!==s&&L!==o&&$o(a,h,l,d,c,p,L.x,L.y)&&kt(L.prev,L,L.next)>=0)return!1;L=L.prevZ}for(;T&&T.z<=B;){if(T.x>=g&&T.x<=C&&T.y>=v&&T.y<=w&&T!==s&&T!==o&&$o(a,h,l,d,c,p,T.x,T.y)&&kt(T.prev,T,T.next)>=0)return!1;T=T.nextZ}return!0}function Ib(r,e,t){var i=r;do{var s=i.prev,n=i.next.next;!_h(s,n)&&E7(s,i,i.next,n)&&Ml(s,n)&&Ml(n,s)&&(e.push(s.i/t|0),e.push(i.i/t|0),e.push(n.i/t|0),Nl(i),Nl(i.next),i=r=n),i=i.next}while(i!==r);return zn(i)}function Lb(r,e,t,i,s,n){var o=r;do{for(var a=o.next.next;a!==o.prev;){if(o.i!==a.i&&Vb(o,a)){var l=S7(o,a);o=zn(o,o.next),l=zn(l,l.next),Ll(o,e,t,i,s,n,0),Ll(l,e,t,i,s,n,0);return}a=a.next}o=o.next}while(o!==r)}function Mb(r,e,t,i){var s=[],n,o,a,l,c;for(n=0,o=e.length;n<o;n++)a=e[n]*i,l=n<o-1?e[n+1]*i:r.length,c=b7(r,a,l,i,!1),c===c.next&&(c.steiner=!0),s.push(Ub(c));for(s.sort(Nb),n=0;n<s.length;n++)t=Pb(s[n],t);return t}function Nb(r,e){return r.x-e.x}function Pb(r,e){var t=Bb(r,e);if(!t)return e;var i=S7(t,r);return zn(i,i.next),zn(t,t.next)}function Bb(r,e){var t=e,i=r.x,s=r.y,n=-1/0,o;do{if(s<=t.y&&s>=t.next.y&&t.next.y!==t.y){var a=t.x+(s-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(a<=i&&a>n&&(n=a,o=t.x<t.next.x?t:t.next,a===i))return o}t=t.next}while(t!==e);if(!o)return null;var l=o,c=o.x,h=o.y,d=1/0,p;t=o;do i>=t.x&&t.x>=c&&i!==t.x&&$o(s<h?i:n,s,c,h,s<h?n:i,s,t.x,t.y)&&(p=Math.abs(s-t.y)/(i-t.x),Ml(t,r)&&(p<d||p===d&&(t.x>o.x||t.x===o.x&&Rb(o,t)))&&(o=t,d=p)),t=t.next;while(t!==l);return o}function Rb(r,e){return kt(r.prev,r,e.prev)<0&&kt(e.next,r,r.next)<0}function Ob(r,e,t,i){var s=r;do s.z===0&&(s.z=Lp(s.x,s.y,e,t,i)),s.prevZ=s.prev,s.nextZ=s.next,s=s.next;while(s!==r);s.prevZ.nextZ=null,s.prevZ=null,Gb(s)}function Gb(r){var e,t,i,s,n,o,a,l,c=1;do{for(t=r,r=null,n=null,o=0;t;){for(o++,i=t,a=0,e=0;e<c&&(a++,i=i.nextZ,!!i);e++);for(l=c;a>0||l>0&&i;)a!==0&&(l===0||!i||t.z<=i.z)?(s=t,t=t.nextZ,a--):(s=i,i=i.nextZ,l--),n?n.nextZ=s:r=s,s.prevZ=n,n=s;t=i}n.nextZ=null,c*=2}while(o>1);return r}function Lp(r,e,t,i,s){return r=(r-t)*s|0,e=(e-i)*s|0,r=(r|r<<8)&16711935,r=(r|r<<4)&252645135,r=(r|r<<2)&858993459,r=(r|r<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,r|e<<1}function Ub(r){var e=r,t=r;do(e.x<t.x||e.x===t.x&&e.y<t.y)&&(t=e),e=e.next;while(e!==r);return t}function $o(r,e,t,i,s,n,o,a){return(s-o)*(e-a)>=(r-o)*(n-a)&&(r-o)*(i-a)>=(t-o)*(e-a)&&(t-o)*(n-a)>=(s-o)*(i-a)}function Vb(r,e){return r.next.i!==e.i&&r.prev.i!==e.i&&!zb(r,e)&&(Ml(r,e)&&Ml(e,r)&&Wb(r,e)&&(kt(r.prev,r,e.prev)||kt(r,e.prev,e))||_h(r,e)&&kt(r.prev,r,r.next)>0&&kt(e.prev,e,e.next)>0)}function kt(r,e,t){return(e.y-r.y)*(t.x-e.x)-(e.x-r.x)*(t.y-e.y)}function _h(r,e){return r.x===e.x&&r.y===e.y}function E7(r,e,t,i){var s=wh(kt(r,e,t)),n=wh(kt(r,e,i)),o=wh(kt(t,i,r)),a=wh(kt(t,i,e));return!!(s!==n&&o!==a||s===0&&Ch(r,t,e)||n===0&&Ch(r,i,e)||o===0&&Ch(t,r,i)||a===0&&Ch(t,e,i))}function Ch(r,e,t){return e.x<=Math.max(r.x,t.x)&&e.x>=Math.min(r.x,t.x)&&e.y<=Math.max(r.y,t.y)&&e.y>=Math.min(r.y,t.y)}function wh(r){return r>0?1:r<0?-1:0}function zb(r,e){var t=r;do{if(t.i!==r.i&&t.next.i!==r.i&&t.i!==e.i&&t.next.i!==e.i&&E7(t,t.next,r,e))return!0;t=t.next}while(t!==r);return!1}function Ml(r,e){return kt(r.prev,r,r.next)<0?kt(r,e,r.next)>=0&&kt(r,r.prev,e)>=0:kt(r,e,r.prev)<0||kt(r,r.next,e)<0}function Wb(r,e){var t=r,i=!1,s=(r.x+e.x)/2,n=(r.y+e.y)/2;do t.y>n!=t.next.y>n&&t.next.y!==t.y&&s<(t.next.x-t.x)*(n-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==r);return i}function S7(r,e){var t=new Mp(r.i,r.x,r.y),i=new Mp(e.i,e.x,e.y),s=r.next,n=e.prev;return r.next=e,e.prev=r,t.next=s,s.prev=t,i.next=t,t.prev=i,n.next=i,i.prev=n,i}function D7(r,e,t,i){var s=new Mp(r,e,t);return i?(s.next=i.next,s.prev=i,i.next.prev=s,i.next=s):(s.prev=s,s.next=s),s}function Nl(r){r.next.prev=r.prev,r.prev.next=r.next,r.prevZ&&(r.prevZ.nextZ=r.nextZ),r.nextZ&&(r.nextZ.prevZ=r.prevZ)}function Mp(r,e,t){this.i=r,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}Th.deviation=function(r,e,t,i){var s=e&&e.length,n=s?e[0]*t:r.length,o=Math.abs(Np(r,0,n,t));if(s)for(var a=0,l=e.length;a<l;a++){var c=e[a]*t,h=a<l-1?e[a+1]*t:r.length;o-=Math.abs(Np(r,c,h,t))}var d=0;for(a=0;a<i.length;a+=3){var p=i[a]*t,g=i[a+1]*t,v=i[a+2]*t;d+=Math.abs((r[p]-r[v])*(r[g+1]-r[p+1])-(r[p]-r[g])*(r[v+1]-r[p+1]))}return o===0&&d===0?0:Math.abs((d-o)/o)};function Np(r,e,t,i){for(var s=0,n=e,o=t-i;n<t;n+=i)s+=(r[o]-r[n])*(r[n+1]+r[o+1]),o=n;return s}Th.flatten=function(r){for(var e=r[0][0].length,t={vertices:[],holes:[],dimensions:e},i=0,s=0;s<r.length;s++){for(var n=0;n<r[s].length;n++)for(var o=0;o<e;o++)t.vertices.push(r[s][n][o]);s>0&&(i+=r[s-1].length,t.holes.push(i))}return t}});var kd=Pe((n8,o8)=>{(function(r,e){typeof n8=="object"&&typeof o8<"u"?o8.exports=e():typeof define=="function"&&define.amd?define(e):(r=typeof globalThis<"u"?globalThis:r||self).graphology=e()})(n8,function(){"use strict";function r(x){return r=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(S){return typeof S}:function(S){return S&&typeof Symbol=="function"&&S.constructor===Symbol&&S!==Symbol.prototype?"symbol":typeof S},r(x)}function e(x,S){x.prototype=Object.create(S.prototype),x.prototype.constructor=x,i(x,S)}function t(x){return t=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(S){return S.__proto__||Object.getPrototypeOf(S)},t(x)}function i(x,S){return i=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(b,f){return b.__proto__=f,b},i(x,S)}function s(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function n(x,S,b){return n=s()?Reflect.construct.bind():function(f,y,E){var _=[null];_.push.apply(_,y);var M=new(Function.bind.apply(f,_));return E&&i(M,E.prototype),M},n.apply(null,arguments)}function o(x){var S=typeof Map=="function"?new Map:void 0;return o=function(b){if(b===null||(f=b,Function.toString.call(f).indexOf("[native code]")===-1))return b;var f;if(typeof b!="function")throw new TypeError("Super expression must either be null or a function");if(S!==void 0){if(S.has(b))return S.get(b);S.set(b,y)}function y(){return n(b,arguments,t(this).constructor)}return y.prototype=Object.create(b.prototype,{constructor:{value:y,enumerable:!1,writable:!0,configurable:!0}}),i(y,b)},o(x)}function a(x){if(x===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return x}var l=function(){for(var x=arguments[0],S=1,b=arguments.length;S<b;S++)if(arguments[S])for(var f in arguments[S])x[f]=arguments[S][f];return x};function c(x,S,b,f){var y=x._nodes.get(S),E=null;return y?E=f==="mixed"?y.out&&y.out[b]||y.undirected&&y.undirected[b]:f==="directed"?y.out&&y.out[b]:y.undirected&&y.undirected[b]:E}function h(x){return r(x)==="object"&&x!==null}function d(x){var S;for(S in x)return!1;return!0}function p(x,S,b){Object.defineProperty(x,S,{enumerable:!1,configurable:!1,writable:!0,value:b})}function g(x,S,b){var f={enumerable:!0,configurable:!0};typeof b=="function"?f.get=b:(f.value=b,f.writable=!1),Object.defineProperty(x,S,f)}function v(x){return!!h(x)&&!(x.attributes&&!Array.isArray(x.attributes))}typeof Object.assign=="function"&&(l=Object.assign);var C,w={exports:{}},k=typeof Reflect=="object"?Reflect:null,B=k&&typeof k.apply=="function"?k.apply:function(x,S,b){return Function.prototype.apply.call(x,S,b)};C=k&&typeof k.ownKeys=="function"?k.ownKeys:Object.getOwnPropertySymbols?function(x){return Object.getOwnPropertyNames(x).concat(Object.getOwnPropertySymbols(x))}:function(x){return Object.getOwnPropertyNames(x)};var L=Number.isNaN||function(x){return x!=x};function T(){T.init.call(this)}w.exports=T,w.exports.once=function(x,S){return new Promise(function(b,f){function y(_){x.removeListener(S,E),f(_)}function E(){typeof x.removeListener=="function"&&x.removeListener("error",y),b([].slice.call(arguments))}Q(x,S,E,{once:!0}),S!=="error"&&function(_,M,H){typeof _.on=="function"&&Q(_,"error",M,H)}(x,y,{once:!0})})},T.EventEmitter=T,T.prototype._events=void 0,T.prototype._eventsCount=0,T.prototype._maxListeners=void 0;var W=10;function j(x){if(typeof x!="function")throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof x)}function I(x){return x._maxListeners===void 0?T.defaultMaxListeners:x._maxListeners}function R(x,S,b,f){var y,E,_,M;if(j(b),(E=x._events)===void 0?(E=x._events=Object.create(null),x._eventsCount=0):(E.newListener!==void 0&&(x.emit("newListener",S,b.listener?b.listener:b),E=x._events),_=E[S]),_===void 0)_=E[S]=b,++x._eventsCount;else if(typeof _=="function"?_=E[S]=f?[b,_]:[_,b]:f?_.unshift(b):_.push(b),(y=I(x))>0&&_.length>y&&!_.warned){_.warned=!0;var H=new Error("Possible EventEmitter memory leak detected. "+_.length+" "+String(S)+" listeners added. Use emitter.setMaxListeners() to increase limit");H.name="MaxListenersExceededWarning",H.emitter=x,H.type=S,H.count=_.length,M=H,console&&console.warn&&console.warn(M)}return x}function z(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,arguments.length===0?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function U(x,S,b){var f={fired:!1,wrapFn:void 0,target:x,type:S,listener:b},y=z.bind(f);return y.listener=b,f.wrapFn=y,y}function q(x,S,b){var f=x._events;if(f===void 0)return[];var y=f[S];return y===void 0?[]:typeof y=="function"?b?[y.listener||y]:[y]:b?function(E){for(var _=new Array(E.length),M=0;M<_.length;++M)_[M]=E[M].listener||E[M];return _}(y):$(y,y.length)}function re(x){var S=this._events;if(S!==void 0){var b=S[x];if(typeof b=="function")return 1;if(b!==void 0)return b.length}return 0}function $(x,S){for(var b=new Array(S),f=0;f<S;++f)b[f]=x[f];return b}function Q(x,S,b,f){if(typeof x.on=="function")f.once?x.once(S,b):x.on(S,b);else{if(typeof x.addEventListener!="function")throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof x);x.addEventListener(S,function y(E){f.once&&x.removeEventListener(S,y),b(E)})}}function Te(x){if(typeof x!="function")throw new Error("obliterator/iterator: expecting a function!");this.next=x}Object.defineProperty(T,"defaultMaxListeners",{enumerable:!0,get:function(){return W},set:function(x){if(typeof x!="number"||x<0||L(x))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+x+".");W=x}}),T.init=function(){this._events!==void 0&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},T.prototype.setMaxListeners=function(x){if(typeof x!="number"||x<0||L(x))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+x+".");return this._maxListeners=x,this},T.prototype.getMaxListeners=function(){return I(this)},T.prototype.emit=function(x){for(var S=[],b=1;b<arguments.length;b++)S.push(arguments[b]);var f=x==="error",y=this._events;if(y!==void 0)f=f&&y.error===void 0;else if(!f)return!1;if(f){var E;if(S.length>0&&(E=S[0]),E instanceof Error)throw E;var _=new Error("Unhandled error."+(E?" ("+E.message+")":""));throw _.context=E,_}var M=y[x];if(M===void 0)return!1;if(typeof M=="function")B(M,this,S);else{var H=M.length,se=$(M,H);for(b=0;b<H;++b)B(se[b],this,S)}return!0},T.prototype.addListener=function(x,S){return R(this,x,S,!1)},T.prototype.on=T.prototype.addListener,T.prototype.prependListener=function(x,S){return R(this,x,S,!0)},T.prototype.once=function(x,S){return j(S),this.on(x,U(this,x,S)),this},T.prototype.prependOnceListener=function(x,S){return j(S),this.prependListener(x,U(this,x,S)),this},T.prototype.removeListener=function(x,S){var b,f,y,E,_;if(j(S),(f=this._events)===void 0)return this;if((b=f[x])===void 0)return this;if(b===S||b.listener===S)--this._eventsCount==0?this._events=Object.create(null):(delete f[x],f.removeListener&&this.emit("removeListener",x,b.listener||S));else if(typeof b!="function"){for(y=-1,E=b.length-1;E>=0;E--)if(b[E]===S||b[E].listener===S){_=b[E].listener,y=E;break}if(y<0)return this;y===0?b.shift():function(M,H){for(;H+1<M.length;H++)M[H]=M[H+1];M.pop()}(b,y),b.length===1&&(f[x]=b[0]),f.removeListener!==void 0&&this.emit("removeListener",x,_||S)}return this},T.prototype.off=T.prototype.removeListener,T.prototype.removeAllListeners=function(x){var S,b,f;if((b=this._events)===void 0)return this;if(b.removeListener===void 0)return arguments.length===0?(this._events=Object.create(null),this._eventsCount=0):b[x]!==void 0&&(--this._eventsCount==0?this._events=Object.create(null):delete b[x]),this;if(arguments.length===0){var y,E=Object.keys(b);for(f=0;f<E.length;++f)(y=E[f])!=="removeListener"&&this.removeAllListeners(y);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if(typeof(S=b[x])=="function")this.removeListener(x,S);else if(S!==void 0)for(f=S.length-1;f>=0;f--)this.removeListener(x,S[f]);return this},T.prototype.listeners=function(x){return q(this,x,!0)},T.prototype.rawListeners=function(x){return q(this,x,!1)},T.listenerCount=function(x,S){return typeof x.listenerCount=="function"?x.listenerCount(S):re.call(x,S)},T.prototype.listenerCount=re,T.prototype.eventNames=function(){return this._eventsCount>0?C(this._events):[]},typeof Symbol<"u"&&(Te.prototype[Symbol.iterator]=function(){return this}),Te.of=function(){var x=arguments,S=x.length,b=0;return new Te(function(){return b>=S?{done:!0}:{done:!1,value:x[b++]}})},Te.empty=function(){return new Te(function(){return{done:!0}})},Te.fromSequence=function(x){var S=0,b=x.length;return new Te(function(){return S>=b?{done:!0}:{done:!1,value:x[S++]}})},Te.is=function(x){return x instanceof Te||typeof x=="object"&&x!==null&&typeof x.next=="function"};var ye=Te,xe={};xe.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<"u",xe.SYMBOL_SUPPORT=typeof Symbol<"u";var De=ye,_e=xe,Mt=_e.ARRAY_BUFFER_SUPPORT,rt=_e.SYMBOL_SUPPORT,et=function(x){var S=function(b){return typeof b=="string"||Array.isArray(b)||Mt&&ArrayBuffer.isView(b)?De.fromSequence(b):typeof b!="object"||b===null?null:rt&&typeof b[Symbol.iterator]=="function"?b[Symbol.iterator]():typeof b.next=="function"?b:null}(x);if(!S)throw new Error("obliterator: target is not iterable nor a valid iterator.");return S},gt=et,Dt=function(x,S){for(var b,f=arguments.length>1?S:1/0,y=f!==1/0?new Array(f):[],E=0,_=gt(x);;){if(E===f)return y;if((b=_.next()).done)return E!==S&&(y.length=E),y;y[E++]=b.value}},I0=function(x){function S(b){var f;return(f=x.call(this)||this).name="GraphError",f.message=b,f}return e(S,x),S}(o(Error)),de=function(x){function S(b){var f;return(f=x.call(this,b)||this).name="InvalidArgumentsGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(a(f),S.prototype.constructor),f}return e(S,x),S}(I0),oe=function(x){function S(b){var f;return(f=x.call(this,b)||this).name="NotFoundGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(a(f),S.prototype.constructor),f}return e(S,x),S}(I0),ve=function(x){function S(b){var f;return(f=x.call(this,b)||this).name="UsageGraphError",typeof Error.captureStackTrace=="function"&&Error.captureStackTrace(a(f),S.prototype.constructor),f}return e(S,x),S}(I0);function Yt(x,S){this.key=x,this.attributes=S,this.clear()}function Ut(x,S){this.key=x,this.attributes=S,this.clear()}function r0(x,S){this.key=x,this.attributes=S,this.clear()}function Ft(x,S,b,f,y){this.key=S,this.attributes=y,this.undirected=x,this.source=b,this.target=f}Yt.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.undirectedDegree=0,this.undirectedLoops=0,this.directedLoops=0,this.in={},this.out={},this.undirected={}},Ut.prototype.clear=function(){this.inDegree=0,this.outDegree=0,this.directedLoops=0,this.in={},this.out={}},r0.prototype.clear=function(){this.undirectedDegree=0,this.undirectedLoops=0,this.undirected={}},Ft.prototype.attach=function(){var x="out",S="in";this.undirected&&(x=S="undirected");var b=this.source.key,f=this.target.key;this.source[x][f]=this,this.undirected&&b===f||(this.target[S][b]=this)},Ft.prototype.attachMulti=function(){var x="out",S="in",b=this.source.key,f=this.target.key;this.undirected&&(x=S="undirected");var y=this.source[x],E=y[f];if(E===void 0)return y[f]=this,void(this.undirected&&b===f||(this.target[S][b]=this));E.previous=this,this.next=E,y[f]=this,this.target[S][b]=this},Ft.prototype.detach=function(){var x=this.source.key,S=this.target.key,b="out",f="in";this.undirected&&(b=f="undirected"),delete this.source[b][S],delete this.target[f][x]},Ft.prototype.detachMulti=function(){var x=this.source.key,S=this.target.key,b="out",f="in";this.undirected&&(b=f="undirected"),this.previous===void 0?this.next===void 0?(delete this.source[b][S],delete this.target[f][x]):(this.next.previous=void 0,this.source[b][S]=this.next,this.target[f][x]=this.next):(this.previous.next=this.next,this.next!==void 0&&(this.next.previous=this.previous))};function it(x,S,b,f,y,E,_){var M,H,se,ie;if(f=""+f,b===0){if(!(M=x._nodes.get(f)))throw new oe("Graph.".concat(S,': could not find the "').concat(f,'" node in the graph.'));se=y,ie=E}else if(b===3){if(y=""+y,!(H=x._edges.get(y)))throw new oe("Graph.".concat(S,': could not find the "').concat(y,'" edge in the graph.'));var J=H.source.key,fe=H.target.key;if(f===J)M=H.target;else{if(f!==fe)throw new oe("Graph.".concat(S,': the "').concat(f,'" node is not attached to the "').concat(y,'" edge (').concat(J,", ").concat(fe,")."));M=H.source}se=E,ie=_}else{if(!(H=x._edges.get(f)))throw new oe("Graph.".concat(S,': could not find the "').concat(f,'" edge in the graph.'));M=b===1?H.source:H.target,se=y,ie=E}return[M,se,ie]}var p0=[{name:function(x){return"get".concat(x,"Attribute")},attacher:function(x,S,b){x.prototype[S]=function(f,y,E){var _=it(this,S,b,f,y,E),M=_[0],H=_[1];return M.attributes[H]}}},{name:function(x){return"get".concat(x,"Attributes")},attacher:function(x,S,b){x.prototype[S]=function(f,y){return it(this,S,b,f,y)[0].attributes}}},{name:function(x){return"has".concat(x,"Attribute")},attacher:function(x,S,b){x.prototype[S]=function(f,y,E){var _=it(this,S,b,f,y,E),M=_[0],H=_[1];return M.attributes.hasOwnProperty(H)}}},{name:function(x){return"set".concat(x,"Attribute")},attacher:function(x,S,b){x.prototype[S]=function(f,y,E,_){var M=it(this,S,b,f,y,E,_),H=M[0],se=M[1],ie=M[2];return H.attributes[se]=ie,this.emit("nodeAttributesUpdated",{key:H.key,type:"set",attributes:H.attributes,name:se}),this}}},{name:function(x){return"update".concat(x,"Attribute")},attacher:function(x,S,b){x.prototype[S]=function(f,y,E,_){var M=it(this,S,b,f,y,E,_),H=M[0],se=M[1],ie=M[2];if(typeof ie!="function")throw new de("Graph.".concat(S,": updater should be a function."));var J=H.attributes,fe=ie(J[se]);return J[se]=fe,this.emit("nodeAttributesUpdated",{key:H.key,type:"set",attributes:H.attributes,name:se}),this}}},{name:function(x){return"remove".concat(x,"Attribute")},attacher:function(x,S,b){x.prototype[S]=function(f,y,E){var _=it(this,S,b,f,y,E),M=_[0],H=_[1];return delete M.attributes[H],this.emit("nodeAttributesUpdated",{key:M.key,type:"remove",attributes:M.attributes,name:H}),this}}},{name:function(x){return"replace".concat(x,"Attributes")},attacher:function(x,S,b){x.prototype[S]=function(f,y,E){var _=it(this,S,b,f,y,E),M=_[0],H=_[1];if(!h(H))throw new de("Graph.".concat(S,": provided attributes are not a plain object."));return M.attributes=H,this.emit("nodeAttributesUpdated",{key:M.key,type:"replace",attributes:M.attributes}),this}}},{name:function(x){return"merge".concat(x,"Attributes")},attacher:function(x,S,b){x.prototype[S]=function(f,y,E){var _=it(this,S,b,f,y,E),M=_[0],H=_[1];if(!h(H))throw new de("Graph.".concat(S,": provided attributes are not a plain object."));return l(M.attributes,H),this.emit("nodeAttributesUpdated",{key:M.key,type:"merge",attributes:M.attributes,data:H}),this}}},{name:function(x){return"update".concat(x,"Attributes")},attacher:function(x,S,b){x.prototype[S]=function(f,y,E){var _=it(this,S,b,f,y,E),M=_[0],H=_[1];if(typeof H!="function")throw new de("Graph.".concat(S,": provided updater is not a function."));return M.attributes=H(M.attributes),this.emit("nodeAttributesUpdated",{key:M.key,type:"update",attributes:M.attributes}),this}}}],i0=[{name:function(x){return"get".concat(x,"Attribute")},attacher:function(x,S,b){x.prototype[S]=function(f,y){var E;if(this.type!=="mixed"&&b!=="mixed"&&b!==this.type)throw new ve("Graph.".concat(S,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new ve("Graph.".concat(S,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var _=""+f,M=""+y;if(y=arguments[2],!(E=c(this,_,M,b)))throw new oe("Graph.".concat(S,': could not find an edge for the given path ("').concat(_,'" - "').concat(M,'").'))}else{if(b!=="mixed")throw new ve("Graph.".concat(S,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(f=""+f,!(E=this._edges.get(f)))throw new oe("Graph.".concat(S,': could not find the "').concat(f,'" edge in the graph.'))}return E.attributes[y]}}},{name:function(x){return"get".concat(x,"Attributes")},attacher:function(x,S,b){x.prototype[S]=function(f){var y;if(this.type!=="mixed"&&b!=="mixed"&&b!==this.type)throw new ve("Graph.".concat(S,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>1){if(this.multi)throw new ve("Graph.".concat(S,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var E=""+f,_=""+arguments[1];if(!(y=c(this,E,_,b)))throw new oe("Graph.".concat(S,': could not find an edge for the given path ("').concat(E,'" - "').concat(_,'").'))}else{if(b!=="mixed")throw new ve("Graph.".concat(S,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(f=""+f,!(y=this._edges.get(f)))throw new oe("Graph.".concat(S,': could not find the "').concat(f,'" edge in the graph.'))}return y.attributes}}},{name:function(x){return"has".concat(x,"Attribute")},attacher:function(x,S,b){x.prototype[S]=function(f,y){var E;if(this.type!=="mixed"&&b!=="mixed"&&b!==this.type)throw new ve("Graph.".concat(S,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new ve("Graph.".concat(S,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var _=""+f,M=""+y;if(y=arguments[2],!(E=c(this,_,M,b)))throw new oe("Graph.".concat(S,': could not find an edge for the given path ("').concat(_,'" - "').concat(M,'").'))}else{if(b!=="mixed")throw new ve("Graph.".concat(S,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(f=""+f,!(E=this._edges.get(f)))throw new oe("Graph.".concat(S,': could not find the "').concat(f,'" edge in the graph.'))}return E.attributes.hasOwnProperty(y)}}},{name:function(x){return"set".concat(x,"Attribute")},attacher:function(x,S,b){x.prototype[S]=function(f,y,E){var _;if(this.type!=="mixed"&&b!=="mixed"&&b!==this.type)throw new ve("Graph.".concat(S,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>3){if(this.multi)throw new ve("Graph.".concat(S,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var M=""+f,H=""+y;if(y=arguments[2],E=arguments[3],!(_=c(this,M,H,b)))throw new oe("Graph.".concat(S,': could not find an edge for the given path ("').concat(M,'" - "').concat(H,'").'))}else{if(b!=="mixed")throw new ve("Graph.".concat(S,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(f=""+f,!(_=this._edges.get(f)))throw new oe("Graph.".concat(S,': could not find the "').concat(f,'" edge in the graph.'))}return _.attributes[y]=E,this.emit("edgeAttributesUpdated",{key:_.key,type:"set",attributes:_.attributes,name:y}),this}}},{name:function(x){return"update".concat(x,"Attribute")},attacher:function(x,S,b){x.prototype[S]=function(f,y,E){var _;if(this.type!=="mixed"&&b!=="mixed"&&b!==this.type)throw new ve("Graph.".concat(S,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>3){if(this.multi)throw new ve("Graph.".concat(S,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var M=""+f,H=""+y;if(y=arguments[2],E=arguments[3],!(_=c(this,M,H,b)))throw new oe("Graph.".concat(S,': could not find an edge for the given path ("').concat(M,'" - "').concat(H,'").'))}else{if(b!=="mixed")throw new ve("Graph.".concat(S,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(f=""+f,!(_=this._edges.get(f)))throw new oe("Graph.".concat(S,': could not find the "').concat(f,'" edge in the graph.'))}if(typeof E!="function")throw new de("Graph.".concat(S,": updater should be a function."));return _.attributes[y]=E(_.attributes[y]),this.emit("edgeAttributesUpdated",{key:_.key,type:"set",attributes:_.attributes,name:y}),this}}},{name:function(x){return"remove".concat(x,"Attribute")},attacher:function(x,S,b){x.prototype[S]=function(f,y){var E;if(this.type!=="mixed"&&b!=="mixed"&&b!==this.type)throw new ve("Graph.".concat(S,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new ve("Graph.".concat(S,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var _=""+f,M=""+y;if(y=arguments[2],!(E=c(this,_,M,b)))throw new oe("Graph.".concat(S,': could not find an edge for the given path ("').concat(_,'" - "').concat(M,'").'))}else{if(b!=="mixed")throw new ve("Graph.".concat(S,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(f=""+f,!(E=this._edges.get(f)))throw new oe("Graph.".concat(S,': could not find the "').concat(f,'" edge in the graph.'))}return delete E.attributes[y],this.emit("edgeAttributesUpdated",{key:E.key,type:"remove",attributes:E.attributes,name:y}),this}}},{name:function(x){return"replace".concat(x,"Attributes")},attacher:function(x,S,b){x.prototype[S]=function(f,y){var E;if(this.type!=="mixed"&&b!=="mixed"&&b!==this.type)throw new ve("Graph.".concat(S,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new ve("Graph.".concat(S,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var _=""+f,M=""+y;if(y=arguments[2],!(E=c(this,_,M,b)))throw new oe("Graph.".concat(S,': could not find an edge for the given path ("').concat(_,'" - "').concat(M,'").'))}else{if(b!=="mixed")throw new ve("Graph.".concat(S,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(f=""+f,!(E=this._edges.get(f)))throw new oe("Graph.".concat(S,': could not find the "').concat(f,'" edge in the graph.'))}if(!h(y))throw new de("Graph.".concat(S,": provided attributes are not a plain object."));return E.attributes=y,this.emit("edgeAttributesUpdated",{key:E.key,type:"replace",attributes:E.attributes}),this}}},{name:function(x){return"merge".concat(x,"Attributes")},attacher:function(x,S,b){x.prototype[S]=function(f,y){var E;if(this.type!=="mixed"&&b!=="mixed"&&b!==this.type)throw new ve("Graph.".concat(S,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new ve("Graph.".concat(S,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var _=""+f,M=""+y;if(y=arguments[2],!(E=c(this,_,M,b)))throw new oe("Graph.".concat(S,': could not find an edge for the given path ("').concat(_,'" - "').concat(M,'").'))}else{if(b!=="mixed")throw new ve("Graph.".concat(S,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(f=""+f,!(E=this._edges.get(f)))throw new oe("Graph.".concat(S,': could not find the "').concat(f,'" edge in the graph.'))}if(!h(y))throw new de("Graph.".concat(S,": provided attributes are not a plain object."));return l(E.attributes,y),this.emit("edgeAttributesUpdated",{key:E.key,type:"merge",attributes:E.attributes,data:y}),this}}},{name:function(x){return"update".concat(x,"Attributes")},attacher:function(x,S,b){x.prototype[S]=function(f,y){var E;if(this.type!=="mixed"&&b!=="mixed"&&b!==this.type)throw new ve("Graph.".concat(S,": cannot find this type of edges in your ").concat(this.type," graph."));if(arguments.length>2){if(this.multi)throw new ve("Graph.".concat(S,": cannot use a {source,target} combo when asking about an edge's attributes in a MultiGraph since we cannot infer the one you want information about."));var _=""+f,M=""+y;if(y=arguments[2],!(E=c(this,_,M,b)))throw new oe("Graph.".concat(S,': could not find an edge for the given path ("').concat(_,'" - "').concat(M,'").'))}else{if(b!=="mixed")throw new ve("Graph.".concat(S,": calling this method with only a key (vs. a source and target) does not make sense since an edge with this key could have the other type."));if(f=""+f,!(E=this._edges.get(f)))throw new oe("Graph.".concat(S,': could not find the "').concat(f,'" edge in the graph.'))}if(typeof y!="function")throw new de("Graph.".concat(S,": provided updater is not a function."));return E.attributes=y(E.attributes),this.emit("edgeAttributesUpdated",{key:E.key,type:"update",attributes:E.attributes}),this}}}],C0=ye,Zr=et,wt=function(){var x=arguments,S=null,b=-1;return new C0(function(){for(var f=null;;){if(S===null){if(++b>=x.length)return{done:!0};S=Zr(x[b])}if((f=S.next()).done!==!0)break;S=null}return f})},Fn=[{name:"edges",type:"mixed"},{name:"inEdges",type:"directed",direction:"in"},{name:"outEdges",type:"directed",direction:"out"},{name:"inboundEdges",type:"mixed",direction:"in"},{name:"outboundEdges",type:"mixed",direction:"out"},{name:"directedEdges",type:"directed"},{name:"undirectedEdges",type:"undirected"}];function Ei(x,S,b,f){var y=!1;for(var E in S)if(E!==f){var _=S[E];if(y=b(_.key,_.attributes,_.source.key,_.target.key,_.source.attributes,_.target.attributes,_.undirected),x&&y)return _.key}}function Si(x,S,b,f){var y,E,_,M=!1;for(var H in S)if(H!==f){y=S[H];do{if(E=y.source,_=y.target,M=b(y.key,y.attributes,E.key,_.key,E.attributes,_.attributes,y.undirected),x&&M)return y.key;y=y.next}while(y!==void 0)}}function Zi(x,S){var b,f=Object.keys(x),y=f.length,E=0;return new ye(function(){do if(b)b=b.next;else{if(E>=y)return{done:!0};var _=f[E++];if(_===S){b=void 0;continue}b=x[_]}while(!b);return{done:!1,value:{edge:b.key,attributes:b.attributes,source:b.source.key,target:b.target.key,sourceAttributes:b.source.attributes,targetAttributes:b.target.attributes,undirected:b.undirected}}})}function Qi(x,S,b,f){var y=S[b];if(y){var E=y.source,_=y.target;return f(y.key,y.attributes,E.key,_.key,E.attributes,_.attributes,y.undirected)&&x?y.key:void 0}}function An(x,S,b,f){var y=S[b];if(y){var E=!1;do{if(E=f(y.key,y.attributes,y.source.key,y.target.key,y.source.attributes,y.target.attributes,y.undirected),x&&E)return y.key;y=y.next}while(y!==void 0)}}function kn(x,S){var b=x[S];return b.next!==void 0?new ye(function(){if(!b)return{done:!0};var f={edge:b.key,attributes:b.attributes,source:b.source.key,target:b.target.key,sourceAttributes:b.source.attributes,targetAttributes:b.target.attributes,undirected:b.undirected};return b=b.next,{done:!1,value:f}}):ye.of({edge:b.key,attributes:b.attributes,source:b.source.key,target:b.target.key,sourceAttributes:b.source.attributes,targetAttributes:b.target.attributes,undirected:b.undirected})}function In(x,S){if(x.size===0)return[];if(S==="mixed"||S===x.type)return typeof Array.from=="function"?Array.from(x._edges.keys()):Dt(x._edges.keys(),x._edges.size);for(var b,f,y=S==="undirected"?x.undirectedSize:x.directedSize,E=new Array(y),_=S==="undirected",M=x._edges.values(),H=0;(b=M.next()).done!==!0;)(f=b.value).undirected===_&&(E[H++]=f.key);return E}function Fo(x,S,b,f){if(S.size!==0){for(var y,E,_=b!=="mixed"&&b!==S.type,M=b==="undirected",H=!1,se=S._edges.values();(y=se.next()).done!==!0;)if(E=y.value,!_||E.undirected===M){var ie=E,J=ie.key,fe=ie.attributes,ge=ie.source,Oe=ie.target;if(H=f(J,fe,ge.key,Oe.key,ge.attributes,Oe.attributes,E.undirected),x&&H)return J}}}function xl(x,S){if(x.size===0)return ye.empty();var b=S!=="mixed"&&S!==x.type,f=S==="undirected",y=x._edges.values();return new ye(function(){for(var E,_;;){if((E=y.next()).done)return E;if(_=E.value,!b||_.undirected===f)break}return{value:{edge:_.key,attributes:_.attributes,source:_.source.key,target:_.target.key,sourceAttributes:_.source.attributes,targetAttributes:_.target.attributes,undirected:_.undirected},done:!1}})}function Ln(x,S,b,f,y,E){var _,M=S?Si:Ei;if(b!=="undirected"&&(f!=="out"&&(_=M(x,y.in,E),x&&_)||f!=="in"&&(_=M(x,y.out,E,f?void 0:y.key),x&&_))||b!=="directed"&&(_=M(x,y.undirected,E),x&&_))return _}function Dl(x,S,b,f){var y=[];return Ln(!1,x,S,b,f,function(E){y.push(E)}),y}function Ao(x,S,b){var f=ye.empty();return x!=="undirected"&&(S!=="out"&&b.in!==void 0&&(f=wt(f,Zi(b.in))),S!=="in"&&b.out!==void 0&&(f=wt(f,Zi(b.out,S?void 0:b.key)))),x!=="directed"&&b.undirected!==void 0&&(f=wt(f,Zi(b.undirected))),f}function Ns(x,S,b,f,y,E,_){var M,H=b?An:Qi;if(S!=="undirected"&&(y.in!==void 0&&f!=="out"&&(M=H(x,y.in,E,_),x&&M)||y.out!==void 0&&f!=="in"&&(f||y.key!==E)&&(M=H(x,y.out,E,_),x&&M))||S!=="directed"&&y.undirected!==void 0&&(M=H(x,y.undirected,E,_),x&&M))return M}function Mn(x,S,b,f,y){var E=[];return Ns(!1,x,S,b,f,y,function(_){E.push(_)}),E}function Nn(x,S,b,f){var y=ye.empty();return x!=="undirected"&&(b.in!==void 0&&S!=="out"&&f in b.in&&(y=wt(y,kn(b.in,f))),b.out!==void 0&&S!=="in"&&f in b.out&&(S||b.key!==f)&&(y=wt(y,kn(b.out,f)))),x!=="directed"&&b.undirected!==void 0&&f in b.undirected&&(y=wt(y,kn(b.undirected,f))),y}var ko=[{name:"neighbors",type:"mixed"},{name:"inNeighbors",type:"directed",direction:"in"},{name:"outNeighbors",type:"directed",direction:"out"},{name:"inboundNeighbors",type:"mixed",direction:"in"},{name:"outboundNeighbors",type:"mixed",direction:"out"},{name:"directedNeighbors",type:"directed"},{name:"undirectedNeighbors",type:"undirected"}];function A(){this.A=null,this.B=null}function O(x,S,b,f,y){for(var E in f){var _=f[E],M=_.source,H=_.target,se=M===b?H:M;if(!S||!S.has(se.key)){var ie=y(se.key,se.attributes);if(x&&ie)return se.key}}}function D(x,S,b,f,y){if(S!=="mixed"){if(S==="undirected")return O(x,null,f,f.undirected,y);if(typeof b=="string")return O(x,null,f,f[b],y)}var E,_=new A;if(S!=="undirected"){if(b!=="out"){if(E=O(x,null,f,f.in,y),x&&E)return E;_.wrap(f.in)}if(b!=="in"){if(E=O(x,_,f,f.out,y),x&&E)return E;_.wrap(f.out)}}if(S!=="directed"&&(E=O(x,_,f,f.undirected,y),x&&E))return E}function F(x,S,b){var f=Object.keys(b),y=f.length,E=0;return new ye(function(){var _=null;do{if(E>=y)return x&&x.wrap(b),{done:!0};var M=b[f[E++]],H=M.source,se=M.target;_=H===S?se:H,x&&x.has(_.key)&&(_=null)}while(_===null);return{done:!1,value:{neighbor:_.key,attributes:_.attributes}}})}function N(x,S){var b=S.name,f=S.type,y=S.direction;x.prototype[b]=function(E){if(f!=="mixed"&&this.type!=="mixed"&&f!==this.type)return[];E=""+E;var _=this._nodes.get(E);if(_===void 0)throw new oe("Graph.".concat(b,': could not find the "').concat(E,'" node in the graph.'));return function(M,H,se){if(M!=="mixed"){if(M==="undirected")return Object.keys(se.undirected);if(typeof H=="string")return Object.keys(se[H])}var ie=[];return D(!1,M,H,se,function(J){ie.push(J)}),ie}(f==="mixed"?this.type:f,y,_)}}function G(x,S){var b=S.name,f=S.type,y=S.direction,E=b.slice(0,-1)+"Entries";x.prototype[E]=function(_){if(f!=="mixed"&&this.type!=="mixed"&&f!==this.type)return ye.empty();_=""+_;var M=this._nodes.get(_);if(M===void 0)throw new oe("Graph.".concat(E,': could not find the "').concat(_,'" node in the graph.'));return function(H,se,ie){if(H!=="mixed"){if(H==="undirected")return F(null,ie,ie.undirected);if(typeof se=="string")return F(null,ie,ie[se])}var J=ye.empty(),fe=new A;return H!=="undirected"&&(se!=="out"&&(J=wt(J,F(fe,ie,ie.in))),se!=="in"&&(J=wt(J,F(fe,ie,ie.out)))),H!=="directed"&&(J=wt(J,F(fe,ie,ie.undirected))),J}(f==="mixed"?this.type:f,y,M)}}function V(x,S,b,f,y){for(var E,_,M,H,se,ie,J,fe=f._nodes.values(),ge=f.type;(E=fe.next()).done!==!0;){var Oe=!1;if(_=E.value,ge!=="undirected")for(M in H=_.out){se=H[M];do{if(ie=se.target,Oe=!0,J=y(_.key,ie.key,_.attributes,ie.attributes,se.key,se.attributes,se.undirected),x&&J)return se;se=se.next}while(se)}if(ge!=="directed"){for(M in H=_.undirected)if(!(S&&_.key>M)){se=H[M];do{if((ie=se.target).key!==M&&(ie=se.source),Oe=!0,J=y(_.key,ie.key,_.attributes,ie.attributes,se.key,se.attributes,se.undirected),x&&J)return se;se=se.next}while(se)}}if(b&&!Oe&&(J=y(_.key,null,_.attributes,null,null,null,null),x&&J))return null}}function X(x){if(!h(x))throw new de('Graph.import: invalid serialized node. A serialized node should be a plain object with at least a "key" property.');if(!("key"in x))throw new de("Graph.import: serialized node is missing its key.");if("attributes"in x&&(!h(x.attributes)||x.attributes===null))throw new de("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.")}function ee(x){if(!h(x))throw new de('Graph.import: invalid serialized edge. A serialized edge should be a plain object with at least a "source" & "target" property.');if(!("source"in x))throw new de("Graph.import: serialized edge is missing its source.");if(!("target"in x))throw new de("Graph.import: serialized edge is missing its target.");if("attributes"in x&&(!h(x.attributes)||x.attributes===null))throw new de("Graph.import: invalid attributes. Attributes should be a plain object, null or omitted.");if("undirected"in x&&typeof x.undirected!="boolean")throw new de("Graph.import: invalid undirectedness information. Undirected should be boolean or omitted.")}A.prototype.wrap=function(x){this.A===null?this.A=x:this.B===null&&(this.B=x)},A.prototype.has=function(x){return this.A!==null&&x in this.A||this.B!==null&&x in this.B};var be,Ve=(be=255&Math.floor(256*Math.random()),function(){return be++}),mt=new Set(["directed","undirected","mixed"]),Ze=new Set(["domain","_events","_eventsCount","_maxListeners"]),Vt={allowSelfLoops:!0,multi:!1,type:"mixed"};function At(x,S,b){var f=new x.NodeDataClass(S,b);return x._nodes.set(S,f),x.emit("nodeAdded",{key:S,attributes:b}),f}function j0(x,S,b,f,y,E,_,M){if(!f&&x.type==="undirected")throw new ve("Graph.".concat(S,": you cannot add a directed edge to an undirected graph. Use the #.addEdge or #.addUndirectedEdge instead."));if(f&&x.type==="directed")throw new ve("Graph.".concat(S,": you cannot add an undirected edge to a directed graph. Use the #.addEdge or #.addDirectedEdge instead."));if(M&&!h(M))throw new de("Graph.".concat(S,': invalid attributes. Expecting an object but got "').concat(M,'"'));if(E=""+E,_=""+_,M=M||{},!x.allowSelfLoops&&E===_)throw new ve("Graph.".concat(S,': source & target are the same ("').concat(E,`"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`));var H=x._nodes.get(E),se=x._nodes.get(_);if(!H)throw new oe("Graph.".concat(S,': source node "').concat(E,'" not found.'));if(!se)throw new oe("Graph.".concat(S,': target node "').concat(_,'" not found.'));var ie={key:null,undirected:f,source:E,target:_,attributes:M};if(b)y=x._edgeKeyGenerator();else if(y=""+y,x._edges.has(y))throw new ve("Graph.".concat(S,': the "').concat(y,'" edge already exists in the graph.'));if(!x.multi&&(f?H.undirected[_]!==void 0:H.out[_]!==void 0))throw new ve("Graph.".concat(S,': an edge linking "').concat(E,'" to "').concat(_,`" already exists. If you really want to add multiple edges linking those nodes, you should create a multi graph by using the 'multi' option.`));var J=new Ft(f,y,H,se,M);x._edges.set(y,J);var fe=E===_;return f?(H.undirectedDegree++,se.undirectedDegree++,fe&&(H.undirectedLoops++,x._undirectedSelfLoopCount++)):(H.outDegree++,se.inDegree++,fe&&(H.directedLoops++,x._directedSelfLoopCount++)),x.multi?J.attachMulti():J.attach(),f?x._undirectedSize++:x._directedSize++,ie.key=y,x.emit("edgeAdded",ie),y}function dt(x,S,b,f,y,E,_,M,H){if(!f&&x.type==="undirected")throw new ve("Graph.".concat(S,": you cannot merge/update a directed edge to an undirected graph. Use the #.mergeEdge/#.updateEdge or #.addUndirectedEdge instead."));if(f&&x.type==="directed")throw new ve("Graph.".concat(S,": you cannot merge/update an undirected edge to a directed graph. Use the #.mergeEdge/#.updateEdge or #.addDirectedEdge instead."));if(M){if(H){if(typeof M!="function")throw new de("Graph.".concat(S,': invalid updater function. Expecting a function but got "').concat(M,'"'))}else if(!h(M))throw new de("Graph.".concat(S,': invalid attributes. Expecting an object but got "').concat(M,'"'))}var se;if(E=""+E,_=""+_,H&&(se=M,M=void 0),!x.allowSelfLoops&&E===_)throw new ve("Graph.".concat(S,': source & target are the same ("').concat(E,`"), thus creating a loop explicitly forbidden by this graph 'allowSelfLoops' option set to false.`));var ie,J,fe=x._nodes.get(E),ge=x._nodes.get(_);if(!b&&(ie=x._edges.get(y))){if(!(ie.source.key===E&&ie.target.key===_||f&&ie.source.key===_&&ie.target.key===E))throw new ve("Graph.".concat(S,': inconsistency detected when attempting to merge the "').concat(y,'" edge with "').concat(E,'" source & "').concat(_,'" target vs. ("').concat(ie.source.key,'", "').concat(ie.target.key,'").'));J=ie}if(J||x.multi||!fe||(J=f?fe.undirected[_]:fe.out[_]),J){var Oe=[J.key,!1,!1,!1];if(H?!se:!M)return Oe;if(H){var nt=J.attributes;J.attributes=se(nt),x.emit("edgeAttributesUpdated",{type:"replace",key:J.key,attributes:J.attributes})}else l(J.attributes,M),x.emit("edgeAttributesUpdated",{type:"merge",key:J.key,attributes:J.attributes,data:M});return Oe}M=M||{},H&&se&&(M=se(M));var Et={key:null,undirected:f,source:E,target:_,attributes:M};if(b)y=x._edgeKeyGenerator();else if(y=""+y,x._edges.has(y))throw new ve("Graph.".concat(S,': the "').concat(y,'" edge already exists in the graph.'));var m0=!1,a0=!1;fe||(fe=At(x,E,{}),m0=!0,E===_&&(ge=fe,a0=!0)),ge||(ge=At(x,_,{}),a0=!0),ie=new Ft(f,y,fe,ge,M),x._edges.set(y,ie);var ar=E===_;return f?(fe.undirectedDegree++,ge.undirectedDegree++,ar&&(fe.undirectedLoops++,x._undirectedSelfLoopCount++)):(fe.outDegree++,ge.inDegree++,ar&&(fe.directedLoops++,x._directedSelfLoopCount++)),x.multi?ie.attachMulti():ie.attach(),f?x._undirectedSize++:x._directedSize++,Et.key=y,x.emit("edgeAdded",Et),[y,!0,m0,a0]}function L0(x,S){x._edges.delete(S.key);var b=S.source,f=S.target,y=S.attributes,E=S.undirected,_=b===f;E?(b.undirectedDegree--,f.undirectedDegree--,_&&(b.undirectedLoops--,x._undirectedSelfLoopCount--)):(b.outDegree--,f.inDegree--,_&&(b.directedLoops--,x._directedSelfLoopCount--)),x.multi?S.detachMulti():S.detach(),E?x._undirectedSize--:x._directedSize--,x.emit("edgeDropped",{key:S.key,attributes:y,source:b.key,target:f.key,undirected:E})}var Re=function(x){function S(f){var y;if(y=x.call(this)||this,typeof(f=l({},Vt,f)).multi!="boolean")throw new de(`Graph.constructor: invalid 'multi' option. Expecting a boolean but got "`.concat(f.multi,'".'));if(!mt.has(f.type))throw new de(`Graph.constructor: invalid 'type' option. Should be one of "mixed", "directed" or "undirected" but got "`.concat(f.type,'".'));if(typeof f.allowSelfLoops!="boolean")throw new de(`Graph.constructor: invalid 'allowSelfLoops' option. Expecting a boolean but got "`.concat(f.allowSelfLoops,'".'));var E=f.type==="mixed"?Yt:f.type==="directed"?Ut:r0;p(a(y),"NodeDataClass",E);var _="geid_"+Ve()+"_",M=0;return p(a(y),"_attributes",{}),p(a(y),"_nodes",new Map),p(a(y),"_edges",new Map),p(a(y),"_directedSize",0),p(a(y),"_undirectedSize",0),p(a(y),"_directedSelfLoopCount",0),p(a(y),"_undirectedSelfLoopCount",0),p(a(y),"_edgeKeyGenerator",function(){var H;do H=_+M++;while(y._edges.has(H));return H}),p(a(y),"_options",f),Ze.forEach(function(H){return p(a(y),H,y[H])}),g(a(y),"order",function(){return y._nodes.size}),g(a(y),"size",function(){return y._edges.size}),g(a(y),"directedSize",function(){return y._directedSize}),g(a(y),"undirectedSize",function(){return y._undirectedSize}),g(a(y),"selfLoopCount",function(){return y._directedSelfLoopCount+y._undirectedSelfLoopCount}),g(a(y),"directedSelfLoopCount",function(){return y._directedSelfLoopCount}),g(a(y),"undirectedSelfLoopCount",function(){return y._undirectedSelfLoopCount}),g(a(y),"multi",y._options.multi),g(a(y),"type",y._options.type),g(a(y),"allowSelfLoops",y._options.allowSelfLoops),g(a(y),"implementation",function(){return"graphology"}),y}e(S,x);var b=S.prototype;return b._resetInstanceCounters=function(){this._directedSize=0,this._undirectedSize=0,this._directedSelfLoopCount=0,this._undirectedSelfLoopCount=0},b.hasNode=function(f){return this._nodes.has(""+f)},b.hasDirectedEdge=function(f,y){if(this.type==="undirected")return!1;if(arguments.length===1){var E=""+f,_=this._edges.get(E);return!!_&&!_.undirected}if(arguments.length===2){f=""+f,y=""+y;var M=this._nodes.get(f);return!!M&&M.out.hasOwnProperty(y)}throw new de("Graph.hasDirectedEdge: invalid arity (".concat(arguments.length,", instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target."))},b.hasUndirectedEdge=function(f,y){if(this.type==="directed")return!1;if(arguments.length===1){var E=""+f,_=this._edges.get(E);return!!_&&_.undirected}if(arguments.length===2){f=""+f,y=""+y;var M=this._nodes.get(f);return!!M&&M.undirected.hasOwnProperty(y)}throw new de("Graph.hasDirectedEdge: invalid arity (".concat(arguments.length,", instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target."))},b.hasEdge=function(f,y){if(arguments.length===1){var E=""+f;return this._edges.has(E)}if(arguments.length===2){f=""+f,y=""+y;var _=this._nodes.get(f);return!!_&&(_.out!==void 0&&_.out.hasOwnProperty(y)||_.undirected!==void 0&&_.undirected.hasOwnProperty(y))}throw new de("Graph.hasEdge: invalid arity (".concat(arguments.length,", instead of 1 or 2). You can either ask for an edge id or for the existence of an edge between a source & a target."))},b.directedEdge=function(f,y){if(this.type!=="undirected"){if(f=""+f,y=""+y,this.multi)throw new ve("Graph.directedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.directedEdges instead.");var E=this._nodes.get(f);if(!E)throw new oe('Graph.directedEdge: could not find the "'.concat(f,'" source node in the graph.'));if(!this._nodes.has(y))throw new oe('Graph.directedEdge: could not find the "'.concat(y,'" target node in the graph.'));var _=E.out&&E.out[y]||void 0;return _?_.key:void 0}},b.undirectedEdge=function(f,y){if(this.type!=="directed"){if(f=""+f,y=""+y,this.multi)throw new ve("Graph.undirectedEdge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.undirectedEdges instead.");var E=this._nodes.get(f);if(!E)throw new oe('Graph.undirectedEdge: could not find the "'.concat(f,'" source node in the graph.'));if(!this._nodes.has(y))throw new oe('Graph.undirectedEdge: could not find the "'.concat(y,'" target node in the graph.'));var _=E.undirected&&E.undirected[y]||void 0;return _?_.key:void 0}},b.edge=function(f,y){if(this.multi)throw new ve("Graph.edge: this method is irrelevant with multigraphs since there might be multiple edges between source & target. See #.edges instead.");f=""+f,y=""+y;var E=this._nodes.get(f);if(!E)throw new oe('Graph.edge: could not find the "'.concat(f,'" source node in the graph.'));if(!this._nodes.has(y))throw new oe('Graph.edge: could not find the "'.concat(y,'" target node in the graph.'));var _=E.out&&E.out[y]||E.undirected&&E.undirected[y]||void 0;if(_)return _.key},b.areDirectedNeighbors=function(f,y){f=""+f,y=""+y;var E=this._nodes.get(f);if(!E)throw new oe('Graph.areDirectedNeighbors: could not find the "'.concat(f,'" node in the graph.'));return this.type!=="undirected"&&(y in E.in||y in E.out)},b.areOutNeighbors=function(f,y){f=""+f,y=""+y;var E=this._nodes.get(f);if(!E)throw new oe('Graph.areOutNeighbors: could not find the "'.concat(f,'" node in the graph.'));return this.type!=="undirected"&&y in E.out},b.areInNeighbors=function(f,y){f=""+f,y=""+y;var E=this._nodes.get(f);if(!E)throw new oe('Graph.areInNeighbors: could not find the "'.concat(f,'" node in the graph.'));return this.type!=="undirected"&&y in E.in},b.areUndirectedNeighbors=function(f,y){f=""+f,y=""+y;var E=this._nodes.get(f);if(!E)throw new oe('Graph.areUndirectedNeighbors: could not find the "'.concat(f,'" node in the graph.'));return this.type!=="directed"&&y in E.undirected},b.areNeighbors=function(f,y){f=""+f,y=""+y;var E=this._nodes.get(f);if(!E)throw new oe('Graph.areNeighbors: could not find the "'.concat(f,'" node in the graph.'));return this.type!=="undirected"&&(y in E.in||y in E.out)||this.type!=="directed"&&y in E.undirected},b.areInboundNeighbors=function(f,y){f=""+f,y=""+y;var E=this._nodes.get(f);if(!E)throw new oe('Graph.areInboundNeighbors: could not find the "'.concat(f,'" node in the graph.'));return this.type!=="undirected"&&y in E.in||this.type!=="directed"&&y in E.undirected},b.areOutboundNeighbors=function(f,y){f=""+f,y=""+y;var E=this._nodes.get(f);if(!E)throw new oe('Graph.areOutboundNeighbors: could not find the "'.concat(f,'" node in the graph.'));return this.type!=="undirected"&&y in E.out||this.type!=="directed"&&y in E.undirected},b.inDegree=function(f){f=""+f;var y=this._nodes.get(f);if(!y)throw new oe('Graph.inDegree: could not find the "'.concat(f,'" node in the graph.'));return this.type==="undirected"?0:y.inDegree},b.outDegree=function(f){f=""+f;var y=this._nodes.get(f);if(!y)throw new oe('Graph.outDegree: could not find the "'.concat(f,'" node in the graph.'));return this.type==="undirected"?0:y.outDegree},b.directedDegree=function(f){f=""+f;var y=this._nodes.get(f);if(!y)throw new oe('Graph.directedDegree: could not find the "'.concat(f,'" node in the graph.'));return this.type==="undirected"?0:y.inDegree+y.outDegree},b.undirectedDegree=function(f){f=""+f;var y=this._nodes.get(f);if(!y)throw new oe('Graph.undirectedDegree: could not find the "'.concat(f,'" node in the graph.'));return this.type==="directed"?0:y.undirectedDegree},b.inboundDegree=function(f){f=""+f;var y=this._nodes.get(f);if(!y)throw new oe('Graph.inboundDegree: could not find the "'.concat(f,'" node in the graph.'));var E=0;return this.type!=="directed"&&(E+=y.undirectedDegree),this.type!=="undirected"&&(E+=y.inDegree),E},b.outboundDegree=function(f){f=""+f;var y=this._nodes.get(f);if(!y)throw new oe('Graph.outboundDegree: could not find the "'.concat(f,'" node in the graph.'));var E=0;return this.type!=="directed"&&(E+=y.undirectedDegree),this.type!=="undirected"&&(E+=y.outDegree),E},b.degree=function(f){f=""+f;var y=this._nodes.get(f);if(!y)throw new oe('Graph.degree: could not find the "'.concat(f,'" node in the graph.'));var E=0;return this.type!=="directed"&&(E+=y.undirectedDegree),this.type!=="undirected"&&(E+=y.inDegree+y.outDegree),E},b.inDegreeWithoutSelfLoops=function(f){f=""+f;var y=this._nodes.get(f);if(!y)throw new oe('Graph.inDegreeWithoutSelfLoops: could not find the "'.concat(f,'" node in the graph.'));return this.type==="undirected"?0:y.inDegree-y.directedLoops},b.outDegreeWithoutSelfLoops=function(f){f=""+f;var y=this._nodes.get(f);if(!y)throw new oe('Graph.outDegreeWithoutSelfLoops: could not find the "'.concat(f,'" node in the graph.'));return this.type==="undirected"?0:y.outDegree-y.directedLoops},b.directedDegreeWithoutSelfLoops=function(f){f=""+f;var y=this._nodes.get(f);if(!y)throw new oe('Graph.directedDegreeWithoutSelfLoops: could not find the "'.concat(f,'" node in the graph.'));return this.type==="undirected"?0:y.inDegree+y.outDegree-2*y.directedLoops},b.undirectedDegreeWithoutSelfLoops=function(f){f=""+f;var y=this._nodes.get(f);if(!y)throw new oe('Graph.undirectedDegreeWithoutSelfLoops: could not find the "'.concat(f,'" node in the graph.'));return this.type==="directed"?0:y.undirectedDegree-2*y.undirectedLoops},b.inboundDegreeWithoutSelfLoops=function(f){f=""+f;var y=this._nodes.get(f);if(!y)throw new oe('Graph.inboundDegreeWithoutSelfLoops: could not find the "'.concat(f,'" node in the graph.'));var E=0,_=0;return this.type!=="directed"&&(E+=y.undirectedDegree,_+=2*y.undirectedLoops),this.type!=="undirected"&&(E+=y.inDegree,_+=y.directedLoops),E-_},b.outboundDegreeWithoutSelfLoops=function(f){f=""+f;var y=this._nodes.get(f);if(!y)throw new oe('Graph.outboundDegreeWithoutSelfLoops: could not find the "'.concat(f,'" node in the graph.'));var E=0,_=0;return this.type!=="directed"&&(E+=y.undirectedDegree,_+=2*y.undirectedLoops),this.type!=="undirected"&&(E+=y.outDegree,_+=y.directedLoops),E-_},b.degreeWithoutSelfLoops=function(f){f=""+f;var y=this._nodes.get(f);if(!y)throw new oe('Graph.degreeWithoutSelfLoops: could not find the "'.concat(f,'" node in the graph.'));var E=0,_=0;return this.type!=="directed"&&(E+=y.undirectedDegree,_+=2*y.undirectedLoops),this.type!=="undirected"&&(E+=y.inDegree+y.outDegree,_+=2*y.directedLoops),E-_},b.source=function(f){f=""+f;var y=this._edges.get(f);if(!y)throw new oe('Graph.source: could not find the "'.concat(f,'" edge in the graph.'));return y.source.key},b.target=function(f){f=""+f;var y=this._edges.get(f);if(!y)throw new oe('Graph.target: could not find the "'.concat(f,'" edge in the graph.'));return y.target.key},b.extremities=function(f){f=""+f;var y=this._edges.get(f);if(!y)throw new oe('Graph.extremities: could not find the "'.concat(f,'" edge in the graph.'));return[y.source.key,y.target.key]},b.opposite=function(f,y){f=""+f,y=""+y;var E=this._edges.get(y);if(!E)throw new oe('Graph.opposite: could not find the "'.concat(y,'" edge in the graph.'));var _=E.source.key,M=E.target.key;if(f===_)return M;if(f===M)return _;throw new oe('Graph.opposite: the "'.concat(f,'" node is not attached to the "').concat(y,'" edge (').concat(_,", ").concat(M,")."))},b.hasExtremity=function(f,y){f=""+f,y=""+y;var E=this._edges.get(f);if(!E)throw new oe('Graph.hasExtremity: could not find the "'.concat(f,'" edge in the graph.'));return E.source.key===y||E.target.key===y},b.isUndirected=function(f){f=""+f;var y=this._edges.get(f);if(!y)throw new oe('Graph.isUndirected: could not find the "'.concat(f,'" edge in the graph.'));return y.undirected},b.isDirected=function(f){f=""+f;var y=this._edges.get(f);if(!y)throw new oe('Graph.isDirected: could not find the "'.concat(f,'" edge in the graph.'));return!y.undirected},b.isSelfLoop=function(f){f=""+f;var y=this._edges.get(f);if(!y)throw new oe('Graph.isSelfLoop: could not find the "'.concat(f,'" edge in the graph.'));return y.source===y.target},b.addNode=function(f,y){var E=function(_,M,H){if(H&&!h(H))throw new de('Graph.addNode: invalid attributes. Expecting an object but got "'.concat(H,'"'));if(M=""+M,H=H||{},_._nodes.has(M))throw new ve('Graph.addNode: the "'.concat(M,'" node already exist in the graph.'));var se=new _.NodeDataClass(M,H);return _._nodes.set(M,se),_.emit("nodeAdded",{key:M,attributes:H}),se}(this,f,y);return E.key},b.mergeNode=function(f,y){if(y&&!h(y))throw new de('Graph.mergeNode: invalid attributes. Expecting an object but got "'.concat(y,'"'));f=""+f,y=y||{};var E=this._nodes.get(f);return E?(y&&(l(E.attributes,y),this.emit("nodeAttributesUpdated",{type:"merge",key:f,attributes:E.attributes,data:y})),[f,!1]):(E=new this.NodeDataClass(f,y),this._nodes.set(f,E),this.emit("nodeAdded",{key:f,attributes:y}),[f,!0])},b.updateNode=function(f,y){if(y&&typeof y!="function")throw new de('Graph.updateNode: invalid updater function. Expecting a function but got "'.concat(y,'"'));f=""+f;var E=this._nodes.get(f);if(E){if(y){var _=E.attributes;E.attributes=y(_),this.emit("nodeAttributesUpdated",{type:"replace",key:f,attributes:E.attributes})}return[f,!1]}var M=y?y({}):{};return E=new this.NodeDataClass(f,M),this._nodes.set(f,E),this.emit("nodeAdded",{key:f,attributes:M}),[f,!0]},b.dropNode=function(f){f=""+f;var y,E=this._nodes.get(f);if(!E)throw new oe('Graph.dropNode: could not find the "'.concat(f,'" node in the graph.'));if(this.type!=="undirected"){for(var _ in E.out){y=E.out[_];do L0(this,y),y=y.next;while(y)}for(var M in E.in){y=E.in[M];do L0(this,y),y=y.next;while(y)}}if(this.type!=="directed")for(var H in E.undirected){y=E.undirected[H];do L0(this,y),y=y.next;while(y)}this._nodes.delete(f),this.emit("nodeDropped",{key:f,attributes:E.attributes})},b.dropEdge=function(f){var y;if(arguments.length>1){var E=""+arguments[0],_=""+arguments[1];if(!(y=c(this,E,_,this.type)))throw new oe('Graph.dropEdge: could not find the "'.concat(E,'" -> "').concat(_,'" edge in the graph.'))}else if(f=""+f,!(y=this._edges.get(f)))throw new oe('Graph.dropEdge: could not find the "'.concat(f,'" edge in the graph.'));return L0(this,y),this},b.dropDirectedEdge=function(f,y){if(arguments.length<2)throw new ve("Graph.dropDirectedEdge: it does not make sense to try and drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new ve("Graph.dropDirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");var E=c(this,f=""+f,y=""+y,"directed");if(!E)throw new oe('Graph.dropDirectedEdge: could not find a "'.concat(f,'" -> "').concat(y,'" edge in the graph.'));return L0(this,E),this},b.dropUndirectedEdge=function(f,y){if(arguments.length<2)throw new ve("Graph.dropUndirectedEdge: it does not make sense to drop a directed edge by key. What if the edge with this key is undirected? Use #.dropEdge for this purpose instead.");if(this.multi)throw new ve("Graph.dropUndirectedEdge: cannot use a {source,target} combo when dropping an edge in a MultiGraph since we cannot infer the one you want to delete as there could be multiple ones.");var E=c(this,f,y,"undirected");if(!E)throw new oe('Graph.dropUndirectedEdge: could not find a "'.concat(f,'" -> "').concat(y,'" edge in the graph.'));return L0(this,E),this},b.clear=function(){this._edges.clear(),this._nodes.clear(),this._resetInstanceCounters(),this.emit("cleared")},b.clearEdges=function(){for(var f,y=this._nodes.values();(f=y.next()).done!==!0;)f.value.clear();this._edges.clear(),this._resetInstanceCounters(),this.emit("edgesCleared")},b.getAttribute=function(f){return this._attributes[f]},b.getAttributes=function(){return this._attributes},b.hasAttribute=function(f){return this._attributes.hasOwnProperty(f)},b.setAttribute=function(f,y){return this._attributes[f]=y,this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:f}),this},b.updateAttribute=function(f,y){if(typeof y!="function")throw new de("Graph.updateAttribute: updater should be a function.");var E=this._attributes[f];return this._attributes[f]=y(E),this.emit("attributesUpdated",{type:"set",attributes:this._attributes,name:f}),this},b.removeAttribute=function(f){return delete this._attributes[f],this.emit("attributesUpdated",{type:"remove",attributes:this._attributes,name:f}),this},b.replaceAttributes=function(f){if(!h(f))throw new de("Graph.replaceAttributes: provided attributes are not a plain object.");return this._attributes=f,this.emit("attributesUpdated",{type:"replace",attributes:this._attributes}),this},b.mergeAttributes=function(f){if(!h(f))throw new de("Graph.mergeAttributes: provided attributes are not a plain object.");return l(this._attributes,f),this.emit("attributesUpdated",{type:"merge",attributes:this._attributes,data:f}),this},b.updateAttributes=function(f){if(typeof f!="function")throw new de("Graph.updateAttributes: provided updater is not a function.");return this._attributes=f(this._attributes),this.emit("attributesUpdated",{type:"update",attributes:this._attributes}),this},b.updateEachNodeAttributes=function(f,y){if(typeof f!="function")throw new de("Graph.updateEachNodeAttributes: expecting an updater function.");if(y&&!v(y))throw new de("Graph.updateEachNodeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");for(var E,_,M=this._nodes.values();(E=M.next()).done!==!0;)(_=E.value).attributes=f(_.key,_.attributes);this.emit("eachNodeAttributesUpdated",{hints:y||null})},b.updateEachEdgeAttributes=function(f,y){if(typeof f!="function")throw new de("Graph.updateEachEdgeAttributes: expecting an updater function.");if(y&&!v(y))throw new de("Graph.updateEachEdgeAttributes: invalid hints. Expecting an object having the following shape: {attributes?: [string]}");for(var E,_,M,H,se=this._edges.values();(E=se.next()).done!==!0;)M=(_=E.value).source,H=_.target,_.attributes=f(_.key,_.attributes,M.key,H.key,M.attributes,H.attributes,_.undirected);this.emit("eachEdgeAttributesUpdated",{hints:y||null})},b.forEachAdjacencyEntry=function(f){if(typeof f!="function")throw new de("Graph.forEachAdjacencyEntry: expecting a callback.");V(!1,!1,!1,this,f)},b.forEachAdjacencyEntryWithOrphans=function(f){if(typeof f!="function")throw new de("Graph.forEachAdjacencyEntryWithOrphans: expecting a callback.");V(!1,!1,!0,this,f)},b.forEachAssymetricAdjacencyEntry=function(f){if(typeof f!="function")throw new de("Graph.forEachAssymetricAdjacencyEntry: expecting a callback.");V(!1,!0,!1,this,f)},b.forEachAssymetricAdjacencyEntryWithOrphans=function(f){if(typeof f!="function")throw new de("Graph.forEachAssymetricAdjacencyEntryWithOrphans: expecting a callback.");V(!1,!0,!0,this,f)},b.nodes=function(){return typeof Array.from=="function"?Array.from(this._nodes.keys()):Dt(this._nodes.keys(),this._nodes.size)},b.forEachNode=function(f){if(typeof f!="function")throw new de("Graph.forEachNode: expecting a callback.");for(var y,E,_=this._nodes.values();(y=_.next()).done!==!0;)f((E=y.value).key,E.attributes)},b.findNode=function(f){if(typeof f!="function")throw new de("Graph.findNode: expecting a callback.");for(var y,E,_=this._nodes.values();(y=_.next()).done!==!0;)if(f((E=y.value).key,E.attributes))return E.key},b.mapNodes=function(f){if(typeof f!="function")throw new de("Graph.mapNode: expecting a callback.");for(var y,E,_=this._nodes.values(),M=new Array(this.order),H=0;(y=_.next()).done!==!0;)E=y.value,M[H++]=f(E.key,E.attributes);return M},b.someNode=function(f){if(typeof f!="function")throw new de("Graph.someNode: expecting a callback.");for(var y,E,_=this._nodes.values();(y=_.next()).done!==!0;)if(f((E=y.value).key,E.attributes))return!0;return!1},b.everyNode=function(f){if(typeof f!="function")throw new de("Graph.everyNode: expecting a callback.");for(var y,E,_=this._nodes.values();(y=_.next()).done!==!0;)if(!f((E=y.value).key,E.attributes))return!1;return!0},b.filterNodes=function(f){if(typeof f!="function")throw new de("Graph.filterNodes: expecting a callback.");for(var y,E,_=this._nodes.values(),M=[];(y=_.next()).done!==!0;)f((E=y.value).key,E.attributes)&&M.push(E.key);return M},b.reduceNodes=function(f,y){if(typeof f!="function")throw new de("Graph.reduceNodes: expecting a callback.");if(arguments.length<2)throw new de("Graph.reduceNodes: missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array.");for(var E,_,M=y,H=this._nodes.values();(E=H.next()).done!==!0;)M=f(M,(_=E.value).key,_.attributes);return M},b.nodeEntries=function(){var f=this._nodes.values();return new ye(function(){var y=f.next();if(y.done)return y;var E=y.value;return{value:{node:E.key,attributes:E.attributes},done:!1}})},b.export=function(){var f=this,y=new Array(this._nodes.size),E=0;this._nodes.forEach(function(M,H){y[E++]=function(se,ie){var J={key:se};return d(ie.attributes)||(J.attributes=l({},ie.attributes)),J}(H,M)});var _=new Array(this._edges.size);return E=0,this._edges.forEach(function(M,H){_[E++]=function(se,ie,J){var fe={key:ie,source:J.source.key,target:J.target.key};return d(J.attributes)||(fe.attributes=l({},J.attributes)),se==="mixed"&&J.undirected&&(fe.undirected=!0),fe}(f.type,H,M)}),{options:{type:this.type,multi:this.multi,allowSelfLoops:this.allowSelfLoops},attributes:this.getAttributes(),nodes:y,edges:_}},b.import=function(f){var y,E,_,M,H,se=this,ie=arguments.length>1&&arguments[1]!==void 0&&arguments[1];if(f instanceof S)return f.forEachNode(function(lr,Qr){ie?se.mergeNode(lr,Qr):se.addNode(lr,Qr)}),f.forEachEdge(function(lr,Qr,Ru,Ou,X_,K_,N6){ie?N6?se.mergeUndirectedEdgeWithKey(lr,Ru,Ou,Qr):se.mergeDirectedEdgeWithKey(lr,Ru,Ou,Qr):N6?se.addUndirectedEdgeWithKey(lr,Ru,Ou,Qr):se.addDirectedEdgeWithKey(lr,Ru,Ou,Qr)}),this;if(!h(f))throw new de("Graph.import: invalid argument. Expecting a serialized graph or, alternatively, a Graph instance.");if(f.attributes){if(!h(f.attributes))throw new de("Graph.import: invalid attributes. Expecting a plain object.");ie?this.mergeAttributes(f.attributes):this.replaceAttributes(f.attributes)}if(f.nodes){if(_=f.nodes,!Array.isArray(_))throw new de("Graph.import: invalid nodes. Expecting an array.");for(y=0,E=_.length;y<E;y++){X(M=_[y]);var J=M,fe=J.key,ge=J.attributes;ie?this.mergeNode(fe,ge):this.addNode(fe,ge)}}if(f.edges){var Oe=!1;if(this.type==="undirected"&&(Oe=!0),_=f.edges,!Array.isArray(_))throw new de("Graph.import: invalid edges. Expecting an array.");for(y=0,E=_.length;y<E;y++){ee(H=_[y]);var nt=H,Et=nt.source,m0=nt.target,a0=nt.attributes,ar=nt.undirected,wr=ar===void 0?Oe:ar;"key"in H?(ie?wr?this.mergeUndirectedEdgeWithKey:this.mergeDirectedEdgeWithKey:wr?this.addUndirectedEdgeWithKey:this.addDirectedEdgeWithKey).call(this,H.key,Et,m0,a0):(ie?wr?this.mergeUndirectedEdge:this.mergeDirectedEdge:wr?this.addUndirectedEdge:this.addDirectedEdge).call(this,Et,m0,a0)}}return this},b.nullCopy=function(f){var y=new S(l({},this._options,f));return y.replaceAttributes(l({},this.getAttributes())),y},b.emptyCopy=function(f){var y=this.nullCopy(f);return this._nodes.forEach(function(E,_){var M=l({},E.attributes);E=new y.NodeDataClass(_,M),y._nodes.set(_,E)}),y},b.copy=function(f){if(typeof(f=f||{}).type=="string"&&f.type!==this.type&&f.type!=="mixed")throw new ve('Graph.copy: cannot create an incompatible copy from "'.concat(this.type,'" type to "').concat(f.type,'" because this would mean losing information about the current graph.'));if(typeof f.multi=="boolean"&&f.multi!==this.multi&&f.multi!==!0)throw new ve("Graph.copy: cannot create an incompatible copy by downgrading a multi graph to a simple one because this would mean losing information about the current graph.");if(typeof f.allowSelfLoops=="boolean"&&f.allowSelfLoops!==this.allowSelfLoops&&f.allowSelfLoops!==!0)throw new ve("Graph.copy: cannot create an incompatible copy from a graph allowing self loops to one that does not because this would mean losing information about the current graph.");for(var y,E,_=this.emptyCopy(f),M=this._edges.values();(y=M.next()).done!==!0;)j0(_,"copy",!1,(E=y.value).undirected,E.key,E.source.key,E.target.key,l({},E.attributes));return _},b.toJSON=function(){return this.export()},b.toString=function(){return"[object Graph]"},b.inspect=function(){var f=this,y={};this._nodes.forEach(function(se,ie){y[ie]=se.attributes});var E={},_={};this._edges.forEach(function(se,ie){var J,fe=se.undirected?"--":"->",ge="",Oe=se.source.key,nt=se.target.key;se.undirected&&Oe>nt&&(J=Oe,Oe=nt,nt=J);var Et="(".concat(Oe,")").concat(fe,"(").concat(nt,")");ie.startsWith("geid_")?f.multi&&(_[Et]===void 0?_[Et]=0:_[Et]++,ge+="".concat(_[Et],". ")):ge+="[".concat(ie,"]: "),E[ge+=Et]=se.attributes});var M={};for(var H in this)this.hasOwnProperty(H)&&!Ze.has(H)&&typeof this[H]!="function"&&r(H)!=="symbol"&&(M[H]=this[H]);return M.attributes=this._attributes,M.nodes=y,M.edges=E,p(M,"constructor",this.constructor),M},S}(w.exports.EventEmitter);typeof Symbol<"u"&&(Re.prototype[Symbol.for("nodejs.util.inspect.custom")]=Re.prototype.inspect),[{name:function(x){return"".concat(x,"Edge")},generateKey:!0},{name:function(x){return"".concat(x,"DirectedEdge")},generateKey:!0,type:"directed"},{name:function(x){return"".concat(x,"UndirectedEdge")},generateKey:!0,type:"undirected"},{name:function(x){return"".concat(x,"EdgeWithKey")}},{name:function(x){return"".concat(x,"DirectedEdgeWithKey")},type:"directed"},{name:function(x){return"".concat(x,"UndirectedEdgeWithKey")},type:"undirected"}].forEach(function(x){["add","merge","update"].forEach(function(S){var b=x.name(S),f=S==="add"?j0:dt;x.generateKey?Re.prototype[b]=function(y,E,_){return f(this,b,!0,(x.type||this.type)==="undirected",null,y,E,_,S==="update")}:Re.prototype[b]=function(y,E,_,M){return f(this,b,!1,(x.type||this.type)==="undirected",y,E,_,M,S==="update")}})}),function(x){p0.forEach(function(S){var b=S.name,f=S.attacher;f(x,b("Node"),0),f(x,b("Source"),1),f(x,b("Target"),2),f(x,b("Opposite"),3)})}(Re),function(x){i0.forEach(function(S){var b=S.name,f=S.attacher;f(x,b("Edge"),"mixed"),f(x,b("DirectedEdge"),"directed"),f(x,b("UndirectedEdge"),"undirected")})}(Re),function(x){Fn.forEach(function(S){(function(b,f){var y=f.name,E=f.type,_=f.direction;b.prototype[y]=function(M,H){if(E!=="mixed"&&this.type!=="mixed"&&E!==this.type)return[];if(!arguments.length)return In(this,E);if(arguments.length===1){M=""+M;var se=this._nodes.get(M);if(se===void 0)throw new oe("Graph.".concat(y,': could not find the "').concat(M,'" node in the graph.'));return Dl(this.multi,E==="mixed"?this.type:E,_,se)}if(arguments.length===2){M=""+M,H=""+H;var ie=this._nodes.get(M);if(!ie)throw new oe("Graph.".concat(y,': could not find the "').concat(M,'" source node in the graph.'));if(!this._nodes.has(H))throw new oe("Graph.".concat(y,': could not find the "').concat(H,'" target node in the graph.'));return Mn(E,this.multi,_,ie,H)}throw new de("Graph.".concat(y,": too many arguments (expecting 0, 1 or 2 and got ").concat(arguments.length,")."))}})(x,S),function(b,f){var y=f.name,E=f.type,_=f.direction,M="forEach"+y[0].toUpperCase()+y.slice(1,-1);b.prototype[M]=function(J,fe,ge){if(E==="mixed"||this.type==="mixed"||E===this.type){if(arguments.length===1)return Fo(!1,this,E,ge=J);if(arguments.length===2){J=""+J,ge=fe;var Oe=this._nodes.get(J);if(Oe===void 0)throw new oe("Graph.".concat(M,': could not find the "').concat(J,'" node in the graph.'));return Ln(!1,this.multi,E==="mixed"?this.type:E,_,Oe,ge)}if(arguments.length===3){J=""+J,fe=""+fe;var nt=this._nodes.get(J);if(!nt)throw new oe("Graph.".concat(M,': could not find the "').concat(J,'" source node in the graph.'));if(!this._nodes.has(fe))throw new oe("Graph.".concat(M,': could not find the "').concat(fe,'" target node in the graph.'));return Ns(!1,E,this.multi,_,nt,fe,ge)}throw new de("Graph.".concat(M,": too many arguments (expecting 1, 2 or 3 and got ").concat(arguments.length,")."))}};var H="map"+y[0].toUpperCase()+y.slice(1);b.prototype[H]=function(){var J,fe=Array.prototype.slice.call(arguments),ge=fe.pop();if(fe.length===0){var Oe=0;E!=="directed"&&(Oe+=this.undirectedSize),E!=="undirected"&&(Oe+=this.directedSize),J=new Array(Oe);var nt=0;fe.push(function(Et,m0,a0,ar,wr,lr,Qr){J[nt++]=ge(Et,m0,a0,ar,wr,lr,Qr)})}else J=[],fe.push(function(Et,m0,a0,ar,wr,lr,Qr){J.push(ge(Et,m0,a0,ar,wr,lr,Qr))});return this[M].apply(this,fe),J};var se="filter"+y[0].toUpperCase()+y.slice(1);b.prototype[se]=function(){var J=Array.prototype.slice.call(arguments),fe=J.pop(),ge=[];return J.push(function(Oe,nt,Et,m0,a0,ar,wr){fe(Oe,nt,Et,m0,a0,ar,wr)&&ge.push(Oe)}),this[M].apply(this,J),ge};var ie="reduce"+y[0].toUpperCase()+y.slice(1);b.prototype[ie]=function(){var J,fe,ge=Array.prototype.slice.call(arguments);if(ge.length<2||ge.length>4)throw new de("Graph.".concat(ie,": invalid number of arguments (expecting 2, 3 or 4 and got ").concat(ge.length,")."));if(typeof ge[ge.length-1]=="function"&&typeof ge[ge.length-2]!="function")throw new de("Graph.".concat(ie,": missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array."));ge.length===2?(J=ge[0],fe=ge[1],ge=[]):ge.length===3?(J=ge[1],fe=ge[2],ge=[ge[0]]):ge.length===4&&(J=ge[2],fe=ge[3],ge=[ge[0],ge[1]]);var Oe=fe;return ge.push(function(nt,Et,m0,a0,ar,wr,lr){Oe=J(Oe,nt,Et,m0,a0,ar,wr,lr)}),this[M].apply(this,ge),Oe}}(x,S),function(b,f){var y=f.name,E=f.type,_=f.direction,M="find"+y[0].toUpperCase()+y.slice(1,-1);b.prototype[M]=function(ie,J,fe){if(E!=="mixed"&&this.type!=="mixed"&&E!==this.type)return!1;if(arguments.length===1)return Fo(!0,this,E,fe=ie);if(arguments.length===2){ie=""+ie,fe=J;var ge=this._nodes.get(ie);if(ge===void 0)throw new oe("Graph.".concat(M,': could not find the "').concat(ie,'" node in the graph.'));return Ln(!0,this.multi,E==="mixed"?this.type:E,_,ge,fe)}if(arguments.length===3){ie=""+ie,J=""+J;var Oe=this._nodes.get(ie);if(!Oe)throw new oe("Graph.".concat(M,': could not find the "').concat(ie,'" source node in the graph.'));if(!this._nodes.has(J))throw new oe("Graph.".concat(M,': could not find the "').concat(J,'" target node in the graph.'));return Ns(!0,E,this.multi,_,Oe,J,fe)}throw new de("Graph.".concat(M,": too many arguments (expecting 1, 2 or 3 and got ").concat(arguments.length,")."))};var H="some"+y[0].toUpperCase()+y.slice(1,-1);b.prototype[H]=function(){var ie=Array.prototype.slice.call(arguments),J=ie.pop();return ie.push(function(fe,ge,Oe,nt,Et,m0,a0){return J(fe,ge,Oe,nt,Et,m0,a0)}),!!this[M].apply(this,ie)};var se="every"+y[0].toUpperCase()+y.slice(1,-1);b.prototype[se]=function(){var ie=Array.prototype.slice.call(arguments),J=ie.pop();return ie.push(function(fe,ge,Oe,nt,Et,m0,a0){return!J(fe,ge,Oe,nt,Et,m0,a0)}),!this[M].apply(this,ie)}}(x,S),function(b,f){var y=f.name,E=f.type,_=f.direction,M=y.slice(0,-1)+"Entries";b.prototype[M]=function(H,se){if(E!=="mixed"&&this.type!=="mixed"&&E!==this.type)return ye.empty();if(!arguments.length)return xl(this,E);if(arguments.length===1){H=""+H;var ie=this._nodes.get(H);if(!ie)throw new oe("Graph.".concat(M,': could not find the "').concat(H,'" node in the graph.'));return Ao(E,_,ie)}if(arguments.length===2){H=""+H,se=""+se;var J=this._nodes.get(H);if(!J)throw new oe("Graph.".concat(M,': could not find the "').concat(H,'" source node in the graph.'));if(!this._nodes.has(se))throw new oe("Graph.".concat(M,': could not find the "').concat(se,'" target node in the graph.'));return Nn(E,_,J,se)}throw new de("Graph.".concat(M,": too many arguments (expecting 0, 1 or 2 and got ").concat(arguments.length,")."))}}(x,S)})}(Re),function(x){ko.forEach(function(S){N(x,S),function(b,f){var y=f.name,E=f.type,_=f.direction,M="forEach"+y[0].toUpperCase()+y.slice(1,-1);b.prototype[M]=function(J,fe){if(E==="mixed"||this.type==="mixed"||E===this.type){J=""+J;var ge=this._nodes.get(J);if(ge===void 0)throw new oe("Graph.".concat(M,': could not find the "').concat(J,'" node in the graph.'));D(!1,E==="mixed"?this.type:E,_,ge,fe)}};var H="map"+y[0].toUpperCase()+y.slice(1);b.prototype[H]=function(J,fe){var ge=[];return this[M](J,function(Oe,nt){ge.push(fe(Oe,nt))}),ge};var se="filter"+y[0].toUpperCase()+y.slice(1);b.prototype[se]=function(J,fe){var ge=[];return this[M](J,function(Oe,nt){fe(Oe,nt)&&ge.push(Oe)}),ge};var ie="reduce"+y[0].toUpperCase()+y.slice(1);b.prototype[ie]=function(J,fe,ge){if(arguments.length<3)throw new de("Graph.".concat(ie,": missing initial value. You must provide it because the callback takes more than one argument and we cannot infer the initial value from the first iteration, as you could with a simple array."));var Oe=ge;return this[M](J,function(nt,Et){Oe=fe(Oe,nt,Et)}),Oe}}(x,S),function(b,f){var y=f.name,E=f.type,_=f.direction,M=y[0].toUpperCase()+y.slice(1,-1),H="find"+M;b.prototype[H]=function(J,fe){if(E==="mixed"||this.type==="mixed"||E===this.type){J=""+J;var ge=this._nodes.get(J);if(ge===void 0)throw new oe("Graph.".concat(H,': could not find the "').concat(J,'" node in the graph.'));return D(!0,E==="mixed"?this.type:E,_,ge,fe)}};var se="some"+M;b.prototype[se]=function(J,fe){return!!this[H](J,fe)};var ie="every"+M;b.prototype[ie]=function(J,fe){return!this[H](J,function(ge,Oe){return!fe(ge,Oe)})}}(x,S),G(x,S)})}(Re);var f0=function(x){function S(b){var f=l({type:"directed"},b);if("multi"in f&&f.multi!==!1)throw new de("DirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(f.type!=="directed")throw new de('DirectedGraph.from: inconsistent "'+f.type+'" type in given options!');return x.call(this,f)||this}return e(S,x),S}(Re),w0=function(x){function S(b){var f=l({type:"undirected"},b);if("multi"in f&&f.multi!==!1)throw new de("UndirectedGraph.from: inconsistent indication that the graph should be multi in given options!");if(f.type!=="undirected")throw new de('UndirectedGraph.from: inconsistent "'+f.type+'" type in given options!');return x.call(this,f)||this}return e(S,x),S}(Re),g0=function(x){function S(b){var f=l({multi:!0},b);if("multi"in f&&f.multi!==!0)throw new de("MultiGraph.from: inconsistent indication that the graph should be simple in given options!");return x.call(this,f)||this}return e(S,x),S}(Re),Ji=function(x){function S(b){var f=l({type:"directed",multi:!0},b);if("multi"in f&&f.multi!==!0)throw new de("MultiDirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(f.type!=="directed")throw new de('MultiDirectedGraph.from: inconsistent "'+f.type+'" type in given options!');return x.call(this,f)||this}return e(S,x),S}(Re),es=function(x){function S(b){var f=l({type:"undirected",multi:!0},b);if("multi"in f&&f.multi!==!0)throw new de("MultiUndirectedGraph.from: inconsistent indication that the graph should be simple in given options!");if(f.type!=="undirected")throw new de('MultiUndirectedGraph.from: inconsistent "'+f.type+'" type in given options!');return x.call(this,f)||this}return e(S,x),S}(Re);function Io(x){x.from=function(S,b){var f=l({},S.options,b),y=new x(f);return y.import(S),y}}return Io(Re),Io(f0),Io(w0),Io(g0),Io(Ji),Io(es),Re.Graph=Re,Re.DirectedGraph=f0,Re.UndirectedGraph=w0,Re.MultiGraph=g0,Re.MultiDirectedGraph=Ji,Re.MultiUndirectedGraph=es,Re.InvalidArgumentsGraphError=de,Re.NotFoundGraphError=oe,Re.UsageGraphError=ve,Re})});var Pt=Pe((Foe,Uf)=>{Uf.exports=function(e){return e!==null&&typeof e=="object"&&typeof e.addUndirectedEdgeWithKey=="function"&&typeof e.dropNode=="function"&&typeof e.multi=="boolean"}});var Pc=Pe((Aoe,Vf)=>{function Bi(r){if(typeof r!="function")throw new Error("obliterator/iterator: expecting a function!");this.next=r}typeof Symbol<"u"&&(Bi.prototype[Symbol.iterator]=function(){return this});Bi.of=function(){var r=arguments,e=r.length,t=0;return new Bi(function(){return t>=e?{done:!0}:{done:!1,value:r[t++]}})};Bi.empty=function(){var r=new Bi(function(){return{done:!0}});return r};Bi.fromSequence=function(r){var e=0,t=r.length;return new Bi(function(){return e>=t?{done:!0}:{done:!1,value:r[e++]}})};Bi.is=function(r){return r instanceof Bi?!0:typeof r=="object"&&r!==null&&typeof r.next=="function"};Vf.exports=Bi});var zf=Pe(a8=>{a8.ARRAY_BUFFER_SUPPORT=typeof ArrayBuffer<"u";a8.SYMBOL_SUPPORT=typeof Symbol<"u"});var Id=Pe((Ioe,Hf)=>{var Wf=zf(),jS=Wf.ARRAY_BUFFER_SUPPORT,$S=Wf.SYMBOL_SUPPORT;Hf.exports=function(e,t){var i,s,n,o,a;if(!e)throw new Error("obliterator/forEach: invalid iterable.");if(typeof t!="function")throw new Error("obliterator/forEach: expecting a callback.");if(Array.isArray(e)||jS&&ArrayBuffer.isView(e)||typeof e=="string"||e.toString()==="[object Arguments]"){for(n=0,o=e.length;n<o;n++)t(e[n],n);return}if(typeof e.forEach=="function"){e.forEach(t);return}if($S&&Symbol.iterator in e&&typeof e.next!="function"&&(e=e[Symbol.iterator]()),typeof e.next=="function"){for(i=e,n=0;a=i.next(),a.done!==!0;)t(a.value,n),n++;return}for(s in e)e.hasOwnProperty(s)&&t(e[s],s)}});var qf=Pe((Loe,$f)=>{var jf=Pc(),qS=Id();function $t(){this.clear()}$t.prototype.clear=function(){this.items=[],this.offset=0,this.size=0};$t.prototype.enqueue=function(r){return this.items.push(r),++this.size};$t.prototype.dequeue=function(){if(this.size){var r=this.items[this.offset];return++this.offset*2>=this.items.length&&(this.items=this.items.slice(this.offset),this.offset=0),this.size--,r}};$t.prototype.peek=function(){if(this.size)return this.items[this.offset]};$t.prototype.forEach=function(r,e){e=arguments.length>1?e:this;for(var t=this.offset,i=0,s=this.items.length;t<s;t++,i++)r.call(e,this.items[t],i,this)};$t.prototype.toArray=function(){return this.items.slice(this.offset)};$t.prototype.values=function(){var r=this.items,e=this.offset;return new jf(function(){if(e>=r.length)return{done:!0};var t=r[e];return e++,{value:t,done:!1}})};$t.prototype.entries=function(){var r=this.items,e=this.offset,t=0;return new jf(function(){if(e>=r.length)return{done:!0};var i=r[e];return e++,{value:[t++,i],done:!1}})};typeof Symbol<"u"&&($t.prototype[Symbol.iterator]=$t.prototype.values);$t.prototype.toString=function(){return this.toArray().join(",")};$t.prototype.toJSON=function(){return this.toArray()};$t.prototype.inspect=function(){var r=this.toArray();return Object.defineProperty(r,"constructor",{value:$t,enumerable:!1}),r};typeof Symbol<"u"&&($t.prototype[Symbol.for("nodejs.util.inspect.custom")]=$t.prototype.inspect);$t.from=function(r){var e=new $t;return qS(r,function(t){e.enqueue(t)}),e};$t.of=function(){return $t.from(arguments)};$f.exports=$t});var Xf=Pe((Moe,Yf)=>{Yf.exports=function(e,t){var i=t.length;if(i!==0){var s=e.length;e.length+=i;for(var n=0;n<i;n++)e[s+n]=t[n]}}});var Ld=Pe(Ra=>{var l8=Pt(),YS=qf(),XS=Xf();function KS(r,e,t){if(!l8(r))throw new Error("graphology-shortest-path: invalid graphology instance.");if(arguments.length<3)throw new Error("graphology-shortest-path: invalid number of arguments. Expecting at least 3.");if(!r.hasNode(e))throw new Error('graphology-shortest-path: the "'+e+'" source node does not exist in the given graph.');if(!r.hasNode(t))throw new Error('graphology-shortest-path: the "'+t+'" target node does not exist in the given graph.');if(e=""+e,t=""+t,e===t)return[e];var i=r.inboundNeighbors.bind(r),s=r.outboundNeighbors.bind(r),n={},o={};n[e]=null,o[t]=null;var a=[e],l=[t],c,h,d,p,g,v,C,w,k=!1;e:for(;a.length&&l.length;)if(a.length<=l.length){for(c=a,a=[],g=0,C=c.length;g<C;g++)for(h=c[g],d=s(h),v=0,w=d.length;v<w;v++)if(p=d[v],p in n||(a.push(p),n[p]=h),p in o){k=!0;break e}}else for(c=l,l=[],g=0,C=c.length;g<C;g++)for(h=c[g],d=i(h),v=0,w=d.length;v<w;v++)if(p=d[v],p in o||(l.push(p),o[p]=h),p in n){k=!0;break e}if(!k)return null;for(var B=[];p;)B.unshift(p),p=n[p];for(p=o[B[B.length-1]];p;)B.push(p),p=o[p];return B.length?B:null}function ZS(r,e){if(!l8(r))throw new Error("graphology-shortest-path: invalid graphology instance.");if(arguments.length<2)throw new Error("graphology-shortest-path: invalid number of arguments. Expecting at least 2.");if(!r.hasNode(e))throw new Error('graphology-shortest-path: the "'+e+'" source node does not exist in the given graph.');e=""+e;var t={},i={},s,n,o,a,l,c;for(t[e]=!0,i[e]=[e];Object.keys(t).length;){s=t,t={};for(o in s)for(n=r.outboundNeighbors(o),l=0,c=n.length;l<c;l++)a=n[l],i[a]||(i[a]=i[o].concat(a),t[a]=!0)}return i}function Kf(r,e,t){if(!l8(e))throw new Error("graphology-shortest-path: invalid graphology instance.");if(!e.hasNode(t))throw new Error('graphology-shortest-path: the "'+t+'" source node does not exist in the given graph.');t=""+t;var i=new Set,s={},n=0;s[t]=0;for(var o=[t],a,l,c;o.length!==0;){var h=[];for(a=0,l=o.length;a<l;a++)c=o[a],!i.has(c)&&(i.add(c),XS(h,e[r](c)),s[c]=n);n++,o=h}return s}var QS=Kf.bind(null,"outboundNeighbors"),JS=Kf.bind(null,"neighbors");function eC(r,e){e=""+e;var t=[],i={},s={},n=r.nodes(),o,a,l,c,h,d,p,g,v;for(d=0,g=n.length;d<g;d++)c=n[d],i[c]=[],s[c]=0;var C={};s[e]=1,C[e]=0;for(var w=YS.of(e);w.size;)for(c=w.dequeue(),t.push(c),o=C[c],a=s[c],l=r.outboundNeighbors(c),p=0,v=l.length;p<v;p++)h=l[p],h in C||(w.enqueue(h),C[h]=o+1),C[h]===o+1&&(s[h]+=a,i[h].push(c));return[t,i,s]}Ra.bidirectional=KS;Ra.singleSource=ZS;Ra.singleSourceLength=QS;Ra.undirectedSingleSourceLength=JS;Ra.brandes=eC});var g8=Pe((_ue,f5)=>{function pn(r){this.graph=r,this.stack=new Array(r.order),this.seen=new Set,this.size=0}pn.prototype.hasAlreadySeenEverything=function(){return this.seen.size===this.graph.order};pn.prototype.countUnseenNodes=function(){return this.graph.order-this.seen.size};pn.prototype.forEachNodeYetUnseen=function(r){var e=this.seen,t=this.graph;t.someNode(function(i,s){if(e.size===t.order)return!0;if(e.has(i))return!1;var n=r(i,s);return!!n})};pn.prototype.has=function(r){return this.seen.has(r)};pn.prototype.push=function(r){var e=this.seen.size;return this.seen.add(r),e===this.seen.size?!1:(this.stack[this.size++]=r,!0)};pn.prototype.pushWith=function(r,e){var t=this.seen.size;return this.seen.add(r),t===this.seen.size?!1:(this.stack[this.size++]=e,!0)};pn.prototype.pop=function(){if(this.size!==0)return this.stack[--this.size]};f5.exports=pn});var g5=Pe(m8=>{function dC(r,e,t){this.node=r,this.attributes=e,this.depth=t}function pC(r){return r[0].toUpperCase()+r.slice(1)}m8.TraversalRecord=dC;m8.capitalize=pC});var x5=Pe(y8=>{var fC=Pt(),gC=g8(),y5=g5(),m5=y5.TraversalRecord,mC=y5.capitalize;function v5(r,e,t,i){if(i=i||{},!fC(r))throw new Error("graphology-traversal/dfs: expecting a graphology instance.");if(typeof t!="function")throw new Error("graphology-traversal/dfs: given callback is not a function.");if(r.order===0)return;var s=new gC(r),n=r["forEach"+mC(i.mode||"outbound")+"Neighbor"].bind(r),o;e===null?o=s.forEachNodeYetUnseen.bind(s):o=function(h){e=""+e,h(e,r.getNodeAttributes(e))};var a,l;function c(h,d){s.pushWith(h,new m5(h,d,a.depth+1))}o(function(h,d){for(s.pushWith(h,new m5(h,d,0));s.size!==0;)a=s.pop(),l=t(a.node,a.attributes,a.depth),l!==!0&&n(a.node,c)})}y8.dfs=function(r,e,t){return v5(r,null,e,t)};y8.dfsFromNode=v5});var v1=Pe(D5=>{D5.copyNode=function(r,e,t){return t=Object.assign({},t),r.addNode(e,t)}});var fn=Pe(Uc=>{Uc.addEdge=function(e,t,i,s,n,o){return t?i==null?e.addUndirectedEdge(s,n,o):e.addUndirectedEdgeWithKey(i,s,n,o):i==null?e.addDirectedEdge(s,n,o):e.addDirectedEdgeWithKey(i,s,n,o)};Uc.copyEdge=function(e,t,i,s,n,o){return o=Object.assign({},o),t?i==null?e.addUndirectedEdge(s,n,o):e.addUndirectedEdgeWithKey(i,s,n,o):i==null?e.addDirectedEdge(s,n,o):e.addDirectedEdgeWithKey(i,s,n,o)};Uc.mergeEdge=function(e,t,i,s,n,o){return t?i==null?e.mergeUndirectedEdge(s,n,o):e.mergeUndirectedEdgeWithKey(i,s,n,o):i==null?e.mergeDirectedEdge(s,n,o):e.mergeDirectedEdgeWithKey(i,s,n,o)};Uc.updateEdge=function(e,t,i,s,n,o){return t?i==null?e.updateUndirectedEdge(s,n,o):e.updateUndirectedEdgeWithKey(i,s,n,o):i==null?e.updateDirectedEdge(s,n,o):e.updateDirectedEdgeWithKey(i,s,n,o)}});var w5=Pe((Lue,C5)=>{var b5=Pt(),E5=v1().copyNode,S5=fn().copyEdge;C5.exports=function(e,t){if(!b5(e)||!b5(t))throw new Error("graphology-operators/disjoint-union: invalid graph.");if(e.multi!==t.multi)throw new Error("graphology-operators/disjoint-union: both graph should be simple or multi.");var i=e.nullCopy();i.mergeAttributes(e.getAttributes());var s={},n={},o=0;return e.forEachNode(function(a,l){s[a]=o,E5(i,o,l),o++}),t.forEachNode(function(a,l){n[a]=o,E5(i,o,l),o++}),o=0,e.forEachEdge(function(a,l,c,h,d,p,g){S5(i,g,o++,s[c],s[h],h,l)}),t.forEachEdge(function(a,l,c,h,d,p,g){S5(i,g,o++,n[c],n[h],h,l)}),i}});var F5=Pe((Mue,_5)=>{var yC=Pt(),T5=fn().copyEdge;_5.exports=function(e){if(!yC(e))throw new Error("graphology-operators/reverse: invalid graph.");var t=e.emptyCopy();return e.forEachEdge(function(i,s,n,o,a,l,c){c?T5(t,!0,i,n,o,s):T5(t,!1,i,o,n,s)}),t}});var I5=Pe((Nue,k5)=>{var vC=Pt(),A5=v1().copyNode,xC=fn().copyEdge;k5.exports=function(e,t){if(!vC(e))throw new Error("graphology-operators/subgraph: invalid graph instance.");var i=e.nullCopy(),s=t;if(Array.isArray(t)){if(t.length===0)return i;t=new Set(t)}if(t instanceof Set){if(t.size===0)return i;s=function(o){return t.has(o)};var n=t;t=new Set,n.forEach(function(o){t.add(""+o)})}if(typeof s!="function")throw new Error("graphology-operators/subgraph: invalid nodes. Expecting an array or a set or a filtering function.");if(typeof t=="function"){if(e.forEachNode(function(o,a){s(o,a)&&A5(i,o,a)}),i.order===0)return i}else t.forEach(function(o){if(!e.hasNode(o))throw new Error('graphology-operators/subgraph: the "'+o+'" node was not found in the graph.');A5(i,o,e.getNodeAttributes(o))});return e.forEachEdge(function(o,a,l,c,h,d,p){s(l,h)&&(c!==l&&!s(c,d)||xC(i,p,o,l,c,a))}),i}});var M5=Pe((Pue,L5)=>{var DC=Pt(),v8=fn().copyEdge;L5.exports=function(e,t){if(!DC(e))throw new Error("graphology-operators/to-directed: expecting a valid graphology instance.");typeof t=="function"&&(t={mergeEdge:t}),t=t||{};var i=typeof t.mergeEdge=="function"?t.mergeEdge:null;if(e.type==="directed")return e.copy();var s=e.emptyCopy({type:"directed"});return e.forEachDirectedEdge(function(n,o,a,l){v8(s,!1,n,a,l,o)}),e.forEachUndirectedEdge(function(n,o,a,l){var c=!e.multi&&e.type==="mixed"&&s.edge(a,l),h=!e.multi&&e.type==="mixed"&&s.edge(l,a);c?s.replaceEdgeAttributes(c,i(s.getEdgeAttributes(c),o)):v8(s,!1,null,a,l,o),a!==l&&(h?s.replaceEdgeAttributes(h,i(s.getEdgeAttributes(h),o)):v8(s,!1,null,l,a,o))}),s}});var P5=Pe((Bue,N5)=>{var bC=Pt();N5.exports=function(e){if(!bC(e))throw new Error("graphology-operators/to-mixed: expecting a valid graphology instance.");return e.copy({type:"mixed"})}});var R5=Pe((Rue,B5)=>{var EC=Pt();B5.exports=function(e){if(!EC(e))throw new Error("graphology-operators/to-multi: expecting a valid graphology instance.");return e.copy({multi:!0})}});var G5=Pe((Oue,O5)=>{var SC=Pt(),CC=fn().copyEdge;O5.exports=function(e,t){if(!SC(e))throw new Error("graphology-operators/to-simple: expecting a valid graphology instance.");typeof t=="function"&&(t={mergeEdge:t}),t=t||{};var i=typeof t.mergeEdge=="function"?t.mergeEdge:null;if(!e.multi)return e.copy();var s=e.emptyCopy({multi:!1});return e.forEachEdge(function(n,o,a,l,c,h,d){var p=d?s.undirectedEdge(a,l):s.directedEdge(a,l);if(p){i&&s.replaceEdgeAttributes(p,i(s.getEdgeAttributes(p),o));return}CC(s,d,n,a,l,o)}),s}});var z5=Pe((Gue,V5)=>{var wC=Pt(),U5=fn().copyEdge;V5.exports=function(e,t){if(!wC(e))throw new Error("graphology-operators/to-undirected: expecting a valid graphology instance.");typeof t=="function"&&(t={mergeEdge:t}),t=t||{};var i=typeof t.mergeEdge=="function"?t.mergeEdge:null;if(e.type==="undirected")return e.copy();var s=e.emptyCopy({type:"undirected"});return e.forEachUndirectedEdge(function(n,o,a,l){U5(s,!0,n,a,l,o)}),e.forEachDirectedEdge(function(n,o,a,l){if(!e.multi){var c=s.edge(a,l);if(c){i&&s.replaceEdgeAttributes(c,i(s.getEdgeAttributes(c),o));return}}U5(s,!0,null,a,l,o)}),s}});var j5=Pe((Uue,H5)=>{var W5=Pt();H5.exports=function(e,t){if(!W5(e)||!W5(t))throw new Error("graphology-operators/union: invalid graph.");if(e.multi!==t.multi)throw new Error("graphology-operators/union: both graph should be simple or multi.");var i=e.copy();return i.import(t,!0),i}});var Vc=Pe(Ui=>{Ui.disjointUnion=w5();Ui.reverse=F5();Ui.subgraph=I5();Ui.toDirected=M5();Ui.toMixed=P5();Ui.toMulti=R5();Ui.toSimple=G5();Ui.toUndirected=z5();Ui.union=j5()});var D8=Pe((she,X5)=>{var gn=Object.create(null);gn.bow=Object.create(null);gn.set=Object.create(null);gn.vector=Object.create(null);gn.bow.cosine=function(r,e){var t=Object.create(null),i=Object.create(null),s,n;for(n in r)t[n]=r[n],i[n]=0;for(n in e)i[n]=e[n],t[n]=t[n]||0;var o=0,a=0,l=0,c,h;for(n in t)c=t[n],h=i[n],o+=c*c,l+=h*h,a+=c*h;return s=o&&l?+(a/(Math.sqrt(o)*Math.sqrt(l))).toFixed(6):!o^!l?0:1,s};gn.set.tversky=function(r,e,t,i){if(r.size===0&&e.size===0)return 1;if(r.size===0||e.size===0)return 0;var s,n,o=0,a,l,c;if(s=isNaN(t)?.5:+t,n=isNaN(i)?.5:+i,s<0||n<0)throw Error("wink-nlp: tversky requires aplha & beta to be positive numbers.");return r.size<e.size?r.forEach(function(h){e.has(h)&&(o+=1)}):e.forEach(function(h){r.has(h)&&(o+=1)}),a=r.size-o,l=e.size-o,c=o/(o+s*a+n*l),+c.toFixed(6)};gn.set.oo=function(r,e){if(r.size===0&&e.size===0)return 1;if(r.size===0||e.size===0)return 0;var t=0;return r.size<e.size?r.forEach(function(i){e.has(i)&&(t+=1)}):e.forEach(function(i){r.has(i)&&(t+=1)}),+(t/Math.sqrt(r.size*e.size)).toFixed(6)};gn.vector.cosine=function(r,e){let t=0,i=r.length-1;for(let s=0;s<i;s+=1)t+=r[s]*e[s];return+(t/(r[i]*e[i])).toFixed(6)};X5.exports=gn});var Q5=Pe((phe,Z5)=>{Z5.exports=function(e,t){if((typeof e=="string"||e instanceof String)&&typeof document<"u"){var i=document.createElement("DIV");i.innerHTML=e,e=(i.textContent||"").trim()}else typeof e=="object"&&e.textContent&&(e=(e.textContent||"").trim());return e}});var J5=Pe(b8=>{b8.endsWithChar=function(e,t){return t.length>1?t.indexOf(e.slice(-1))>-1:e.slice(-1)===t};b8.endsWith=function(e,t){return e.slice(e.length-t.length)===t}});var eg=Pe(tr=>{var E8,TC=["al","adj","assn","Ave","BSc","MSc","Cell","Ch","Co","cc","Corp","Dem","Dept","ed","eg","Eq","Eqs","est","est","etc","Ex","ext","Fig","fig","Figs","figs","i.e","ie","Inc","inc","Jan","Feb","Mar","Apr","Jun","Jul","Aug","Sep","Sept","Oct","Nov","Dec","jr","mi","Miss","Mrs","Mr","Ms","Mol","mt","mts","no","Nos","PhD","MD","BA","MA","MM","pl","pop","pp","Prof","Dr","pt","Ref","Refs","Rep","repr","rev","Sec","Secs","Sgt","Col","Gen","Rep","Sen","Gov","Lt","Maj","Capt","St","Sr","sr","Jr","jr","Rev","Sun","Mon","Tu","Tue","Tues","Wed","Th","Thu","Thur","Thurs","Fri","Sat","trans","Univ","Viz","Vol","vs","v"];tr.setAbbreviations=function(r){r?E8=r:E8=TC};var S8=tr.isCapitalized=function(r){return/^[A-Z][a-z].*/.test(r)||_C(r)};tr.isSentenceStarter=function(r){return S8(r)||/``|"|'/.test(r.substring(0,2))};tr.isCommonAbbreviation=function(r){var e=r.replace(/[-'`~!@#$%^&*()_|+=?;:'",.<>\{\}\[\]\\\/]/gi,"");return~E8.indexOf(e)};tr.isTimeAbbreviation=function(r,e){if(r==="a.m."||r==="p.m."){var t=e.replace(/\W+/g,"").slice(-3).toLowerCase();if(t==="day")return!0}return!1};tr.isDottedAbbreviation=function(r){var e=r.replace(/[\(\)\[\]\{\}]/g,"").match(/(.\.)*/);return e&&e[0].length>0};tr.isCustomAbbreviation=function(r){return r.length<=3?!0:S8(r)};tr.isNameAbbreviation=function(r,e){if(e.length>0){if(r<5&&e[0].length<6&&S8(e[0]))return!0;var t=e.filter(function(i){return/[A-Z]/.test(i.charAt(0))});return t.length>=3}return!1};var _C=tr.isNumber=function(r,e){return e&&(r=r.slice(e-1,e+2)),!isNaN(r)};tr.isPhoneNr=function(r){return r.match(/^(?:(?:\+?1\s*(?:[.-]\s*)?)?(?:\(\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\s*\)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\s*(?:[.-]\s*)?)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\s*(?:[.-]\s*)?([0-9]{4})(?:\s*(?:#|x\.?|ext\.?|extension)\s*(\d+))?$/)};tr.isURL=function(r){return r.match(/[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/)};tr.isConcatenated=function(r){var e=0;if((e=r.indexOf("."))>-1||(e=r.indexOf("!"))>-1||(e=r.indexOf("?"))>-1){var t=r.charAt(e+1);if(t.match(/[a-zA-Z].*/))return[r.slice(0,e),r.slice(e+1)]}return!1};tr.isBoundaryChar=function(r){return r==="."||r==="!"||r==="?"}});var ig=Pe(rg=>{var FC=Q5(),zc=J5(),W0=eg(),C8=" @~@ ",tg=C8.trim(),AC=new RegExp("\\S",""),kC=new RegExp("\\n+|[-#=_+*]{4,}","g"),IC=new RegExp("\\S+|\\n","g");rg.sentences=function(r,e){if(!r||typeof r!="string"||!r.length)return[];if(!AC.test(r))return[];var t={newline_boundaries:!1,html_boundaries:!1,html_boundaries_tags:["p","div","ul","ol"],sanitize:!1,allowed_tags:!1,preserve_whitespace:!1,abbreviations:null};if(typeof e=="boolean")t.newline_boundaries=!0;else for(var i in e)t[i]=e[i];if(W0.setAbbreviations(t.abbreviations),t.newline_boundaries&&(r=r.replace(kC,C8)),t.html_boundaries){var s="(<br\\s*\\/?>|<\\/("+t.html_boundaries_tags.join("|")+")>)",n=new RegExp(s,"g");r=r.replace(n,"$1"+C8)}(t.sanitize||t.allowed_tags)&&(t.allowed_tags||(t.allowed_tags=[""]),r=FC(r,{allowedTags:t.allowed_tags}));var o,a;t.preserve_whitespace?(a=r.split(/(<br\s*\/?>|\S+|\n+)/),o=a.filter(function(w,k){return k%2})):o=r.trim().match(IC);var l=0,c=0,h=[],d=[],p=[];if(!o||!o.length)return[];for(var g=0,v=o.length;g<v;g++){if(l++,p.push(o[g]),~o[g].indexOf(",")&&(l=0),W0.isBoundaryChar(o[g])||zc.endsWithChar(o[g],"?!")||o[g]===tg){(t.newline_boundaries||t.html_boundaries)&&o[g]===tg&&p.pop(),d.push(p),l=0,p=[];continue}if((zc.endsWithChar(o[g],'"')||zc.endsWithChar(o[g],"\u201D"))&&(o[g]=o[g].slice(0,-1)),zc.endsWithChar(o[g],".")){if(g+1<v){if(o[g].length===2&&isNaN(o[g].charAt(0))||W0.isCommonAbbreviation(o[g]))continue;if(W0.isSentenceStarter(o[g+1])){if(W0.isTimeAbbreviation(o[g],o[g+1])||W0.isNameAbbreviation(l,o.slice(g,6))||W0.isNumber(o[g+1])&&W0.isCustomAbbreviation(o[g]))continue}else if(zc.endsWith(o[g],"..")||W0.isDottedAbbreviation(o[g])||W0.isNameAbbreviation(l,o.slice(g,5)))continue}d.push(p),p=[],l=0;continue}(c=o[g].indexOf("."))>-1&&(W0.isNumber(o[g],c)||W0.isDottedAbbreviation(o[g])||W0.isURL(o[g])||W0.isPhoneNr(o[g]))||(h=W0.isConcatenated(o[g]))&&(p.pop(),p.push(h[0]),d.push(p),p=[],l=0,p.push(h[1]))}p.length&&d.push(p),d=d.filter(function(w){return w.length>0});var C=d.slice(1).reduce(function(w,k){var B=w[w.length-1];return B.length===1&&/^.{1,2}[.]$/.test(B[0])&&!/[.]/.test(k[0])?(w.pop(),w.push(B.concat(k)),w):(w.push(k),w)},[d[0]]);return C.map(function(w,k){if(t.preserve_whitespace&&!t.newline_boundaries&&!t.html_boundaries){var B=w.length*2;return k===0&&(B+=1),a.splice(0,B).join("")}return w.join(" ")})}});var cg=Pe(k1=>{var LC=Pt();function qa(r,e,t,i){var s=e+"Centrality";if(!LC(t))throw new Error("graphology-centrality/"+s+": the given graph is not a valid graphology instance.");if(e!=="degree"&&t.type==="undirected")throw new Error("graphology-centrality/"+s+": cannot compute "+e+" centrality on an undirected graph.");i=i||{};var n=i.nodeCentralityAttribute||s,o=t.order-1,a=t[e].bind(t);if(r){t.updateEachNodeAttributes(function(c,h){return h[n]=a(c)/o,h},{attributes:[n]});return}var l={};return t.forEachNode(function(c){l[c]=a(c)/o}),l}var og=qa.bind(null,!1,"degree"),ag=qa.bind(null,!1,"inDegree"),lg=qa.bind(null,!1,"outDegree");og.assign=qa.bind(null,!0,"degree");ag.assign=qa.bind(null,!0,"inDegree");lg.assign=qa.bind(null,!0,"outDegree");k1.degreeCentrality=og;k1.inDegreeCentrality=ag;k1.outDegreeCentrality=lg});var jc=Pe(($he,hg)=>{function MC(r){return!r||typeof r!="object"||typeof r=="function"||Array.isArray(r)||r instanceof Set||r instanceof Map||r instanceof RegExp||r instanceof Date}function ug(r,e){r=r||{};var t={};for(var i in e){var s=r[i],n=e[i];if(!MC(n)){t[i]=ug(s,n);continue}s===void 0?t[i]=n:t[i]=s}return t}hg.exports=ug});var $c=Pe(Vi=>{var NC=Math.pow(2,8)-1,PC=Math.pow(2,16)-1,BC=Math.pow(2,32)-1,RC=Math.pow(2,7)-1,OC=Math.pow(2,15)-1,GC=Math.pow(2,31)-1;Vi.getPointerArray=function(r){var e=r-1;if(e<=NC)return Uint8Array;if(e<=PC)return Uint16Array;if(e<=BC)return Uint32Array;throw new Error("mnemonist: Pointer Array of size > 4294967295 is not supported.")};Vi.getSignedPointerArray=function(r){var e=r-1;return e<=RC?Int8Array:e<=OC?Int16Array:e<=GC?Int32Array:Float64Array};Vi.getNumberType=function(r){return r===(r|0)?Math.sign(r)===-1?r<=127&&r>=-128?Int8Array:r<=32767&&r>=-32768?Int16Array:Int32Array:r<=255?Uint8Array:r<=65535?Uint16Array:Uint32Array:Float64Array};var UC={Uint8Array:1,Int8Array:2,Uint16Array:3,Int16Array:4,Uint32Array:5,Int32Array:6,Float32Array:7,Float64Array:8};Vi.getMinimalRepresentation=function(r,e){var t=null,i=0,s,n,o,a,l;for(a=0,l=r.length;a<l;a++)o=e?e(r[a]):r[a],n=Vi.getNumberType(o),s=UC[n.name],s>i&&(i=s,t=n);return t};Vi.isTypedArray=function(r){return typeof ArrayBuffer<"u"&&ArrayBuffer.isView(r)};Vi.concat=function(){var r=0,e,t,i;for(e=0,i=arguments.length;e<i;e++)r+=arguments[e].length;var s=new arguments[0].constructor(r);for(e=0,t=0;e<i;e++)s.set(arguments[e],t),t+=arguments[e].length;return s};Vi.indices=function(r){for(var e=Vi.getPointerArray(r),t=new e(r),i=0;i<r;i++)t[i]=i;return t}});var w8=Pe(I1=>{function VC(r){return typeof r!="number"||isNaN(r)?1:r}function zC(r,e){var t={},i=function(o){return typeof o>"u"?e:o};typeof e=="function"&&(i=e);var s=function(o){return i(o[r])},n=function(){return i(void 0)};return typeof r=="string"?(t.fromAttributes=s,t.fromGraph=function(o,a){return s(o.getNodeAttributes(a))},t.fromEntry=function(o,a){return s(a)}):typeof r=="function"?(t.fromAttributes=function(){throw new Error("graphology-utils/getters/createNodeValueGetter: irrelevant usage.")},t.fromGraph=function(o,a){return i(r(a,o.getNodeAttributes(a)))},t.fromEntry=function(o,a){return i(r(o,a))}):(t.fromAttributes=n,t.fromGraph=n,t.fromEntry=n),t}function dg(r,e){var t={},i=function(o){return typeof o>"u"?e:o};typeof e=="function"&&(i=e);var s=function(o){return i(o[r])},n=function(){return i(void 0)};return typeof r=="string"?(t.fromAttributes=s,t.fromGraph=function(o,a){return s(o.getEdgeAttributes(a))},t.fromEntry=function(o,a){return s(a)},t.fromPartialEntry=t.fromEntry,t.fromMinimalEntry=t.fromEntry):typeof r=="function"?(t.fromAttributes=function(){throw new Error("graphology-utils/getters/createEdgeValueGetter: irrelevant usage.")},t.fromGraph=function(o,a){var l=o.extremities(a);return i(r(a,o.getEdgeAttributes(a),l[0],l[1],o.getNodeAttributes(l[0]),o.getNodeAttributes(l[1]),o.isUndirected(a)))},t.fromEntry=function(o,a,l,c,h,d,p){return i(r(o,a,l,c,h,d,p))},t.fromPartialEntry=function(o,a,l,c){return i(r(o,a,l,c))},t.fromMinimalEntry=function(o,a){return i(r(o,a))}):(t.fromAttributes=n,t.fromGraph=n,t.fromEntry=n,t.fromMinimalEntry=n),t}I1.createNodeValueGetter=zC;I1.createEdgeValueGetter=dg;I1.createEdgeWeightGetter=function(r){return dg(r,VC)}});var M1=Pe(T8=>{var L1=$c(),WC=w8().createEdgeWeightGetter;function pg(r,e){return r==="outbound"||r==="inbound"?e.directedSize+e.undirectedSize*2:r==="in"||r==="out"||r==="directed"?e.directedSize:e.undirectedSize*2}function _s(r,e){e=e||"outbound";var t=r[e+"Neighbors"].bind(r),i=pg(e,r),s=L1.getPointerArray(i),n=L1.getPointerArray(r.order);this.graph=r,this.neighborhood=new n(i),this.starts=new s(r.order+1),this.nodes=r.nodes();var o={},a,l,c,h,d,p,g=0;for(a=0,l=r.order;a<l;a++)o[this.nodes[a]]=a;for(a=0,l=r.order;a<l;a++)for(d=this.nodes[a],p=t(d),this.starts[a]=g,c=0,h=p.length;c<h;c++)this.neighborhood[g++]=o[p[c]];this.starts[a]=i}_s.prototype.bounds=function(r){return[this.starts[r],this.starts[r+1]]};_s.prototype.project=function(){var r=this,e={};return r.nodes.forEach(function(t,i){e[t]=Array.from(r.neighborhood.slice(r.starts[i],r.starts[i+1])).map(function(s){return r.nodes[s]})}),e};_s.prototype.collect=function(r){var e,t,i={};for(e=0,t=r.length;e<t;e++)i[this.nodes[e]]=r[e];return i};_s.prototype.assign=function(r,e){var t=0;this.graph.updateEachNodeAttributes(function(i,s){return s[r]=e[t++],s},{attributes:[r]})};T8.NeighborhoodIndex=_s;function qc(r,e,t){t=t||"outbound";var i=r[t+"Edges"].bind(r),s=pg(t,r),n=L1.getPointerArray(s),o=L1.getPointerArray(r.order),a=WC(e).fromMinimalEntry;this.graph=r,this.neighborhood=new o(s),this.weights=new Float64Array(s),this.outDegrees=new Float64Array(r.order),this.starts=new n(r.order+1),this.nodes=r.nodes();var l={},c,h,d,p,g,v,C,w,k,B=0;for(c=0,h=r.order;c<h;c++)l[this.nodes[c]]=c;for(c=0,h=r.order;c<h;c++)for(g=this.nodes[c],C=i(g),this.starts[c]=B,d=0,p=C.length;d<p;d++)w=C[d],v=r.opposite(g,w),k=a(w,r.getEdgeAttributes(w)),this.neighborhood[B]=l[v],this.weights[B++]=k,this.outDegrees[c]+=k;this.starts[c]=s}qc.prototype.bounds=_s.prototype.bounds;qc.prototype.project=_s.prototype.project;qc.prototype.collect=_s.prototype.collect;qc.prototype.assign=_s.prototype.assign;T8.WeightedNeighborhoodIndex=qc});var yg=Pe((Khe,mg)=>{var HC=Pt(),jC=jc(),$C=M1().WeightedNeighborhoodIndex,qC={nodeCentralityAttribute:"eigenvectorCentrality",getEdgeWeight:"weight",maxIterations:100,tolerance:1e-6};function YC(r){for(var e=0,t=0,i=0,s=r.length;i<s;i++){var n=Math.abs(r[i]);n>e&&(t*=e/n*(e/n),e=n),t+=n===0&&e===0?0:n/e*(n/e)}return e===1/0?1:e*Math.sqrt(t)}function fg(r,e,t){if(!HC(e))throw new Error("graphology-metrics/centrality/eigenvector: the given graph is not a valid graphology instance.");t=jC(t,qC);var i=t.maxIterations,s=t.tolerance,n=e.order,o=new $C(e,t.getEdgeWeight),a,l,c,h,d=new Float64Array(e.order);for(a=0;a<n;a++)d[a]=1/n;for(var p=0,g=0,v,C,w,k=!1;p<i;){for(C=d,d=new Float64Array(C),a=0;a<n;a++)for(c=o.starts[a+1],l=o.starts[a];l<c;l++)v=o.neighborhood[l],h=o.weights[l],d[v]+=C[a]*h;for(w=YC(d),a=0;a<n;a++)d[a]/=w;for(g=0,a=0;a<n;a++)g+=Math.abs(d[a]-C[a]);if(g<n*s){k=!0;break}p++}if(!k)throw Error("graphology-metrics/centrality/eigenvector: failed to converge.");if(r){o.assign(t.nodeCentralityAttribute,d);return}return o.collect(d)}var gg=fg.bind(null,!1);gg.assign=fg.bind(null,!0);mg.exports=gg});var N1=Pe(Yc=>{var vg=Id(),xg=$c();function XC(r){return Array.isArray(r)||xg.isTypedArray(r)}function _8(r){if(typeof r.length=="number")return r.length;if(typeof r.size=="number")return r.size}function KC(r){var e=_8(r),t=typeof e=="number"?new Array(e):[],i=0;return vg(r,function(s){t[i++]=s}),t}function ZC(r){var e=_8(r),t=typeof e=="number"?xg.getPointerArray(e):Array,i=typeof e=="number"?new Array(e):[],s=typeof e=="number"?new t(e):[],n=0;return vg(r,function(o){i[n]=o,s[n]=n++}),[i,s]}Yc.isArrayLike=XC;Yc.guessLength=_8;Yc.toArray=KC;Yc.toArrayWithIndices=ZC});var P1=Pe((Qhe,bg)=>{var F8=N1(),Dg=Pc();function qt(r,e){if(arguments.length<2)throw new Error("mnemonist/fixed-deque: expecting an Array class and a capacity.");if(typeof e!="number"||e<=0)throw new Error("mnemonist/fixed-deque: `capacity` should be a positive number.");this.ArrayClass=r,this.capacity=e,this.items=new r(this.capacity),this.clear()}qt.prototype.clear=function(){this.start=0,this.size=0};qt.prototype.push=function(r){if(this.size===this.capacity)throw new Error("mnemonist/fixed-deque.push: deque capacity ("+this.capacity+") exceeded!");var e=this.start+this.size;return e>=this.capacity&&(e-=this.capacity),this.items[e]=r,++this.size};qt.prototype.unshift=function(r){if(this.size===this.capacity)throw new Error("mnemonist/fixed-deque.unshift: deque capacity ("+this.capacity+") exceeded!");var e=this.start-1;return this.start===0&&(e=this.capacity-1),this.items[e]=r,this.start=e,++this.size};qt.prototype.pop=function(){if(this.size!==0){this.size--;var r=this.start+this.size;return r>=this.capacity&&(r-=this.capacity),this.items[r]}};qt.prototype.shift=function(){if(this.size!==0){var r=this.start;return this.size--,this.start++,this.start===this.capacity&&(this.start=0),this.items[r]}};qt.prototype.peekFirst=function(){if(this.size!==0)return this.items[this.start]};qt.prototype.peekLast=function(){if(this.size!==0){var r=this.start+this.size-1;return r>=this.capacity&&(r-=this.capacity),this.items[r]}};qt.prototype.get=function(r){if(!(this.size===0||r>=this.capacity))return r=this.start+r,r>=this.capacity&&(r-=this.capacity),this.items[r]};qt.prototype.forEach=function(r,e){e=arguments.length>1?e:this;for(var t=this.capacity,i=this.size,s=this.start,n=0;n<i;)r.call(e,this.items[s],n,this),s++,n++,s===t&&(s=0)};qt.prototype.toArray=function(){var r=this.start+this.size;if(r<this.capacity)return this.items.slice(this.start,r);for(var e=new this.ArrayClass(this.size),t=this.capacity,i=this.size,s=this.start,n=0;n<i;)e[n]=this.items[s],s++,n++,s===t&&(s=0);return e};qt.prototype.values=function(){var r=this.items,e=this.capacity,t=this.size,i=this.start,s=0;return new Dg(function(){if(s>=t)return{done:!0};var n=r[i];return i++,s++,i===e&&(i=0),{value:n,done:!1}})};qt.prototype.entries=function(){var r=this.items,e=this.capacity,t=this.size,i=this.start,s=0;return new Dg(function(){if(s>=t)return{done:!0};var n=r[i];return i++,i===e&&(i=0),{value:[s++,n],done:!1}})};typeof Symbol<"u"&&(qt.prototype[Symbol.iterator]=qt.prototype.values);qt.prototype.inspect=function(){var r=this.toArray();return r.type=this.ArrayClass.name,r.capacity=this.capacity,Object.defineProperty(r,"constructor",{value:qt,enumerable:!1}),r};typeof Symbol<"u"&&(qt.prototype[Symbol.for("nodejs.util.inspect.custom")]=qt.prototype.inspect);qt.from=function(r,e,t){if(arguments.length<3&&(t=F8.guessLength(r),typeof t!="number"))throw new Error("mnemonist/fixed-deque.from: could not guess iterable length. Please provide desired capacity as last argument.");var i=new qt(e,t);if(F8.isArrayLike(r)){var s,n;for(s=0,n=r.length;s<n;s++)i.items[s]=r[s];return i.size=n,i}return F8.forEach(r,function(o){i.push(o)}),i};bg.exports=qt});var Sg=Pe((Jhe,Eg)=>{var QC=Pc(),JC=$c().getPointerArray;function xr(r){var e=JC(r);this.size=0,this.length=r,this.dense=new e(r),this.sparse=new e(r)}xr.prototype.clear=function(){this.size=0};xr.prototype.has=function(r){var e=this.sparse[r];return e<this.size&&this.dense[e]===r};xr.prototype.add=function(r){var e=this.sparse[r];return e<this.size&&this.dense[e]===r?this:(this.dense[this.size]=r,this.sparse[r]=this.size,this.size++,this)};xr.prototype.delete=function(r){var e=this.sparse[r];return e>=this.size||this.dense[e]!==r?!1:(e=this.dense[this.size-1],this.dense[this.sparse[r]]=e,this.sparse[e]=this.sparse[r],this.size--,!0)};xr.prototype.forEach=function(r,e){e=arguments.length>1?e:this;for(var t,i=0;i<this.size;i++)t=this.dense[i],r.call(e,t,t)};xr.prototype.values=function(){var r=this.size,e=this.dense,t=0;return new QC(function(){if(t<r){var i=e[t];return t++,{value:i}}return{done:!0}})};typeof Symbol<"u"&&(xr.prototype[Symbol.iterator]=xr.prototype.values);xr.prototype.inspect=function(){for(var r=new Set,e=0;e<this.size;e++)r.add(this.dense[e]);return Object.defineProperty(r,"constructor",{value:xr,enumerable:!1}),r.length=this.length,r};typeof Symbol<"u"&&(xr.prototype[Symbol.for("nodejs.util.inspect.custom")]=xr.prototype.inspect);Eg.exports=xr});var Fg=Pe((ede,_g)=>{var ew=Pt(),tw=jc(),rw=P1(),iw=Sg(),sw=M1().NeighborhoodIndex,nw={nodeCentralityAttribute:"closenessCentrality",wassermanFaust:!1};function Cg(r){this.index=new sw(r,"inbound"),this.queue=new rw(Array,r.order),this.seen=new iw(r.order)}Cg.prototype.fromNode=function(r){var e=this.index,t=this.queue,i=this.seen;i.clear(),t.clear(),i.add(r),t.push([r,0]);for(var s,n,o,a,l,c,h=0,d=0;t.size!==0;)for(s=t.shift(),n=s[0],o=s[1],o!==0&&(h+=o,d+=1),l=e.starts[n+1],a=e.starts[n];a<l;a++)c=e.neighborhood[a],!i.has(c)&&(i.add(c),t.push([c,o+1]));return[d,h]};function wg(r,e,t){if(!ew(e))throw new Error("graphology-metrics/centrality/closeness: the given graph is not a valid graphology instance.");t=tw(t,nw);var i=t.wassermanFaust,s=new Cg(e),n=e.order,o,a,l,c,h,d=new Float64Array(n);for(o=0;o<n;o++)a=s.fromNode(o),l=a[0],c=a[1],h=0,c>0&&n>1&&(h=l/c,i&&(h*=l/(n-1))),d[o]=h;return r?s.index.assign(t.nodeCentralityAttribute,d):s.index.collect(d)}var Tg=wg.bind(null,!1);Tg.assign=wg.bind(null,!0);_g.exports=Tg});var Ig=Pe((tde,kg)=>{var Ag=Pc(),A8=N1();function n0(r,e){if(arguments.length<2)throw new Error("mnemonist/fixed-stack: expecting an Array class and a capacity.");if(typeof e!="number"||e<=0)throw new Error("mnemonist/fixed-stack: `capacity` should be a positive number.");this.capacity=e,this.ArrayClass=r,this.items=new this.ArrayClass(this.capacity),this.clear()}n0.prototype.clear=function(){this.size=0};n0.prototype.push=function(r){if(this.size===this.capacity)throw new Error("mnemonist/fixed-stack.push: stack capacity ("+this.capacity+") exceeded!");return this.items[this.size++]=r,this.size};n0.prototype.pop=function(){if(this.size!==0)return this.items[--this.size]};n0.prototype.peek=function(){return this.items[this.size-1]};n0.prototype.forEach=function(r,e){e=arguments.length>1?e:this;for(var t=0,i=this.items.length;t<i;t++)r.call(e,this.items[i-t-1],t,this)};n0.prototype.toArray=function(){for(var r=new this.ArrayClass(this.size),e=this.size-1,t=this.size;t--;)r[t]=this.items[e-t];return r};n0.prototype.values=function(){var r=this.items,e=this.size,t=0;return new Ag(function(){if(t>=e)return{done:!0};var i=r[e-t-1];return t++,{value:i,done:!1}})};n0.prototype.entries=function(){var r=this.items,e=this.size,t=0;return new Ag(function(){if(t>=e)return{done:!0};var i=r[e-t-1];return{value:[t++,i],done:!1}})};typeof Symbol<"u"&&(n0.prototype[Symbol.iterator]=n0.prototype.values);n0.prototype.toString=function(){return this.toArray().join(",")};n0.prototype.toJSON=function(){return this.toArray()};n0.prototype.inspect=function(){var r=this.toArray();return r.type=this.ArrayClass.name,r.capacity=this.capacity,Object.defineProperty(r,"constructor",{value:n0,enumerable:!1}),r};typeof Symbol<"u"&&(n0.prototype[Symbol.for("nodejs.util.inspect.custom")]=n0.prototype.inspect);n0.from=function(r,e,t){if(arguments.length<3&&(t=A8.guessLength(r),typeof t!="number"))throw new Error("mnemonist/fixed-stack.from: could not guess iterable length. Please provide desired capacity as last argument.");var i=new n0(e,t);if(A8.isArrayLike(r)){var s,n;for(s=0,n=r.length;s<n;s++)i.items[s]=r[s];return i.size=n,i}return A8.forEach(r,function(o){i.push(o)}),i};kg.exports=n0});var Lg=Pe(Xc=>{var ow=function(r,e){return r<e?-1:r>e?1:0},aw=function(r,e){return r<e?1:r>e?-1:0};function lw(r){return function(e,t){return r(t,e)}}function cw(r){return r===2?function(e,t){return e[0]<t[0]?-1:e[0]>t[0]?1:e[1]<t[1]?-1:e[1]>t[1]?1:0}:function(e,t){for(var i=0;i<r;){if(e[i]<t[i])return-1;if(e[i]>t[i])return 1;i++}return 0}}Xc.DEFAULT_COMPARATOR=ow;Xc.DEFAULT_REVERSE_COMPARATOR=aw;Xc.reverseComparator=lw;Xc.createTupleComparator=cw});var Rg=Pe((ide,Bg)=>{var B1=Id(),Mg=Lg(),zi=N1(),O1=Mg.DEFAULT_COMPARATOR,k8=Mg.reverseComparator;function I8(r,e,t,i){for(var s=e[i],n,o;i>t;){if(n=i-1>>1,o=e[n],r(s,o)<0){e[i]=o,i=n;continue}break}e[i]=s}function Kc(r,e,t){for(var i=e.length,s=t,n=e[t],o=2*t+1,a;o<i;)a=o+1,a<i&&r(e[o],e[a])>=0&&(o=a),e[t]=e[o],t=o,o=2*t+1;e[t]=n,I8(r,e,s,t)}function Ng(r,e,t){e.push(t),I8(r,e,0,e.length-1)}function L8(r,e){var t=e.pop();if(e.length!==0){var i=e[0];return e[0]=t,Kc(r,e,0),i}return t}function Ya(r,e,t){if(e.length===0)throw new Error("mnemonist/heap.replace: cannot pop an empty heap.");var i=e[0];return e[0]=t,Kc(r,e,0),i}function Pg(r,e,t){var i;return e.length!==0&&r(e[0],t)<0&&(i=e[0],e[0]=t,t=i,Kc(r,e,0)),t}function fo(r,e){for(var t=e.length,i=t>>1,s=i;--s>=0;)Kc(r,e,s)}function M8(r,e){for(var t=e.length,i=0,s=new Array(t);i<t;)s[i++]=L8(r,e);return s}function uw(r,e,t){arguments.length===2&&(t=e,e=r,r=O1);var i=k8(r),s,n,o,a=1/0,l;if(e===1){if(zi.isArrayLike(t)){for(s=0,n=t.length;s<n;s++)o=t[s],(a===1/0||r(o,a)<0)&&(a=o);return l=new t.constructor(1),l[0]=a,l}return B1(t,function(h){(a===1/0||r(h,a)<0)&&(a=h)}),[a]}if(zi.isArrayLike(t)){if(e>=t.length)return t.slice().sort(r);for(l=t.slice(0,e),fo(i,l),s=e,n=t.length;s<n;s++)i(t[s],l[0])>0&&Ya(i,l,t[s]);return l.sort(r)}var c=zi.guessLength(t);return c!==null&&c<e&&(e=c),l=new Array(e),s=0,B1(t,function(h){s<e?l[s]=h:(s===e&&fo(i,l),i(h,l[0])>0&&Ya(i,l,h)),s++}),l.length>s&&(l.length=s),l.sort(r)}function hw(r,e,t){arguments.length===2&&(t=e,e=r,r=O1);var i=k8(r),s,n,o,a=-1/0,l;if(e===1){if(zi.isArrayLike(t)){for(s=0,n=t.length;s<n;s++)o=t[s],(a===-1/0||r(o,a)>0)&&(a=o);return l=new t.constructor(1),l[0]=a,l}return B1(t,function(h){(a===-1/0||r(h,a)>0)&&(a=h)}),[a]}if(zi.isArrayLike(t)){if(e>=t.length)return t.slice().sort(i);for(l=t.slice(0,e),fo(r,l),s=e,n=t.length;s<n;s++)r(t[s],l[0])>0&&Ya(r,l,t[s]);return l.sort(i)}var c=zi.guessLength(t);return c!==null&&c<e&&(e=c),l=new Array(e),s=0,B1(t,function(h){s<e?l[s]=h:(s===e&&fo(r,l),r(h,l[0])>0&&Ya(r,l,h)),s++}),l.length>s&&(l.length=s),l.sort(i)}function ht(r){if(this.clear(),this.comparator=r||O1,typeof this.comparator!="function")throw new Error("mnemonist/Heap.constructor: given comparator should be a function.")}ht.prototype.clear=function(){this.items=[],this.size=0};ht.prototype.push=function(r){return Ng(this.comparator,this.items,r),++this.size};ht.prototype.peek=function(){return this.items[0]};ht.prototype.pop=function(){return this.size!==0&&this.size--,L8(this.comparator,this.items)};ht.prototype.replace=function(r){return Ya(this.comparator,this.items,r)};ht.prototype.pushpop=function(r){return Pg(this.comparator,this.items,r)};ht.prototype.consume=function(){return this.size=0,M8(this.comparator,this.items)};ht.prototype.toArray=function(){return M8(this.comparator,this.items.slice())};ht.prototype.inspect=function(){var r=this.toArray();return Object.defineProperty(r,"constructor",{value:ht,enumerable:!1}),r};typeof Symbol<"u"&&(ht.prototype[Symbol.for("nodejs.util.inspect.custom")]=ht.prototype.inspect);function R1(r){if(this.clear(),this.comparator=r||O1,typeof this.comparator!="function")throw new Error("mnemonist/MaxHeap.constructor: given comparator should be a function.");this.comparator=k8(this.comparator)}R1.prototype=ht.prototype;ht.from=function(r,e){var t=new ht(e),i;return zi.isArrayLike(r)?i=r.slice():i=zi.toArray(r),fo(t.comparator,i),t.items=i,t.size=i.length,t};R1.from=function(r,e){var t=new R1(e),i;return zi.isArrayLike(r)?i=r.slice():i=zi.toArray(r),fo(t.comparator,i),t.items=i,t.size=i.length,t};ht.siftUp=Kc;ht.siftDown=I8;ht.push=Ng;ht.pop=L8;ht.replace=Ya;ht.pushpop=Pg;ht.heapify=fo;ht.consume=M8;ht.nsmallest=uw;ht.nlargest=hw;ht.MinHeap=ht;ht.MaxHeap=R1;Bg.exports=ht});var Vg=Pe(N8=>{var dw=P1(),Og=Ig(),pw=Rg(),Gg=$c(),Ug=M1(),fw=Ug.NeighborhoodIndex,gw=Ug.WeightedNeighborhoodIndex;N8.createUnweightedIndexedBrandes=function(e){var t=new fw(e),i=t.neighborhood,s=t.starts,n=e.order,o=new Og(Gg.getPointerArray(n),n),a=new Uint32Array(n),l=new Array(n),c=new Int32Array(n),h=new dw(Uint32Array,n),d=function(p){var g,v,C,w,k,B,L;for(B=0;B<n;B++)l[B]=[],a[B]=0,c[B]=-1;for(a[p]=1,c[p]=0,h.push(p);h.size!==0;)for(B=h.shift(),o.push(B),g=c[B],v=a[B],C=s[B],w=s[B+1],k=C;k<w;k++)L=i[k],c[L]===-1&&(h.push(L),c[L]=g+1),c[L]===g+1&&(a[L]+=v,l[L].push(B));return[o,l,a]};return d.index=t,d};function mw(r,e){return r[0]>e[0]?1:r[0]<e[0]?-1:r[1]>e[1]?1:r[1]<e[1]?-1:r[2]>e[2]?1:r[2]<e[2]?-1:r[3]>e[3]?1:r[3]<e[3]?-1:0}N8.createDijkstraIndexedBrandes=function(e,t){var i=new gw(e,t||"weight"),s=i.neighborhood,n=i.weights,o=i.starts,a=e.order,l=new Og(Gg.getPointerArray(a),a),c=new Uint32Array(a),h=new Array(a),d=new Float64Array(a),p=new Float64Array(a),g=new pw(mw),v=function(C){var w,k,B,L,T,W,j,I,R,z=0;for(I=0;I<a;I++)h[I]=[],c[I]=0,d[I]=-1,p[I]=-1;for(c[C]=1,p[C]=0,g.push([0,z++,C,C]);g.size!==0;)if(B=g.pop(),L=B[0],T=B[2],I=B[3],d[I]===-1)for(l.push(I),d[I]=L,c[I]+=c[T],w=o[I],k=o[I+1],j=w;j<k;j++)R=s[j],W=L+n[j],d[R]===-1&&(p[R]===-1||W<p[R])?(p[R]=W,g.push([W,z++,I,R]),c[R]=0,h[R]=[I]):W===p[R]&&(c[R]+=c[I],h[R].push(I));return[l,h,c]};return v.index=i,v}});var $g=Pe((nde,jg)=>{var yw=Pt(),zg=Vg(),vw=jc(),xw=zg.createUnweightedIndexedBrandes,Dw=zg.createDijkstraIndexedBrandes,bw={nodeCentralityAttribute:"betweennessCentrality",getEdgeWeight:"weight",normalized:!0};function Wg(r,e,t){if(!yw(e))throw new Error("graphology-centrality/beetweenness-centrality: the given graph is not a valid graphology instance.");t=vw(t,bw);var i=t.nodeCentralityAttribute,s=t.normalized,n=t.getEdgeWeight?Dw(e,t.getEdgeWeight):xw(e),o=e.order,a,l,c,h,d,p,g,v,C,w,k=new Float64Array(o),B=new Float64Array(o);for(p=0;p<o;p++){for(a=n(p),l=a[0],c=a[1],h=a[2],g=l.size;g--;)k[l.items[l.size-g]]=0;for(;l.size!==0;){for(w=l.pop(),d=(1+k[w])/h[w],g=0,v=c[w].length;g<v;g++)C=c[w][g],k[C]+=h[C]*d;w!==p&&(B[w]+=k[w])}}var L=null;if(s?L=o<=2?null:1/((o-1)*(o-2)):L=e.type==="undirected"?.5:null,L!==null)for(p=0;p<o;p++)B[p]*=L;return r?n.index.assign(i,B):n.index.collect(B)}var Hg=Wg.bind(null,!1);Hg.assign=Wg.bind(null,!0);jg.exports=Hg});var Zg=Pe((ode,Kg)=>{var Ew=jc(),Sw=Pt(),Cw=w8().createEdgeWeightGetter,ww={nodeAuthorityAttribute:"authority",nodeHubAttribute:"hub",getEdgeWeight:"weight",maxIterations:100,normalize:!0,tolerance:1e-8};function P8(r,e){var t=Object.create(null),i,s;for(i=0,s=r.length;i<s;i++)t[r[i]]=e;return t}function qg(r){var e=0;for(var t in r)e+=r[t];return e}function Yg(r,e,t){if(!Sw(e))throw new Error("graphology-hits: the given graph is not a valid graphology instance.");if(e.multi)throw new Error("graphology-hits: the HITS algorithm does not work with MultiGraphs.");t=Ew(t,ww);var i=Cw(t.getEdgeWeight).fromEntry,s=e.order,n=e.nodes(),o,a=P8(n,1/s),l={},c=!1,h,d,p,g,v,C,w,k,B,L,T,W,j;for(e.forEachEdge(function(I,R,z,U,q,re,$){l[I]=i(I,R,z,U,q,re,$)}),C=0;C<t.maxIterations;C++){for(h=a,a=P8(n,0),d=P8(n,0),k=0,w=0,T=0;T<s;T++)for(p=n[T],o=e.outboundEdges(p),W=0,j=o.length;W<j;W++)v=o[W],g=e.opposite(p,v),d[g]+=h[p]*l[v],d[g]>w&&(w=d[g]);for(T=0;T<s;T++)for(p=n[T],o=e.outboundEdges(p),W=0,j=o.length;W<j;W++)v=o[W],g=e.opposite(p,v),a[p]+=d[g]*l[v],a[g]>k&&(k=a[g]);L=1/k;for(p in a)a[p]*=L;L=1/w;for(p in d)d[p]*=L;B=0;for(p in a)B+=Math.abs(a[p]-h[p]);if(B<t.tolerance){c=!0;break}}if(!c)throw Error("graphology-metrics/centrality/hits: failed to converge.");if(t.normalize){L=1/qg(d);for(p in d)d[p]*=L;L=1/qg(a);for(p in a)a[p]*=L}if(r){e.updateEachNodeAttributes(function(I,R){return R[t.nodeAuthorityAttribute]=d[I],R[t.nodeHubAttribute]=a[I],R},{attributes:[t.nodeAuthorityAttribute,t.nodeHubAttribute]});return}return{hubs:a,authorities:d}}var Xg=Yg.bind(null,!1);Xg.assign=Yg.bind(null,!0);Kg.exports=Xg});var sm=Pe((Nde,im)=>{var _w=Pt(),Fw=Ld().singleSourceLength;im.exports=function(e,t){if(!_w(e))throw new Error("graphology-metrics/eccentricity: given graph is not a valid graphology instance.");if(e.size===0)return 1/0;var i=-1/0,s=Fw(e,t),n,o,a=0;for(n in s)o=s[n],o>i&&(i=o),a++;return a<e.order?1/0:i}});var lm=Pe(Wi=>{var hu=Pt(),Aw=v1().copyNode,kw=fn().copyEdge,G1=g8();function om(r,e){if(!hu(r))throw new Error("graphology-components: the given graph is not a valid graphology instance.");if(r.order){var t=new G1(r),i=t.push.bind(t);t.forEachNodeYetUnseen(function(s){var n=[];t.push(s);for(var o;t.size!==0;)o=t.pop(),n.push(o),r.forEachNeighbor(o,i);e(n)})}}function am(r,e){if(!hu(r))throw new Error("graphology-components: the given graph is not a valid graphology instance.");if(r.order){var t=new G1(r),i=t.push.bind(t);t.forEachNodeYetUnseen(function(s){var n=0;t.push(s);for(var o;t.size!==0;)o=t.pop(),n++,r.forEachNeighbor(o,i);e(n)})}}function Iw(r,e,t){if(!hu(r))throw new Error("graphology-components: the given graph is not a valid graphology instance.");if(!r.order)return;var i=new G1(r),s;function n(o,a,l,c,h,d,p){s===c&&(c=l),e(o,a,l,c,h,d,p)&&i.push(c)}i.forEachNodeYetUnseen(function(o){var a=0;for(i.push(o);i.size!==0;)s=i.pop(),a++,r.forEachEdge(s,n);t(a)})}function Lw(r){var e=0;return am(r,function(){e++}),e}function Mw(r){var e=[];return om(r,function(t){e.push(t)}),e}function R8(r){if(!hu(r))throw new Error("graphology-components: the given graph is not a valid graphology instance.");if(!r.order)return[];var e=new G1(r),t=e.push.bind(e),i=[],s;return e.forEachNodeYetUnseen(function(n){s=[],e.push(n);for(var o;e.size!==0;)o=e.pop(),s.push(o),r.forEachNeighbor(o,t);return s.length>i.length&&(i=s),i.length>e.countUnseenNodes()}),i}function Nw(r){var e=R8(r),t=r.nullCopy();return e.forEach(function(i){Aw(t,i,r.getNodeAttributes(i))}),r.forEachEdge(function(i,s,n,o,a,l,c){t.hasNode(n)&&kw(t,c,i,n,o,s)}),t}function Pw(r){var e=new Set(R8(r));r.forEachNode(function(t){e.has(t)||r.dropNode(t)})}function Bw(r){if(!hu(r))throw new Error("graphology-components: the given graph is not a valid graphology instance.");if(!r.order)return[];if(r.type==="undirected")throw new Error("graphology-components: the given graph is undirected");var e=r.nodes(),t=[],i,s;if(!r.size){for(i=0,s=e.length;i<s;i++)t.push([e[i]]);return t}var n=1,o=[],a=[],l=new Map,c=new Set,h,d,p,g=function(v){var C,w=r.outboundNeighbors(v),k;l.set(v,n++),o.push(v),a.push(v);for(var B=0,L=w.length;B<L;B++)if(C=w[B],l.has(C)){if(k=l.get(C),!c.has(C))for(;l.get(o[o.length-1])>k;)o.pop()}else g(C);if(l.get(o[o.length-1])===l.get(v)){h=[];do d=a.pop(),h.push(d),c.add(d);while(d!==v);t.push(h),o.pop()}};for(i=0,s=e.length;i<s;i++)p=e[i],c.has(p)||g(p);return t}Wi.forEachConnectedComponent=om;Wi.forEachConnectedComponentOrder=am;Wi.forEachConnectedComponentOrderWithEdgeFilter=Iw;Wi.countConnectedComponents=Lw;Wi.connectedComponents=Mw;Wi.largestConnectedComponent=R8;Wi.largestConnectedComponentSubgraph=Nw;Wi.cropToLargestConnectedComponent=Pw;Wi.stronglyConnectedComponents=Bw});var hm=Pe((a1e,um)=>{var Rw=Pt(),Ow=void 0,U1=0,cm=1;um.exports=function(e){if(!Rw(e))throw new Error("graphology-dag/has-cycle: the given graph is not a valid graphology instance.");if(e.size===0)return!1;if(e.selfLoopCount!==0)return!0;let t={},i=[];function s(n){let o=t[n];if(o===Ow)i.push(n);else if(o===U1)return!0;return!1}return e.someNode(n=>{if(t[n]===cm)return!1;for(i.push(n);i.length!==0;){let o=i[i.length-1],a=t[o];if(a!==U1){if(t[o]=U1,e.someOutboundNeighbor(o,s))return!0}else a===U1&&(i.pop(),t[o]=cm)}return!1})}});var pm=Pe((l1e,dm)=>{var Gw=Pt();dm.exports=function(e,t,i){if(!Gw(e))throw new Error("graphology-dag/will-create-cycle: the given graph is not a valid graphology instance.");if(t=""+t,i=""+i,t===i)return!0;if(!e.hasNode(t)||!e.hasNode(i)||e.hasDirectedEdge(t,i))return!1;if(e.hasDirectedEdge(i,t))return!0;let s=e.outNeighbors(i);function n(o){s.push(o)}for(;s.length!==0;){let o=s.pop();if(o===t)return!0;e.forEachOutNeighbor(o,n)}return!1}});var gm=Pe(du=>{var V1=Pt(),Uw=P1();function Vw(r,e){let t=0;return r.forEachInNeighbor(e,()=>{t++}),t}function O8(r,e){if(!V1(r))throw new Error("graphology-dag/topological-sort: the given graph is not a valid graphology instance.");if(r.type==="undirected"||r.undirectedSize!==0)throw new Error("graphology-dag/topological-sort: cannot work if graph is not directed.");if(r.order===0)return;let t=new Uw(Array,r.order),i={},s=0;r.forEachNode((a,l)=>{let c=r.multi?Vw(r,a):r.inDegree(a);c===0?t.push([a,l,0]):(i[a]=c,s+=c)});let n=0;function o(a,l){let c=--i[a];s--,c===0&&t.push([a,l,n+1]),i[a]=c}for(;t.size!==0;){let[a,l,c]=t.shift();n=c,e(a,l,c),r.forEachOutNeighbor(a,o)}if(s!==0)throw new Error("graphology-dag/topological-sort: given graph is not acyclic.")}function zw(r){if(!V1(r))throw new Error("graphology-dag/topological-sort: the given graph is not a valid graphology instance.");let e=new Array(r.order),t=0;return O8(r,i=>{e[t++]=i}),e}function fm(r,e){if(!V1(r))throw new Error("graphology-dag/topological-generations: the given graph is not a valid graphology instance.");if(r.order===0)return;let t=0,i=[];O8(r,(s,n,o)=>{o>t&&(e(i),t=o,i=[]),i.push(s)}),e(i)}function Ww(r){if(!V1(r))throw new Error("graphology-dag/topological-generations: the given graph is not a valid graphology instance.");let e=[];return fm(r,t=>{e.push(t)}),e}du.topologicalSort=zw;du.forEachNodeInTopologicalOrder=O8;du.topologicalGenerations=Ww;du.forEachTopologicalGeneration=fm});var mm=Pe(go=>{go.hasCycle=hm();go.willCreateCycle=pm();var z1=gm();go.forEachNodeInTopologicalOrder=z1.forEachNodeInTopologicalOrder;go.topologicalSort=z1.topologicalSort;go.topologicalGenerations=z1.topologicalGenerations;go.forEachTopologicalGeneration=z1.forEachTopologicalGeneration});var dv=Pe(Xi=>{"use strict";Object.defineProperty(Xi,"__esModule",{value:!0});require("obsidian");var Ms=class extends Error{},s6=class extends Ms{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}},n6=class extends Ms{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}},o6=class extends Ms{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}},Co=class extends Ms{},W9=class extends Ms{constructor(e){super(`Invalid unit ${e}`)}},or=class extends Ms{},qi=class extends Ms{constructor(){super("Zone is an abstract class")}},me="numeric",bi="short",Cr="long",H9={year:me,month:me,day:me},dy={year:me,month:bi,day:me},Hw={year:me,month:bi,day:me,weekday:bi},py={year:me,month:Cr,day:me},fy={year:me,month:Cr,day:me,weekday:Cr},gy={hour:me,minute:me},my={hour:me,minute:me,second:me},yy={hour:me,minute:me,second:me,timeZoneName:bi},vy={hour:me,minute:me,second:me,timeZoneName:Cr},xy={hour:me,minute:me,hourCycle:"h23"},Dy={hour:me,minute:me,second:me,hourCycle:"h23"},by={hour:me,minute:me,second:me,hourCycle:"h23",timeZoneName:bi},Ey={hour:me,minute:me,second:me,hourCycle:"h23",timeZoneName:Cr},Sy={year:me,month:me,day:me,hour:me,minute:me},Cy={year:me,month:me,day:me,hour:me,minute:me,second:me},wy={year:me,month:bi,day:me,hour:me,minute:me},Ty={year:me,month:bi,day:me,hour:me,minute:me,second:me},jw={year:me,month:bi,day:me,weekday:bi,hour:me,minute:me},_y={year:me,month:Cr,day:me,hour:me,minute:me,timeZoneName:bi},Fy={year:me,month:Cr,day:me,hour:me,minute:me,second:me,timeZoneName:bi},Ay={year:me,month:Cr,day:me,weekday:Cr,hour:me,minute:me,timeZoneName:Cr},ky={year:me,month:Cr,day:me,weekday:Cr,hour:me,minute:me,second:me,timeZoneName:Cr},_o=class{get type(){throw new qi}get name(){throw new qi}get ianaName(){return this.name}get isUniversal(){throw new qi}offsetName(e,t){throw new qi}formatOffset(e,t){throw new qi}offset(e){throw new qi}equals(e){throw new qi}get isValid(){throw new qi}},K8=null,j9=class r extends _o{static get instance(){return K8===null&&(K8=new r),K8}get type(){return"system"}get name(){return new Intl.DateTimeFormat().resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:i}){return Ly(e,t,i)}formatOffset(e,t){return ku(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return e.type==="system"}get isValid(){return!0}},V9={};function $w(r){return V9[r]||(V9[r]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:r,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),V9[r]}var qw={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};function Yw(r,e){let t=r.format(e).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+) (AD|BC),? (\d+):(\d+):(\d+)/.exec(t),[,s,n,o,a,l,c,h]=i;return[o,s,n,a,l,c,h]}function Xw(r,e){let t=r.formatToParts(e),i=[];for(let s=0;s<t.length;s++){let{type:n,value:o}=t[s],a=qw[n];n==="era"?i[a]=o:Ke(a)||(i[a]=parseInt(o,10))}return i}var P9={},_n=class r extends _o{static create(e){return P9[e]||(P9[e]=new r(e)),P9[e]}static resetCache(){P9={},V9={}}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch{return!1}}constructor(e){super(),this.zoneName=e,this.valid=r.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:i}){return Ly(e,t,i,this.name)}formatOffset(e,t){return ku(this.offset(e),t)}offset(e){let t=new Date(e);if(isNaN(t))return NaN;let i=$w(this.name),[s,n,o,a,l,c,h]=i.formatToParts?Xw(i,t):Yw(i,t);a==="BC"&&(s=-Math.abs(s)+1);let p=ep({year:s,month:n,day:o,hour:l===24?0:l,minute:c,second:h,millisecond:0}),g=+t,v=g%1e3;return g-=v>=0?v:1e3+v,(p-g)/(60*1e3)}equals(e){return e.type==="iana"&&e.name===this.name}get isValid(){return this.valid}},Pm={};function Kw(r,e={}){let t=JSON.stringify([r,e]),i=Pm[t];return i||(i=new Intl.ListFormat(r,e),Pm[t]=i),i}var a6={};function l6(r,e={}){let t=JSON.stringify([r,e]),i=a6[t];return i||(i=new Intl.DateTimeFormat(r,e),a6[t]=i),i}var c6={};function Zw(r,e={}){let t=JSON.stringify([r,e]),i=c6[t];return i||(i=new Intl.NumberFormat(r,e),c6[t]=i),i}var u6={};function Qw(r,e={}){let{base:t,...i}=e,s=JSON.stringify([r,i]),n=u6[s];return n||(n=new Intl.RelativeTimeFormat(r,e),u6[s]=n),n}var Fu=null;function Jw(){return Fu||(Fu=new Intl.DateTimeFormat().resolvedOptions().locale,Fu)}function eT(r){let e=r.indexOf("-x-");e!==-1&&(r=r.substring(0,e));let t=r.indexOf("-u-");if(t===-1)return[r];{let i,s;try{i=l6(r).resolvedOptions(),s=r}catch{let l=r.substring(0,t);i=l6(l).resolvedOptions(),s=l}let{numberingSystem:n,calendar:o}=i;return[s,n,o]}}function tT(r,e,t){return(t||e)&&(r.includes("-u-")||(r+="-u"),t&&(r+=`-ca-${t}`),e&&(r+=`-nu-${e}`)),r}function rT(r){let e=[];for(let t=1;t<=12;t++){let i=Ye.utc(2009,t,1);e.push(r(i))}return e}function iT(r){let e=[];for(let t=1;t<=7;t++){let i=Ye.utc(2016,11,13+t);e.push(r(i))}return e}function B9(r,e,t,i){let s=r.listingMode();return s==="error"?null:s==="en"?t(e):i(e)}function sT(r){return r.numberingSystem&&r.numberingSystem!=="latn"?!1:r.numberingSystem==="latn"||!r.locale||r.locale.startsWith("en")||new Intl.DateTimeFormat(r.intl).resolvedOptions().numberingSystem==="latn"}var h6=class{constructor(e,t,i){this.padTo=i.padTo||0,this.floor=i.floor||!1;let{padTo:s,floor:n,...o}=i;if(!t||Object.keys(o).length>0){let a={useGrouping:!1,...i};i.padTo>0&&(a.minimumIntegerDigits=i.padTo),this.inf=Zw(e,a)}}format(e){if(this.inf){let t=this.floor?Math.floor(e):e;return this.inf.format(t)}else{let t=this.floor?Math.floor(e):w6(e,3);return t0(t,this.padTo)}}},d6=class{constructor(e,t,i){this.opts=i,this.originalZone=void 0;let s;if(this.opts.timeZone)this.dt=e;else if(e.zone.type==="fixed"){let o=-1*(e.offset/60),a=o>=0?`Etc/GMT+${o}`:`Etc/GMT${o}`;e.offset!==0&&_n.create(a).valid?(s=a,this.dt=e):(s="UTC",this.dt=e.offset===0?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else e.zone.type==="system"?this.dt=e:e.zone.type==="iana"?(this.dt=e,s=e.zone.name):(s="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);let n={...this.opts};n.timeZone=n.timeZone||s,this.dtf=l6(t,n)}format(){return this.originalZone?this.formatToParts().map(({value:e})=>e).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){let e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map(t=>{if(t.type==="timeZoneName"){let i=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...t,value:i}}else return t}):e}resolvedOptions(){return this.dtf.resolvedOptions()}},p6=class{constructor(e,t,i){this.opts={style:"long",...i},!t&&Iy()&&(this.rtf=Qw(e,i))}format(e,t){return this.rtf?this.rtf.format(e,t):DT(t,e,this.opts.numeric,this.opts.style!=="long")}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}},Gt=class r{static fromOpts(e){return r.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)}static create(e,t,i,s=!1){let n=e||Ot.defaultLocale,o=n||(s?"en-US":Jw()),a=t||Ot.defaultNumberingSystem,l=i||Ot.defaultOutputCalendar;return new r(o,a,l,n)}static resetCache(){Fu=null,a6={},c6={},u6={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:i}={}){return r.create(e,t,i)}constructor(e,t,i,s){let[n,o,a]=eT(e);this.locale=n,this.numberingSystem=t||o||null,this.outputCalendar=i||a||null,this.intl=tT(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=s,this.fastNumbersCached=null}get fastNumbers(){return this.fastNumbersCached==null&&(this.fastNumbersCached=sT(this)),this.fastNumbersCached}listingMode(){let e=this.isEnglish(),t=(this.numberingSystem===null||this.numberingSystem==="latn")&&(this.outputCalendar===null||this.outputCalendar==="gregory");return e&&t?"en":"intl"}clone(e){return!e||Object.getOwnPropertyNames(e).length===0?this:r.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1)}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return B9(this,e,Py,()=>{let i=t?{month:e,day:"numeric"}:{month:e},s=t?"format":"standalone";return this.monthsCache[s][e]||(this.monthsCache[s][e]=rT(n=>this.extract(n,i,"month"))),this.monthsCache[s][e]})}weekdays(e,t=!1){return B9(this,e,Oy,()=>{let i=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},s=t?"format":"standalone";return this.weekdaysCache[s][e]||(this.weekdaysCache[s][e]=iT(n=>this.extract(n,i,"weekday"))),this.weekdaysCache[s][e]})}meridiems(){return B9(this,void 0,()=>Gy,()=>{if(!this.meridiemCache){let e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Ye.utc(2016,11,13,9),Ye.utc(2016,11,13,19)].map(t=>this.extract(t,e,"dayperiod"))}return this.meridiemCache})}eras(e){return B9(this,e,Uy,()=>{let t={era:e};return this.eraCache[e]||(this.eraCache[e]=[Ye.utc(-40,1,1),Ye.utc(2017,1,1)].map(i=>this.extract(i,t,"era"))),this.eraCache[e]})}extract(e,t,i){let s=this.dtFormatter(e,t),n=s.formatToParts(),o=n.find(a=>a.type.toLowerCase()===i);return o?o.value:null}numberFormatter(e={}){return new h6(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new d6(e,this.intl,t)}relFormatter(e={}){return new p6(this.intl,this.isEnglish(),e)}listFormatter(e={}){return Kw(this.intl,e)}isEnglish(){return this.locale==="en"||this.locale.toLowerCase()==="en-us"||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}},Z8=null,Kr=class r extends _o{static get utcInstance(){return Z8===null&&(Z8=new r(0)),Z8}static instance(e){return e===0?r.utcInstance:new r(e)}static parseSpecifier(e){if(e){let t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new r(tp(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return this.fixed===0?"UTC":`UTC${ku(this.fixed,"narrow")}`}get ianaName(){return this.fixed===0?"Etc/UTC":`Etc/GMT${ku(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return ku(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return e.type==="fixed"&&e.fixed===this.fixed}get isValid(){return!0}},f6=class extends _o{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}};function Tn(r,e){if(Ke(r)||r===null)return e;if(r instanceof _o)return r;if(nT(r)){let t=r.toLowerCase();return t==="default"?e:t==="local"||t==="system"?j9.instance:t==="utc"||t==="gmt"?Kr.utcInstance:Kr.parseSpecifier(t)||_n.create(r)}else return To(r)?Kr.instance(r):typeof r=="object"&&"offset"in r&&typeof r.offset=="function"?r:new f6(r)}var Bm=()=>Date.now(),Rm="system",Om=null,Gm=null,Um=null,Vm=60,zm,Ot=class{static get now(){return Bm}static set now(e){Bm=e}static set defaultZone(e){Rm=e}static get defaultZone(){return Tn(Rm,j9.instance)}static get defaultLocale(){return Om}static set defaultLocale(e){Om=e}static get defaultNumberingSystem(){return Gm}static set defaultNumberingSystem(e){Gm=e}static get defaultOutputCalendar(){return Um}static set defaultOutputCalendar(e){Um=e}static get twoDigitCutoffYear(){return Vm}static set twoDigitCutoffYear(e){Vm=e%100}static get throwOnInvalid(){return zm}static set throwOnInvalid(e){zm=e}static resetCaches(){Gt.resetCache(),_n.resetCache()}};function Ke(r){return typeof r>"u"}function To(r){return typeof r=="number"}function J9(r){return typeof r=="number"&&r%1===0}function nT(r){return typeof r=="string"}function oT(r){return Object.prototype.toString.call(r)==="[object Date]"}function Iy(){try{return typeof Intl<"u"&&!!Intl.RelativeTimeFormat}catch{return!1}}function aT(r){return Array.isArray(r)?r:[r]}function Wm(r,e,t){if(r.length!==0)return r.reduce((i,s)=>{let n=[e(s),s];return i&&t(i[0],n[0])===i[0]?i:n},null)[1]}function lT(r,e){return e.reduce((t,i)=>(t[i]=r[i],t),{})}function pl(r,e){return Object.prototype.hasOwnProperty.call(r,e)}function Ls(r,e,t){return J9(r)&&r>=e&&r<=t}function cT(r,e){return r-e*Math.floor(r/e)}function t0(r,e=2){let t=r<0,i;return t?i="-"+(""+-r).padStart(e,"0"):i=(""+r).padStart(e,"0"),i}function wn(r){if(!(Ke(r)||r===null||r===""))return parseInt(r,10)}function Eo(r){if(!(Ke(r)||r===null||r===""))return parseFloat(r)}function C6(r){if(!(Ke(r)||r===null||r==="")){let e=parseFloat("0."+r)*1e3;return Math.floor(e)}}function w6(r,e,t=!1){let i=10**e;return(t?Math.trunc:Math.round)(r*i)/i}function Mu(r){return r%4===0&&(r%100!==0||r%400===0)}function Au(r){return Mu(r)?366:365}function $9(r,e){let t=cT(e-1,12)+1,i=r+(e-t)/12;return t===2?Mu(i)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][t-1]}function ep(r){let e=Date.UTC(r.year,r.month-1,r.day,r.hour,r.minute,r.second,r.millisecond);return r.year<100&&r.year>=0&&(e=new Date(e),e.setUTCFullYear(r.year,r.month-1,r.day)),+e}function q9(r){let e=(r+Math.floor(r/4)-Math.floor(r/100)+Math.floor(r/400))%7,t=r-1,i=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7;return e===4||i===3?53:52}function g6(r){return r>99?r:r>Ot.twoDigitCutoffYear?1900+r:2e3+r}function Ly(r,e,t,i=null){let s=new Date(r),n={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(n.timeZone=i);let o={timeZoneName:e,...n},a=new Intl.DateTimeFormat(t,o).formatToParts(s).find(l=>l.type.toLowerCase()==="timezonename");return a?a.value:null}function tp(r,e){let t=parseInt(r,10);Number.isNaN(t)&&(t=0);let i=parseInt(e,10)||0,s=t<0||Object.is(t,-0)?-i:i;return t*60+s}function My(r){let e=Number(r);if(typeof r=="boolean"||r===""||Number.isNaN(e))throw new or(`Invalid unit value ${r}`);return e}function Y9(r,e){let t={};for(let i in r)if(pl(r,i)){let s=r[i];if(s==null)continue;t[e(i)]=My(s)}return t}function ku(r,e){let t=Math.trunc(Math.abs(r/60)),i=Math.trunc(Math.abs(r%60)),s=r>=0?"+":"-";switch(e){case"short":return`${s}${t0(t,2)}:${t0(i,2)}`;case"narrow":return`${s}${t}${i>0?`:${i}`:""}`;case"techie":return`${s}${t0(t,2)}${t0(i,2)}`;default:throw new RangeError(`Value format ${e} is out of range for property format`)}}function rp(r){return lT(r,["hour","minute","second","millisecond"])}var uT=["January","February","March","April","May","June","July","August","September","October","November","December"],Ny=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],hT=["J","F","M","A","M","J","J","A","S","O","N","D"];function Py(r){switch(r){case"narrow":return[...hT];case"short":return[...Ny];case"long":return[...uT];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var By=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],Ry=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],dT=["M","T","W","T","F","S","S"];function Oy(r){switch(r){case"narrow":return[...dT];case"short":return[...Ry];case"long":return[...By];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var Gy=["AM","PM"],pT=["Before Christ","Anno Domini"],fT=["BC","AD"],gT=["B","A"];function Uy(r){switch(r){case"narrow":return[...gT];case"short":return[...fT];case"long":return[...pT];default:return null}}function mT(r){return Gy[r.hour<12?0:1]}function yT(r,e){return Oy(e)[r.weekday-1]}function vT(r,e){return Py(e)[r.month-1]}function xT(r,e){return Uy(e)[r.year<0?0:1]}function DT(r,e,t="always",i=!1){let s={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},n=["hours","minutes","seconds"].indexOf(r)===-1;if(t==="auto"&&n){let d=r==="days";switch(e){case 1:return d?"tomorrow":`next ${s[r][0]}`;case-1:return d?"yesterday":`last ${s[r][0]}`;case 0:return d?"today":`this ${s[r][0]}`}}let o=Object.is(e,-0)||e<0,a=Math.abs(e),l=a===1,c=s[r],h=i?l?c[1]:c[2]||c[1]:l?s[r][0]:r;return o?`${a} ${h} ago`:`in ${a} ${h}`}function Hm(r,e){let t="";for(let i of r)i.literal?t+=i.val:t+=e(i.val);return t}var bT={D:H9,DD:dy,DDD:py,DDDD:fy,t:gy,tt:my,ttt:yy,tttt:vy,T:xy,TT:Dy,TTT:by,TTTT:Ey,f:Sy,ff:wy,fff:_y,ffff:Ay,F:Cy,FF:Ty,FFF:Fy,FFFF:ky},Er=class r{static create(e,t={}){return new r(e,t)}static parseFormat(e){let t=null,i="",s=!1,n=[];for(let o=0;o<e.length;o++){let a=e.charAt(o);a==="'"?(i.length>0&&n.push({literal:s||/^\s+$/.test(i),val:i}),t=null,i="",s=!s):s||a===t?i+=a:(i.length>0&&n.push({literal:/^\s+$/.test(i),val:i}),i=a,t=a)}return i.length>0&&n.push({literal:s||/^\s+$/.test(i),val:i}),n}static macroTokenToFormatOpts(e){return bT[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){return this.systemLoc===null&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0){if(this.opts.forceSimple)return t0(e,t);let i={...this.opts};return t>0&&(i.padTo=t),this.loc.numberFormatter(i).format(e)}formatDateTimeFromString(e,t){let i=this.loc.listingMode()==="en",s=this.loc.outputCalendar&&this.loc.outputCalendar!=="gregory",n=(g,v)=>this.loc.extract(e,g,v),o=g=>e.isOffsetFixed&&e.offset===0&&g.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,g.format):"",a=()=>i?mT(e):n({hour:"numeric",hourCycle:"h12"},"dayperiod"),l=(g,v)=>i?vT(e,g):n(v?{month:g}:{month:g,day:"numeric"},"month"),c=(g,v)=>i?yT(e,g):n(v?{weekday:g}:{weekday:g,month:"long",day:"numeric"},"weekday"),h=g=>{let v=r.macroTokenToFormatOpts(g);return v?this.formatWithSystemDefault(e,v):g},d=g=>i?xT(e,g):n({era:g},"era"),p=g=>{switch(g){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12===0?12:e.hour%12);case"hh":return this.num(e.hour%12===0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return o({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return o({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return o({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return a();case"d":return s?n({day:"numeric"},"day"):this.num(e.day);case"dd":return s?n({day:"2-digit"},"day"):this.num(e.day,2);case"c":return this.num(e.weekday);case"ccc":return c("short",!0);case"cccc":return c("long",!0);case"ccccc":return c("narrow",!0);case"E":return this.num(e.weekday);case"EEE":return c("short",!1);case"EEEE":return c("long",!1);case"EEEEE":return c("narrow",!1);case"L":return s?n({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return s?n({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return l("short",!0);case"LLLL":return l("long",!0);case"LLLLL":return l("narrow",!0);case"M":return s?n({month:"numeric"},"month"):this.num(e.month);case"MM":return s?n({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return l("short",!1);case"MMMM":return l("long",!1);case"MMMMM":return l("narrow",!1);case"y":return s?n({year:"numeric"},"year"):this.num(e.year);case"yy":return s?n({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return s?n({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return s?n({year:"numeric"},"year"):this.num(e.year,6);case"G":return d("short");case"GG":return d("long");case"GGGGG":return d("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return h(g)}};return Hm(r.parseFormat(t),p)}formatDurationFromString(e,t){let i=l=>{switch(l[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},s=l=>c=>{let h=i(c);return h?this.num(l.get(h),c.length):c},n=r.parseFormat(t),o=n.reduce((l,{literal:c,val:h})=>c?l:l.concat(h),[]),a=e.shiftTo(...o.map(i).filter(l=>l));return Hm(n,s(a))}},Sr=class{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}},Vy=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function fl(...r){let e=r.reduce((t,i)=>t+i.source,"");return RegExp(`^${e}$`)}function gl(...r){return e=>r.reduce(([t,i,s],n)=>{let[o,a,l]=n(e,s);return[{...t,...o},a||i,l]},[{},null,1]).slice(0,2)}function ml(r,...e){if(r==null)return[null,null];for(let[t,i]of e){let s=t.exec(r);if(s)return i(s)}return[null,null]}function zy(...r){return(e,t)=>{let i={},s;for(s=0;s<r.length;s++)i[r[s]]=wn(e[t+s]);return[i,null,t+s]}}var Wy=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,ET=`(?:${Wy.source}?(?:\\[(${Vy.source})\\])?)?`,T6=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,Hy=RegExp(`${T6.source}${ET}`),_6=RegExp(`(?:T${Hy.source})?`),ST=/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,CT=/(\d{4})-?W(\d\d)(?:-?(\d))?/,wT=/(\d{4})-?(\d{3})/,TT=zy("weekYear","weekNumber","weekDay"),_T=zy("year","ordinal"),FT=/(\d{4})-(\d\d)-(\d\d)/,jy=RegExp(`${T6.source} ?(?:${Wy.source}|(${Vy.source}))?`),AT=RegExp(`(?: ${jy.source})?`);function hl(r,e,t){let i=r[e];return Ke(i)?t:wn(i)}function kT(r,e){return[{year:hl(r,e),month:hl(r,e+1,1),day:hl(r,e+2,1)},null,e+3]}function yl(r,e){return[{hours:hl(r,e,0),minutes:hl(r,e+1,0),seconds:hl(r,e+2,0),milliseconds:C6(r[e+3])},null,e+4]}function Nu(r,e){let t=!r[e]&&!r[e+1],i=tp(r[e+1],r[e+2]),s=t?null:Kr.instance(i);return[{},s,e+3]}function Pu(r,e){let t=r[e]?_n.create(r[e]):null;return[{},t,e+1]}var IT=RegExp(`^T?${T6.source}$`),LT=/^-?P(?:(?:(-?\d{1,20}(?:\.\d{1,20})?)Y)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20}(?:\.\d{1,20})?)W)?(?:(-?\d{1,20}(?:\.\d{1,20})?)D)?(?:T(?:(-?\d{1,20}(?:\.\d{1,20})?)H)?(?:(-?\d{1,20}(?:\.\d{1,20})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,20}))?S)?)?)$/;function MT(r){let[e,t,i,s,n,o,a,l,c]=r,h=e[0]==="-",d=l&&l[0]==="-",p=(g,v=!1)=>g!==void 0&&(v||g&&h)?-g:g;return[{years:p(Eo(t)),months:p(Eo(i)),weeks:p(Eo(s)),days:p(Eo(n)),hours:p(Eo(o)),minutes:p(Eo(a)),seconds:p(Eo(l),l==="-0"),milliseconds:p(C6(c),d)}]}var NT={GMT:0,EDT:-4*60,EST:-5*60,CDT:-5*60,CST:-6*60,MDT:-6*60,MST:-7*60,PDT:-7*60,PST:-8*60};function F6(r,e,t,i,s,n,o){let a={year:e.length===2?g6(wn(e)):wn(e),month:Ny.indexOf(t)+1,day:wn(i),hour:wn(s),minute:wn(n)};return o&&(a.second=wn(o)),r&&(a.weekday=r.length>3?By.indexOf(r)+1:Ry.indexOf(r)+1),a}var PT=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function BT(r){let[,e,t,i,s,n,o,a,l,c,h,d]=r,p=F6(e,s,i,t,n,o,a),g;return l?g=NT[l]:c?g=0:g=tp(h,d),[p,new Kr(g)]}function RT(r){return r.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}var OT=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,GT=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,UT=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function jm(r){let[,e,t,i,s,n,o,a]=r;return[F6(e,s,i,t,n,o,a),Kr.utcInstance]}function VT(r){let[,e,t,i,s,n,o,a]=r;return[F6(e,a,t,i,s,n,o),Kr.utcInstance]}var zT=fl(ST,_6),WT=fl(CT,_6),HT=fl(wT,_6),jT=fl(Hy),$y=gl(kT,yl,Nu,Pu),$T=gl(TT,yl,Nu,Pu),qT=gl(_T,yl,Nu,Pu),YT=gl(yl,Nu,Pu);function XT(r){return ml(r,[zT,$y],[WT,$T],[HT,qT],[jT,YT])}function KT(r){return ml(RT(r),[PT,BT])}function ZT(r){return ml(r,[OT,jm],[GT,jm],[UT,VT])}function QT(r){return ml(r,[LT,MT])}var JT=gl(yl);function e_(r){return ml(r,[IT,JT])}var t_=fl(FT,AT),r_=fl(jy),i_=gl(yl,Nu,Pu);function s_(r){return ml(r,[t_,$y],[r_,i_])}var $m="Invalid Duration",qy={weeks:{days:7,hours:7*24,minutes:7*24*60,seconds:7*24*60*60,milliseconds:7*24*60*60*1e3},days:{hours:24,minutes:24*60,seconds:24*60*60,milliseconds:24*60*60*1e3},hours:{minutes:60,seconds:60*60,milliseconds:60*60*1e3},minutes:{seconds:60,milliseconds:60*1e3},seconds:{milliseconds:1e3}},n_={years:{quarters:4,months:12,weeks:52,days:365,hours:365*24,minutes:365*24*60,seconds:365*24*60*60,milliseconds:365*24*60*60*1e3},quarters:{months:3,weeks:13,days:91,hours:91*24,minutes:91*24*60,seconds:91*24*60*60,milliseconds:91*24*60*60*1e3},months:{weeks:4,days:30,hours:30*24,minutes:30*24*60,seconds:30*24*60*60,milliseconds:30*24*60*60*1e3},...qy},Yr=146097/400,ll=146097/4800,o_={years:{quarters:4,months:12,weeks:Yr/7,days:Yr,hours:Yr*24,minutes:Yr*24*60,seconds:Yr*24*60*60,milliseconds:Yr*24*60*60*1e3},quarters:{months:3,weeks:Yr/28,days:Yr/4,hours:Yr*24/4,minutes:Yr*24*60/4,seconds:Yr*24*60*60/4,milliseconds:Yr*24*60*60*1e3/4},months:{weeks:ll/7,days:ll,hours:ll*24,minutes:ll*24*60,seconds:ll*24*60*60,milliseconds:ll*24*60*60*1e3},...qy},wo=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],a_=wo.slice(0).reverse();function Cn(r,e,t=!1){let i={values:t?e.values:{...r.values,...e.values||{}},loc:r.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||r.conversionAccuracy,matrix:e.matrix||r.matrix};return new Be(i)}function Yy(r,e){let t=e.milliseconds??0;for(let i of a_.slice(1))e[i]&&(t+=e[i]*r[i].milliseconds);return t}function qm(r,e){let t=Yy(r,e)<0?-1:1;wo.reduceRight((i,s)=>{if(Ke(e[s]))return i;if(i){let n=e[i]*t,o=r[s][i],a=Math.floor(n/o);e[s]+=a*t,e[i]-=a*o*t}return s},null),wo.reduce((i,s)=>{if(Ke(e[s]))return i;if(i){let n=e[i]%1;e[i]-=n,e[s]+=n*r[i][s]}return s},null)}function l_(r){let e={};for(let[t,i]of Object.entries(r))i!==0&&(e[t]=i);return e}var Be=class r{constructor(e){let t=e.conversionAccuracy==="longterm"||!1,i=t?o_:n_;e.matrix&&(i=e.matrix),this.values=e.values,this.loc=e.loc||Gt.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=i,this.isLuxonDuration=!0}static fromMillis(e,t){return r.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(e==null||typeof e!="object")throw new or(`Duration.fromObject: argument expected to be an object, got ${e===null?"null":typeof e}`);return new r({values:Y9(e,r.normalizeUnit),loc:Gt.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(To(e))return r.fromMillis(e);if(r.isDuration(e))return e;if(typeof e=="object")return r.fromObject(e);throw new or(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){let[i]=QT(e);return i?r.fromObject(i,t):r.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){let[i]=e_(e);return i?r.fromObject(i,t):r.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new or("need to specify a reason the Duration is invalid");let i=e instanceof Sr?e:new Sr(e,t);if(Ot.throwOnInvalid)throw new o6(i);return new r({invalid:i})}static normalizeUnit(e){let t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e&&e.toLowerCase()];if(!t)throw new W9(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){let i={...t,floor:t.round!==!1&&t.floor!==!1};return this.isValid?Er.create(this.loc,i).formatDurationFromString(this,e):$m}toHuman(e={}){if(!this.isValid)return $m;let t=wo.map(i=>{let s=this.values[i];return Ke(s)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:i.slice(0,-1)}).format(s)}).filter(i=>i);return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return this.years!==0&&(e+=this.years+"Y"),(this.months!==0||this.quarters!==0)&&(e+=this.months+this.quarters*3+"M"),this.weeks!==0&&(e+=this.weeks+"W"),this.days!==0&&(e+=this.days+"D"),(this.hours!==0||this.minutes!==0||this.seconds!==0||this.milliseconds!==0)&&(e+="T"),this.hours!==0&&(e+=this.hours+"H"),this.minutes!==0&&(e+=this.minutes+"M"),(this.seconds!==0||this.milliseconds!==0)&&(e+=w6(this.seconds+this.milliseconds/1e3,3)+"S"),e==="P"&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;let t=this.toMillis();return t<0||t>=864e5?null:(e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1},Ye.fromMillis(t,{zone:"UTC"}).toISOTime(e))}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.isValid?Yy(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;let t=r.fromDurationLike(e),i={};for(let s of wo)(pl(t.values,s)||pl(this.values,s))&&(i[s]=t.get(s)+this.get(s));return Cn(this,{values:i},!0)}minus(e){if(!this.isValid)return this;let t=r.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;let t={};for(let i of Object.keys(this.values))t[i]=My(e(this.values[i],i));return Cn(this,{values:t},!0)}get(e){return this[r.normalizeUnit(e)]}set(e){if(!this.isValid)return this;let t={...this.values,...Y9(e,r.normalizeUnit)};return Cn(this,{values:t})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:i,matrix:s}={}){let o={loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:s,conversionAccuracy:i};return Cn(this,o)}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;let e=this.toObject();return qm(this.matrix,e),Cn(this,{values:e},!0)}rescale(){if(!this.isValid)return this;let e=l_(this.normalize().shiftToAll().toObject());return Cn(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(e.length===0)return this;e=e.map(o=>r.normalizeUnit(o));let t={},i={},s=this.toObject(),n;for(let o of wo)if(e.indexOf(o)>=0){n=o;let a=0;for(let c in i)a+=this.matrix[c][o]*i[c],i[c]=0;To(s[o])&&(a+=s[o]);let l=Math.trunc(a);t[o]=l,i[o]=(a*1e3-l*1e3)/1e3}else To(s[o])&&(i[o]=s[o]);for(let o in i)i[o]!==0&&(t[n]+=o===n?i[o]:i[o]/this.matrix[n][o]);return qm(this.matrix,t),Cn(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;let e={};for(let t of Object.keys(this.values))e[t]=this.values[t]===0?0:-this.values[t];return Cn(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid||!this.loc.equals(e.loc))return!1;function t(i,s){return i===void 0||i===0?s===void 0||s===0:i===s}for(let i of wo)if(!t(this.values[i],e.values[i]))return!1;return!0}},cl="Invalid Interval";function c_(r,e){return!r||!r.isValid?dl.invalid("missing or invalid start"):!e||!e.isValid?dl.invalid("missing or invalid end"):e<r?dl.invalid("end before start",`The end of an interval must be after its start, but you had start=${r.toISO()} and end=${e.toISO()}`):null}var dl=class r{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new or("need to specify a reason the Interval is invalid");let i=e instanceof Sr?e:new Sr(e,t);if(Ot.throwOnInvalid)throw new n6(i);return new r({invalid:i})}static fromDateTimes(e,t){let i=Tu(e),s=Tu(t),n=c_(i,s);return n??new r({start:i,end:s})}static after(e,t){let i=Be.fromDurationLike(t),s=Tu(e);return r.fromDateTimes(s,s.plus(i))}static before(e,t){let i=Be.fromDurationLike(t),s=Tu(e);return r.fromDateTimes(s.minus(i),s)}static fromISO(e,t){let[i,s]=(e||"").split("/",2);if(i&&s){let n,o;try{n=Ye.fromISO(i,t),o=n.isValid}catch{o=!1}let a,l;try{a=Ye.fromISO(s,t),l=a.isValid}catch{l=!1}if(o&&l)return r.fromDateTimes(n,a);if(o){let c=Be.fromISO(s,t);if(c.isValid)return r.after(n,c)}else if(l){let c=Be.fromISO(i,t);if(c.isValid)return r.before(a,c)}}return r.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static isInterval(e){return e&&e.isLuxonInterval||!1}get start(){return this.isValid?this.s:null}get end(){return this.isValid?this.e:null}get isValid(){return this.invalidReason===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}length(e="milliseconds"){return this.isValid?this.toDuration(e).get(e):NaN}count(e="milliseconds"){if(!this.isValid)return NaN;let t=this.start.startOf(e),i=this.end.startOf(e);return Math.floor(i.diff(t,e).get(e))+(i.valueOf()!==this.end.valueOf())}hasSame(e){return this.isValid?this.isEmpty()||this.e.minus(1).hasSame(this.s,e):!1}isEmpty(){return this.s.valueOf()===this.e.valueOf()}isAfter(e){return this.isValid?this.s>e:!1}isBefore(e){return this.isValid?this.e<=e:!1}contains(e){return this.isValid?this.s<=e&&this.e>e:!1}set({start:e,end:t}={}){return this.isValid?r.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];let t=e.map(Tu).filter(o=>this.contains(o)).sort(),i=[],{s}=this,n=0;for(;s<this.e;){let o=t[n]||this.e,a=+o>+this.e?this.e:o;i.push(r.fromDateTimes(s,a)),s=a,n+=1}return i}splitBy(e){let t=Be.fromDurationLike(e);if(!this.isValid||!t.isValid||t.as("milliseconds")===0)return[];let{s:i}=this,s=1,n,o=[];for(;i<this.e;){let a=this.start.plus(t.mapUnits(l=>l*s));n=+a>+this.e?this.e:a,o.push(r.fromDateTimes(i,n)),i=n,s+=1}return o}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s<e.e}abutsStart(e){return this.isValid?+this.e==+e.s:!1}abutsEnd(e){return this.isValid?+e.e==+this.s:!1}engulfs(e){return this.isValid?this.s<=e.s&&this.e>=e.e:!1}equals(e){return!this.isValid||!e.isValid?!1:this.s.equals(e.s)&&this.e.equals(e.e)}intersection(e){if(!this.isValid)return this;let t=this.s>e.s?this.s:e.s,i=this.e<e.e?this.e:e.e;return t>=i?null:r.fromDateTimes(t,i)}union(e){if(!this.isValid)return this;let t=this.s<e.s?this.s:e.s,i=this.e>e.e?this.e:e.e;return r.fromDateTimes(t,i)}static merge(e){let[t,i]=e.sort((s,n)=>s.s-n.s).reduce(([s,n],o)=>n?n.overlaps(o)||n.abutsStart(o)?[s,n.union(o)]:[s.concat([n]),o]:[s,o],[[],null]);return i&&t.push(i),t}static xor(e){let t=null,i=0,s=[],n=e.map(l=>[{time:l.s,type:"s"},{time:l.e,type:"e"}]),o=Array.prototype.concat(...n),a=o.sort((l,c)=>l.time-c.time);for(let l of a)i+=l.type==="s"?1:-1,i===1?t=l.time:(t&&+t!=+l.time&&s.push(r.fromDateTimes(t,l.time)),t=null);return r.merge(s)}difference(...e){return r.xor([this].concat(e)).map(t=>this.intersection(t)).filter(t=>t&&!t.isEmpty())}toString(){return this.isValid?`[${this.s.toISO()} \u2013 ${this.e.toISO()})`:cl}toLocaleString(e=H9,t={}){return this.isValid?Er.create(this.s.loc.clone(t),e).formatInterval(this):cl}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:cl}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:cl}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:cl}toFormat(e,{separator:t=" \u2013 "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:cl}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):Be.invalid(this.invalidReason)}mapEndpoints(e){return r.fromDateTimes(e(this.s),e(this.e))}},ul=class{static hasDST(e=Ot.defaultZone){let t=Ye.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return _n.isValidZone(e)}static normalizeZone(e){return Tn(e,Ot.defaultZone)}static months(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:n="gregory"}={}){return(s||Gt.create(t,i,n)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null,outputCalendar:n="gregory"}={}){return(s||Gt.create(t,i,n)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||Gt.create(t,i,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:i=null,locObj:s=null}={}){return(s||Gt.create(t,i,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return Gt.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return Gt.create(t,null,"gregory").eras(e)}static features(){return{relative:Iy()}}};function Ym(r,e){let t=s=>s.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),i=t(e)-t(r);return Math.floor(Be.fromMillis(i).as("days"))}function u_(r,e,t){let i=[["years",(l,c)=>c.year-l.year],["quarters",(l,c)=>c.quarter-l.quarter+(c.year-l.year)*4],["months",(l,c)=>c.month-l.month+(c.year-l.year)*12],["weeks",(l,c)=>{let h=Ym(l,c);return(h-h%7)/7}],["days",Ym]],s={},n=r,o,a;for(let[l,c]of i)t.indexOf(l)>=0&&(o=l,s[l]=c(r,e),a=n.plus(s),a>e?(s[l]--,r=n.plus(s),r>e&&(a=r,s[l]--,r=n.plus(s))):r=a);return[r,s,a,o]}function h_(r,e,t,i){let[s,n,o,a]=u_(r,e,t),l=e-s,c=t.filter(d=>["hours","minutes","seconds","milliseconds"].indexOf(d)>=0);c.length===0&&(o<e&&(o=s.plus({[a]:1})),o!==s&&(n[a]=(n[a]||0)+l/(o-s)));let h=Be.fromObject(n,i);return c.length>0?Be.fromMillis(l,i).shiftTo(...c).plus(h):h}var A6={arab:"[\u0660-\u0669]",arabext:"[\u06F0-\u06F9]",bali:"[\u1B50-\u1B59]",beng:"[\u09E6-\u09EF]",deva:"[\u0966-\u096F]",fullwide:"[\uFF10-\uFF19]",gujr:"[\u0AE6-\u0AEF]",hanidec:"[\u3007|\u4E00|\u4E8C|\u4E09|\u56DB|\u4E94|\u516D|\u4E03|\u516B|\u4E5D]",khmr:"[\u17E0-\u17E9]",knda:"[\u0CE6-\u0CEF]",laoo:"[\u0ED0-\u0ED9]",limb:"[\u1946-\u194F]",mlym:"[\u0D66-\u0D6F]",mong:"[\u1810-\u1819]",mymr:"[\u1040-\u1049]",orya:"[\u0B66-\u0B6F]",tamldec:"[\u0BE6-\u0BEF]",telu:"[\u0C66-\u0C6F]",thai:"[\u0E50-\u0E59]",tibt:"[\u0F20-\u0F29]",latn:"\\d"},Xm={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},d_=A6.hanidec.replace(/[\[|\]]/g,"").split("");function p_(r){let e=parseInt(r,10);if(isNaN(e)){e="";for(let t=0;t<r.length;t++){let i=r.charCodeAt(t);if(r[t].search(A6.hanidec)!==-1)e+=d_.indexOf(r[t]);else for(let s in Xm){let[n,o]=Xm[s];i>=n&&i<=o&&(e+=i-n)}}return parseInt(e,10)}else return e}function vi({numberingSystem:r},e=""){return new RegExp(`${A6[r||"latn"]}${e}`)}var f_="missing Intl.DateTimeFormat.formatToParts support";function st(r,e=t=>t){return{regex:r,deser:([t])=>e(p_(t))}}var g_="\xA0",Xy=`[ ${g_}]`,Ky=new RegExp(Xy,"g");function m_(r){return r.replace(/\./g,"\\.?").replace(Ky,Xy)}function Km(r){return r.replace(/\./g,"").replace(Ky," ").toLowerCase()}function xi(r,e){return r===null?null:{regex:RegExp(r.map(m_).join("|")),deser:([t])=>r.findIndex(i=>Km(t)===Km(i))+e}}function Zm(r,e){return{regex:r,deser:([,t,i])=>tp(t,i),groups:e}}function R9(r){return{regex:r,deser:([e])=>e}}function y_(r){return r.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&")}function v_(r,e){let t=vi(e),i=vi(e,"{2}"),s=vi(e,"{3}"),n=vi(e,"{4}"),o=vi(e,"{6}"),a=vi(e,"{1,2}"),l=vi(e,"{1,3}"),c=vi(e,"{1,6}"),h=vi(e,"{1,9}"),d=vi(e,"{2,4}"),p=vi(e,"{4,6}"),g=w=>({regex:RegExp(y_(w.val)),deser:([k])=>k,literal:!0}),C=(w=>{if(r.literal)return g(w);switch(w.val){case"G":return xi(e.eras("short"),0);case"GG":return xi(e.eras("long"),0);case"y":return st(c);case"yy":return st(d,g6);case"yyyy":return st(n);case"yyyyy":return st(p);case"yyyyyy":return st(o);case"M":return st(a);case"MM":return st(i);case"MMM":return xi(e.months("short",!0),1);case"MMMM":return xi(e.months("long",!0),1);case"L":return st(a);case"LL":return st(i);case"LLL":return xi(e.months("short",!1),1);case"LLLL":return xi(e.months("long",!1),1);case"d":return st(a);case"dd":return st(i);case"o":return st(l);case"ooo":return st(s);case"HH":return st(i);case"H":return st(a);case"hh":return st(i);case"h":return st(a);case"mm":return st(i);case"m":return st(a);case"q":return st(a);case"qq":return st(i);case"s":return st(a);case"ss":return st(i);case"S":return st(l);case"SSS":return st(s);case"u":return R9(h);case"uu":return R9(a);case"uuu":return st(t);case"a":return xi(e.meridiems(),0);case"kkkk":return st(n);case"kk":return st(d,g6);case"W":return st(a);case"WW":return st(i);case"E":case"c":return st(t);case"EEE":return xi(e.weekdays("short",!1),1);case"EEEE":return xi(e.weekdays("long",!1),1);case"ccc":return xi(e.weekdays("short",!0),1);case"cccc":return xi(e.weekdays("long",!0),1);case"Z":case"ZZ":return Zm(new RegExp(`([+-]${a.source})(?::(${i.source}))?`),2);case"ZZZ":return Zm(new RegExp(`([+-]${a.source})(${i.source})?`),2);case"z":return R9(/[a-z_+-/]{1,256}?/i);case" ":return R9(/[^\S\n\r]/);default:return g(w)}})(r)||{invalidReason:f_};return C.token=r,C}var x_={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};function D_(r,e,t){let{type:i,value:s}=r;if(i==="literal"){let l=/^\s+$/.test(s);return{literal:!l,val:l?" ":s}}let n=e[i],o=i;i==="hour"&&(e.hour12!=null?o=e.hour12?"hour12":"hour24":e.hourCycle!=null?e.hourCycle==="h11"||e.hourCycle==="h12"?o="hour12":o="hour24":o=t.hour12?"hour12":"hour24");let a=x_[o];if(typeof a=="object"&&(a=a[n]),a)return{literal:!1,val:a}}function b_(r){return[`^${r.map(t=>t.regex).reduce((t,i)=>`${t}(${i.source})`,"")}$`,r]}function E_(r,e,t){let i=r.match(e);if(i){let s={},n=1;for(let o in t)if(pl(t,o)){let a=t[o],l=a.groups?a.groups+1:1;!a.literal&&a.token&&(s[a.token.val[0]]=a.deser(i.slice(n,n+l))),n+=l}return[i,s]}else return[i,{}]}function S_(r){let e=n=>{switch(n){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}},t=null,i;return Ke(r.z)||(t=_n.create(r.z)),Ke(r.Z)||(t||(t=new Kr(r.Z)),i=r.Z),Ke(r.q)||(r.M=(r.q-1)*3+1),Ke(r.h)||(r.h<12&&r.a===1?r.h+=12:r.h===12&&r.a===0&&(r.h=0)),r.G===0&&r.y&&(r.y=-r.y),Ke(r.u)||(r.S=C6(r.u)),[Object.keys(r).reduce((n,o)=>{let a=e(o);return a&&(n[a]=r[o]),n},{}),t,i]}var Q8=null;function C_(){return Q8||(Q8=Ye.fromMillis(1555555555555)),Q8}function w_(r,e){if(r.literal)return r;let t=Er.macroTokenToFormatOpts(r.val),i=Jy(t,e);return i==null||i.includes(void 0)?r:i}function Zy(r,e){return Array.prototype.concat(...r.map(t=>w_(t,e)))}function Qy(r,e,t){let i=Zy(Er.parseFormat(t),r),s=i.map(o=>v_(o,r)),n=s.find(o=>o.invalidReason);if(n)return{input:e,tokens:i,invalidReason:n.invalidReason};{let[o,a]=b_(s),l=RegExp(o,"i"),[c,h]=E_(e,l,a),[d,p,g]=h?S_(h):[null,null,void 0];if(pl(h,"a")&&pl(h,"H"))throw new Co("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:i,regex:l,rawMatches:c,matches:h,result:d,zone:p,specificOffset:g}}}function T_(r,e,t){let{result:i,zone:s,specificOffset:n,invalidReason:o}=Qy(r,e,t);return[i,s,n,o]}function Jy(r,e){if(!r)return null;let i=Er.create(e,r).dtFormatter(C_()),s=i.formatToParts(),n=i.resolvedOptions();return s.map(o=>D_(o,r,n))}var ev=[0,31,59,90,120,151,181,212,243,273,304,334],tv=[0,31,60,91,121,152,182,213,244,274,305,335];function Xr(r,e){return new Sr("unit out of range",`you specified ${e} (of type ${typeof e}) as a ${r}, which is invalid`)}function rv(r,e,t){let i=new Date(Date.UTC(r,e-1,t));r<100&&r>=0&&i.setUTCFullYear(i.getUTCFullYear()-1900);let s=i.getUTCDay();return s===0?7:s}function iv(r,e,t){return t+(Mu(r)?tv:ev)[e-1]}function sv(r,e){let t=Mu(r)?tv:ev,i=t.findIndex(n=>n<e),s=e-t[i];return{month:i+1,day:s}}function m6(r){let{year:e,month:t,day:i}=r,s=iv(e,t,i),n=rv(e,t,i),o=Math.floor((s-n+10)/7),a;return o<1?(a=e-1,o=q9(a)):o>q9(e)?(a=e+1,o=1):a=e,{weekYear:a,weekNumber:o,weekday:n,...rp(r)}}function Qm(r){let{weekYear:e,weekNumber:t,weekday:i}=r,s=rv(e,1,4),n=Au(e),o=t*7+i-s-3,a;o<1?(a=e-1,o+=Au(a)):o>n?(a=e+1,o-=Au(e)):a=e;let{month:l,day:c}=sv(a,o);return{year:a,month:l,day:c,...rp(r)}}function J8(r){let{year:e,month:t,day:i}=r,s=iv(e,t,i);return{year:e,ordinal:s,...rp(r)}}function Jm(r){let{year:e,ordinal:t}=r,{month:i,day:s}=sv(e,t);return{year:e,month:i,day:s,...rp(r)}}function __(r){let e=J9(r.weekYear),t=Ls(r.weekNumber,1,q9(r.weekYear)),i=Ls(r.weekday,1,7);return e?t?i?!1:Xr("weekday",r.weekday):Xr("week",r.week):Xr("weekYear",r.weekYear)}function F_(r){let e=J9(r.year),t=Ls(r.ordinal,1,Au(r.year));return e?t?!1:Xr("ordinal",r.ordinal):Xr("year",r.year)}function nv(r){let e=J9(r.year),t=Ls(r.month,1,12),i=Ls(r.day,1,$9(r.year,r.month));return e?t?i?!1:Xr("day",r.day):Xr("month",r.month):Xr("year",r.year)}function ov(r){let{hour:e,minute:t,second:i,millisecond:s}=r,n=Ls(e,0,23)||e===24&&t===0&&i===0&&s===0,o=Ls(t,0,59),a=Ls(i,0,59),l=Ls(s,0,999);return n?o?a?l?!1:Xr("millisecond",s):Xr("second",i):Xr("minute",t):Xr("hour",e)}var e6="Invalid DateTime",ey=864e13;function O9(r){return new Sr("unsupported zone",`the zone "${r.name}" is not supported`)}function t6(r){return r.weekData===null&&(r.weekData=m6(r.c)),r.weekData}function So(r,e){let t={ts:r.ts,zone:r.zone,c:r.c,o:r.o,loc:r.loc,invalid:r.invalid};return new Ye({...t,...e,old:t})}function av(r,e,t){let i=r-e*60*1e3,s=t.offset(i);if(e===s)return[i,e];i-=(s-e)*60*1e3;let n=t.offset(i);return s===n?[i,s]:[r-Math.min(s,n)*60*1e3,Math.max(s,n)]}function G9(r,e){r+=e*60*1e3;let t=new Date(r);return{year:t.getUTCFullYear(),month:t.getUTCMonth()+1,day:t.getUTCDate(),hour:t.getUTCHours(),minute:t.getUTCMinutes(),second:t.getUTCSeconds(),millisecond:t.getUTCMilliseconds()}}function z9(r,e,t){return av(ep(r),e,t)}function ty(r,e){let t=r.o,i=r.c.year+Math.trunc(e.years),s=r.c.month+Math.trunc(e.months)+Math.trunc(e.quarters)*3,n={...r.c,year:i,month:s,day:Math.min(r.c.day,$9(i,s))+Math.trunc(e.days)+Math.trunc(e.weeks)*7},o=Be.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),a=ep(n),[l,c]=av(a,t,r.zone);return o!==0&&(l+=o,c=r.zone.offset(l)),{ts:l,o:c}}function wu(r,e,t,i,s,n){let{setZone:o,zone:a}=t;if(r&&Object.keys(r).length!==0||e){let l=e||a,c=Ye.fromObject(r,{...t,zone:l,specificOffset:n});return o?c:c.setZone(a)}else return Ye.invalid(new Sr("unparsable",`the input "${s}" can't be parsed as ${i}`))}function U9(r,e,t=!0){return r.isValid?Er.create(Gt.create("en-US"),{allowZ:t,forceSimple:!0}).formatDateTimeFromString(r,e):null}function r6(r,e){let t=r.c.year>9999||r.c.year<0,i="";return t&&r.c.year>=0&&(i+="+"),i+=t0(r.c.year,t?6:4),e?(i+="-",i+=t0(r.c.month),i+="-",i+=t0(r.c.day)):(i+=t0(r.c.month),i+=t0(r.c.day)),i}function ry(r,e,t,i,s,n){let o=t0(r.c.hour);return e?(o+=":",o+=t0(r.c.minute),(r.c.millisecond!==0||r.c.second!==0||!t)&&(o+=":")):o+=t0(r.c.minute),(r.c.millisecond!==0||r.c.second!==0||!t)&&(o+=t0(r.c.second),(r.c.millisecond!==0||!i)&&(o+=".",o+=t0(r.c.millisecond,3))),s&&(r.isOffsetFixed&&r.offset===0&&!n?o+="Z":r.o<0?(o+="-",o+=t0(Math.trunc(-r.o/60)),o+=":",o+=t0(Math.trunc(-r.o%60))):(o+="+",o+=t0(Math.trunc(r.o/60)),o+=":",o+=t0(Math.trunc(r.o%60)))),n&&(o+="["+r.zone.ianaName+"]"),o}var lv={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},A_={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},k_={ordinal:1,hour:0,minute:0,second:0,millisecond:0},cv=["year","month","day","hour","minute","second","millisecond"],I_=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],L_=["year","ordinal","hour","minute","second","millisecond"];function iy(r){let e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[r.toLowerCase()];if(!e)throw new W9(r);return e}function sy(r,e){let t=Tn(e.zone,Ot.defaultZone),i=Gt.fromObject(e),s=Ot.now(),n,o;if(Ke(r.year))n=s;else{for(let c of cv)Ke(r[c])&&(r[c]=lv[c]);let a=nv(r)||ov(r);if(a)return Ye.invalid(a);let l=t.offset(s);[n,o]=z9(r,l,t)}return new Ye({ts:n,zone:t,loc:i,o})}function ny(r,e,t){let i=Ke(t.round)?!0:t.round,s=(o,a)=>(o=w6(o,i||t.calendary?0:2,!0),e.loc.clone(t).relFormatter(t).format(o,a)),n=o=>t.calendary?e.hasSame(r,o)?0:e.startOf(o).diff(r.startOf(o),o).get(o):e.diff(r,o).get(o);if(t.unit)return s(n(t.unit),t.unit);for(let o of t.units){let a=n(o);if(Math.abs(a)>=1)return s(a,o)}return s(r>e?-0:0,t.units[t.units.length-1])}function oy(r){let e={},t;return r.length>0&&typeof r[r.length-1]=="object"?(e=r[r.length-1],t=Array.from(r).slice(0,r.length-1)):t=Array.from(r),[e,t]}var Ye=class r{constructor(e){let t=e.zone||Ot.defaultZone,i=e.invalid||(Number.isNaN(e.ts)?new Sr("invalid input"):null)||(t.isValid?null:O9(t));this.ts=Ke(e.ts)?Ot.now():e.ts;let s=null,n=null;if(!i)if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[s,n]=[e.old.c,e.old.o];else{let a=t.offset(this.ts);s=G9(this.ts,a),i=Number.isNaN(s.year)?new Sr("invalid input"):null,s=i?null:s,n=i?null:a}this._zone=t,this.loc=e.loc||Gt.create(),this.invalid=i,this.weekData=null,this.c=s,this.o=n,this.isLuxonDateTime=!0}static now(){return new r({})}static local(){let[e,t]=oy(arguments),[i,s,n,o,a,l,c]=t;return sy({year:i,month:s,day:n,hour:o,minute:a,second:l,millisecond:c},e)}static utc(){let[e,t]=oy(arguments),[i,s,n,o,a,l,c]=t;return e.zone=Kr.utcInstance,sy({year:i,month:s,day:n,hour:o,minute:a,second:l,millisecond:c},e)}static fromJSDate(e,t={}){let i=oT(e)?e.valueOf():NaN;if(Number.isNaN(i))return r.invalid("invalid input");let s=Tn(t.zone,Ot.defaultZone);return s.isValid?new r({ts:i,zone:s,loc:Gt.fromObject(t)}):r.invalid(O9(s))}static fromMillis(e,t={}){if(To(e))return e<-ey||e>ey?r.invalid("Timestamp out of range"):new r({ts:e,zone:Tn(t.zone,Ot.defaultZone),loc:Gt.fromObject(t)});throw new or(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(To(e))return new r({ts:e*1e3,zone:Tn(t.zone,Ot.defaultZone),loc:Gt.fromObject(t)});throw new or("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};let i=Tn(t.zone,Ot.defaultZone);if(!i.isValid)return r.invalid(O9(i));let s=Ot.now(),n=Ke(t.specificOffset)?i.offset(s):t.specificOffset,o=Y9(e,iy),a=!Ke(o.ordinal),l=!Ke(o.year),c=!Ke(o.month)||!Ke(o.day),h=l||c,d=o.weekYear||o.weekNumber,p=Gt.fromObject(t);if((h||a)&&d)throw new Co("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(c&&a)throw new Co("Can't mix ordinal dates with month/day");let g=d||o.weekday&&!h,v,C,w=G9(s,n);g?(v=I_,C=A_,w=m6(w)):a?(v=L_,C=k_,w=J8(w)):(v=cv,C=lv);let k=!1;for(let R of v){let z=o[R];Ke(z)?k?o[R]=C[R]:o[R]=w[R]:k=!0}let B=g?__(o):a?F_(o):nv(o),L=B||ov(o);if(L)return r.invalid(L);let T=g?Qm(o):a?Jm(o):o,[W,j]=z9(T,n,i),I=new r({ts:W,zone:i,o:j,loc:p});return o.weekday&&h&&e.weekday!==I.weekday?r.invalid("mismatched weekday",`you can't specify both a weekday of ${o.weekday} and a date of ${I.toISO()}`):I}static fromISO(e,t={}){let[i,s]=XT(e);return wu(i,s,t,"ISO 8601",e)}static fromRFC2822(e,t={}){let[i,s]=KT(e);return wu(i,s,t,"RFC 2822",e)}static fromHTTP(e,t={}){let[i,s]=ZT(e);return wu(i,s,t,"HTTP",t)}static fromFormat(e,t,i={}){if(Ke(e)||Ke(t))throw new or("fromFormat requires an input string and a format");let{locale:s=null,numberingSystem:n=null}=i,o=Gt.fromOpts({locale:s,numberingSystem:n,defaultToEN:!0}),[a,l,c,h]=T_(o,e,t);return h?r.invalid(h):wu(a,l,i,`format ${t}`,e,c)}static fromString(e,t,i={}){return r.fromFormat(e,t,i)}static fromSQL(e,t={}){let[i,s]=s_(e);return wu(i,s,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new or("need to specify a reason the DateTime is invalid");let i=e instanceof Sr?e:new Sr(e,t);if(Ot.throwOnInvalid)throw new s6(i);return new r({invalid:i})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){let i=Jy(e,Gt.fromObject(t));return i?i.map(s=>s?s.val:null).join(""):null}static expandFormat(e,t={}){return Zy(Er.parseFormat(e),Gt.fromObject(t)).map(s=>s.val).join("")}get(e){return this[e]}get isValid(){return this.invalid===null}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?t6(this).weekYear:NaN}get weekNumber(){return this.isValid?t6(this).weekNumber:NaN}get weekday(){return this.isValid?t6(this).weekday:NaN}get ordinal(){return this.isValid?J8(this.c).ordinal:NaN}get monthShort(){return this.isValid?ul.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?ul.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?ul.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?ul.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return this.isOffsetFixed?!1:this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];let e=864e5,t=6e4,i=ep(this.c),s=this.zone.offset(i-e),n=this.zone.offset(i+e),o=this.zone.offset(i-s*t),a=this.zone.offset(i-n*t);if(o===a)return[this];let l=i-o*t,c=i-a*t,h=G9(l,o),d=G9(c,a);return h.hour===d.hour&&h.minute===d.minute&&h.second===d.second&&h.millisecond===d.millisecond?[So(this,{ts:l}),So(this,{ts:c})]:[this]}get isInLeapYear(){return Mu(this.year)}get daysInMonth(){return $9(this.year,this.month)}get daysInYear(){return this.isValid?Au(this.year):NaN}get weeksInWeekYear(){return this.isValid?q9(this.weekYear):NaN}resolvedLocaleOptions(e={}){let{locale:t,numberingSystem:i,calendar:s}=Er.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:i,outputCalendar:s}}toUTC(e=0,t={}){return this.setZone(Kr.instance(e),t)}toLocal(){return this.setZone(Ot.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:i=!1}={}){if(e=Tn(e,Ot.defaultZone),e.equals(this.zone))return this;if(e.isValid){let s=this.ts;if(t||i){let n=e.offset(this.ts),o=this.toObject();[s]=z9(o,n,e)}return So(this,{ts:s,zone:e})}else return r.invalid(O9(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:i}={}){let s=this.loc.clone({locale:e,numberingSystem:t,outputCalendar:i});return So(this,{loc:s})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;let t=Y9(e,iy),i=!Ke(t.weekYear)||!Ke(t.weekNumber)||!Ke(t.weekday),s=!Ke(t.ordinal),n=!Ke(t.year),o=!Ke(t.month)||!Ke(t.day),a=n||o,l=t.weekYear||t.weekNumber;if((a||s)&&l)throw new Co("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(o&&s)throw new Co("Can't mix ordinal dates with month/day");let c;i?c=Qm({...m6(this.c),...t}):Ke(t.ordinal)?(c={...this.toObject(),...t},Ke(t.day)&&(c.day=Math.min($9(c.year,c.month),c.day))):c=Jm({...J8(this.c),...t});let[h,d]=z9(c,this.o,this.zone);return So(this,{ts:h,o:d})}plus(e){if(!this.isValid)return this;let t=Be.fromDurationLike(e);return So(this,ty(this,t))}minus(e){if(!this.isValid)return this;let t=Be.fromDurationLike(e).negate();return So(this,ty(this,t))}startOf(e){if(!this.isValid)return this;let t={},i=Be.normalizeUnit(e);switch(i){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0;break}if(i==="weeks"&&(t.weekday=1),i==="quarters"){let s=Math.ceil(this.month/3);t.month=(s-1)*3+1}return this.set(t)}endOf(e){return this.isValid?this.plus({[e]:1}).startOf(e).minus(1):this}toFormat(e,t={}){return this.isValid?Er.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):e6}toLocaleString(e=H9,t={}){return this.isValid?Er.create(this.loc.clone(t),e).formatDateTime(this):e6}toLocaleParts(e={}){return this.isValid?Er.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:i=!1,includeOffset:s=!0,extendedZone:n=!1}={}){if(!this.isValid)return null;let o=e==="extended",a=r6(this,o);return a+="T",a+=ry(this,o,t,i,s,n),a}toISODate({format:e="extended"}={}){return this.isValid?r6(this,e==="extended"):null}toISOWeekDate(){return U9(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:i=!0,includePrefix:s=!1,extendedZone:n=!1,format:o="extended"}={}){return this.isValid?(s?"T":"")+ry(this,o==="extended",t,e,i,n):null}toRFC2822(){return U9(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return U9(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?r6(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:i=!0}={}){let s="HH:mm:ss.SSS";return(t||e)&&(i&&(s+=" "),t?s+="z":e&&(s+="ZZ")),U9(this,s,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():e6}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};let t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",i={}){if(!this.isValid||!e.isValid)return Be.invalid("created by diffing an invalid DateTime");let s={locale:this.locale,numberingSystem:this.numberingSystem,...i},n=aT(t).map(Be.normalizeUnit),o=e.valueOf()>this.valueOf(),a=o?this:e,l=o?e:this,c=h_(a,l,n,s);return o?c.negate():c}diffNow(e="milliseconds",t={}){return this.diff(r.now(),e,t)}until(e){return this.isValid?dl.fromDateTimes(this,e):this}hasSame(e,t){if(!this.isValid)return!1;let i=e.valueOf(),s=this.setZone(e.zone,{keepLocalTime:!0});return s.startOf(t)<=i&&i<=s.endOf(t)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;let t=e.base||r.fromObject({},{zone:this.zone}),i=e.padding?this<t?-e.padding:e.padding:0,s=["years","months","days","hours","minutes","seconds"],n=e.unit;return Array.isArray(e.unit)&&(s=e.unit,n=void 0),ny(t,this.plus(i),{...e,numeric:"always",units:s,unit:n})}toRelativeCalendar(e={}){return this.isValid?ny(e.base||r.fromObject({},{zone:this.zone}),this,{...e,numeric:"auto",units:["years","months","days"],calendary:!0}):null}static min(...e){if(!e.every(r.isDateTime))throw new or("min requires all arguments be DateTimes");return Wm(e,t=>t.valueOf(),Math.min)}static max(...e){if(!e.every(r.isDateTime))throw new or("max requires all arguments be DateTimes");return Wm(e,t=>t.valueOf(),Math.max)}static fromFormatExplain(e,t,i={}){let{locale:s=null,numberingSystem:n=null}=i,o=Gt.fromOpts({locale:s,numberingSystem:n,defaultToEN:!0});return Qy(o,e,t)}static fromStringExplain(e,t,i={}){return r.fromFormatExplain(e,t,i)}static get DATE_SHORT(){return H9}static get DATE_MED(){return dy}static get DATE_MED_WITH_WEEKDAY(){return Hw}static get DATE_FULL(){return py}static get DATE_HUGE(){return fy}static get TIME_SIMPLE(){return gy}static get TIME_WITH_SECONDS(){return my}static get TIME_WITH_SHORT_OFFSET(){return yy}static get TIME_WITH_LONG_OFFSET(){return vy}static get TIME_24_SIMPLE(){return xy}static get TIME_24_WITH_SECONDS(){return Dy}static get TIME_24_WITH_SHORT_OFFSET(){return by}static get TIME_24_WITH_LONG_OFFSET(){return Ey}static get DATETIME_SHORT(){return Sy}static get DATETIME_SHORT_WITH_SECONDS(){return Cy}static get DATETIME_MED(){return wy}static get DATETIME_MED_WITH_SECONDS(){return Ty}static get DATETIME_MED_WITH_WEEKDAY(){return jw}static get DATETIME_FULL(){return _y}static get DATETIME_FULL_WITH_SECONDS(){return Fy}static get DATETIME_HUGE(){return Ay}static get DATETIME_HUGE_WITH_SECONDS(){return ky}};function Tu(r){if(Ye.isDateTime(r))return r;if(r&&r.valueOf&&To(r.valueOf()))return Ye.fromJSDate(r);if(r&&typeof r=="object")return Ye.fromObject(r);throw new or(`Unknown datetime argument: ${r}, of type ${typeof r}`)}var k6={renderNullAs:"\\-",taskCompletionTracking:!1,taskCompletionUseEmojiShorthand:!1,taskCompletionText:"completion",taskCompletionDateFormat:"yyyy-MM-dd",recursiveSubTaskCompletion:!1,warnOnEmptyResult:!0,refreshEnabled:!0,refreshInterval:2500,defaultDateFormat:"MMMM dd, yyyy",defaultDateTimeFormat:"h:mm a - MMMM dd, yyyy",maxRecursiveRenderDepth:4,tableIdColumnName:"File",tableGroupColumnName:"Group",showResultCount:!0},M_={allowHtml:!0};({...k6,...M_});var y6=class r{constructor(e){M0(this,"value");M0(this,"successful");this.value=e,this.successful=!0}map(e){return new r(e(this.value))}flatMap(e){return e(this.value)}mapErr(e){return this}bimap(e,t){return this.map(e)}orElse(e){return this.value}cast(){return this}orElseThrow(e){return this.value}},v6=class r{constructor(e){M0(this,"error");M0(this,"successful");this.error=e,this.successful=!1}map(e){return this}flatMap(e){return this}mapErr(e){return new r(e(this.error))}bimap(e,t){return this.mapErr(t)}orElse(e){return e}cast(){return this}orElseThrow(e){throw e?new Error(e(this.error)):new Error(""+this.error)}},X9;(function(r){function e(n){return new y6(n)}r.success=e;function t(n){return new v6(n)}r.failure=t;function i(n,o,a){return n.successful?o.successful?a(n.value,o.value):t(o.error):t(n.error)}r.flatMap2=i;function s(n,o,a){return i(n,o,(l,c)=>e(a(l,c)))}r.map2=s})(X9||(X9={}));var N_=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{},K9={exports:{}};K9.exports;(function(r,e){(function(t,i){r.exports=i()})(typeof self<"u"?self:N_,function(){return function(t){var i={};function s(n){if(i[n])return i[n].exports;var o=i[n]={i:n,l:!1,exports:{}};return t[n].call(o.exports,o,o.exports,s),o.l=!0,o.exports}return s.m=t,s.c=i,s.d=function(n,o,a){s.o(n,o)||Object.defineProperty(n,o,{configurable:!1,enumerable:!0,get:a})},s.r=function(n){Object.defineProperty(n,"__esModule",{value:!0})},s.n=function(n){var o=n&&n.__esModule?function(){return n.default}:function(){return n};return s.d(o,"a",o),o},s.o=function(n,o){return Object.prototype.hasOwnProperty.call(n,o)},s.p="",s(s.s=0)}([function(t,i,s){function n(D){if(!(this instanceof n))return new n(D);this._=D}var o=n.prototype;function a(D,F){for(var N=0;N<D;N++)F(N)}function l(D,F,N){return function(G,V){a(V.length,function(X){G(V[X],X,V)})}(function(G,V,X){F=D(F,G,V,X)},N),F}function c(D,F){return l(function(N,G,V,X){return N.concat([D(G,V,X)])},[],F)}function h(D,F){var N={v:0,buf:F};return a(D,function(){var G;N={v:N.v<<1|(G=N.buf,G[0]>>7),buf:function(V){var X=l(function(ee,be,Ve,mt){return ee.concat(Ve===mt.length-1?Buffer.from([be,0]).readUInt16BE(0):mt.readUInt16BE(Ve))},[],V);return Buffer.from(c(function(ee){return(ee<<1&65535)>>8},X))}(N.buf)}}),N}function d(){return typeof Buffer<"u"}function p(){if(!d())throw new Error("Buffer global does not exist; please use webpack if you need to parse Buffers in the browser.")}function g(D){p();var F=l(function(X,ee){return X+ee},0,D);if(F%8!=0)throw new Error("The bits ["+D.join(", ")+"] add up to "+F+" which is not an even number of bytes; the total should be divisible by 8");var N,G=F/8,V=(N=function(X){return X>48},l(function(X,ee){return X||(N(ee)?ee:X)},null,D));if(V)throw new Error(V+" bit range requested exceeds 48 bit (6 byte) Number max.");return new n(function(X,ee){var be=G+ee;return be>X.length?R(ee,G.toString()+" bytes"):I(be,l(function(Ve,mt){var Ze=h(mt,Ve.buf);return{coll:Ve.coll.concat(Ze.v),buf:Ze.buf}},{coll:[],buf:X.slice(ee,be)},D).coll)})}function v(D,F){return new n(function(N,G){return p(),G+F>N.length?R(G,F+" bytes for "+D):I(G+F,N.slice(G,G+F))})}function C(D,F){if(typeof(N=F)!="number"||Math.floor(N)!==N||F<0||F>6)throw new Error(D+" requires integer length in range [0, 6].");var N}function w(D){return C("uintBE",D),v("uintBE("+D+")",D).map(function(F){return F.readUIntBE(0,D)})}function k(D){return C("uintLE",D),v("uintLE("+D+")",D).map(function(F){return F.readUIntLE(0,D)})}function B(D){return C("intBE",D),v("intBE("+D+")",D).map(function(F){return F.readIntBE(0,D)})}function L(D){return C("intLE",D),v("intLE("+D+")",D).map(function(F){return F.readIntLE(0,D)})}function T(D){return D instanceof n}function W(D){return{}.toString.call(D)==="[object Array]"}function j(D){return d()&&Buffer.isBuffer(D)}function I(D,F){return{status:!0,index:D,value:F,furthest:-1,expected:[]}}function R(D,F){return W(F)||(F=[F]),{status:!1,index:-1,value:null,furthest:D,expected:F}}function z(D,F){if(!F||D.furthest>F.furthest)return D;var N=D.furthest===F.furthest?function(G,V){if(function(){if(n._supportsSet!==void 0)return n._supportsSet;var j0=typeof Set<"u";return n._supportsSet=j0,j0}()&&Array.from){for(var X=new Set(G),ee=0;ee<V.length;ee++)X.add(V[ee]);var be=Array.from(X);return be.sort(),be}for(var Ve={},mt=0;mt<G.length;mt++)Ve[G[mt]]=!0;for(var Ze=0;Ze<V.length;Ze++)Ve[V[Ze]]=!0;var Vt=[];for(var At in Ve)({}).hasOwnProperty.call(Ve,At)&&Vt.push(At);return Vt.sort(),Vt}(D.expected,F.expected):F.expected;return{status:D.status,index:D.index,value:D.value,furthest:F.furthest,expected:N}}var U={};function q(D,F){if(j(D))return{offset:F,line:-1,column:-1};D in U||(U[D]={});for(var N=U[D],G=0,V=0,X=0,ee=F;ee>=0;){if(ee in N){G=N[ee].line,X===0&&(X=N[ee].lineStart);break}(D.charAt(ee)===`
|
|
`||D.charAt(ee)==="\r"&&D.charAt(ee+1)!==`
|
|
`)&&(V++,X===0&&(X=ee+1)),ee--}var be=G+V,Ve=F-X;return N[F]={line:be,lineStart:X},{offset:F,line:be+1,column:Ve+1}}function re(D){if(!T(D))throw new Error("not a parser: "+D)}function $(D,F){return typeof D=="string"?D.charAt(F):D[F]}function Q(D){if(typeof D!="number")throw new Error("not a number: "+D)}function Te(D){if(typeof D!="function")throw new Error("not a function: "+D)}function ye(D){if(typeof D!="string")throw new Error("not a string: "+D)}var xe=2,De=3,_e=8,Mt=5*_e,rt=4*_e,et=" ";function gt(D,F){return new Array(F+1).join(D)}function Dt(D,F,N){var G=F-D.length;return G<=0?D:gt(N,G)+D}function I0(D,F,N,G){return{from:D-F>0?D-F:0,to:D+N>G?G:D+N}}function de(D,F){var N,G,V,X,ee,be=F.index,Ve=be.offset,mt=1;if(Ve===D.length)return"Got the end of the input";if(j(D)){var Ze=Ve-Ve%_e,Vt=Ve-Ze,At=I0(Ze,Mt,rt+_e,D.length),j0=c(function(Re){return c(function(f0){return Dt(f0.toString(16),2,"0")},Re)},function(Re,f0){var w0=Re.length,g0=[],Ji=0;if(w0<=f0)return[Re.slice()];for(var es=0;es<w0;es++)g0[Ji]||g0.push([]),g0[Ji].push(Re[es]),(es+1)%f0==0&&Ji++;return g0}(D.slice(At.from,At.to).toJSON().data,_e));X=function(Re){return Re.from===0&&Re.to===1?{from:Re.from,to:Re.to}:{from:Re.from/_e,to:Math.floor(Re.to/_e)}}(At),G=Ze/_e,N=3*Vt,Vt>=4&&(N+=1),mt=2,V=c(function(Re){return Re.length<=4?Re.join(" "):Re.slice(0,4).join(" ")+" "+Re.slice(4).join(" ")},j0),(ee=(8*(X.to>0?X.to-1:X.to)).toString(16).length)<2&&(ee=2)}else{var dt=D.split(/\r\n|[\n\r\u2028\u2029]/);N=be.column-1,G=be.line-1,X=I0(G,xe,De,dt.length),V=dt.slice(X.from,X.to),ee=X.to.toString().length}var L0=G-X.from;return j(D)&&(ee=(8*(X.to>0?X.to-1:X.to)).toString(16).length)<2&&(ee=2),l(function(Re,f0,w0){var g0,Ji=w0===L0,es=Ji?"> ":et;return g0=j(D)?Dt((8*(X.from+w0)).toString(16),ee,"0"):Dt((X.from+w0+1).toString(),ee," "),[].concat(Re,[es+g0+" | "+f0],Ji?[et+gt(" ",ee)+" | "+Dt("",N," ")+gt("^",mt)]:[])},[],V).join(`
|
|
`)}function oe(D,F){return[`
|
|
`,"-- PARSING FAILED "+gt("-",50),`
|
|
|
|
`,de(D,F),`
|
|
|
|
`,(N=F.expected,N.length===1?`Expected:
|
|
|
|
`+N[0]:`Expected one of the following:
|
|
|
|
`+N.join(", ")),`
|
|
`].join("");var N}function ve(D){return D.flags!==void 0?D.flags:[D.global?"g":"",D.ignoreCase?"i":"",D.multiline?"m":"",D.unicode?"u":"",D.sticky?"y":""].join("")}function Yt(){for(var D=[].slice.call(arguments),F=D.length,N=0;N<F;N+=1)re(D[N]);return n(function(G,V){for(var X,ee=new Array(F),be=0;be<F;be+=1){if(!(X=z(D[be]._(G,V),X)).status)return X;ee[be]=X.value,V=X.index}return z(I(V,ee),X)})}function Ut(){var D=[].slice.call(arguments);if(D.length===0)throw new Error("seqMap needs at least one argument");var F=D.pop();return Te(F),Yt.apply(null,D).map(function(N){return F.apply(null,N)})}function r0(){var D=[].slice.call(arguments),F=D.length;if(F===0)return Zr("zero alternates");for(var N=0;N<F;N+=1)re(D[N]);return n(function(G,V){for(var X,ee=0;ee<D.length;ee+=1)if((X=z(D[ee]._(G,V),X)).status)return X;return X})}function Ft(D,F){return it(D,F).or(C0([]))}function it(D,F){return re(D),re(F),Ut(D,F.then(D).many(),function(N,G){return[N].concat(G)})}function p0(D){ye(D);var F="'"+D+"'";return n(function(N,G){var V=G+D.length,X=N.slice(G,V);return X===D?I(V,X):R(G,F)})}function i0(D,F){(function(V){if(!(V instanceof RegExp))throw new Error("not a regexp: "+V);for(var X=ve(V),ee=0;ee<X.length;ee++){var be=X.charAt(ee);if(be!=="i"&&be!=="m"&&be!=="u"&&be!=="s")throw new Error('unsupported regexp flag "'+be+'": '+V)}})(D),arguments.length>=2?Q(F):F=0;var N=function(V){return RegExp("^(?:"+V.source+")",ve(V))}(D),G=""+D;return n(function(V,X){var ee=N.exec(V.slice(X));if(ee){if(0<=F&&F<=ee.length){var be=ee[0],Ve=ee[F];return I(X+be.length,Ve)}return R(X,"valid match group (0 to "+ee.length+") in "+G)}return R(X,G)})}function C0(D){return n(function(F,N){return I(N,D)})}function Zr(D){return n(function(F,N){return R(N,D)})}function wt(D){if(T(D))return n(function(F,N){var G=D._(F,N);return G.index=N,G.value="",G});if(typeof D=="string")return wt(p0(D));if(D instanceof RegExp)return wt(i0(D));throw new Error("not a string, regexp, or parser: "+D)}function Fn(D){return re(D),n(function(F,N){var G=D._(F,N),V=F.slice(N,G.index);return G.status?R(N,'not "'+V+'"'):I(N,null)})}function Ei(D){return Te(D),n(function(F,N){var G=$(F,N);return N<F.length&&D(G)?I(N+1,G):R(N,"a character/byte matching "+D)})}function Si(D,F){arguments.length<2&&(F=D,D=void 0);var N=n(function(G,V){return N._=F()._,N._(G,V)});return D?N.desc(D):N}function Zi(){return Zr("fantasy-land/empty")}o.parse=function(D){if(typeof D!="string"&&!j(D))throw new Error(".parse must be called with a string or Buffer as its argument");var F,N=this.skip(In)._(D,0);return F=N.status?{status:!0,value:N.value}:{status:!1,index:q(D,N.furthest),expected:N.expected},delete U[D],F},o.tryParse=function(D){var F=this.parse(D);if(F.status)return F.value;var N=oe(D,F),G=new Error(N);throw G.type="ParsimmonError",G.result=F,G},o.assert=function(D,F){return this.chain(function(N){return D(N)?C0(N):Zr(F)})},o.or=function(D){return r0(this,D)},o.trim=function(D){return this.wrap(D,D)},o.wrap=function(D,F){return Ut(D,this,F,function(N,G){return G})},o.thru=function(D){return D(this)},o.then=function(D){return re(D),Yt(this,D).map(function(F){return F[1]})},o.many=function(){var D=this;return n(function(F,N){for(var G=[],V=void 0;;){if(!(V=z(D._(F,N),V)).status)return z(I(N,G),V);if(N===V.index)throw new Error("infinite loop detected in .many() parser --- calling .many() on a parser which can accept zero characters is usually the cause");N=V.index,G.push(V.value)}})},o.tieWith=function(D){return ye(D),this.map(function(F){if(function(V){if(!W(V))throw new Error("not an array: "+V)}(F),F.length){ye(F[0]);for(var N=F[0],G=1;G<F.length;G++)ye(F[G]),N+=D+F[G];return N}return""})},o.tie=function(){return this.tieWith("")},o.times=function(D,F){var N=this;return arguments.length<2&&(F=D),Q(D),Q(F),n(function(G,V){for(var X=[],ee=void 0,be=void 0,Ve=0;Ve<D;Ve+=1){if(be=z(ee=N._(G,V),be),!ee.status)return be;V=ee.index,X.push(ee.value)}for(;Ve<F&&(be=z(ee=N._(G,V),be),ee.status);Ve+=1)V=ee.index,X.push(ee.value);return z(I(V,X),be)})},o.result=function(D){return this.map(function(){return D})},o.atMost=function(D){return this.times(0,D)},o.atLeast=function(D){return Ut(this.times(D),this.many(),function(F,N){return F.concat(N)})},o.map=function(D){Te(D);var F=this;return n(function(N,G){var V=F._(N,G);return V.status?z(I(V.index,D(V.value)),V):V})},o.contramap=function(D){Te(D);var F=this;return n(function(N,G){var V=F.parse(D(N.slice(G)));return V.status?I(G+N.length,V.value):V})},o.promap=function(D,F){return Te(D),Te(F),this.contramap(D).map(F)},o.skip=function(D){return Yt(this,D).map(function(F){return F[0]})},o.mark=function(){return Ut(Qi,this,Qi,function(D,F,N){return{start:D,value:F,end:N}})},o.node=function(D){return Ut(Qi,this,Qi,function(F,N,G){return{name:D,value:N,start:F,end:G}})},o.sepBy=function(D){return Ft(this,D)},o.sepBy1=function(D){return it(this,D)},o.lookahead=function(D){return this.skip(wt(D))},o.notFollowedBy=function(D){return this.skip(Fn(D))},o.desc=function(D){W(D)||(D=[D]);var F=this;return n(function(N,G){var V=F._(N,G);return V.status||(V.expected=D),V})},o.fallback=function(D){return this.or(C0(D))},o.ap=function(D){return Ut(D,this,function(F,N){return F(N)})},o.chain=function(D){var F=this;return n(function(N,G){var V=F._(N,G);return V.status?z(D(V.value)._(N,V.index),V):V})},o.concat=o.or,o.empty=Zi,o.of=C0,o["fantasy-land/ap"]=o.ap,o["fantasy-land/chain"]=o.chain,o["fantasy-land/concat"]=o.concat,o["fantasy-land/empty"]=o.empty,o["fantasy-land/of"]=o.of,o["fantasy-land/map"]=o.map;var Qi=n(function(D,F){return I(F,q(D,F))}),An=n(function(D,F){return F>=D.length?R(F,"any character/byte"):I(F+1,$(D,F))}),kn=n(function(D,F){return I(D.length,D.slice(F))}),In=n(function(D,F){return F<D.length?R(F,"EOF"):I(F,null)}),Fo=i0(/[0-9]/).desc("a digit"),xl=i0(/[0-9]*/).desc("optional digits"),Ln=i0(/[a-z]/i).desc("a letter"),Dl=i0(/[a-z]*/i).desc("optional letters"),Ao=i0(/\s*/).desc("optional whitespace"),Ns=i0(/\s+/).desc("whitespace"),Mn=p0("\r"),Nn=p0(`
|
|
`),ko=p0(`\r
|
|
`),A=r0(ko,Nn,Mn).desc("newline"),O=r0(A,In);n.all=kn,n.alt=r0,n.any=An,n.cr=Mn,n.createLanguage=function(D){var F={};for(var N in D)({}).hasOwnProperty.call(D,N)&&function(G){F[G]=Si(function(){return D[G](F)})}(N);return F},n.crlf=ko,n.custom=function(D){return n(D(I,R))},n.digit=Fo,n.digits=xl,n.empty=Zi,n.end=O,n.eof=In,n.fail=Zr,n.formatError=oe,n.index=Qi,n.isParser=T,n.lazy=Si,n.letter=Ln,n.letters=Dl,n.lf=Nn,n.lookahead=wt,n.makeFailure=R,n.makeSuccess=I,n.newline=A,n.noneOf=function(D){return Ei(function(F){return D.indexOf(F)<0}).desc("none of '"+D+"'")},n.notFollowedBy=Fn,n.of=C0,n.oneOf=function(D){for(var F=D.split(""),N=0;N<F.length;N++)F[N]="'"+F[N]+"'";return Ei(function(G){return D.indexOf(G)>=0}).desc(F)},n.optWhitespace=Ao,n.Parser=n,n.range=function(D,F){return Ei(function(N){return D<=N&&N<=F}).desc(D+"-"+F)},n.regex=i0,n.regexp=i0,n.sepBy=Ft,n.sepBy1=it,n.seq=Yt,n.seqMap=Ut,n.seqObj=function(){for(var D,F={},N=0,G=(D=arguments,Array.prototype.slice.call(D)),V=G.length,X=0;X<V;X+=1){var ee=G[X];if(!T(ee)){if(W(ee)&&ee.length===2&&typeof ee[0]=="string"&&T(ee[1])){var be=ee[0];if(Object.prototype.hasOwnProperty.call(F,be))throw new Error("seqObj: duplicate key "+be);F[be]=!0,N++;continue}throw new Error("seqObj arguments must be parsers or [string, parser] array pairs.")}}if(N===0)throw new Error("seqObj expects at least one named parser, found zero");return n(function(Ve,mt){for(var Ze,Vt={},At=0;At<V;At+=1){var j0,dt;if(W(G[At])?(j0=G[At][0],dt=G[At][1]):(j0=null,dt=G[At]),!(Ze=z(dt._(Ve,mt),Ze)).status)return Ze;j0&&(Vt[j0]=Ze.value),mt=Ze.index}return z(I(mt,Vt),Ze)})},n.string=p0,n.succeed=C0,n.takeWhile=function(D){return Te(D),n(function(F,N){for(var G=N;G<F.length&&D($(F,G));)G++;return I(G,F.slice(N,G))})},n.test=Ei,n.whitespace=Ns,n["fantasy-land/empty"]=Zi,n["fantasy-land/of"]=C0,n.Binary={bitSeq:g,bitSeqObj:function(D){p();var F={},N=0,G=c(function(X){if(W(X)){var ee=X;if(ee.length!==2)throw new Error("["+ee.join(", ")+"] should be length 2, got length "+ee.length);if(ye(ee[0]),Q(ee[1]),Object.prototype.hasOwnProperty.call(F,ee[0]))throw new Error("duplicate key in bitSeqObj: "+ee[0]);return F[ee[0]]=!0,N++,ee}return Q(X),[null,X]},D);if(N<1)throw new Error("bitSeqObj expects at least one named pair, got ["+D.join(", ")+"]");var V=c(function(X){return X[0]},G);return g(c(function(X){return X[1]},G)).map(function(X){return l(function(ee,be){return be[0]!==null&&(ee[be[0]]=be[1]),ee},{},c(function(ee,be){return[ee,X[be]]},V))})},byte:function(D){if(p(),Q(D),D>255)throw new Error("Value specified to byte constructor ("+D+"=0x"+D.toString(16)+") is larger in value than a single byte.");var F=(D>15?"0x":"0x0")+D.toString(16);return n(function(N,G){var V=$(N,G);return V===D?I(G+1,V):R(G,F)})},buffer:function(D){return v("buffer",D).map(function(F){return Buffer.from(F)})},encodedString:function(D,F){return v("string",F).map(function(N){return N.toString(D)})},uintBE:w,uint8BE:w(1),uint16BE:w(2),uint32BE:w(4),uintLE:k,uint8LE:k(1),uint16LE:k(2),uint32LE:k(4),intBE:B,int8BE:B(1),int16BE:B(2),int32BE:B(4),intLE:L,int8LE:L(1),int16LE:L(2),int32LE:L(4),floatBE:v("floatBE",4).map(function(D){return D.readFloatBE(0)}),floatLE:v("floatLE",4).map(function(D){return D.readFloatLE(0)}),doubleBE:v("doubleBE",8).map(function(D){return D.readDoubleBE(0)}),doubleLE:v("doubleLE",8).map(function(D){return D.readDoubleLE(0)})},t.exports=n}])})})(K9,K9.exports);var P=K9.exports,I6=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC08\uDC26](?:\u200D\u2B1B)?|[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;function uv(r){return r==null?r:r.shiftToAll().normalize()}function ay(r){return r.includes("/")&&(r=r.substring(r.lastIndexOf("/")+1)),r.endsWith(".md")&&(r=r.substring(0,r.length-3)),r}P.alt(P.regex(new RegExp(I6(),"")),P.regex(/[0-9\p{Letter}_-]+/u).map(r=>r.toLocaleLowerCase()),P.whitespace.map(r=>"-"),P.any.map(r=>"")).many().map(r=>r.join(""));var P_=P.alt(P.regex(new RegExp(I6(),"")),P.regex(/[0-9\p{Letter}_-]+/u),P.whitespace.map(r=>" "),P.any.map(r=>" ")).many().map(r=>r.join("").split(/\s+/).join(" ").trim());function B_(r){return P_.tryParse(r)}function R_(r){return r=uv(r),r=Be.fromObject(Object.fromEntries(Object.entries(r.toObject()).filter(([,e])=>e!=0))),r.toHuman()}var Iu;(function(r){function e(T,W=k6,j=!1){let I=t(T);if(!I)return W.renderNullAs;switch(I.type){case"null":return W.renderNullAs;case"string":return I.value;case"number":case"boolean":return""+I.value;case"html":return I.value.outerHTML;case"widget":return I.value.markdown();case"link":return I.value.markdown();case"function":return"<function>";case"array":let R="";return j&&(R+="["),R+=I.value.map(z=>e(z,W,!0)).join(", "),j&&(R+="]"),R;case"object":return"{ "+Object.entries(I.value).map(z=>z[0]+": "+e(z[1],W,!0)).join(", ")+" }";case"date":return I.value.second==0&&I.value.hour==0&&I.value.minute==0?I.value.toFormat(W.defaultDateFormat):I.value.toFormat(W.defaultDateTimeFormat);case"duration":return R_(I.value)}}r.toString=e;function t(T){return p(T)?{type:"null",value:T}:c(T)?{type:"number",value:T}:l(T)?{type:"string",value:T}:v(T)?{type:"boolean",value:T}:d(T)?{type:"duration",value:T}:h(T)?{type:"date",value:T}:w(T)?{type:"widget",value:T}:g(T)?{type:"array",value:T}:C(T)?{type:"link",value:T}:L(T)?{type:"function",value:T}:k(T)?{type:"html",value:T}:B(T)?{type:"object",value:T}:void 0}r.wrapValue=t;function i(T,W){if(B(T)){let j={};for(let[I,R]of Object.entries(T))j[I]=i(R,W);return j}else if(g(T)){let j=[];for(let I of T)j.push(i(I,W));return j}else return W(T)}r.mapLeaves=i;function s(T,W,j){if(T===void 0&&(T=null),W===void 0&&(W=null),T===null&&W===null)return 0;if(T===null)return-1;if(W===null)return 1;let I=t(T),R=t(W);if(I===void 0&&R===void 0)return 0;if(I===void 0)return-1;if(R===void 0)return 1;if(I.type!=R.type)return I.type.localeCompare(R.type);if(I.value===R.value)return 0;switch(I.type){case"string":return I.value.localeCompare(R.value);case"number":return I.value<R.value?-1:I.value==R.value?0:1;case"null":return 0;case"boolean":return I.value==R.value?0:I.value?1:-1;case"link":let z=I.value,U=R.value,q=j??(rt=>rt),re=q(z.path).localeCompare(q(U.path));if(re!=0)return re;let $=z.type.localeCompare(U.type);return $!=0?$:z.subpath&&!U.subpath?1:!z.subpath&&U.subpath?-1:!z.subpath&&!U.subpath?0:(z.subpath??"").localeCompare(U.subpath??"");case"date":return I.value<R.value?-1:I.value.equals(R.value)?0:1;case"duration":return I.value<R.value?-1:I.value.equals(R.value)?0:1;case"array":let Q=I.value,Te=R.value;for(let rt=0;rt<Math.min(Q.length,Te.length);rt++){let et=s(Q[rt],Te[rt]);if(et!=0)return et}return Q.length-Te.length;case"object":let ye=I.value,xe=R.value,De=Array.from(Object.keys(ye)),_e=Array.from(Object.keys(xe));De.sort(),_e.sort();let Mt=s(De,_e);if(Mt!=0)return Mt;for(let rt of De){let et=s(ye[rt],xe[rt]);if(et!=0)return et}return 0;case"widget":case"html":case"function":return 0}}r.compareValue=s;function n(T){return t(T)?.type}r.typeOf=n;function o(T){let W=t(T);if(!W)return!1;switch(W.type){case"number":return W.value!=0;case"string":return W.value.length>0;case"boolean":return W.value;case"link":return!!W.value.path;case"date":return W.value.toMillis()!=0;case"duration":return W.value.as("seconds")!=0;case"object":return Object.keys(W.value).length>0;case"array":return W.value.length>0;case"null":return!1;case"html":case"widget":case"function":return!0}}r.isTruthy=o;function a(T){if(T==null)return T;if(r.isArray(T))return[].concat(T.map(W=>a(W)));if(r.isObject(T)){let W={};for(let[j,I]of Object.entries(T))W[j]=a(I);return W}else return T}r.deepCopy=a;function l(T){return typeof T=="string"}r.isString=l;function c(T){return typeof T=="number"}r.isNumber=c;function h(T){return T instanceof Ye}r.isDate=h;function d(T){return T instanceof Be}r.isDuration=d;function p(T){return T==null}r.isNull=p;function g(T){return Array.isArray(T)}r.isArray=g;function v(T){return typeof T=="boolean"}r.isBoolean=v;function C(T){return T instanceof Z9}r.isLink=C;function w(T){return T instanceof Lu}r.isWidget=w;function k(T){return typeof HTMLElement<"u"?T instanceof HTMLElement:!1}r.isHtml=k;function B(T){return typeof T=="object"&&!k(T)&&!w(T)&&!g(T)&&!d(T)&&!h(T)&&!C(T)&&T!==void 0&&!p(T)}r.isObject=B;function L(T){return typeof T=="function"}r.isFunction=L})(Iu||(Iu={}));var ly;(function(r){function e(s){return Iu.isObject(s)&&Object.keys(s).length==2&&"key"in s&&"rows"in s}r.isElementGroup=e;function t(s){for(let n of s)if(!e(n))return!1;return!0}r.isGrouping=t;function i(s){if(t(s)){let n=0;for(let o of s)n+=i(o.rows);return n}else return s.length}r.count=i})(ly||(ly={}));var Z9=class r{constructor(e){M0(this,"path");M0(this,"display");M0(this,"subpath");M0(this,"embed");M0(this,"type");Object.assign(this,e)}static file(e,t=!1,i){return new r({path:e,embed:t,display:i,subpath:void 0,type:"file"})}static infer(e,t=!1,i){if(e.includes("#^")){let s=e.split("#^");return r.block(s[0],s[1],t,i)}else if(e.includes("#")){let s=e.split("#");return r.header(s[0],s[1],t,i)}else return r.file(e,t,i)}static header(e,t,i,s){return new r({path:e,embed:i,display:s,subpath:B_(t),type:"header"})}static block(e,t,i,s){return new r({path:e,embed:i,display:s,subpath:t,type:"block"})}static fromObject(e){return new r(e)}equals(e){return e==null||e==null?!1:this.path==e.path&&this.type==e.type&&this.subpath==e.subpath}toString(){return this.markdown()}toObject(){return{path:this.path,type:this.type,subpath:this.subpath,display:this.display,embed:this.embed}}withPath(e){return new r(Object.assign({},this,{path:e}))}withDisplay(e){return new r(Object.assign({},this,{display:e}))}withHeader(e){return r.header(this.path,e,this.embed,this.display)}toFile(){return r.file(this.path,this.embed,this.display)}toEmbed(){if(this.embed)return this;{let e=new r(this);return e.embed=!0,e}}fromEmbed(){if(this.embed){let e=new r(this);return e.embed=!1,e}else return this}markdown(){let e=(this.embed?"!":"")+"[["+this.obsidianLink();return this.display?e+="|"+this.display:(e+="|"+ay(this.path),(this.type=="header"||this.type=="block")&&(e+=" > "+this.subpath)),e+="]]",e}obsidianLink(){let e=this.path.replaceAll("|","\\|");return this.type=="header"?e+"#"+this.subpath?.replaceAll("|","\\|"):this.type=="block"?e+"#^"+this.subpath?.replaceAll("|","\\|"):e}fileName(){return ay(this.path).replace(".md","")}},Lu=class{constructor(e){M0(this,"$widget");this.$widget=e}},x6=class extends Lu{constructor(t,i){super("dataview:list-pair");M0(this,"key");M0(this,"value");this.key=t,this.value=i}markdown(){return`${Iu.toString(this.key)}: ${Iu.toString(this.value)}`}},D6=class extends Lu{constructor(t,i){super("dataview:external-link");M0(this,"url");M0(this,"display");this.url=t,this.display=i}markdown(){return`[${this.display??this.url}](${this.url})`}},cy;(function(r){function e(o,a){return new x6(o,a)}r.listPair=e;function t(o,a){return new D6(o,a)}r.externalLink=t;function i(o){return o.$widget==="dataview:list-pair"}r.isListPair=i;function s(o){return o.$widget==="dataview:external-link"}r.isExternalLink=s;function n(o){return i(o)||s(o)}r.isBuiltin=n})(cy||(cy={}));var Rt;(function(r){function e(p){return{type:"variable",name:p}}r.variable=e;function t(p){return{type:"literal",value:p}}r.literal=t;function i(p,g,v){return{type:"binaryop",left:p,op:g,right:v}}r.binaryOp=i;function s(p,g){return{type:"index",object:p,index:g}}r.index=s;function n(p){let g=p.split("."),v=r.variable(g[0]);for(let C=1;C<g.length;C++)v=r.index(v,r.literal(g[C]));return v}r.indexVariable=n;function o(p,g){return{type:"lambda",arguments:p,value:g}}r.lambda=o;function a(p,g){return{type:"function",func:p,arguments:g}}r.func=a;function l(p){return{type:"list",values:p}}r.list=l;function c(p){return{type:"object",values:p}}r.object=c;function h(p){return{type:"negated",child:p}}r.negate=h;function d(p){return p=="<="||p=="<"||p==">"||p==">="||p=="!="||p=="="}r.isCompareOp=d,r.NULL=r.literal(null)})(Rt||(Rt={}));var Yi;(function(r){function e(h){return{type:"tag",tag:h}}r.tag=e;function t(h){return{type:"csv",path:h}}r.csv=t;function i(h){return{type:"folder",folder:h}}r.folder=i;function s(h,d){return{type:"link",file:h,direction:d?"incoming":"outgoing"}}r.link=s;function n(h,d,p){return{type:"binaryop",left:h,op:d,right:p}}r.binaryOp=n;function o(h,d){return{type:"binaryop",left:h,op:"&",right:d}}r.and=o;function a(h,d){return{type:"binaryop",left:h,op:"|",right:d}}r.or=a;function l(h){return{type:"negate",child:h}}r.negate=l;function c(){return{type:"empty"}}r.empty=c})(Yi||(Yi={}));var uy=new RegExp(I6(),""),b6={year:Be.fromObject({years:1}),years:Be.fromObject({years:1}),yr:Be.fromObject({years:1}),yrs:Be.fromObject({years:1}),month:Be.fromObject({months:1}),months:Be.fromObject({months:1}),mo:Be.fromObject({months:1}),mos:Be.fromObject({months:1}),week:Be.fromObject({weeks:1}),weeks:Be.fromObject({weeks:1}),wk:Be.fromObject({weeks:1}),wks:Be.fromObject({weeks:1}),w:Be.fromObject({weeks:1}),day:Be.fromObject({days:1}),days:Be.fromObject({days:1}),d:Be.fromObject({days:1}),hour:Be.fromObject({hours:1}),hours:Be.fromObject({hours:1}),hr:Be.fromObject({hours:1}),hrs:Be.fromObject({hours:1}),h:Be.fromObject({hours:1}),minute:Be.fromObject({minutes:1}),minutes:Be.fromObject({minutes:1}),min:Be.fromObject({minutes:1}),mins:Be.fromObject({minutes:1}),m:Be.fromObject({minutes:1}),second:Be.fromObject({seconds:1}),seconds:Be.fromObject({seconds:1}),sec:Be.fromObject({seconds:1}),secs:Be.fromObject({seconds:1}),s:Be.fromObject({seconds:1})},E6={now:()=>Ye.local(),today:()=>Ye.local().startOf("day"),yesterday:()=>Ye.local().startOf("day").minus(Be.fromObject({days:1})),tomorrow:()=>Ye.local().startOf("day").plus(Be.fromObject({days:1})),sow:()=>Ye.local().startOf("week"),"start-of-week":()=>Ye.local().startOf("week"),eow:()=>Ye.local().endOf("week"),"end-of-week":()=>Ye.local().endOf("week"),soy:()=>Ye.local().startOf("year"),"start-of-year":()=>Ye.local().startOf("year"),eoy:()=>Ye.local().endOf("year"),"end-of-year":()=>Ye.local().endOf("year"),som:()=>Ye.local().startOf("month"),"start-of-month":()=>Ye.local().startOf("month"),eom:()=>Ye.local().endOf("month"),"end-of-month":()=>Ye.local().endOf("month")},S6=["FROM","WHERE","LIMIT","GROUP","FLATTEN"];function O_(r){let e=-1;for(;(e=r.indexOf("|",e+1))>=0;)if(!(e>0&&r[e-1]=="\\"))return[r.substring(0,e).replace(/\\\|/g,"|"),r.substring(e+1)];return[r.replace(/\\\|/g,"|"),void 0]}function G_(r){let[e,t]=O_(r);return Z9.infer(e,!1,t)}function _u(r,e,t){return P.seqMap(r,P.seq(P.optWhitespace,e,P.optWhitespace,r).many(),(i,s)=>{if(s.length==0)return i;let n=t(i,s[0][1],s[0][3]);for(let o=1;o<s.length;o++)n=t(n,s[o][1],s[o][3]);return n})}function U_(r,...e){return P.custom((t,i)=>(s,n)=>{let o=r._(s,n);if(!o.status)return o;for(let a of e){let l=a(o.value)._(s,o.index);if(!l.status)return o;o=l}return o})}var Di=P.createLanguage({number:r=>P.regexp(/-?[0-9]+(\.[0-9]+)?/).map(e=>Number.parseFloat(e)).desc("number"),string:r=>P.string('"').then(P.alt(r.escapeCharacter,P.noneOf('"\\')).atLeast(0).map(e=>e.join(""))).skip(P.string('"')).desc("string"),escapeCharacter:r=>P.string("\\").then(P.any).map(e=>e==='"'?'"':e==="\\"?"\\":"\\"+e),bool:r=>P.regexp(/true|false|True|False/).map(e=>e.toLowerCase()=="true").desc("boolean ('true' or 'false')"),tag:r=>P.seqMap(P.string("#"),P.alt(P.regexp(/[^\u2000-\u206F\u2E00-\u2E7F'!"#$%&()*+,.:;<=>?@^`{|}~\[\]\\\s]/).desc("text")).many(),(e,t)=>e+t.join("")).desc("tag ('#hello/stuff')"),identifier:r=>P.seqMap(P.alt(P.regexp(/\p{Letter}/u),P.regexp(uy).desc("text")),P.alt(P.regexp(/[0-9\p{Letter}_-]/u),P.regexp(uy).desc("text")).many(),(e,t)=>e+t.join("")).desc("variable identifier"),link:r=>P.regexp(/\[\[([^\[\]]*?)\]\]/u,1).map(e=>G_(e)).desc("file link"),embedLink:r=>P.seqMap(P.string("!").atMost(1),r.link,(e,t)=>(e.length>0&&(t.embed=!0),t)).desc("file link"),binaryPlusMinus:r=>P.regexp(/\+|-/).map(e=>e).desc("'+' or '-'"),binaryMulDiv:r=>P.regexp(/\*|\/|%/).map(e=>e).desc("'*' or '/' or '%'"),binaryCompareOp:r=>P.regexp(/>=|<=|!=|>|<|=/).map(e=>e).desc("'>=' or '<=' or '!=' or '=' or '>' or '<'"),binaryBooleanOp:r=>P.regexp(/and|or|&|\|/i).map(e=>e.toLowerCase()=="and"?"&":e.toLowerCase()=="or"?"|":e).desc("'and' or 'or'"),rootDate:r=>P.seqMap(P.regexp(/\d{4}/),P.string("-"),P.regexp(/\d{2}/),(e,t,i)=>Ye.fromObject({year:Number.parseInt(e),month:Number.parseInt(i)})).desc("date in format YYYY-MM[-DDTHH-MM-SS.MS]"),dateShorthand:r=>P.alt(...Object.keys(E6).sort((e,t)=>t.length-e.length).map(P.string)),date:r=>U_(r.rootDate,e=>P.seqMap(P.string("-"),P.regexp(/\d{2}/),(t,i)=>e.set({day:Number.parseInt(i)})),e=>P.seqMap(P.string("T"),P.regexp(/\d{2}/),(t,i)=>e.set({hour:Number.parseInt(i)})),e=>P.seqMap(P.string(":"),P.regexp(/\d{2}/),(t,i)=>e.set({minute:Number.parseInt(i)})),e=>P.seqMap(P.string(":"),P.regexp(/\d{2}/),(t,i)=>e.set({second:Number.parseInt(i)})),e=>P.alt(P.seqMap(P.string("."),P.regexp(/\d{3}/),(t,i)=>e.set({millisecond:Number.parseInt(i)})),P.succeed(e)),e=>P.alt(P.seqMap(P.string("+").or(P.string("-")),P.regexp(/\d{1,2}(:\d{2})?/),(t,i)=>e.setZone("UTC"+t+i,{keepLocalTime:!0})),P.seqMap(P.string("Z"),()=>e.setZone("utc",{keepLocalTime:!0})),P.seqMap(P.string("["),P.regexp(/[0-9A-Za-z+-\/]+/u),P.string("]"),(t,i,s)=>e.setZone(i,{keepLocalTime:!0})))).assert(e=>e.isValid,"valid date").desc("date in format YYYY-MM[-DDTHH-MM-SS.MS]"),datePlus:r=>P.alt(r.dateShorthand.map(e=>E6[e]()),r.date).desc("date in format YYYY-MM[-DDTHH-MM-SS.MS] or in shorthand"),durationType:r=>P.alt(...Object.keys(b6).sort((e,t)=>t.length-e.length).map(P.string)),duration:r=>P.seqMap(r.number,P.optWhitespace,r.durationType,(e,t,i)=>b6[i].mapUnits(s=>s*e)).sepBy1(P.string(",").trim(P.optWhitespace).or(P.optWhitespace)).map(e=>e.reduce((t,i)=>t.plus(i))).desc("duration like 4hr2min"),rawNull:r=>P.string("null"),tagSource:r=>r.tag.map(e=>Yi.tag(e)),csvSource:r=>P.seqMap(P.string("csv(").skip(P.optWhitespace),r.string,P.string(")"),(e,t,i)=>Yi.csv(t)),linkIncomingSource:r=>r.link.map(e=>Yi.link(e.path,!0)),linkOutgoingSource:r=>P.seqMap(P.string("outgoing(").skip(P.optWhitespace),r.link,P.string(")"),(e,t,i)=>Yi.link(t.path,!1)),folderSource:r=>r.string.map(e=>Yi.folder(e)),parensSource:r=>P.seqMap(P.string("("),P.optWhitespace,r.source,P.optWhitespace,P.string(")"),(e,t,i,s,n)=>i),negateSource:r=>P.seqMap(P.alt(P.string("-"),P.string("!")),r.atomSource,(e,t)=>Yi.negate(t)),atomSource:r=>P.alt(r.parensSource,r.negateSource,r.linkOutgoingSource,r.linkIncomingSource,r.folderSource,r.tagSource,r.csvSource),binaryOpSource:r=>_u(r.atomSource,r.binaryBooleanOp.map(e=>e),Yi.binaryOp),source:r=>r.binaryOpSource,variableField:r=>r.identifier.chain(e=>S6.includes(e.toUpperCase())?P.fail("Variable fields cannot be a keyword ("+S6.join(" or ")+")"):P.succeed(Rt.variable(e))).desc("variable"),numberField:r=>r.number.map(e=>Rt.literal(e)).desc("number"),stringField:r=>r.string.map(e=>Rt.literal(e)).desc("string"),boolField:r=>r.bool.map(e=>Rt.literal(e)).desc("boolean"),dateField:r=>P.seqMap(P.string("date("),P.optWhitespace,r.datePlus,P.optWhitespace,P.string(")"),(e,t,i,s,n)=>Rt.literal(i)).desc("date"),durationField:r=>P.seqMap(P.string("dur("),P.optWhitespace,r.duration,P.optWhitespace,P.string(")"),(e,t,i,s,n)=>Rt.literal(i)).desc("duration"),nullField:r=>r.rawNull.map(e=>Rt.NULL),linkField:r=>r.link.map(e=>Rt.literal(e)),listField:r=>r.field.sepBy(P.string(",").trim(P.optWhitespace)).wrap(P.string("[").skip(P.optWhitespace),P.optWhitespace.then(P.string("]"))).map(e=>Rt.list(e)).desc("list ('[1, 2, 3]')"),objectField:r=>P.seqMap(r.identifier.or(r.string),P.string(":").trim(P.optWhitespace),r.field,(e,t,i)=>({name:e,value:i})).sepBy(P.string(",").trim(P.optWhitespace)).wrap(P.string("{").skip(P.optWhitespace),P.optWhitespace.then(P.string("}"))).map(e=>{let t={};for(let i of e)t[i.name]=i.value;return Rt.object(t)}).desc("object ('{ a: 1, b: 2 }')"),atomInlineField:r=>P.alt(r.date,r.duration.map(e=>uv(e)),r.string,r.tag,r.embedLink,r.bool,r.number,r.rawNull),inlineFieldList:r=>r.atomInlineField.sepBy(P.string(",").trim(P.optWhitespace).lookahead(r.atomInlineField)),inlineField:r=>P.alt(P.seqMap(r.atomInlineField,P.string(",").trim(P.optWhitespace),r.inlineFieldList,(e,t,i)=>[e].concat(i)),r.atomInlineField),atomField:r=>P.alt(r.embedLink.map(e=>Rt.literal(e)),r.negatedField,r.linkField,r.listField,r.objectField,r.lambdaField,r.parensField,r.boolField,r.numberField,r.stringField,r.dateField,r.durationField,r.nullField,r.variableField),indexField:r=>P.seqMap(r.atomField,P.alt(r.dotPostfix,r.indexPostfix,r.functionPostfix).many(),(e,t)=>{let i=e;for(let s of t)switch(s.type){case"dot":i=Rt.index(i,Rt.literal(s.field));break;case"index":i=Rt.index(i,s.field);break;case"function":i=Rt.func(i,s.fields);break}return i}),negatedField:r=>P.seqMap(P.string("!"),r.indexField,(e,t)=>Rt.negate(t)).desc("negated field"),parensField:r=>P.seqMap(P.string("("),P.optWhitespace,r.field,P.optWhitespace,P.string(")"),(e,t,i,s,n)=>i),lambdaField:r=>P.seqMap(r.identifier.sepBy(P.string(",").trim(P.optWhitespace)).wrap(P.string("(").trim(P.optWhitespace),P.string(")").trim(P.optWhitespace)),P.string("=>").trim(P.optWhitespace),r.field,(e,t,i)=>({type:"lambda",arguments:e,value:i})),dotPostfix:r=>P.seqMap(P.string("."),r.identifier,(e,t)=>({type:"dot",field:t})),indexPostfix:r=>P.seqMap(P.string("["),P.optWhitespace,r.field,P.optWhitespace,P.string("]"),(e,t,i,s,n)=>({type:"index",field:i})),functionPostfix:r=>P.seqMap(P.string("("),P.optWhitespace,r.field.sepBy(P.string(",").trim(P.optWhitespace)),P.optWhitespace,P.string(")"),(e,t,i,s,n)=>({type:"function",fields:i})),binaryMulDivField:r=>_u(r.indexField,r.binaryMulDiv,Rt.binaryOp),binaryPlusMinusField:r=>_u(r.binaryMulDivField,r.binaryPlusMinus,Rt.binaryOp),binaryCompareField:r=>_u(r.binaryPlusMinusField,r.binaryCompareOp,Rt.binaryOp),binaryBooleanField:r=>_u(r.binaryCompareField,r.binaryBooleanOp,Rt.binaryOp),binaryOpField:r=>r.binaryBooleanField,field:r=>r.binaryOpField});function V_(r){try{return X9.success(Di.field.tryParse(r))}catch(e){return X9.failure(""+e)}}var Q9;(function(r){function e(i,s){return{name:i,field:s}}r.named=e;function t(i,s){return{field:i,direction:s}}r.sortBy=t})(Q9||(Q9={}));function z_(r){return P.custom((e,t)=>(i,s)=>{let n=r._(i,s);return n.status?Object.assign({},n,{value:[n.value,i.substring(s,n.index)]}):n})}function W_(r){return r.split(/[\r\n]+/).map(e=>e.trim()).join("")}function hy(r,e){return P.eof.map(r).or(P.whitespace.then(e))}var hv=P.createLanguage({queryType:r=>P.alt(P.regexp(/TABLE|LIST|TASK|CALENDAR/i)).map(e=>e.toLowerCase()).desc("query type ('TABLE', 'LIST', 'TASK', or 'CALENDAR')"),explicitNamedField:r=>P.seqMap(Di.field.skip(P.whitespace),P.regexp(/AS/i).skip(P.whitespace),Di.identifier.or(Di.string),(e,t,i)=>Q9.named(i,e)),comment:()=>P.Parser((r,e)=>{let t=r.substring(e);if(!t.startsWith("//"))return P.makeFailure(e,"Not a comment");t=t.split(`
|
|
`)[0];let i=t.substring(2).trim();return P.makeSuccess(e+t.length,i)}),namedField:r=>P.alt(r.explicitNamedField,z_(Di.field).map(([e,t])=>Q9.named(W_(t),e))),sortField:r=>P.seqMap(Di.field.skip(P.optWhitespace),P.regexp(/ASCENDING|DESCENDING|ASC|DESC/i).atMost(1),(e,t)=>{let i=t.length==0?"ascending":t[0].toLowerCase();return i=="desc"&&(i="descending"),i=="asc"&&(i="ascending"),{field:e,direction:i}}),headerClause:r=>r.queryType.chain(e=>{switch(e){case"table":return hy(()=>({type:e,fields:[],showId:!0}),P.seqMap(P.regexp(/WITHOUT\s+ID/i).skip(P.optWhitespace).atMost(1),P.sepBy(r.namedField,P.string(",").trim(P.optWhitespace)),(t,i)=>({type:e,fields:i,showId:t.length==0})));case"list":return hy(()=>({type:e,format:void 0,showId:!0}),P.seqMap(P.regexp(/WITHOUT\s+ID/i).skip(P.optWhitespace).atMost(1),Di.field.atMost(1),(t,i)=>({type:e,format:i.length==1?i[0]:void 0,showId:t.length==0})));case"task":return P.succeed({type:e});case"calendar":return P.whitespace.then(P.seqMap(r.namedField,t=>({type:e,showId:!0,field:t})));default:return P.fail(`Unrecognized query type '${e}'`)}}).desc("TABLE or LIST or TASK or CALENDAR"),fromClause:r=>P.seqMap(P.regexp(/FROM/i),P.whitespace,Di.source,(e,t,i)=>i),whereClause:r=>P.seqMap(P.regexp(/WHERE/i),P.whitespace,Di.field,(e,t,i)=>({type:"where",clause:i})).desc("WHERE <expression>"),sortByClause:r=>P.seqMap(P.regexp(/SORT/i),P.whitespace,r.sortField.sepBy1(P.string(",").trim(P.optWhitespace)),(e,t,i)=>({type:"sort",fields:i})).desc("SORT field [ASC/DESC]"),limitClause:r=>P.seqMap(P.regexp(/LIMIT/i),P.whitespace,Di.field,(e,t,i)=>({type:"limit",amount:i})).desc("LIMIT <value>"),flattenClause:r=>P.seqMap(P.regexp(/FLATTEN/i).skip(P.whitespace),r.namedField,(e,t)=>({type:"flatten",field:t})).desc("FLATTEN <value> [AS <name>]"),groupByClause:r=>P.seqMap(P.regexp(/GROUP BY/i).skip(P.whitespace),r.namedField,(e,t)=>({type:"group",field:t})).desc("GROUP BY <value> [AS <name>]"),clause:r=>P.alt(r.fromClause,r.whereClause,r.sortByClause,r.limitClause,r.groupByClause,r.flattenClause),query:r=>P.seqMap(r.headerClause.trim(i6),r.fromClause.trim(i6).atMost(1),r.clause.trim(i6).many(),(e,t,i)=>({header:e,source:t.length==0?Yi.folder(""):t[0],operations:i,settings:k6}))}),i6=P.alt(P.whitespace,hv.comment).many().map(r=>r.join("")),H_=r=>r?r.plugins.plugins.dataview?.api:window.DataviewAPI,j_=r=>r.plugins.enabledPlugins.has("dataview");Xi.DATE_SHORTHANDS=E6;Xi.DURATION_TYPES=b6;Xi.EXPRESSION=Di;Xi.KEYWORDS=S6;Xi.QUERY_LANGUAGE=hv;Xi.getAPI=H_;Xi.isPluginEnabled=j_;Xi.parseField=V_});var mv=Pe((Bu,L6)=>{(function(r,e){typeof Bu=="object"&&typeof L6=="object"?L6.exports=e():typeof define=="function"&&define.amd?define([],e):typeof Bu=="object"?Bu.Parsimmon=e():r.Parsimmon=e()})(typeof self<"u"?self:Bu,function(){return function(r){var e={};function t(i){if(e[i])return e[i].exports;var s=e[i]={i,l:!1,exports:{}};return r[i].call(s.exports,s,s.exports,t),s.l=!0,s.exports}return t.m=r,t.c=e,t.d=function(i,s,n){t.o(i,s)||Object.defineProperty(i,s,{configurable:!1,enumerable:!0,get:n})},t.r=function(i){Object.defineProperty(i,"__esModule",{value:!0})},t.n=function(i){var s=i&&i.__esModule?function(){return i.default}:function(){return i};return t.d(s,"a",s),s},t.o=function(i,s){return Object.prototype.hasOwnProperty.call(i,s)},t.p="",t(t.s=0)}([function(r,e,t){"use strict";function i(A){if(!(this instanceof i))return new i(A);this._=A}var s=i.prototype;function n(A,O){for(var D=0;D<A;D++)O(D)}function o(A,O,D){return function(F,N){n(N.length,function(G){F(N[G],G,N)})}(function(F,N,G){O=A(O,F,N,G)},D),O}function a(A,O){return o(function(D,F,N,G){return D.concat([A(F,N,G)])},[],O)}function l(A,O){var D={v:0,buf:O};return n(A,function(){var F;D={v:D.v<<1|(F=D.buf,F[0]>>7),buf:function(N){var G=o(function(V,X,ee,be){return V.concat(ee===be.length-1?Buffer.from([X,0]).readUInt16BE(0):be.readUInt16BE(ee))},[],N);return Buffer.from(a(function(V){return(V<<1&65535)>>8},G))}(D.buf)}}),D}function c(){return typeof Buffer<"u"}function h(){if(!c())throw new Error("Buffer global does not exist; please use webpack if you need to parse Buffers in the browser.")}function d(A){h();var O=o(function(G,V){return G+V},0,A);if(O%8!=0)throw new Error("The bits ["+A.join(", ")+"] add up to "+O+" which is not an even number of bytes; the total should be divisible by 8");var D,F=O/8,N=(D=function(G){return G>48},o(function(G,V){return G||(D(V)?V:G)},null,A));if(N)throw new Error(N+" bit range requested exceeds 48 bit (6 byte) Number max.");return new i(function(G,V){var X=F+V;return X>G.length?j(V,F.toString()+" bytes"):W(X,o(function(ee,be){var Ve=l(be,ee.buf);return{coll:ee.coll.concat(Ve.v),buf:Ve.buf}},{coll:[],buf:G.slice(V,X)},A).coll)})}function p(A,O){return new i(function(D,F){return h(),F+O>D.length?j(F,O+" bytes for "+A):W(F+O,D.slice(F,F+O))})}function g(A,O){if(typeof(D=O)!="number"||Math.floor(D)!==D||O<0||O>6)throw new Error(A+" requires integer length in range [0, 6].");var D}function v(A){return g("uintBE",A),p("uintBE("+A+")",A).map(function(O){return O.readUIntBE(0,A)})}function C(A){return g("uintLE",A),p("uintLE("+A+")",A).map(function(O){return O.readUIntLE(0,A)})}function w(A){return g("intBE",A),p("intBE("+A+")",A).map(function(O){return O.readIntBE(0,A)})}function k(A){return g("intLE",A),p("intLE("+A+")",A).map(function(O){return O.readIntLE(0,A)})}function B(A){return A instanceof i}function L(A){return{}.toString.call(A)==="[object Array]"}function T(A){return c()&&Buffer.isBuffer(A)}function W(A,O){return{status:!0,index:A,value:O,furthest:-1,expected:[]}}function j(A,O){return L(O)||(O=[O]),{status:!1,index:-1,value:null,furthest:A,expected:O}}function I(A,O){if(!O||A.furthest>O.furthest)return A;var D=A.furthest===O.furthest?function(F,N){if(function(){if(i._supportsSet!==void 0)return i._supportsSet;var Vt=typeof Set<"u";return i._supportsSet=Vt,Vt}()&&Array.from){for(var G=new Set(F),V=0;V<N.length;V++)G.add(N[V]);var X=Array.from(G);return X.sort(),X}for(var ee={},be=0;be<F.length;be++)ee[F[be]]=!0;for(var Ve=0;Ve<N.length;Ve++)ee[N[Ve]]=!0;var mt=[];for(var Ze in ee)({}).hasOwnProperty.call(ee,Ze)&&mt.push(Ze);return mt.sort(),mt}(A.expected,O.expected):O.expected;return{status:A.status,index:A.index,value:A.value,furthest:O.furthest,expected:D}}var R={};function z(A,O){if(T(A))return{offset:O,line:-1,column:-1};A in R||(R[A]={});for(var D=R[A],F=0,N=0,G=0,V=O;V>=0;){if(V in D){F=D[V].line,G===0&&(G=D[V].lineStart);break}(A.charAt(V)===`
|
|
`||A.charAt(V)==="\r"&&A.charAt(V+1)!==`
|
|
`)&&(N++,G===0&&(G=V+1)),V--}var X=F+N,ee=O-G;return D[O]={line:X,lineStart:G},{offset:O,line:X+1,column:ee+1}}function U(A){if(!B(A))throw new Error("not a parser: "+A)}function q(A,O){return typeof A=="string"?A.charAt(O):A[O]}function re(A){if(typeof A!="number")throw new Error("not a number: "+A)}function $(A){if(typeof A!="function")throw new Error("not a function: "+A)}function Q(A){if(typeof A!="string")throw new Error("not a string: "+A)}var Te=2,ye=3,xe=8,De=5*xe,_e=4*xe,Mt=" ";function rt(A,O){return new Array(O+1).join(A)}function et(A,O,D){var F=O-A.length;return F<=0?A:rt(D,F)+A}function gt(A,O,D,F){return{from:A-O>0?A-O:0,to:A+D>F?F:A+D}}function Dt(A,O){var D,F,N,G,V,X=O.index,ee=X.offset,be=1;if(ee===A.length)return"Got the end of the input";if(T(A)){var Ve=ee-ee%xe,mt=ee-Ve,Ze=gt(Ve,De,_e+xe,A.length),Vt=a(function(dt){return a(function(L0){return et(L0.toString(16),2,"0")},dt)},function(dt,L0){var Re=dt.length,f0=[],w0=0;if(Re<=L0)return[dt.slice()];for(var g0=0;g0<Re;g0++)f0[w0]||f0.push([]),f0[w0].push(dt[g0]),(g0+1)%L0==0&&w0++;return f0}(A.slice(Ze.from,Ze.to).toJSON().data,xe));G=function(dt){return dt.from===0&&dt.to===1?{from:dt.from,to:dt.to}:{from:dt.from/xe,to:Math.floor(dt.to/xe)}}(Ze),F=Ve/xe,D=3*mt,mt>=4&&(D+=1),be=2,N=a(function(dt){return dt.length<=4?dt.join(" "):dt.slice(0,4).join(" ")+" "+dt.slice(4).join(" ")},Vt),(V=(8*(G.to>0?G.to-1:G.to)).toString(16).length)<2&&(V=2)}else{var At=A.split(/\r\n|[\n\r\u2028\u2029]/);D=X.column-1,F=X.line-1,G=gt(F,Te,ye,At.length),N=At.slice(G.from,G.to),V=G.to.toString().length}var j0=F-G.from;return T(A)&&(V=(8*(G.to>0?G.to-1:G.to)).toString(16).length)<2&&(V=2),o(function(dt,L0,Re){var f0,w0=Re===j0,g0=w0?"> ":Mt;return f0=T(A)?et((8*(G.from+Re)).toString(16),V,"0"):et((G.from+Re+1).toString(),V," "),[].concat(dt,[g0+f0+" | "+L0],w0?[Mt+rt(" ",V)+" | "+et("",D," ")+rt("^",be)]:[])},[],N).join(`
|
|
`)}function I0(A,O){return[`
|
|
`,"-- PARSING FAILED "+rt("-",50),`
|
|
|
|
`,Dt(A,O),`
|
|
|
|
`,(D=O.expected,D.length===1?`Expected:
|
|
|
|
`+D[0]:`Expected one of the following:
|
|
|
|
`+D.join(", ")),`
|
|
`].join("");var D}function de(A){return A.flags!==void 0?A.flags:[A.global?"g":"",A.ignoreCase?"i":"",A.multiline?"m":"",A.unicode?"u":"",A.sticky?"y":""].join("")}function oe(){for(var A=[].slice.call(arguments),O=A.length,D=0;D<O;D+=1)U(A[D]);return i(function(F,N){for(var G,V=new Array(O),X=0;X<O;X+=1){if(!(G=I(A[X]._(F,N),G)).status)return G;V[X]=G.value,N=G.index}return I(W(N,V),G)})}function ve(){var A=[].slice.call(arguments);if(A.length===0)throw new Error("seqMap needs at least one argument");var O=A.pop();return $(O),oe.apply(null,A).map(function(D){return O.apply(null,D)})}function Yt(){var A=[].slice.call(arguments),O=A.length;if(O===0)return i0("zero alternates");for(var D=0;D<O;D+=1)U(A[D]);return i(function(F,N){for(var G,V=0;V<A.length;V+=1)if((G=I(A[V]._(F,N),G)).status)return G;return G})}function Ut(A,O){return r0(A,O).or(p0([]))}function r0(A,O){return U(A),U(O),ve(A,O.then(A).many(),function(D,F){return[D].concat(F)})}function Ft(A){Q(A);var O="'"+A+"'";return i(function(D,F){var N=F+A.length,G=D.slice(F,N);return G===A?W(N,G):j(F,O)})}function it(A,O){(function(N){if(!(N instanceof RegExp))throw new Error("not a regexp: "+N);for(var G=de(N),V=0;V<G.length;V++){var X=G.charAt(V);if(X!=="i"&&X!=="m"&&X!=="u"&&X!=="s")throw new Error('unsupported regexp flag "'+X+'": '+N)}})(A),arguments.length>=2?re(O):O=0;var D=function(N){return RegExp("^(?:"+N.source+")",de(N))}(A),F=""+A;return i(function(N,G){var V=D.exec(N.slice(G));if(V){if(0<=O&&O<=V.length){var X=V[0],ee=V[O];return W(G+X.length,ee)}return j(G,"valid match group (0 to "+V.length+") in "+F)}return j(G,F)})}function p0(A){return i(function(O,D){return W(D,A)})}function i0(A){return i(function(O,D){return j(D,A)})}function C0(A){if(B(A))return i(function(O,D){var F=A._(O,D);return F.index=D,F.value="",F});if(typeof A=="string")return C0(Ft(A));if(A instanceof RegExp)return C0(it(A));throw new Error("not a string, regexp, or parser: "+A)}function Zr(A){return U(A),i(function(O,D){var F=A._(O,D),N=O.slice(D,F.index);return F.status?j(D,'not "'+N+'"'):W(D,null)})}function wt(A){return $(A),i(function(O,D){var F=q(O,D);return D<O.length&&A(F)?W(D+1,F):j(D,"a character/byte matching "+A)})}function Fn(A,O){arguments.length<2&&(O=A,A=void 0);var D=i(function(F,N){return D._=O()._,D._(F,N)});return A?D.desc(A):D}function Ei(){return i0("fantasy-land/empty")}s.parse=function(A){if(typeof A!="string"&&!T(A))throw new Error(".parse must be called with a string or Buffer as its argument");var O,D=this.skip(An)._(A,0);return O=D.status?{status:!0,value:D.value}:{status:!1,index:z(A,D.furthest),expected:D.expected},delete R[A],O},s.tryParse=function(A){var O=this.parse(A);if(O.status)return O.value;var D=I0(A,O),F=new Error(D);throw F.type="ParsimmonError",F.result=O,F},s.assert=function(A,O){return this.chain(function(D){return A(D)?p0(D):i0(O)})},s.or=function(A){return Yt(this,A)},s.trim=function(A){return this.wrap(A,A)},s.wrap=function(A,O){return ve(A,this,O,function(D,F){return F})},s.thru=function(A){return A(this)},s.then=function(A){return U(A),oe(this,A).map(function(O){return O[1]})},s.many=function(){var A=this;return i(function(O,D){for(var F=[],N=void 0;;){if(!(N=I(A._(O,D),N)).status)return I(W(D,F),N);if(D===N.index)throw new Error("infinite loop detected in .many() parser --- calling .many() on a parser which can accept zero characters is usually the cause");D=N.index,F.push(N.value)}})},s.tieWith=function(A){return Q(A),this.map(function(O){if(function(N){if(!L(N))throw new Error("not an array: "+N)}(O),O.length){Q(O[0]);for(var D=O[0],F=1;F<O.length;F++)Q(O[F]),D+=A+O[F];return D}return""})},s.tie=function(){return this.tieWith("")},s.times=function(A,O){var D=this;return arguments.length<2&&(O=A),re(A),re(O),i(function(F,N){for(var G=[],V=void 0,X=void 0,ee=0;ee<A;ee+=1){if(X=I(V=D._(F,N),X),!V.status)return X;N=V.index,G.push(V.value)}for(;ee<O&&(X=I(V=D._(F,N),X),V.status);ee+=1)N=V.index,G.push(V.value);return I(W(N,G),X)})},s.result=function(A){return this.map(function(){return A})},s.atMost=function(A){return this.times(0,A)},s.atLeast=function(A){return ve(this.times(A),this.many(),function(O,D){return O.concat(D)})},s.map=function(A){$(A);var O=this;return i(function(D,F){var N=O._(D,F);return N.status?I(W(N.index,A(N.value)),N):N})},s.contramap=function(A){$(A);var O=this;return i(function(D,F){var N=O.parse(A(D.slice(F)));return N.status?W(F+D.length,N.value):N})},s.promap=function(A,O){return $(A),$(O),this.contramap(A).map(O)},s.skip=function(A){return oe(this,A).map(function(O){return O[0]})},s.mark=function(){return ve(Si,this,Si,function(A,O,D){return{start:A,value:O,end:D}})},s.node=function(A){return ve(Si,this,Si,function(O,D,F){return{name:A,value:D,start:O,end:F}})},s.sepBy=function(A){return Ut(this,A)},s.sepBy1=function(A){return r0(this,A)},s.lookahead=function(A){return this.skip(C0(A))},s.notFollowedBy=function(A){return this.skip(Zr(A))},s.desc=function(A){L(A)||(A=[A]);var O=this;return i(function(D,F){var N=O._(D,F);return N.status||(N.expected=A),N})},s.fallback=function(A){return this.or(p0(A))},s.ap=function(A){return ve(A,this,function(O,D){return O(D)})},s.chain=function(A){var O=this;return i(function(D,F){var N=O._(D,F);return N.status?I(A(N.value)._(D,N.index),N):N})},s.concat=s.or,s.empty=Ei,s.of=p0,s["fantasy-land/ap"]=s.ap,s["fantasy-land/chain"]=s.chain,s["fantasy-land/concat"]=s.concat,s["fantasy-land/empty"]=s.empty,s["fantasy-land/of"]=s.of,s["fantasy-land/map"]=s.map;var Si=i(function(A,O){return W(O,z(A,O))}),Zi=i(function(A,O){return O>=A.length?j(O,"any character/byte"):W(O+1,q(A,O))}),Qi=i(function(A,O){return W(A.length,A.slice(O))}),An=i(function(A,O){return O<A.length?j(O,"EOF"):W(O,null)}),kn=it(/[0-9]/).desc("a digit"),In=it(/[0-9]*/).desc("optional digits"),Fo=it(/[a-z]/i).desc("a letter"),xl=it(/[a-z]*/i).desc("optional letters"),Ln=it(/\s*/).desc("optional whitespace"),Dl=it(/\s+/).desc("whitespace"),Ao=Ft("\r"),Ns=Ft(`
|
|
`),Mn=Ft(`\r
|
|
`),Nn=Yt(Mn,Ns,Ao).desc("newline"),ko=Yt(Nn,An);i.all=Qi,i.alt=Yt,i.any=Zi,i.cr=Ao,i.createLanguage=function(A){var O={};for(var D in A)({}).hasOwnProperty.call(A,D)&&function(F){O[F]=Fn(function(){return A[F](O)})}(D);return O},i.crlf=Mn,i.custom=function(A){return i(A(W,j))},i.digit=kn,i.digits=In,i.empty=Ei,i.end=ko,i.eof=An,i.fail=i0,i.formatError=I0,i.index=Si,i.isParser=B,i.lazy=Fn,i.letter=Fo,i.letters=xl,i.lf=Ns,i.lookahead=C0,i.makeFailure=j,i.makeSuccess=W,i.newline=Nn,i.noneOf=function(A){return wt(function(O){return A.indexOf(O)<0}).desc("none of '"+A+"'")},i.notFollowedBy=Zr,i.of=p0,i.oneOf=function(A){for(var O=A.split(""),D=0;D<O.length;D++)O[D]="'"+O[D]+"'";return wt(function(F){return A.indexOf(F)>=0}).desc(O)},i.optWhitespace=Ln,i.Parser=i,i.range=function(A,O){return wt(function(D){return A<=D&&D<=O}).desc(A+"-"+O)},i.regex=it,i.regexp=it,i.sepBy=Ut,i.sepBy1=r0,i.seq=oe,i.seqMap=ve,i.seqObj=function(){for(var A,O={},D=0,F=(A=arguments,Array.prototype.slice.call(A)),N=F.length,G=0;G<N;G+=1){var V=F[G];if(!B(V)){if(L(V)&&V.length===2&&typeof V[0]=="string"&&B(V[1])){var X=V[0];if(Object.prototype.hasOwnProperty.call(O,X))throw new Error("seqObj: duplicate key "+X);O[X]=!0,D++;continue}throw new Error("seqObj arguments must be parsers or [string, parser] array pairs.")}}if(D===0)throw new Error("seqObj expects at least one named parser, found zero");return i(function(ee,be){for(var Ve,mt={},Ze=0;Ze<N;Ze+=1){var Vt,At;if(L(F[Ze])?(Vt=F[Ze][0],At=F[Ze][1]):(Vt=null,At=F[Ze]),!(Ve=I(At._(ee,be),Ve)).status)return Ve;Vt&&(mt[Vt]=Ve.value),be=Ve.index}return I(W(be,mt),Ve)})},i.string=Ft,i.succeed=p0,i.takeWhile=function(A){return $(A),i(function(O,D){for(var F=D;F<O.length&&A(q(O,F));)F++;return W(F,O.slice(D,F))})},i.test=wt,i.whitespace=Dl,i["fantasy-land/empty"]=Ei,i["fantasy-land/of"]=p0,i.Binary={bitSeq:d,bitSeqObj:function(A){h();var O={},D=0,F=a(function(G){if(L(G)){var V=G;if(V.length!==2)throw new Error("["+V.join(", ")+"] should be length 2, got length "+V.length);if(Q(V[0]),re(V[1]),Object.prototype.hasOwnProperty.call(O,V[0]))throw new Error("duplicate key in bitSeqObj: "+V[0]);return O[V[0]]=!0,D++,V}return re(G),[null,G]},A);if(D<1)throw new Error("bitSeqObj expects at least one named pair, got ["+A.join(", ")+"]");var N=a(function(G){return G[0]},F);return d(a(function(G){return G[1]},F)).map(function(G){return o(function(V,X){return X[0]!==null&&(V[X[0]]=X[1]),V},{},a(function(V,X){return[V,G[X]]},N))})},byte:function(A){if(h(),re(A),A>255)throw new Error("Value specified to byte constructor ("+A+"=0x"+A.toString(16)+") is larger in value than a single byte.");var O=(A>15?"0x":"0x0")+A.toString(16);return i(function(D,F){var N=q(D,F);return N===A?W(F+1,N):j(F,O)})},buffer:function(A){return p("buffer",A).map(function(O){return Buffer.from(O)})},encodedString:function(A,O){return p("string",O).map(function(D){return D.toString(A)})},uintBE:v,uint8BE:v(1),uint16BE:v(2),uint32BE:v(4),uintLE:C,uint8LE:C(1),uint16LE:C(2),uint32LE:C(4),intBE:w,int8BE:w(1),int16BE:w(2),int32BE:w(4),intLE:k,int8LE:k(1),int16LE:k(2),int32LE:k(4),floatBE:p("floatBE",4).map(function(A){return A.readFloatBE(0)}),floatLE:p("floatLE",4).map(function(A){return A.readFloatLE(0)}),doubleBE:p("doubleBE",8).map(function(A){return A.readDoubleBE(0)}),doubleLE:p("doubleLE",8).map(function(A){return A.readDoubleLE(0)})},r.exports=i}])})});var Y_={};El(Y_,{default:()=>ip});module.exports=Tv(Y_);var _t=require("obsidian");var sp={};El(sp,{UI:()=>Rv,beta:()=>Fv,controls:()=>Av,default:()=>Ov,errors:()=>kv,features:()=>Iv,inputs:()=>Lv,notices:()=>Mv,plugin:()=>_v,query:()=>Nv,states:()=>Pv,statsFunctions:()=>Bv});var _v={custom:"Custom",dark:"Dark",default:"Default",folder:"Folder",folders:"Folders",filter:"Filter",nodeName:"Node name",info:"Info",light:"Light",name:"Extended graph",nodes:"Nodes",options:"Options",settings:"Settings",source:"Source",target:"Target",valuePlaceholder:"value..."},Fv={beta:"Beta",betaFeatures:"Beta features",enableCSS:"Enable CSS customization",enableCSSDesc:"Allows the plugin to inject custom CSS into the graph view for further customization. Write the name of the CSS snippet to use.",revertAction:"Revert action",revertActionDesc:"If the max number of nodes is reached, try to reverse last action instead of disabling the plugin"},Av={add:"Add",apply:"Apply",back:"Back",cancel:"Cancel",delete:"Delete",disable:"Disable",disableAll:"Disable all",disableInGraphView:"Disable in graph view",edit:"Edit",enable:"Enable",enableAll:"Enable all",enabled:"Enabled",enableInGraphView:"Enable in graph view",export:"Export",exportSettings:"Export settings",goTo:"Go to",hide:"Hide",hideAll:"Hide all",hideRow:"Hide row",import:"Import",importSettings:"Import settings",importSettingsAndReload:"Import settings and reload",interpolate:"Interpolate",manage:"Manage",moveUp:"Move up",moveDown:"Move down",no:"No",openLegend:"Open legend (tags, links, properties)",orCreateConfig:"Or create a new one",override:"Override",overrideConfig:"Override an existing configuration",page:"Page",pageCurrent:"Current page",pageFirst:"First page",pageLast:"Last page",pathRegexPlaceholder:'Enter path or "/regex/"...',resetGraph:"Reset graph",resetInGraphView:"Reset in graph view",reverse:"Reverse",save:"Save",selectAllNodes:"Select all nodes",selectConfigToImport:"Select a configuration to import",selectInvert:"Invert selection",setConfigName:"Set configuration name",show:"Show",showAll:"Show all",toggle:"Toggle",toggleAll:"Toggle all",toggleAllWithMoreThanOneNode:"With more than one node",rows:"rows",yes:"Yes"},kv={uri401:"Unauthorized URL (Code 401) while trying to get an image for a node. This probably means that the URL is invalid. No image will be loaded and this message can safely be ignored.",issueNeedView:"There was an issue with the plugin $t(plugin.name). Please close the graph view and open it again.",paletteNameRequired:"You need to choose a name for this color map"},Iv={ids:{arrows:"arrows",automation:"automation",beta:"beta",display:"display",elementsStats:"stats",filter:"filter",focus:"focus",folders:"folders",icons:"icons",images:"images",inputs:"inputs",layers:"layers",localGraph:"local graph",linkTypes:"links types",names:"names",performances:"performances",properties:"properties",shapes:"shapes",tags:"tags",zoom:"zoom"},animateDotsOnLinks:"Animate dots on links",animateDotsOnLinksDesc:"Animate dots on links when a node is hovered to show the flow of information",animateDotsOnLinksSpeed:"Animation speed",animateDotsOnLinksSpeedDesc:"Speed of the animation of the dots on links",arrows:"Arrows",arrowsDesc:"Customize how arrows are displayed",arrowsColor:"Custom color",arrowsColorDesc:"Pick a custom color for the links arrows",arrowsInvert:"Invert arrows",arrowsInvertDesc:"Invert the direction of the arrows on the links",arrowsFixedSize:"Fixed size",arrowsFixedSizeDesc:"Prevent the arrows to scale down or up when zooming",arrowsFlat:"Triangle arrows",arrowsFlatDesc:"Use triangle arrows instead of the default curved ones",arrowsOpaque:"Opaque arrows",arrowsOpaqueDesc:"Remove any transparency from the arrow so they are fully opaque",arrowsOpaqueAlways:"Always",arrowsOpaqueKeepFading:"Only when zoomed",arrowsScale:"Scale",arrowsScaleDesc:"Increase or decrease the scale of arrows",automation:"Automation",autoEnable:"Auto enable",autoEnableDesc:"Auto enable the plugin in graph views",autoReset:"Reset graph views after changes",autoResetDesc:"Reset the plugin in the graph views where it is enabled, if settings have changed after closing this tab",borderUnresolved:"Border of unresolved nodes",borderUnresolvedDesc:"If between 0 and 1 (excluded), unresolved nodes will only show an outside circle border instead of a full disk",brightness:"Brightness factor",brightnessDesc:"Multiply the brightness of tags, properties, and links by a factor depending on the theme. Need reloading of the graph if you swap themes while plugin is enabled.",canonicalizePropertiesWithDataview:"Canonicalize property names (Dataview)",canonicalizePropertiesWithDataviewDesc:"By default, the Dataview plugin canonicalize the property names, converting everything to lowercase, removing dashes and underscore. If you want to use the non-canonicalized version of the properties, disabled this. Note that if you have two properties, with one being the canonicalized version of the second one (for example CaseSensitive and casesensitive), the canonicalized version will be discarded. This option only applied if you're using the Dataview plugin.",colorBasedOnDepth:"Color based on depth",colorBasedOnDepthDesc:"Color the nodes based on their depth relative to the main node in the local graph",depthPalette:"Depth color palette",depthPaletteDesc:"Choose the color palette for the depth level coloring nodes",disableNodes:"Disable nodes",disableNodesDesc:"When all arcs are disabled on the node, remove it from the graph",excludeSourceFolders:"Exclude source folders",excludeSourceFoldersDesc:"Exclude forward links with source inside some folders (i.e. links coming out one of these folders)",excludeTargetFolders:"Exclude target folders",excludeTargetFoldersDesc:"Exclude backward links with target inside some folders (i.e. links going in one of these folders)",excludedFolders:"Excluded folders",externalLinks:"Add external URLs",externalLinksDesc:"Add external URLs as attachment nodes in the graph view. Types for links toward those nodes are not supported.",externalLinkOpen:"Open external URL",externalLinksOpenMode:"Open mode for external URLs",externalLinksOpenModeDesc:"When left clicking on an external URL's node, select the expected behavior to open the URL",externalLinksOptions:{none:"None",domain:"Domain",href:"Href (without search and hash)",domain_and_href:"Href and domain (2 nodes)"},externalLinksModes:{web:"Always on the Web",note:"First note if exists",choice:"Show available options"},externalLinksProperties:"External URLs properties",externalLinksPropertiesDesc:"Names of the properties that can be used to decide if an external URL node should redirect towards a specific note or to the web view when clicked",noExclusionFilter:"No excluded filter is applied right now. Add one below.",withExclusionFilter:"Files matching the following filters won't have back/forward links in the graph:",fadeInElements:"Fade in new elements",fadeInElementsDesc:"Extended elements added to the graph view by the plugin are faded in instead of appearing suddenly",filters:"Filters",filtersDesc:"Exclude files and folders from the graph based on regex patterns",focus:"Focus",focusDesc:"Add ways to easily identify nodes in your graph",focusFlickerOpenNodes:"Flicker open nodes",focusFlickerSearchNodes:"Flicker search results nodes",focusOpenNodes:"Highlight open nodes",focusOpenNodesDesc:"Add a border around nodes associated to an open tab",focusScale:"Active node scale factor",focusScaleDesc:"The node corresponding to the currently active note will be scaled up by this factor. Set to 1 for no scaling.",focusSearchResults:"Highlight search results",focusSearchResultsDesc:"Add a border around nodes that are part of a search result via the core Search plugin",folders:"Folders",foldersDesc:"Display folder boxes",folderShowFullPath:"Show full path",folderShowFullPathDesc:"If enable, the full path of the folder will be displayed ; if disabled, only the folder name will be displayed",icons:"Icons",iconsDesc:"Use icons or emoji for nodes",iconBackgroundColor:"Use icon color for the background",iconBackgroundColorDesc:"Use the icon color instead of the default node color for the background. For emojis, the average color will be used.",iconBackgroundOpacity:"Background opacity",iconBackgroundOpacityDesc:"Set the opacity of the node itself behind the icon. Set to 0 for no background.",iconBorderWidth:"Border width",iconBorderWidthDesc:"Add a border to the node around the icon of the specified width. Set to 0 for no border.",iconProperties:"Icon properties",iconPropertiesDesc:"Keys (names) of the properties that can be used to query the icon of the node's note. Supported values in the frontmatter can be either unicode emojis or Lucide icon identifiers.",iconPropertiesAdd:"Add icon property",iconUsePlugin:'Use "Iconic" or "Iconize"',iconUsePluginDesc:'Use the icons set in the file explorer via "Iconic" or "Iconize" community plugins',iconUsePluginColor:'Use "Iconic" or "Iconize" for color',iconUsePluginColorDesc:'Use the color of the icons set in the file explorer via "Iconic" or "Iconize"',iconUseParentIcon:"Use the icon of a parent folder",iconUseParentIconDesc:'If no icon is set on the file itself with "Iconic" or "Iconize", it will try to find one set on a parent folder',image:"Image",images:"Images",imageDesc:"Display image on top of nodes",imagesAllowExternal:"Allow images from the web",imagesAllowExternalDesc:"Allow the loading of external images via http: and https: protocols",imagesAllowExternalLocal:"Allow local images outside of the vault",imagesAllowExternalLocalDesc:"Allow the loading of external images via file: and app: protocols",imagesFromProperty:"From a property",imagesFromPropertyDesc:"Display image from a property in the frontmatter",imagesFromEmbeds:"From embeds",imagesFromEmbedsDesc:'Display an image if one is found among the embeds in the note. The setting "From a property" has priority.',imagesForAttachments:"For attachments",imagesForAttachmentsDesc:"Display image for attachment nodes",imageProperties:"Image properties",imagePropertiesDesc:"Names of the properties that can be used to query the image of the node's note",imagePropertiesAdd:"Add image property",imageBorderWidth:"Border width (%)",imageBorderWidthDesc:"Percentage of the node's background that will stay visible as a border",ignoreInlineLinks:"Ignore inline links",ignoreInlineLinksDesc:"Links defined inside the note and outside of the frontmatter will not be added to the graph",interactives:{alreadyExists:"Already exists",arcsAdd:"Add arcs",arcsAddPropertyDesc:"Add arcs around the nodes to visualize the property values",arcsAddTagDesc:"Add arcs around the nodes to visualize the tags",arcsSpread:"Spread arcs",arcsSpreadDesc:"Spread the arcs around the nodes to fill the available space",arcWeight:"Weight arc length",arcWeightDesc:"Use the number of time the value is found to determine arcs lengths (requires 'Spread arcs' to be enabled)",colorLinks:"Color links",colorLinksDesc:"Add colors to the link rendered in the graph view",colorLinkTypeLabel:"Color label",colorLinkTypeLabelDesc:"Color the type label (text) with the same color as the link",curvedFactor:"Curvature factor",curvedFactorDesc:"A negative value will inverse the shape, a greater absolute value will increase the curvature, while a value close to 0 will flatten it",curvedLinks:"Curved links",curvedLinksDesc:"Use curved links instead of straight lines",displayLinkTypeLabel:"Display label",displayLinkTypeLabelDesc:"Display the type label on top of the link",linkTypes:"Link types",linkTypesDesc:"Display and filter link types",noneTypeID:"None type id",noneTypeIDDesc:"The id which will be given if nothing is found for ",palette:"Color palette",paletteDesc:"Choose the color palette for ",paletteMatplotlibDesc:"These colormaps come from matplotlib. You can see more about them here: ",palettePickGradient:"Pick palette gradient",properties:"Properties",propertiesDesc:"Display and filter by property values",property:"Property",propertyDesc:"Display and filter property ",propertyAlreadyExists:"This property already exists",propertyReservedFolders:"This property key is reserved for folders",propertyReservedLinks:"This property key is reserved for links",propertyReservedTags:"This property key is reserved for tags",selection:"Selection",selectionDesc:"Choose which values should be considered by the plugin",selectionFor:"Selection for",specificColors:"Specific colors",specificColorsDesc:"Choose specific colors to override the color palette",tags:"Tags",tagsDesc:"Display and filter by tags"},layers:"Layers",layersDesc:"Group nodes by layers and adjust their opacity",layersDisplayLabels:"Display labels in UI",layersDisplayLabelsDesc:"If a layer has a label associated, for example `4_cave`, add the label to the UI",layersInfoDataview:"If you modify layers' levels and labels from this pane, Dataview inline properties will not be updated",layersInfoLevelNotFromID:"Level of this layer is not based on the property value",layersNumber:"Maximum number of layers",layersNumberDesc:"Set up the maximum number of active layers that will be shown in the graph view",layersOpacityPlaceholder:"Opacity",layersOrder:"Order",layersOrderDesc:"Choose if layers must be considered in an ascending or descending order",layerProperties:"Layer properties",layerPropertiesDesc:"Names of the properties that can be used to query the layer of the node's note",layerPropertiesAdd:"Add layer property",layersOpacityIfNoLayer:"Opacity for nodes without layer",layersOpacityIfNoLayerDesc:"If a node is not associated to a layer, it will use this opacity (set to 0 to hide)",layersUseCustomOpacity:"Use custom opacity",layersUseCustomOpacityDesc:"Set up fixed opacity values (0-1) for some layers. If they are shown, they will always be shown with this opacity, other opacities will be interpolated.",linksAllowMultipleTypes:"Draw multiple types",linksAllowMultipleTypesDesc:"Allow the graph to draw multiple types of links between two nodes",linksOutline:"Outline links",linksOutlineDesc:"Add a thin outline to the links and the arrows (when opaque)",linksSameColorAsNode:"Color link based on source",linksSameColorAsNodeDesc:"Use the color of the source node to color links",linksFeatureRequired:"The Links feature needs to be enabled.",localGraph:"Local graph",localGraphDesc:"Customize your local graph with settings specific to this view",localGraphCurrentNodeColor:"Current node's color",localGraphCurrentNodeColorDesc:"Color of the main node of the local graph",localGraphCurrentNodeSize:"Current node's size",localGraphCurrentNodeSizeDesc:"Base size of the main node of the local graph. Default: 100, minimum: 10.",localGraphCurrentNodeShape:"Current node's shape",localGraphCurrentNodeShapeDesc:"Shape of the main node of the local graph",pinnedNodes:"Pinned nodes",pinNode:"Pin node",unpinNode:"Unpin node",unpinAllNodes:"Unpin all nodes",pinMultipleNodes:"Pin multiple nodes",pinMultipleShape:"Shape",pinMultipleGap:"Gap between nodes",pinMultipleCenter:"Center",pinMultipleGridSize:"Number of columns",pinMultipleGridSizeDesc:"Values can be 'N' (single row), 'auto' (square grid) or a positive integer",pinSelectedNodes:"Pin selected nodes",unpinSelectedNodes:"Unpin selected nodes",size:"Size",elementsStats:"Nodes and links statistics",elementsStatsDesc:"Choose how nodes and links sizes/colors must be computed",linkSizesFunction:"Link size function",linkSizesFunctionDesc:"Select how the graph engine should compute the thickness of the links",linkColorsFunction:"Link color function",linkColorsFunctionDesc:"Select how the graph engine should compute the color of the links",linkColorsPaletteDesc:"Choose the color palette for the links",names:"Nodes names",namesDesc:"Customize how nodes names are displayed",namesEllipsisPlaceholder:"\u2026",namesNumberOfCharacters:"Characters limit",namesNumberOfCharactersDesc:"Maximum number of characters to display for the node name. Leave empty to display the full name. Choose the character(s) that should be displayed if the name is truncated.",namesShowOnlyFileName:"Filename only",namesShowOnlyFileNameDesc:"Show only the file name without the path",namesNoExtension:"Hide extension",namesNoExtensionDesc:"Remove the file extension from the name",namesUseProperties:"Use properties",namesUsePropertiesDesc:"Use one of the desired properties as the node name instead of the filename",namesUsePropertiesAdd:"Add node name property",namesBackground:"Add a background",namesBackgroundDesc:"Add a background to the node name in order to make it more readable by hiding elements behind it",namesShowWhenNeighborHighlighted:"Always show when hovering neighbor node",namesShowWhenNeighborHighlightedDesc:"Shows the text even when fully zoomed out if a connected neighbor node is highlighted",namesVerticalOffset:"Vertical offset",namesVerticalOffsetDesc:"Vertical offset of the text. Positive value will push the text lower, and positive value will move it higher.",namesDynamicVerticalOffset:"Dynamic vertical offset",namesDynamicVerticalOffsetDesc:"Dynamically adapt the vertical position of the text to avoid any overlapping with node's elements (arrows, arcs, shape)",noLineHighlight:"No line highlight",noLineHighlightDesc:"When hovering a node, don't highlight the connected links",nodeSizesFunction:"Node size function",nodeSizesFunctionDesc:"Select how the graph engine should compute the size of the nodes",nodeSizeProperties:"Node size properties",nodeSizePropertiesDesc:"Names of the properties that can be used to specify the size of the node. They must be of type number. A value of 100 is the default.",nodeSizePropertiesAdd:"Add node size property",nodeSizesRange:"Node size range",nodeSizesRangeDesc:"Minimum and maximum factors (between 0.1 and 5) that will be used to scale the sizes of the nodes",nodeColorsFunction:"Node color function",nodeColorsFunctionDesc:"Select how the graph engine should compute the color of the nodes",nodeColorsPaletteDesc:"Choose the color palette for the nodes",nodeStatsDirection:"Graph direction to compute node statistics",nodeStatsDirectionDesc:"When computing the node statistics, use the default directed graph, the reverse graph (source nodes become targets and vice versa), or the undirected graph (no effect for directed metrics such as backlinks)",nodeStatsDirectionNormal:"Default directed",nodeStatsDirectionReversed:"Reversed",nodeStatsDirectionUndirected:"Undirected",nodeStatsRecomputeOnGraphChange:"Recompute when graph changes",nodeStatsRecomputeOnGraphChangeDesc:"Recompute the metrics everytime the graph's data changes. This can create a drop in performances.",openInNewTab:"Open nodes in new tab",openInNewTabDesc:"Always open the nodes in a new tab when left clicking on them",otherDisplay:"Other display options",performance:"Performances",performanceDelay:"Initialization delay (milliseconds)",performanceDelayDesc:"Because of asynchronous mechanics, it can be needed to wait a time before starting initializing the extended features",performanceMaxNodes:"Maximum number of nodes",performanceMaxNodesDesc:"If the graph contains more nodes than this setting, the plugin will be disabled",recursive:"Recursive",removeSources:"Remove sources",removeSourcesDesc:"When disabling a link type, also disable the source nodes",removeTargets:"Remove targets",removeTargetsDesc:"When disabling a link type, also disable the source nodes",shape:"Shape",shapes:"Shapes",shapesDesc:"Use nodes of various shapes",shapePick:"Pick shape",shapesNames:{circle:"circle",square:"square",triangle:"triangle",diamond:"diamond",pentagon:"pentagon",hexagon:"hexagon",octagon:"octagon",decagon:"decagon",star4:"star (4)",star5:"star (5)",star6:"star (6)",star8:"star (8)",star10:"star (10)",polygon:"polygon",starburst:"starburst",grid:"grid",line:"line",unknown:"unknown"},svgScreenshotArcs:"Show arcs (tags and/or types)",svgScreenshotCopy:"Copy SVG screenshot",svgScreenshotCopyCode:"Copy SVG code to clipboard",svgScreenshotCopyImage:"Copy SVG image to clipboard",svgScreenshotCurvedLinks:"Use curved links",svgScreenshotNodeNames:"Show node names",svgScreenshotNodeShapes:"Use nodes shapes",svgScreenshotOptions:"SVG Screenshot options",svgScreenshotVisibleArea:"Export only visible area",zoomOnNode:"Zoom on node",zoomScale:"Zoom scale",zoomScaleDesc:"When zooming on a node, set the used scale"},Lv={inputs:"Inputs",leftClickIncompatibility:"Multiple inputs use the same modifier for the left click ; only one of them will work",pinHotkey:"Pin node (right click)",pinHotkeyDesc:"When doing a right click on a node while holding the specified key down, it will pin the node",radialMenu:"Radial context menu (right click)",radialMenuDesc:"When doing a right click on a node while holding the specified key down, it will show a radial context menu with data from the extended graph plugin, rather than the usual context menu",rightClickIncompatibility:"Multiple inputs use the same modifier for the right click ; only one of them will work",selected:"selected",selectHotkey:"Select node (left click)",selectHotkeyDesc:"When doing a left click on a node while holding the specified key down, it will select the node",selectionMode:"Selection mode",selectionModeAddTooltip:"Add to the current selection",selectionModeIntersectTooltip:"Intersect with the current selection",selectionModeReplaceTooltip:"Replace the current selection",selectionModeSubtractTooltip:"Subtract from the current selection"},Mv={changeInSettings:"You can change this in the settings",disabled:"disabled",graphAnalysisPluginRequired:"Graph Analysis community plugin must be enabled to use this function",invalidCharacter:"Invalid character",nlpPluginRequired:"NLP community plugin must be enabled to use this function",nodeLimiteExceeded:"Try to handle too many nodes",nodeLimitIs:"The limit is",nodeStatSizeFailed:"Failed to compute the statistics for the nodes sizes",nodeStatColorFailed:"Failed to compute the statistics for the nodes colors",linkStatSizeFailed:"Failed to compute the statistics for the links thickness",linkStatColorFailed:"Failed to compute the statistics for the links colors",functionToDefault:"The default function has been set instead.",stateDeleted:"State has been removed",stateRenamed:"State has been renamed",stateSaved:"State has been saved",normalStateSave:"Engine options have been saved for the normal state",svgCopied:"SVG copied to clipboard"},Nv={AND:"AND",ANDFilterDesc:"Keep nodes with all selected values",OR:"OR",ORFilterDesc:"Keep nodes with at least one of the selected values",combinationLogic:"Combination logic",editShapeQuery:"Edit shape query",excludeRegex:"Exclude regex",excludeRegexDesc:"Use regex to automatically exclude some values. Start a new line for a new regex.",setShapeQueryFor:"Set shape query for",files:"Files",logicKey:{contains:"contains",containsNot:"doesn't contain",is:"is",isNot:"is not",containsRegex:"contains regex",containsRegexNot:"doesn't contain regex",matchesRegex:"matches regex",matchesRegexNot:"doesn't match regex",isEmpty:"is empty",isEmptyNot:"is not empty"},matchingFiles:"Matching files",match:"match",matches:"matches",query:"Query",rules:"Rules",source:{all:"All",tag:"Tags",link:"Links",property:"Property",file:"File",folder:"Folder",folderRec:"Folder and subfolders",path:"Path"},viewMatches:"View matches"},Pv={defaultState:"Default state",editStateName:"Edit state name",graphState:"Graph state",newStateName:"New state name",openSettings:"Open state settings",saveConfigsWithState:"Save configuration with state",saveConfigsWithStateDesc:"When saving a state, the plugin will automatically saves the config under the same name (cleaned from invalid characters)",saveForDefaultState:"Save for default state",saveForDefaultStateDesc:"Save the current settings as the default state settings",saveForNormalState:"Save for native state",saveForNormalStateDesc:"(Basic graph without $t(plugin.name))",saveForNormalStateTooltip:"Save the current settings as the native graph settings",showGraphState:"Show graph state",startingState:"Starting state",startingStateDesc:"Select which state should be used to initiate the plugin",states:"States",syncDefaultState:"Synchronize default state",syncDefaultStateDesc:"Always open the default state with the current options used by the core plugin without the need to manually save them"},Bv={AdamicAdar:"Adamic Adar",authority:"Authority centrality (from HITS)",backlinksCount:"Number of backlinks",backUniquelinksCount:"Number of unique backlinks",betweenness:"Betweenness centrality",BoW:"Bag of words",closeness:"Closeness centrality",clusteringCoefficient:"Clustering coefficient",coCitations:"Co-citations",constant:"Constant",creationTime:"Time since file creation",degree:"Degree centrality",eccentricity:"Eccentricity in the connected graph",eigenvector:"Eigenvector centrality",filenameLength:"File name length",forwardlinksCount:"Number of forward links",forwardUniquelinksCount:"Number of unique forward links",totallinksCount:"Number of links",totalUniquelinksCount:"Number of unique links",hub:"Hub centrality (from HITS)",Jaccard:"Jaccard similarity",modifiedTime:"Time since last modification",Occurences:"Number of occurences",OtsukaOchiai:"Otsuka-Ochiai coefficient",overlap:"Overlap coefficient",tagsCount:"Number of tags",topological:"Topological propagation",warningUnreliableOS:"This calculation is unreliable and might vary between OS.",sentiment:"Sentiment"},Rv={horizontalLegend:"Horizontal legend",horizontalLegendDesc:"Use a horizontal layout for the legend container (with tags, properties and tags toggle buttons)",howToUse:"How to use",howToUseGradientMaker:"<ul><li><strong>Drag handles</strong> to move color stops along the gradient</li><li><strong>Click a handle</strong> to change its color</li><li><strong>Double-click</strong> on the gradient to add a new color stop</li><li><strong>Backspace, Delete or Clear keys</strong> on a handle to remove it</li><li><strong>Interpolate</strong>: creates smooth color transitions between stops</li><li><strong>Reverse</strong>: flips the final palette order (left \u2194 right)</li></ul>",name:"Name",showPinIcon:"Show pin icon",showPinIconDesc:"When a node is pinned, show an icon in its top right corner to mark its pinned state"},Ov={plugin:_v,beta:Fv,controls:Av,errors:kv,features:Iv,inputs:Lv,notices:Mv,query:Nv,states:Pv,statsFunctions:Bv,UI:Rv};var np={};El(np,{UI:()=>Xv,beta:()=>Uv,controls:()=>Vv,default:()=>Kv,errors:()=>zv,features:()=>Wv,inputs:()=>Hv,notices:()=>jv,plugin:()=>Gv,query:()=>$v,states:()=>qv,statsFunctions:()=>Yv});var Gv={custom:"Personnalis\xE9",dark:"Sombre",default:"D\xE9faut",folder:"Dossier",folders:"Dossiers",filter:"Filtre",nodeName:"Nom de n\u0153ud",info:"Info",light:"Clair",name:"Extended graph",nodes:"N\u0153uds",options:"Options",settings:"Param\xE8tres",source:"Source",target:"Cible",valuePlaceholder:"valeur..."},Uv={beta:"B\xEAta",betaFeatures:"Fonctionnalit\xE9s en b\xEAta",enableCSS:"Activer la personnalisation CSS",enableCSSDesc:"Permet au module d'injecter du CSS dans la vue graphique pour plus de personnalisation. Indiquer le nom de l'extrait CSS \xE0 utiliser.",revertAction:"Annuler la derni\xE8re action",revertActionDesc:"Si le nombre maximal de noeus est atteind, le module tentera d'annuler la derni\xE8re action au lieu de d\xE9sactiver le module"},Vv={add:"Ajouter",apply:"Appliquer",back:"Retour",cancel:"Annuler",delete:"Supprimer",disable:"D\xE9sactiver",disableAll:"Tout d\xE9sactiver",disableInGraphView:"D\xE9sactiver dans la vue graphique",edit:"\xC9diter",enable:"Activer",enableAll:"Tout activer",enabled:"Activ\xE9",enableInGraphView:"Activer dans la vue graphique",export:"Exporter",exportSettings:"Exporter les param\xE8tres",goTo:"Aller \xE0",hide:"Cacher",hideAll:"Cacher tout",hideRow:"Cacher la ligne",import:"Importer",importSettings:"Importer les param\xE8tres",importSettingsAndReload:"Importer les param\xE8tres et recharger",interpolate:"Interpoler",manage:"G\xE9rer",moveUp:"Monter",moveDown:"Descendre",no:"Non",openLegend:"Ouvrir la l\xE9gende (tags, liens, propri\xE9t\xE9s)",orCreateConfig:"Ou cr\xE9er une nouvelle",override:"Remplacer",overrideConfig:"Remplacer une configuration existante",page:"Page",pageCurrent:"Page actuelle",pageFirst:"Premi\xE8re page",pageLast:"Derni\xE8re page",pathRegexPlaceholder:'Entrer un chemin ou un "/regex/"...',resetGraph:"R\xE9initialiser le graphe",resetInGraphView:"R\xE9initialiser dans la vue graphique",reverse:"Inverser",save:"Sauvegarder",selectAllNodes:"S\xE9lectionner tous les n\u0153uds",selectConfigToImport:"S\xE9lectionner une configuration \xE0 importer",selectInvert:"Inverser la s\xE9lection",setConfigName:"D\xE9finir le nom de la configuration",show:"Montrer",showAll:"Montrer tout",toggle:"Basculer",toggleAll:"Basculer tout",toggleAllWithMoreThanOneNode:"Avec plus d'un n\u0153ud",rows:"lignes",yes:"Oui"},zv={uri401:"URL non autoris\xE9e (Code 401) lors de la tentative d'obtention d'une image pour un n\u0153ud. Cela signifie probablement que l'URL est invalide. Aucune image ne sera charg\xE9e et ce message peut \xEAtre ignor\xE9 en toute s\xE9curit\xE9.",issueNeedView:"Il y a eu un probl\xE8me avec le module $t(plugin.name). Veuillez fermer la vue graphique et l'ouvrir \xE0 nouveau.",paletteNameRequired:"Vous devez choisir un nom pour cette palette de couleurs"},Wv={ids:{arrows:"fl\xE8ches",automation:"automatisation",beta:"b\xEAta",display:"affichage",elementsStats:"stats",filter:"filtre",focus:"focus",folders:"dossiers",icons:"ic\xF4nes",images:"images",inputs:"commandes",layers:"couches",localGraph:"graph local",linkTypes:"typage liens",names:"noms",performances:"performances",properties:"propri\xE9t\xE9s",shapes:"formes",tags:"tags",zoom:"zoom"},animateDotsOnLinks:"Anime des points sur les liens",animateDotsOnLinksDesc:"Ajoute des points anim\xE9s sur les liens quand un n\u0153ud est survol\xE9, afin de montrer le flux des informations",animateDotsOnLinksSpeed:"Vitesse d'animation",animateDotsOnLinksSpeedDesc:"Vitesse d'animation des points sur les liens",arrows:"Fl\xE8ches",arrowsDesc:"Personnalise la fa\xE7on dont les fl\xE8ches sont affich\xE9es",arrowsColor:"Couleur personnalis\xE9e",arrowsColorDesc:"Choisissez une couleur personnalis\xE9e pour la couleur des fl\xE8ches",arrowsInvert:"Inverser les fl\xE8ches",arrowsInvertDesc:"Inverse les fl\xE8ches des liens",arrowsFixedSize:"Taille fixe",arrowsFixedSizeDesc:"Emp\xEAche les fl\xE8ches de se r\xE9duire ou de s'aggrandir et leur fait garder une taille constante par rapport aux autres \xE9l\xE9ments du graphe lorsque l'\xE9chelle de celui-ci changements",arrowsFlat:"Fl\xE8ches triangulaires",arrowsFlatDesc:"Utilise des fl\xE8ches triangulaires au lieu de fl\xE8ches courb\xE9es",arrowsOpaque:"Fl\xE8ches opaque",arrowsOpaqueDesc:"Supprime toute transparence des fl\xE8ches pour qu'elles soient compl\xE8tement opaques",arrowsOpaqueAlways:"Toujours",arrowsOpaqueKeepFading:"Seulement sur zoom",arrowsScale:"Taille",arrowsScaleDesc:"Mets \xE0 l'\xE9chelle les fl\xE8ches par un facteur",automation:"Automatisation",autoEnable:"Activation auto",autoEnableDesc:"Active automatiquement le module dans la vue graphique",autoReset:"R\xE9initialise les vues graphiques apr\xE8s changements",autoResetDesc:"R\xE9initialise le module dans les les vues graphiques o\xF9 il est activ\xE9, si les param\xE8tres ont chang\xE9 apr\xE8s avoir ferm\xE9 cet onglet",borderUnresolved:"Bordure des n\u0153uds non-r\xE9solus",borderUnresolvedDesc:"Si la valeur est entre 0 et 1 (exclus), les n\u0153uds non-r\xE9solus seront repr\xE9sent\xE9s par un cercle vide plut\xF4t qu'un disque plein",brightness:"Facteur de luminosit\xE9",brightnessDesc:"Multiplie la luminosit\xE9 des tags, propri\xE9t\xE9s et liens par un facteur en fonction du th\xE8me. N\xE9cessite le rechargement du graphe si vous changez de th\xE8me pendant que le module est activ\xE9.",canonicalizePropertiesWithDataview:"Canonise les propri\xE9t\xE9s (Dataview)",canonicalizePropertiesWithDataviewDesc:"Par d\xE9faut, le module Dataview canonise les noms de propri\xE9t\xE9s, en convertissant tout en minuscules et en supprimant les tirets et les traits de soulignement. Si vous souhaitez utiliser la version non canonis\xE9e des propri\xE9t\xE9s, d\xE9sactivez cette option. Notez que si vous avez deux propri\xE9t\xE9s, dont l'une est la version canonique de la seconde (par exemple CaseSensitive et casesensitive), la version canonique sera ignor\xE9e. Cette option ne s'applique que si vous utilisez le module Dataview.",colorBasedOnDepth:"Colore selon la profondeur (graph local)",colorBasedOnDepthDesc:"Colore les n\u0153uds en fonction de la profondeur relative au n\u0153ud principal du graphe local",depthPalette:"Palette pour la profondeur",depthPaletteDesc:"Choix de la palette de couleur pour la profondeur permettant de colorer les n\u0153uds",disableNodes:"Enl\xE8ve les n\u0153uds",disableNodesDesc:"Quand tous les arcs d'un n\u0153ud sont d\xE9sactiv\xE9s, enl\xE8ve le n\u0153ud du graphe",excludeSourceFolders:"Exclure les dossiers sources",excludeSourceFoldersDesc:"Exclut les liens dont la source se trouve dans certains dossiers (i.e. les liens sortant d'un de ces dossiers)",excludeTargetFolders:"Exclure les dossiers cibles",excludeTargetFoldersDesc:"Exclut les liens dont la cible se trouve dans certains dossiers (i.e. les liens allant d'un de ces dossiers)",excludedFolders:"Dossiers exclus",externalLinks:"Ajouter les URLs externes",externalLinksDesc:"Ajoutez des URL externes en tant que n\u0153uds (pi\xE8ces jointes) dans la vue graphique. Les types de liens vers ces n\u0153uds ne sont pas pris en charge",externalLinkOpen:"Ouvre les URLs externes",externalLinksOpenMode:"Mode d'ouverture pour les URLs externes",externalLinksOpenModeDesc:"S\xE9lectionnez le comportement attendu pour ouvrir l'URL lorsque vous cliquez avec le bouton gauche de la souris sur le n\u0153ud associ\xE9",externalLinksOptions:{none:"Aucun",domain:"Domaine",href:"Href (sans la recherche ni le hash)",domain_and_href:"Href et domaine (2 n\u0153uds)"},externalLinksModes:{web:"Toujours sur le Web",note:"Premi\xE8re note si elle existe",choice:"Affiche les options disponibles"},externalLinksProperties:"Propri\xE9t\xE9s pour les URLs externes",externalLinksPropertiesDesc:"Noms des propri\xE9t\xE9s pouvant \xEAtre utilis\xE9es pour d\xE9terminer si un n\u0153ud d'URL externe doit rediriger vers cette note ou vers la vue Web lorsqu'on clique dessus",noExclusionFilter:"Aucun filtre d'exclusion n'est appliqu\xE9 pour le moment. Ajoutez-en un en dessous",withExclusionFilter:"Les fichiers correspondant aux filtres suivants n'auront pas de liens entrant/sortant dans le graphe :",fadeInElements:"Introduire progressivement de nouveaux \xE9l\xE9ments",fadeInElementsDesc:"Les \xE9l\xE9ments suppl\xE9mentaires ajout\xE9s \xE0 la vue graphique par le module apparaissent progressivement au lieu d'appara\xEEtre soudainement",filters:"Filtres",filtersDesc:"Exclure des fichiers et des dossiers du graphe en fonction d'expressions r\xE9guli\xE8res",focus:"Focus",focusDesc:"Ajoutez des moyens permettant d'identifier facilement les n\u0153uds dans votre graphe",focusFlickerOpenNodes:"Faire clignoter les n\u0153uds ouverts",focusFlickerSearchNodes:"Faire clignoter les n\u0153uds r\xE9sultats de recherche",focusOpenNodes:"Met en valeur les n\u0153uds ouverts",focusOpenNodesDesc:"Ajouter une bordure autour des n\u0153uds associ\xE9s \xE0 un onglet ouvert",focusScale:"Facteur de mise \xE0 l'\xE9chelle",focusScaleDesc:"La taille du n\u0153ud correspondant \xE0 la note active sera mulitpli\xE9e par ce facteur",focusSearchResults:"Met en valeur les n\u0153uds r\xE9sultats de recherche",focusSearchResultsDesc:"Ajoutez une bordure autour des n\u0153uds qui font partie d'un r\xE9sultat de recherche via le plugin de Recherche natif",folders:"Dossiers",foldersDesc:"Affiche des bo\xEEtes englobantes pour les dossiers",folderShowFullPath:"Affiche le chemin complet",folderShowFullPathDesc:"Si cette option est activ\xE9e, le chemin d'acc\xE8s complet du dossier sera affich\xE9 ; si elle est d\xE9sactiv\xE9e, seul le nom du dossier sera affich\xE9",icons:"Ic\xF4nes",iconsDesc:"Utilise des ic\xF4nes ou emojis pour les n\u0153uds du graphe",iconBackgroundColor:"Utiliser la couleur de l'ic\xF4ne pour l'arri\xE8re-plan",iconBackgroundColorDesc:"Utilise la couleur de l'ic\xF4ne \xE0 la place de la couleur par d\xE9faut du n\u0153ud pour l'arri\xE8re-plan. Pour les emojis, la couleur moyenne sera utilis\xE9e.",iconBackgroundOpacity:"Opacit\xE9 de l'arri\xE8re-plan",iconBackgroundOpacityDesc:"D\xE9finissez l'opacit\xE9 du n\u0153ud lui-m\xEAme derri\xE8re l'ic\xF4ne. Mettez \xE0 0 pour supprimer l'arri\xE8re-plan.",iconBorderWidth:"\xC9paisseur de bordure",iconBorderWidthDesc:"Ajoutez une bordure au n\u0153ud autour de l'ic\xF4ne de la largeur sp\xE9cifi\xE9e. D\xE9finissez la valeur sur 0 pour supprimer la bordure.",iconProperties:"Propri\xE9t\xE9s pour l'ic\xF4ne",iconPropertiesDesc:"Cl\xE9s (noms) des propri\xE9t\xE9s utilis\xE9es pour r\xE9cup\xE9rer l'ic\xF4ne de la note. Les valeurs support\xE9es peuvent \xEAtre soit des emojis Unicode, soit des identifiants d'ic\xF4nes provenant de Lucide.",iconPropertiesAdd:"Ajouter une propri\xE9t\xE9 pour ic\xF4ne",iconUsePlugin:'Utilise "Iconic" ou "Iconize"',iconUsePluginDesc:`Utilise les ic\xF4nes appliqu\xE9s dans l'explorateur de fichier via les modules communautaires "Iconic" ou "Iconize"`,iconUsePluginColor:'Utilise "Iconic" ou "Iconize" pour les couleurs',iconUsePluginColorDesc:`Utilise la couleur des ic\xF4nes appliqu\xE9s dans l'explorateur de fichier via "Iconic" ou "Iconize"`,iconUseParentIcon:"Utilise l'ic\xF4ne d'un dossier parent",iconUseParentIconDesc:`Si aucun ic\xF4ne n'est appliqu\xE9 sur le fichier lui-m\xEAme avec "Iconic" ou "Iconize", le module essaiera d'en trouver un sur un dossier parent`,image:"Image",images:"Image",imageDesc:"Affiche les images dans les n\u0153uds",imagesAllowExternal:"Autorise les images web",imagesAllowExternalDesc:"Autorise le chargement d'images externes via les protocoles http: et https:",imagesAllowExternalLocal:"Autorise les images externes au coffre",imagesAllowExternalLocalDesc:"Autorise le chargement d'images externes via les protocoles file: and app:",imagesFromProperty:"Depuis une propri\xE9t\xE9",imagesFromPropertyDesc:"Affiche une image r\xE9cup\xE9r\xE9e depuis une propri\xE9t\xE9 des m\xE9tadonn\xE9es",imagesFromEmbeds:"Depuis une int\xE9gration",imagesFromEmbedsDesc:`Affiche une image r\xE9cup\xE9r\xE9e parmi les int\xE9grations de la note. L'option "Depuis une propri\xE9t\xE9" est prioritaire.`,imagesForAttachments:"Pour les pi\xE8ces jointes",imagesForAttachmentsDesc:"Affiche une image sur les n\u0153uds des pi\xE8ces jointes",imageProperties:"Priori\xE9t\xE9s pour les images",imagePropertiesDesc:"Noms des propri\xE9t\xE9s utilis\xE9es pour trouver une image pour le n\u0153ud",imagePropertiesAdd:"Ajouter une propri\xE9t\xE9 pour image",imageBorderWidth:"\xC9paisseur de la bordure (%)",imageBorderWidthDesc:"Pourcentage de la couleur de fond du n\u0153ud qui sera visible comme une border",ignoreInlineLinks:"Ignorer les liens int\xE9gr\xE9s",ignoreInlineLinksDesc:"Les liens d\xE9finis dans la note et en dehors du frontmatter ne seront pas ajout\xE9s au graphique",interactives:{alreadyExists:"Existe d\xE9j\xE0",arcsAdd:"Ajouter les arcs",arcsAddPropertyDesc:"Ajouter des arcs autour des n\u0153uds pour visualiser les valeurs des propri\xE9t\xE9s",arcsAddTagDesc:"Ajouter des arcs autour des n\u0153uds pour visualiser les valeurs des tags",arcsSpread:"\xC9tendre les arcs",arcsSpreadDesc:"\xC9tend les arcs autour des n\u0153uds pour remplir l'espace disponible",arcWeight:"Pond\xE9rer les longueurs des arcs",arcWeightDesc:"Utilisez le nombre de fois o\xF9 la valeur est trouv\xE9e pour d\xE9terminer la longueur des arcs (n\xE9cessite l'activation de l'option \xAB \xC9tendre les arcs \xBB)",colorLinks:"Coloriser les liens",colorLinksDesc:"Ajouter des couleurs aux liens rendus",colorLinkTypeLabel:"Colorer les libell\xE9s",colorLinkTypeLabelDesc:"Colore le libell\xE9 du type (texte) avec la m\xEAme couleur que le lien",curvedFactor:"Facteur de courbure",curvedFactorDesc:"Une valeur n\xE9gative inversera la forme, une valeur absolue plus \xE9lev\xE9e augmentera la courbure, tandis qu'une valeur proche de 0 l'aplatira",curvedLinks:"Liens courb\xE9s",curvedLinksDesc:"Utilise des liens courb\xE9s au lieu de lignes droites",displayLinkTypeLabel:"Affiche le libell\xE9",displayLinkTypeLabelDesc:"Afficher le libell\xE9 du type au-dessus du lien",linkTypes:"Typage des liens",linkTypesDesc:"Affiche et filtre les liens par type",noneTypeID:"ID pour les sans-type",noneTypeIDDesc:"L'identifiant qui sera donn\xE9 is aucune valeur n'est trouv\xE9e pour ",palette:"Palette de couleur",paletteDesc:"Choix de la palette de couleur pour ",paletteMatplotlibDesc:"Ces palettes viennent de matplotlib. Vous pouvez en apprendre plus ici: ",palettePickGradient:"Choix du d\xE9grad\xE9",properties:"Propri\xE9t\xE9s",propertiesDesc:"Affiche et filtre les n\u0153uds par propri\xE9t\xE9s",property:"Propri\xE9t\xE9",propertyDesc:"Affiche et filtre la propri\xE9t\xE9 ",propertyAlreadyExists:"Cette propri\xE9t\xE9 existe d\xE9j\xE0",propertyReservedFolders:"Cette valeur de propri\xE9t\xE9 est r\xE9serv\xE9e pour les dossiers",propertyReservedLinks:"Cette valeur de propri\xE9t\xE9 est r\xE9serv\xE9e pour les liens",propertyReservedTags:"Cette valeur de propri\xE9t\xE9 est r\xE9serv\xE9e pour les tags",selection:"S\xE9lection",selectionDesc:"S\xE9lectionnez quelles valeurs devraient \xEAtre prises en compte par le module",selectionFor:"S\xE9lection pour",specificColors:"Couleurs sp\xE9cifiques",specificColorsDesc:"Choisissez des couleurs sp\xE9cifiques rempla\xE7ant la palette",tags:"Tags",tagsDesc:"Affiche et filtre les n\u0153uds par tags"},layers:"Calques",layersDesc:"Regroupe les n\u0153uds par calques et ajuste leur opacit\xE9",layersDisplayLabels:"Afficher les \xE9tiquettes dans l'interface utilisateur",layersDisplayLabelsDesc:"Si un calque est associ\xE9 \xE0 une \xE9tiquette, par exemple `4_cave`, ajoute l'\xE9tiquette \xE0 l'interface utilisateur.",layersInfoDataview:"Si vous modifiez les niveaux et les \xE9tiquettes des couches \xE0 partir de ce volet, les propri\xE9t\xE9s en ligne de Dataview ne seront pas mises \xE0 jour",layersInfoLevelNotFromID:"Le niveau de ce calque n'est pas bas\xE9 sur la valeur de la propri\xE9t\xE9",layersNumber:"Nombre max de calques",layersNumberDesc:"D\xE9finissez le nombre maximal de calques actives qui seront affich\xE9s dans la vue graphique",layersOpacityPlaceholder:"Opacit\xE9",layersOrder:"Ordre",layersOrderDesc:"Choisissez si les calques doivent \xEAtre consid\xE9r\xE9s dans un ordre croissant ou d\xE9croissant",layerProperties:"Propri\xE9t\xE9s pour les calques",layerPropertiesDesc:"Noms des propri\xE9t\xE9s utilis\xE9es pour trouver un calque pour le n\u0153ud",layerPropertiesAdd:"Ajouter une propri\xE9t\xE9 pour calque",layersOpacityIfNoLayer:"Opacit\xE9 des n\u0153uds sans calque",layersOpacityIfNoLayerDesc:"Si un n\u0153ud n'est pas associ\xE9 \xE0 un calque, il utilisera cette opacit\xE9 (mettez \xE0 0 pour masquer)",layersUseCustomOpacity:"Utiliser l'opacit\xE9 personnalis\xE9e",layersUseCustomOpacityDesc:"D\xE9finissez des valeurs d'opacit\xE9 fixes (0-1) pour certains calques. S'ils sont affich\xE9s, ils le seront toujours avec cette opacit\xE9, les autres opacit\xE9s seront interpol\xE9es.",linksAllowMultipleTypes:"Dessine plusieurs types",linksAllowMultipleTypesDesc:"Permet de dessiner plusieurs types de liens entre deux n\u0153uds",linksOutline:"Contourer les liens",linksOutlineDesc:"Ajoutez un contour fin aux liens et aux fl\xE8ches (lorsqu'ils sont opaques)",linksSameColorAsNode:"Colorer les liens en fonction de la source",linksSameColorAsNodeDesc:"Utilise la couleur du n\u0153ud source pour colorer les liens",linksFeatureRequired:"La fonctionnalit\xE9 des liens doit \xEAtre activ\xE9e.",localGraph:"Graphe local",localGraphDesc:"Personnalisez votre graphe local avec des param\xE8tres sp\xE9cifiques \xE0 cette vue",localGraphCurrentNodeColor:"Couleur du n\u0153ud actuel",localGraphCurrentNodeColorDesc:"Couleur du n\u0153ud principal du graphe local",localGraphCurrentNodeSize:"Taille du n\u0153ud actuel",localGraphCurrentNodeSizeDesc:"Taille de base du n\u0153ud principal du graphe local. D\xE9faut : 100, minimum : 10.",localGraphCurrentNodeShape:"Forme du n\u0153ud actuel",localGraphCurrentNodeShapeDesc:"Forme du n\u0153ud principal du graphe local",pinnedNodes:"N\u0153uds \xE9pingl\xE9s",pinNode:"\xC9pingler le n\u0153ud",unpinNode:"D\xE9s\xE9pingler le n\u0153ud",unpinAllNodes:"D\xE9s\xE9pingler tous les n\u0153uds",pinMultipleNodes:"\xC9pingler plusieurs n\u0153uds",pinMultipleShape:"Forme",pinMultipleGap:"Espace entre les n\u0153uds \xE9pingl\xE9s",pinMultipleCenter:"Centre",pinMultipleGridSize:"Nombre de colonnes",pinMultipleGridSizeDesc:'Les valeurs peuvent \xEAtre "N" (une seule ligne), "auto" (grille carr\xE9e) ou un entier positif',pinSelectedNodes:"\xC9pingler les n\u0153uds s\xE9lectionn\xE9s",unpinSelectedNodes:"D\xE9s\xE9pingler tous les n\u0153uds s\xE9lectionn\xE9s",size:"Taille",elementsStats:"Stastiques des n\u0153uds et liens",elementsStatsDesc:"Choisissez comment couleurs/tailles des n\u0153uds et des liens sont calcul\xE9es",linkSizesFunction:"Fonction pour la taille des liens",linkSizesFunctionDesc:"S\xE9lectionne comment le moteur du graphe doit calculer l'\xE9paisseur des liens",linkColorsFunction:"Fonction pour la couleur des liens",linkColorsFunctionDesc:"S\xE9lectionne comment le moteur du graphe doit calculer la couleur des liens",linkColorsPaletteDesc:"Choisissez la palette de couleur pour les liens",names:"Noms des n\u0153uds",namesDesc:"Personnalise l'affichage des noms des n\u0153uds",namesEllipsisPlaceholder:"\u2026",namesNumberOfCharacters:"Nombre de caract\xE8res",namesNumberOfCharactersDesc:"Nombre maximum de caract\xE8res \xE0 afficher pour le nom du n\u0153ud. Laissez vide pour afficher le nom complet. Choisissez le(s) caract\xE8re(s) \xE0 afficher si le nom est tronqu\xE9.",namesShowOnlyFileName:"Nom de fichier",namesShowOnlyFileNameDesc:"Afficher seulement le nom de fichier sans le chemin",namesNoExtension:"Sans extension",namesNoExtensionDesc:"Afficher le nom de fichier sans l'extension",namesUseProperties:"Utiliser des propri\xE9t\xE9s",namesUsePropertiesDesc:"Utiliser des propri\xE9t\xE9s pour le nom du n\u0153ud plut\xF4t que le nom de fichier",namesUsePropertiesAdd:"Ajouter une propri\xE9t\xE9 pour le nom",namesBackground:"Ajoute un fond",namesBackgroundDesc:"Ajoute un fond au nom du n\u0153ud pour le rendre plus lisible en cachant les \xE9l\xE9ments derri\xE8re",namesShowWhenNeighborHighlighted:"Toujours afficher lorsque le curseur passe sur un n\u0153ud voisin",namesShowWhenNeighborHighlightedDesc:"Affiche le texte m\xEAme lorsque le zoom est compl\xE8tement r\xE9duit si un n\u0153ud voisin connect\xE9 est mis en surbrillance",namesVerticalOffset:"D\xE9calage vertical",namesVerticalOffsetDesc:"D\xE9calage vertical du texte. Une valeur de 15 est recommand\xE9e pour \xE9viter un chevauchement avec la fl\xE8che",namesDynamicVerticalOffset:"D\xE9calage vertical dynamique",namesDynamicVerticalOffsetDesc:"Adapte dynamiquement la position verticale du texte pour \xE9viter tout chevauchement avec les \xE9l\xE9ments du n\u0153ud (fl\xE8ches, arcs, forme)",noLineHighlight:"Pas de surlignage de ligne",noLineHighlightDesc:"Lorsque vous survolez un n\u0153ud, ne met pas en surbrillance les liens connect\xE9s",nodeSizesFunction:"Fonction pour la taille des n\u0153uds",nodeSizesFunctionDesc:"S\xE9lectionne comment le moteur du graphe doit calculer la taille des n\u0153uds",nodeSizeProperties:"Propri\xE9t\xE9s pour la taille d'un n\u0153ud",nodeSizePropertiesDesc:"Noms des propri\xE9t\xE9s utilis\xE9es pour sp\xE9cifier la taille d'un n\u0153ud. Une propri\xE9t\xE9 doit \xEAtre de type nombre. Par d\xE9faut, la taille est de 100.",nodeSizePropertiesAdd:"Ajouter une propri\xE9t\xE9 pour taille de n\u0153ud",nodeSizesRange:"Intervalle de la taille des n\u0153uds",nodeSizesRangeDesc:"Facteurs minimum et maximum (entre 0,1 et 5) qui seront utilis\xE9s pour mettre \xE0 l'\xE9chelle la taille des n\u0153uds",nodeColorsFunction:"Fonction pour la couleur des n\u0153uds",nodeColorsFunctionDesc:"\xE9lectionne comment le moteur du graphe doit calculer la couleur des n\u0153uds",nodeColorsPaletteDesc:"Choisissez la palette de couleur pour les n\u0153uds",nodeStatsDirection:"Direction du graphe pour calculer les statistiques des n\u0153uds",nodeStatsDirectionDesc:"Lors du calcul des statistiques des n\u0153uds, utilisez le graphe dirig\xE9 par d\xE9faut, le graphe invers\xE9 (les n\u0153uds sources deviennent des cibles et vice versa), ou le graphe non-dirig\xE9 (aucun effet pour les m\xE9triques dirig\xE9es, telles que le nombre de r\xE9troliens)",nodeStatsDirectionNormal:"Dirig\xE9 par d\xE9faut",nodeStatsDirectionReversed:"Invers\xE9",nodeStatsDirectionUndirected:"Non-dirig\xE9",nodeStatsRecomputeOnGraphChange:"Recalculer quand le graphe change",nodeStatsRecomputeOnGraphChangeDesc:"Recalcule les m\xE9triques \xE0 chaque fois que les donn\xE9es du graphique changent. Cela peut entra\xEEner une baisse des performances.",openInNewTab:"Ouvre les n\u0153uds dans un nouvel onglet",openInNewTabDesc:"Toujours ouvrir les n\u0153uds dans un nouvel onglet lorsque vous cliquez dessus avec le bouton gauche de la souris",otherDisplay:"Autres options d'affichage",performance:"Performances",performanceDelay:"D\xE9lai d'initialisation (millisecondes)",performanceDelayDesc:"Il peut \xEAtre n\xE9cessaire d'attendre quelques fractions de secondes avant d'initialiser le module dans une vue graphique \xE0 cause de m\xE9caniques asynchrones",performanceMaxNodes:"Nombre maximum de n\u0153uds",performanceMaxNodesDesc:"Si le graphe contient plus de n\u0153uds que cette valeur, le module sera d\xE9sactiv\xE9 dans la vue graphique",recursive:"R\xE9cursif",removeSources:"D\xE9sactiver les sources",removeSourcesDesc:"D\xE9sactive les sources des liens lorsque ceux-ci sont d\xE9sactiv\xE9s",removeTargets:"D\xE9sactiver les cibles",removeTargetsDesc:"D\xE9sactive les cibles des liens lorsque ceux-ci sont d\xE9sactiv\xE9s",shape:"Forme",shapes:"Formes",shapesDesc:"Utilise diff\xE9rentes formes pour les n\u0153uds",shapePick:"Choisissez une forme",shapesNames:{circle:"cercle",square:"carr\xE9",triangle:"triangle",diamond:"diamand",pentagon:"pentagone",hexagon:"hexagone",octagon:"octogone",decagon:"d\xE9cagone",star4:"\xE9toile (4)",star5:"\xE9toile (5)",star6:"\xE9toile (6)",star8:"\xE9toile (8)",star10:"\xE9toile (10)",polygon:"polygone",starburst:"starburst",grid:"grille",line:"ligne",unknown:"inconnu"},svgScreenshotArcs:"Affiche les arcs (tags et/ou propri\xE9t\xE9s)",svgScreenshotCopy:"Capture d'\xE9cran CVG",svgScreenshotCopyCode:"Copie le code SVG dans le presse-papier",svgScreenshotCopyImage:"Copie l'image SVG dans le presse-papier",svgScreenshotCurvedLinks:"Utiliser les liens courbes",svgScreenshotNodeNames:"Afficher les noms des n\u0153uds",svgScreenshotNodeShapes:"Utiliser les formes des n\u0153uds",svgScreenshotOptions:"Options de la capture d'\xE9cran SVG",svgScreenshotVisibleArea:"Exporter seulement la zone visible",zoomOnNode:"Zoom sur le n\u0153ud",zoomScale:"Mise \xE0 l'\xE9chelle du zoom",zoomScaleDesc:"Nouvelle mise \xE9chelle de la vue graphique lorsqu'un zoom est r\xE9alis\xE9 sur un n\u0153ud"},Hv={inputs:"Contr\xF4les",leftClickIncompatibility:"Plusieurs entr\xE9es utilisent le m\xEAme modificateur pour le clic gauche ; seule l'une d'entre elles fonctionnera",pinHotkey:"\xC9pingler un n\u0153ud (clic droit)",pinHotkeyDesc:"Lorsque vous cliquez avec le bouton droit sur un n\u0153ud tout en maintenant la touche sp\xE9cifi\xE9e enfonc\xE9e, cela permet d'\xE9pingler le n\u0153ud",radialMenu:"Activer le menu contextuel radial sur les n\u0153uds",radialMenuDesc:"Permet d'afficher un menu contextuel radial sur les n\u0153uds en faisant un clic droit tout en maintenant la touche sp\xE9cifi\xE9e enfonc\xE9e. Le menu affichera des options suppl\xE9mentaires provenant du module $t(plugin.name).",rightClickIncompatibility:"Plusieurs entr\xE9es utilisent le m\xEAme modificateur pour le clic droit ; seule l'une d'entre elles fonctionnera",selected:"s\xE9lectionn\xE9es",selectHotkey:"S\xE9lectionner un n\u0153ud (clic gauche)",selectHotkeyDesc:"Lorsque vous cliquez avec le bouton gauche de la souris sur un n\u0153ud tout en maintenant la touche sp\xE9cifi\xE9e enfonc\xE9e, cela permet d'\xE9pingler le n\u0153ud",selectionMode:"Mode de s\xE9lection",selectionModeAddTooltip:"Ajoute \xE0 la s\xE9lection actuelle",selectionModeIntersectTooltip:"Intersecte avec la s\xE9lection actuelle",selectionModeReplaceTooltip:"Remplace la s\xE9lection actuelle",selectionModeSubtractTooltip:"Soustrait \xE0 la s\xE9lection actuelle"},jv={changeInSettings:"Vous pouvez changer cette valeur dans les r\xE9glages",disabled:"d\xE9sactiv\xE9",graphAnalysisPluginRequired:"Le module communautaire Graph Analysis doit \xEAtre activ\xE9 pour utiliser cette fonction",invalidCharacter:"Caract\xE8re invalide",nlpPluginRequired:"Le module communautaire NLP doit \xEAtre activ\xE9 pour utiliser cette fonction",nodeLimiteExceeded:"Tentative de g\xE9rer trop de n\u0153uds",nodeLimitIs:"La limite est",nodeStatSizeFailed:"Echec lors du calcul des statistiques pour les tailles des n\u0153uds",nodeStatColorFailed:"Echec lors du calcul des statistiques pour les couleurs des n\u0153uds",linkStatSizeFailed:"Echec lors du calcul des statistiques pour les \xE9paisseurs des liens",linkStatColorFailed:"Echec lors du calcul des statistiques pour les couleurs des liens",functionToDefault:"La fonction par d\xE9faut est utilis\xE9e \xE0 la place.",stateDeleted:"L'\xE9tat a \xE9t\xE9 supprim\xE9",stateRenamed:"L'\xE9tat a \xE9t\xE9 renomm\xE9",stateSaved:"L'\xE9tat a \xE9t\xE9 sauvegard\xE9",normalStateSave:"Les options du moteur ont \xE9t\xE9 enregistr\xE9es pour l'\xE9tat normal",svgCopied:"SVG copi\xE9 dans le presse-papier"},$v={AND:"ET",ANDFilterDesc:"Conserver les n\u0153uds avec toutes les valeurs s\xE9lectionn\xE9es",OR:"OU",ORFilterDesc:"Conserver les n\u0153uds contenant au moins une des valeurs s\xE9lectionn\xE9es",combinationLogic:"Logique combinatoire",editShapeQuery:"\xC9diter la requ\xEAte pour la forme",excludeRegex:"Expression r\xE9guli\xE8re d'exclusion",excludeRegexDesc:"Utilisez des expressions r\xE9guli\xE8res pour exclure automatiquement certaines valeurs. Commencez une nouvelle ligne pour une nouvelle expression r\xE9guli\xE8re.",setShapeQueryFor:"Cr\xE9er la requ\xEAte de forme pour",files:"Fichiers",logicKey:{contains:"contient",containsNot:"ne contient pas",is:"est",isNot:"n'est pas",containsRegex:"contient regex",containsRegexNot:"ne contient pas regex",matchesRegex:"correspond regex",matchesRegexNot:"ne correspond pas regex",isEmpty:"est vide",isEmptyNot:"n'est pas vide"},matchingFiles:"Fichiers correspondants",match:"correspondance",matches:"correspondances",query:"Requ\xEAte",rules:"R\xE8gles",source:{all:"Tout",tag:"Tags",link:"Liens",property:"Propri\xE9t\xE9",file:"Fichier",folder:"Dossier",folderRec:"Dossier et sous-dossiers",path:"Chemin"},viewMatches:"Voire les correspondances"},qv={defaultState:"\xC9tat par d\xE9faut",editStateName:"Modifier le nom de l'\xE9tat",graphState:"\xC9tat du graphe",newStateName:"Nom du nouvel \xE9tat",openSettings:"Afficher les \xE9tats",saveConfigsWithState:"Enregistrer la configuration avec l'\xE9tat",saveConfigsWithStateDesc:"Lorsque vous enregistrez un \xE9tat, le plugin enregistre automatiquement la configuration sous le m\xEAme nom (apr\xE8s avoir supprim\xE9 les caract\xE8res non valides)",saveForDefaultState:"Sauvegarder pour l'\xE9tat par d\xE9faut",saveForDefaultStateDesc:"Sauvegarde les r\xE9glages actuels comme les r\xE9glages pour l'\xE9tat par d\xE9faut",saveForNormalState:"Sauvegarder pour l'\xE9tat natif",saveForNormalStateDesc:"(Graphe de base sans $t(plugin.name))",saveForNormalStateTooltip:"Sauvegarde les r\xE9glages actuels comme les r\xE9glages pour l'\xE9tat natif",showGraphState:"Affiche l'\xE9tat du graphe",startingState:"\xC9tat de d\xE9part",startingStateDesc:"S\xE9lectionne quel \xE9tat doit \xEAtre utilis\xE9 pour initialiser le module",states:"\xC9tats",syncDefaultState:"Synchroniser l'\xE9tat par d\xE9faut",syncDefaultStateDesc:"Toujours ouvrir l'\xE9tat par d\xE9faut avec les options actuellement utilis\xE9es par le plugin principal sans avoir \xE0 les enregistrer manuellement"},Yv={AdamicAdar:"Adamic Adar",authority:"Authority centrality (from HITS)",backlinksCount:"Nombre de r\xE9troliens",backUniquelinksCount:"Nombre de r\xE9troliens uniques",betweenness:"Betweenness centrality",BoW:"Bag of Words",closeness:"Closeness centrality",clusteringCoefficient:"Clustering coefficient",coCitations:"Co-citations",constant:"Constante",creationTime:"Dur\xE9e depuis la cr\xE9ation du fichier",degree:"Degree centrality",eccentricity:"Eccentricity in the connected graph",eigenvector:"Eigenvector centrality",filenameLength:"Longueur du nom de fichier",forwardlinksCount:"Nombre de liens sortants",forwardUniquelinksCount:"Nombre de liens sortants uniques",totallinksCount:"Nombre de liens",totalUniquelinksCount:"Nombre de liens uniques",hub:"Hub centrality (from HITS)",Jaccard:"Jaccard similarity",modifiedTime:"Temps depuis la derni\xE8re modification",Occurences:"Number of occurences",OtsukaOchiai:"Otsuka-Ochiai coefficient",overlap:"Overlap coefficient",tagsCount:"Nombre de tags",topological:"Propagation topologique",warningUnreliableOS:"Ce calcul n'est pas fiable et peut varier selon l'OS.",sentiment:"Sentiment"},Xv={horizontalLegend:"L\xE9gende horizontale",horizontalLegendDesc:"Utilise une disposition horizontale pour le conteneur de l\xE9gende (avec des balises, des propri\xE9t\xE9s et des boutons de basculement des balises)",howToUse:"Comment utiliser",howToUseGradientMaker:"<ul><li><strong>Faites glisser les poign\xE9es</strong> pour d\xE9placer les arr\xEAts de couleur le long du d\xE9grad\xE9</li><li><strong>Cliquez sur une poign\xE9e</strong> pour changer sa couleur</li><li><strong>Double-cliquez</strong> sur le d\xE9grad\xE9 pour ajouter un nouveau point de couleur</li><li><strong>Appuyez sur les touches Retour arri\xE8re, Supprimer ou Effacer</strong> sur une poign\xE9e pour la supprimer</li><li><strong>Interpolate</strong>: cr\xE9e des transitions de couleurs fluides entre les arr\xEAts</li><li><strong>Inverser</strong>: inverse l'ordre final de la palette (gauche \u2194 droite)</li></ul>",name:"Nom",showPinIcon:"Afficher l'ic\xF4ne d'\xE9pingle",showPinIconDesc:"Lorsqu'un n\u0153ud est \xE9pingl\xE9, afficher une ic\xF4ne dans son coin sup\xE9rieur droit pour indiquer son \xE9tat \xE9pingl\xE9"},Kv={plugin:Gv,beta:Uv,controls:Vv,errors:zv,features:Wv,inputs:Hv,notices:jv,query:$v,states:qv,statsFunctions:Yv,UI:Xv};var op={};El(op,{UI:()=>ax,beta:()=>Qv,controls:()=>Jv,default:()=>lx,errors:()=>ex,features:()=>tx,inputs:()=>rx,notices:()=>ix,plugin:()=>Zv,query:()=>sx,states:()=>nx,statsFunctions:()=>ox});var Zv={custom:"\u81EA\u5B9A\u4E49",dark:"\u6697\u8272",default:"\u9ED8\u8BA4",folder:"\u6587\u4EF6\u5939",folders:"\u6587\u4EF6\u5939",filter:"\u7B5B\u9009\u5668",nodeName:"\u8282\u70B9\u540D\u79F0",info:"\u4FE1\u606F",light:"\u4EAE\u8272",name:"Extended Graph \u589E\u5F3A\u56FE\u8C31",nodes:"\u8282\u70B9",options:"\u9009\u9879",settings:"\u8BBE\u7F6E",source:"\u6765\u6E90",target:"\u76EE\u6807",valuePlaceholder:"\u8F93\u5165\u503C..."},Qv={beta:"Beta",betaFeatures:"Beta \u529F\u80FD",enableCSS:"\u542F\u7528\u81EA\u5B9A\u4E49 CSS",enableCSSDesc:"\u5141\u8BB8\u63D2\u4EF6\u5C06\u81EA\u5B9A\u4E49 CSS \u6CE8\u5165\u5173\u7CFB\u56FE\u8C31\u4EE5\u8FDB\u884C\u8FDB\u4E00\u6B65\u5B9A\u5236\u3002\u518D\u6B21\u8F93\u5165\u4F7F\u7528\u7684 CSS \u7247\u6BB5\u540D\u79F0\u3002",revertAction:"\u64A4\u9500\u64CD\u4F5C",revertActionDesc:"\u5F53\u8FBE\u5230\u6700\u5927\u8282\u70B9\u6570\u65F6\uFF0C\u5C1D\u8BD5\u64A4\u9500\u6700\u540E\u64CD\u4F5C\uFF08\u800C\u975E\u76F4\u63A5\u7981\u7528\u63D2\u4EF6\uFF09"},Jv={add:"\u6DFB\u52A0",apply:"\u5E94\u7528",back:"\u8FD4\u56DE",cancel:"\u53D6\u6D88",delete:"\u5220\u9664",disable:"\u7981\u7528",disableAll:"\u5168\u90E8\u7981\u7528",disableInGraphView:"\u5728\u5173\u7CFB\u56FE\u8C31\u4E2D\u7981\u7528",edit:"\u7F16\u8F91",enable:"\u542F\u7528",enableAll:"\u5168\u90E8\u542F\u7528",enabled:"\u5DF2\u542F\u7528",enableInGraphView:"\u5728\u5173\u7CFB\u56FE\u8C31\u4E2D\u542F\u7528",export:"\u5BFC\u51FA",exportSettings:"\u5BFC\u51FA\u8BBE\u7F6E",goTo:"\u8DF3\u8F6C\u5230",hide:"\u9690\u85CF",hideAll:"\u5168\u90E8\u9690\u85CF",hideRow:"\u9690\u85CF\u884C",import:"\u5BFC\u5165",importSettings:"\u5BFC\u5165\u8BBE\u7F6E",importSettingsAndReload:"\u5BFC\u5165\u8BBE\u7F6E\u5E76\u91CD\u65B0\u52A0\u8F7D",interpolate:"\u63D2\u503C",manage:"\u7BA1\u7406",moveUp:"\u4E0A\u79FB",moveDown:"\u4E0B\u79FB",no:"\u5426",openLegend:"\u6253\u5F00\u56FE\u4F8B (\u6807\u7B7E\u3001\u94FE\u63A5\u3001\u5C5E\u6027)",orCreateConfig:"\u6216\u521B\u5EFA\u65B0\u914D\u7F6E",override:"\u8986\u76D6",overrideConfig:"\u8986\u76D6\u73B0\u6709\u914D\u7F6E",page:"\u9875\u9762",pageCurrent:"\u5F53\u524D\u9875",pageFirst:"\u9996\u9875",pageLast:"\u672B\u9875",pathRegexPlaceholder:'\u8F93\u5165\u8DEF\u5F84\u6216\u6B63\u5219\u8868\u8FBE\u5F0F\uFF08"/regex/"\uFF09...',resetGraph:"\u91CD\u7F6E\u56FE\u8C31",resetInGraphView:"\u5728\u5173\u7CFB\u56FE\u8C31\u4E2D\u91CD\u7F6E",reverse:"\u53CD\u8F6C",save:"\u4FDD\u5B58",selectConfigToImport:"\u9009\u62E9\u8981\u5BFC\u5165\u7684\u914D\u7F6E",setConfigName:"\u8BBE\u7F6E\u914D\u7F6E\u540D\u79F0",show:"\u663E\u793A",showAll:"\u5168\u90E8\u663E\u793A",toggle:"\u5207\u6362",toggleAll:"\u5207\u6362\u6240\u6709\u6587\u4EF6\u5939",toggleAllWithMoreThanOneNode:"\u542B\u6709\u5927\u4E8E1\u4E2A\u8282\u70B9\u6570",rows:"\u884C",yes:"\u662F"},ex={uri401:"\u83B7\u53D6\u8282\u70B9\u56FE\u50CF\u65F6\u9047\u5230 URL \u672A\u6388\u6743\u9519\u8BEF\uFF08\u4EE3\u7801401\uFF09\uFF1A\u8FD9\u53EF\u80FD\u610F\u5473\u7740URL\u65E0\u6548\u3002\u56FE\u50CF\u5C06\u4E0D\u4F1A\u52A0\u8F7D\uFF0C\u53EF\u4EE5\u5B89\u5168\u5FFD\u7565\u6B64\u6D88\u606F\u3002",issueNeedView:"\u63D2\u4EF6 $t(plugin.name) \u51FA\u73B0\u95EE\u9898\u3002\u8BF7\u5173\u95ED\u5173\u7CFB\u56FE\u8C31\u540E\u91CD\u65B0\u6253\u5F00\u3002",paletteNameRequired:"\u9700\u8981\u4E3A\u6B64\u989C\u8272\u6620\u5C04\u9009\u62E9\u540D\u79F0"},tx={ids:{arrows:"\u7BAD\u5934",automation:"\u81EA\u52A8\u5316",beta:"beta",display:"\u663E\u793A",elementsStats:"\u7EDF\u8BA1",filter:"\u8FC7\u6EE4\u5668",focus:"\u805A\u7126",folders:"\u6587\u4EF6\u5939",icons:"\u56FE\u6807",images:"\u56FE\u50CF",inputs:"\u8F93\u5165",layers:"\u56FE\u5C42",localGraph:"\u5C40\u90E8\u56FE\u8C31",linkTypes:"\u94FE\u63A5",names:"\u8282\u70B9\u540D\u79F0",performances:"\u6027\u80FD",properties:"\u5C5E\u6027",shapes:"\u5F62\u72B6",tags:"\u6807\u7B7E",zoom:"\u805A\u7126"},animateDotsOnLinks:"\u5728\u94FE\u63A5\u4E0A\u663E\u793A\u5706\u70B9\u52A8\u753B",animateDotsOnLinksDesc:"\u5F53\u9F20\u6807\u60AC\u505C\u5728\u8282\u70B9\u4E0A\u65F6\uFF0C\u5728\u94FE\u63A5\u4E0A\u663E\u793A\u5706\u70B9\u52A8\u753B\u4EE5\u5C55\u793A\u4FE1\u606F\u6D41\u5411",animateDotsOnLinksSpeed:"\u52A8\u753B\u901F\u5EA6",animateDotsOnLinksSpeedDesc:"\u94FE\u63A5\u4E0A\u5706\u70B9\u52A8\u753B\u7684\u901F\u5EA6",arrows:"\u7BAD\u5934",arrowsDesc:"\u81EA\u5B9A\u4E49\u7BAD\u5934\u663E\u793A\u65B9\u5F0F",arrowsColor:"\u81EA\u5B9A\u4E49\u989C\u8272",arrowsColorDesc:"\u4E3A\u94FE\u63A5\u7BAD\u5934\u9009\u62E9\u81EA\u5B9A\u4E49\u989C\u8272",arrowsInvert:"\u53CD\u8F6C\u7BAD\u5934",arrowsInvertDesc:"\u53CD\u8F6C\u94FE\u63A5\u4E0A\u7BAD\u5934\u7684\u65B9\u5411",arrowsFixedSize:"\u56FA\u5B9A\u5927\u5C0F",arrowsFixedSizeDesc:"\u7F29\u653E\u65F6\u4F7F\u7BAD\u5934\u4FDD\u6301\u56FA\u5B9A\u5927\u5C0F",arrowsFlat:"\u4E09\u89D2\u5F62\u7BAD\u5934",arrowsFlatDesc:"\u4F7F\u7528\u4E09\u89D2\u5F62\u7BAD\u5934\u66FF\u4EE3\u9ED8\u8BA4\u7684\u66F2\u7EBF\u7BAD\u5934\u6837\u5F0F",arrowsOpaque:"\u4E0D\u900F\u660E\u7BAD\u5934",arrowsOpaqueDesc:"\u79FB\u9664\u7BAD\u5934\u900F\u660E\u5EA6\uFF0C\u4F7F\u5176\u5B8C\u5168\u5B9E\u5FC3\u663E\u793A",arrowsOpaqueAlways:"\u59CB\u7EC8",arrowsOpaqueKeepFading:"\u4EC5\u7F29\u653E\u65F6",arrowsScale:"\u7F29\u653E",arrowsScaleDesc:"\u589E\u5927\u6216\u51CF\u5C0F\u7BAD\u5934\u6BD4\u4F8B",automation:"\u81EA\u52A8\u5316",autoEnable:"\u81EA\u52A8\u542F\u7528",autoEnableDesc:"\u5728\u5173\u7CFB\u56FE\u8C31\u4E2D\u81EA\u52A8\u542F\u7528\u63D2\u4EF6",autoReset:"\u66F4\u6539\u540E\u91CD\u7F6E\u5173\u7CFB\u56FE\u8C31",autoResetDesc:"\u5982\u679C\u5173\u95ED\u6B64\u6807\u7B7E\u540E\u8BBE\u7F6E\u53D1\u751F\u53D8\u5316\uFF0C\u5219\u5728\u5DF2\u542F\u7528\u63D2\u4EF6\u7684\u5173\u7CFB\u56FE\u8C31\u4E2D\u91CD\u7F6E\u63D2\u4EF6",borderUnresolved:"\u672A\u89E3\u6790\u8282\u70B9\u7684\u8F6E\u5ED3",borderUnresolvedDesc:"\u5982\u679C\u503C\u57280\u52301\u4E4B\u95F4\uFF08\u4E0D\u5305\u62EC\u8FB9\u754C\u503C\uFF09\uFF0C\u672A\u89E3\u6790\u8282\u70B9\u5C06\u53EA\u663E\u793A\u5706\u5F62\u8F6E\u5ED3\u800C\u975E\u5B8C\u6574\u7684\u5706",brightness:"\u660E\u5EA6\u7CFB\u6570",brightnessDesc:"\u4F7F\u7528\u8BE5\u7CFB\u6570\u8C03\u6574\u6807\u7B7E\u3001\u5C5E\u6027\u548C\u94FE\u63A5\u7684\u914D\u8272\u4EAE\u5EA6\uFF0C\u4EE5\u66F4\u597D\u5730\u9002\u914D\u660E\u6697\u4E3B\u9898\uFF08\u6570\u503C\u8D8A\u5927\u8D8A\u4EAE\uFF09\u3002\u5207\u6362\u4E3B\u9898\u65F6\uFF0C\u9700\u91CD\u65B0\u52A0\u8F7D\u56FE\u8C31\u3002",canonicalizePropertiesWithDataview:"\u89C4\u8303\u5316\u5C5E\u6027\u540D\u79F0\uFF08Dataview\uFF09",canonicalizePropertiesWithDataviewDesc:"\u9ED8\u8BA4\u60C5\u51B5\u4E0B\uFF0CDataview\u63D2\u4EF6\u4F1A\u89C4\u8303\u5316\u5C5E\u6027\u540D\u79F0\uFF0C\u5C06\u6240\u6709\u5B57\u6BCD\u8F6C\u4E3A\u5C0F\u5199\u5E76\u79FB\u9664\u8FDE\u5B57\u7B26\u548C\u4E0B\u5212\u7EBF\u3002\u5982\u9700\u4F7F\u7528\u975E\u89C4\u8303\u5316\u7684\u5C5E\u6027\uFF0C\u8BF7\u7981\u7528\u6B64\u529F\u80FD\u3002\u8BF7\u6CE8\u610F\uFF0C\u82E5\u5B58\u5728\u4E24\u4E2A\u5C5E\u6027\u4E92\u4E3A\u89C4\u8303\u5316\u7248\u672C\uFF08\u4F8B\u5982CaseSensitive\u548Ccasesensitive\uFF09\uFF0C\u5219\u89C4\u8303\u5316\u7248\u672C\u5C06\u88AB\u820D\u5F03\u3002\u6B64\u9009\u9879\u4EC5\u5728\u4F7F\u7528Dataview\u63D2\u4EF6\u65F6\u751F\u6548\u3002",colorBasedOnDepth:"\u57FA\u4E8E\u6DF1\u5EA6\u7740\u8272 (\u4EC5\u5C40\u90E8\u56FE\u8C31)",colorBasedOnDepthDesc:"\u5728\u5C40\u90E8\u56FE\u8C31\u4E2D\uFF0C\u6839\u636E\u8282\u70B9\u76F8\u5BF9\u4E8E\u4E3B\u8282\u70B9\u7684\u6DF1\u5EA6\u4E3A\u5176\u7740\u8272",depthPalette:"\u6DF1\u5EA6\u8C03\u8272\u677F",depthPaletteDesc:"\u9009\u62E9\u7528\u4E8E\u6DF1\u5EA6\u5C42\u7EA7\u8282\u70B9\u7684\u914D\u8272\u65B9\u6848",disableNodes:"\u7981\u7528\u8282\u70B9",disableNodesDesc:"\u5F53\u8282\u70B9\u4E0A\u6240\u6709\u5706\u5F27\u90FD\u88AB\u7981\u7528\u65F6\uFF0C\u5C06\u5176\u4ECE\u56FE\u8C31\u4E2D\u79FB\u9664",excludeSourceFolders:"\u6392\u9664\u6765\u6E90\u6587\u4EF6\u5939",excludeSourceFoldersDesc:"\u6392\u9664\u6765\u6E90\u5728\u67D0\u4E9B\u6587\u4EF6\u5939\u5185\u7684\u6B63\u5411\u94FE\u63A5\uFF08\u5373\u6765\u81EA\u8FD9\u4E9B\u6587\u4EF6\u5939\u7684\u94FE\u63A5\uFF09",excludeTargetFolders:"\u6392\u9664\u76EE\u6807\u6587\u4EF6\u5939",excludeTargetFoldersDesc:"\u6392\u9664\u76EE\u6807\u5728\u67D0\u4E9B\u6587\u4EF6\u5939\u5185\u7684\u53CD\u5411\u94FE\u63A5\uFF08\u5373\u6307\u5411\u8FD9\u4E9B\u6587\u4EF6\u5939\u7684\u94FE\u63A5\uFF09",excludedFolders:"\u6392\u9664\u7684\u6587\u4EF6\u5939",externalLinks:"\u6DFB\u52A0\u5916\u90E8\u94FE\u63A5",externalLinksDesc:"\u5C06\u5916\u90E8 URL \u4F5C\u4E3A\u9644\u4EF6\u8282\u70B9\u663E\u793A\u5728\u56FE\u8C31\u4E2D\u3002\u94FE\u63A5\u7684\u7C7B\u578B\u4E0D\u53D7\u652F\u6301\u3002",noExclusionFilter:"\u5F53\u524D\u672A\u5E94\u7528\u6392\u9664\u7B5B\u9009\u5668\uFF0C\u8BF7\u5728\u4E0B\u65B9\u6DFB\u52A0\u3002",withExclusionFilter:"\u5339\u914D\u4EE5\u4E0B\u7B5B\u9009\u5668\u7684\u6587\u4EF6\u5728\u56FE\u8C31\u4E2D\u5C06\u6CA1\u6709\u6B63\u5411/\u53CD\u5411\u94FE\u63A5\uFF1A",fadeInElements:"\u65B0\u5143\u7D20\u6DE1\u5165\u6548\u679C",fadeInElementsDesc:"\u63D2\u4EF6\u63D0\u4F9B\u7684\u62D3\u5C55\u5143\u7D20\u4F1A\u4EE5\u6DE1\u5165\u7684\u65B9\u5F0F\u663E\u793A\uFF0C\u800C\u975E\u7A81\u7136\u51FA\u73B0",filters:"\u8FC7\u6EE4\u5668",filtersDesc:"\u57FA\u4E8E\u6B63\u5219\u5339\u914D\uFF0C\u4ECE\u56FE\u8C31\u4E2D\u6392\u9664\u7279\u5B9A\u7684\u6587\u4EF6\u548C\u6587\u4EF6\u5939",focus:"\u805A\u7126",focusDesc:"\u653E\u5927\u5F53\u524D\u6D3B\u52A8\u7B14\u8BB0\u5BF9\u5E94\u7684\u8282\u70B9",focusScale:"\u7F29\u653E\u7CFB\u6570",focusScaleDesc:"\u5F53\u524D\u6D3B\u52A8\u7B14\u8BB0\u5BF9\u5E94\u7684\u8282\u70B9\u5C06\u6309\u6B64\u7CFB\u6570\u8FDB\u884C\u653E\u5927",folders:"\u6587\u4EF6\u5939",foldersDesc:"\u663E\u793A\u6587\u4EF6\u5939\u8FB9\u6846",folderShowFullPath:"\u663E\u793A\u5B8C\u6574\u8DEF\u5F84",folderShowFullPathDesc:"\u542F\u7528\u65F6\u663E\u793A\u6587\u4EF6\u5939\u5B8C\u6574\u8DEF\u5F84\uFF1B\u7981\u7528\u65F6\u4EC5\u663E\u793A\u6587\u4EF6\u5939\u540D\u79F0",icons:"\u56FE\u6807",iconsDesc:"\u4E3A\u8282\u70B9\u4F7F\u7528\u56FE\u6807\u6216\u8868\u60C5\u7B26\u53F7",iconProperties:"\u56FE\u6807\u5C5E\u6027",iconPropertiesDesc:"\u53EF\u7528\u4E8E\u67E5\u8BE2\u8282\u70B9\u7B14\u8BB0\u56FE\u6807\u7684\u5C5E\u6027\u952E\uFF08\u540D\u79F0\uFF09\uFF0C\u5BF9\u5E94\u5143\u6570\u636E\u652F\u6301\u4F7F\u7528 Unicode \u8868\u60C5\u7B26\u53F7\u6216 Lucide \u56FE\u6807\u540D\u79F0\u3002",iconPropertiesAdd:"\u6DFB\u52A0\u56FE\u6807\u5C5E\u6027",iconUsePlugin:'\u4F7F\u7528"Iconic"\u6216"Iconize"\u63D2\u4EF6',iconUsePluginDesc:'\u4F7F\u7528\u901A\u8FC7"Iconic"\u6216"Iconize"\u793E\u533A\u63D2\u4EF6\u5728\u6587\u4EF6\u8D44\u6E90\u7BA1\u7406\u5668\u4E2D\u8BBE\u7F6E\u7684\u56FE\u6807',iconUsePluginColor:'\u4F7F\u7528"Iconic"\u6216"Iconize"\u63D2\u4EF6\u7684\u989C\u8272',iconUsePluginColorDesc:'\u4F7F\u7528\u901A\u8FC7"Iconic"\u6216"Iconize"\u63D2\u4EF6\u5728\u6587\u4EF6\u8D44\u6E90\u7BA1\u7406\u5668\u4E2D\u8BBE\u7F6E\u7684\u56FE\u6807\u989C\u8272',iconUseParentIcon:"\u4F7F\u7528\u7236\u6587\u4EF6\u5939\u56FE\u6807",iconUseParentIconDesc:'\u5982\u679C\u6587\u4EF6\u672C\u8EAB\u672A\u901A\u8FC7"Iconic"\u6216"Iconize"\u63D2\u4EF6\u8BBE\u7F6E\u56FE\u6807\uFF0C\u5C06\u5C1D\u8BD5\u67E5\u627E\u7236\u6587\u4EF6\u5939\u8BBE\u7F6E\u7684\u56FE\u6807',image:"\u56FE\u50CF",images:"\u56FE\u50CF",imageDesc:"\u5728\u8282\u70B9\u9876\u90E8\u663E\u793A\u56FE\u50CF",imagesAllowExternal:"\u5141\u8BB8\u4F7F\u7528\u7F51\u7EDC\u56FE\u50CF",imagesAllowExternalDesc:"\u5141\u8BB8\u901A\u8FC7 http: \u548C https: \u534F\u8BAE\u52A0\u8F7D\u5916\u90E8\u56FE\u50CF",imagesAllowExternalLocal:"\u5141\u8BB8\u4F7F\u7528\u5E93\u5916\u7684\u672C\u5730\u56FE\u50CF",imagesAllowExternalLocalDesc:"\u5141\u8BB8\u901A\u8FC7 file: \u548C app: \u534F\u8BAE\u52A0\u8F7D\u5916\u90E8\u56FE\u50CF",imagesFromProperty:"\u6765\u81EA\u5C5E\u6027",imagesFromPropertyDesc:"\u663E\u793Afrontmatter\u4E2D\u5C5E\u6027\u6307\u5B9A\u7684\u56FE\u50CF",imagesFromEmbeds:"\u6765\u81EA\u5D4C\u5165",imagesFromEmbedsDesc:'\u5982\u679C\u5728\u7B14\u8BB0\u5185\u627E\u5230\u7684\u5D4C\u5165\u7684\u56FE\u50CF\uFF0C\u5219\u5C06\u5176\u663E\u793A\u3002"\u6765\u81EA\u5C5E\u6027"\u5177\u6709\u66F4\u9AD8\u4F18\u5148\u7EA7\u3002',imagesForAttachments:"\u9644\u4EF6\u56FE\u50CF",imagesForAttachmentsDesc:"\u4E3A\u9644\u4EF6\u8282\u70B9\u663E\u793A\u56FE\u50CF",imageProperties:"\u56FE\u50CF\u5C5E\u6027",imagePropertiesDesc:"\u53EF\u7528\u4E8E\u67E5\u8BE2\u8282\u70B9\u7B14\u8BB0\u56FE\u50CF\u7684\u5C5E\u6027\u540D\u79F0",imagePropertiesAdd:"\u6DFB\u52A0\u56FE\u50CF\u5C5E\u6027",imageBorderWidth:"\u8FB9\u6846\u5BBD\u5EA6(%)",imageBorderWidthDesc:"\u8282\u70B9\u80CC\u666F\u4F5C\u4E3A\u53EF\u89C1\u8FB9\u6846\u7684\u767E\u5206\u6BD4",interactives:{alreadyExists:"\u5DF2\u5B58\u5728",arcsAdd:"\u6DFB\u52A0\u5706\u5F27",arcsAddPropertyDesc:"\u5728\u8282\u70B9\u5468\u56F4\u6DFB\u52A0\u5706\u5F27\u4EE5\u53EF\u89C6\u5316\u5C5E\u6027\u503C",arcsAddTagDesc:"\u5728\u8282\u70B9\u5468\u56F4\u6DFB\u52A0\u5706\u5F27\u4EE5\u53EF\u89C6\u5316\u6807\u7B7E",arcsSpread:"\u5C55\u5F00\u5706\u5F27",arcsSpreadDesc:"\u5728\u8282\u70B9\u5468\u56F4\u5C55\u5F00\u5706\u5F27\uFF0C\u4EE5\u5B8C\u5168\u586B\u5145\u53EF\u7528\u7A7A\u95F4",arcWeight:"\u5E26\u6743\u91CD\u7684\u5706\u5F27\u957F\u5EA6",arcWeightDesc:'\u4F7F\u7528\u503C\u51FA\u73B0\u7684\u6B21\u6570\u6765\u8C03\u6574\u5706\u5F27\u957F\u5EA6(\u9700\u542F\u7528"\u5C55\u5F00\u5706\u5F27")',colorLinks:"\u94FE\u63A5\u7740\u8272",colorLinksDesc:"\u4E3A\u5173\u7CFB\u56FE\u8C31\u4E2D\u7684\u94FE\u63A5\u6DFB\u52A0\u989C\u8272",colorLinkTypeLabel:"\u6807\u7B7E\u989C\u8272",colorLinkTypeLabelDesc:"\u4F7F\u7528\u4E0E\u94FE\u63A5\u76F8\u540C\u7684\u989C\u8272\u4E3A\u7C7B\u578B\u6807\u7B7E\u6587\u672C\u7740\u8272",curvedFactor:"\u66F2\u7387\u7CFB\u6570",curvedFactorDesc:"\u8D1F\u503C\u5C06\u53CD\u8F6C\u5F62\u72B6\uFF0C\u7EDD\u5BF9\u503C\u8D8A\u5927\u66F2\u7387\u8D8A\u5927\uFF0C\u63A5\u8FD10\u7684\u503C\u5C06\u4F7F\u5176\u53D8\u5E73",curvedLinks:"\u66F2\u7EBF\u94FE\u63A5",curvedLinksDesc:"\u4F7F\u7528\u66F2\u7EBF\u94FE\u63A5\u800C\u975E\u76F4\u7EBF",displayLinkTypeLabel:"\u663E\u793A\u6807\u7B7E",displayLinkTypeLabelDesc:"\u5728\u94FE\u63A5\u9876\u90E8\u663E\u793A\u7C7B\u578B\u6807\u7B7E\u6587\u672C",linkTypes:"\u94FE\u63A5",linkTypesDesc:"\u663E\u793A\u548C\u7B5B\u9009\u94FE\u63A5\u7C7B\u578B",noneTypeID:"\u65E0\u7C7B\u578BID",noneTypeIDDesc:"\u5982\u679C\u672A\u627E\u5230\u5C06\u8D4B\u4E88\u7684ID",palette:"\u8C03\u8272\u677F",paletteDesc:"\u9009\u62E9\u8C03\u8272\u677F",paletteMatplotlibDesc:"\u8FD9\u4E9B\u989C\u8272\u6620\u5C04\u6765\u81EA matplotlib\u3002\u60A8\u53EF\u4EE5\u5728\u6B64\u5904\u67E5\u770B\u66F4\u591A\u4FE1\u606F\uFF1A",palettePickGradient:"\u9009\u62E9\u6E10\u53D8\u8C03\u8272\u677F",properties:"\u5C5E\u6027",propertiesDesc:"\u5C5E\u6027\u503C\u7684\u663E\u793A\u548C\u7B5B\u9009",property:"\u5C5E\u6027",propertyDesc:"\u5C5E\u6027\u503C\u7684\u663E\u793A\u548C\u7B5B\u9009",propertyAlreadyExists:"\u6B64\u5C5E\u6027\u5DF2\u5B58\u5728",propertyReservedFolders:"\u6B64\u5C5E\u6027\u952E\u4E3A\u6587\u4EF6\u5939\u4FDD\u7559",propertyReservedLinks:"\u6B64\u5C5E\u6027\u952E\u4E3A\u94FE\u63A5\u4FDD\u7559",propertyReservedTags:"\u6B64\u5C5E\u6027\u952E\u4E3A\u6807\u7B7E\u4FDD\u7559",selection:"\u9009\u62E9",selectionDesc:"\u9009\u62E9\u8BE5\u63D2\u4EF6\u5185\u6709\u6548\u7684\u503C",selectionFor:"\u9009\u62E9\u4E3A",specificColors:"\u7279\u5B9A\u989C\u8272",specificColorsDesc:"\u4E3A\u5176\u5206\u914D\u6307\u5B9A\u7684\u989C\u8272\uFF08\u8986\u76D6\u8C03\u8272\u677F\u7684\u914D\u8272\uFF09",tags:"\u6807\u7B7E",tagsDesc:"\u6807\u7B7E\u7684\u663E\u793A\u548C\u7B5B\u9009"},layers:"\u56FE\u5C42",layersDesc:"\u6839\u636E\u56FE\u5C42\u7684\u8282\u70B9\u5206\u7EC4\uFF0C\u5E76\u8C03\u8282\u5B83\u4EEC\u7684\u900F\u660E\u5EA6",layersDisplayLabels:"\u5728 UI \u4E2D\u663E\u793A\u6807\u7B7E",layersDisplayLabelsDesc:"\u5982\u679C\u56FE\u5C42\u6709\u76F8\u5173\u8054\u7684\u6807\u7B7E\uFF0C\u4F8B\u5982 `4_cave`\uFF0C\u5219\u5C06\u6807\u7B7E\u6DFB\u52A0\u5230 UI \u4E2D",layersInfoDataview:"\u6CE8\u610F\uFF0C\u60A8\u5728\u6B64\u4FEE\u6539\u7684\u56FE\u5C42\u7EA7\u522B\u548C\u6807\u7B7E\u5C06\u4E0D\u4F1A\u53CD\u5411\u5199\u5165 Dataview \u7684\u5185\u8054\u5C5E\u6027\u3002",layersInfoLevelNotFromID:"\u661F\u53F7\u8868\u793A\u8BE5\u56FE\u5C42\u7684\u5C42\u7EA7\u8BBE\u7F6E\u5E76\u4E0D\u57FA\u4E8E\u5C5E\u6027\u503C",layersNumber:"\u6700\u5927\u56FE\u5C42\u6570",layersNumberDesc:"\u8BBE\u7F6E\u5C06\u5728\u56FE\u8C31\u89C6\u56FE\u4E2D\u540C\u65F6\u663E\u793A\u7684\u6700\u5927\u6D3B\u52A8\u56FE\u5C42\u6570",layersOpacityPlaceholder:"\u4E0D\u900F\u660E\u5EA6",layersOrder:"\u56FE\u5C42\u987A\u5E8F",layersOrderDesc:"\u9009\u62E9\u56FE\u5C42\u662F\u6309\u5347\u5E8F\u8FD8\u662F\u964D\u5E8F\u6392\u5217",layerProperties:"\u56FE\u5C42\u5C5E\u6027",layerPropertiesDesc:"\u53EF\u7528\u4E8E\u67E5\u8BE2\u8282\u70B9\u7B14\u8BB0\u56FE\u5C42\u7684\u5C5E\u6027\u540D\u79F0",layerPropertiesAdd:"\u6DFB\u52A0\u56FE\u5C42\u5C5E\u6027",layersOpacityIfNoLayer:"\u6307\u5B9A\u65E0\u56FE\u5C42\u8282\u70B9\u7684\u4E0D\u900F\u660E\u5EA6",layersOpacityIfNoLayerDesc:"\u5982\u679C\u8282\u70B9\u672A\u5173\u8054\u5230\u4EFB\u4F55\u56FE\u5C42\uFF0C\u5219\u4E3A\u5176\u4F7F\u7528\u8BE5\u4E0D\u900F\u660E\u5EA6\uFF08\u8BBE\u7F6E\u4E3A0\u5373\u9690\u85CF\uFF09",layersUseCustomOpacity:"\u4F7F\u7528\u81EA\u5B9A\u4E49\u4E0D\u900F\u660E\u5EA6",layersUseCustomOpacityDesc:"\u4E3A\u67D0\u4E9B\u56FE\u5C42\u8BBE\u7F6E\u56FA\u5B9A\u7684\u4E0D\u900F\u660E\u5EA6\u503C (0-1)\u3002\u8FD9\u4E9B\u56FE\u5C42\u5C06\u59CB\u7EC8\u4EE5\u6B64\u8BBE\u7F6E\u7684\u4E0D\u900F\u660E\u5EA6\u663E\u793A\uFF0C\u5176\u4ED6\u7684\u4E0D\u900F\u660E\u5EA6\u5C06\u901A\u8FC7\u63D2\u503C\u751F\u6210\u3002",linksAllowMultipleTypes:"\u591A\u7C7B\u578B\u7ED8\u5236",linksAllowMultipleTypesDesc:"\u5141\u8BB8\u56FE\u8C31\u5728\u4E24\u4E2A\u8282\u70B9\u95F4\u7ED8\u5236\u591A\u79CD\u4E0D\u540C\u7C7B\u578B\u7684\u94FE\u63A5",linksOutline:"\u94FE\u63A5\u8F6E\u5ED3",linksOutlineDesc:"\u4E3A\u94FE\u63A5\u548C\u7BAD\u5934\uFF08\u4E0D\u900F\u660E\u65F6\uFF09\u6DFB\u52A0\u8FB9\u7F18\u8F6E\u5ED3",linksSameColorAsNode:"\u57FA\u4E8E\u6765\u6E90\u8282\u70B9\u7684\u94FE\u63A5\u989C\u8272",linksSameColorAsNodeDesc:"\u4F7F\u7528\u6765\u6E90\u8282\u70B9\u7684\u989C\u8272\u4E3A\u94FE\u63A5\u7740\u8272",linksFeatureRequired:"\u9700\u8981\u542F\u7528\u94FE\u63A5\u529F\u80FD\u3002",localGraph:"\u5C40\u90E8\u56FE\u8C31",localGraphDesc:"\u81EA\u5B9A\u4E49\u60A8\u7684\u5C40\u90E8\u56FE\u8C31\uFF0C\u914D\u7F6E\u4E13\u7528\u4E8E\u4E3B\u8282\u70B9\uFF08\u5F53\u524D\u7B14\u8BB0\u5BF9\u5E94\u8282\u70B9\uFF09\u7684\u8BBE\u7F6E",localGraphCurrentNodeColor:"\u5F53\u524D\u8282\u70B9\u7684\u989C\u8272",localGraphCurrentNodeColorDesc:"\u5C40\u90E8\u56FE\u8C31\u4E2D\u4E3B\u8282\u70B9\u7684\u989C\u8272",localGraphCurrentNodeSize:"\u5F53\u524D\u8282\u70B9\u7684\u5927\u5C0F",localGraphCurrentNodeSizeDesc:"\u5C40\u90E8\u56FE\u8C31\u4E2D\u4E3B\u8282\u70B9\u7684\u56FA\u5B9A\u5927\u5C0F\uFF08\u9ED8\u8BA4\u503C\uFF1A100\uFF0C\u6700\u5C0F\u503C\uFF1A10\uFF09",localGraphCurrentNodeShape:"\u5F53\u524D\u8282\u70B9\u7684\u5F62\u72B6",localGraphCurrentNodeShapeDesc:"\u5C40\u90E8\u56FE\u8C31\u4E2D\u4E3B\u8282\u70B9\u7684\u5F62\u72B6",pinnedNodes:"\u56FA\u5B9A\u8282\u70B9",pinNode:"\u56FA\u5B9A\u8282\u70B9",unpinNode:"\u53D6\u6D88\u56FA\u5B9A\u8282\u70B9",unpinAllNodes:"\u53D6\u6D88\u56FA\u5B9A\u6240\u6709\u8282\u70B9",pinMultipleNodes:"\u56FA\u5B9A\u591A\u4E2A\u8282\u70B9",pinMultipleShape:"\u5F62\u72B6",pinMultipleGap:"\u8282\u70B9\u95F4\u8DDD",pinMultipleCenter:"\u4E2D\u5FC3",pinMultipleGridSize:"\u5217\u6570",pinMultipleGridSizeDesc:"\u503C\u53EF\u4EE5\u662F'N'(\u5355\u884C)\u3001'auto'(\u65B9\u5F62\u7F51\u683C)\u6216\u6B63\u6574\u6570",pinSelectedNodes:"\u56FA\u5B9A\u9009\u4E2D\u7684\u8282\u70B9",unpinSelectedNodes:"\u53D6\u6D88\u56FA\u5B9A\u9009\u4E2D\u7684\u8282\u70B9",size:"\u5927\u5C0F",elementsStats:"\u8282\u70B9\u548C\u94FE\u63A5\u7684\u6570\u636E\u7EDF\u8BA1",elementsStatsDesc:"\u9009\u62E9\u5982\u4F55\u8BA1\u7B97\u8282\u70B9\u548C\u94FE\u63A5\u7684\u5927\u5C0F\u548C\u989C\u8272",linkSizesFunction:"\u94FE\u63A5\u7C97\u7EC6\u7684\u8BA1\u7B97\u51FD\u6570",linkSizesFunctionDesc:"\u9009\u62E9\u56FE\u8C31\u5F15\u64CE\u5C06\u5982\u4F55\u8BA1\u7B97\u94FE\u63A5\u7C97\u7EC6",linkColorsFunction:"\u94FE\u63A5\u989C\u8272\u7684\u8BA1\u7B97\u51FD\u6570",linkColorsFunctionDesc:"\u9009\u62E9\u56FE\u8C31\u5F15\u64CE\u5C06\u5982\u4F55\u8BA1\u7B97\u94FE\u63A5\u989C\u8272",linkColorsPaletteDesc:"\u9009\u62E9\u94FE\u63A5\u7684\u8C03\u8272\u677F",names:"\u8282\u70B9\u540D\u79F0",namesDesc:"\u81EA\u5B9A\u4E49\u8282\u70B9\u540D\u79F0\u663E\u793A\u65B9\u5F0F",namesNumberOfCharacters:"\u5B57\u7B26\u9650\u5236",namesNumberOfCharactersDesc:"\u663E\u793A\u8282\u70B9\u540D\u79F0\u7684\u6700\u5927\u5B57\u7B26\u6570\u3002\u7559\u7A7A\u663E\u793A\u5B8C\u6574\u540D\u79F0\u3002",namesShowOnlyFileName:"\u4EC5\u6587\u4EF6\u540D",namesShowOnlyFileNameDesc:"\u4EC5\u663E\u793A\u6587\u4EF6\u540D\u4E0D\u542B\u8DEF\u5F84",namesNoExtension:"\u9690\u85CF\u6269\u5C55\u540D",namesNoExtensionDesc:"\u4ECE\u540D\u79F0\u4E2D\u79FB\u9664\u6587\u4EF6\u6269\u5C55\u540D",namesUseProperties:"\u4F7F\u7528\u5C5E\u6027",namesUsePropertiesDesc:"\u4F7F\u7528\u4E0B\u5217\u5C5E\u6027\u4E4B\u4E00\u6307\u5B9A\u7684\u503C\u4F5C\u4E3A\u8282\u70B9\u540D\u79F0\u800C\u975E\u6587\u4EF6\u540D",namesUsePropertiesAdd:"\u6DFB\u52A0\u8282\u70B9\u540D\u79F0\u5C5E\u6027",namesBackground:"\u6DFB\u52A0\u80CC\u666F",namesBackgroundDesc:"\u4E3A\u8282\u70B9\u540D\u79F0\u6DFB\u52A0\u80CC\u666F\u4EE5\u63D0\u9AD8\u53EF\u8BFB\u6027\uFF0C\u9690\u85CF\u5176\u540E\u7684\u5143\u7D20",namesShowWhenNeighborHighlighted:"\u9AD8\u4EAE\u76F8\u90BB\u8282\u70B9\u65F6\u59CB\u7EC8\u663E\u793A",namesShowWhenNeighborHighlightedDesc:"\u5373\u4F7F\u5B8C\u5168\u7F29\u5C0F\uFF0C\u5F53\u8FDE\u63A5\u7684\u76F8\u90BB\u8282\u70B9\u9AD8\u4EAE\u65F6\u4E5F\u663E\u793A\u6587\u672C",namesVerticalOffset:"\u5782\u76F4\u504F\u79FB",namesVerticalOffsetDesc:"\u6587\u672C\u7684\u5782\u76F4\u504F\u79FB\u3002\u6B63\u503C\u5C06\u6587\u672C\u4E0B\u79FB\uFF0C\u8D1F\u503C\u4E0A\u79FB\u3002",namesDynamicVerticalOffset:"\u52A8\u6001\u5782\u76F4\u504F\u79FB",namesDynamicVerticalOffsetDesc:"\u6839\u636E\u7BAD\u5934\u5927\u5C0F\u52A8\u6001\u8C03\u6574\u6587\u672C\u5782\u76F4\u4F4D\u7F6E\u3002",noLineHighlight:"\u7981\u7528\u8FDE\u7EBF\u7684\u9AD8\u4EAE\u8272",noLineHighlightDesc:"\u5728\u9F20\u6807\u60AC\u6D6E\u5728\u8282\u70B9\u4E0A\u65F6\uFF0C\u4E0D\u5C06\u5176\u76F8\u5173\u94FE\u63A5\u7684\u8FDE\u7EBF\u8BBE\u4E3A\u9AD8\u4EAE\u989C\u8272",nodeSizesFunction:"\u8282\u70B9\u5927\u5C0F\u7684\u8BA1\u7B97\u51FD\u6570",nodeSizesFunctionDesc:"\u9009\u62E9\u56FE\u8C31\u5F15\u64CE\u5C06\u5982\u4F55\u8BA1\u7B97\u8282\u70B9\u5927\u5C0F",nodeSizeProperties:"\u8282\u70B9\u5927\u5C0F\u5C5E\u6027",nodeSizePropertiesDesc:"\u53EF\u7528\u4E8E\u6307\u5B9A\u8282\u70B9\u5927\u5C0F\u7684\u5C5E\u6027\u540D\u79F0\u3002\u5FC5\u987B\u4E3A\u6570\u5B57\u7C7B\u578B\u3002\u9ED8\u8BA4\u503C\u4E3A100\u3002",nodeSizePropertiesAdd:"\u6DFB\u52A0\u8282\u70B9\u5927\u5C0F\u5C5E\u6027",nodeSizesRange:"\u8282\u70B9\u5927\u5C0F\u8303\u56F4",nodeSizesRangeDesc:"\u7528\u4E8E\u8C03\u6574\u8282\u70B9\u6574\u4F53\u5927\u5C0F\u7684\u7F29\u653E\u56E0\u6570\uFF0C\u63A7\u5236\u6700\u5C0F/\u6700\u5927\u8282\u70B9\u95F4\u7684\u4F53\u79EF\u5173\u7CFB\uFF08\u4ECB\u4E8E0.1\u548C5\u4E4B\u95F4\uFF09",nodeColorsFunction:"\u8282\u70B9\u989C\u8272\u7684\u8BA1\u7B97\u51FD\u6570",nodeColorsFunctionDesc:"\u9009\u62E9\u56FE\u8C31\u5F15\u64CE\u5C06\u5982\u4F55\u8BA1\u7B97\u8282\u70B9\u989C\u8272",nodeColorsPaletteDesc:"\u9009\u62E9\u8282\u70B9\u7684\u8C03\u8272\u677F",nodeStatsRecomputeOnGraphChange:"\u56FE\u8C31\u6539\u53D8\u65F6\u91CD\u65B0\u8BA1\u7B97",nodeStatsRecomputeOnGraphChangeDesc:"\u6BCF\u5F53\u56FE\u8C31\u6570\u636E\u53D1\u751F\u53D8\u5316\u65F6\u91CD\u65B0\u8BA1\u7B97\u6307\u6807\u3002\u8FD9\u53EF\u80FD\u4F1A\u5BFC\u81F4\u6027\u80FD\u4E0B\u964D\u3002",openInNewTab:"\u5728\u65B0\u6807\u7B7E\u9875\u6253\u5F00\u8282\u70B9",openInNewTabDesc:"\u5DE6\u952E\u70B9\u51FB\u8282\u70B9\u65F6\u59CB\u7EC8\u5728\u65B0\u6807\u7B7E\u9875\u6253\u5F00",otherDisplay:"\u5176\u4ED6\u663E\u793A\u9009\u9879",performance:"\u6027\u80FD",performanceDelay:"\u521D\u59CB\u5316\u5EF6\u8FDF (\u6BEB\u79D2)",performanceDelayDesc:"\u7531\u4E8E\u5F02\u6B65\u673A\u5236\uFF0C\u53EF\u80FD\u9700\u8981\u7B49\u5F85\u4E00\u6BB5\u65F6\u95F4\u624D\u80FD\u5F00\u59CB\u521D\u59CB\u5316\u6269\u5C55\u529F\u80FD",performanceMaxNodes:"\u6700\u5927\u8282\u70B9\u6570",performanceMaxNodesDesc:"\u5982\u679C\u56FE\u8C31\u5305\u542B\u8D85\u8FC7\u6B64\u8BBE\u7F6E\u7684\u8282\u70B9\u6570\uFF0C\u63D2\u4EF6\u5C06\u88AB\u4E34\u65F6\u7981\u7528",recursive:"\u9012\u5F52",removeSources:"\u79FB\u9664\u6765\u6E90",removeSourcesDesc:"\u7981\u7528\u94FE\u63A5\u7C7B\u578B\u65F6\u4E5F\u7981\u7528\u6E90\u8282\u70B9",removeTargets:"\u79FB\u9664\u76EE\u6807",removeTargetsDesc:"\u7981\u7528\u94FE\u63A5\u7C7B\u578B\u65F6\u4E5F\u7981\u7528\u76EE\u6807\u8282\u70B9",shape:"\u5F62\u72B6",shapes:"\u5F62\u72B6",shapesDesc:"\u4F7F\u7528\u5404\u79CD\u5F62\u72B6\u7684\u8282\u70B9",shapePick:"\u9009\u62E9\u5F62\u72B6",shapesNames:{circle:"\u5706\u5F62",square:"\u65B9\u5F62",triangle:"\u4E09\u89D2\u5F62",diamond:"\u83F1\u5F62",pentagon:"\u4E94\u8FB9\u5F62",hexagon:"\u516D\u8FB9\u5F62",octagon:"\u516B\u8FB9\u5F62",decagon:"\u5341\u8FB9\u5F62",star4:"\u56DB\u89D2\u661F",star5:"\u4E94\u89D2\u661F",star6:"\u516D\u89D2\u661F",star8:"\u516B\u89D2\u661F",star10:"\u5341\u89D2\u661F",polygon:"\u591A\u8FB9\u5F62",starburst:"\u661F\u7206\u5F62",grid:"\u7F51\u683C",line:"\u7EBF\u6761",unknown:"\u672A\u77E5"},svgScreenshotArcs:"\u663E\u793A\u5706\u5F27 (\u6807\u7B7E\u548C/\u6216\u7C7B\u578B)",svgScreenshotCopy:"\u590D\u5236 SVG \u622A\u56FE",svgScreenshotCopyCode:"\u590D\u5236 SVG \u4EE3\u7801\u5230\u526A\u8D34\u677F",svgScreenshotCopyImage:"\u590D\u5236 SVG \u56FE\u50CF\u5230\u526A\u8D34\u677F",svgScreenshotCurvedLinks:"\u4F7F\u7528\u66F2\u7EBF\u94FE\u63A5",svgScreenshotNodeNames:"\u663E\u793A\u8282\u70B9\u540D\u79F0",svgScreenshotNodeShapes:"\u4F7F\u7528\u8282\u70B9\u5F62\u72B6",svgScreenshotOptions:"SVG \u622A\u56FE\u9009\u9879",svgScreenshotVisibleArea:"\u4EC5\u5BFC\u51FA\u53EF\u89C1\u533A\u57DF",zoomOnNode:"\u805A\u7126\u8282\u70B9",zoomScale:"\u805A\u7126\u6BD4\u4F8B",zoomScaleDesc:"\u805A\u7126\u5230\u8282\u70B9\u65F6\u653E\u5927\u7684\u6BD4\u4F8B"},rx={inputs:"\u8F93\u5165",pinHotkey:"\u56FA\u5B9A\u8282\u70B9 (\u53F3\u952E)",pinHotkeyDesc:"\u6309\u4F4F\u6307\u5B9A\u952E\u7684\u540C\u65F6\uFF0C\u9F20\u6807\u53F3\u952E\u70B9\u51FB\u8282\u70B9\uFF0C\u53EF\u4EE5\u5C06\u5176\u56FA\u5B9A",radialMenu:"\u542F\u7528\u8282\u70B9\u8F6E\u76D8\u83DC\u5355",radialMenuDesc:"\u6309\u4F4F\u6307\u5B9A\u952E\u7684\u540C\u65F6\uFF0C\u9F20\u6807\u53F3\u952E\u70B9\u51FB\u8282\u70B9\uFF0C\u5C06\u663E\u793A\u6765\u81EA Extended Graph \u63D2\u4EF6\u7684\u8F6E\u76D8\u83DC\u5355\uFF08\u800C\u975E\u5E38\u89C4\u83DC\u5355\uFF09",rightClickIncompatibility:"\u6309\u952E\u51B2\u7A81\uFF1A\u591A\u4E2A\u8F93\u5165\u64CD\u4F5C\u4F7F\u7528\u4E86\u76F8\u540C\u7684\u4FEE\u9970\u952E\uFF0C\u65E0\u6CD5\u540C\u65F6\u751F\u6548\u3002"},ix={changeInSettings:"\u60A8\u53EF\u4EE5\u5728\u8BBE\u7F6E\u4E2D\u66F4\u6539\u6B64\u9009\u9879",disabled:"\u5DF2\u7981\u7528",graphAnalysisPluginRequired:"\u5FC5\u987B\u542F\u7528 Graph Analysis \u793E\u533A\u63D2\u4EF6\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD",invalidCharacter:"\u65E0\u6548\u5B57\u7B26",nlpPluginRequired:"\u5FC5\u987B\u542F\u7528 NLP \u793E\u533A\u63D2\u4EF6\u624D\u80FD\u4F7F\u7528\u6B64\u529F\u80FD",nodeLimiteExceeded:"\u5C1D\u8BD5\u5904\u7406\u8FC7\u591A\u8282\u70B9",nodeLimitIs:"\u9650\u5236\u4E3A",nodeStatSizeFailed:"\u8BA1\u7B97\u8282\u70B9\u5927\u5C0F\u7EDF\u8BA1\u5931\u8D25",nodeStatColorFailed:"\u8BA1\u7B97\u8282\u70B9\u989C\u8272\u7EDF\u8BA1\u5931\u8D25",linkStatSizeFailed:"\u8BA1\u7B97\u94FE\u63A5\u7C97\u7EC6\u7EDF\u8BA1\u5931\u8D25",linkStatColorFailed:"\u8BA1\u7B97\u94FE\u63A5\u989C\u8272\u7EDF\u8BA1\u5931\u8D25",functionToDefault:"\u5DF2\u6539\u4E3A\u4F7F\u7528\u9ED8\u8BA4\u51FD\u6570",stateDeleted:"\u72B6\u6001\u5DF2\u5220\u9664",stateRenamed:"\u72B6\u6001\u5DF2\u91CD\u547D\u540D",stateSaved:"\u72B6\u6001\u5DF2\u4FDD\u5B58",normalStateSave:"\u5DF2\u4FDD\u5B58\u6B63\u5E38\u72B6\u6001\u7684\u5F15\u64CE\u9009\u9879",svgCopied:"\u5DF2\u5C06 SVG \u590D\u5236\u5230\u526A\u8D34\u677F"},sx={AND:"\u5168\u90E8\u5339\u914D",ANDFilterDesc:"\u4EC5\u4FDD\u7559\u5177\u6709\u6240\u6709\u9009\u5B9A\u503C\u7684\u8282\u70B9",OR:"\u4EFB\u610F\u5339\u914D",ORFilterDesc:"\u4FDD\u7559\u5177\u6709\u81F3\u5C11\u4E00\u4E2A\u9009\u5B9A\u503C\u7684\u8282\u70B9",combinationLogic:"\u7EC4\u5408\u903B\u8F91",editShapeQuery:"\u7F16\u8F91\u5F62\u72B6\u67E5\u8BE2",excludeRegex:"\u6B63\u5219\u6392\u9664",excludeRegexDesc:"\u4F7F\u7528\u6B63\u5219\u8868\u8FBE\u5F0F\u81EA\u52A8\u6392\u9664\u67D0\u4E9B\u503C\u3002\u65B0\u884C\u8868\u793A\u65B0\u7684\u6B63\u5219\u8868\u8FBE\u5F0F\u3002",setShapeQueryFor:"\u8BBE\u7F6E\u5F62\u72B6\u67E5\u8BE2\u4E3A",files:"\u6587\u4EF6",logicKey:{contains:"\u5305\u542B",containsNot:"\u4E0D\u5305\u542B",is:"\u662F",isNot:"\u4E0D\u662F",containsRegex:"\u5305\u542B\u6B63\u5219",containsRegexNot:"\u4E0D\u5305\u542B\u6B63\u5219",matchesRegex:"\u5339\u914D\u6B63\u5219",matchesRegexNot:"\u4E0D\u5339\u914D\u6B63\u5219",isEmpty:"\u4E3A\u7A7A",isEmptyNot:"\u4E0D\u4E3A\u7A7A"},matchingFiles:"\u5339\u914D\u6587\u4EF6",match:"\u5339\u914D",matches:"\u5339\u914D\u9879",query:"\u67E5\u8BE2",rules:"\u89C4\u5219",source:{all:"\u5168\u90E8",tag:"\u6807\u7B7E",link:"\u94FE\u63A5",property:"\u5C5E\u6027",file:"\u6587\u4EF6",folder:"\u6587\u4EF6\u5939",folderRec:"\u6587\u4EF6\u5939\u53CA\u5B50\u6587\u4EF6\u5939",path:"\u8DEF\u5F84"},viewMatches:"\u67E5\u770B\u5339\u914D\u9879"},nx={defaultState:"\u9ED8\u8BA4\u72B6\u6001",editStateName:"\u7F16\u8F91\u72B6\u6001\u540D\u79F0",graphState:"\u56FE\u8C31\u72B6\u6001",newStateName:"\u65B0\u72B6\u6001\u540D\u79F0",openSettings:"\u6253\u5F00\u72B6\u6001\u8BBE\u7F6E",saveConfigsWithState:"\u4FDD\u5B58\u72B6\u6001\u65F6\u7684\u914D\u7F6E",saveConfigsWithStateDesc:"\u4FDD\u5B58\u72B6\u6001\u65F6\uFF0C\u63D2\u4EF6\u5C06\u81EA\u52A8\u4FDD\u5B58\u4E0E\u8BE5\u72B6\u6001\u540C\u540D\u7684\u914D\u7F6E\uFF08\u5E76\u6E05\u9664\u65E0\u6548\u5B57\u7B26\uFF09",saveForDefaultState:"\u4FDD\u5B58\u4E3A\u9ED8\u8BA4\u72B6\u6001",saveForDefaultStateDesc:"\u5C06\u5F53\u524D\u8BBE\u7F6E\u4FDD\u5B58\u4E3A\u9ED8\u8BA4\u72B6\u6001\u8BBE\u7F6E",saveForNormalState:"\u4FDD\u5B58\u4E3A\u5E38\u89C4\u72B6\u6001",saveForNormalStateDesc:"(\u65E0\u63D2\u4EF6\u542F\u7528)",saveForNormalStateTooltip:"\u5C06\u5F53\u524D\u8BBE\u7F6E\u4FDD\u5B58\u4E3A\u5E38\u89C4\u72B6\u6001\uFF08\u539F\u751F\u56FE\u8C31\uFF09\u7684\u8BBE\u7F6E",showGraphState:"\u663E\u793A\u56FE\u8C31\u72B6\u6001",startingState:"\u521D\u59CB\u72B6\u6001",startingStateDesc:"\u9009\u62E9\u7528\u4E8E\u521D\u59CB\u5316\u63D2\u4EF6\u7684\u72B6\u6001",states:"\u72B6\u6001",syncDefaultState:"\u540C\u6B65\u9ED8\u8BA4\u72B6\u6001",syncDefaultStateDesc:"\u59CB\u7EC8\u4F7F\u7528\u6838\u5FC3\u63D2\u4EF6\u7684\u5F53\u524D\u9009\u9879\u6253\u5F00\u9ED8\u8BA4\u72B6\u6001\uFF0C\u65E0\u9700\u624B\u52A8\u4FDD\u5B58"},ox={AdamicAdar:"Adamic Adar",authority:"\u6743\u5A01\u4E2D\u5FC3\u6027 (\u6765\u81EAHITS)",backlinksCount:"\u53CD\u5411\u94FE\u63A5\u6570",backUniquelinksCount:"\u552F\u4E00\u53CD\u5411\u94FE\u63A5\u6570",betweenness:"\u4E2D\u4ECB\u4E2D\u5FC3\u6027 (Betweenness centrality)",BoW:"Bag of words",closeness:"\u63A5\u8FD1\u4E2D\u5FC3\u6027 (Closeness centrality)",clusteringCoefficient:"\u805A\u7C7B\u7CFB\u6570 (Clustering coefficient)",coCitations:"\u88AB\u5F15\u6B21\u6570 (Co-citations)",constant:"\u5E38\u6570",creationTime:"\u6587\u4EF6\u521B\u5EFA\u65F6\u95F4",degree:"\u5EA6\u4E2D\u5FC3\u6027 (Degree centrality)",eccentricity:"\u8FDE\u901A\u56FE\u4E2D\u7684\u79BB\u5FC3\u7387 (Eccentricity in the connected graph)",eigenvector:"\u7279\u5F81\u5411\u91CF\u4E2D\u5FC3\u6027 (Eigenvector centrality)",filenameLength:"\u6587\u4EF6\u540D\u957F\u5EA6",forwardlinksCount:"\u6B63\u5411\u94FE\u63A5\u6570",forwardUniquelinksCount:"\u552F\u4E00\u6B63\u5411\u94FE\u63A5\u6570",totallinksCount:"\u6B63\u53CD\u94FE\u63A5\u603B\u6570",totalUniquelinksCount:"\u552F\u4E00\u6B63\u53CD\u94FE\u63A5\u603B\u6570",hub:"\u67A2\u7EBD\u4E2D\u5FC3\u6027 (Hub centrality)",Jaccard:"Jaccard\u76F8\u4F3C\u5EA6 (Jaccard similarity)",modifiedTime:"\u6700\u540E\u4FEE\u6539\u65F6\u95F4",Occurences:"\u51FA\u73B0\u6B21\u6570",OtsukaOchiai:"Otsuka-Ochiai\u7CFB\u6570 (Otsuka-Ochiai coefficient)",overlap:"\u91CD\u53E0\u7CFB\u6570 (Overlap coefficient)",tagsCount:"\u6807\u7B7E\u6570",topological:"\u62D3\u6251\u4F20\u64AD (Topological propagation)",warningUnreliableOS:"\u6B64\u8BA1\u7B97\u4E0D\u53EF\u9760\uFF0C\u53EF\u80FD\u56E0\u64CD\u4F5C\u7CFB\u7EDF\u800C\u5F02\u3002",sentiment:"\u60C5\u611F\u5206\u6790 (Sentiment)"},ax={horizontalLegend:"\u6C34\u5E73\u56FE\u4F8B",horizontalLegendDesc:"\u663E\u793A\u6C34\u5E73\u5E03\u5C40\u7684\u56FE\u4F8B\uFF08\u5305\u542B\u6807\u7B7E\u3001\u5C5E\u6027\u548C\u6807\u7B7E\u5207\u6362\u6309\u94AE\uFF09",howToUse:"\u4F7F\u7528\u8BF4\u660E",howToUseGradientMaker:"<ul><li><strong>\u62D6\u52A8\u63A7\u5236\u70B9</strong>\u6CBF\u6E10\u53D8\u79FB\u52A8\u989C\u8272\u505C\u6B62\u70B9</li><li><strong>\u70B9\u51FB\u63A7\u5236\u70B9</strong>\u66F4\u6539\u5176\u989C\u8272</li><li><strong>\u53CC\u51FB</strong>\u6E10\u53D8\u6DFB\u52A0\u65B0\u989C\u8272\u505C\u6B62\u70B9</li><li><strong>Backspace\u3001Delete\u6216Clear\u952E</strong>\u5220\u9664\u63A7\u5236\u70B9</li><li><strong>\u63D2\u503C</strong>\uFF1A\u5728\u505C\u6B62\u70B9\u95F4\u521B\u5EFA\u5E73\u6ED1\u989C\u8272\u8FC7\u6E21</li><li><strong>\u53CD\u8F6C</strong>\uFF1A\u7FFB\u8F6C\u6700\u7EC8\u8C03\u8272\u677F\u987A\u5E8F\uFF08\u5DE6\u2194\u53F3\uFF09</li></ul>",name:"\u540D\u79F0"},lx={plugin:Zv,beta:Qv,controls:Jv,errors:ex,features:tx,inputs:rx,notices:ix,query:sx,states:nx,statsFunctions:ox,UI:ax};var V6=8224125,Jr="default-vault",He="tag",ne="link",pe="folder",ei={};ei[He]=[];ei[ne]=["tags","file"];ei[pe]=[];i18next.addResourceBundle("en","extended-graph",sp);i18next.addResourceBundle("fr","extended-graph",np);i18next.addResourceBundle("zh","extended-graph",op);var m=i18next.getFixedT(null,"extended-graph"),Gu=i18next.getFixedT(null,"default");var u=class{},Uu=class{constructor(e){this.interactiveManagers=new Map;this.legendUI=null;this.foldersUI=null;this.colorGroupHaveChanged=!1;this.statePinnedNodes=null;this.view=e,this.settings=structuredClone(u.settings),this.canonicalizeProperties(),this.type=this.view.getViewType()==="graph"?"graph":"localgraph";let t=ts(this.view);if(!t)throw new Error("Graph engine is not initialized");this.engine=t,this.renderer=this.view.renderer}canonicalizeProperties(){if(this.settings.canonicalizePropertiesWithDataview)for(let e in this.settings.additionalProperties){let t=zt(e);t!==e&&(t in this.settings.additionalProperties?delete this.settings.additionalProperties[e]:(this.settings.additionalProperties[t]=this.settings.additionalProperties[e],delete this.settings.additionalProperties[e]),t in this.settings.interactiveSettings?delete this.settings.interactiveSettings[e]:(this.settings.interactiveSettings[t]=this.settings.interactiveSettings[e],delete this.settings.interactiveSettings[e]))}}setState(e){if(this.stateData=u.statesManager.getStateDataById(e),u.settings.saveConfigsWithState){let t=u.statesManager.getConfig(e);t&&(this.settings=t)}}};var z6=require("obsidian");function T0(r){let e=r.app.workspace.getActiveViewOfType(z6.ItemView);if(e&&(e.getViewType()==="graph"||e.getViewType()==="localgraph"))return e}function W6(r){cx(r),ux(r),hx(r),dx(r),px(r),fx(r),gx(r)}function cx(r){r.addCommand({id:"enable-in-graph-view",name:m("controls.enableInGraphView"),checkCallback:e=>{let t=T0(r);if(t&&!u.graphsManager.isPluginAlreadyEnabled(t))return e||u.graphsManager.enablePlugin(t),!0}}),r.addCommand({id:"disable-in-graph-view",name:m("controls.disableInGraphView"),checkCallback:e=>{let t=T0(r);if(t&&u.graphsManager.isPluginAlreadyEnabled(t))return e||u.graphsManager.disablePlugin(t),!0}}),r.addCommand({id:"reset-in-graph-view",name:m("controls.resetInGraphView"),checkCallback:e=>{let t=T0(r);if(t&&u.graphsManager.isPluginAlreadyEnabled(t))return e||u.graphsManager.resetPlugin(t),!0}})}function ux(r){r.addCommand({id:"copy-svg-screenshot",name:m("features.svgScreenshotCopy"),checkCallback:e=>{let t=T0(r);if(t)return e||u.graphsManager.getSVGScreenshot(t),!0}})}function hx(r){r.addCommand({id:"save-for-default-state",name:m("states.saveForDefaultState"),checkCallback:e=>{let t=T0(r);if(t)return e||u.statesManager.saveForDefaultState(t),!0}}),r.addCommand({id:"save-for-normal-state",name:m("states.saveForNormalState")+" "+m("states.saveForNormalStateDesc"),checkCallback:e=>{let t=T0(r);if(t&&u.graphsManager.isPluginAlreadyEnabled(t))return e||u.statesManager.saveForNormalState(t),!0}}),r.addCommand({id:"show-graph-state",name:m("states.showGraphState"),checkCallback:e=>{let t=T0(r);if(t&&u.graphsManager.isPluginAlreadyEnabled(t))return e||u.statesManager.showGraphState(t),!0}})}function dx(r){r.addCommand({id:"enable-all-folders",name:`${m("plugin.folders")}: ${m("controls.showAll")}`,checkCallback:e=>{let t=T0(r);if(t&&u.graphsManager.isPluginAlreadyEnabled(t))return e||u.graphsManager.allInstances.get(t.leaf.id)?.foldersSet?.enableAll(),!0}}),r.addCommand({id:"enable-more-than-one-node-folders",name:`${m("plugin.folders")}: ${m("controls.showAll")} (${m("controls.toggleAllWithMoreThanOneNode")})`,checkCallback:e=>{let t=T0(r);if(t&&u.graphsManager.isPluginAlreadyEnabled(t))return e||u.graphsManager.allInstances.get(t.leaf.id)?.foldersSet?.enableAllWithAtLeastOneNode(),!0}}),r.addCommand({id:"disable-all-folders",name:`${m("plugin.folders")}: ${m("controls.hideAll")}`,checkCallback:e=>{let t=T0(r);if(t&&u.graphsManager.isPluginAlreadyEnabled(t))return e||u.graphsManager.allInstances.get(t.leaf.id)?.foldersSet?.disableAll(),!0}}),r.addCommand({id:"disable-more-than-one-node-folders",name:`${m("plugin.folders")}: ${m("controls.hideAll")} (${m("controls.toggleAllWithMoreThanOneNode")})`,checkCallback:e=>{let t=T0(r);if(t&&u.graphsManager.isPluginAlreadyEnabled(t))return e||u.graphsManager.allInstances.get(t.leaf.id)?.foldersSet?.disableAllWithAtLeastOneNode(),!0}})}function px(r){r.addCommand({id:"pin-selected-nodes",name:m("features.pinSelectedNodes"),checkCallback:e=>{let t=T0(r);if(t&&u.graphsManager.isPluginAlreadyEnabled(t)){let i=u.graphsManager.allInstances.get(t.leaf.id);return!i||Object.keys(i.nodesSet.selectedNodes).length===0?void 0:(e||i.nodesSet.pinSelectedNodes(),!0)}}}),r.addCommand({id:"unpin-selected-nodes",name:m("features.unpinSelectedNodes"),checkCallback:e=>{let t=T0(r);if(t&&u.graphsManager.isPluginAlreadyEnabled(t)){let i=u.graphsManager.allInstances.get(t.leaf.id);return!i||Object.keys(i.nodesSet.selectedNodes).length===0||Object.keys(i.nodesSet.selectedNodes).every(s=>!i.nodesSet.isNodePinned(s))?void 0:(e||i.nodesSet.unpinSelectedNodes(),!0)}}}),r.addCommand({id:"unpin-all-nodes",name:m("features.unpinAllNodes"),checkCallback:e=>{let t=T0(r);if(t&&u.graphsManager.isPluginAlreadyEnabled(t)){if(!e){let i=u.graphsManager.allInstances.get(t.leaf.id);i&&new yt(i).unpinAllNodes()}return!0}}})}function fx(r){r.addCommand({id:"select-all-nodes",name:m("controls.selectAllNodes"),checkCallback:e=>{let t=T0(r);if(t&&u.graphsManager.isPluginAlreadyEnabled(t)){let i=u.graphsManager.allInstances.get(t.leaf.id);return i?(e||(i.nodesSet.selectNodes(i.renderer.nodes),i.renderer.changed()),!0):void 0}}}),r.addCommand({id:"invert-selection",name:m("controls.selectInvert"),checkCallback:e=>{let t=T0(r);if(t&&u.graphsManager.isPluginAlreadyEnabled(t)){let i=u.graphsManager.allInstances.get(t.leaf.id);return!i||Object.keys(i.nodesSet.selectedNodes).length===0?void 0:(e||(i.nodesSet.invertSelection(),i.renderer.changed()),!0)}}})}function gx(r){r.addCommand({id:"flicker-open-nodes",name:m("features.focusFlickerOpenNodes"),checkCallback:e=>{if(u.graphsManager.allInstances.size>0&&u.graphsManager.openNodes.length>0){if(!e)for(let t of u.graphsManager.allInstances.values())for(let i of u.graphsManager.openNodes)t.nodesSet.extendedElementsMap.get(i)?.flicker();return!0}}}),r.addCommand({id:"flicker-search-nodes",name:m("features.focusFlickerSearchNodes"),checkCallback:e=>{let t=u.graphsManager.getSearchResults();if(u.graphsManager.allInstances.size>0&&t.length>0){if(!e)for(let i of u.graphsManager.allInstances.values())for(let s of t)i.nodesSet.extendedElementsMap.get(s)?.flicker();return!0}}})}var Vu=class{constructor(){this.proxyKey="__isExtendedGraphProxy";this.proxyFunctionKey="__isExtendedGraphFunctionProxy";this.coreTargets=new Map}registerProxy(e,t,i){if(!(t in e)){console.warn("Invalid property while creating proxy:",t);return}let s=e[t];if(!s){console.warn("Trying to create a proxy for a undefined or null property:",t);return}if(this.isProxy(s,e,t))return;let n=new Proxy(e[t],i);return e[t]=n,typeof s=="function"?(this.proxyFunctionKey in e||(e[this.proxyFunctionKey]={}),e[this.proxyFunctionKey][t]=!0):n[this.proxyKey]=!0,this.coreTargets.set(n,{owner:e,property:t,coreTarget:s}),n}isProxy(e,t,i){if(typeof e=="function"){if(!t||!i)throw new Error("Can't check if the function is a proxy without an owner and a property provided.");return this.proxyFunctionKey in t&&i in t[this.proxyFunctionKey]&&t[this.proxyFunctionKey][i]===!0}return this.proxyKey in e&&e[this.proxyKey]===!0}getTargetForOwner(e,t){return[...this.coreTargets.values()].find(i=>i.owner===e&&t===t)}getTargetForProxy(e){if(e!=null)return this.coreTargets.get(e)?.coreTarget}unregisterProxy(e){if(e==null)return;let t=this.coreTargets.get(e);if(t){let{owner:i,property:s,coreTarget:n}=t;if(!this.isProxy(e,i,s))return;this.coreTargets.delete(e),i[s]===e?(i[s]=n,delete i[s][this.proxyKey],this.proxyFunctionKey in i&&s in i[this.proxyFunctionKey]&&delete i[this.proxyFunctionKey][s]):(console.warn("The core reference is no longer pointing to the proxy. Instead :"),console.warn(i[s]))}}unregisterAll(){for(let[e,t]of this.coreTargets){let{owner:i,property:s,coreTarget:n}=t;this.coreTargets.delete(e),i[s]===e&&(i[s]=n,delete i[s][this.proxyKey])}}};var bt=require("obsidian");var zu=class extends bt.Component{constructor(){super(...arguments);this.globalUIs=new Map;this.optionsBackup=new Map;this.allInstances=new Map;this.openNodes=[];this.observedSearched=new Map;this.localGraphID=null;this.isHandlingMarkdownViewChange=!1;this.isResetting=new Map}onload(){this.addStatusBarItem(),this.createSearchObserver(),this.registerEvents()}addStatusBarItem(){this.statusBarItem=u.plugin.addStatusBarItem(),this.statusBarItem.addClasses(["plugin-extended-graph"])}createSearchObserver(){this.searchObserver=new MutationObserver((t,i)=>{for(let s of t)if(s.type==="childList"){let n=this.observedSearched.entries().find(o=>o[1].childrenEl===s.target);n&&this.computeSearchNodes(n[0])}})}registerEvents(){this.onMetadataCacheChange=this.onMetadataCacheChange.bind(this),N0(!1)?this.registerEvent(u.app.metadataCache.on("dataview:metadata-change",(t,i,s)=>{this.isCoreGraphLoaded()&&t==="update"&&this.onMetadataCacheChange(i)})):this.registerEvent(u.app.metadataCache.on("changed",(t,i,s)=>{this.isCoreGraphLoaded()&&this.onMetadataCacheChange(t,i,s)})),this.onDelete=this.onDelete.bind(this),this.registerEvent(u.app.vault.on("delete",t=>{this.isCoreGraphLoaded()&&this.onDelete(t)})),this.onRename=this.onRename.bind(this),this.registerEvent(u.app.vault.on("rename",(t,i)=>{this.isCoreGraphLoaded()&&this.onRename(t,i)})),this.onCSSChange=this.onCSSChange.bind(this),this.registerEvent(u.app.workspace.on("css-change",()=>{this.isCoreGraphLoaded()&&this.onCSSChange()})),this.registerEvent(u.app.workspace.on("layout-change",()=>{this.isCoreGraphLoaded()&&u.plugin.onLayoutChange()})),this.onActiveLeafChange=this.onActiveLeafChange.bind(this),this.registerEvent(u.app.workspace.on("active-leaf-change",t=>{this.isCoreGraphLoaded()&&this.onActiveLeafChange(t)})),this.onFileOpen=this.onFileOpen.bind(this),this.registerEvent(u.app.workspace.on("file-open",t=>{this.isCoreGraphLoaded()&&this.onFileOpen(t)})),this.updatePaletteForInteractive=this.updatePaletteForInteractive.bind(this),this.registerEvent(u.app.workspace.on("extended-graph:settings-colorpalette-changed",t=>{this.isCoreGraphLoaded()&&this.updatePaletteForInteractive(t)})),this.updateColorForInteractiveType=this.updateColorForInteractiveType.bind(this),this.registerEvent(u.app.workspace.on("extended-graph:settings-interactive-color-changed",(t,i)=>{this.isCoreGraphLoaded()&&this.updateColorForInteractiveType(t,i)})),this.onNodeMenuOpened=this.onNodeMenuOpened.bind(this),this.registerEvent(u.app.workspace.on("file-menu",(t,i,s,n)=>{this.isCoreGraphLoaded()&&this.onNodeMenuOpened(t,i,s,n)}))}isCoreGraphLoaded(){return!!u.app.internalPlugins.getPluginById("graph")?._loaded}initializeNodesSizeCalculator(){this.nodesSizeCalculator=cr.getCalculator("size"),this.nodesSizeCalculator?.computeStats(u.settings.graphStatsDirection).catch(t=>{console.error(t),new bt.Notice(`${m("notices.nodeStatSizeFailed")} (${is[u.settings.nodesSizeFunction]}). ${m("notices.functionToDefault")}`),u.settings.nodesSizeFunction="default",u.plugin.saveSettings(),this.nodesSizeCalculator=void 0})}initializeNodesColorCalculator(){this.nodesColorCalculator=cr.getCalculator("color"),this.nodesColorCalculator?.computeStats(u.settings.graphStatsDirection).catch(t=>{console.error(t),new bt.Notice(`${m("notices.nodeStatColorFailed")} (${is[u.settings.nodesColorFunction]}). ${m("notices.functionToDefault")}`),u.settings.nodesColorFunction="default",u.plugin.saveSettings(),this.nodesColorCalculator=void 0})}initializeLinksSizeCalculator(){this.canUseLinkStatFunction("size")&&(this.linksSizeCalculator=Ps.getCalculator("size"),this.linksSizeCalculator?.computeStats(u.settings.graphStatsDirection).catch(t=>{console.error(t),u.settings.linksSizeFunction="default",u.plugin.saveSettings(),new bt.Notice(`${m("notices.linkStatSizeFailed")} (${rs[u.settings.linksSizeFunction]}). ${m("notices.functionToDefault")}`),this.linksSizeCalculator=void 0}))}initializeLinksColorCalculator(){this.canUseLinkStatFunction("color")&&(this.linksColorCalculator=Ps.getCalculator("color"),this.linksColorCalculator?.computeStats(u.settings.graphStatsDirection).catch(t=>{console.error(t),u.settings.linksColorFunction="default",u.plugin.saveSettings(),new bt.Notice(`${m("notices.linkStatColorFailed")} (${rs[u.settings.linksColorFunction]}). ${m("notices.functionToDefault")}`),this.linksColorCalculator=void 0}))}canUseLinkStatFunction(t){let i=t==="color"?u.settings.linksColorFunction:u.settings.linksSizeFunction;return!y0()&&Pn[i]?(new bt.Notice(`${m("notices.nlpPluginRequired")} (${i})`),t==="color"?(this.linksColorCalculator=void 0,u.settings.linksColorFunction="default"):(this.linksSizeCalculator=void 0,u.settings.linksSizeFunction="default"),u.plugin.saveSettings(),!1):!0}onCSSChange(){for(let t of this.allInstances.values())t.cssBridge.onCSSChange()}onMetadataCacheChange(t,i,s){for(let n of this.allInstances.values()){if(!n.graph||!n.renderer)return;let o=n.nodesSet.extendedElementsMap.get(t.path);if(!o)return;for(let[l,c]of n.nodesSet.managers){let h=[...ct(l,t,n.settings)];h=h.filter(w=>!Xe.excludeType(u.settings,l,w)),h.length===0&&h.push(n.settings.interactiveSettings[l].noneType);let{typesToRemove:d,typesToAdd:p}=o.matchesTypes(l,[...h]);for(let w of d)n.nodesSet.typesMap[l][w].delete(o.id);for(let w of p)n.nodesSet.typesMap[l][w]||(n.nodesSet.typesMap[l][w]=new Set),n.nodesSet.typesMap[l][w].add(o.id);o.setTypes(l,new Set(h));let g=d.filter(w=>n.nodesSet.typesMap[l][w].size===0);g.length>0&&c.removeTypes(g);let v=c.getTypes(),C=p.filter(w=>!v.includes(w));C.length>0&&c.addTypes(C),g.length===0&&C.length===0&&(d.length>0||p.length>0)&&o.graphicsWrapper.resetManagerGraphics(c)}let a=n.linksSet.managers.get(ne);if(a){let l=H6(t),c=Array.from(n.linksSet.extendedElementsMap.values()).filter(d=>d.coreElement.source.id===t.path);for(let d of c)l.contains(d.coreElement.target.id)||n.linksSet.delete(d);let h=Lo(n.settings,t);for(let d of l)h.has(d)||h.set(d,new Set);for(let[d,p]of h){let g=n.linksSet.extendedElementsMap.get(Wt({source:{id:t.path},target:{id:d}}));if(!g)continue;p=new Set([...p].filter(L=>!Xe.excludeType(u.settings,ne,L))),p.size===0&&p.add(n.settings.interactiveSettings[ne].noneType);let{typesToRemove:v,typesToAdd:C}=g.matchesTypes(ne,[...p]);for(let L of v)n.linksSet.typesMap[ne][L].delete(g.id);for(let L of C)n.linksSet.typesMap[ne][L]||(n.linksSet.typesMap[ne][L]=new Set),n.linksSet.typesMap[ne][L].add(g.id);g.setTypes(ne,new Set(p));let w=v.filter(L=>n.linksSet.typesMap[ne][L].size===0);w.length>0&&a.removeTypes(w);let k=a.getTypes(),B=C.filter(L=>!k.includes(L));B.length>0&&a.addTypes(B),w.length===0&&B.length===0&&(v.length>0||C.length>0)&&g.graphicsWrapper?.resetManagerGraphics(a)}}if(n.settings.externalLinks!=="none"){let l=h=>h.flatMap(d=>[d.domain,d.href]).filter(d=>d!==void 0).unique(),c=l(n.nodesSet.getExternalLinks(t.path));n.nodesSet.cacheExternalLinks(t.path,!0).then(h=>{let d=l(n.nodesSet.getExternalLinks(t.path));c.filter(g=>!d.includes(g)).concat(d.filter(g=>!c.includes(g))).length>0&&n.engine.render()})}}}onDelete(t){let i=t.path;if(t instanceof bt.TFile)for(let[s,n]of this.allInstances){let o=n.nodesSet,a=o.extendedElementsMap.get(i);if(!a)continue;for(let[h,d]of o.managers){let p=a.getTypes(h),g=[];for(let v of p)o.typesMap[h][v].delete(i),o.typesMap[h][v]?.size===0&&g.push(v);d.removeTypes(g)}o.extendedElementsMap.delete(i),o.connectedIDs.delete(i),a?.graphicsWrapper?.disconnect(),a?.graphicsWrapper?.destroyGraphics();let l=n.linksSet,c=[...l.extendedElementsMap.values()].filter(h=>h.coreElement.source.id===i);for(let h of c){let d=h.id,p=h.getTypes(ne),g=[];for(let v of p)l.typesMap[ne][v].delete(d),l.typesMap[ne][v]?.size===0&&g.push(v);l.managers.get(ne)?.removeTypes(g),l.extendedElementsMap.delete(d),l.connectedIDs.delete(d),h?.graphicsWrapper?.disconnect(),h?.graphicsWrapper?.destroyGraphics()}}else if(t instanceof bt.TFolder)for(let[s,n]of this.allInstances)n.foldersSet?.managers.get(pe)?.removeTypes([i])}onRename(t,i){let s=t.path,n=function(o,a){return o===a};for(let[o,a]of this.allInstances){for(let[c,h]of a.nodesSet.managers)a.nodesSet.typesMap[c]=Object.fromEntries(Object.entries(a.nodesSet.typesMap[c]).map(([d,p])=>[d,new Set([...p].filter(g=>!n(i,g)))]));for(let[c,h]of a.linksSet.managers)a.linksSet.typesMap[c]=Object.fromEntries(Object.entries(a.linksSet.typesMap[c]).map(([d,p])=>[d,new Set([...p].filter(g=>{let v=a.linksSet.extendedElementsMap.get(g);return v&&!n(i,v.coreElement.source.id)&&!n(i,v.coreElement.target.id)}))]));for(let c of[...a.nodesSet.extendedElementsMap.values()])i===c.id&&(a.nodesSet.extendedElementsMap.delete(c.id),c.id=s,a.nodesSet.extendedElementsMap.set(c.id,c),a.nodesSet.connectedIDs.has(i)&&(a.nodesSet.connectedIDs.delete(i),a.nodesSet.connectedIDs.add(s)));for(let c of[...a.linksSet.extendedElementsMap.values()]){let h=i===c.coreElement.source.id,d=i===c.coreElement.target.id;if(h||d){let p=c.id;a.linksSet.extendedElementsMap.delete(c.id),h&&(c.id=Wt({source:{id:s},target:{id:c.coreElement.target.id}})),d&&(c.id=Wt({source:{id:c.coreElement.source.id},target:{id:s}})),a.linksSet.extendedElementsMap.set(c.id,c),a.linksSet.connectedIDs.has(p)&&(a.linksSet.connectedIDs.delete(p),a.linksSet.connectedIDs.add(c.id))}}let l=new yt(a);for(let[c,h]of a.nodesSet.extendedElementsMap)h.isPinned&&c===s&&l.pinNode(s,h.coreElement.x,h.coreElement.y);for(let c of u.settings.states){if(!c.pinNodes)break;let h=structuredClone(Object.entries(c.pinNodes));for(let[d,p]of h)i===d&&(delete c.pinNodes[d],c.pinNodes[s]=p);u.statesManager.onStateNeedsSaving(c,!1)}}}initLeaf(t){let i=j6(t);if(!(!i||i.leaf.isDeferred)){try{this.setGlobalUI(i)}catch(s){console.warn("WARNING: could not set global UI."),console.warn(s)}this.isPluginAlreadyEnabled(i)||(this.isGlobalGraphAlreadyOpened(i)||this.backupOptions(i),u.settings.enableFeatures[i.getViewType()]["auto-enabled"]&&this.enablePlugin(i,u.settings.startingStateID))}}isPluginAlreadyEnabled(t){return this.allInstances.has(t.leaf.id)}isGlobalGraphAlreadyOpened(t){return this.optionsBackup.has(t.leaf.id)&&t.getViewType()==="graph"}syncWithLeaves(t){let i=t.map(l=>l.id),s=t.find(l=>l.view.getViewType()==="localgraph"&&l.view instanceof bt.View&&!l.isDeferred&&!ap(l.view));this.localGraphID=s?s.id:null;let n=[...this.allInstances.keys()];for(let l of n)i.includes(l)||this.disablePluginFromLeafID(l);let o=[...this.optionsBackup.keys()];for(let l of o)!i.includes(l)&&this.lastBackup!==l&&this.optionsBackup.delete(l);let a=[...this.globalUIs.keys()];for(let l of a)i.includes(l)||this.globalUIs.delete(l);this.computeOpenNodes(),this.observeSearchViews()}computeOpenNodes(){let t=[];u.app.workspace.iterateAllLeaves(n=>{"state"in n.view&&typeof n.view.state=="object"&&n.view.state&&"file"in n.view.state&&typeof n.view.state.file=="string"?t.push(n.view.state.file):"file"in n.view&&n.view.file instanceof bt.TFile&&t.push(n.view.file.path)});let i=this.openNodes.filter(n=>!t.contains(n)),s=t.filter(n=>!this.openNodes.contains(n));if(i.length>0||s.length>0)for(let n of this.allInstances.values()){if(!n.settings.enableFeatures[n.type].focus||!n.settings.highlightOpenNodes)continue;let o=!1;for(let a of i){let l=n.nodesSet.extendedElementsMap.get(a);l&&(l.toggleOpenInTab(!1),o=!0)}for(let a of s){let l=n.nodesSet.extendedElementsMap.get(a);l&&(l.toggleOpenInTab(!0),o=!0)}o&&n.renderer.changed()}this.openNodes=t}observeSearchViews(){let t=u.app.workspace.getLeavesOfType("search");for(let i of Array.from(this.observedSearched.keys()))t.find(s=>s.view===i&&!s.isDeferred)||this.observedSearched.delete(i);for(let i of t){let s=i.view;if(!("dom"in s&&s.dom&&typeof s.dom=="object"))continue;if(!("resultDomLookup"in s.dom&&s.dom.resultDomLookup&&s.dom.resultDomLookup instanceof Map))return;if(!("childrenEl"in s.dom&&s.dom.childrenEl&&s.dom.childrenEl instanceof HTMLDivElement))continue;let n=s.dom.childrenEl;(!this.observedSearched.has(s)||this.observedSearched.get(s)?.childrenEl!==n)&&(this.searchObserver.observe(n,{childList:!0}),this.observedSearched.set(s,{childrenEl:n,results:[]}))}}computeSearchNodes(t){if(t.getViewType()!=="search")return;let i=this.observedSearched.get(t);if(!i||!("dom"in t&&t.dom&&typeof t.dom=="object")||!("resultDomLookup"in t.dom&&t.dom.resultDomLookup&&t.dom.resultDomLookup instanceof Map))return;let s=t.dom.resultDomLookup,n=[];for(let l of s.keys())l instanceof bt.TFile&&n.push(l.path);let o=i.results.filter(l=>!n.contains(l)),a=n.filter(l=>!i.results.contains(l));if(o.length>0||a.length>0)for(let l of this.allInstances.values()){if(!l.settings.enableFeatures[l.type].focus||!l.settings.highlightSearchResults)continue;let c=!1;for(let h of o){let d=l.nodesSet.extendedElementsMap.get(h);d&&(d.toggleIsSearchResult(!1),c=!0)}for(let h of a){let d=l.nodesSet.extendedElementsMap.get(h);d&&(d.toggleIsSearchResult(!0),c=!0)}c&&l.renderer.changed()}i.results=n}isSearchResult(t){for(let i of this.observedSearched.values())if(t in i.results)return!0;return!1}getSearchResults(){return this.observedSearched.values().reduce((t,i)=>t.concat(i.results),[])}setGlobalUI(t){let i=this.globalUIs.get(t.leaf.id);if(i)return i;let s=new $u(t);t.addChild(s);let n=new qu(t);return n.onPluginDisabled(),t.addChild(n),i={menu:s,control:n},this.globalUIs.set(t.leaf.id,i),i}updatePaletteForInteractive(t){this.allInstances.forEach(i=>{i.interactiveManagers.get(t)?.recomputeColors()})}updateColorForInteractiveType(t,i){this.allInstances.forEach(s=>{s.interactiveManagers.get(t)?.recomputeColor(i)})}updateSizeFunctionForNodesStat(){for(let[t,i]of this.allInstances)i.settings.nodesSizeFunction=u.settings.nodesSizeFunction,i.renderer.changed()}updatePaletteForNodesStat(){for(let[t,i]of this.allInstances)i.settings.nodesColorFunction=u.settings.nodesColorFunction,i.renderer.changed()}updateSizeFunctionForLinksStat(){for(let[t,i]of this.allInstances){if(!i.settings.curvedLinks)for(let[s,n]of i.linksSet.extendedElementsMap)n.changeCoreLinkThickness();i.renderer.changed()}}updatePaletteForLinksStat(){for(let[t,i]of this.allInstances){for(let[s,n]of i.linksSet.extendedElementsMap)n.graphicsWrapper?.updateGraphics();i.renderer.changed()}}enablePlugin(t,i,s=!0){if(this.isResetting.get(t.leaf.id)||this.backupOptions(t),this.isPluginAlreadyEnabled(t)||this.isNodeLimitExceededForView(t))return;let n=this.setGlobalUI(t);n.menu.disableUI();let o=async()=>{let a=await this.addGraph(t,i??u.settings.startingStateID,s);u.settings.enableFeatures[a.type]["elements-stats"]&&(this.nodesSizeCalculator?.functionKey!==u.settings.nodesSizeFunction&&!Xe.needDynamicGraphology(a,{element:"node",stat:"size"})&&this.initializeNodesSizeCalculator(),this.nodesColorCalculator?.functionKey!==u.settings.nodesColorFunction&&!Xe.needDynamicGraphology(a,{element:"node",stat:"color"})&&this.initializeNodesColorCalculator(),this.linksSizeCalculator?.functionKey!==u.settings.linksSizeFunction&&!Xe.needDynamicGraphology(a,{element:"link",stat:"size"})&&this.initializeLinksSizeCalculator(),this.linksColorCalculator?.functionKey!==u.settings.linksColorFunction&&!Xe.needDynamicGraphology(a,{element:"link",stat:"color"})&&this.initializeLinksColorCalculator()),n.menu.setEnableUIState(),n.control.onPluginEnabled(a),this.updateStatusBarItem(t.leaf)};u.settings.syncDefaultState?u.statesManager.saveForDefaultState(t).then(()=>o()):o()}async addGraph(t,i,s){let n=this.allInstances.get(t.leaf.id);return n||(n=new Uu(t),this.allInstances.set(t.leaf.id,n),n.setState(i),new Wu(n,s),i&&n.statesUI.setValue(i),n.graphEventsDispatcher.load(),t.addChild(n.graphEventsDispatcher),t.getViewType()==="localgraph"&&!ap(t)&&(this.localGraphID=t.leaf.id),n)}isNodeLimitExceededForView(t){return t.renderer.nodes.length>u.settings.maxNodes?(new bt.Notice(`${m("notices.nodeLimiteExceeded")} (${t.renderer.nodes.length}). ${m("notices.nodeLimitIs")} ${u.settings.maxNodes}. ${m("notices.changeInSettings")}.`),!0):!1}isNodeLimitExceededForData(t,i=!0){return Object.keys(t.nodes).length>u.settings.maxNodes?(i&&new bt.Notice(`${m("notices.nodeLimiteExceeded")} (${Object.keys(t.nodes).length}). ${m("notices.nodeLimitIs")} ${u.settings.maxNodes}. ${m("plugin.name")} ${m("notices.disabled")}. ${m("notices.changeInSettings")}.`),!0):!1}onPluginLoaded(t){this.isResetting.set(t.leaf.id,!1),this.globalUIs.get(t.leaf.id)?.menu.enableUI()}disablePlugin(t){this.disablePluginFromLeafID(t.leaf.id),this.isResetting.get(t.leaf.id)||t.renderer.changed()}disablePluginFromLeafID(t){this.disableUI(t),this.unloadDispatcher(t)}disableUI(t){let i=this.globalUIs.get(t);i&&(i.menu.disableUI(),i.menu.setDisableUIState(),i.control.onPluginDisabled())}unloadDispatcher(t){let i=this.allInstances.get(t);i?i.graphEventsDispatcher.unload():this.globalUIs.get(t)?.menu.enableUI()}onPluginUnloaded(t){this.allInstances.delete(t.leaf.id),this.localGraphID===t.leaf.id&&(this.localGraphID=null),this.isResetting.get(t.leaf.id)||(t._loaded&&this.applyNormalState(t),this.restoreBackupInGraphJson(),this.globalUIs.get(t.leaf.id)?.menu.enableUI()),this.updateStatusBarItem(t.leaf)}resetAllPlugins(t){let i=[...this.allInstances.values()].filter(s=>s.type===t).map(s=>s.view);for(let s of i)this.resetPlugin(s)}resetPlugin(t,i=!0,s){this.isResetting.set(t.leaf.id,!0);let n=this.allInstances.get(t.leaf.id);s=s??n?.stateData?.id;let o=n?.renderer.targetScale??!1;this.disablePlugin(t),this.enablePlugin(t,s,i);let a=this.allInstances.get(t.leaf.id);a&&o&&(a.renderer.targetScale=o)}onActiveLeafChange(t){this.updateStatusBarItem(t)}isMarkdownLeaf(t){return t.view.getViewType()==="markdown"&&t.view instanceof bt.FileView}onFileOpen(t){if(!this.isHandlingMarkdownViewChange){if(this.isHandlingMarkdownViewChange=!0,this.localGraphID){let i=this.allInstances.get(this.localGraphID);if(i){let s=this.allInstances.get(i.view.leaf.id);s&&(this.isResetting.set(this.localGraphID,!0),s.graphEventsDispatcher.reloadLocalDispatcher())}}if(t&&Sl()){let s=u.app.workspace.getLeavesOfType("markdown").filter(n=>n.view instanceof bt.MarkdownView&&n.view.file===t);for(let n of s){if(!(n.view instanceof bt.MarkdownView))continue;let o=n.view,a=Sl()?.graphViews.find(l=>l.node===o.contentEl.querySelector(`.${Cl()}`))?.leaf.view;if(a&&this.allInstances.get(a.leaf.id)){let l=a;this.zoomOnNode(l,t.path,l.renderer.targetScale)}}}this.isHandlingMarkdownViewChange=!1}}backupOptions(t){let i=ts(t);if(!i)return;let s=structuredClone(i.getOptions());this.optionsBackup.set(t.leaf.id,s),this.lastBackup=t.leaf.id,u.settings.backupGraphOptions=s,u.plugin.saveSettings()}restoreBackupInGraphJson(){let t=this.optionsBackup.get(this.lastBackup),i=this.getCorePluginInstance();i&&t&&(i.options.colorGroups=t.colorGroups,i.options.search=t.search,i.options.hideUnresolved=t.hideUnresolved,i.options.showAttachments=t.showAttachments,i.options.showOrphans=t.showOrphans,i.options.showTags=t.showTags,i.options.localBacklinks=t.localBacklinks,i.options.localForelinks=t.localForelinks,i.options.localInterlinks=t.localInterlinks,i.options.localJumps=t.localJumps,i.options.lineSizeMultiplier=t.lineSizeMultiplier,i.options.nodeSizeMultiplier=t.nodeSizeMultiplier,i.options.showArrow=t.showArrow,i.options.textFadeMultiplier=t.textFadeMultiplier,i.options.centerStrength=t.centerStrength,i.options.linkDistance=t.linkDistance,i.options.linkStrength=t.linkStrength,i.options.repelStrength=t.repelStrength,i.saveOptions())}getCorePluginInstance(){return u.app.internalPlugins.getPluginById("graph")?.instance}applyNormalState(t){let i=ts(t),s=this.optionsBackup.get(t.leaf.id);if(i&&s){i.setOptions(s);for(let n of i.renderer.nodes)n.fontDirty=!0}}onNodeMenuOpened(t,i,s,n){s==="graph-context-menu"&&n&&i instanceof bt.TFile&&this.allInstances.get(n.id)?.graphEventsDispatcher.inputsManager.onNodeMenuOpened(t,i)}getSVGScreenshot(t){let i=this.allInstances.get(t.leaf.id),s;if(i)s=new Hu(i);else{let n=ts(t);if(!n)return;s=new ju(n)}s.toClipboard()}zoomOnNode(t,i,s){let n=t.renderer,o=n.nodes.find(g=>g.id===i);if(!o)return;let a=n.scale;s===void 0&&(s=u.settings.zoomFactor);let l=n.panX,c=n.panY;n.targetScale=Math.min(8,Math.max(1/128,s));let h=n.zoomCenterX,d=n.zoomCenterY;if(h===0&&d===0){let g=window.devicePixelRatio;h=n.width/2*g,d=n.height/2*g}let p=.85;a=a*p+s*(1-p),l-=o.x*a+l-h,c-=o.y*a+c-d,n.setPan(l,c),n.setScale(a),n.changed()}updateStatusBarItem(t,i){if(this.statusBarItem.detach(),this.addStatusBarItem(),t&&(t.view.getViewType()==="graph"||t.view.getViewType()==="localgraph")){i===void 0&&(i=t.view.renderer.nodes.length),i!==void 0&&this.statusBarItem.createSpan({text:i.toString()+" "+m("plugin.nodes"),cls:"status-bar-item-segment"});let s=this.allInstances.get(t.id);if(s){this.statusBarItem.addClass("mod-clickable"),this.statusBarItem.addEventListener("click",()=>{new Bs(s).open()});let n=Object.keys(s.nodesSet.selectedNodes).length;n>0&&this.statusBarItem.createSpan({text:`(${n} ${m("inputs.selected")})`,cls:"status-bar-item-segment"});let o=createSpan({cls:"status-bar-item-icon status-bar-item-segment"});(0,bt.setIcon)(o,"info"),this.statusBarItem.appendChild(o)}else this.statusBarItem.removeClass("mod-clickable")}}};var Rs=class{constructor(e){this.data=new Yu;this.data.name=e}setID(e){this.data.id=e||crypto.randomUUID()}saveGraph(e){for(let[t,i]of e.interactiveManagers)this.data.toggleTypes[t]=i.getTypes().filter(s=>u.settings.interactiveSettings[t].enableByDefault!==i.isActive(s));this.data.pinNodes={};for(let[t,i]of e.nodesSet.extendedElementsMap)i.isPinned&&(this.data.pinNodes[t]={x:i.coreElement.x,y:i.coreElement.y});this.data.engineOptions=new ti(e.engine.getOptions()),this.data.hiddenLegendRows=structuredClone(e.stateData?.hiddenLegendRows)??[],this.data.collapsedLegendRows=structuredClone(e.stateData?.collapsedLegendRows)??[],this.data.logicTypes=structuredClone(e.stateData?.logicTypes)??{},e.layersManager&&(this.data.enableLayers=e.layersManager.isEnabled,this.data.currentLayerLevel=e.layersManager.currentLevel)}saveState(e){return this.data=e,this.completeDefaultOptions()}isValidProperty(e){return["id","name","toggleTypes","logicTypes","pinNodes","engineOptions","hiddenLegendRows","collapsedLegendRows","enableLayers","currentLayerLevel"].includes(e)}completeDefaultOptions(){let e=!1;if(this.data.toggleTypes||(this.data.toggleTypes={},e=!0),this.data.toggleTypes[He]||(this.data.toggleTypes[He]=[],e=!0),this.data.toggleTypes[ne]||(this.data.toggleTypes[ne]=[],e=!0),this.data.toggleTypes[pe]||(this.data.toggleTypes[pe]=[],e=!0),this.data.logicTypes||(this.data.logicTypes={},e=!0),this.data.logicTypes[He]||(this.data.logicTypes[He]="OR",e=!0),this.data.logicTypes[ne]||(this.data.logicTypes[ne]="OR",e=!0),this.data.logicTypes[pe]||(this.data.logicTypes[pe]="OR",e=!0),this.data.pinNodes||(this.data.pinNodes={},e=!0),!this.data.engineOptions)this.data.engineOptions=new ti,e=!0;else if(this.data.engineOptions.search===void 0){let t=u.graphsManager.getCorePluginInstance();t&&(this.data.engineOptions.search=t.options.search??"",e=!0)}this.data.hiddenLegendRows||(this.data.hiddenLegendRows=[],e=!0),this.data.collapsedLegendRows||(this.data.collapsedLegendRows=[],e=!0);for(let t in this.data)this.isValidProperty(t)||(this.data=this.excludeKey(this.data,t),e=!0);return e}excludeKey(e,t){let{[t]:i,...s}=e;return s}};var ti=class{constructor(e){this.colorGroups=[];this.search="";this.hideUnresolved=!1;this.showAttachments=!1;this.showOrphans=!0;this.showTags=!1;this.localBacklinks=!0;this.localForelinks=!0;this.localInterlinks=!1;this.localJumps=1;this.lineSizeMultiplier=1;this.nodeSizeMultiplier=1;this.showArrow=!1;this.textFadeMultiplier=0;this.centerStrength=1-Math.log(.109)/Math.log(.01);this.linkDistance=250;this.linkStrength=1;this.repelStrength=10;e&&(this.colorGroups=e.colorGroups,this.search=e.search,this.hideUnresolved=e.hideUnresolved,this.showAttachments=e.showAttachments,this.showOrphans=e.showOrphans,this.showTags=e.showTags,this.localBacklinks=e.localBacklinks,this.localForelinks=e.localForelinks,this.localInterlinks=e.localInterlinks,this.localJumps=e.localJumps,this.lineSizeMultiplier=e.lineSizeMultiplier,this.nodeSizeMultiplier=e.nodeSizeMultiplier,this.showArrow=e.showArrow,this.textFadeMultiplier=e.textFadeMultiplier,this.centerStrength=e.centerStrength,this.linkDistance=e.linkDistance,this.linkStrength=e.linkStrength,this.repelStrength=e.repelStrength)}},Yu=class{constructor(){this.id="";this.name="";this.enableLayers=!1;this.currentLayerLevel=0;this.toggleTypes={},this.toggleTypes[He]=[],this.toggleTypes[ne]=[],this.toggleTypes[pe]=[],this.logicTypes={},this.logicTypes[He]="OR",this.logicTypes[ne]="OR",this.logicTypes[pe]="OR",this.pinNodes={},this.hiddenLegendRows=[],this.collapsedLegendRows=[],this.engineOptions=new ti}},Bn=class{static getLogicType(e,t){return e.stateData&&e.stateData.logicTypes&&e.stateData.logicTypes[t]?e.stateData.logicTypes[t]:"OR"}};var wl=require("obsidian");var Xu=class{constructor(){this.cacheStatesConfigs={};this.mapStatesConfig()}getStateDataById(e){return u.settings.states.find(t=>t.id===e)}newState(e,t){let i=new Rs(t);return i.setID(),i.saveGraph(e),this.onStateNeedsSaving(i.data),this.saveConfigForState(e,i),i.data.id}changeState(e,t){let i=this.getStateDataById(t);if(!i)return;let s=this.getConfig(t);if(u.settings.saveConfigsWithState&&!u.graphsManager.isResetting.get(e.view.leaf.id)&&s)if(Xe.needReload(e.settings,s,e.type)){u.graphsManager.resetPlugin(e.view,!0,t);return}else e.settings=s;i=this.validateStateData(i),e.stateData=i,e.graphEventsDispatcher.lastFilteringAction&&(e.graphEventsDispatcher.lastFilteringAction.record=!1),setTimeout(()=>{if(this.updateInteractiveManagers(i,e),i.engineOptions){e.colorGroupHaveChanged=i.engineOptions.colorGroups!==e.engine.options.colorGroups,e.engine.setOptions(i.engineOptions);for(let n of e.renderer.nodes)n.fontDirty=!0}e.layersManager?.setCurrentLevel(i.currentLayerLevel??0,!1),e.legendUI?.updateUIFromState(),e.statePinnedNodes=structuredClone(i.pinNodes)??{},e.statesUI.currentStateID===t&&e.graphEventsDispatcher.lastFilteringAction&&(e.graphEventsDispatcher.lastFilteringAction.record=!0)},200)}validateStateData(e){let t=new Rs(e.name);return t.saveState(e)&&this.onStateNeedsSaving(t.data),t.data}updateInteractiveManagers(e,t){this.updateManagers(e,t.nodesSet.managers,t.legendUI),this.updateManagers(e,t.linksSet.managers,t.legendUI),t.foldersSet&&this.updateManagers(e,t.foldersSet.managers,t.foldersUI)}updateManagers(e,t,i){for(let[s,n]of t){u.settings.interactiveSettings[s].hasOwnProperty("enableByDefault")||(u.settings.interactiveSettings[s].enableByDefault=s!==pe,u.plugin.saveSettings());let o=u.settings.interactiveSettings[s].enableByDefault;if(this.loadStateForInteractiveManager(n,e),i&&e.toggleTypes&&(o?i.enableAllUI(s):i.disableAllUI(s),e.toggleTypes.hasOwnProperty(s)))for(let a of e.toggleTypes[s])o?i.disableUI(s,a):i.enableUI(s,a)}}loadStateForInteractiveManager(e,t){if(!t.toggleTypes)return;let i=u.settings.interactiveSettings[e.name].enableByDefault,s=t.toggleTypes[e.name]??[],n=[],o=[];e.getTypes().forEach(a=>{let l=e.interactives.get(a);l&&(i===l.isActive&&s.includes(a)?(l.isActive=!i,i?n.push(a):o.push(a)):i!==l.isActive&&!s.includes(a)&&(l.isActive=i,i?o.push(a):n.push(a)))}),n.length>0&&e.instances.interactiveEventsDispatcher.onInteractivesDisabled(e.name,n),o.length>0&&e.instances.interactiveEventsDispatcher.onInteractivesEnabled(e.name,o)}async saveState(e,t){if(t===Jr)return;let i=u.settings.states.find(n=>n.id==t);if(!i)return;let s=new Rs(i.name);s.saveState(i),s.setID(t),s.saveGraph(e),await this.onStateNeedsSaving(s.data),this.saveConfigForState(e,s)}async saveConfigForState(e,t){if(!e.settings.saveConfigsWithState)return;let i=$6(t.data.name);Ku(i,!1)||(i="state_"+t.data.id);let s=u.configurationDirectory+"/"+i+".json";u.plugin.exportSettings(s,e.settings,t),this.cacheStatesConfigs[t.data.id]={filepath:s,settings:await u.plugin.loadConfigFile(s).then(n=>(delete n.stateID,n))}}async onStateNeedsSaving(e,t=!1){this.updateStateArray(e),await u.plugin.saveSettings().then(()=>{t&&new wl.Notice(`${m("plugin.name")}: ${m("notices.stateSaved")} (${e.name})`),this.updateAllStates()})}async saveForDefaultState(e){let t=this.getStateDataById(Jr);if(!t)return;let i=ts(e);i&&(t.engineOptions=new ti(i.getOptions()),await this.onStateNeedsSaving(t,!0))}saveForNormalState(e){let t=u.app.internalPlugins.getPluginById("graph").instance,i=ts(e);i&&(t.options=i.getOptions(),t.saveOptions(),u.graphsManager.backupOptions(e),new wl.Notice(m("notices.normalStateSave")))}updateStateArray(e){let t=u.settings.states.findIndex(i=>i.name===e.name);t>=0?u.settings.states[t]=e:u.settings.states.push(e)}updateAllStates(){u.graphsManager.allInstances.forEach(e=>{e.statesUI.updateStatesList()})}renameState(e,t){let i=this.getStateDataById(e);!i||i.name===t||(i.name=t,u.plugin.saveSettings().then(()=>{new wl.Notice(`${m("plugin.name")}: ${m("notices.stateRenamed")} (${t})`),this.updateAllStates()}))}deleteState(e){if(e===Jr)return;let t=this.getStateDataById(e);t&&(u.settings.states.remove(t),u.plugin.saveSettings().then(()=>{new wl.Notice(`${m("plugin.name")}: ${m("notices.stateDeleted")} (${t.name})`),this.updateAllStates()}),delete this.cacheStatesConfigs[e])}showGraphState(e){let t=u.graphsManager.allInstances.get(e.leaf.id);if(!t)return;new Bs(t).open()}async mapStatesConfig(){let e=await Mo();for(let t of e)this.cacheConfig(t)}async cacheConfig(e){let t=u.settings.states.map(s=>s.id),i=await u.plugin.loadConfigFile(e);i.stateID&&t.contains(i.stateID)&&(this.cacheStatesConfigs[i.stateID]={filepath:e,settings:await u.plugin.loadConfigFile(e).then(s=>(delete s.stateID,s))})}hasConfig(e){return e in this.cacheStatesConfigs}getConfig(e){return this.cacheStatesConfigs[e]?.settings}getStateFromConfig(e){return Object.keys(this.cacheStatesConfigs).find(t=>this.cacheStatesConfigs[t].filepath===e)}};var{min:mx,max:yx}=Math,Ar=(r,e=0,t=1)=>mx(yx(e,r),t);var Rn=r=>{r._clipped=!1,r._unclipped=r.slice(0);for(let e=0;e<=3;e++)e<3?((r[e]<0||r[e]>255)&&(r._clipped=!0),r[e]=Ar(r[e],0,255)):e===3&&(r[e]=Ar(r[e],0,1));return r};var q6={};for(let r of["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"])q6[`[object ${r}]`]=r.toLowerCase();function Ee(r){return q6[Object.prototype.toString.call(r)]||"object"}var he=(r,e=null)=>r.length>=3?Array.prototype.slice.call(r):Ee(r[0])=="object"&&e?e.split("").filter(t=>r[0][t]!==void 0).map(t=>r[0][t]):r[0].slice(0);var ur=r=>{if(r.length<2)return null;let e=r.length-1;return Ee(r[e])=="string"?r[e].toLowerCase():null};var{PI:Zu,min:Qu,max:Ju}=Math,v0=r=>Math.round(r*100)/100,Tl=r=>Math.round(r*100)/100,kr=Zu*2,eh=Zu/3,Y6=Zu/180,X6=180/Zu;function th(r){return[...r.slice(0,3).reverse(),...r.slice(3)]}var Fe={format:{},autodetect:[]};var lp=class{constructor(...e){let t=this;if(Ee(e[0])==="object"&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];let i=ur(e),s=!1;if(!i){s=!0,Fe.sorted||(Fe.autodetect=Fe.autodetect.sort((n,o)=>o.p-n.p),Fe.sorted=!0);for(let n of Fe.autodetect)if(i=n.test(...e),i)break}if(Fe.format[i]){let n=Fe.format[i].apply(null,s?e:e.slice(0,-1));t._rgb=Rn(n)}else throw new Error("unknown format: "+e);t._rgb.length===3&&t._rgb.push(1)}toString(){return Ee(this.hex)=="function"?this.hex():`[${this._rgb.join(",")}]`}},Y=lp;var K6="3.1.2";var Z6=(...r)=>new Y(...r);Z6.version=K6;var Le=Z6;var vx={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},Os=vx;var xx=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Dx=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,bx=r=>{if(r.match(xx)){(r.length===4||r.length===7)&&(r=r.substr(1)),r.length===3&&(r=r.split(""),r=r[0]+r[0]+r[1]+r[1]+r[2]+r[2]);let e=parseInt(r,16),t=e>>16,i=e>>8&255,s=e&255;return[t,i,s,1]}if(r.match(Dx)){(r.length===5||r.length===9)&&(r=r.substr(1)),r.length===4&&(r=r.split(""),r=r[0]+r[0]+r[1]+r[1]+r[2]+r[2]+r[3]+r[3]);let e=parseInt(r,16),t=e>>24&255,i=e>>16&255,s=e>>8&255,n=Math.round((e&255)/255*100)/100;return[t,i,s,n]}throw new Error(`unknown hex color: ${r}`)},rh=bx;var{round:ih}=Math,Ex=(...r)=>{let[e,t,i,s]=he(r,"rgba"),n=ur(r)||"auto";s===void 0&&(s=1),n==="auto"&&(n=s<1?"rgba":"rgb"),e=ih(e),t=ih(t),i=ih(i);let a="000000"+(e<<16|t<<8|i).toString(16);a=a.substr(a.length-6);let l="0"+ih(s*255).toString(16);switch(l=l.substr(l.length-2),n.toLowerCase()){case"rgba":return`#${a}${l}`;case"argb":return`#${l}${a}`;default:return`#${a}`}},sh=Ex;Y.prototype.name=function(){let r=sh(this._rgb,"rgb");for(let e of Object.keys(Os))if(Os[e]===r)return e.toLowerCase();return r};Fe.format.named=r=>{if(r=r.toLowerCase(),Os[r])return rh(Os[r]);throw new Error("unknown color name: "+r)};Fe.autodetect.push({p:5,test:(r,...e)=>{if(!e.length&&Ee(r)==="string"&&Os[r.toLowerCase()])return"named"}});Y.prototype.alpha=function(r,e=!1){return r!==void 0&&Ee(r)==="number"?e?(this._rgb[3]=r,this):new Y([this._rgb[0],this._rgb[1],this._rgb[2],r],"rgb"):this._rgb[3]};Y.prototype.clipped=function(){return this._rgb._clipped||!1};var _l={Kn:18,labWhitePoint:"d65",Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452,kE:.008856451679035631,kKE:8,kK:903.2962962962963,RefWhiteRGB:{X:.95047,Y:1,Z:1.08883},MtxRGB2XYZ:{m00:.4124564390896922,m01:.21267285140562253,m02:.0193338955823293,m10:.357576077643909,m11:.715152155287818,m12:.11919202588130297,m20:.18043748326639894,m21:.07217499330655958,m22:.9503040785363679},MtxXYZ2RGB:{m00:3.2404541621141045,m01:-.9692660305051868,m02:.055643430959114726,m10:-1.5371385127977166,m11:1.8760108454466942,m12:-.2040259135167538,m20:-.498531409556016,m21:.041556017530349834,m22:1.0572251882231791},As:.9414285350000001,Bs:1.040417467,Cs:1.089532651,MtxAdaptMa:{m00:.8951,m01:-.7502,m02:.0389,m10:.2664,m11:1.7135,m12:-.0685,m20:-.1614,m21:.0367,m22:1.0296},MtxAdaptMaI:{m00:.9869929054667123,m01:.43230526972339456,m02:-.008528664575177328,m10:-.14705425642099013,m11:.5183602715367776,m12:.04004282165408487,m20:.15996265166373125,m21:.0492912282128556,m22:.9684866957875502}},Ci=_l,Sx=new Map([["a",[1.0985,.35585]],["b",[1.0985,.35585]],["c",[.98074,1.18232]],["d50",[.96422,.82521]],["d55",[.95682,.92149]],["d65",[.95047,1.08883]],["e",[1,1,1]],["f2",[.99186,.67393]],["f7",[.95041,1.08747]],["f11",[1.00962,.6435]],["icc",[.96422,.82521]]]);function Ir(r){let e=Sx.get(String(r).toLowerCase());if(!e)throw new Error("unknown Lab illuminant "+r);_l.labWhitePoint=r,_l.Xn=e[0],_l.Zn=e[1]}function Gs(){return _l.labWhitePoint}var Cx=(...r)=>{r=he(r,"lab");let[e,t,i]=r,[s,n,o]=wx(e,t,i),[a,l,c]=up(s,n,o);return[a,l,c,r.length>3?r[3]:1]},wx=(r,e,t)=>{let{kE:i,kK:s,kKE:n,Xn:o,Yn:a,Zn:l}=Ci,c=(r+16)/116,h=.002*e+c,d=c-.005*t,p=h*h*h,g=d*d*d,v=p>i?p:(116*h-16)/s,C=r>n?Math.pow((r+16)/116,3):r/s,w=g>i?g:(116*d-16)/s,k=v*o,B=C*a,L=w*l;return[k,B,L]},cp=r=>{let e=Math.sign(r);return r=Math.abs(r),(r<=.0031308?r*12.92:1.055*Math.pow(r,1/2.4)-.055)*e},up=(r,e,t)=>{let{MtxAdaptMa:i,MtxAdaptMaI:s,MtxXYZ2RGB:n,RefWhiteRGB:o,Xn:a,Yn:l,Zn:c}=Ci,h=a*i.m00+l*i.m10+c*i.m20,d=a*i.m01+l*i.m11+c*i.m21,p=a*i.m02+l*i.m12+c*i.m22,g=o.X*i.m00+o.Y*i.m10+o.Z*i.m20,v=o.X*i.m01+o.Y*i.m11+o.Z*i.m21,C=o.X*i.m02+o.Y*i.m12+o.Z*i.m22,w=(r*i.m00+e*i.m10+t*i.m20)*(g/h),k=(r*i.m01+e*i.m11+t*i.m21)*(v/d),B=(r*i.m02+e*i.m12+t*i.m22)*(C/p),L=w*s.m00+k*s.m10+B*s.m20,T=w*s.m01+k*s.m11+B*s.m21,W=w*s.m02+k*s.m12+B*s.m22,j=cp(L*n.m00+T*n.m10+W*n.m20),I=cp(L*n.m01+T*n.m11+W*n.m21),R=cp(L*n.m02+T*n.m12+W*n.m22);return[j*255,I*255,R*255]},No=Cx;var Tx=(...r)=>{let[e,t,i,...s]=he(r,"rgb"),[n,o,a]=dp(e,t,i),[l,c,h]=_x(n,o,a);return[l,c,h,...s.length>0&&s[0]<1?[s[0]]:[]]};function _x(r,e,t){let{Xn:i,Yn:s,Zn:n,kE:o,kK:a}=Ci,l=r/i,c=e/s,h=t/n,d=l>o?Math.pow(l,1/3):(a*l+16)/116,p=c>o?Math.pow(c,1/3):(a*c+16)/116,g=h>o?Math.pow(h,1/3):(a*h+16)/116;return[116*p-16,500*(d-p),200*(p-g)]}function hp(r){let e=Math.sign(r);return r=Math.abs(r),(r<=.04045?r/12.92:Math.pow((r+.055)/1.055,2.4))*e}var dp=(r,e,t)=>{r=hp(r/255),e=hp(e/255),t=hp(t/255);let{MtxRGB2XYZ:i,MtxAdaptMa:s,MtxAdaptMaI:n,Xn:o,Yn:a,Zn:l,As:c,Bs:h,Cs:d}=Ci,p=r*i.m00+e*i.m10+t*i.m20,g=r*i.m01+e*i.m11+t*i.m21,v=r*i.m02+e*i.m12+t*i.m22,C=o*s.m00+a*s.m10+l*s.m20,w=o*s.m01+a*s.m11+l*s.m21,k=o*s.m02+a*s.m12+l*s.m22,B=p*s.m00+g*s.m10+v*s.m20,L=p*s.m01+g*s.m11+v*s.m21,T=p*s.m02+g*s.m12+v*s.m22;return B*=C/c,L*=w/h,T*=k/d,p=B*n.m00+L*n.m10+T*n.m20,g=B*n.m01+L*n.m11+T*n.m21,v=B*n.m02+L*n.m12+T*n.m22,[p,g,v]},Po=Tx;Y.prototype.lab=function(){return Po(this._rgb)};var Fx=(...r)=>new Y(...r,"lab");Object.assign(Le,{lab:Fx,getLabWhitePoint:Gs,setLabWhitePoint:Ir});Fe.format.lab=No;Fe.autodetect.push({p:2,test:(...r)=>{if(r=he(r,"lab"),Ee(r)==="array"&&r.length===3)return"lab"}});Y.prototype.darken=function(r=1){let e=this,t=e.lab();return t[0]-=Ci.Kn*r,new Y(t,"lab").alpha(e.alpha(),!0)};Y.prototype.brighten=function(r=1){return this.darken(-r)};Y.prototype.darker=Y.prototype.darken;Y.prototype.brighter=Y.prototype.brighten;Y.prototype.get=function(r){let[e,t]=r.split("."),i=this[e]();if(t){let s=e.indexOf(t)-(e.substr(0,2)==="ok"?2:0);if(s>-1)return i[s];throw new Error(`unknown channel ${t} in mode ${e}`)}else return i};var{pow:Ax}=Math,kx=1e-7,Ix=20;Y.prototype.luminance=function(r,e="rgb"){if(r!==void 0&&Ee(r)==="number"){if(r===0)return new Y([0,0,0,this._rgb[3]],"rgb");if(r===1)return new Y([255,255,255,this._rgb[3]],"rgb");let t=this.luminance(),i=Ix,s=(o,a)=>{let l=o.interpolate(a,.5,e),c=l.luminance();return Math.abs(r-c)<kx||!i--?l:c>r?s(o,l):s(l,a)},n=(t>r?s(new Y([0,0,0]),this):s(this,new Y([255,255,255]))).rgb();return new Y([...n,this._rgb[3]])}return Lx(...this._rgb.slice(0,3))};var Lx=(r,e,t)=>(r=pp(r),e=pp(e),t=pp(t),.2126*r+.7152*e+.0722*t),pp=r=>(r/=255,r<=.03928?r/12.92:Ax((r+.055)/1.055,2.4));var pt={};var wi=(r,e,t=.5,...i)=>{let s=i[0]||"lrgb";if(!pt[s]&&!i.length&&(s=Object.keys(pt)[0]),!pt[s])throw new Error(`interpolation mode ${s} is not defined`);return Ee(r)!=="object"&&(r=new Y(r)),Ee(e)!=="object"&&(e=new Y(e)),pt[s](r,e,t).alpha(r.alpha()+t*(e.alpha()-r.alpha()))};Y.prototype.mix=Y.prototype.interpolate=function(r,e=.5,...t){return wi(this,r,e,...t)};Y.prototype.premultiply=function(r=!1){let e=this._rgb,t=e[3];return r?(this._rgb=[e[0]*t,e[1]*t,e[2]*t,t],this):new Y([e[0]*t,e[1]*t,e[2]*t,t],"rgb")};var{sin:Mx,cos:Nx}=Math,Px=(...r)=>{let[e,t,i]=he(r,"lch");return isNaN(i)&&(i=0),i=i*Y6,[e,Nx(i)*t,Mx(i)*t]},nh=Px;var Bx=(...r)=>{r=he(r,"lch");let[e,t,i]=r,[s,n,o]=nh(e,t,i),[a,l,c]=No(s,n,o);return[a,l,c,r.length>3?r[3]:1]},Bo=Bx;var Rx=(...r)=>{let e=th(he(r,"hcl"));return Bo(...e)},Q6=Rx;var{sqrt:Ox,atan2:Gx,round:Ux}=Math,Vx=(...r)=>{let[e,t,i]=he(r,"lab"),s=Ox(t*t+i*i),n=(Gx(i,t)*X6+360)%360;return Ux(s*1e4)===0&&(n=Number.NaN),[e,s,n]},oh=Vx;var zx=(...r)=>{let[e,t,i,...s]=he(r,"rgb"),[n,o,a]=Po(e,t,i),[l,c,h]=oh(n,o,a);return[l,c,h,...s.length>0&&s[0]<1?[s[0]]:[]]},Fl=zx;Y.prototype.lch=function(){return Fl(this._rgb)};Y.prototype.hcl=function(){return th(Fl(this._rgb))};var Wx=(...r)=>new Y(...r,"lch"),Hx=(...r)=>new Y(...r,"hcl");Object.assign(Le,{lch:Wx,hcl:Hx});Fe.format.lch=Bo;Fe.format.hcl=Q6;["lch","hcl"].forEach(r=>Fe.autodetect.push({p:2,test:(...e)=>{if(e=he(e,r),Ee(e)==="array"&&e.length===3)return r}}));Y.prototype.saturate=function(r=1){let e=this,t=e.lch();return t[1]+=Ci.Kn*r,t[1]<0&&(t[1]=0),new Y(t,"lch").alpha(e.alpha(),!0)};Y.prototype.desaturate=function(r=1){return this.saturate(-r)};Y.prototype.set=function(r,e,t=!1){let[i,s]=r.split("."),n=this[i]();if(s){let o=i.indexOf(s)-(i.substr(0,2)==="ok"?2:0);if(o>-1){if(Ee(e)=="string")switch(e.charAt(0)){case"+":n[o]+=+e;break;case"-":n[o]+=+e;break;case"*":n[o]*=+e.substr(1);break;case"/":n[o]/=+e.substr(1);break;default:n[o]=+e}else if(Ee(e)==="number")n[o]=e;else throw new Error("unsupported value for Color.set");let a=new Y(n,i);return t?(this._rgb=a._rgb,this):a}throw new Error(`unknown channel ${s} in mode ${i}`)}else return n};Y.prototype.tint=function(r=.5,...e){return wi(this,"white",r,...e)};Y.prototype.shade=function(r=.5,...e){return wi(this,"black",r,...e)};var jx=(r,e,t)=>{let i=r._rgb,s=e._rgb;return new Y(i[0]+t*(s[0]-i[0]),i[1]+t*(s[1]-i[1]),i[2]+t*(s[2]-i[2]),"rgb")};pt.rgb=jx;var{sqrt:fp,pow:Ro}=Math,$x=(r,e,t)=>{let[i,s,n]=r._rgb,[o,a,l]=e._rgb;return new Y(fp(Ro(i,2)*(1-t)+Ro(o,2)*t),fp(Ro(s,2)*(1-t)+Ro(a,2)*t),fp(Ro(n,2)*(1-t)+Ro(l,2)*t),"rgb")};pt.lrgb=$x;var qx=(r,e,t)=>{let i=r.lab(),s=e.lab();return new Y(i[0]+t*(s[0]-i[0]),i[1]+t*(s[1]-i[1]),i[2]+t*(s[2]-i[2]),"lab")};pt.lab=qx;var Lr=(r,e,t,i)=>{let s,n;i==="hsl"?(s=r.hsl(),n=e.hsl()):i==="hsv"?(s=r.hsv(),n=e.hsv()):i==="hcg"?(s=r.hcg(),n=e.hcg()):i==="hsi"?(s=r.hsi(),n=e.hsi()):i==="lch"||i==="hcl"?(i="hcl",s=r.hcl(),n=e.hcl()):i==="oklch"&&(s=r.oklch().reverse(),n=e.oklch().reverse());let o,a,l,c,h,d;(i.substr(0,1)==="h"||i==="oklch")&&([o,l,h]=s,[a,c,d]=n);let p,g,v,C;return!isNaN(o)&&!isNaN(a)?(a>o&&a-o>180?C=a-(o+360):a<o&&o-a>180?C=a+360-o:C=a-o,g=o+t*C):isNaN(o)?isNaN(a)?g=Number.NaN:(g=a,(h==1||h==0)&&i!="hsv"&&(p=c)):(g=o,(d==1||d==0)&&i!="hsv"&&(p=l)),p===void 0&&(p=l+t*(c-l)),v=h+t*(d-h),i==="oklch"?new Y([v,p,g],i):new Y([g,p,v],i)};var J6=(r,e,t)=>Lr(r,e,t,"lch");pt.lch=J6;pt.hcl=J6;var Yx=r=>{if(Ee(r)=="number"&&r>=0&&r<=16777215){let e=r>>16,t=r>>8&255,i=r&255;return[e,t,i,1]}throw new Error("unknown num color: "+r)},e4=Yx;var Xx=(...r)=>{let[e,t,i]=he(r,"rgb");return(e<<16)+(t<<8)+i},t4=Xx;Y.prototype.num=function(){return t4(this._rgb)};var Kx=(...r)=>new Y(...r,"num");Object.assign(Le,{num:Kx});Fe.format.num=e4;Fe.autodetect.push({p:5,test:(...r)=>{if(r.length===1&&Ee(r[0])==="number"&&r[0]>=0&&r[0]<=16777215)return"num"}});var Zx=(r,e,t)=>{let i=r.num(),s=e.num();return new Y(i+t*(s-i),"num")};pt.num=Zx;var{floor:Qx}=Math,Jx=(...r)=>{r=he(r,"hcg");let[e,t,i]=r,s,n,o;i=i*255;let a=t*255;if(t===0)s=n=o=i;else{e===360&&(e=0),e>360&&(e-=360),e<0&&(e+=360),e/=60;let l=Qx(e),c=e-l,h=i*(1-t),d=h+a*(1-c),p=h+a*c,g=h+a;switch(l){case 0:[s,n,o]=[g,p,h];break;case 1:[s,n,o]=[d,g,h];break;case 2:[s,n,o]=[h,g,p];break;case 3:[s,n,o]=[h,d,g];break;case 4:[s,n,o]=[p,h,g];break;case 5:[s,n,o]=[g,h,d];break}}return[s,n,o,r.length>3?r[3]:1]},r4=Jx;var eD=(...r)=>{let[e,t,i]=he(r,"rgb"),s=Qu(e,t,i),n=Ju(e,t,i),o=n-s,a=o*100/255,l=s/(255-o)*100,c;return o===0?c=Number.NaN:(e===n&&(c=(t-i)/o),t===n&&(c=2+(i-e)/o),i===n&&(c=4+(e-t)/o),c*=60,c<0&&(c+=360)),[c,a,l]},i4=eD;Y.prototype.hcg=function(){return i4(this._rgb)};var tD=(...r)=>new Y(...r,"hcg");Le.hcg=tD;Fe.format.hcg=r4;Fe.autodetect.push({p:1,test:(...r)=>{if(r=he(r,"hcg"),Ee(r)==="array"&&r.length===3)return"hcg"}});var rD=(r,e,t)=>Lr(r,e,t,"hcg");pt.hcg=rD;var{cos:Oo}=Math,iD=(...r)=>{r=he(r,"hsi");let[e,t,i]=r,s,n,o;return isNaN(e)&&(e=0),isNaN(t)&&(t=0),e>360&&(e-=360),e<0&&(e+=360),e/=360,e<1/3?(o=(1-t)/3,s=(1+t*Oo(kr*e)/Oo(eh-kr*e))/3,n=1-(o+s)):e<2/3?(e-=1/3,s=(1-t)/3,n=(1+t*Oo(kr*e)/Oo(eh-kr*e))/3,o=1-(s+n)):(e-=2/3,n=(1-t)/3,o=(1+t*Oo(kr*e)/Oo(eh-kr*e))/3,s=1-(n+o)),s=Ar(i*s*3),n=Ar(i*n*3),o=Ar(i*o*3),[s*255,n*255,o*255,r.length>3?r[3]:1]},s4=iD;var{min:sD,sqrt:nD,acos:oD}=Math,aD=(...r)=>{let[e,t,i]=he(r,"rgb");e/=255,t/=255,i/=255;let s,n=sD(e,t,i),o=(e+t+i)/3,a=o>0?1-n/o:0;return a===0?s=NaN:(s=(e-t+(e-i))/2,s/=nD((e-t)*(e-t)+(e-i)*(t-i)),s=oD(s),i>t&&(s=kr-s),s/=kr),[s*360,a,o]},n4=aD;Y.prototype.hsi=function(){return n4(this._rgb)};var lD=(...r)=>new Y(...r,"hsi");Le.hsi=lD;Fe.format.hsi=s4;Fe.autodetect.push({p:2,test:(...r)=>{if(r=he(r,"hsi"),Ee(r)==="array"&&r.length===3)return"hsi"}});var cD=(r,e,t)=>Lr(r,e,t,"hsi");pt.hsi=cD;var uD=(...r)=>{r=he(r,"hsl");let[e,t,i]=r,s,n,o;if(t===0)s=n=o=i*255;else{let a=[0,0,0],l=[0,0,0],c=i<.5?i*(1+t):i+t-i*t,h=2*i-c,d=e/360;a[0]=d+1/3,a[1]=d,a[2]=d-1/3;for(let p=0;p<3;p++)a[p]<0&&(a[p]+=1),a[p]>1&&(a[p]-=1),6*a[p]<1?l[p]=h+(c-h)*6*a[p]:2*a[p]<1?l[p]=c:3*a[p]<2?l[p]=h+(c-h)*(2/3-a[p])*6:l[p]=h;[s,n,o]=[l[0]*255,l[1]*255,l[2]*255]}return r.length>3?[s,n,o,r[3]]:[s,n,o,1]},Al=uD;var hD=(...r)=>{r=he(r,"rgba");let[e,t,i]=r;e/=255,t/=255,i/=255;let s=Qu(e,t,i),n=Ju(e,t,i),o=(n+s)/2,a,l;return n===s?(a=0,l=Number.NaN):a=o<.5?(n-s)/(n+s):(n-s)/(2-n-s),e==n?l=(t-i)/(n-s):t==n?l=2+(i-e)/(n-s):i==n&&(l=4+(e-t)/(n-s)),l*=60,l<0&&(l+=360),r.length>3&&r[3]!==void 0?[l,a,o,r[3]]:[l,a,o]},ah=hD;Y.prototype.hsl=function(){return ah(this._rgb)};var dD=(...r)=>new Y(...r,"hsl");Le.hsl=dD;Fe.format.hsl=Al;Fe.autodetect.push({p:2,test:(...r)=>{if(r=he(r,"hsl"),Ee(r)==="array"&&r.length===3)return"hsl"}});var pD=(r,e,t)=>Lr(r,e,t,"hsl");pt.hsl=pD;var{floor:fD}=Math,gD=(...r)=>{r=he(r,"hsv");let[e,t,i]=r,s,n,o;if(i*=255,t===0)s=n=o=i;else{e===360&&(e=0),e>360&&(e-=360),e<0&&(e+=360),e/=60;let a=fD(e),l=e-a,c=i*(1-t),h=i*(1-t*l),d=i*(1-t*(1-l));switch(a){case 0:[s,n,o]=[i,d,c];break;case 1:[s,n,o]=[h,i,c];break;case 2:[s,n,o]=[c,i,d];break;case 3:[s,n,o]=[c,h,i];break;case 4:[s,n,o]=[d,c,i];break;case 5:[s,n,o]=[i,c,h];break}}return[s,n,o,r.length>3?r[3]:1]},o4=gD;var{min:mD,max:yD}=Math,vD=(...r)=>{r=he(r,"rgb");let[e,t,i]=r,s=mD(e,t,i),n=yD(e,t,i),o=n-s,a,l,c;return c=n/255,n===0?(a=Number.NaN,l=0):(l=o/n,e===n&&(a=(t-i)/o),t===n&&(a=2+(i-e)/o),i===n&&(a=4+(e-t)/o),a*=60,a<0&&(a+=360)),[a,l,c]},a4=vD;Y.prototype.hsv=function(){return a4(this._rgb)};var xD=(...r)=>new Y(...r,"hsv");Le.hsv=xD;Fe.format.hsv=o4;Fe.autodetect.push({p:2,test:(...r)=>{if(r=he(r,"hsv"),Ee(r)==="array"&&r.length===3)return"hsv"}});var DD=(r,e,t)=>Lr(r,e,t,"hsv");pt.hsv=DD;function On(r,e){let t=r.length;Array.isArray(r[0])||(r=[r]),Array.isArray(e[0])||(e=e.map(o=>[o]));let i=e[0].length,s=e[0].map((o,a)=>e.map(l=>l[a])),n=r.map(o=>s.map(a=>Array.isArray(o)?o.reduce((l,c,h)=>l+c*(a[h]||0),0):a.reduce((l,c)=>l+c*o,0)));return t===1&&(n=n[0]),i===1?n.map(o=>o[0]):n}var bD=(...r)=>{r=he(r,"lab");let[e,t,i,...s]=r,[n,o,a]=ED([e,t,i]),[l,c,h]=up(n,o,a);return[l,c,h,...s.length>0&&s[0]<1?[s[0]]:[]]};function ED(r){var e=[[1.2268798758459243,-.5578149944602171,.2813910456659647],[-.0405757452148008,1.112286803280317,-.0717110580655164],[-.0763729366746601,-.4214933324022432,1.5869240198367816]],t=[[1,.3963377773761749,.2158037573099136],[1,-.1055613458156586,-.0638541728258133],[1,-.0894841775298119,-1.2914855480194092]],i=On(t,r);return On(e,i.map(s=>s**3))}var Go=bD;var SD=(...r)=>{let[e,t,i,...s]=he(r,"rgb"),n=dp(e,t,i);return[...CD(n),...s.length>0&&s[0]<1?[s[0]]:[]]};function CD(r){let e=[[.819022437996703,.3619062600528904,-.1288737815209879],[.0329836539323885,.9292868615863434,.0361446663506424],[.0481771893596242,.2642395317527308,.6335478284694309]],t=[[.210454268309314,.7936177747023054,-.0040720430116193],[1.9779985324311684,-2.42859224204858,.450593709617411],[.0259040424655478,.7827717124575296,-.8086757549230774]],i=On(e,r);return On(t,i.map(s=>Math.cbrt(s)))}var Uo=SD;Y.prototype.oklab=function(){return Uo(this._rgb)};var wD=(...r)=>new Y(...r,"oklab");Object.assign(Le,{oklab:wD});Fe.format.oklab=Go;Fe.autodetect.push({p:2,test:(...r)=>{if(r=he(r,"oklab"),Ee(r)==="array"&&r.length===3)return"oklab"}});var TD=(r,e,t)=>{let i=r.oklab(),s=e.oklab();return new Y(i[0]+t*(s[0]-i[0]),i[1]+t*(s[1]-i[1]),i[2]+t*(s[2]-i[2]),"oklab")};pt.oklab=TD;var _D=(r,e,t)=>Lr(r,e,t,"oklch");pt.oklch=_D;var{pow:gp,sqrt:mp,PI:yp,cos:l4,sin:c4,atan2:FD}=Math,u4=(r,e="lrgb",t=null)=>{let i=r.length;t||(t=Array.from(new Array(i)).map(()=>1));let s=i/t.reduce(function(d,p){return d+p});if(t.forEach((d,p)=>{t[p]*=s}),r=r.map(d=>new Y(d)),e==="lrgb")return AD(r,t);let n=r.shift(),o=n.get(e),a=[],l=0,c=0;for(let d=0;d<o.length;d++)if(o[d]=(o[d]||0)*t[0],a.push(isNaN(o[d])?0:t[0]),e.charAt(d)==="h"&&!isNaN(o[d])){let p=o[d]/180*yp;l+=l4(p)*t[0],c+=c4(p)*t[0]}let h=n.alpha()*t[0];r.forEach((d,p)=>{let g=d.get(e);h+=d.alpha()*t[p+1];for(let v=0;v<o.length;v++)if(!isNaN(g[v]))if(a[v]+=t[p+1],e.charAt(v)==="h"){let C=g[v]/180*yp;l+=l4(C)*t[p+1],c+=c4(C)*t[p+1]}else o[v]+=g[v]*t[p+1]});for(let d=0;d<o.length;d++)if(e.charAt(d)==="h"){let p=FD(c/a[d],l/a[d])/yp*180;for(;p<0;)p+=360;for(;p>=360;)p-=360;o[d]=p}else o[d]=o[d]/a[d];return h/=i,new Y(o,e).alpha(h>.99999?1:h,!0)},AD=(r,e)=>{let t=r.length,i=[0,0,0,0];for(let s=0;s<r.length;s++){let n=r[s],o=e[s]/t,a=n._rgb;i[0]+=gp(a[0],2)*o,i[1]+=gp(a[1],2)*o,i[2]+=gp(a[2],2)*o,i[3]+=a[3]*o}return i[0]=mp(i[0]),i[1]=mp(i[1]),i[2]=mp(i[2]),i[3]>.9999999&&(i[3]=1),new Y(Rn(i))};var{pow:kD}=Math;function Gn(r){let e="rgb",t=Le("#ccc"),i=0,s=[0,1],n=[],o=[0,0],a=!1,l=[],c=!1,h=0,d=1,p=!1,g={},v=!0,C=1,w=function(I){if(I=I||["#fff","#000"],I&&Ee(I)==="string"&&Le.brewer&&Le.brewer[I.toLowerCase()]&&(I=Le.brewer[I.toLowerCase()]),Ee(I)==="array"){I.length===1&&(I=[I[0],I[0]]),I=I.slice(0);for(let R=0;R<I.length;R++)I[R]=Le(I[R]);n.length=0;for(let R=0;R<I.length;R++)n.push(R/(I.length-1))}return W(),l=I},k=function(I){if(a!=null){let R=a.length-1,z=0;for(;z<R&&I>=a[z];)z++;return z-1}return 0},B=I=>I,L=I=>I,T=function(I,R){let z,U;if(R==null&&(R=!1),isNaN(I)||I===null)return t;R?U=I:a&&a.length>2?U=k(I)/(a.length-2):d!==h?U=(I-h)/(d-h):U=1,U=L(U),R||(U=B(U)),C!==1&&(U=kD(U,C)),U=o[0]+U*(1-o[0]-o[1]),U=Ar(U,0,1);let q=Math.floor(U*1e4);if(v&&g[q])z=g[q];else{if(Ee(l)==="array")for(let re=0;re<n.length;re++){let $=n[re];if(U<=$){z=l[re];break}if(U>=$&&re===n.length-1){z=l[re];break}if(U>$&&U<n[re+1]){U=(U-$)/(n[re+1]-$),z=Le.interpolate(l[re],l[re+1],U,e);break}}else Ee(l)==="function"&&(z=l(U));v&&(g[q]=z)}return z};var W=()=>g={};w(r);let j=function(I){let R=Le(T(I));return c&&R[c]?R[c]():R};return j.classes=function(I){if(I!=null){if(Ee(I)==="array")a=I,s=[I[0],I[I.length-1]];else{let R=Le.analyze(s);I===0?a=[R.min,R.max]:a=Le.limits(R,"e",I)}return j}return a},j.domain=function(I){if(!arguments.length)return s;h=I[0],d=I[I.length-1],n=[];let R=l.length;if(I.length===R&&h!==d)for(let z of Array.from(I))n.push((z-h)/(d-h));else{for(let z=0;z<R;z++)n.push(z/(R-1));if(I.length>2){let z=I.map((q,re)=>re/(I.length-1)),U=I.map(q=>(q-h)/(d-h));U.every((q,re)=>z[re]===q)||(L=q=>{if(q<=0||q>=1)return q;let re=0;for(;q>=U[re+1];)re++;let $=(q-U[re])/(U[re+1]-U[re]);return z[re]+$*(z[re+1]-z[re])})}}return s=[h,d],j},j.mode=function(I){return arguments.length?(e=I,W(),j):e},j.range=function(I,R){return w(I,R),j},j.out=function(I){return c=I,j},j.spread=function(I){return arguments.length?(i=I,j):i},j.correctLightness=function(I){return I==null&&(I=!0),p=I,W(),p?B=function(R){let z=T(0,!0).lab()[0],U=T(1,!0).lab()[0],q=z>U,re=T(R,!0).lab()[0],$=z+(U-z)*R,Q=re-$,Te=0,ye=1,xe=20;for(;Math.abs(Q)>.01&&xe-- >0;)(function(){return q&&(Q*=-1),Q<0?(Te=R,R+=(ye-R)*.5):(ye=R,R+=(Te-R)*.5),re=T(R,!0).lab()[0],Q=re-$})();return R}:B=R=>R,j},j.padding=function(I){return I!=null?(Ee(I)==="number"&&(I=[I,I]),o=I,j):o},j.colors=function(I,R){arguments.length<2&&(R="hex");let z=[];if(arguments.length===0)z=l.slice(0);else if(I===1)z=[j(.5)];else if(I>1){let U=s[0],q=s[1]-U;z=ID(0,I,!1).map(re=>j(U+re/(I-1)*q))}else{r=[];let U=[];if(a&&a.length>2)for(let q=1,re=a.length,$=1<=re;$?q<re:q>re;$?q++:q--)U.push((a[q-1]+a[q])*.5);else U=s;z=U.map(q=>j(q))}return Le[R]&&(z=z.map(U=>U[R]())),z},j.cache=function(I){return I!=null?(v=I,j):v},j.gamma=function(I){return I!=null?(C=I,j):C},j.nodata=function(I){return I!=null?(t=Le(I),j):t},j}function ID(r,e,t){let i=[],s=r<e,n=t?s?e+1:e-1:e;for(let o=r;s?o<n:o>n;s?o++:o--)i.push(o);return i}var LD=function(r){let e=[1,1];for(let t=1;t<r;t++){let i=[1];for(let s=1;s<=e.length;s++)i[s]=(e[s]||0)+e[s-1];e=i}return e},MD=function(r){let e,t,i,s;if(r=r.map(n=>new Y(n)),r.length===2)[t,i]=r.map(n=>n.lab()),e=function(n){let o=[0,1,2].map(a=>t[a]+n*(i[a]-t[a]));return new Y(o,"lab")};else if(r.length===3)[t,i,s]=r.map(n=>n.lab()),e=function(n){let o=[0,1,2].map(a=>(1-n)*(1-n)*t[a]+2*(1-n)*n*i[a]+n*n*s[a]);return new Y(o,"lab")};else if(r.length===4){let n;[t,i,s,n]=r.map(o=>o.lab()),e=function(o){let a=[0,1,2].map(l=>(1-o)*(1-o)*(1-o)*t[l]+3*(1-o)*(1-o)*o*i[l]+3*(1-o)*o*o*s[l]+o*o*o*n[l]);return new Y(a,"lab")}}else if(r.length>=5){let n,o,a;n=r.map(l=>l.lab()),a=r.length-1,o=LD(a),e=function(l){let c=1-l,h=[0,1,2].map(d=>n.reduce((p,g,v)=>p+o[v]*c**(a-v)*l**v*g[d],0));return new Y(h,"lab")}}else throw new RangeError("No point in running bezier with only one color.");return e},h4=r=>{let e=MD(r);return e.scale=()=>Gn(e),e};var{round:d4}=Math;Y.prototype.rgb=function(r=!0){return r===!1?this._rgb.slice(0,3):this._rgb.slice(0,3).map(d4)};Y.prototype.rgba=function(r=!0){return this._rgb.slice(0,4).map((e,t)=>t<3?r===!1?e:d4(e):e)};var ND=(...r)=>new Y(...r,"rgb");Object.assign(Le,{rgb:ND});Fe.format.rgb=(...r)=>{let e=he(r,"rgba");return e[3]===void 0&&(e[3]=1),e};Fe.autodetect.push({p:3,test:(...r)=>{if(r=he(r,"rgba"),Ee(r)==="array"&&(r.length===3||r.length===4&&Ee(r[3])=="number"&&r[3]>=0&&r[3]<=1))return"rgb"}});var ri=(r,e,t)=>{if(!ri[t])throw new Error("unknown blend mode "+t);return ri[t](r,e)},Us=r=>(e,t)=>{let i=Le(t).rgb(),s=Le(e).rgb();return Le.rgb(r(i,s))},Vs=r=>(e,t)=>{let i=[];return i[0]=r(e[0],t[0]),i[1]=r(e[1],t[1]),i[2]=r(e[2],t[2]),i},PD=r=>r,BD=(r,e)=>r*e/255,RD=(r,e)=>r>e?e:r,OD=(r,e)=>r>e?r:e,GD=(r,e)=>255*(1-(1-r/255)*(1-e/255)),UD=(r,e)=>e<128?2*r*e/255:255*(1-2*(1-r/255)*(1-e/255)),VD=(r,e)=>255*(1-(1-e/255)/(r/255)),zD=(r,e)=>r===255?255:(r=255*(e/255)/(1-r/255),r>255?255:r);ri.normal=Us(Vs(PD));ri.multiply=Us(Vs(BD));ri.screen=Us(Vs(GD));ri.overlay=Us(Vs(UD));ri.darken=Us(Vs(RD));ri.lighten=Us(Vs(OD));ri.dodge=Us(Vs(zD));ri.burn=Us(Vs(VD));var p4=ri;var{pow:WD,sin:HD,cos:jD}=Math;function f4(r=300,e=-1.5,t=1,i=1,s=[0,1]){let n=0,o;Ee(s)==="array"?o=s[1]-s[0]:(o=0,s=[s,s]);let a=function(l){let c=kr*((r+120)/360+e*l),h=WD(s[0]+o*l,i),p=(n!==0?t[0]+l*n:t)*h*(1-h)/2,g=jD(c),v=HD(c),C=h+p*(-.14861*g+1.78277*v),w=h+p*(-.29227*g-.90649*v),k=h+p*(1.97294*g);return Le(Rn([C*255,w*255,k*255,1]))};return a.start=function(l){return l==null?r:(r=l,a)},a.rotations=function(l){return l==null?e:(e=l,a)},a.gamma=function(l){return l==null?i:(i=l,a)},a.hue=function(l){return l==null?t:(t=l,Ee(t)==="array"?(n=t[1]-t[0],n===0&&(t=t[1])):n=0,a)},a.lightness=function(l){return l==null?s:(Ee(l)==="array"?(s=l,o=l[1]-l[0]):(s=[l,l],o=0),a)},a.scale=()=>Le.scale(a),a.hue(t),a}var $D="0123456789abcdef",{floor:qD,random:YD}=Math,g4=()=>{let r="#";for(let e=0;e<6;e++)r+=$D.charAt(qD(YD()*16));return new Y(r,"hex")};var{log:m4,pow:XD,floor:KD,abs:ZD}=Math;function vp(r,e=null){let t={min:Number.MAX_VALUE,max:Number.MAX_VALUE*-1,sum:0,values:[],count:0};return Ee(r)==="object"&&(r=Object.values(r)),r.forEach(i=>{e&&Ee(i)==="object"&&(i=i[e]),i!=null&&!isNaN(i)&&(t.values.push(i),t.sum+=i,i<t.min&&(t.min=i),i>t.max&&(t.max=i),t.count+=1)}),t.domain=[t.min,t.max],t.limits=(i,s)=>xp(t,i,s),t}function xp(r,e="equal",t=7){Ee(r)=="array"&&(r=vp(r));let{min:i,max:s}=r,n=r.values.sort((a,l)=>a-l);if(t===1)return[i,s];let o=[];if(e.substr(0,1)==="c"&&(o.push(i),o.push(s)),e.substr(0,1)==="e"){o.push(i);for(let a=1;a<t;a++)o.push(i+a/t*(s-i));o.push(s)}else if(e.substr(0,1)==="l"){if(i<=0)throw new Error("Logarithmic scales are only possible for values > 0");let a=Math.LOG10E*m4(i),l=Math.LOG10E*m4(s);o.push(i);for(let c=1;c<t;c++)o.push(XD(10,a+c/t*(l-a)));o.push(s)}else if(e.substr(0,1)==="q"){o.push(i);for(let a=1;a<t;a++){let l=(n.length-1)*a/t,c=KD(l);if(c===l)o.push(n[c]);else{let h=l-c;o.push(n[c]*(1-h)+n[c+1]*h)}}o.push(s)}else if(e.substr(0,1)==="k"){let a,l=n.length,c=new Array(l),h=new Array(t),d=!0,p=0,g=null;g=[],g.push(i);for(let w=1;w<t;w++)g.push(i+w/t*(s-i));for(g.push(s);d;){for(let k=0;k<t;k++)h[k]=0;for(let k=0;k<l;k++){let B=n[k],L=Number.MAX_VALUE,T;for(let W=0;W<t;W++){let j=ZD(g[W]-B);j<L&&(L=j,T=W),h[T]++,c[k]=T}}let w=new Array(t);for(let k=0;k<t;k++)w[k]=null;for(let k=0;k<l;k++)a=c[k],w[a]===null?w[a]=n[k]:w[a]+=n[k];for(let k=0;k<t;k++)w[k]*=1/h[k];d=!1;for(let k=0;k<t;k++)if(w[k]!==g[k]){d=!0;break}g=w,p++,p>200&&(d=!1)}let v={};for(let w=0;w<t;w++)v[w]=[];for(let w=0;w<l;w++)a=c[w],v[a].push(n[w]);let C=[];for(let w=0;w<t;w++)C.push(v[w][0]),C.push(v[w][v[w].length-1]);C=C.sort((w,k)=>w-k),o.push(C[0]);for(let w=1;w<C.length;w+=2){let k=C[w];!isNaN(k)&&o.indexOf(k)===-1&&o.push(k)}}return o}var y4=(r,e)=>{r=new Y(r),e=new Y(e);let t=r.luminance(),i=e.luminance();return t>i?(t+.05)/(i+.05):(i+.05)/(t+.05)};var v4=.027,QD=5e-4,JD=.1,x4=1.14,lh=.022,D4=1.414,E4=(r,e)=>{r=new Y(r),e=new Y(e),r.alpha()<1&&(r=wi(e,r,r.alpha(),"rgb"));let t=b4(...r.rgb()),i=b4(...e.rgb()),s=t>=lh?t:t+Math.pow(lh-t,D4),n=i>=lh?i:i+Math.pow(lh-i,D4),o=Math.pow(n,.56)-Math.pow(s,.57),a=Math.pow(n,.65)-Math.pow(s,.62),l=Math.abs(n-s)<QD?0:s<n?o*x4:a*x4;return(Math.abs(l)<JD?0:l>0?l-v4:l+v4)*100};function b4(r,e,t){return .2126729*Math.pow(r/255,2.4)+.7151522*Math.pow(e/255,2.4)+.072175*Math.pow(t/255,2.4)}var{sqrt:ss,pow:Xt,min:eb,max:tb,atan2:S4,abs:C4,cos:ch,sin:w4,exp:rb,PI:T4}=Math;function _4(r,e,t=1,i=1,s=1){var n=function(gt){return 360*gt/(2*T4)},o=function(gt){return 2*T4*gt/360};r=new Y(r),e=new Y(e);let[a,l,c]=Array.from(r.lab()),[h,d,p]=Array.from(e.lab()),g=(a+h)/2,v=ss(Xt(l,2)+Xt(c,2)),C=ss(Xt(d,2)+Xt(p,2)),w=(v+C)/2,k=.5*(1-ss(Xt(w,7)/(Xt(w,7)+Xt(25,7)))),B=l*(1+k),L=d*(1+k),T=ss(Xt(B,2)+Xt(c,2)),W=ss(Xt(L,2)+Xt(p,2)),j=(T+W)/2,I=n(S4(c,B)),R=n(S4(p,L)),z=I>=0?I:I+360,U=R>=0?R:R+360,q=C4(z-U)>180?(z+U+360)/2:(z+U)/2,re=1-.17*ch(o(q-30))+.24*ch(o(2*q))+.32*ch(o(3*q+6))-.2*ch(o(4*q-63)),$=U-z;$=C4($)<=180?$:U<=z?$+360:$-360,$=2*ss(T*W)*w4(o($)/2);let Q=h-a,Te=W-T,ye=1+.015*Xt(g-50,2)/ss(20+Xt(g-50,2)),xe=1+.045*j,De=1+.015*j*re,_e=30*rb(-Xt((q-275)/25,2)),rt=-(2*ss(Xt(j,7)/(Xt(j,7)+Xt(25,7))))*w4(2*o(_e)),et=ss(Xt(Q/(t*ye),2)+Xt(Te/(i*xe),2)+Xt($/(s*De),2)+rt*(Te/(i*xe))*($/(s*De)));return tb(0,eb(100,et))}function F4(r,e,t="lab"){r=new Y(r),e=new Y(e);let i=r.get(t),s=e.get(t),n=0;for(let o in i){let a=(i[o]||0)-(s[o]||0);n+=a*a}return Math.sqrt(n)}var A4=(...r)=>{try{return new Y(...r),!0}catch{return!1}};var k4={cool(){return Gn([Le.hsl(180,1,.9),Le.hsl(250,.7,.4)])},hot(){return Gn(["#000","#f00","#ff0","#fff"],[0,.25,.75,1]).mode("rgb")}};var Dp={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},L4=Object.keys(Dp),I4=new Map(L4.map(r=>[r.toLowerCase(),r])),ib=typeof Proxy=="function"?new Proxy(Dp,{get(r,e){let t=e.toLowerCase();if(I4.has(t))return r[I4.get(t)]},getOwnPropertyNames(){return Object.getOwnPropertyNames(L4)}}):Dp,M4=ib;var sb=(...r)=>{r=he(r,"cmyk");let[e,t,i,s]=r,n=r.length>4?r[4]:1;return s===1?[0,0,0,n]:[e>=1?0:255*(1-e)*(1-s),t>=1?0:255*(1-t)*(1-s),i>=1?0:255*(1-i)*(1-s),n]},N4=sb;var{max:P4}=Math,nb=(...r)=>{let[e,t,i]=he(r,"rgb");e=e/255,t=t/255,i=i/255;let s=1-P4(e,P4(t,i)),n=s<1?1/(1-s):0,o=(1-e-s)*n,a=(1-t-s)*n,l=(1-i-s)*n;return[o,a,l,s]},B4=nb;Y.prototype.cmyk=function(){return B4(this._rgb)};var ob=(...r)=>new Y(...r,"cmyk");Object.assign(Le,{cmyk:ob});Fe.format.cmyk=N4;Fe.autodetect.push({p:2,test:(...r)=>{if(r=he(r,"cmyk"),Ee(r)==="array"&&r.length===4)return"cmyk"}});var ab=(...r)=>{let e=he(r,"hsla"),t=ur(r)||"lsa";return e[0]=v0(e[0]||0)+"deg",e[1]=v0(e[1]*100)+"%",e[2]=v0(e[2]*100)+"%",t==="hsla"||e.length>3&&e[3]<1?(e[3]="/ "+(e.length>3?e[3]:1),t="hsla"):e.length=3,`${t.substr(0,3)}(${e.join(" ")})`},R4=ab;var lb=(...r)=>{let e=he(r,"lab"),t=ur(r)||"lab";return e[0]=v0(e[0])+"%",e[1]=v0(e[1]),e[2]=v0(e[2]),t==="laba"||e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`lab(${e.join(" ")})`},O4=lb;var cb=(...r)=>{let e=he(r,"lch"),t=ur(r)||"lab";return e[0]=v0(e[0])+"%",e[1]=v0(e[1]),e[2]=isNaN(e[2])?"none":v0(e[2])+"deg",t==="lcha"||e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`lch(${e.join(" ")})`},G4=cb;var ub=(...r)=>{let e=he(r,"lab");return e[0]=v0(e[0]*100)+"%",e[1]=Tl(e[1]),e[2]=Tl(e[2]),e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`oklab(${e.join(" ")})`},U4=ub;var hb=(...r)=>{let[e,t,i,...s]=he(r,"rgb"),[n,o,a]=Uo(e,t,i),[l,c,h]=oh(n,o,a);return[l,c,h,...s.length>0&&s[0]<1?[s[0]]:[]]},uh=hb;var db=(...r)=>{let e=he(r,"lch");return e[0]=v0(e[0]*100)+"%",e[1]=Tl(e[1]),e[2]=isNaN(e[2])?"none":v0(e[2])+"deg",e.length>3&&e[3]<1?e[3]="/ "+(e.length>3?e[3]:1):e.length=3,`oklch(${e.join(" ")})`},V4=db;var{round:bp}=Math,pb=(...r)=>{let e=he(r,"rgba"),t=ur(r)||"rgb";if(t.substr(0,3)==="hsl")return R4(ah(e),t);if(t.substr(0,3)==="lab"){let i=Gs();Ir("d50");let s=O4(Po(e),t);return Ir(i),s}if(t.substr(0,3)==="lch"){let i=Gs();Ir("d50");let s=G4(Fl(e),t);return Ir(i),s}return t.substr(0,5)==="oklab"?U4(Uo(e)):t.substr(0,5)==="oklch"?V4(uh(e)):(e[0]=bp(e[0]),e[1]=bp(e[1]),e[2]=bp(e[2]),(t==="rgba"||e.length>3&&e[3]<1)&&(e[3]="/ "+(e.length>3?e[3]:1),t="rgba"),`${t.substr(0,3)}(${e.slice(0,t==="rgb"?3:4).join(" ")})`)},z4=pb;var fb=(...r)=>{r=he(r,"lch");let[e,t,i,...s]=r,[n,o,a]=nh(e,t,i),[l,c,h]=Go(n,o,a);return[l,c,h,...s.length>0&&s[0]<1?[s[0]]:[]]},hh=fb;var ns=/((?:-?\d+)|(?:-?\d+(?:\.\d+)?)%|none)/.source,ii=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%?)|none)/.source,dh=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)%)|none)/.source,Mr=/\s*/.source,zo=/\s+/.source,Ep=/\s*,\s*/.source,ph=/((?:-?(?:\d+(?:\.\d*)?|\.\d+)(?:deg)?)|none)/.source,Wo=/\s*(?:\/\s*((?:[01]|[01]?\.\d+)|\d+(?:\.\d+)?%))?/.source,W4=new RegExp("^rgba?\\("+Mr+[ns,ns,ns].join(zo)+Wo+"\\)$"),H4=new RegExp("^rgb\\("+Mr+[ns,ns,ns].join(Ep)+Mr+"\\)$"),j4=new RegExp("^rgba\\("+Mr+[ns,ns,ns,ii].join(Ep)+Mr+"\\)$"),$4=new RegExp("^hsla?\\("+Mr+[ph,dh,dh].join(zo)+Wo+"\\)$"),q4=new RegExp("^hsl?\\("+Mr+[ph,dh,dh].join(Ep)+Mr+"\\)$"),Y4=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,X4=new RegExp("^lab\\("+Mr+[ii,ii,ii].join(zo)+Wo+"\\)$"),K4=new RegExp("^lch\\("+Mr+[ii,ii,ph].join(zo)+Wo+"\\)$"),Z4=new RegExp("^oklab\\("+Mr+[ii,ii,ii].join(zo)+Wo+"\\)$"),Q4=new RegExp("^oklch\\("+Mr+[ii,ii,ph].join(zo)+Wo+"\\)$"),{round:J4}=Math,Vo=r=>r.map((e,t)=>t<=2?Ar(J4(e),0,255):e),Kt=(r,e=0,t=100,i=!1)=>(typeof r=="string"&&r.endsWith("%")&&(r=parseFloat(r.substring(0,r.length-1))/100,i?r=e+(r+1)*.5*(t-e):r=e+r*(t-e)),+r),P0=(r,e)=>r==="none"?e:r,e7=r=>{if(r=r.toLowerCase().trim(),r==="transparent")return[0,0,0,0];let e;if(Fe.format.named)try{return Fe.format.named(r)}catch{}if((e=r.match(W4))||(e=r.match(H4))){let t=e.slice(1,4);for(let s=0;s<3;s++)t[s]=+Kt(P0(t[s],0),0,255);t=Vo(t);let i=e[4]!==void 0?+Kt(e[4],0,1):1;return t[3]=i,t}if(e=r.match(j4)){let t=e.slice(1,5);for(let i=0;i<4;i++)t[i]=+Kt(t[i],0,255);return t}if((e=r.match($4))||(e=r.match(q4))){let t=e.slice(1,4);t[0]=+P0(t[0].replace("deg",""),0),t[1]=+Kt(P0(t[1],0),0,100)*.01,t[2]=+Kt(P0(t[2],0),0,100)*.01;let i=Vo(Al(t)),s=e[4]!==void 0?+Kt(e[4],0,1):1;return i[3]=s,i}if(e=r.match(Y4)){let t=e.slice(1,4);t[1]*=.01,t[2]*=.01;let i=Al(t);for(let s=0;s<3;s++)i[s]=J4(i[s]);return i[3]=+e[4],i}if(e=r.match(X4)){let t=e.slice(1,4);t[0]=Kt(P0(t[0],0),0,100),t[1]=Kt(P0(t[1],0),-125,125,!0),t[2]=Kt(P0(t[2],0),-125,125,!0);let i=Gs();Ir("d50");let s=Vo(No(t));Ir(i);let n=e[4]!==void 0?+Kt(e[4],0,1):1;return s[3]=n,s}if(e=r.match(K4)){let t=e.slice(1,4);t[0]=Kt(t[0],0,100),t[1]=Kt(P0(t[1],0),0,150,!1),t[2]=+P0(t[2].replace("deg",""),0);let i=Gs();Ir("d50");let s=Vo(Bo(t));Ir(i);let n=e[4]!==void 0?+Kt(e[4],0,1):1;return s[3]=n,s}if(e=r.match(Z4)){let t=e.slice(1,4);t[0]=Kt(P0(t[0],0),0,1),t[1]=Kt(P0(t[1],0),-.4,.4,!0),t[2]=Kt(P0(t[2],0),-.4,.4,!0);let i=Vo(Go(t)),s=e[4]!==void 0?+Kt(e[4],0,1):1;return i[3]=s,i}if(e=r.match(Q4)){let t=e.slice(1,4);t[0]=Kt(P0(t[0],0),0,1),t[1]=Kt(P0(t[1],0),0,.4,!1),t[2]=+P0(t[2].replace("deg",""),0);let i=Vo(hh(t)),s=e[4]!==void 0?+Kt(e[4],0,1):1;return i[3]=s,i}};e7.test=r=>W4.test(r)||$4.test(r)||X4.test(r)||K4.test(r)||Z4.test(r)||Q4.test(r)||H4.test(r)||j4.test(r)||q4.test(r)||Y4.test(r)||r==="transparent";var Sp=e7;Y.prototype.css=function(r){return z4(this._rgb,r)};var gb=(...r)=>new Y(...r,"css");Le.css=gb;Fe.format.css=Sp;Fe.autodetect.push({p:5,test:(r,...e)=>{if(!e.length&&Ee(r)==="string"&&Sp.test(r))return"css"}});Fe.format.gl=(...r)=>{let e=he(r,"rgba");return e[0]*=255,e[1]*=255,e[2]*=255,e};var mb=(...r)=>new Y(...r,"gl");Le.gl=mb;Y.prototype.gl=function(){let r=this._rgb;return[r[0]/255,r[1]/255,r[2]/255,r[3]]};Y.prototype.hex=function(r){return sh(this._rgb,r)};var yb=(...r)=>new Y(...r,"hex");Le.hex=yb;Fe.format.hex=rh;Fe.autodetect.push({p:4,test:(r,...e)=>{if(!e.length&&Ee(r)==="string"&&[3,4,5,6,7,8,9].indexOf(r.length)>=0)return"hex"}});var{log:fh}=Math,vb=r=>{let e=r/100,t,i,s;return e<66?(t=255,i=e<6?0:-155.25485562709179-.44596950469579133*(i=e-2)+104.49216199393888*fh(i),s=e<20?0:-254.76935184120902+.8274096064007395*(s=e-10)+115.67994401066147*fh(s)):(t=351.97690566805693+.114206453784165*(t=e-55)-40.25366309332127*fh(t),i=325.4494125711974+.07943456536662342*(i=e-50)-28.0852963507957*fh(i),s=255),[t,i,s,1]},gh=vb;var{round:xb}=Math,Db=(...r)=>{let e=he(r,"rgb"),t=e[0],i=e[2],s=1e3,n=4e4,o=.4,a;for(;n-s>o;){a=(n+s)*.5;let l=gh(a);l[2]/l[0]>=i/t?n=a:s=a}return xb(a)},t7=Db;Y.prototype.temp=Y.prototype.kelvin=Y.prototype.temperature=function(){return t7(this._rgb)};var Cp=(...r)=>new Y(...r,"temp");Object.assign(Le,{temp:Cp,kelvin:Cp,temperature:Cp});Fe.format.temp=Fe.format.kelvin=Fe.format.temperature=gh;Y.prototype.oklch=function(){return uh(this._rgb)};var bb=(...r)=>new Y(...r,"oklch");Object.assign(Le,{oklch:bb});Fe.format.oklch=hh;Fe.autodetect.push({p:2,test:(...r)=>{if(r=he(r,"oklch"),Ee(r)==="array"&&r.length===3)return"oklch"}});Object.assign(Le,{analyze:vp,average:u4,bezier:h4,blend:p4,brewer:M4,Color:Y,colors:Os,contrast:y4,contrastAPCA:E4,cubehelix:f4,deltaE:_4,distance:F4,input:Fe,interpolate:wi,limits:xp,mix:wi,random:g4,scale:Gn,scales:k4,valid:A4});var mh=Le;function wp(r,e){return r>>e&255}var r7=16,i7=8,s7=0;function os(r,e,t){return(r<<r7)+(e<<i7)+(t<<s7)}function $0(r){return wp(r,r7)}function q0(r){return wp(r,i7)}function Y0(r){return wp(r,s7)}var Un=Array.from({length:256}).map((r,e)=>e.toString(16).padStart(2,"0"));function as(r,e){return e===void 0?"#"+Un[$0(r)]+Un[q0(r)]+Un[Y0(r)]:"#"+Un[$0(r)]+Un[q0(r)]+Un[Y0(r)]+Un[Math.round(e*255)]}function Ti(r){let e=0,t=0,i=0,s=255;switch(r.length){case 4:{e=(Zt(r.charCodeAt(1))<<4)+Zt(r.charCodeAt(1)),t=(Zt(r.charCodeAt(2))<<4)+Zt(r.charCodeAt(2)),i=(Zt(r.charCodeAt(3))<<4)+Zt(r.charCodeAt(3));break}case 7:{e=(Zt(r.charCodeAt(1))<<4)+Zt(r.charCodeAt(2)),t=(Zt(r.charCodeAt(3))<<4)+Zt(r.charCodeAt(4)),i=(Zt(r.charCodeAt(5))<<4)+Zt(r.charCodeAt(6));break}case 9:{e=(Zt(r.charCodeAt(1))<<4)+Zt(r.charCodeAt(2)),t=(Zt(r.charCodeAt(3))<<4)+Zt(r.charCodeAt(4)),i=(Zt(r.charCodeAt(5))<<4)+Zt(r.charCodeAt(6)),s=(Zt(r.charCodeAt(7))<<4)+Zt(r.charCodeAt(8));break}default:break}return{rgb:os(e,t,i),a:s}}function Zt(r){return(r&15)+9*(r>>6)}function si(r){try{let e=mh(r);return{rgb:e.num(),a:e.alpha()}}catch(e){let t=document.createElement("canvas"),i=t.getContext("2d");if(!i)throw e;t.width=1,t.height=1,i.fillStyle=r,i.fillRect(0,0,t.width,t.height);let s=i.getImageData(0,0,1,1).data;return{rgb:os(s[0],s[1],s[2]),a:s[3]/255}}}function n7(r,e){return os(Math.clamp($0(r)*e,0,255),Math.clamp(q0(r)*e,0,255),Math.clamp(Y0(r)*e,0,255))}function yh(r,e,t,i=1){if(t<=0)return r;if(t>=1)return e;let s=(l,c)=>Math.round((l**(1/i)*(1-t)+c**(1/i)*t)**i),n=s($0(r),$0(e)),o=s(q0(r),q0(e)),a=s(Y0(r),Y0(e));return os(n,o,a)}var vh={"Perceptually Uniform Sequential":["viridis","plasma","inferno","magma","cividis"],"Sequential colormaps":["Greys","Purples","Blues","Greens","Oranges","Reds","YlOrBr","YlOrRd","OrRd","PuRd","RdPu","BuPu","GnBu","PuBu","YlGnBu","PuBuGn","BuGn","YlGn"],"Sequential (2)":["binary","gist_yarg","gist_gray","gray","bone","pink","spring","summer","autumn","winter","cool","Wistia","hot","afmhot","gist_heat","copper"],Diverging:["PiYG","PRGn","BrBG","PuOr","RdGy","RdBu","RdYlBu","RdYlGn","Spectral","coolwarm","bwr","seismic"],Cyclic:["twilight","twilight_shifted","hsv"],Miscellaneous:["ocean","gist_earth","terrain","gist_stern","gnuplot","gnuplot2","CMRmap","cubehelix","brg","gist_rainbow","rainbow","jet","turbo","nipy_spectral","gist_ncar"]},ce={};ce.Accent={interpolate:!1,colors:[[.498,.7882,.498],[.7451,.6824,.8314],[.9922,.7529,.5255],[1,1,.6],[.2196,.4235,.6902],[.9412,.0078,.498],[.749,.3569,.0902],[.4,.4,.4]]};ce.Blues={interpolate:!0,colors:[[.9686,.9843,1],[.9656,.9823,.999],[.9625,.9804,.998],[.9594,.9784,.997],[.9563,.9764,.9961],[.9532,.9745,.9951],[.9502,.9725,.9941],[.9471,.9705,.9931],[.944,.9686,.9921],[.9409,.9666,.9911],[.9379,.9646,.9902],[.9348,.9627,.9892],[.9317,.9607,.9882],[.9286,.9587,.9872],[.9256,.9568,.9862],[.9225,.9548,.9852],[.9194,.9528,.9843],[.9163,.9508,.9833],[.9133,.9489,.9823],[.9102,.9469,.9813],[.9071,.9449,.9803],[.904,.943,.9793],[.901,.941,.9783],[.8979,.939,.9774],[.8948,.9371,.9764],[.8917,.9351,.9754],[.8887,.9331,.9744],[.8856,.9312,.9734],[.8825,.9292,.9724],[.8794,.9272,.9715],[.8764,.9253,.9705],[.8733,.9233,.9695],[.8702,.9213,.9685],[.8673,.9194,.9675],[.8643,.9174,.9665],[.8614,.9154,.9656],[.8584,.9134,.9646],[.8555,.9115,.9636],[.8525,.9095,.9626],[.8496,.9075,.9616],[.8466,.9056,.9606],[.8436,.9036,.9596],[.8407,.9016,.9587],[.8377,.8997,.9577],[.8348,.8977,.9567],[.8318,.8957,.9557],[.8289,.8938,.9547],[.8259,.8918,.9537],[.823,.8898,.9528],[.82,.8879,.9518],[.8171,.8859,.9508],[.8141,.8839,.9498],[.8112,.882,.9488],[.8082,.88,.9478],[.8053,.878,.9469],[.8023,.876,.9459],[.7994,.8741,.9449],[.7964,.8721,.9439],[.7934,.8701,.9429],[.7905,.8682,.9419],[.7875,.8662,.9409],[.7846,.8642,.94],[.7816,.8623,.939],[.7787,.8603,.938],[.7752,.8583,.9368],[.7703,.8562,.9351],[.7654,.8541,.9334],[.7605,.852,.9317],[.7556,.8499,.9299],[.7506,.8478,.9282],[.7457,.8458,.9265],[.7408,.8437,.9248],[.7359,.8416,.923],[.7309,.8395,.9213],[.726,.8374,.9196],[.7211,.8353,.9179],[.7162,.8332,.9162],[.7113,.8311,.9144],[.7063,.829,.9127],[.7014,.8269,.911],[.6965,.8248,.9093],[.6916,.8227,.9075],[.6867,.8207,.9058],[.6817,.8186,.9041],[.6768,.8165,.9024],[.6719,.8144,.9007],[.667,.8123,.8989],[.6621,.8102,.8972],[.6571,.8081,.8955],[.6522,.806,.8938],[.6473,.8039,.892],[.6424,.8018,.8903],[.6374,.7997,.8886],[.6325,.7976,.8869],[.6276,.7956,.8852],[.6227,.7935,.8834],[.6173,.7909,.8818],[.611,.7874,.8805],[.6047,.784,.8791],[.5984,.7805,.8778],[.5922,.7771,.8764],[.5859,.7736,.8751],[.5796,.7702,.8737],[.5733,.7668,.8724],[.5671,.7633,.871],[.5608,.7599,.8697],[.5545,.7564,.8683],[.5482,.753,.867],[.542,.7495,.8656],[.5357,.7461,.8643],[.5294,.7426,.8629],[.5231,.7392,.8615],[.5169,.7357,.8602],[.5106,.7323,.8588],[.5043,.7289,.8575],[.498,.7254,.8561],[.4918,.722,.8548],[.4855,.7185,.8534],[.4792,.7151,.8521],[.4729,.7116,.8507],[.4667,.7082,.8494],[.4604,.7047,.848],[.4541,.7013,.8467],[.4478,.6979,.8453],[.4416,.6944,.844],[.4353,.691,.8426],[.429,.6875,.8412],[.4227,.6841,.8399],[.4171,.6806,.8382],[.412,.6772,.8363],[.407,.6737,.8343],[.402,.6703,.8323],[.3969,.6669,.8304],[.3919,.6634,.8284],[.3868,.66,.8264],[.3818,.6565,.8245],[.3767,.6531,.8225],[.3717,.6496,.8205],[.3666,.6462,.8185],[.3616,.6427,.8166],[.3566,.6393,.8146],[.3515,.6358,.8126],[.3465,.6324,.8107],[.3414,.629,.8087],[.3364,.6255,.8067],[.3313,.6221,.8048],[.3263,.6186,.8028],[.3212,.6152,.8008],[.3162,.6117,.7989],[.3112,.6083,.7969],[.3061,.6048,.7949],[.3011,.6014,.793],[.296,.598,.791],[.291,.5945,.789],[.2859,.5911,.7871],[.2809,.5876,.7851],[.2758,.5842,.7831],[.2708,.5807,.7811],[.2658,.5773,.7792],[.2607,.5738,.7772],[.2563,.57,.7752],[.2522,.566,.7731],[.2482,.5619,.771],[.2441,.5578,.7689],[.24,.5538,.7668],[.236,.5497,.7647],[.2319,.5457,.7626],[.2279,.5416,.7605],[.2238,.5375,.7584],[.2197,.5335,.7563],[.2157,.5294,.7542],[.2116,.5254,.7522],[.2076,.5213,.7501],[.2035,.5172,.748],[.1994,.5132,.7459],[.1954,.5091,.7438],[.1913,.5051,.7417],[.1873,.501,.7396],[.1832,.4969,.7375],[.1791,.4929,.7354],[.1751,.4888,.7333],[.171,.4848,.7312],[.167,.4807,.7292],[.1629,.4766,.7271],[.1588,.4726,.725],[.1548,.4685,.7229],[.1507,.4645,.7208],[.1467,.4604,.7187],[.1426,.4563,.7166],[.1385,.4523,.7145],[.1345,.4482,.7124],[.1304,.4442,.7103],[.1271,.4402,.7075],[.124,.4362,.7044],[.121,.4323,.7013],[.1179,.4284,.6983],[.1148,.4244,.6952],[.1117,.4205,.6921],[.1087,.4166,.689],[.1056,.4126,.686],[.1025,.4087,.6829],[.0994,.4048,.6798],[.0963,.4008,.6767],[.0933,.3969,.6737],[.0902,.3929,.6706],[.0871,.389,.6675],[.084,.3851,.6644],[.081,.3811,.6614],[.0779,.3772,.6583],[.0748,.3733,.6552],[.0717,.3693,.6521],[.0687,.3654,.6491],[.0656,.3614,.646],[.0625,.3575,.6429],[.0594,.3536,.6398],[.0564,.3496,.6368],[.0533,.3457,.6337],[.0502,.3418,.6306],[.0471,.3378,.6275],[.0441,.3339,.6245],[.041,.33,.6214],[.0379,.326,.6183],[.0348,.3221,.6152],[.0318,.3181,.6121],[.0314,.3141,.6065],[.0314,.31,.6005],[.0314,.306,.5944],[.0314,.3019,.5884],[.0314,.2979,.5824],[.0314,.2938,.5763],[.0314,.2897,.5703],[.0314,.2857,.5643],[.0314,.2816,.5583],[.0314,.2776,.5522],[.0314,.2735,.5462],[.0314,.2694,.5402],[.0314,.2654,.5341],[.0314,.2613,.5281],[.0314,.2573,.5221],[.0314,.2532,.5161],[.0314,.2491,.51],[.0314,.2451,.504],[.0314,.241,.498],[.0314,.237,.4919],[.0314,.2329,.4859],[.0314,.2288,.4799],[.0314,.2248,.4739],[.0314,.2207,.4678],[.0314,.2167,.4618],[.0314,.2126,.4558],[.0314,.2085,.4498],[.0314,.2045,.4437],[.0314,.2004,.4377],[.0314,.1964,.4317],[.0314,.1923,.4256],[.0314,.1882,.4196]]};ce.BrBG={interpolate:!0,colors:[[.3294,.1882,.0196],[.338,.1933,.0204],[.3466,.1984,.0211],[.3552,.2035,.0219],[.3639,.2085,.0227],[.3725,.2136,.0235],[.3811,.2187,.0242],[.3897,.2238,.025],[.3983,.2288,.0258],[.4069,.2339,.0265],[.4155,.239,.0273],[.4241,.2441,.0281],[.4328,.2491,.0288],[.4414,.2542,.0296],[.45,.2593,.0304],[.4586,.2644,.0311],[.4672,.2694,.0319],[.4758,.2745,.0327],[.4844,.2796,.0334],[.493,.2847,.0342],[.5017,.2897,.035],[.5103,.2948,.0358],[.5189,.2999,.0365],[.5275,.305,.0373],[.5361,.31,.0381],[.5447,.3151,.0388],[.5529,.3213,.0419],[.5608,.3287,.0473],[.5686,.3361,.0527],[.5765,.3435,.0581],[.5843,.3509,.0634],[.5922,.3582,.0688],[.6,.3656,.0742],[.6078,.373,.0796],[.6157,.3804,.085],[.6235,.3878,.0903],[.6314,.3952,.0957],[.6392,.4025,.1011],[.6471,.4099,.1065],[.6549,.4173,.1119],[.6627,.4247,.1173],[.6706,.4321,.1226],[.6784,.4394,.128],[.6863,.4468,.1334],[.6941,.4542,.1388],[.702,.4616,.1442],[.7098,.469,.1496],[.7176,.4764,.1549],[.7255,.4837,.1603],[.7333,.4911,.1657],[.7412,.4985,.1711],[.749,.5059,.1765],[.7539,.5159,.1888],[.7589,.5259,.2011],[.7638,.5359,.2134],[.7687,.5459,.2257],[.7736,.5559,.238],[.7785,.5659,.2503],[.7835,.5759,.2626],[.7884,.5859,.2749],[.7933,.5958,.2872],[.7982,.6058,.2995],[.8032,.6158,.3118],[.8081,.6258,.3241],[.813,.6358,.3364],[.8179,.6458,.3487],[.8228,.6558,.361],[.8278,.6658,.3733],[.8327,.6758,.3856],[.8376,.6858,.3979],[.8425,.6958,.4102],[.8474,.7058,.4225],[.8524,.7158,.4348],[.8573,.7258,.4471],[.8622,.7358,.4594],[.8671,.7458,.4717],[.872,.7558,.484],[.8763,.7637,.4956],[.8798,.7696,.5063],[.8834,.7754,.5171],[.8869,.7812,.5279],[.8904,.7871,.5386],[.894,.7929,.5494],[.8975,.7988,.5602],[.901,.8046,.5709],[.9046,.8105,.5817],[.9081,.8163,.5925],[.9116,.8221,.6032],[.9152,.828,.614],[.9187,.8338,.6248],[.9223,.8397,.6355],[.9258,.8455,.6463],[.9293,.8514,.6571],[.9329,.8572,.6678],[.9364,.8631,.6786],[.9399,.8689,.6894],[.9435,.8747,.7001],[.947,.8806,.7109],[.9506,.8864,.7216],[.9541,.8923,.7324],[.9576,.8981,.7432],[.9612,.904,.7539],[.9647,.9098,.7647],[.9646,.9118,.7724],[.9644,.9138,.7801],[.9642,.9158,.7878],[.9641,.9178,.7955],[.9639,.9198,.8032],[.9638,.9218,.8108],[.9636,.9238,.8185],[.9635,.9258,.8262],[.9633,.9278,.8339],[.9632,.9298,.8416],[.963,.9318,.8493],[.9629,.9338,.857],[.9627,.9358,.8647],[.9626,.9378,.8724],[.9624,.9398,.88],[.9622,.9418,.8877],[.9621,.9438,.8954],[.9619,.9458,.9031],[.9618,.9478,.9108],[.9616,.9498,.9185],[.9615,.9518,.9262],[.9613,.9538,.9339],[.9612,.9558,.9416],[.961,.9578,.9493],[.9609,.9598,.9569],[.9572,.9599,.9596],[.9502,.9582,.9571],[.9431,.9566,.9546],[.936,.9549,.9522],[.929,.9532,.9497],[.9219,.9515,.9473],[.9148,.9498,.9448],[.9077,.9481,.9423],[.9007,.9464,.9399],[.8936,.9447,.9374],[.8865,.943,.9349],[.8794,.9413,.9325],[.8724,.9396,.93],[.8653,.9379,.9276],[.8582,.9363,.9251],[.8511,.9346,.9226],[.8441,.9329,.9202],[.837,.9312,.9177],[.8299,.9295,.9153],[.8228,.9278,.9128],[.8158,.9261,.9103],[.8087,.9244,.9079],[.8016,.9227,.9054],[.7945,.921,.903],[.7875,.9193,.9005],[.7804,.9176,.898],[.7695,.9132,.8925],[.7586,.9087,.887],[.7476,.9043,.8814],[.7367,.8998,.8759],[.7258,.8953,.8704],[.7149,.8909,.8648],[.704,.8864,.8593],[.693,.882,.8537],[.6821,.8775,.8482],[.6712,.873,.8427],[.6603,.8686,.8371],[.6494,.8641,.8316],[.6384,.8597,.8261],[.6275,.8552,.8205],[.6166,.8507,.815],[.6057,.8463,.8095],[.5948,.8418,.8039],[.5839,.8374,.7984],[.5729,.8329,.7928],[.562,.8285,.7873],[.5511,.824,.7818],[.5402,.8195,.7762],[.5293,.8151,.7707],[.5183,.8106,.7652],[.5074,.8062,.7596],[.4962,.7998,.753],[.4847,.7915,.7453],[.4731,.7832,.7376],[.4616,.7749,.73],[.4501,.7666,.7223],[.4385,.7582,.7146],[.427,.7499,.7069],[.4155,.7416,.6992],[.4039,.7333,.6915],[.3924,.725,.6838],[.3809,.7167,.6761],[.3693,.7084,.6684],[.3578,.7001,.6607],[.3463,.6918,.6531],[.3347,.6835,.6454],[.3232,.6752,.6377],[.3116,.6669,.63],[.3001,.6586,.6223],[.2886,.6503,.6146],[.277,.642,.6069],[.2655,.6337,.5992],[.254,.6254,.5915],[.2424,.6171,.5839],[.2309,.6088,.5762],[.2194,.6005,.5685],[.2078,.5922,.5608],[.1998,.5846,.5532],[.1918,.5771,.5457],[.1839,.5696,.5382],[.1759,.562,.5306],[.1679,.5545,.5231],[.1599,.5469,.5156],[.1519,.5394,.508],[.1439,.5319,.5005],[.1359,.5243,.493],[.1279,.5168,.4854],[.1199,.5093,.4779],[.1119,.5017,.4704],[.1039,.4942,.4628],[.0959,.4867,.4553],[.0879,.4791,.4478],[.0799,.4716,.4402],[.0719,.4641,.4327],[.0639,.4565,.4251],[.0559,.449,.4176],[.0479,.4414,.4101],[.0399,.4339,.4025],[.0319,.4264,.395],[.0239,.4188,.3875],[.0159,.4113,.3799],[.0079,.4038,.3724],[.0038,.3968,.3651],[.0037,.3903,.358],[.0035,.3839,.3509],[.0034,.3774,.3439],[.0032,.3709,.3368],[.0031,.3645,.3297],[.0029,.358,.3226],[.0028,.3516,.3156],[.0026,.3451,.3085],[.0025,.3386,.3014],[.0023,.3322,.2943],[.0022,.3257,.2873],[.002,.3193,.2802],[.0018,.3128,.2731],[.0017,.3063,.2661],[.0015,.2999,.259],[.0014,.2934,.2519],[.0012,.287,.2448],[.0011,.2805,.2378],[9e-4,.274,.2307],[8e-4,.2676,.2236],[6e-4,.2611,.2165],[5e-4,.2547,.2095],[3e-4,.2482,.2024],[2e-4,.2418,.1953],[0,.2353,.1882]]};ce.BuGn={interpolate:!0,colors:[[.9686,.9882,.9922],[.9664,.9874,.9917],[.9642,.9865,.9912],[.962,.9857,.9907],[.9598,.9848,.9902],[.9576,.9839,.9897],[.9553,.9831,.9892],[.9531,.9822,.9887],[.9509,.9813,.9882],[.9487,.9805,.9877],[.9465,.9796,.9872],[.9443,.9788,.9867],[.9421,.9779,.9863],[.9398,.977,.9858],[.9376,.9762,.9853],[.9354,.9753,.9848],[.9332,.9745,.9843],[.931,.9736,.9838],[.9288,.9727,.9833],[.9266,.9719,.9828],[.9243,.971,.9823],[.9221,.9701,.9818],[.9199,.9693,.9813],[.9177,.9684,.9808],[.9155,.9676,.9803],[.9133,.9667,.9799],[.911,.9658,.9794],[.9088,.965,.9789],[.9066,.9641,.9784],[.9044,.9633,.9779],[.9022,.9624,.9774],[.9,.9615,.9769],[.8977,.9606,.9762],[.8946,.9595,.9738],[.8915,.9584,.9715],[.8884,.9573,.9692],[.8854,.9562,.9668],[.8823,.9551,.9645],[.8792,.954,.9622],[.8761,.9529,.9598],[.873,.9518,.9575],[.87,.9507,.9551],[.8669,.9496,.9528],[.8638,.9485,.9505],[.8607,.9474,.9481],[.8577,.9463,.9458],[.8546,.9451,.9435],[.8515,.944,.9411],[.8484,.9429,.9388],[.8454,.9418,.9364],[.8423,.9407,.9341],[.8392,.9396,.9318],[.8361,.9385,.9294],[.8331,.9374,.9271],[.83,.9363,.9248],[.8269,.9352,.9224],[.8238,.9341,.9201],[.8208,.933,.9177],[.8177,.9319,.9154],[.8146,.9307,.9131],[.8115,.9296,.9107],[.8085,.9285,.9084],[.8054,.9274,.9061],[.8023,.9263,.9037],[.7984,.9249,.9011],[.7922,.9224,.8975],[.7859,.92,.8939],[.7796,.9175,.8904],[.7733,.915,.8868],[.7671,.9126,.8832],[.7608,.9101,.8797],[.7545,.9077,.8761],[.7482,.9052,.8725],[.742,.9027,.869],[.7357,.9003,.8654],[.7294,.8978,.8618],[.7231,.8953,.8583],[.7169,.8929,.8547],[.7106,.8904,.8511],[.7043,.888,.8476],[.698,.8855,.844],[.6918,.883,.8404],[.6855,.8806,.8368],[.6792,.8781,.8333],[.6729,.8757,.8297],[.6667,.8732,.8261],[.6604,.8707,.8226],[.6541,.8683,.819],[.6478,.8658,.8154],[.6416,.8634,.8119],[.6353,.8609,.8083],[.629,.8584,.8047],[.6227,.856,.8012],[.6165,.8535,.7976],[.6102,.8511,.794],[.6039,.8486,.7905],[.5976,.846,.7865],[.5914,.8433,.782],[.5851,.8406,.7774],[.5788,.8379,.7729],[.5725,.8352,.7683],[.5663,.8325,.7638],[.56,.8298,.7592],[.5537,.8271,.7547],[.5475,.8244,.7501],[.5412,.8217,.7456],[.5349,.819,.741],[.5286,.8163,.7365],[.5224,.8136,.7319],[.5161,.8109,.7274],[.5098,.8082,.7228],[.5035,.8054,.7182],[.4973,.8027,.7137],[.491,.8,.7091],[.4847,.7973,.7046],[.4784,.7946,.7],[.4722,.7919,.6955],[.4659,.7892,.6909],[.4596,.7865,.6864],[.4533,.7838,.6818],[.4471,.7811,.6773],[.4408,.7784,.6727],[.4345,.7757,.6682],[.4282,.773,.6636],[.422,.7703,.6591],[.4157,.7676,.6545],[.4094,.7648,.65],[.4031,.7621,.6454],[.3977,.7596,.6403],[.3932,.7571,.6346],[.3886,.7546,.629],[.3841,.7522,.6233],[.3795,.7497,.6177],[.375,.7473,.612],[.3704,.7448,.6064],[.3659,.7423,.6007],[.3613,.7399,.595],[.3568,.7374,.5894],[.3522,.7349,.5837],[.3477,.7325,.5781],[.3431,.73,.5724],[.3385,.7276,.5667],[.334,.7251,.5611],[.3294,.7226,.5554],[.3249,.7202,.5498],[.3203,.7177,.5441],[.3158,.7153,.5384],[.3112,.7128,.5328],[.3067,.7103,.5271],[.3021,.7079,.5215],[.2976,.7054,.5158],[.293,.703,.5101],[.2885,.7005,.5045],[.2839,.698,.4988],[.2794,.6956,.4932],[.2748,.6931,.4875],[.2703,.6907,.4818],[.2657,.6882,.4762],[.2612,.6857,.4705],[.2566,.6833,.4649],[.2526,.6797,.459],[.2489,.6754,.4529],[.2452,.671,.4469],[.2415,.6667,.4409],[.2378,.6624,.4349],[.2341,.6581,.4288],[.2304,.6538,.4228],[.2268,.6495,.4168],[.2231,.6452,.4107],[.2194,.6409,.4047],[.2157,.6366,.3987],[.212,.6323,.3927],[.2083,.628,.3866],[.2046,.6237,.3806],[.2009,.6194,.3746],[.1972,.6151,.3686],[.1935,.6108,.3625],[.1899,.6065,.3565],[.1862,.6022,.3505],[.1825,.5978,.3444],[.1788,.5935,.3384],[.1751,.5892,.3324],[.1714,.5849,.3264],[.1677,.5806,.3203],[.164,.5763,.3143],[.1603,.572,.3083],[.1566,.5677,.3022],[.1529,.5634,.2962],[.1493,.5591,.2902],[.1456,.5548,.2842],[.1419,.5505,.2781],[.1382,.5462,.2721],[.134,.5423,.2683],[.1297,.5386,.2652],[.1254,.5349,.2621],[.1211,.5313,.2591],[.1168,.5276,.256],[.1125,.5239,.2529],[.1082,.5202,.2498],[.1039,.5165,.2468],[.0996,.5128,.2437],[.0953,.5091,.2406],[.091,.5054,.2375],[.0867,.5017,.2344],[.0824,.498,.2314],[.078,.4943,.2283],[.0737,.4907,.2252],[.0694,.487,.2221],[.0651,.4833,.2191],[.0608,.4796,.216],[.0565,.4759,.2129],[.0522,.4722,.2098],[.0479,.4685,.2068],[.0436,.4648,.2037],[.0393,.4611,.2006],[.035,.4574,.1975],[.0307,.4537,.1945],[.0264,.4501,.1914],[.0221,.4464,.1883],[.0178,.4427,.1852],[.0135,.439,.1822],[.0092,.4353,.1791],[.0048,.4316,.176],[5e-4,.4279,.1729],[0,.423,.1707],[0,.418,.1686],[0,.4129,.1665],[0,.4079,.1644],[0,.4029,.1624],[0,.3978,.1603],[0,.3928,.1582],[0,.3877,.1561],[0,.3827,.154],[0,.3776,.1519],[0,.3726,.1498],[0,.3676,.1477],[0,.3625,.1456],[0,.3575,.1435],[0,.3524,.1414],[0,.3474,.1393],[0,.3423,.1373],[0,.3373,.1352],[0,.3322,.1331],[0,.3272,.131],[0,.3222,.1289],[0,.3171,.1268],[0,.3121,.1247],[0,.307,.1226],[0,.302,.1205],[0,.2969,.1184],[0,.2919,.1163],[0,.2868,.1142],[0,.2818,.1122],[0,.2768,.1101],[0,.2717,.108],[0,.2667,.1059]]};ce.BuPu={interpolate:!0,colors:[[.9686,.9882,.9922],[.9658,.9863,.991],[.963,.9843,.9899],[.9601,.9823,.9888],[.9573,.9804,.9877],[.9545,.9784,.9866],[.9516,.9764,.9855],[.9488,.9745,.9844],[.946,.9725,.9833],[.9432,.9705,.9822],[.9403,.9686,.9811],[.9375,.9666,.98],[.9347,.9646,.9789],[.9318,.9626,.9778],[.929,.9607,.9767],[.9262,.9587,.9755],[.9234,.9567,.9744],[.9205,.9548,.9733],[.9177,.9528,.9722],[.9149,.9508,.9711],[.912,.9489,.97],[.9092,.9469,.9689],[.9064,.9449,.9678],[.9035,.943,.9667],[.9007,.941,.9656],[.8979,.939,.9645],[.8951,.9371,.9634],[.8922,.9351,.9623],[.8894,.9331,.9612],[.8866,.9311,.96],[.8837,.9292,.9589],[.8809,.9272,.9578],[.8779,.9251,.9566],[.8739,.922,.9549],[.8698,.919,.9532],[.8657,.9159,.9515],[.8617,.9128,.9498],[.8576,.9097,.948],[.8536,.9067,.9463],[.8495,.9036,.9446],[.8454,.9005,.9429],[.8414,.8974,.9411],[.8373,.8943,.9394],[.8333,.8913,.9377],[.8292,.8882,.936],[.8251,.8851,.9343],[.8211,.882,.9325],[.817,.879,.9308],[.813,.8759,.9291],[.8089,.8728,.9274],[.8048,.8697,.9256],[.8008,.8667,.9239],[.7967,.8636,.9222],[.7927,.8605,.9205],[.7886,.8574,.9188],[.7845,.8544,.917],[.7805,.8513,.9153],[.7764,.8482,.9136],[.7724,.8451,.9119],[.7683,.8421,.9101],[.7642,.839,.9084],[.7602,.8359,.9067],[.7561,.8328,.905],[.7521,.8298,.9033],[.748,.8267,.9016],[.7439,.8239,.9001],[.7399,.8211,.8986],[.7358,.8183,.8972],[.7318,.8154,.8957],[.7277,.8126,.8942],[.7236,.8098,.8927],[.7196,.8069,.8913],[.7155,.8041,.8898],[.7115,.8013,.8883],[.7074,.7984,.8868],[.7033,.7956,.8854],[.6993,.7928,.8839],[.6952,.79,.8824],[.6912,.7871,.8809],[.6871,.7843,.8794],[.683,.7815,.878],[.679,.7786,.8765],[.6749,.7758,.875],[.6709,.773,.8735],[.6668,.7701,.8721],[.6627,.7673,.8706],[.6587,.7645,.8691],[.6546,.7617,.8676],[.6506,.7588,.8662],[.6465,.756,.8647],[.6424,.7532,.8632],[.6384,.7503,.8617],[.6343,.7475,.8603],[.6303,.7447,.8588],[.6262,.7419,.8573],[.6221,.739,.8558],[.6188,.7355,.854],[.6166,.7308,.8515],[.6143,.7262,.8491],[.6121,.7215,.8466],[.6099,.7168,.8441],[.6077,.7121,.8417],[.6055,.7075,.8392],[.6033,.7028,.8368],[.6011,.6981,.8343],[.5988,.6934,.8318],[.5966,.6888,.8294],[.5944,.6841,.8269],[.5922,.6794,.8245],[.59,.6747,.822],[.5878,.67,.8195],[.5856,.6654,.8171],[.5833,.6607,.8146],[.5811,.656,.8121],[.5789,.6513,.8097],[.5767,.6467,.8072],[.5745,.642,.8048],[.5723,.6373,.8023],[.5701,.6326,.7998],[.5678,.628,.7974],[.5656,.6233,.7949],[.5634,.6186,.7925],[.5612,.6139,.79],[.559,.6093,.7875],[.5568,.6046,.7851],[.5546,.5999,.7826],[.5523,.5952,.7802],[.5501,.5906,.7777],[.549,.5856,.7752],[.549,.5803,.7726],[.549,.575,.77],[.549,.5697,.7674],[.549,.5644,.7648],[.549,.5591,.7623],[.549,.5538,.7597],[.549,.5486,.7571],[.549,.5433,.7545],[.549,.538,.7519],[.549,.5327,.7493],[.549,.5274,.7468],[.549,.5221,.7442],[.549,.5168,.7416],[.549,.5115,.739],[.549,.5062,.7364],[.549,.5009,.7338],[.549,.4957,.7313],[.549,.4904,.7287],[.549,.4851,.7261],[.549,.4798,.7235],[.549,.4745,.7209],[.549,.4692,.7183],[.549,.4639,.7158],[.549,.4586,.7132],[.549,.4533,.7106],[.549,.448,.708],[.549,.4428,.7054],[.549,.4375,.7028],[.549,.4322,.7003],[.549,.4269,.6977],[.549,.4216,.6951],[.5487,.4164,.6926],[.5482,.4112,.6901],[.5477,.406,.6877],[.5472,.4009,.6852],[.5467,.3957,.6827],[.5463,.3905,.6803],[.5458,.3854,.6778],[.5453,.3802,.6754],[.5448,.375,.6729],[.5443,.3699,.6704],[.5438,.3647,.668],[.5433,.3595,.6655],[.5428,.3544,.6631],[.5423,.3492,.6606],[.5418,.344,.6581],[.5413,.3389,.6557],[.5408,.3337,.6532],[.5403,.3285,.6507],[.5399,.3234,.6483],[.5394,.3182,.6458],[.5389,.313,.6434],[.5384,.3079,.6409],[.5379,.3027,.6384],[.5374,.2975,.636],[.5369,.2924,.6335],[.5364,.2872,.6311],[.5359,.282,.6286],[.5354,.2769,.6261],[.5349,.2717,.6237],[.5344,.2665,.6212],[.5339,.2614,.6188],[.5335,.2562,.6163],[.5327,.2503,.6126],[.5318,.2441,.6086],[.531,.238,.6045],[.5301,.2318,.6005],[.5292,.2257,.5964],[.5284,.2195,.5923],[.5275,.2134,.5883],[.5267,.2072,.5842],[.5258,.2011,.5802],[.5249,.1949,.5761],[.5241,.1888,.572],[.5232,.1826,.568],[.5224,.1765,.5639],[.5215,.1703,.5599],[.5206,.1642,.5558],[.5198,.158,.5517],[.5189,.1519,.5477],[.518,.1457,.5436],[.5172,.1396,.5396],[.5163,.1334,.5355],[.5155,.1273,.5314],[.5146,.1211,.5274],[.5137,.115,.5233],[.5129,.1088,.5193],[.512,.1027,.5152],[.5112,.0965,.5111],[.5103,.0903,.5071],[.5094,.0842,.503],[.5086,.078,.499],[.5077,.0719,.4949],[.5069,.0657,.4908],[.506,.0596,.4868],[.5003,.0572,.481],[.4939,.0554,.475],[.4875,.0535,.4689],[.4811,.0517,.4629],[.4747,.0498,.4569],[.4683,.048,.4509],[.4619,.0461,.4448],[.4555,.0443,.4388],[.4491,.0424,.4328],[.4427,.0406,.4267],[.4363,.0388,.4207],[.4299,.0369,.4147],[.4235,.0351,.4087],[.4171,.0332,.4026],[.4107,.0314,.3966],[.4043,.0295,.3906],[.3979,.0277,.3845],[.3915,.0258,.3785],[.3851,.024,.3725],[.3787,.0221,.3665],[.3723,.0203,.3604],[.3659,.0185,.3544],[.3595,.0166,.3484],[.3531,.0148,.3423],[.3467,.0129,.3363],[.3403,.0111,.3303],[.3339,.0092,.3243],[.3276,.0074,.3182],[.3212,.0055,.3122],[.3148,.0037,.3062],[.3084,.0018,.3001],[.302,0,.2941]]};ce.CMRmap={interpolate:!0,colors:[[0,0,0],[.0047,.0047,.0157],[.0094,.0094,.0314],[.0141,.0141,.0471],[.0188,.0188,.0627],[.0235,.0235,.0784],[.0282,.0282,.0941],[.0329,.0329,.1098],[.0376,.0376,.1255],[.0424,.0424,.1412],[.0471,.0471,.1569],[.0518,.0518,.1725],[.0565,.0565,.1882],[.0612,.0612,.2039],[.0659,.0659,.2196],[.0706,.0706,.2353],[.0753,.0753,.251],[.08,.08,.2667],[.0847,.0847,.2824],[.0894,.0894,.298],[.0941,.0941,.3137],[.0988,.0988,.3294],[.1035,.1035,.3451],[.1082,.1082,.3608],[.1129,.1129,.3765],[.1176,.1176,.3922],[.1224,.1224,.4078],[.1271,.1271,.4235],[.1318,.1318,.4392],[.1365,.1365,.4549],[.1412,.1412,.4706],[.1459,.1459,.4863],[.1506,.15,.501],[.1553,.15,.5088],[.16,.15,.5167],[.1647,.15,.5245],[.1694,.15,.5324],[.1741,.15,.5402],[.1788,.15,.548],[.1835,.15,.5559],[.1882,.15,.5637],[.1929,.15,.5716],[.1976,.15,.5794],[.2024,.15,.5873],[.2071,.15,.5951],[.2118,.15,.6029],[.2165,.15,.6108],[.2212,.15,.6186],[.2259,.15,.6265],[.2306,.15,.6343],[.2353,.15,.6422],[.24,.15,.65],[.2447,.15,.6578],[.2494,.15,.6657],[.2541,.15,.6735],[.2588,.15,.6814],[.2635,.15,.6892],[.2682,.15,.6971],[.2729,.15,.7049],[.2776,.15,.7127],[.2824,.15,.7206],[.2871,.15,.7284],[.2918,.15,.7363],[.2965,.15,.7441],[.3024,.1504,.748],[.3118,.152,.7402],[.3212,.1535,.7324],[.3306,.1551,.7245],[.34,.1567,.7167],[.3494,.1582,.7088],[.3588,.1598,.701],[.3682,.1614,.6931],[.3776,.1629,.6853],[.3871,.1645,.6775],[.3965,.1661,.6696],[.4059,.1676,.6618],[.4153,.1692,.6539],[.4247,.1708,.6461],[.4341,.1724,.6382],[.4435,.1739,.6304],[.4529,.1755,.6225],[.4624,.1771,.6147],[.4718,.1786,.6069],[.4812,.1802,.599],[.4906,.1818,.5912],[.5,.1833,.5833],[.5094,.1849,.5755],[.5188,.1865,.5676],[.5282,.188,.5598],[.5376,.1896,.552],[.5471,.1912,.5441],[.5565,.1927,.5363],[.5659,.1943,.5284],[.5753,.1959,.5206],[.5847,.1975,.5127],[.5941,.199,.5049],[.6047,.2006,.4959],[.6173,.2022,.4849],[.6298,.2037,.4739],[.6424,.2053,.4629],[.6549,.2069,.452],[.6675,.2084,.441],[.68,.21,.43],[.6925,.2116,.419],[.7051,.2131,.408],[.7176,.2147,.3971],[.7302,.2163,.3861],[.7427,.2178,.3751],[.7553,.2194,.3641],[.7678,.221,.3531],[.7804,.2225,.3422],[.7929,.2241,.3312],[.8055,.2257,.3202],[.818,.2273,.3092],[.8306,.2288,.2982],[.8431,.2304,.2873],[.8557,.232,.2763],[.8682,.2335,.2653],[.8808,.2351,.2543],[.8933,.2367,.2433],[.9059,.2382,.2324],[.9184,.2398,.2214],[.931,.2414,.2104],[.9435,.2429,.1994],[.9561,.2445,.1884],[.9686,.2461,.1775],[.9812,.2476,.1665],[.9937,.2492,.1555],[.9984,.2539,.1476],[.9953,.2618,.1429],[.9922,.2696,.1382],[.989,.2775,.1335],[.9859,.2853,.1288],[.9827,.2931,.1241],[.9796,.301,.1194],[.9765,.3088,.1147],[.9733,.3167,.11],[.9702,.3245,.1053],[.9671,.3324,.1006],[.9639,.3402,.0959],[.9608,.348,.0912],[.9576,.3559,.0865],[.9545,.3637,.0818],[.9514,.3716,.0771],[.9482,.3794,.0724],[.9451,.3873,.0676],[.942,.3951,.0629],[.9388,.4029,.0582],[.9357,.4108,.0535],[.9325,.4186,.0488],[.9294,.4265,.0441],[.9263,.4343,.0394],[.9231,.4422,.0347],[.92,.45,.03],[.9169,.4578,.0253],[.9137,.4657,.0206],[.9106,.4735,.0159],[.9075,.4814,.0112],[.9043,.4892,.0065],[.9012,.4971,.0018],[.9,.5049,.002],[.9,.5127,.0051],[.9,.5206,.0082],[.9,.5284,.0114],[.9,.5363,.0145],[.9,.5441,.0176],[.9,.552,.0208],[.9,.5598,.0239],[.9,.5676,.0271],[.9,.5755,.0302],[.9,.5833,.0333],[.9,.5912,.0365],[.9,.599,.0396],[.9,.6069,.0427],[.9,.6147,.0459],[.9,.6225,.049],[.9,.6304,.0522],[.9,.6382,.0553],[.9,.6461,.0584],[.9,.6539,.0616],[.9,.6618,.0647],[.9,.6696,.0678],[.9,.6775,.071],[.9,.6853,.0741],[.9,.6931,.0773],[.9,.701,.0804],[.9,.7088,.0835],[.9,.7167,.0867],[.9,.7245,.0898],[.9,.7324,.0929],[.9,.7402,.0961],[.9,.748,.0992],[.9,.7535,.1094],[.9,.7582,.122],[.9,.7629,.1345],[.9,.7676,.1471],[.9,.7724,.1596],[.9,.7771,.1722],[.9,.7818,.1847],[.9,.7865,.1973],[.9,.7912,.2098],[.9,.7959,.2224],[.9,.8006,.2349],[.9,.8053,.2475],[.9,.81,.26],[.9,.8147,.2725],[.9,.8194,.2851],[.9,.8241,.2976],[.9,.8288,.3102],[.9,.8335,.3227],[.9,.8382,.3353],[.9,.8429,.3478],[.9,.8476,.3604],[.9,.8524,.3729],[.9,.8571,.3855],[.9,.8618,.398],[.9,.8665,.4106],[.9,.8712,.4231],[.9,.8759,.4357],[.9,.8806,.4482],[.9,.8853,.4608],[.9,.89,.4733],[.9,.8947,.4859],[.9,.8994,.4984],[.9027,.9027,.5137],[.9059,.9059,.5294],[.909,.909,.5451],[.9122,.9122,.5608],[.9153,.9153,.5765],[.9184,.9184,.5922],[.9216,.9216,.6078],[.9247,.9247,.6235],[.9278,.9278,.6392],[.931,.931,.6549],[.9341,.9341,.6706],[.9373,.9373,.6863],[.9404,.9404,.702],[.9435,.9435,.7176],[.9467,.9467,.7333],[.9498,.9498,.749],[.9529,.9529,.7647],[.9561,.9561,.7804],[.9592,.9592,.7961],[.9624,.9624,.8118],[.9655,.9655,.8275],[.9686,.9686,.8431],[.9718,.9718,.8588],[.9749,.9749,.8745],[.978,.978,.8902],[.9812,.9812,.9059],[.9843,.9843,.9216],[.9875,.9875,.9373],[.9906,.9906,.9529],[.9937,.9937,.9686],[.9969,.9969,.9843],[1,1,1]]};ce.Dark2={interpolate:!1,colors:[[.1059,.6196,.4667],[.851,.3725,.0078],[.4588,.4392,.702],[.9059,.1608,.5412],[.4,.651,.1176],[.902,.6706,.0078],[.651,.4627,.1137],[.4,.4,.4]]};ce.GnBu={interpolate:!0,colors:[[.9686,.9882,.9412],[.9658,.9871,.9386],[.963,.986,.936],[.9601,.9849,.9334],[.9573,.9838,.9308],[.9545,.9827,.9283],[.9516,.9816,.9257],[.9488,.9805,.9231],[.946,.9794,.9205],[.9432,.9783,.9179],[.9403,.9772,.9153],[.9375,.9761,.9128],[.9347,.9749,.9102],[.9318,.9738,.9076],[.929,.9727,.905],[.9262,.9716,.9024],[.9234,.9705,.8998],[.9205,.9694,.8973],[.9177,.9683,.8947],[.9149,.9672,.8921],[.912,.9661,.8895],[.9092,.965,.8869],[.9064,.9639,.8843],[.9035,.9628,.8818],[.9007,.9617,.8792],[.8979,.9606,.8766],[.8951,.9594,.874],[.8922,.9583,.8714],[.8894,.9572,.8688],[.8866,.9561,.8663],[.8837,.955,.8637],[.8809,.9539,.8611],[.8781,.9528,.8585],[.8757,.9518,.8558],[.8732,.9508,.8531],[.8707,.9499,.8504],[.8683,.9489,.8477],[.8658,.9479,.845],[.8634,.9469,.8422],[.8609,.9459,.8395],[.8584,.9449,.8368],[.856,.944,.8341],[.8535,.943,.8314],[.8511,.942,.8287],[.8486,.941,.826],[.8461,.94,.8233],[.8437,.939,.8206],[.8412,.9381,.8179],[.8388,.9371,.8152],[.8363,.9361,.8125],[.8338,.9351,.8098],[.8314,.9341,.8071],[.8289,.9331,.8044],[.8265,.9321,.8016],[.824,.9312,.7989],[.8215,.9302,.7962],[.8191,.9292,.7935],[.8166,.9282,.7908],[.8141,.9272,.7881],[.8117,.9262,.7854],[.8092,.9253,.7827],[.8068,.9243,.78],[.8043,.9233,.7773],[.8018,.9223,.7746],[.7989,.9211,.7721],[.7945,.9194,.7701],[.79,.9177,.7681],[.7856,.916,.7662],[.7812,.9142,.7642],[.7767,.9125,.7622],[.7723,.9108,.7602],[.7679,.9091,.7583],[.7635,.9074,.7563],[.759,.9056,.7543],[.7546,.9039,.7524],[.7502,.9022,.7504],[.7457,.9005,.7484],[.7413,.8987,.7465],[.7369,.897,.7445],[.7325,.8953,.7425],[.728,.8936,.7406],[.7236,.8919,.7386],[.7192,.8901,.7366],[.7147,.8884,.7347],[.7103,.8867,.7327],[.7059,.885,.7307],[.7015,.8832,.7288],[.697,.8815,.7268],[.6926,.8798,.7248],[.6882,.8781,.7228],[.6837,.8764,.7209],[.6793,.8746,.7189],[.6749,.8729,.7169],[.6704,.8712,.715],[.666,.8695,.713],[.6616,.8677,.711],[.6567,.8659,.7105],[.6512,.8638,.7123],[.6457,.8617,.7142],[.6401,.8596,.716],[.6346,.8575,.7179],[.6291,.8554,.7197],[.6235,.8533,.7216],[.618,.8512,.7234],[.6125,.8492,.7253],[.6069,.8471,.7271],[.6014,.845,.729],[.5958,.8429,.7308],[.5903,.8408,.7326],[.5848,.8387,.7345],[.5792,.8366,.7363],[.5737,.8345,.7382],[.5682,.8324,.74],[.5626,.8303,.7419],[.5571,.8282,.7437],[.5516,.8261,.7456],[.546,.8241,.7474],[.5405,.822,.7493],[.5349,.8199,.7511],[.5294,.8178,.7529],[.5239,.8157,.7548],[.5183,.8136,.7566],[.5128,.8115,.7585],[.5073,.8094,.7603],[.5017,.8073,.7622],[.4962,.8052,.764],[.4907,.8031,.7659],[.4851,.801,.7677],[.4796,.7985,.7696],[.474,.7954,.7714],[.4685,.7923,.7732],[.463,.7892,.7751],[.4574,.7862,.7769],[.4519,.7831,.7788],[.4464,.78,.7806],[.4408,.7769,.7825],[.4353,.7739,.7843],[.4298,.7708,.7862],[.4242,.7677,.788],[.4187,.7646,.7899],[.4131,.7616,.7917],[.4076,.7585,.7935],[.4021,.7554,.7954],[.3965,.7523,.7972],[.391,.7493,.7991],[.3855,.7462,.8009],[.3799,.7431,.8028],[.3744,.74,.8046],[.3689,.7369,.8065],[.3633,.7339,.8083],[.3578,.7308,.8101],[.3522,.7277,.812],[.3467,.7246,.8138],[.3412,.7216,.8157],[.3356,.7185,.8175],[.3301,.7154,.8194],[.3246,.7123,.8212],[.319,.7093,.8231],[.3135,.7062,.8249],[.308,.7031,.8268],[.3032,.699,.8258],[.2989,.6942,.8233],[.2946,.6894,.8207],[.2903,.6846,.8181],[.286,.6798,.8155],[.2817,.675,.8129],[.2774,.6702,.8103],[.273,.6654,.8078],[.2687,.6606,.8052],[.2644,.6558,.8026],[.2601,.651,.8],[.2558,.6462,.7974],[.2515,.6414,.7948],[.2472,.6366,.7922],[.2429,.6318,.7897],[.2386,.627,.7871],[.2343,.6222,.7845],[.23,.6174,.7819],[.2257,.6126,.7793],[.2214,.6078,.7767],[.2171,.603,.7742],[.2128,.5982,.7716],[.2085,.5934,.769],[.2042,.5886,.7664],[.1998,.5838,.7638],[.1955,.579,.7612],[.1912,.5742,.7587],[.1869,.5694,.7561],[.1826,.5646,.7535],[.1783,.5598,.7509],[.174,.555,.7483],[.1697,.5502,.7457],[.1654,.5457,.7434],[.1611,.5413,.7412],[.1568,.5368,.739],[.1525,.5324,.7368],[.1482,.528,.7346],[.1439,.5236,.7324],[.1396,.5191,.7301],[.1353,.5147,.7279],[.1309,.5103,.7257],[.1266,.5058,.7235],[.1223,.5014,.7213],[.118,.497,.7191],[.1137,.4925,.7169],[.1094,.4881,.7146],[.1051,.4837,.7124],[.1008,.4793,.7102],[.0965,.4748,.708],[.0922,.4704,.7058],[.0879,.466,.7036],[.0836,.4615,.7014],[.0793,.4571,.6991],[.075,.4527,.6969],[.0707,.4483,.6947],[.0664,.4438,.6925],[.0621,.4394,.6903],[.0577,.435,.6881],[.0534,.4305,.6859],[.0491,.4261,.6836],[.0448,.4217,.6814],[.0405,.4173,.6792],[.0362,.4128,.677],[.0319,.4084,.6748],[.0314,.4035,.6699],[.0314,.3986,.6646],[.0314,.3937,.6593],[.0314,.3888,.654],[.0314,.3839,.6487],[.0314,.3789,.6434],[.0314,.374,.6381],[.0314,.3691,.6328],[.0314,.3642,.6276],[.0314,.3592,.6223],[.0314,.3543,.617],[.0314,.3494,.6117],[.0314,.3445,.6064],[.0314,.3396,.6011],[.0314,.3346,.5958],[.0314,.3297,.5905],[.0314,.3248,.5852],[.0314,.3199,.5799],[.0314,.315,.5747],[.0314,.31,.5694],[.0314,.3051,.5641],[.0314,.3002,.5588],[.0314,.2953,.5535],[.0314,.2903,.5482],[.0314,.2854,.5429],[.0314,.2805,.5376],[.0314,.2756,.5323],[.0314,.2707,.527],[.0314,.2657,.5218],[.0314,.2608,.5165],[.0314,.2559,.5112],[.0314,.251,.5059]]};ce.Greens={interpolate:!0,colors:[[.9686,.9882,.9608],[.9664,.9874,.9582],[.9642,.9865,.9556],[.962,.9857,.953],[.9598,.9848,.9504],[.9576,.9839,.9479],[.9553,.9831,.9453],[.9531,.9822,.9427],[.9509,.9813,.9401],[.9487,.9805,.9375],[.9465,.9796,.9349],[.9443,.9788,.9324],[.9421,.9779,.9298],[.9398,.977,.9272],[.9376,.9762,.9246],[.9354,.9753,.922],[.9332,.9745,.9194],[.931,.9736,.9169],[.9288,.9727,.9143],[.9266,.9719,.9117],[.9243,.971,.9091],[.9221,.9701,.9065],[.9199,.9693,.9039],[.9177,.9684,.9014],[.9155,.9676,.8988],[.9133,.9667,.8962],[.911,.9658,.8936],[.9088,.965,.891],[.9066,.9641,.8884],[.9044,.9633,.8859],[.9022,.9624,.8833],[.9,.9615,.8807],[.8976,.9606,.8779],[.8939,.9591,.874],[.8902,.9576,.8701],[.8865,.9562,.8661],[.8828,.9547,.8622],[.8791,.9532,.8583],[.8754,.9517,.8543],[.8717,.9503,.8504],[.8681,.9488,.8464],[.8644,.9473,.8425],[.8607,.9458,.8386],[.857,.9444,.8346],[.8533,.9429,.8307],[.8496,.9414,.8268],[.8459,.9399,.8228],[.8422,.9385,.8189],[.8385,.937,.8149],[.8348,.9355,.811],[.8311,.934,.8071],[.8275,.9325,.8031],[.8238,.9311,.7992],[.8201,.9296,.7953],[.8164,.9281,.7913],[.8127,.9266,.7874],[.809,.9252,.7835],[.8053,.9237,.7795],[.8016,.9222,.7756],[.7979,.9207,.7716],[.7942,.9193,.7677],[.7905,.9178,.7638],[.7869,.9163,.7598],[.7832,.9148,.7559],[.7792,.9132,.7518],[.7745,.9113,.7473],[.7699,.9093,.7427],[.7652,.9073,.7381],[.7605,.9054,.7336],[.7558,.9034,.729],[.7512,.9014,.7245],[.7465,.8995,.7199],[.7418,.8975,.7154],[.7371,.8955,.7108],[.7325,.8935,.7063],[.7278,.8916,.7017],[.7231,.8896,.6972],[.7184,.8876,.6926],[.7138,.8857,.6881],[.7091,.8837,.6835],[.7044,.8817,.679],[.6997,.8798,.6744],[.6951,.8778,.6699],[.6904,.8758,.6653],[.6857,.8739,.6608],[.681,.8719,.6562],[.6764,.8699,.6517],[.6717,.868,.6471],[.667,.866,.6426],[.6623,.864,.638],[.6577,.8621,.6334],[.653,.8601,.6289],[.6483,.8581,.6243],[.6436,.8561,.6198],[.639,.8542,.6152],[.6343,.8522,.6107],[.6293,.85,.6061],[.6238,.8474,.6016],[.6182,.8448,.597],[.6127,.8423,.5925],[.6072,.8397,.5879],[.6016,.8371,.5834],[.5961,.8345,.5788],[.5905,.8319,.5743],[.585,.8293,.5697],[.5795,.8268,.5652],[.5739,.8242,.5606],[.5684,.8216,.5561],[.5629,.819,.5515],[.5573,.8164,.547],[.5518,.8138,.5424],[.5463,.8113,.5379],[.5407,.8087,.5333],[.5352,.8061,.5288],[.5296,.8035,.5242],[.5241,.8009,.5196],[.5186,.7983,.5151],[.513,.7958,.5105],[.5075,.7932,.506],[.502,.7906,.5014],[.4964,.788,.4969],[.4909,.7854,.4923],[.4854,.7828,.4878],[.4798,.7803,.4832],[.4743,.7777,.4787],[.4687,.7751,.4741],[.4632,.7725,.4696],[.4577,.7699,.465],[.4518,.7671,.4612],[.4455,.764,.4581],[.4392,.7609,.4551],[.4329,.7579,.452],[.4267,.7548,.4489],[.4204,.7517,.4458],[.4141,.7486,.4428],[.4078,.7456,.4397],[.4016,.7425,.4366],[.3953,.7394,.4335],[.389,.7363,.4304],[.3827,.7333,.4274],[.3765,.7302,.4243],[.3702,.7271,.4212],[.3639,.724,.4181],[.3576,.721,.4151],[.3514,.7179,.412],[.3451,.7148,.4089],[.3388,.7117,.4058],[.3325,.7087,.4028],[.3263,.7056,.3997],[.32,.7025,.3966],[.3137,.6994,.3935],[.3075,.6963,.3905],[.3012,.6933,.3874],[.2949,.6902,.3843],[.2886,.6871,.3812],[.2824,.684,.3782],[.2761,.681,.3751],[.2698,.6779,.372],[.2635,.6748,.3689],[.2573,.6717,.3659],[.2526,.6681,.3629],[.2489,.6642,.3599],[.2452,.6603,.357],[.2415,.6563,.354],[.2378,.6524,.351],[.2341,.6484,.3481],[.2304,.6445,.3451],[.2268,.6406,.3422],[.2231,.6366,.3392],[.2194,.6327,.3363],[.2157,.6288,.3333],[.212,.6248,.3304],[.2083,.6209,.3274],[.2046,.6169,.3245],[.2009,.613,.3215],[.1972,.6091,.3186],[.1935,.6051,.3156],[.1899,.6012,.3127],[.1862,.5973,.3097],[.1825,.5933,.3068],[.1788,.5894,.3038],[.1751,.5855,.3009],[.1714,.5815,.2979],[.1677,.5776,.2949],[.164,.5736,.292],[.1603,.5697,.289],[.1566,.5658,.2861],[.1529,.5618,.2831],[.1493,.5579,.2802],[.1456,.554,.2772],[.1419,.55,.2743],[.1382,.5461,.2713],[.134,.5423,.2683],[.1297,.5386,.2652],[.1254,.5349,.2621],[.1211,.5313,.2591],[.1168,.5276,.256],[.1125,.5239,.2529],[.1082,.5202,.2498],[.1039,.5165,.2468],[.0996,.5128,.2437],[.0953,.5091,.2406],[.091,.5054,.2375],[.0867,.5017,.2344],[.0824,.498,.2314],[.078,.4943,.2283],[.0737,.4907,.2252],[.0694,.487,.2221],[.0651,.4833,.2191],[.0608,.4796,.216],[.0565,.4759,.2129],[.0522,.4722,.2098],[.0479,.4685,.2068],[.0436,.4648,.2037],[.0393,.4611,.2006],[.035,.4574,.1975],[.0307,.4537,.1945],[.0264,.4501,.1914],[.0221,.4464,.1883],[.0178,.4427,.1852],[.0135,.439,.1822],[.0092,.4353,.1791],[.0048,.4316,.176],[5e-4,.4279,.1729],[0,.423,.1707],[0,.418,.1686],[0,.4129,.1665],[0,.4079,.1644],[0,.4029,.1624],[0,.3978,.1603],[0,.3928,.1582],[0,.3877,.1561],[0,.3827,.154],[0,.3776,.1519],[0,.3726,.1498],[0,.3676,.1477],[0,.3625,.1456],[0,.3575,.1435],[0,.3524,.1414],[0,.3474,.1393],[0,.3423,.1373],[0,.3373,.1352],[0,.3322,.1331],[0,.3272,.131],[0,.3222,.1289],[0,.3171,.1268],[0,.3121,.1247],[0,.307,.1226],[0,.302,.1205],[0,.2969,.1184],[0,.2919,.1163],[0,.2868,.1142],[0,.2818,.1122],[0,.2768,.1101],[0,.2717,.108],[0,.2667,.1059]]};ce.Greys={interpolate:!0,colors:[[1,1,1],[.9982,.9982,.9982],[.9963,.9963,.9963],[.9945,.9945,.9945],[.9926,.9926,.9926],[.9908,.9908,.9908],[.9889,.9889,.9889],[.9871,.9871,.9871],[.9852,.9852,.9852],[.9834,.9834,.9834],[.9815,.9815,.9815],[.9797,.9797,.9797],[.9779,.9779,.9779],[.976,.976,.976],[.9742,.9742,.9742],[.9723,.9723,.9723],[.9705,.9705,.9705],[.9686,.9686,.9686],[.9668,.9668,.9668],[.9649,.9649,.9649],[.9631,.9631,.9631],[.9612,.9612,.9612],[.9594,.9594,.9594],[.9576,.9576,.9576],[.9557,.9557,.9557],[.9539,.9539,.9539],[.952,.952,.952],[.9502,.9502,.9502],[.9483,.9483,.9483],[.9465,.9465,.9465],[.9446,.9446,.9446],[.9428,.9428,.9428],[.9408,.9408,.9408],[.938,.938,.938],[.9352,.9352,.9352],[.9323,.9323,.9323],[.9295,.9295,.9295],[.9267,.9267,.9267],[.9238,.9238,.9238],[.921,.921,.921],[.9182,.9182,.9182],[.9154,.9154,.9154],[.9125,.9125,.9125],[.9097,.9097,.9097],[.9069,.9069,.9069],[.904,.904,.904],[.9012,.9012,.9012],[.8984,.8984,.8984],[.8955,.8955,.8955],[.8927,.8927,.8927],[.8899,.8899,.8899],[.8871,.8871,.8871],[.8842,.8842,.8842],[.8814,.8814,.8814],[.8786,.8786,.8786],[.8757,.8757,.8757],[.8729,.8729,.8729],[.8701,.8701,.8701],[.8673,.8673,.8673],[.8644,.8644,.8644],[.8616,.8616,.8616],[.8588,.8588,.8588],[.8559,.8559,.8559],[.8531,.8531,.8531],[.8501,.8501,.8501],[.8467,.8467,.8467],[.8432,.8432,.8432],[.8398,.8398,.8398],[.8363,.8363,.8363],[.8329,.8329,.8329],[.8295,.8295,.8295],[.826,.826,.826],[.8226,.8226,.8226],[.8191,.8191,.8191],[.8157,.8157,.8157],[.8122,.8122,.8122],[.8088,.8088,.8088],[.8053,.8053,.8053],[.8019,.8019,.8019],[.7984,.7984,.7984],[.795,.795,.795],[.7916,.7916,.7916],[.7881,.7881,.7881],[.7847,.7847,.7847],[.7812,.7812,.7812],[.7778,.7778,.7778],[.7743,.7743,.7743],[.7709,.7709,.7709],[.7674,.7674,.7674],[.764,.764,.764],[.7606,.7606,.7606],[.7571,.7571,.7571],[.7537,.7537,.7537],[.7502,.7502,.7502],[.7468,.7468,.7468],[.7433,.7433,.7433],[.7394,.7394,.7394],[.7346,.7346,.7346],[.7298,.7298,.7298],[.725,.725,.725],[.7202,.7202,.7202],[.7154,.7154,.7154],[.7106,.7106,.7106],[.7058,.7058,.7058],[.701,.701,.701],[.6962,.6962,.6962],[.6914,.6914,.6914],[.6866,.6866,.6866],[.6818,.6818,.6818],[.677,.677,.677],[.6722,.6722,.6722],[.6674,.6674,.6674],[.6626,.6626,.6626],[.6578,.6578,.6578],[.653,.653,.653],[.6482,.6482,.6482],[.6434,.6434,.6434],[.6386,.6386,.6386],[.6338,.6338,.6338],[.629,.629,.629],[.6242,.6242,.6242],[.6194,.6194,.6194],[.6146,.6146,.6146],[.6098,.6098,.6098],[.605,.605,.605],[.6002,.6002,.6002],[.5954,.5954,.5954],[.5906,.5906,.5906],[.5861,.5861,.5861],[.5818,.5818,.5818],[.5775,.5775,.5775],[.5732,.5732,.5732],[.5689,.5689,.5689],[.5646,.5646,.5646],[.5602,.5602,.5602],[.5559,.5559,.5559],[.5516,.5516,.5516],[.5473,.5473,.5473],[.543,.543,.543],[.5387,.5387,.5387],[.5344,.5344,.5344],[.5301,.5301,.5301],[.5258,.5258,.5258],[.5215,.5215,.5215],[.5172,.5172,.5172],[.5129,.5129,.5129],[.5086,.5086,.5086],[.5043,.5043,.5043],[.5,.5,.5],[.4957,.4957,.4957],[.4913,.4913,.4913],[.487,.487,.487],[.4827,.4827,.4827],[.4784,.4784,.4784],[.4741,.4741,.4741],[.4698,.4698,.4698],[.4655,.4655,.4655],[.4612,.4612,.4612],[.4569,.4569,.4569],[.4526,.4526,.4526],[.4484,.4484,.4484],[.4444,.4444,.4444],[.4403,.4403,.4403],[.4363,.4363,.4363],[.4322,.4322,.4322],[.4281,.4281,.4281],[.4241,.4241,.4241],[.42,.42,.42],[.416,.416,.416],[.4119,.4119,.4119],[.4078,.4078,.4078],[.4038,.4038,.4038],[.3997,.3997,.3997],[.3957,.3957,.3957],[.3916,.3916,.3916],[.3875,.3875,.3875],[.3835,.3835,.3835],[.3794,.3794,.3794],[.3754,.3754,.3754],[.3713,.3713,.3713],[.3672,.3672,.3672],[.3632,.3632,.3632],[.3591,.3591,.3591],[.3551,.3551,.3551],[.351,.351,.351],[.3469,.3469,.3469],[.3429,.3429,.3429],[.3388,.3388,.3388],[.3348,.3348,.3348],[.3307,.3307,.3307],[.3266,.3266,.3266],[.3226,.3226,.3226],[.3174,.3174,.3174],[.3119,.3119,.3119],[.3063,.3063,.3063],[.3008,.3008,.3008],[.2953,.2953,.2953],[.2897,.2897,.2897],[.2842,.2842,.2842],[.2787,.2787,.2787],[.2731,.2731,.2731],[.2676,.2676,.2676],[.2621,.2621,.2621],[.2565,.2565,.2565],[.251,.251,.251],[.2454,.2454,.2454],[.2399,.2399,.2399],[.2344,.2344,.2344],[.2288,.2288,.2288],[.2233,.2233,.2233],[.2178,.2178,.2178],[.2122,.2122,.2122],[.2067,.2067,.2067],[.2012,.2012,.2012],[.1956,.1956,.1956],[.1901,.1901,.1901],[.1845,.1845,.1845],[.179,.179,.179],[.1735,.1735,.1735],[.1679,.1679,.1679],[.1624,.1624,.1624],[.1569,.1569,.1569],[.1513,.1513,.1513],[.1458,.1458,.1458],[.1411,.1411,.1411],[.1366,.1366,.1366],[.132,.132,.132],[.1275,.1275,.1275],[.1229,.1229,.1229],[.1184,.1184,.1184],[.1138,.1138,.1138],[.1093,.1093,.1093],[.1047,.1047,.1047],[.1001,.1001,.1001],[.0956,.0956,.0956],[.091,.091,.091],[.0865,.0865,.0865],[.0819,.0819,.0819],[.0774,.0774,.0774],[.0728,.0728,.0728],[.0683,.0683,.0683],[.0637,.0637,.0637],[.0592,.0592,.0592],[.0546,.0546,.0546],[.0501,.0501,.0501],[.0455,.0455,.0455],[.041,.041,.041],[.0364,.0364,.0364],[.0319,.0319,.0319],[.0273,.0273,.0273],[.0228,.0228,.0228],[.0182,.0182,.0182],[.0137,.0137,.0137],[.0091,.0091,.0091],[.0046,.0046,.0046],[0,0,0]]};ce.OrRd={interpolate:!0,colors:[[1,.9686,.9255],[.9999,.9668,.9211],[.9998,.9649,.9166],[.9996,.9631,.9122],[.9995,.9612,.9078],[.9994,.9594,.9033],[.9993,.9576,.8989],[.9991,.9557,.8945],[.999,.9539,.8901],[.9989,.952,.8856],[.9988,.9502,.8812],[.9986,.9483,.8768],[.9985,.9465,.8723],[.9984,.9446,.8679],[.9983,.9428,.8635],[.9982,.9409,.8591],[.998,.9391,.8546],[.9979,.9373,.8502],[.9978,.9354,.8458],[.9977,.9336,.8413],[.9975,.9317,.8369],[.9974,.9299,.8325],[.9973,.928,.8281],[.9972,.9262,.8236],[.997,.9243,.8192],[.9969,.9225,.8148],[.9968,.9206,.8103],[.9967,.9188,.8059],[.9966,.917,.8015],[.9964,.9151,.797],[.9963,.9133,.7926],[.9962,.9114,.7882],[.9961,.9095,.7837],[.9959,.907,.7785],[.9958,.9046,.7733],[.9957,.9021,.7682],[.9956,.8997,.763],[.9954,.8972,.7578],[.9953,.8947,.7527],[.9952,.8923,.7475],[.9951,.8898,.7423],[.995,.8874,.7372],[.9948,.8849,.732],[.9947,.8824,.7268],[.9946,.88,.7217],[.9945,.8775,.7165],[.9943,.875,.7113],[.9942,.8726,.7062],[.9941,.8701,.701],[.994,.8677,.6958],[.9938,.8652,.6907],[.9937,.8627,.6855],[.9936,.8603,.6803],[.9935,.8578,.6752],[.9934,.8554,.67],[.9932,.8529,.6648],[.9931,.8504,.6597],[.993,.848,.6545],[.9929,.8455,.6493],[.9927,.8431,.6442],[.9926,.8406,.639],[.9925,.8381,.6338],[.9924,.8357,.6287],[.9922,.8332,.6235],[.9922,.8306,.6188],[.9922,.8275,.6156],[.9922,.8245,.6124],[.9922,.8214,.6092],[.9922,.8183,.606],[.9922,.8152,.6028],[.9922,.8121,.5996],[.9922,.8091,.5964],[.9922,.806,.5932],[.9922,.8029,.59],[.9922,.7998,.5868],[.9922,.7968,.5836],[.9922,.7937,.5804],[.9922,.7906,.5772],[.9922,.7875,.574],[.9922,.7845,.5708],[.9922,.7814,.5676],[.9922,.7783,.5644],[.9922,.7752,.5612],[.9922,.7722,.558],[.9922,.7691,.5548],[.9922,.766,.5516],[.9922,.7629,.5484],[.9922,.7599,.5452],[.9922,.7568,.542],[.9922,.7537,.5388],[.9922,.7506,.5356],[.9922,.7476,.5324],[.9922,.7445,.5292],[.9922,.7414,.526],[.9922,.7383,.5228],[.9922,.7353,.5196],[.9921,.7312,.5157],[.992,.7256,.5104],[.9919,.7199,.5051],[.9917,.7142,.4998],[.9916,.7086,.4945],[.9915,.7029,.4892],[.9914,.6973,.4839],[.9912,.6916,.4786],[.9911,.6859,.4733],[.991,.6803,.4681],[.9909,.6746,.4628],[.9908,.669,.4575],[.9906,.6633,.4522],[.9905,.6576,.4469],[.9904,.652,.4416],[.9903,.6463,.4363],[.9901,.6407,.431],[.99,.635,.4257],[.9899,.6293,.4204],[.9898,.6237,.4151],[.9897,.618,.4099],[.9895,.6124,.4046],[.9894,.6067,.3993],[.9893,.601,.394],[.9892,.5954,.3887],[.989,.5897,.3834],[.9889,.5841,.3781],[.9888,.5784,.3728],[.9887,.5727,.3675],[.9885,.5671,.3622],[.9884,.5614,.357],[.9883,.5558,.3517],[.9874,.5505,.348],[.9858,.5456,.3459],[.9842,.5406,.3438],[.9826,.5357,.3417],[.981,.5308,.3396],[.9794,.5259,.3375],[.9778,.521,.3354],[.9762,.516,.3333],[.9746,.5111,.3312],[.973,.5062,.3292],[.9714,.5013,.3271],[.9698,.4963,.325],[.9682,.4914,.3229],[.9666,.4865,.3208],[.965,.4816,.3187],[.9634,.4767,.3166],[.9618,.4717,.3145],[.9602,.4668,.3124],[.9586,.4619,.3103],[.957,.457,.3082],[.9554,.4521,.3061],[.9538,.4471,.3041],[.9522,.4422,.302],[.9506,.4373,.2999],[.9491,.4324,.2978],[.9475,.4275,.2957],[.9459,.4225,.2936],[.9443,.4176,.2915],[.9427,.4127,.2894],[.9411,.4078,.2873],[.9395,.4028,.2852],[.9379,.3979,.2831],[.9354,.392,.2792],[.9325,.3855,.2742],[.9295,.379,.2691],[.9266,.3724,.2641],[.9236,.3659,.259],[.9206,.3594,.254],[.9177,.3529,.2489],[.9147,.3464,.2439],[.9118,.3398,.2388],[.9088,.3333,.2338],[.9059,.3268,.2288],[.9029,.3203,.2237],[.9,.3138,.2187],[.897,.3072,.2136],[.8941,.3007,.2086],[.8911,.2942,.2035],[.8882,.2877,.1985],[.8852,.2812,.1934],[.8823,.2746,.1884],[.8793,.2681,.1834],[.8764,.2616,.1783],[.8734,.2551,.1733],[.8704,.2486,.1682],[.8675,.242,.1632],[.8645,.2355,.1581],[.8616,.229,.1531],[.8586,.2225,.1481],[.8557,.2159,.143],[.8527,.2094,.138],[.8498,.2029,.1329],[.8468,.1964,.1279],[.8439,.1899,.1228],[.8398,.1838,.1187],[.8354,.1779,.1149],[.831,.172,.1111],[.8265,.1661,.1073],[.8221,.1602,.1035],[.8177,.1543,.0996],[.8132,.1484,.0958],[.8088,.1425,.092],[.8044,.1366,.0882],[.8,.1307,.0844],[.7955,.1248,.0806],[.7911,.1188,.0768],[.7867,.1129,.0729],[.7822,.107,.0691],[.7778,.1011,.0653],[.7734,.0952,.0615],[.769,.0893,.0577],[.7645,.0834,.0539],[.7601,.0775,.0501],[.7557,.0716,.0462],[.7512,.0657,.0424],[.7468,.0598,.0386],[.7424,.0539,.0348],[.7379,.048,.031],[.7335,.0421,.0272],[.7291,.0362,.0234],[.7247,.0303,.0195],[.7202,.0244,.0157],[.7158,.0185,.0119],[.7114,.0125,.0081],[.7069,.0066,.0043],[.7025,7e-4,5e-4],[.6964,0,0],[.69,0,0],[.6836,0,0],[.6772,0,0],[.6708,0,0],[.6644,0,0],[.658,0,0],[.6516,0,0],[.6452,0,0],[.6388,0,0],[.6324,0,0],[.626,0,0],[.6196,0,0],[.6132,0,0],[.6068,0,0],[.6004,0,0],[.594,0,0],[.5876,0,0],[.5812,0,0],[.5748,0,0],[.5684,0,0],[.562,0,0],[.5556,0,0],[.5492,0,0],[.5428,0,0],[.5364,0,0],[.53,0,0],[.5236,0,0],[.5172,0,0],[.5108,0,0],[.5044,0,0],[.498,0,0]]};ce.Oranges={interpolate:!0,colors:[[1,.9608,.9216],[.9999,.9589,.918],[.9998,.9571,.9144],[.9996,.9552,.9109],[.9995,.9534,.9073],[.9994,.9516,.9037],[.9993,.9497,.9002],[.9991,.9479,.8966],[.999,.946,.893],[.9989,.9442,.8895],[.9988,.9423,.8859],[.9986,.9405,.8823],[.9985,.9386,.8788],[.9984,.9368,.8752],[.9983,.9349,.8716],[.9982,.9331,.8681],[.998,.9313,.8645],[.9979,.9294,.8609],[.9978,.9276,.8573],[.9977,.9257,.8538],[.9975,.9239,.8502],[.9974,.922,.8466],[.9973,.9202,.8431],[.9972,.9183,.8395],[.997,.9165,.8359],[.9969,.9146,.8324],[.9968,.9128,.8288],[.9967,.911,.8252],[.9966,.9091,.8217],[.9964,.9073,.8181],[.9963,.9054,.8145],[.9962,.9036,.811],[.9961,.9016,.8072],[.9959,.8989,.8018],[.9958,.8962,.7963],[.9957,.8935,.7909],[.9956,.8908,.7855],[.9954,.8881,.7801],[.9953,.8854,.7747],[.9952,.8827,.7693],[.9951,.88,.7639],[.995,.8773,.7584],[.9948,.8746,.753],[.9947,.8718,.7476],[.9946,.8691,.7422],[.9945,.8664,.7368],[.9943,.8637,.7314],[.9942,.861,.726],[.9941,.8583,.7206],[.994,.8556,.7151],[.9938,.8529,.7097],[.9937,.8502,.7043],[.9936,.8475,.6989],[.9935,.8448,.6935],[.9934,.8421,.6881],[.9932,.8394,.6827],[.9931,.8367,.6772],[.993,.834,.6718],[.9929,.8312,.6664],[.9927,.8285,.661],[.9926,.8258,.6556],[.9925,.8231,.6502],[.9924,.8204,.6448],[.9922,.8177,.6394],[.9922,.8146,.6336],[.9922,.8105,.6268],[.9922,.8063,.6201],[.9922,.8021,.6133],[.9922,.7979,.6065],[.9922,.7937,.5998],[.9922,.7895,.593],[.9922,.7854,.5862],[.9922,.7812,.5795],[.9922,.777,.5727],[.9922,.7728,.5659],[.9922,.7686,.5592],[.9922,.7644,.5524],[.9922,.7603,.5456],[.9922,.7561,.5389],[.9922,.7519,.5321],[.9922,.7477,.5253],[.9922,.7435,.5186],[.9922,.7393,.5118],[.9922,.7352,.505],[.9922,.731,.4983],[.9922,.7268,.4915],[.9922,.7226,.4847],[.9922,.7184,.478],[.9922,.7142,.4712],[.9922,.7101,.4644],[.9922,.7059,.4577],[.9922,.7017,.4509],[.9922,.6975,.4441],[.9922,.6933,.4374],[.9922,.6892,.4306],[.9922,.685,.4238],[.9922,.6808,.4174],[.9922,.6768,.4117],[.9922,.6727,.4059],[.9922,.6687,.4001],[.9922,.6646,.3943],[.9922,.6605,.3885],[.9922,.6565,.3827],[.9922,.6524,.377],[.9922,.6484,.3712],[.9922,.6443,.3654],[.9922,.6402,.3596],[.9922,.6362,.3538],[.9922,.6321,.3481],[.9922,.6281,.3423],[.9922,.624,.3365],[.9922,.6199,.3307],[.9922,.6159,.3249],[.9922,.6118,.3191],[.9922,.6078,.3134],[.9922,.6037,.3076],[.9922,.5996,.3018],[.9922,.5956,.296],[.9922,.5915,.2902],[.9922,.5875,.2844],[.9922,.5834,.2787],[.9922,.5793,.2729],[.9922,.5753,.2671],[.9922,.5712,.2613],[.9922,.5672,.2555],[.9922,.5631,.2498],[.9922,.559,.244],[.9922,.555,.2382],[.9914,.5507,.2328],[.9899,.5463,.2277],[.9885,.5419,.2227],[.987,.5374,.2176],[.9855,.533,.2126],[.984,.5286,.2076],[.9826,.5242,.2025],[.9811,.5197,.1975],[.9796,.5153,.1924],[.9781,.5109,.1874],[.9767,.5064,.1823],[.9752,.502,.1773],[.9737,.4976,.1722],[.9722,.4931,.1672],[.9707,.4887,.1622],[.9693,.4843,.1571],[.9678,.4799,.1521],[.9663,.4754,.147],[.9648,.471,.142],[.9634,.4666,.1369],[.9619,.4621,.1319],[.9604,.4577,.1268],[.9589,.4533,.1218],[.9575,.4489,.1168],[.956,.4444,.1117],[.9545,.44,.1067],[.953,.4356,.1016],[.9516,.4311,.0966],[.9501,.4267,.0915],[.9486,.4223,.0865],[.9471,.4179,.0814],[.9457,.4134,.0764],[.9433,.4092,.0731],[.9403,.4052,.0709],[.9373,.4011,.0687],[.9344,.397,.0665],[.9314,.393,.0643],[.9285,.3889,.0621],[.9255,.3849,.0598],[.9226,.3808,.0576],[.9196,.3767,.0554],[.9167,.3727,.0532],[.9137,.3686,.051],[.9108,.3646,.0488],[.9078,.3605,.0466],[.9049,.3564,.0443],[.9019,.3524,.0421],[.899,.3483,.0399],[.896,.3443,.0377],[.8931,.3402,.0355],[.8901,.3361,.0333],[.8872,.3321,.031],[.8842,.328,.0288],[.8812,.324,.0266],[.8783,.3199,.0244],[.8753,.3158,.0222],[.8724,.3118,.02],[.8694,.3077,.0178],[.8665,.3037,.0155],[.8635,.2996,.0133],[.8606,.2955,.0111],[.8576,.2915,.0089],[.8547,.2874,.0067],[.8517,.2834,.0045],[.8463,.2807,.0041],[.84,.2785,.0044],[.8337,.2763,.0046],[.8275,.274,.0048],[.8212,.2718,.0051],[.8149,.2696,.0053],[.8086,.2674,.0056],[.8024,.2652,.0058],[.7961,.263,.0061],[.7898,.2608,.0063],[.7835,.2585,.0066],[.7773,.2563,.0068],[.771,.2541,.0071],[.7647,.2519,.0073],[.7584,.2497,.0076],[.7522,.2475,.0078],[.7459,.2453,.008],[.7396,.243,.0083],[.7333,.2408,.0085],[.7271,.2386,.0088],[.7208,.2364,.009],[.7145,.2342,.0093],[.7082,.232,.0095],[.702,.2298,.0098],[.6957,.2275,.01],[.6894,.2253,.0103],[.6831,.2231,.0105],[.6769,.2209,.0107],[.6706,.2187,.011],[.6643,.2165,.0112],[.658,.2143,.0115],[.6518,.212,.0117],[.6468,.2101,.0119],[.642,.2083,.012],[.6372,.2065,.0121],[.6324,.2046,.0122],[.6276,.2028,.0124],[.6228,.2009,.0125],[.618,.1991,.0126],[.6132,.1972,.0127],[.6084,.1954,.0129],[.6036,.1935,.013],[.5988,.1917,.0131],[.594,.1899,.0132],[.5892,.188,.0133],[.5844,.1862,.0135],[.5796,.1843,.0136],[.5748,.1825,.0137],[.57,.1806,.0138],[.5652,.1788,.014],[.5604,.1769,.0141],[.5556,.1751,.0142],[.5508,.1732,.0143],[.546,.1714,.0145],[.5412,.1696,.0146],[.5364,.1677,.0147],[.5316,.1659,.0148],[.5268,.164,.0149],[.522,.1622,.0151],[.5172,.1603,.0152],[.5124,.1585,.0153],[.5076,.1566,.0154],[.5028,.1548,.0156],[.498,.1529,.0157]]};ce.PRGn={interpolate:!0,colors:[[.251,0,.2941],[.2593,.0065,.3027],[.2676,.0129,.3113],[.2759,.0194,.32],[.2842,.0258,.3286],[.2925,.0323,.3372],[.3008,.0388,.3458],[.3091,.0452,.3544],[.3174,.0517,.363],[.3257,.0581,.3716],[.334,.0646,.3802],[.3423,.071,.3889],[.3506,.0775,.3975],[.3589,.084,.4061],[.3672,.0904,.4147],[.3755,.0969,.4233],[.3839,.1033,.4319],[.3922,.1098,.4405],[.4005,.1163,.4491],[.4088,.1227,.4577],[.4171,.1292,.4664],[.4254,.1356,.475],[.4337,.1421,.4836],[.442,.1486,.4922],[.4503,.155,.5008],[.4586,.1615,.5094],[.4654,.1701,.5168],[.4708,.1809,.523],[.4762,.1916,.5291],[.4816,.2024,.5353],[.487,.2131,.5414],[.4923,.2239,.5476],[.4977,.2347,.5537],[.5031,.2454,.5599],[.5085,.2562,.566],[.5139,.267,.5722],[.5193,.2777,.5783],[.5246,.2885,.5845],[.53,.2993,.5906],[.5354,.31,.5968],[.5408,.3208,.6029],[.5462,.3316,.6091],[.5516,.3423,.6152],[.5569,.3531,.6214],[.5623,.3639,.6275],[.5677,.3746,.6337],[.5731,.3854,.6398],[.5785,.3962,.646],[.5839,.4069,.6521],[.5892,.4177,.6583],[.5946,.4285,.6644],[.6,.4392,.6706],[.6063,.4474,.6761],[.6126,.4555,.6817],[.6189,.4637,.6872],[.6252,.4718,.6927],[.6315,.48,.6983],[.6378,.4881,.7038],[.6441,.4963,.7093],[.6504,.5044,.7149],[.6567,.5126,.7204],[.6631,.5207,.726],[.6694,.5289,.7315],[.6757,.537,.737],[.682,.5452,.7426],[.6883,.5533,.7481],[.6946,.5615,.7536],[.7009,.5696,.7592],[.7072,.5778,.7647],[.7135,.5859,.7702],[.7198,.5941,.7758],[.7261,.6022,.7813],[.7324,.6104,.7869],[.7387,.6185,.7924],[.745,.6267,.7979],[.7513,.6348,.8035],[.7576,.643,.809],[.7636,.6507,.8137],[.7693,.6579,.8175],[.775,.6651,.8214],[.7807,.6724,.8252],[.7864,.6796,.8291],[.7921,.6868,.8329],[.7978,.694,.8368],[.8035,.7013,.8406],[.8092,.7085,.8444],[.8148,.7157,.8483],[.8205,.723,.8521],[.8262,.7302,.856],[.8319,.7374,.8598],[.8376,.7446,.8637],[.8433,.7519,.8675],[.849,.7591,.8714],[.8547,.7663,.8752],[.8604,.7735,.879],[.8661,.7808,.8829],[.8717,.788,.8867],[.8774,.7952,.8906],[.8831,.8025,.8944],[.8888,.8097,.8983],[.8945,.8169,.9021],[.9002,.8241,.906],[.9059,.8314,.9098],[.9083,.8368,.9121],[.9108,.8421,.9144],[.9133,.8475,.9167],[.9157,.8529,.919],[.9182,.8583,.9213],[.9206,.8637,.9236],[.9231,.8691,.926],[.9256,.8744,.9283],[.928,.8798,.9306],[.9305,.8852,.9329],[.9329,.8906,.9352],[.9354,.896,.9375],[.9379,.9013,.9398],[.9403,.9067,.9421],[.9428,.9121,.9444],[.9453,.9175,.9467],[.9477,.9229,.949],[.9502,.9283,.9513],[.9526,.9336,.9536],[.9551,.939,.9559],[.9576,.9444,.9582],[.96,.9498,.9606],[.9625,.9552,.9629],[.9649,.9606,.9652],[.9674,.9659,.9675],[.9663,.9681,.9659],[.9617,.967,.9603],[.9571,.9659,.9548],[.9525,.9649,.9493],[.9479,.9638,.9437],[.9433,.9627,.9382],[.9386,.9616,.9326],[.934,.9606,.9271],[.9294,.9595,.9216],[.9248,.9584,.916],[.9202,.9573,.9105],[.9156,.9562,.905],[.911,.9552,.8994],[.9063,.9541,.8939],[.9017,.953,.8884],[.8971,.9519,.8828],[.8925,.9509,.8773],[.8879,.9498,.8717],[.8833,.9487,.8662],[.8787,.9476,.8607],[.874,.9466,.8551],[.8694,.9455,.8496],[.8648,.9444,.8441],[.8602,.9433,.8385],[.8556,.9423,.833],[.851,.9412,.8275],[.8431,.9379,.8196],[.8353,.9347,.8118],[.8275,.9315,.8039],[.8196,.9283,.7961],[.8118,.925,.7882],[.8039,.9218,.7804],[.7961,.9186,.7725],[.7882,.9153,.7647],[.7804,.9121,.7569],[.7725,.9089,.749],[.7647,.9057,.7412],[.7569,.9024,.7333],[.749,.8992,.7255],[.7412,.896,.7176],[.7333,.8927,.7098],[.7255,.8895,.702],[.7176,.8863,.6941],[.7098,.883,.6863],[.702,.8798,.6784],[.6941,.8766,.6706],[.6863,.8734,.6627],[.6784,.8701,.6549],[.6706,.8669,.6471],[.6627,.8637,.6392],[.6549,.8604,.6314],[.6451,.8554,.6226],[.6334,.8484,.6129],[.6218,.8415,.6032],[.6101,.8346,.5935],[.5984,.8277,.5839],[.5867,.8208,.5742],[.575,.8138,.5645],[.5633,.8069,.5548],[.5516,.8,.5451],[.5399,.7931,.5354],[.5283,.7862,.5257],[.5166,.7792,.516],[.5049,.7723,.5063],[.4932,.7654,.4967],[.4815,.7585,.487],[.4698,.7516,.4773],[.4581,.7446,.4676],[.4464,.7377,.4579],[.4348,.7308,.4482],[.4231,.7239,.4385],[.4114,.717,.4288],[.3997,.71,.4191],[.388,.7031,.4095],[.3763,.6962,.3998],[.3646,.6893,.3901],[.3529,.6824,.3804],[.3433,.674,.3739],[.3336,.6657,.3675],[.3239,.6574,.361],[.3142,.6491,.3546],[.3045,.6408,.3481],[.2948,.6325,.3416],[.2851,.6242,.3352],[.2754,.6159,.3287],[.2657,.6076,.3223],[.2561,.5993,.3158],[.2464,.591,.3093],[.2367,.5827,.3029],[.227,.5744,.2964],[.2173,.5661,.29],[.2076,.5578,.2835],[.1979,.5495,.277],[.1882,.5412,.2706],[.1785,.5329,.2641],[.1689,.5246,.2577],[.1592,.5163,.2512],[.1495,.508,.2448],[.1398,.4997,.2383],[.1301,.4913,.2318],[.1204,.483,.2254],[.1107,.4747,.2189],[.1038,.4666,.2135],[.0997,.4586,.2092],[.0955,.4506,.2049],[.0913,.4426,.2006],[.0872,.4346,.1963],[.083,.4266,.192],[.0789,.4186,.1877],[.0747,.4106,.1834],[.0706,.4026,.1791],[.0664,.3946,.1748],[.0623,.3866,.1705],[.0581,.3786,.1662],[.054,.3706,.1619],[.0498,.3626,.1576],[.0457,.3546,.1532],[.0415,.3466,.1489],[.0374,.3386,.1446],[.0332,.3306,.1403],[.0291,.3226,.136],[.0249,.3146,.1317],[.0208,.3067,.1274],[.0166,.2987,.1231],[.0125,.2907,.1188],[.0083,.2827,.1145],[.0042,.2747,.1102],[0,.2667,.1059]]};ce.Paired={interpolate:!1,colors:[[.651,.8078,.8902],[.1216,.4706,.7059],[.698,.8745,.5412],[.2,.6275,.1725],[.9843,.6039,.6],[.8902,.102,.1098],[.9922,.749,.4353],[1,.498,0],[.7922,.698,.8392],[.4157,.2392,.6039],[1,1,.6],[.6941,.349,.1569]]};ce.Pastel1={interpolate:!1,colors:[[.9843,.7059,.6824],[.702,.8039,.8902],[.8,.9216,.7725],[.8706,.7961,.8941],[.9961,.851,.651],[1,1,.8],[.898,.8471,.7412],[.9922,.8549,.9255],[.949,.949,.949]]};ce.Pastel2={interpolate:!1,colors:[[.702,.8863,.8039],[.9922,.8039,.6745],[.7961,.8353,.9098],[.9569,.7922,.8941],[.902,.9608,.7882],[1,.949,.6824],[.9451,.8863,.8],[.8,.8,.8]]};ce.PiYG={interpolate:!0,colors:[[.5569,.0039,.3216],[.5653,.0079,.3282],[.5738,.0119,.3348],[.5822,.0159,.3414],[.5907,.0199,.348],[.5992,.0239,.3546],[.6076,.0279,.3612],[.6161,.0319,.3679],[.6245,.0359,.3745],[.633,.0399,.3811],[.6414,.0439,.3877],[.6499,.0479,.3943],[.6584,.0519,.4009],[.6668,.0559,.4075],[.6753,.0599,.4141],[.6837,.0639,.4208],[.6922,.0679,.4274],[.7007,.0719,.434],[.7091,.0759,.4406],[.7176,.0799,.4472],[.726,.0839,.4538],[.7345,.0879,.4604],[.7429,.0919,.4671],[.7514,.0959,.4737],[.7599,.0999,.4803],[.7683,.1039,.4869],[.7745,.113,.494],[.7783,.1271,.5015],[.7822,.1413,.509],[.786,.1554,.5166],[.7899,.1696,.5241],[.7937,.1837,.5316],[.7975,.1978,.5392],[.8014,.212,.5467],[.8052,.2261,.5542],[.8091,.2403,.5618],[.8129,.2544,.5693],[.8168,.2686,.5769],[.8206,.2827,.5844],[.8245,.2969,.5919],[.8283,.311,.5995],[.8321,.3252,.607],[.836,.3393,.6145],[.8398,.3535,.6221],[.8437,.3676,.6296],[.8475,.3818,.6371],[.8514,.3959,.6447],[.8552,.4101,.6522],[.8591,.4242,.6597],[.8629,.4384,.6673],[.8667,.4525,.6748],[.8706,.4667,.6824],[.8735,.4764,.6891],[.8764,.486,.6959],[.8794,.4957,.7027],[.8823,.5054,.7094],[.8852,.5151,.7162],[.8881,.5248,.723],[.891,.5345,.7297],[.894,.5442,.7365],[.8969,.5539,.7433],[.8998,.5636,.75],[.9027,.5732,.7568],[.9057,.5829,.7636],[.9086,.5926,.7703],[.9115,.6023,.7771],[.9144,.612,.7839],[.9173,.6217,.7906],[.9203,.6314,.7974],[.9232,.6411,.8042],[.9261,.6507,.8109],[.929,.6604,.8177],[.9319,.6701,.8245],[.9349,.6798,.8312],[.9378,.6895,.838],[.9407,.6992,.8448],[.9436,.7089,.8515],[.946,.717,.8565],[.9479,.7234,.8597],[.9497,.7299,.863],[.9516,.7363,.8662],[.9534,.7428,.8694],[.9552,.7493,.8727],[.9571,.7557,.8759],[.9589,.7622,.8791],[.9608,.7686,.8824],[.9626,.7751,.8856],[.9645,.7815,.8888],[.9663,.788,.892],[.9682,.7945,.8953],[.97,.8009,.8985],[.9719,.8074,.9017],[.9737,.8138,.905],[.9755,.8203,.9082],[.9774,.8268,.9114],[.9792,.8332,.9146],[.9811,.8397,.9179],[.9829,.8461,.9211],[.9848,.8526,.9243],[.9866,.8591,.9276],[.9885,.8655,.9308],[.9903,.872,.934],[.9922,.8784,.9373],[.9912,.882,.9385],[.9903,.8855,.9397],[.9894,.889,.9409],[.9885,.8926,.9422],[.9875,.8961,.9434],[.9866,.8997,.9446],[.9857,.9032,.9459],[.9848,.9067,.9471],[.9839,.9103,.9483],[.9829,.9138,.9496],[.982,.9173,.9508],[.9811,.9209,.952],[.9802,.9244,.9532],[.9792,.928,.9545],[.9783,.9315,.9557],[.9774,.935,.9569],[.9765,.9386,.9582],[.9755,.9421,.9594],[.9746,.9456,.9606],[.9737,.9492,.9619],[.9728,.9527,.9631],[.9719,.9562,.9643],[.9709,.9598,.9656],[.97,.9633,.9668],[.9691,.9669,.968],[.9673,.9685,.9656],[.9647,.9682,.9596],[.9621,.9679,.9536],[.9595,.9676,.9476],[.9569,.9672,.9416],[.9542,.9669,.9356],[.9516,.9666,.9296],[.949,.9663,.9236],[.9464,.966,.9176],[.9438,.9657,.9116],[.9412,.9654,.9057],[.9386,.9651,.8997],[.9359,.9648,.8937],[.9333,.9645,.8877],[.9307,.9642,.8817],[.9281,.9639,.8757],[.9255,.9636,.8697],[.9229,.9632,.8637],[.9203,.9629,.8577],[.9176,.9626,.8517],[.915,.9623,.8457],[.9124,.962,.8397],[.9098,.9617,.8337],[.9072,.9614,.8277],[.9046,.9611,.8217],[.902,.9608,.8157],[.8949,.9577,.8043],[.8878,.9546,.7929],[.8807,.9516,.7815],[.8737,.9485,.7702],[.8666,.9454,.7588],[.8595,.9423,.7474],[.8524,.9393,.736],[.8454,.9362,.7246],[.8383,.9331,.7133],[.8312,.93,.7019],[.8241,.927,.6905],[.8171,.9239,.6791],[.81,.9208,.6677],[.8029,.9177,.6564],[.7958,.9146,.645],[.7888,.9116,.6336],[.7817,.9085,.6222],[.7746,.9054,.6108],[.7676,.9023,.5995],[.7605,.8993,.5881],[.7534,.8962,.5767],[.7463,.8931,.5653],[.7393,.89,.5539],[.7322,.887,.5426],[.7251,.8839,.5312],[.7172,.8795,.5202],[.7084,.8738,.5096],[.6997,.8681,.499],[.6909,.8624,.4884],[.6821,.8567,.4777],[.6734,.8511,.4671],[.6646,.8454,.4565],[.6558,.8397,.4459],[.6471,.834,.4353],[.6383,.8283,.4247],[.6295,.8226,.4141],[.6208,.8169,.4035],[.612,.8112,.3928],[.6032,.8055,.3822],[.5945,.7998,.3716],[.5857,.7942,.361],[.5769,.7885,.3504],[.5682,.7828,.3398],[.5594,.7771,.3292],[.5506,.7714,.3186],[.5419,.7657,.308],[.5331,.76,.2973],[.5243,.7543,.2867],[.5156,.7486,.2761],[.5068,.7429,.2655],[.498,.7373,.2549],[.4903,.7308,.25],[.4827,.7243,.2451],[.475,.7179,.2401],[.4673,.7114,.2352],[.4596,.705,.2303],[.4519,.6985,.2254],[.4442,.692,.2205],[.4365,.6856,.2155],[.4288,.6791,.2106],[.4211,.6727,.2057],[.4135,.6662,.2008],[.4058,.6597,.1958],[.3981,.6533,.1909],[.3904,.6468,.186],[.3827,.6404,.1811],[.375,.6339,.1762],[.3673,.6275,.1712],[.3596,.621,.1663],[.3519,.6145,.1614],[.3443,.6081,.1565],[.3366,.6016,.1516],[.3289,.5952,.1466],[.3212,.5887,.1417],[.3135,.5822,.1368],[.3058,.5758,.1319],[.299,.569,.1288],[.2932,.5619,.1276],[.2874,.5549,.1263],[.2815,.5478,.1251],[.2757,.5407,.1239],[.2698,.5336,.1226],[.264,.5266,.1214],[.2581,.5195,.1202],[.2523,.5124,.119],[.2464,.5053,.1177],[.2406,.4983,.1165],[.2348,.4912,.1153],[.2289,.4841,.114],[.2231,.477,.1128],[.2172,.47,.1116],[.2114,.4629,.1103],[.2055,.4558,.1091],[.1997,.4488,.1079],[.1938,.4417,.1067],[.188,.4346,.1054],[.1822,.4275,.1042],[.1763,.4205,.103],[.1705,.4134,.1017],[.1646,.4063,.1005],[.1588,.3992,.0993],[.1529,.3922,.098]]};ce.PuBu={interpolate:!0,colors:[[1,.9686,.9843],[.9977,.9667,.9832],[.9953,.9647,.9821],[.993,.9627,.981],[.9906,.9608,.9799],[.9883,.9588,.9788],[.986,.9568,.9777],[.9836,.9548,.9766],[.9813,.9529,.9755],[.979,.9509,.9743],[.9766,.9489,.9732],[.9743,.947,.9721],[.9719,.945,.971],[.9696,.943,.9699],[.9673,.9411,.9688],[.9649,.9391,.9677],[.9626,.9371,.9666],[.9603,.9352,.9655],[.9579,.9332,.9644],[.9556,.9312,.9633],[.9532,.9293,.9622],[.9509,.9273,.9611],[.9486,.9253,.96],[.9462,.9234,.9588],[.9439,.9214,.9577],[.9416,.9194,.9566],[.9392,.9174,.9555],[.9369,.9155,.9544],[.9345,.9135,.9533],[.9322,.9115,.9522],[.9299,.9096,.9511],[.9275,.9076,.95],[.9251,.9055,.9488],[.9216,.9028,.9474],[.9182,.9001,.9459],[.9147,.8974,.9444],[.9113,.8947,.9429],[.9078,.892,.9415],[.9044,.8893,.94],[.9009,.8866,.9385],[.8975,.8839,.937],[.8941,.8812,.9355],[.8906,.8785,.9341],[.8872,.8758,.9326],[.8837,.8731,.9311],[.8803,.8704,.9296],[.8768,.8677,.9282],[.8734,.8649,.9267],[.8699,.8622,.9252],[.8665,.8595,.9237],[.8631,.8568,.9223],[.8596,.8541,.9208],[.8562,.8514,.9193],[.8527,.8487,.9178],[.8493,.846,.9164],[.8458,.8433,.9149],[.8424,.8406,.9134],[.8389,.8379,.9119],[.8355,.8352,.9104],[.832,.8325,.909],[.8286,.8298,.9075],[.8252,.8271,.906],[.8217,.8243,.9045],[.8183,.8216,.9031],[.8144,.819,.9016],[.8092,.8165,.9003],[.8041,.8141,.8989],[.7989,.8116,.8976],[.7937,.8092,.8962],[.7886,.8067,.8949],[.7834,.8042,.8935],[.7782,.8018,.8921],[.7731,.7993,.8908],[.7679,.7968,.8894],[.7627,.7944,.8881],[.7576,.7919,.8867],[.7524,.7895,.8854],[.7472,.787,.884],[.7421,.7845,.8827],[.7369,.7821,.8813],[.7317,.7796,.88],[.7266,.7772,.8786],[.7214,.7747,.8773],[.7162,.7722,.8759],[.711,.7698,.8746],[.7059,.7673,.8732],[.7007,.7649,.8718],[.6955,.7624,.8705],[.6904,.7599,.8691],[.6852,.7575,.8678],[.68,.755,.8664],[.6749,.7526,.8651],[.6697,.7501,.8637],[.6645,.7476,.8624],[.6594,.7452,.861],[.6542,.7427,.8597],[.6487,.7403,.8583],[.6425,.7378,.8568],[.6364,.7353,.8553],[.6302,.7329,.8538],[.6241,.7304,.8524],[.6179,.728,.8509],[.6118,.7255,.8494],[.6056,.723,.8479],[.5995,.7206,.8465],[.5933,.7181,.845],[.5872,.7156,.8435],[.581,.7132,.842],[.5749,.7107,.8406],[.5687,.7083,.8391],[.5626,.7058,.8376],[.5564,.7033,.8361],[.5502,.7009,.8346],[.5441,.6984,.8332],[.5379,.696,.8317],[.5318,.6935,.8302],[.5256,.691,.8287],[.5195,.6886,.8273],[.5133,.6861,.8258],[.5072,.6837,.8243],[.501,.6812,.8228],[.4949,.6787,.8214],[.4887,.6763,.8199],[.4826,.6738,.8184],[.4764,.6714,.8169],[.4703,.6689,.8155],[.4641,.6664,.814],[.458,.664,.8125],[.4511,.6612,.8108],[.4435,.6581,.809],[.4358,.6551,.8072],[.4282,.652,.8053],[.4206,.6489,.8035],[.4129,.6458,.8016],[.4053,.6428,.7998],[.3977,.6397,.7979],[.3901,.6366,.7961],[.3824,.6335,.7942],[.3748,.6304,.7924],[.3672,.6274,.7905],[.3596,.6243,.7887],[.3519,.6212,.7869],[.3443,.6181,.785],[.3367,.6151,.7832],[.329,.612,.7813],[.3214,.6089,.7795],[.3138,.6058,.7776],[.3062,.6028,.7758],[.2985,.5997,.7739],[.2909,.5966,.7721],[.2833,.5935,.7702],[.2756,.5905,.7684],[.268,.5874,.7666],[.2604,.5843,.7647],[.2528,.5812,.7629],[.2451,.5782,.761],[.2375,.5751,.7592],[.2299,.572,.7573],[.2223,.5689,.7555],[.2146,.5659,.7536],[.208,.5622,.7517],[.202,.5583,.7497],[.1959,.5544,.7478],[.1899,.5504,.7458],[.1839,.5465,.7438],[.1779,.5426,.7419],[.1718,.5386,.7399],[.1658,.5347,.7379],[.1598,.5307,.736],[.1537,.5268,.734],[.1477,.5229,.732],[.1417,.5189,.7301],[.1357,.515,.7281],[.1296,.5111,.7261],[.1236,.5071,.7242],[.1176,.5032,.7222],[.1115,.4993,.7202],[.1055,.4953,.7182],[.0995,.4914,.7163],[.0935,.4874,.7143],[.0874,.4835,.7123],[.0814,.4796,.7104],[.0754,.4756,.7084],[.0693,.4717,.7064],[.0633,.4678,.7045],[.0573,.4638,.7025],[.0513,.4599,.7005],[.0452,.4559,.6986],[.0392,.452,.6966],[.0332,.4481,.6946],[.0271,.4441,.6927],[.0211,.4402,.6907],[.0195,.4372,.687],[.0194,.4345,.6827],[.0193,.4318,.6784],[.0191,.4291,.674],[.019,.4264,.6697],[.0189,.4237,.6654],[.0188,.4209,.6611],[.0187,.4182,.6568],[.0185,.4155,.6525],[.0184,.4128,.6482],[.0183,.4101,.6439],[.0182,.4074,.6396],[.018,.4047,.6353],[.0179,.402,.631],[.0178,.3993,.6267],[.0177,.3966,.6224],[.0175,.3939,.6181],[.0174,.3912,.6138],[.0173,.3885,.6095],[.0172,.3858,.6052],[.0171,.3831,.6008],[.0169,.3803,.5965],[.0168,.3776,.5922],[.0167,.3749,.5879],[.0166,.3722,.5836],[.0164,.3695,.5793],[.0163,.3668,.575],[.0162,.3641,.5707],[.0161,.3614,.5664],[.0159,.3587,.5621],[.0158,.356,.5578],[.0157,.3533,.5535],[.0155,.3493,.5472],[.0152,.3451,.5407],[.015,.3409,.5342],[.0147,.3367,.5277],[.0145,.3325,.5212],[.0142,.3284,.5146],[.014,.3242,.5081],[.0137,.32,.5016],[.0135,.3158,.4951],[.0133,.3116,.4886],[.013,.3075,.482],[.0128,.3033,.4755],[.0125,.2991,.469],[.0123,.2949,.4625],[.012,.2907,.4559],[.0118,.2865,.4494],[.0115,.2824,.4429],[.0113,.2782,.4364],[.011,.274,.4299],[.0108,.2698,.4233],[.0105,.2656,.4168],[.0103,.2614,.4103],[.0101,.2573,.4038],[.0098,.2531,.3973],[.0096,.2489,.3907],[.0093,.2447,.3842],[.0091,.2405,.3777],[.0088,.2363,.3712],[.0086,.2322,.3647],[.0083,.228,.3581],[.0081,.2238,.3516],[.0078,.2196,.3451]]};ce.PuBuGn={interpolate:!0,colors:[[1,.9686,.9843],[.9977,.966,.983],[.9953,.9635,.9816],[.993,.9609,.9803],[.9906,.9583,.9789],[.9883,.9557,.9775],[.986,.9531,.9762],[.9836,.9505,.9748],[.9813,.948,.9735],[.979,.9454,.9721],[.9766,.9428,.9708],[.9743,.9402,.9694],[.9719,.9376,.9681],[.9696,.935,.9667],[.9673,.9325,.9654],[.9649,.9299,.964],[.9626,.9273,.9627],[.9603,.9247,.9613],[.9579,.9221,.96],[.9556,.9195,.9586],[.9532,.917,.9572],[.9509,.9144,.9559],[.9486,.9118,.9545],[.9462,.9092,.9532],[.9439,.9066,.9518],[.9416,.904,.9505],[.9392,.9015,.9491],[.9369,.8989,.9478],[.9345,.8963,.9464],[.9322,.8937,.9451],[.9299,.8911,.9437],[.9275,.8885,.9424],[.9251,.886,.941],[.9216,.8839,.9398],[.9182,.8818,.9386],[.9147,.8797,.9373],[.9113,.8776,.9361],[.9078,.8756,.9349],[.9044,.8735,.9336],[.9009,.8714,.9324],[.8975,.8693,.9312],[.8941,.8672,.93],[.8906,.8651,.9287],[.8872,.863,.9275],[.8837,.8609,.9263],[.8803,.8588,.925],[.8768,.8567,.9238],[.8734,.8546,.9226],[.8699,.8525,.9213],[.8665,.8505,.9201],[.8631,.8484,.9189],[.8596,.8463,.9176],[.8562,.8442,.9164],[.8527,.8421,.9152],[.8493,.84,.914],[.8458,.8379,.9127],[.8424,.8358,.9115],[.8389,.8337,.9103],[.8355,.8316,.909],[.832,.8295,.9078],[.8286,.8275,.9066],[.8252,.8254,.9053],[.8217,.8233,.9041],[.8183,.8212,.9029],[.8144,.819,.9016],[.8092,.8165,.9003],[.8041,.8141,.8989],[.7989,.8116,.8976],[.7937,.8092,.8962],[.7886,.8067,.8949],[.7834,.8042,.8935],[.7782,.8018,.8921],[.7731,.7993,.8908],[.7679,.7968,.8894],[.7627,.7944,.8881],[.7576,.7919,.8867],[.7524,.7895,.8854],[.7472,.787,.884],[.7421,.7845,.8827],[.7369,.7821,.8813],[.7317,.7796,.88],[.7266,.7772,.8786],[.7214,.7747,.8773],[.7162,.7722,.8759],[.711,.7698,.8746],[.7059,.7673,.8732],[.7007,.7649,.8718],[.6955,.7624,.8705],[.6904,.7599,.8691],[.6852,.7575,.8678],[.68,.755,.8664],[.6749,.7526,.8651],[.6697,.7501,.8637],[.6645,.7476,.8624],[.6594,.7452,.861],[.6542,.7427,.8597],[.6481,.7403,.8583],[.6403,.7378,.8568],[.6326,.7353,.8553],[.6248,.7329,.8538],[.6171,.7304,.8524],[.6093,.728,.8509],[.6016,.7255,.8494],[.5938,.723,.8479],[.5861,.7206,.8465],[.5783,.7181,.845],[.5706,.7156,.8435],[.5628,.7132,.842],[.5551,.7107,.8406],[.5473,.7083,.8391],[.5396,.7058,.8376],[.5318,.7033,.8361],[.5241,.7009,.8346],[.5163,.6984,.8332],[.5086,.696,.8317],[.5008,.6935,.8302],[.4931,.691,.8287],[.4853,.6886,.8273],[.4776,.6861,.8258],[.4698,.6837,.8243],[.4621,.6812,.8228],[.4543,.6787,.8214],[.4466,.6763,.8199],[.4388,.6738,.8184],[.431,.6714,.8169],[.4233,.6689,.8155],[.4155,.6664,.814],[.4078,.664,.8125],[.4009,.6612,.8108],[.3949,.6581,.809],[.3889,.6551,.8072],[.3828,.652,.8053],[.3768,.6489,.8035],[.3708,.6458,.8016],[.3647,.6428,.7998],[.3587,.6397,.7979],[.3527,.6366,.7961],[.3467,.6335,.7942],[.3406,.6304,.7924],[.3346,.6274,.7905],[.3286,.6243,.7887],[.3225,.6212,.7869],[.3165,.6181,.785],[.3105,.6151,.7832],[.3045,.612,.7813],[.2984,.6089,.7795],[.2924,.6058,.7776],[.2864,.6028,.7758],[.2803,.5997,.7739],[.2743,.5966,.7721],[.2683,.5935,.7702],[.2623,.5905,.7684],[.2562,.5874,.7666],[.2502,.5843,.7647],[.2442,.5812,.7629],[.2381,.5782,.761],[.2321,.5751,.7592],[.2261,.572,.7573],[.2201,.5689,.7555],[.214,.5659,.7536],[.2078,.5636,.7488],[.2014,.5617,.7421],[.195,.5599,.7355],[.1886,.558,.7289],[.1822,.5562,.7222],[.1758,.5543,.7156],[.1694,.5525,.7089],[.163,.5506,.7023],[.1566,.5488,.6956],[.1502,.5469,.689],[.1438,.5451,.6824],[.1374,.5433,.6757],[.131,.5414,.6691],[.1246,.5396,.6624],[.1182,.5377,.6558],[.1118,.5359,.6491],[.1054,.534,.6425],[.099,.5322,.6358],[.0926,.5303,.6292],[.0862,.5285,.6226],[.0798,.5266,.6159],[.0734,.5248,.6093],[.067,.523,.6026],[.0606,.5211,.596],[.0542,.5193,.5893],[.0478,.5174,.5827],[.0414,.5156,.5761],[.035,.5137,.5694],[.0286,.5119,.5628],[.0222,.51,.5561],[.0158,.5082,.5495],[.0094,.5063,.5428],[.0078,.5039,.5367],[.0076,.5014,.5306],[.0075,.4988,.5246],[.0074,.4962,.5186],[.0073,.4936,.5125],[.0071,.491,.5065],[.007,.4884,.5005],[.0069,.4859,.4945],[.0068,.4833,.4884],[.0066,.4807,.4824],[.0065,.4781,.4764],[.0064,.4755,.4703],[.0063,.4729,.4643],[.0062,.4704,.4583],[.006,.4678,.4523],[.0059,.4652,.4462],[.0058,.4626,.4402],[.0057,.46,.4342],[.0055,.4574,.4281],[.0054,.4549,.4221],[.0053,.4523,.4161],[.0052,.4497,.4101],[.005,.4471,.404],[.0049,.4445,.398],[.0048,.4419,.392],[.0047,.4394,.3859],[.0046,.4368,.3799],[.0044,.4342,.3739],[.0043,.4316,.3679],[.0042,.429,.3618],[.0041,.4264,.3558],[.0039,.4239,.3498],[.0039,.4194,.3453],[.0039,.4148,.3409],[.0039,.4101,.3366],[.0039,.4054,.3323],[.0039,.4007,.328],[.0039,.3961,.3237],[.0039,.3914,.3194],[.0039,.3867,.3151],[.0039,.382,.3108],[.0039,.3774,.3065],[.0039,.3727,.3022],[.0039,.368,.2979],[.0039,.3633,.2936],[.0039,.3587,.2893],[.0039,.354,.285],[.0039,.3493,.2807],[.0039,.3446,.2764],[.0039,.34,.272],[.0039,.3353,.2677],[.0039,.3306,.2634],[.0039,.3259,.2591],[.0039,.3213,.2548],[.0039,.3166,.2505],[.0039,.3119,.2462],[.0039,.3072,.2419],[.0039,.3026,.2376],[.0039,.2979,.2333],[.0039,.2932,.229],[.0039,.2885,.2247],[.0039,.2839,.2204],[.0039,.2792,.2161],[.0039,.2745,.2118]]};ce.PuOr={interpolate:!0,colors:[[.498,.2314,.0314],[.506,.2358,.0311],[.514,.2403,.0308],[.522,.2448,.0304],[.53,.2492,.0301],[.538,.2537,.0298],[.546,.2581,.0295],[.554,.2626,.0292],[.562,.2671,.0289],[.57,.2715,.0286],[.578,.276,.0283],[.586,.2804,.028],[.594,.2849,.0277],[.602,.2894,.0274],[.61,.2938,.0271],[.618,.2983,.0268],[.626,.3027,.0265],[.634,.3072,.0261],[.642,.3116,.0258],[.65,.3161,.0255],[.658,.3206,.0252],[.666,.325,.0249],[.674,.3295,.0246],[.682,.3339,.0243],[.69,.3384,.024],[.698,.3429,.0237],[.7054,.3483,.0246],[.7123,.3548,.0268],[.7193,.3612,.0289],[.7262,.3677,.0311],[.7331,.3742,.0332],[.74,.3806,.0354],[.7469,.3871,.0375],[.7539,.3935,.0397],[.7608,.4,.0418],[.7677,.4065,.044],[.7746,.4129,.0461],[.7815,.4194,.0483],[.7885,.4258,.0504],[.7954,.4323,.0526],[.8023,.4388,.0547],[.8092,.4452,.0569],[.8161,.4517,.0591],[.8231,.4581,.0612],[.83,.4646,.0634],[.8369,.471,.0655],[.8438,.4775,.0677],[.8507,.484,.0698],[.8577,.4904,.072],[.8646,.4969,.0741],[.8715,.5033,.0763],[.8784,.5098,.0784],[.8829,.5181,.0906],[.8874,.5264,.1027],[.8918,.5347,.1149],[.8963,.543,.127],[.9007,.5513,.1392],[.9052,.5596,.1513],[.9097,.5679,.1635],[.9141,.5762,.1756],[.9186,.5845,.1878],[.923,.5928,.1999],[.9275,.6012,.2121],[.9319,.6095,.2242],[.9364,.6178,.2364],[.9409,.6261,.2485],[.9453,.6344,.2607],[.9498,.6427,.2728],[.9542,.651,.285],[.9587,.6593,.2971],[.9632,.6676,.3093],[.9676,.6759,.3214],[.9721,.6842,.3336],[.9765,.6925,.3457],[.981,.7008,.3579],[.9855,.7091,.37],[.9899,.7174,.3822],[.9922,.7246,.3946],[.9924,.7308,.4074],[.9925,.7369,.4201],[.9927,.7431,.4329],[.9928,.7493,.4457],[.993,.7554,.4584],[.9932,.7616,.4712],[.9933,.7677,.484],[.9935,.7739,.4967],[.9936,.78,.5095],[.9938,.7862,.5223],[.9939,.7923,.535],[.9941,.7985,.5478],[.9942,.8046,.5606],[.9944,.8108,.5733],[.9945,.8169,.5861],[.9947,.8231,.5988],[.9948,.8292,.6116],[.995,.8354,.6244],[.9952,.8415,.6371],[.9953,.8477,.6499],[.9955,.8538,.6627],[.9956,.86,.6754],[.9958,.8661,.6882],[.9959,.8723,.701],[.9961,.8784,.7137],[.995,.882,.7237],[.9939,.8855,.7337],[.9928,.889,.7437],[.9918,.8926,.7537],[.9907,.8961,.7637],[.9896,.8997,.7737],[.9885,.9032,.7837],[.9875,.9067,.7937],[.9864,.9103,.8037],[.9853,.9138,.8137],[.9842,.9173,.8237],[.9832,.9209,.8337],[.9821,.9244,.8437],[.981,.928,.8537],[.9799,.9315,.8637],[.9789,.935,.8737],[.9778,.9386,.8837],[.9767,.9421,.8937],[.9756,.9456,.9037],[.9745,.9492,.9136],[.9735,.9527,.9236],[.9724,.9562,.9336],[.9713,.9598,.9436],[.9702,.9633,.9536],[.9692,.9669,.9636],[.9662,.9664,.9677],[.9615,.9619,.9659],[.9567,.9575,.964],[.9519,.953,.9622],[.9472,.9486,.9603],[.9424,.9441,.9585],[.9376,.9396,.9566],[.9329,.9352,.9548],[.9281,.9307,.9529],[.9233,.9263,.9511],[.9186,.9218,.9493],[.9138,.9173,.9474],[.909,.9129,.9456],[.9043,.9084,.9437],[.8995,.904,.9419],[.8947,.8995,.94],[.89,.895,.9382],[.8852,.8906,.9363],[.8804,.8861,.9345],[.8757,.8817,.9326],[.8709,.8772,.9308],[.8661,.8727,.929],[.8614,.8683,.9271],[.8566,.8638,.9253],[.8518,.8594,.9234],[.8471,.8549,.9216],[.8412,.8477,.9177],[.8354,.8404,.9139],[.8295,.8332,.91],[.8237,.826,.9062],[.8178,.8188,.9023],[.812,.8115,.8985],[.8062,.8043,.8947],[.8003,.7971,.8908],[.7945,.7899,.887],[.7886,.7826,.8831],[.7828,.7754,.8793],[.7769,.7682,.8754],[.7711,.7609,.8716],[.7652,.7537,.8677],[.7594,.7465,.8639],[.7536,.7393,.8601],[.7477,.732,.8562],[.7419,.7248,.8524],[.736,.7176,.8485],[.7302,.7103,.8447],[.7243,.7031,.8408],[.7185,.6959,.837],[.7126,.6887,.8331],[.7068,.6814,.8293],[.701,.6742,.8255],[.6942,.6663,.8206],[.6865,.6577,.8148],[.6788,.6491,.8089],[.6711,.6404,.8031],[.6634,.6318,.7972],[.6557,.6232,.7914],[.6481,.6146,.7855],[.6404,.606,.7797],[.6327,.5974,.7739],[.625,.5888,.768],[.6173,.5802,.7622],[.6096,.5715,.7563],[.6019,.5629,.7505],[.5942,.5543,.7446],[.5865,.5457,.7388],[.5789,.5371,.7329],[.5712,.5285,.7271],[.5635,.5199,.7213],[.5558,.5113,.7154],[.5481,.5027,.7096],[.5404,.494,.7037],[.5327,.4854,.6979],[.525,.4768,.692],[.5173,.4682,.6862],[.5097,.4596,.6804],[.502,.451,.6745],[.4952,.4393,.669],[.4884,.4276,.6634],[.4817,.4159,.6579],[.4749,.4042,.6524],[.4681,.3925,.6468],[.4614,.3809,.6413],[.4546,.3692,.6358],[.4478,.3575,.6302],[.4411,.3458,.6247],[.4343,.3341,.6191],[.4275,.3224,.6136],[.4208,.3107,.6081],[.414,.299,.6025],[.4072,.2874,.597],[.4005,.2757,.5915],[.3937,.264,.5859],[.3869,.2523,.5804],[.3802,.2406,.5749],[.3734,.2289,.5693],[.3666,.2172,.5638],[.3599,.2055,.5582],[.3531,.1938,.5527],[.3463,.1822,.5472],[.3396,.1705,.5416],[.3328,.1588,.5361],[.3264,.1499,.5286],[.3204,.1439,.5193],[.3144,.1379,.5099],[.3084,.1319,.5005],[.3024,.126,.4911],[.2964,.12,.4817],[.2904,.114,.4724],[.2844,.108,.463],[.2784,.102,.4536],[.2724,.096,.4442],[.2664,.09,.4348],[.2604,.084,.4255],[.2544,.078,.4161],[.2484,.072,.4067],[.2424,.066,.3973],[.2364,.06,.3879],[.2304,.054,.3785],[.2245,.048,.3692],[.2185,.042,.3598],[.2125,.036,.3504],[.2065,.03,.341],[.2005,.024,.3316],[.1945,.018,.3223],[.1885,.012,.3129],[.1825,.006,.3035],[.1765,0,.2941]]};ce.PuRd={interpolate:!0,colors:[[.9686,.9569,.9765],[.9667,.9545,.9752],[.9647,.9522,.974],[.9627,.9499,.9728],[.9608,.9475,.9715],[.9588,.9452,.9703],[.9568,.9428,.9691],[.9548,.9405,.9679],[.9529,.9382,.9666],[.9509,.9358,.9654],[.9489,.9335,.9642],[.947,.9311,.9629],[.945,.9288,.9617],[.943,.9265,.9605],[.9411,.9241,.9592],[.9391,.9218,.958],[.9371,.9195,.9568],[.9352,.9171,.9556],[.9332,.9148,.9543],[.9312,.9124,.9531],[.9293,.9101,.9519],[.9273,.9078,.9506],[.9253,.9054,.9494],[.9234,.9031,.9482],[.9214,.9008,.9469],[.9194,.8984,.9457],[.9174,.8961,.9445],[.9155,.8937,.9433],[.9135,.8914,.942],[.9115,.8891,.9408],[.9096,.8867,.9396],[.9076,.8844,.9383],[.9056,.8817,.9369],[.9033,.8768,.9343],[.9009,.8719,.9318],[.8986,.867,.9292],[.8962,.8621,.9266],[.8939,.8571,.924],[.8916,.8522,.9214],[.8892,.8473,.9188],[.8869,.8424,.9163],[.8846,.8374,.9137],[.8822,.8325,.9111],[.8799,.8276,.9085],[.8775,.8227,.9059],[.8752,.8178,.9033],[.8729,.8128,.9008],[.8705,.8079,.8982],[.8682,.803,.8956],[.8659,.7981,.893],[.8635,.7932,.8904],[.8612,.7882,.8878],[.8588,.7833,.8853],[.8565,.7784,.8827],[.8542,.7735,.8801],[.8518,.7686,.8775],[.8495,.7636,.8749],[.8472,.7587,.8723],[.8448,.7538,.8698],[.8425,.7489,.8672],[.8401,.7439,.8646],[.8378,.739,.862],[.8355,.7341,.8594],[.8331,.7292,.8568],[.831,.7244,.8543],[.8297,.7198,.852],[.8283,.7152,.8496],[.827,.7107,.8473],[.8256,.7061,.845],[.8243,.7016,.8426],[.8229,.697,.8403],[.8216,.6925,.838],[.8202,.6879,.8356],[.8189,.6834,.8333],[.8175,.6788,.8309],[.8161,.6743,.8286],[.8148,.6697,.8263],[.8134,.6652,.8239],[.8121,.6606,.8216],[.8107,.6561,.8193],[.8094,.6515,.8169],[.808,.647,.8146],[.8067,.6424,.8122],[.8053,.6379,.8099],[.804,.6333,.8076],[.8026,.6288,.8052],[.8013,.6242,.8029],[.7999,.6197,.8006],[.7986,.6151,.7982],[.7972,.6105,.7959],[.7958,.606,.7935],[.7945,.6014,.7912],[.7931,.5969,.7889],[.7918,.5923,.7865],[.7904,.5878,.7842],[.7891,.5832,.7819],[.7893,.5782,.7793],[.792,.5724,.7765],[.7947,.5667,.7737],[.7974,.5609,.7708],[.8001,.5551,.768],[.8028,.5493,.7652],[.8055,.5435,.7624],[.8082,.5377,.7595],[.8109,.532,.7567],[.8136,.5262,.7539],[.8163,.5204,.751],[.819,.5146,.7482],[.8217,.5088,.7454],[.8244,.5031,.7425],[.8271,.4973,.7397],[.8299,.4915,.7369],[.8326,.4857,.7341],[.8353,.4799,.7312],[.838,.4741,.7284],[.8407,.4684,.7256],[.8434,.4626,.7227],[.8461,.4568,.7199],[.8488,.451,.7171],[.8515,.4452,.7142],[.8542,.4394,.7114],[.8569,.4337,.7086],[.8596,.4279,.7058],[.8623,.4221,.7029],[.865,.4163,.7001],[.8677,.4105,.6973],[.8704,.4048,.6944],[.8732,.399,.6916],[.875,.3924,.6879],[.876,.385,.6832],[.877,.3776,.6785],[.878,.3702,.6738],[.8789,.3629,.6692],[.8799,.3555,.6645],[.8809,.3481,.6598],[.8819,.3407,.6551],[.8829,.3333,.6505],[.8839,.326,.6458],[.8848,.3186,.6411],[.8858,.3112,.6364],[.8868,.3038,.6318],[.8878,.2964,.6271],[.8888,.289,.6224],[.8898,.2817,.6177],[.8907,.2743,.6131],[.8917,.2669,.6084],[.8927,.2595,.6037],[.8937,.2521,.599],[.8947,.2448,.5944],[.8957,.2374,.5897],[.8967,.23,.585],[.8976,.2226,.5803],[.8986,.2152,.5757],[.8996,.2078,.571],[.9006,.2005,.5663],[.9016,.1931,.5616],[.9026,.1857,.557],[.9035,.1783,.5523],[.9045,.1709,.5476],[.9055,.1636,.5429],[.904,.159,.5372],[.9009,.1562,.5308],[.8978,.1534,.5244],[.8947,.1505,.518],[.8917,.1477,.5116],[.8886,.1449,.5052],[.8855,.142,.4988],[.8824,.1392,.4924],[.8794,.1364,.486],[.8763,.1335,.4796],[.8732,.1307,.4732],[.8701,.1279,.4668],[.8671,.1251,.4604],[.864,.1222,.454],[.8609,.1194,.4476],[.8578,.1166,.4412],[.8547,.1137,.4348],[.8517,.1109,.4284],[.8486,.1081,.422],[.8455,.1053,.4156],[.8424,.1024,.4092],[.8394,.0996,.4028],[.8363,.0968,.3964],[.8332,.0939,.39],[.8301,.0911,.3836],[.8271,.0883,.3772],[.824,.0854,.3708],[.8209,.0826,.3644],[.8178,.0798,.358],[.8148,.077,.3516],[.8117,.0741,.3453],[.8086,.0713,.3389],[.8029,.0689,.3355],[.7962,.0667,.3332],[.7896,.0645,.3308],[.7829,.0623,.3285],[.7763,.0601,.3262],[.7696,.0579,.3238],[.763,.0556,.3215],[.7564,.0534,.3191],[.7497,.0512,.3168],[.7431,.049,.3145],[.7364,.0468,.3121],[.7298,.0446,.3098],[.7231,.0424,.3075],[.7165,.0401,.3051],[.7099,.0379,.3028],[.7032,.0357,.3004],[.6966,.0335,.2981],[.6899,.0313,.2958],[.6833,.0291,.2934],[.6766,.0269,.2911],[.67,.0246,.2888],[.6633,.0224,.2864],[.6567,.0202,.2841],[.6501,.018,.2817],[.6434,.0158,.2794],[.6368,.0136,.2771],[.6301,.0113,.2747],[.6235,.0091,.2724],[.6168,.0069,.27],[.6102,.0047,.2677],[.6036,.0025,.2654],[.5969,3e-4,.263],[.5908,0,.2589],[.5848,0,.2544],[.5787,0,.25],[.5727,0,.2456],[.5667,0,.2412],[.5607,0,.2367],[.5546,0,.2323],[.5486,0,.2279],[.5426,0,.2234],[.5365,0,.219],[.5305,0,.2146],[.5245,0,.2101],[.5185,0,.2057],[.5124,0,.2013],[.5064,0,.1969],[.5004,0,.1924],[.4943,0,.188],[.4883,0,.1836],[.4823,0,.1791],[.4763,0,.1747],[.4702,0,.1703],[.4642,0,.1659],[.4582,0,.1614],[.4521,0,.157],[.4461,0,.1526],[.4401,0,.1481],[.4341,0,.1437],[.428,0,.1393],[.422,0,.1349],[.416,0,.1304],[.41,0,.126],[.4039,0,.1216]]};ce.Purples={interpolate:!0,colors:[[.9882,.9843,.9922],[.9866,.9826,.9912],[.985,.9809,.9902],[.9834,.9791,.9892],[.9818,.9774,.9882],[.9802,.9757,.9872],[.9786,.974,.9863],[.977,.9723,.9853],[.9754,.9705,.9843],[.9738,.9688,.9833],[.9722,.9671,.9823],[.9706,.9654,.9813],[.969,.9636,.9803],[.9674,.9619,.9794],[.9658,.9602,.9784],[.9642,.9585,.9774],[.9626,.9568,.9764],[.961,.955,.9754],[.9594,.9533,.9744],[.9578,.9516,.9735],[.9562,.9499,.9725],[.9546,.9481,.9715],[.953,.9464,.9705],[.9514,.9447,.9695],[.9499,.943,.9685],[.9483,.9413,.9676],[.9467,.9395,.9666],[.9451,.9378,.9656],[.9435,.9361,.9646],[.9419,.9344,.9636],[.9403,.9326,.9626],[.9387,.9309,.9616],[.9369,.9291,.9606],[.9343,.9268,.9594],[.9318,.9244,.9582],[.9292,.9221,.9569],[.9266,.9198,.9557],[.924,.9174,.9545],[.9214,.9151,.9532],[.9188,.9128,.952],[.9163,.9104,.9508],[.9137,.9081,.9496],[.9111,.9057,.9483],[.9085,.9034,.9471],[.9059,.9011,.9459],[.9033,.8987,.9446],[.9008,.8964,.9434],[.8982,.8941,.9422],[.8956,.8917,.9409],[.893,.8894,.9397],[.8904,.887,.9385],[.8878,.8847,.9373],[.8853,.8824,.936],[.8827,.88,.9348],[.8801,.8777,.9336],[.8775,.8754,.9323],[.8749,.873,.9311],[.8723,.8707,.9299],[.8698,.8683,.9286],[.8672,.866,.9274],[.8646,.8637,.9262],[.862,.8613,.925],[.8594,.859,.9237],[.8568,.8567,.9225],[.854,.854,.9211],[.8503,.8504,.9193],[.8466,.8469,.9174],[.8429,.8433,.9156],[.8392,.8397,.9137],[.8355,.8362,.9119],[.8318,.8326,.91],[.8281,.829,.9082],[.8245,.8255,.9063],[.8208,.8219,.9045],[.8171,.8183,.9027],[.8134,.8148,.9008],[.8097,.8112,.899],[.806,.8076,.8971],[.8023,.8041,.8953],[.7986,.8005,.8934],[.7949,.7969,.8916],[.7912,.7934,.8897],[.7875,.7898,.8879],[.7839,.7862,.886],[.7802,.7827,.8842],[.7765,.7791,.8824],[.7728,.7755,.8805],[.7691,.7719,.8787],[.7654,.7684,.8768],[.7617,.7648,.875],[.758,.7612,.8731],[.7543,.7577,.8713],[.7506,.7541,.8694],[.7469,.7505,.8676],[.7433,.747,.8657],[.7396,.7434,.8639],[.7359,.7396,.8618],[.7322,.7353,.8594],[.7285,.7309,.8569],[.7248,.7266,.8544],[.7211,.7223,.852],[.7174,.718,.8495],[.7137,.7137,.8471],[.71,.7094,.8446],[.7063,.7051,.8421],[.7027,.7008,.8397],[.699,.6965,.8372],[.6953,.6922,.8348],[.6916,.6879,.8323],[.6879,.6836,.8298],[.6842,.6793,.8274],[.6805,.675,.8249],[.6768,.6707,.8225],[.6731,.6664,.82],[.6694,.6621,.8175],[.6657,.6577,.8151],[.6621,.6534,.8126],[.6584,.6491,.8101],[.6547,.6448,.8077],[.651,.6405,.8052],[.6473,.6362,.8028],[.6436,.6319,.8003],[.6399,.6276,.7978],[.6362,.6233,.7954],[.6325,.619,.7929],[.6288,.6147,.7905],[.6251,.6104,.788],[.6215,.6061,.7855],[.6178,.6021,.7835],[.6141,.5986,.7817],[.6104,.595,.78],[.6067,.5914,.7783],[.603,.5879,.7766],[.5993,.5843,.7748],[.5956,.5807,.7731],[.5919,.5772,.7714],[.5882,.5736,.7697],[.5845,.57,.768],[.5809,.5665,.7662],[.5772,.5629,.7645],[.5735,.5593,.7628],[.5698,.5558,.7611],[.5661,.5522,.7593],[.5624,.5486,.7576],[.5587,.5451,.7559],[.555,.5415,.7542],[.5513,.5379,.7524],[.5476,.5343,.7507],[.5439,.5308,.749],[.5403,.5272,.7473],[.5366,.5236,.7456],[.5329,.5201,.7438],[.5292,.5165,.7421],[.5255,.5129,.7404],[.5218,.5094,.7387],[.5181,.5058,.7369],[.5144,.5022,.7352],[.5107,.4987,.7335],[.507,.4951,.7318],[.5033,.4915,.7301],[.5003,.4868,.7276],[.4976,.4814,.7248],[.4949,.476,.722],[.4921,.4706,.7192],[.4894,.4652,.7163],[.4867,.4597,.7135],[.484,.4543,.7107],[.4813,.4489,.7078],[.4786,.4435,.705],[.4759,.4381,.7022],[.4732,.4327,.6993],[.4705,.4273,.6965],[.4678,.4219,.6937],[.4651,.4164,.6909],[.4624,.411,.688],[.4597,.4056,.6852],[.457,.4002,.6824],[.4543,.3948,.6795],[.4515,.3894,.6767],[.4488,.384,.6739],[.4461,.3785,.671],[.4434,.3731,.6682],[.4407,.3677,.6654],[.438,.3623,.6626],[.4353,.3569,.6597],[.4326,.3515,.6569],[.4299,.3461,.6541],[.4272,.3407,.6512],[.4245,.3352,.6484],[.4218,.3298,.6456],[.4191,.3244,.6428],[.4164,.319,.6399],[.4137,.3138,.6374],[.4109,.3086,.6349],[.4082,.3034,.6324],[.4055,.2983,.63],[.4028,.2931,.6275],[.4001,.2879,.6251],[.3974,.2828,.6226],[.3947,.2776,.6201],[.392,.2724,.6177],[.3893,.2673,.6152],[.3866,.2621,.6128],[.3839,.2569,.6103],[.3812,.2518,.6078],[.3785,.2466,.6054],[.3758,.2414,.6029],[.3731,.2363,.6005],[.3703,.2311,.598],[.3676,.2259,.5955],[.3649,.2208,.5931],[.3622,.2156,.5906],[.3595,.2104,.5882],[.3568,.2053,.5857],[.3541,.2001,.5832],[.3514,.1949,.5808],[.3487,.1898,.5783],[.346,.1846,.5759],[.3433,.1794,.5734],[.3406,.1743,.5709],[.3379,.1691,.5685],[.3352,.1639,.566],[.3325,.1588,.5636],[.3298,.1536,.5611],[.3272,.1487,.5588],[.3246,.1439,.5566],[.322,.1391,.5544],[.3194,.1343,.5522],[.3168,.1296,.55],[.3142,.1248,.5478],[.3116,.12,.5456],[.3091,.1152,.5433],[.3065,.1104,.5411],[.3039,.1056,.5389],[.3013,.1008,.5367],[.2987,.096,.5345],[.2961,.0912,.5323],[.2936,.0864,.5301],[.291,.0816,.5278],[.2884,.0768,.5256],[.2858,.072,.5234],[.2832,.0672,.5212],[.2806,.0624,.519],[.2781,.0576,.5168],[.2755,.0528,.5146],[.2729,.048,.5123],[.2703,.0432,.5101],[.2677,.0384,.5079],[.2651,.0336,.5057],[.2626,.0288,.5035],[.26,.024,.5013],[.2574,.0192,.4991],[.2548,.0144,.4968],[.2522,.0096,.4946],[.2496,.0048,.4924],[.2471,0,.4902]]};ce.RdBu={interpolate:!0,colors:[[.4039,0,.1216],[.4155,.0037,.1234],[.427,.0074,.1253],[.4385,.0111,.1271],[.4501,.0148,.129],[.4616,.0185,.1308],[.4731,.0221,.1326],[.4847,.0258,.1345],[.4962,.0295,.1363],[.5077,.0332,.1382],[.5193,.0369,.14],[.5308,.0406,.1419],[.5423,.0443,.1437],[.5539,.048,.1456],[.5654,.0517,.1474],[.5769,.0554,.1493],[.5885,.0591,.1511],[.6,.0627,.1529],[.6115,.0664,.1548],[.6231,.0701,.1566],[.6346,.0738,.1585],[.6461,.0775,.1603],[.6577,.0812,.1622],[.6692,.0849,.164],[.6807,.0886,.1659],[.6923,.0923,.1677],[.7008,.0997,.1712],[.7063,.1107,.1765],[.7119,.1218,.1817],[.7174,.1329,.1869],[.723,.1439,.1922],[.7285,.155,.1974],[.734,.1661,.2026],[.7396,.1772,.2078],[.7451,.1882,.2131],[.7506,.1993,.2183],[.7562,.2104,.2235],[.7617,.2215,.2288],[.7672,.2325,.234],[.7728,.2436,.2392],[.7783,.2547,.2444],[.7839,.2657,.2497],[.7894,.2768,.2549],[.7949,.2879,.2601],[.8005,.299,.2654],[.806,.31,.2706],[.8115,.3211,.2758],[.8171,.3322,.281],[.8226,.3433,.2863],[.8281,.3543,.2915],[.8337,.3654,.2967],[.8392,.3765,.302],[.8438,.3871,.3101],[.8484,.3977,.3183],[.8531,.4083,.3264],[.8577,.4189,.3346],[.8623,.4295,.3427],[.8669,.4401,.3509],[.8715,.4507,.359],[.8761,.4614,.3672],[.8807,.472,.3753],[.8854,.4826,.3835],[.89,.4932,.3916],[.8946,.5038,.3998],[.8992,.5144,.4079],[.9038,.525,.4161],[.9084,.5356,.4242],[.913,.5463,.4324],[.9176,.5569,.4405],[.9223,.5675,.4487],[.9269,.5781,.4568],[.9315,.5887,.465],[.9361,.5993,.4731],[.9407,.6099,.4813],[.9453,.6205,.4894],[.9499,.6311,.4976],[.9546,.6418,.5057],[.9576,.6512,.5151],[.9589,.6595,.5257],[.9603,.6678,.5363],[.9617,.6761,.5469],[.9631,.6844,.5576],[.9645,.6927,.5682],[.9659,.701,.5788],[.9672,.7093,.5894],[.9686,.7176,.6],[.97,.726,.6106],[.9714,.7343,.6212],[.9728,.7426,.6318],[.9742,.7509,.6424],[.9755,.7592,.6531],[.9769,.7675,.6637],[.9783,.7758,.6743],[.9797,.7841,.6849],[.9811,.7924,.6955],[.9825,.8007,.7061],[.9839,.809,.7167],[.9852,.8173,.7273],[.9866,.8256,.7379],[.988,.8339,.7486],[.9894,.8422,.7592],[.9908,.8505,.7698],[.9922,.8588,.7804],[.9912,.8631,.7878],[.9903,.8674,.7952],[.9894,.8717,.8025],[.9885,.876,.8099],[.9875,.8804,.8173],[.9866,.8847,.8247],[.9857,.889,.8321],[.9848,.8933,.8394],[.9839,.8976,.8468],[.9829,.9019,.8542],[.982,.9062,.8616],[.9811,.9105,.869],[.9802,.9148,.8764],[.9792,.9191,.8837],[.9783,.9234,.8911],[.9774,.9277,.8985],[.9765,.932,.9059],[.9755,.9363,.9133],[.9746,.9406,.9206],[.9737,.9449,.928],[.9728,.9493,.9354],[.9719,.9536,.9428],[.9709,.9579,.9502],[.97,.9622,.9576],[.9691,.9665,.9649],[.9657,.9672,.9681],[.9599,.9645,.967],[.954,.9617,.9659],[.9482,.9589,.9649],[.9423,.9562,.9638],[.9365,.9534,.9627],[.9306,.9506,.9616],[.9248,.9479,.9606],[.919,.9451,.9595],[.9131,.9423,.9584],[.9073,.9396,.9573],[.9014,.9368,.9562],[.8956,.934,.9552],[.8897,.9313,.9541],[.8839,.9285,.953],[.878,.9257,.9519],[.8722,.923,.9509],[.8664,.9202,.9498],[.8605,.9174,.9487],[.8547,.9146,.9476],[.8488,.9119,.9466],[.843,.9091,.9455],[.8371,.9063,.9444],[.8313,.9036,.9433],[.8255,.9008,.9423],[.8196,.898,.9412],[.8099,.8931,.9384],[.8002,.8882,.9356],[.7905,.8833,.9329],[.7809,.8784,.9301],[.7712,.8734,.9273],[.7615,.8685,.9246],[.7518,.8636,.9218],[.7421,.8587,.919],[.7324,.8537,.9163],[.7227,.8488,.9135],[.713,.8439,.9107],[.7033,.839,.908],[.6937,.8341,.9052],[.684,.8291,.9024],[.6743,.8242,.8997],[.6646,.8193,.8969],[.6549,.8144,.8941],[.6452,.8095,.8913],[.6355,.8045,.8886],[.6258,.7996,.8858],[.6161,.7947,.883],[.6065,.7898,.8803],[.5968,.7849,.8775],[.5871,.7799,.8747],[.5774,.775,.872],[.5665,.7687,.8685],[.5543,.761,.8644],[.5422,.7533,.8602],[.53,.7456,.8561],[.5179,.7379,.8519],[.5057,.7303,.8478],[.4936,.7226,.8436],[.4814,.7149,.8394],[.4693,.7072,.8353],[.4571,.6995,.8311],[.445,.6918,.827],[.4328,.6841,.8228],[.4207,.6764,.8187],[.4085,.6687,.8145],[.3964,.6611,.8104],[.3842,.6534,.8062],[.3721,.6457,.8021],[.3599,.638,.7979],[.3478,.6303,.7938],[.3356,.6226,.7896],[.3235,.6149,.7855],[.3113,.6072,.7813],[.2992,.5995,.7772],[.287,.5918,.773],[.2749,.5842,.7689],[.2627,.5765,.7647],[.2575,.5696,.7612],[.2523,.5626,.7576],[.2471,.5557,.7541],[.2418,.5488,.7506],[.2366,.5419,.747],[.2314,.5349,.7435],[.2261,.528,.7399],[.2209,.5211,.7364],[.2157,.5142,.7329],[.2105,.5073,.7293],[.2052,.5003,.7258],[.2,.4934,.7223],[.1948,.4865,.7187],[.1895,.4796,.7152],[.1843,.4727,.7116],[.1791,.4657,.7081],[.1739,.4588,.7046],[.1686,.4519,.701],[.1634,.445,.6975],[.1582,.4381,.694],[.1529,.4311,.6904],[.1477,.4242,.6869],[.1425,.4173,.6834],[.1373,.4104,.6798],[.132,.4035,.6763],[.1273,.3958,.6687],[.123,.3875,.6572],[.1186,.3792,.6457],[.1143,.3709,.6341],[.11,.3626,.6226],[.1057,.3543,.6111],[.1014,.346,.5995],[.0971,.3377,.588],[.0928,.3294,.5765],[.0885,.3211,.5649],[.0842,.3128,.5534],[.0799,.3045,.5419],[.0756,.2962,.5303],[.0713,.2879,.5188],[.067,.2796,.5073],[.0627,.2713,.4957],[.0584,.263,.4842],[.0541,.2547,.4727],[.0498,.2464,.4611],[.0454,.2381,.4496],[.0411,.2298,.4381],[.0368,.2215,.4265],[.0325,.2131,.415],[.0282,.2048,.4035],[.0239,.1965,.3919],[.0196,.1882,.3804]]};ce.RdGy={interpolate:!0,colors:[[.4039,0,.1216],[.4155,.0037,.1234],[.427,.0074,.1253],[.4385,.0111,.1271],[.4501,.0148,.129],[.4616,.0185,.1308],[.4731,.0221,.1326],[.4847,.0258,.1345],[.4962,.0295,.1363],[.5077,.0332,.1382],[.5193,.0369,.14],[.5308,.0406,.1419],[.5423,.0443,.1437],[.5539,.048,.1456],[.5654,.0517,.1474],[.5769,.0554,.1493],[.5885,.0591,.1511],[.6,.0627,.1529],[.6115,.0664,.1548],[.6231,.0701,.1566],[.6346,.0738,.1585],[.6461,.0775,.1603],[.6577,.0812,.1622],[.6692,.0849,.164],[.6807,.0886,.1659],[.6923,.0923,.1677],[.7008,.0997,.1712],[.7063,.1107,.1765],[.7119,.1218,.1817],[.7174,.1329,.1869],[.723,.1439,.1922],[.7285,.155,.1974],[.734,.1661,.2026],[.7396,.1772,.2078],[.7451,.1882,.2131],[.7506,.1993,.2183],[.7562,.2104,.2235],[.7617,.2215,.2288],[.7672,.2325,.234],[.7728,.2436,.2392],[.7783,.2547,.2444],[.7839,.2657,.2497],[.7894,.2768,.2549],[.7949,.2879,.2601],[.8005,.299,.2654],[.806,.31,.2706],[.8115,.3211,.2758],[.8171,.3322,.281],[.8226,.3433,.2863],[.8281,.3543,.2915],[.8337,.3654,.2967],[.8392,.3765,.302],[.8438,.3871,.3101],[.8484,.3977,.3183],[.8531,.4083,.3264],[.8577,.4189,.3346],[.8623,.4295,.3427],[.8669,.4401,.3509],[.8715,.4507,.359],[.8761,.4614,.3672],[.8807,.472,.3753],[.8854,.4826,.3835],[.89,.4932,.3916],[.8946,.5038,.3998],[.8992,.5144,.4079],[.9038,.525,.4161],[.9084,.5356,.4242],[.913,.5463,.4324],[.9176,.5569,.4405],[.9223,.5675,.4487],[.9269,.5781,.4568],[.9315,.5887,.465],[.9361,.5993,.4731],[.9407,.6099,.4813],[.9453,.6205,.4894],[.9499,.6311,.4976],[.9546,.6418,.5057],[.9576,.6512,.5151],[.9589,.6595,.5257],[.9603,.6678,.5363],[.9617,.6761,.5469],[.9631,.6844,.5576],[.9645,.6927,.5682],[.9659,.701,.5788],[.9672,.7093,.5894],[.9686,.7176,.6],[.97,.726,.6106],[.9714,.7343,.6212],[.9728,.7426,.6318],[.9742,.7509,.6424],[.9755,.7592,.6531],[.9769,.7675,.6637],[.9783,.7758,.6743],[.9797,.7841,.6849],[.9811,.7924,.6955],[.9825,.8007,.7061],[.9839,.809,.7167],[.9852,.8173,.7273],[.9866,.8256,.7379],[.988,.8339,.7486],[.9894,.8422,.7592],[.9908,.8505,.7698],[.9922,.8588,.7804],[.9925,.8644,.789],[.9928,.8699,.7976],[.9931,.8754,.8062],[.9934,.881,.8148],[.9937,.8865,.8235],[.994,.892,.8321],[.9943,.8976,.8407],[.9946,.9031,.8493],[.9949,.9087,.8579],[.9952,.9142,.8665],[.9955,.9197,.8751],[.9958,.9253,.8837],[.9962,.9308,.8923],[.9965,.9363,.901],[.9968,.9419,.9096],[.9971,.9474,.9182],[.9974,.9529,.9268],[.9977,.9585,.9354],[.998,.964,.944],[.9983,.9696,.9526],[.9986,.9751,.9612],[.9989,.9806,.9699],[.9992,.9862,.9785],[.9995,.9917,.9871],[.9998,.9972,.9957],[.9976,.9976,.9976],[.9928,.9928,.9928],[.9881,.9881,.9881],[.9833,.9833,.9833],[.9785,.9785,.9785],[.9738,.9738,.9738],[.969,.969,.969],[.9642,.9642,.9642],[.9595,.9595,.9595],[.9547,.9547,.9547],[.9499,.9499,.9499],[.9452,.9452,.9452],[.9404,.9404,.9404],[.9356,.9356,.9356],[.9309,.9309,.9309],[.9261,.9261,.9261],[.9213,.9213,.9213],[.9166,.9166,.9166],[.9118,.9118,.9118],[.907,.907,.907],[.9023,.9023,.9023],[.8975,.8975,.8975],[.8927,.8927,.8927],[.888,.888,.888],[.8832,.8832,.8832],[.8784,.8784,.8784],[.8726,.8726,.8726],[.8667,.8667,.8667],[.8609,.8609,.8609],[.8551,.8551,.8551],[.8492,.8492,.8492],[.8434,.8434,.8434],[.8375,.8375,.8375],[.8317,.8317,.8317],[.8258,.8258,.8258],[.82,.82,.82],[.8141,.8141,.8141],[.8083,.8083,.8083],[.8025,.8025,.8025],[.7966,.7966,.7966],[.7908,.7908,.7908],[.7849,.7849,.7849],[.7791,.7791,.7791],[.7732,.7732,.7732],[.7674,.7674,.7674],[.7616,.7616,.7616],[.7557,.7557,.7557],[.7499,.7499,.7499],[.744,.744,.744],[.7382,.7382,.7382],[.7323,.7323,.7323],[.7255,.7255,.7255],[.7176,.7176,.7176],[.7098,.7098,.7098],[.702,.702,.702],[.6941,.6941,.6941],[.6863,.6863,.6863],[.6784,.6784,.6784],[.6706,.6706,.6706],[.6627,.6627,.6627],[.6549,.6549,.6549],[.6471,.6471,.6471],[.6392,.6392,.6392],[.6314,.6314,.6314],[.6235,.6235,.6235],[.6157,.6157,.6157],[.6078,.6078,.6078],[.6,.6,.6],[.5922,.5922,.5922],[.5843,.5843,.5843],[.5765,.5765,.5765],[.5686,.5686,.5686],[.5608,.5608,.5608],[.5529,.5529,.5529],[.5451,.5451,.5451],[.5373,.5373,.5373],[.5294,.5294,.5294],[.5205,.5205,.5205],[.5116,.5116,.5116],[.5027,.5027,.5027],[.4937,.4937,.4937],[.4848,.4848,.4848],[.4759,.4759,.4759],[.467,.467,.467],[.4581,.4581,.4581],[.4491,.4491,.4491],[.4402,.4402,.4402],[.4313,.4313,.4313],[.4224,.4224,.4224],[.4135,.4135,.4135],[.4045,.4045,.4045],[.3956,.3956,.3956],[.3867,.3867,.3867],[.3778,.3778,.3778],[.3689,.3689,.3689],[.3599,.3599,.3599],[.351,.351,.351],[.3421,.3421,.3421],[.3332,.3332,.3332],[.3243,.3243,.3243],[.3153,.3153,.3153],[.3064,.3064,.3064],[.298,.298,.298],[.2902,.2902,.2902],[.2824,.2824,.2824],[.2745,.2745,.2745],[.2667,.2667,.2667],[.2588,.2588,.2588],[.251,.251,.251],[.2431,.2431,.2431],[.2353,.2353,.2353],[.2275,.2275,.2275],[.2196,.2196,.2196],[.2118,.2118,.2118],[.2039,.2039,.2039],[.1961,.1961,.1961],[.1882,.1882,.1882],[.1804,.1804,.1804],[.1725,.1725,.1725],[.1647,.1647,.1647],[.1569,.1569,.1569],[.149,.149,.149],[.1412,.1412,.1412],[.1333,.1333,.1333],[.1255,.1255,.1255],[.1176,.1176,.1176],[.1098,.1098,.1098],[.102,.102,.102]]};ce.RdPu={interpolate:!0,colors:[[1,.9686,.9529],[.9998,.9658,.9502],[.9995,.963,.9475],[.9993,.9601,.9448],[.999,.9573,.9421],[.9988,.9545,.9394],[.9985,.9516,.9367],[.9983,.9488,.934],[.998,.946,.9313],[.9978,.9432,.9286],[.9975,.9403,.9259],[.9973,.9375,.9232],[.997,.9347,.9205],[.9968,.9318,.9178],[.9966,.929,.915],[.9963,.9262,.9123],[.9961,.9234,.9096],[.9958,.9205,.9069],[.9956,.9177,.9042],[.9953,.9149,.9015],[.9951,.912,.8988],[.9948,.9092,.8961],[.9946,.9064,.8934],[.9943,.9035,.8907],[.9941,.9007,.888],[.9938,.8979,.8853],[.9936,.8951,.8826],[.9934,.8922,.8799],[.9931,.8894,.8772],[.9929,.8866,.8744],[.9926,.8837,.8717],[.9924,.8809,.869],[.9921,.878,.8662],[.992,.8747,.8627],[.9919,.8714,.8591],[.9918,.8681,.8555],[.9916,.8647,.8519],[.9915,.8614,.8484],[.9914,.8581,.8448],[.9913,.8548,.8412],[.9912,.8514,.8377],[.991,.8481,.8341],[.9909,.8448,.8305],[.9908,.8415,.827],[.9907,.8382,.8234],[.9905,.8348,.8198],[.9904,.8315,.8163],[.9903,.8282,.8127],[.9902,.8249,.8091],[.99,.8215,.8056],[.9899,.8182,.802],[.9898,.8149,.7984],[.9897,.8116,.7949],[.9896,.8083,.7913],[.9894,.8049,.7877],[.9893,.8016,.7842],[.9892,.7983,.7806],[.9891,.795,.777],[.9889,.7916,.7735],[.9888,.7883,.7699],[.9887,.785,.7663],[.9886,.7817,.7628],[.9885,.7784,.7592],[.9883,.775,.7556],[.9882,.7714,.7526],[.9879,.7667,.7512],[.9877,.762,.7499],[.9874,.7574,.7485],[.9872,.7527,.7472],[.9869,.748,.7458],[.9867,.7433,.7445],[.9865,.7387,.7431],[.9862,.734,.7418],[.986,.7293,.7404],[.9857,.7246,.7391],[.9855,.72,.7377],[.9852,.7153,.7364],[.985,.7106,.735],[.9847,.7059,.7337],[.9845,.7013,.7323],[.9842,.6966,.7309],[.984,.6919,.7296],[.9837,.6872,.7282],[.9835,.6826,.7269],[.9833,.6779,.7255],[.983,.6732,.7242],[.9828,.6685,.7228],[.9825,.6639,.7215],[.9823,.6592,.7201],[.982,.6545,.7188],[.9818,.6498,.7174],[.9815,.6452,.7161],[.9813,.6405,.7147],[.981,.6358,.7134],[.9808,.6311,.712],[.9805,.6265,.7106],[.9803,.621,.7089],[.9799,.6142,.7064],[.9795,.6075,.704],[.9791,.6007,.7015],[.9788,.5939,.699],[.9784,.5872,.6966],[.978,.5804,.6941],[.9777,.5736,.6917],[.9773,.5669,.6892],[.9769,.5601,.6867],[.9766,.5533,.6843],[.9762,.5466,.6818],[.9758,.5398,.6794],[.9755,.533,.6769],[.9751,.5263,.6744],[.9747,.5195,.672],[.9743,.5127,.6695],[.974,.506,.6671],[.9736,.4992,.6646],[.9732,.4924,.6621],[.9729,.4857,.6597],[.9725,.4789,.6572],[.9721,.4721,.6547],[.9718,.4654,.6523],[.9714,.4586,.6498],[.971,.4518,.6474],[.9707,.4451,.6449],[.9703,.4383,.6424],[.9699,.4315,.64],[.9696,.4248,.6375],[.9692,.418,.6351],[.9688,.4112,.6326],[.967,.4046,.6308],[.9638,.3982,.6295],[.9606,.3918,.6283],[.9574,.3855,.6271],[.9542,.3791,.6258],[.951,.3727,.6246],[.9478,.3663,.6234],[.9446,.3599,.6221],[.9414,.3535,.6209],[.9382,.3471,.6197],[.935,.3407,.6185],[.9318,.3343,.6172],[.9286,.3279,.616],[.9254,.3215,.6148],[.9222,.3151,.6135],[.919,.3087,.6123],[.9158,.3023,.6111],[.9126,.2959,.6098],[.9095,.2895,.6086],[.9063,.2831,.6074],[.9031,.2767,.6062],[.8999,.2703,.6049],[.8967,.2639,.6037],[.8935,.2575,.6025],[.8903,.2511,.6012],[.8871,.2447,.6],[.8839,.2383,.5988],[.8807,.2319,.5975],[.8775,.2255,.5963],[.8743,.2191,.5951],[.8711,.2127,.5938],[.8679,.2063,.5926],[.8631,.2,.5902],[.8573,.1937,.5872],[.8515,.1875,.5841],[.8457,.1812,.581],[.8399,.1749,.5779],[.8341,.1686,.5749],[.8284,.1624,.5718],[.8226,.1561,.5687],[.8168,.1498,.5656],[.811,.1435,.5626],[.8052,.1373,.5595],[.7994,.131,.5564],[.7937,.1247,.5533],[.7879,.1184,.5502],[.7821,.1122,.5472],[.7763,.1059,.5441],[.7705,.0996,.541],[.7648,.0933,.5379],[.759,.0871,.5349],[.7532,.0808,.5318],[.7474,.0745,.5287],[.7416,.0682,.5256],[.7358,.062,.5226],[.7301,.0557,.5195],[.7243,.0494,.5164],[.7185,.0431,.5133],[.7127,.0369,.5103],[.7069,.0306,.5072],[.7011,.0243,.5041],[.6954,.018,.501],[.6896,.0118,.498],[.6838,.0055,.4949],[.6776,.0039,.4935],[.6712,.0039,.4926],[.6648,.0039,.4917],[.6584,.0039,.4909],[.652,.0039,.49],[.6456,.0039,.4892],[.6392,.0039,.4883],[.6328,.0039,.4874],[.6264,.0039,.4866],[.62,.0039,.4857],[.6136,.0039,.4849],[.6072,.0039,.484],[.6008,.0039,.4831],[.5944,.0039,.4823],[.588,.0039,.4814],[.5816,.0039,.4806],[.5752,.0039,.4797],[.5688,.0039,.4788],[.5624,.0039,.478],[.556,.0039,.4771],[.5496,.0039,.4762],[.5432,.0039,.4754],[.5368,.0039,.4745],[.5304,.0039,.4737],[.524,.0039,.4728],[.5176,.0039,.4719],[.5112,.0039,.4711],[.5048,.0039,.4702],[.4984,.0039,.4694],[.492,.0039,.4685],[.4856,.0039,.4676],[.4792,.0039,.4668],[.4732,.0038,.4653],[.4671,.0037,.4637],[.4611,.0036,.4621],[.4551,.0034,.4605],[.449,.0033,.4589],[.443,.0032,.4573],[.437,.0031,.4557],[.431,.003,.4541],[.4249,.0028,.4525],[.4189,.0027,.4509],[.4129,.0026,.4493],[.4068,.0025,.4477],[.4008,.0023,.4461],[.3948,.0022,.4445],[.3888,.0021,.4429],[.3827,.002,.4413],[.3767,.0018,.4397],[.3707,.0017,.4381],[.3646,.0016,.4365],[.3586,.0015,.4349],[.3526,.0014,.4333],[.3466,.0012,.4317],[.3405,.0011,.4301],[.3345,.001,.4285],[.3285,9e-4,.4269],[.3224,7e-4,.4253],[.3164,6e-4,.4237],[.3104,5e-4,.4221],[.3044,4e-4,.4205],[.2983,2e-4,.4189],[.2923,1e-4,.4173],[.2863,0,.4157]]};ce.RdYlBu={interpolate:!0,colors:[[.6471,0,.149],[.6547,.0074,.1492],[.6624,.0148,.1493],[.6701,.0221,.1495],[.6778,.0295,.1496],[.6855,.0369,.1498],[.6932,.0443,.1499],[.7009,.0517,.1501],[.7086,.0591,.1502],[.7163,.0664,.1504],[.724,.0738,.1506],[.7316,.0812,.1507],[.7393,.0886,.1509],[.747,.096,.151],[.7547,.1033,.1512],[.7624,.1107,.1513],[.7701,.1181,.1515],[.7778,.1255,.1516],[.7855,.1329,.1518],[.7932,.1403,.1519],[.8008,.1476,.1521],[.8085,.155,.1522],[.8162,.1624,.1524],[.8239,.1698,.1526],[.8316,.1772,.1527],[.8393,.1845,.1529],[.8454,.1929,.1551],[.8498,.2023,.1594],[.8543,.2117,.1637],[.8587,.2211,.168],[.8632,.2304,.1723],[.8677,.2398,.1766],[.8721,.2492,.1809],[.8766,.2586,.1852],[.881,.268,.1895],[.8855,.2774,.1938],[.89,.2867,.1982],[.8944,.2961,.2025],[.8989,.3055,.2068],[.9033,.3149,.2111],[.9078,.3243,.2154],[.9123,.3336,.2197],[.9167,.343,.224],[.9212,.3524,.2283],[.9256,.3618,.2326],[.9301,.3712,.2369],[.9346,.3805,.2412],[.939,.3899,.2455],[.9435,.3993,.2498],[.9479,.4087,.2541],[.9524,.4181,.2584],[.9569,.4275,.2627],[.9582,.4374,.2674],[.9596,.4474,.272],[.961,.4574,.2766],[.9624,.4674,.2812],[.9638,.4774,.2858],[.9652,.4874,.2904],[.9666,.4974,.295],[.9679,.5074,.2997],[.9693,.5174,.3043],[.9707,.5274,.3089],[.9721,.5374,.3135],[.9735,.5474,.3181],[.9749,.5574,.3227],[.9762,.5674,.3273],[.9776,.5774,.3319],[.979,.5874,.3366],[.9804,.5974,.3412],[.9818,.6074,.3458],[.9832,.6174,.3504],[.9845,.6274,.355],[.9859,.6374,.3596],[.9873,.6474,.3642],[.9887,.6574,.3689],[.9901,.6674,.3735],[.9915,.6774,.3781],[.9922,.6862,.384],[.9924,.6939,.3912],[.9925,.7016,.3985],[.9927,.7093,.4057],[.9928,.717,.4129],[.993,.7246,.4201],[.9932,.7323,.4274],[.9933,.74,.4346],[.9935,.7477,.4418],[.9936,.7554,.4491],[.9938,.7631,.4563],[.9939,.7708,.4635],[.9941,.7785,.4707],[.9942,.7862,.478],[.9944,.7938,.4852],[.9945,.8015,.4924],[.9947,.8092,.4997],[.9948,.8169,.5069],[.995,.8246,.5141],[.9952,.8323,.5213],[.9953,.84,.5286],[.9955,.8477,.5358],[.9956,.8554,.543],[.9958,.8631,.5502],[.9959,.8707,.5575],[.9961,.8784,.5647],[.9962,.8832,.5719],[.9964,.888,.5792],[.9965,.8927,.5864],[.9967,.8975,.5936],[.9968,.9023,.6008],[.997,.907,.6081],[.9972,.9118,.6153],[.9973,.9166,.6225],[.9975,.9213,.6298],[.9976,.9261,.637],[.9978,.9309,.6442],[.9979,.9356,.6514],[.9981,.9404,.6587],[.9982,.9452,.6659],[.9984,.9499,.6731],[.9985,.9547,.6804],[.9987,.9595,.6876],[.9988,.9642,.6948],[.999,.969,.702],[.9992,.9738,.7093],[.9993,.9785,.7165],[.9995,.9833,.7237],[.9996,.9881,.7309],[.9998,.9928,.7382],[.9999,.9976,.7454],[.9976,.9991,.7534],[.9928,.9972,.7622],[.9881,.9954,.7709],[.9833,.9935,.7797],[.9785,.9917,.7885],[.9738,.9899,.7972],[.969,.988,.806],[.9642,.9862,.8148],[.9595,.9843,.8235],[.9547,.9825,.8323],[.9499,.9806,.8411],[.9452,.9788,.8498],[.9404,.9769,.8586],[.9356,.9751,.8674],[.9309,.9732,.8761],[.9261,.9714,.8849],[.9213,.9696,.8937],[.9166,.9677,.9024],[.9118,.9659,.9112],[.907,.964,.92],[.9023,.9622,.9287],[.8975,.9603,.9375],[.8927,.9585,.9463],[.888,.9566,.955],[.8832,.9548,.9638],[.8784,.9529,.9725],[.8703,.9489,.9702],[.8621,.9449,.9679],[.854,.9409,.9656],[.8458,.9369,.9633],[.8377,.9329,.961],[.8295,.929,.9587],[.8214,.925,.9564],[.8132,.921,.9541],[.8051,.917,.9518],[.7969,.913,.9495],[.7888,.909,.9472],[.7806,.905,.9449],[.7725,.901,.9426],[.7643,.897,.9403],[.7562,.893,.9379],[.748,.889,.9356],[.7399,.885,.9333],[.7317,.881,.931],[.7236,.877,.9287],[.7154,.873,.9264],[.7073,.869,.9241],[.6991,.865,.9218],[.691,.861,.9195],[.6828,.857,.9172],[.6747,.853,.9149],[.6664,.8476,.9119],[.6579,.8408,.9082],[.6494,.8341,.9045],[.641,.8273,.9008],[.6325,.8205,.8971],[.6241,.8138,.8934],[.6156,.807,.8897],[.6072,.8002,.886],[.5987,.7935,.8824],[.5902,.7867,.8787],[.5818,.7799,.875],[.5733,.7732,.8713],[.5649,.7664,.8676],[.5564,.7596,.8639],[.5479,.7529,.8602],[.5395,.7461,.8565],[.531,.7393,.8528],[.5226,.7326,.8491],[.5141,.7258,.8454],[.5057,.719,.8418],[.4972,.7123,.8381],[.4887,.7055,.8344],[.4803,.6987,.8307],[.4718,.692,.827],[.4634,.6852,.8233],[.4549,.6784,.8196],[.4477,.6698,.8151],[.4404,.6612,.8107],[.4332,.6526,.8062],[.426,.644,.8018],[.4188,.6354,.7973],[.4115,.6268,.7928],[.4043,.6181,.7884],[.3971,.6095,.7839],[.3899,.6009,.7795],[.3826,.5923,.775],[.3754,.5837,.7705],[.3682,.5751,.7661],[.3609,.5665,.7616],[.3537,.5579,.7572],[.3465,.5493,.7527],[.3393,.5406,.7483],[.332,.532,.7438],[.3248,.5234,.7393],[.3176,.5148,.7349],[.3103,.5062,.7304],[.3031,.4976,.726],[.2959,.489,.7215],[.2887,.4804,.717],[.2814,.4717,.7126],[.2742,.4631,.7081],[.2691,.454,.7035],[.266,.4443,.6987],[.2629,.4346,.694],[.2598,.4249,.6892],[.2567,.4152,.6844],[.2537,.4055,.6797],[.2506,.3958,.6749],[.2475,.3862,.6701],[.2444,.3765,.6654],[.2414,.3668,.6606],[.2383,.3571,.6558],[.2352,.3474,.6511],[.2321,.3377,.6463],[.2291,.328,.6415],[.226,.3183,.6368],[.2229,.3087,.632],[.2198,.299,.6272],[.2168,.2893,.6225],[.2137,.2796,.6177],[.2106,.2699,.6129],[.2075,.2602,.6082],[.2045,.2505,.6034],[.2014,.2408,.5986],[.1983,.2311,.5938],[.1952,.2215,.5891],[.1922,.2118,.5843]]};ce.RdYlGn={interpolate:!0,colors:[[.6471,0,.149],[.6547,.0074,.1492],[.6624,.0148,.1493],[.6701,.0221,.1495],[.6778,.0295,.1496],[.6855,.0369,.1498],[.6932,.0443,.1499],[.7009,.0517,.1501],[.7086,.0591,.1502],[.7163,.0664,.1504],[.724,.0738,.1506],[.7316,.0812,.1507],[.7393,.0886,.1509],[.747,.096,.151],[.7547,.1033,.1512],[.7624,.1107,.1513],[.7701,.1181,.1515],[.7778,.1255,.1516],[.7855,.1329,.1518],[.7932,.1403,.1519],[.8008,.1476,.1521],[.8085,.155,.1522],[.8162,.1624,.1524],[.8239,.1698,.1526],[.8316,.1772,.1527],[.8393,.1845,.1529],[.8454,.1929,.1551],[.8498,.2023,.1594],[.8543,.2117,.1637],[.8587,.2211,.168],[.8632,.2304,.1723],[.8677,.2398,.1766],[.8721,.2492,.1809],[.8766,.2586,.1852],[.881,.268,.1895],[.8855,.2774,.1938],[.89,.2867,.1982],[.8944,.2961,.2025],[.8989,.3055,.2068],[.9033,.3149,.2111],[.9078,.3243,.2154],[.9123,.3336,.2197],[.9167,.343,.224],[.9212,.3524,.2283],[.9256,.3618,.2326],[.9301,.3712,.2369],[.9346,.3805,.2412],[.939,.3899,.2455],[.9435,.3993,.2498],[.9479,.4087,.2541],[.9524,.4181,.2584],[.9569,.4275,.2627],[.9582,.4374,.2674],[.9596,.4474,.272],[.961,.4574,.2766],[.9624,.4674,.2812],[.9638,.4774,.2858],[.9652,.4874,.2904],[.9666,.4974,.295],[.9679,.5074,.2997],[.9693,.5174,.3043],[.9707,.5274,.3089],[.9721,.5374,.3135],[.9735,.5474,.3181],[.9749,.5574,.3227],[.9762,.5674,.3273],[.9776,.5774,.3319],[.979,.5874,.3366],[.9804,.5974,.3412],[.9818,.6074,.3458],[.9832,.6174,.3504],[.9845,.6274,.355],[.9859,.6374,.3596],[.9873,.6474,.3642],[.9887,.6574,.3689],[.9901,.6674,.3735],[.9915,.6774,.3781],[.9922,.6862,.3836],[.9924,.6939,.3901],[.9925,.7016,.3965],[.9927,.7093,.403],[.9928,.717,.4095],[.993,.7246,.4159],[.9932,.7323,.4224],[.9933,.74,.4288],[.9935,.7477,.4353],[.9936,.7554,.4418],[.9938,.7631,.4482],[.9939,.7708,.4547],[.9941,.7785,.4611],[.9942,.7862,.4676],[.9944,.7938,.474],[.9945,.8015,.4805],[.9947,.8092,.487],[.9948,.8169,.4934],[.995,.8246,.4999],[.9952,.8323,.5063],[.9953,.84,.5128],[.9955,.8477,.5193],[.9956,.8554,.5257],[.9958,.8631,.5322],[.9959,.8707,.5386],[.9961,.8784,.5451],[.9962,.8832,.5531],[.9964,.888,.5611],[.9965,.8927,.5691],[.9967,.8975,.5771],[.9968,.9023,.5851],[.997,.907,.5931],[.9972,.9118,.6011],[.9973,.9166,.6091],[.9975,.9213,.6171],[.9976,.9261,.6251],[.9978,.9309,.6331],[.9979,.9356,.6411],[.9981,.9404,.6491],[.9982,.9452,.6571],[.9984,.9499,.6651],[.9985,.9547,.673],[.9987,.9595,.681],[.9988,.9642,.689],[.999,.969,.697],[.9992,.9738,.705],[.9993,.9785,.713],[.9995,.9833,.721],[.9996,.9881,.729],[.9998,.9928,.737],[.9999,.9976,.745],[.9971,.9988,.745],[.9912,.9963,.737],[.9854,.9938,.729],[.9795,.9914,.721],[.9737,.9889,.713],[.9679,.9865,.705],[.962,.984,.697],[.9562,.9815,.689],[.9503,.9791,.681],[.9445,.9766,.673],[.9386,.9742,.6651],[.9328,.9717,.6571],[.927,.9692,.6491],[.9211,.9668,.6411],[.9153,.9643,.6331],[.9094,.9619,.6251],[.9036,.9594,.6171],[.8977,.9569,.6091],[.8919,.9545,.6011],[.886,.952,.5931],[.8802,.9496,.5851],[.8744,.9471,.5771],[.8685,.9446,.5691],[.8627,.9422,.5611],[.8568,.9397,.5531],[.851,.9373,.5451],[.8431,.9339,.54],[.8353,.9305,.5349],[.8275,.9271,.5299],[.8196,.9237,.5248],[.8118,.9203,.5197],[.8039,.917,.5146],[.7961,.9136,.5096],[.7882,.9102,.5045],[.7804,.9068,.4994],[.7725,.9034,.4943],[.7647,.9,.4893],[.7569,.8967,.4842],[.749,.8933,.4791],[.7412,.8899,.474],[.7333,.8865,.469],[.7255,.8831,.4639],[.7176,.8797,.4588],[.7098,.8764,.4537],[.702,.873,.4487],[.6941,.8696,.4436],[.6863,.8662,.4385],[.6784,.8628,.4334],[.6706,.8594,.4284],[.6627,.8561,.4233],[.6549,.8527,.4182],[.6461,.8488,.4151],[.6362,.8445,.4141],[.6264,.8402,.413],[.6165,.8359,.4119],[.6067,.8316,.4108],[.5968,.8273,.4098],[.587,.823,.4087],[.5772,.8187,.4076],[.5673,.8144,.4065],[.5575,.8101,.4055],[.5476,.8058,.4044],[.5378,.8015,.4033],[.528,.7972,.4022],[.5181,.7928,.4012],[.5083,.7885,.4001],[.4984,.7842,.399],[.4886,.7799,.3979],[.4787,.7756,.3968],[.4689,.7713,.3958],[.4591,.767,.3947],[.4492,.7627,.3936],[.4394,.7584,.3925],[.4295,.7541,.3915],[.4197,.7498,.3904],[.4098,.7455,.3893],[.4,.7412,.3882],[.3883,.7355,.3853],[.3766,.7298,.3824],[.3649,.7241,.3795],[.3532,.7184,.3765],[.3416,.7127,.3736],[.3299,.707,.3707],[.3182,.7013,.3678],[.3065,.6957,.3649],[.2948,.69,.3619],[.2831,.6843,.359],[.2714,.6786,.3561],[.2597,.6729,.3532],[.2481,.6672,.3502],[.2364,.6615,.3473],[.2247,.6558,.3444],[.213,.6501,.3415],[.2013,.6444,.3386],[.1896,.6388,.3356],[.1779,.6331,.3327],[.1662,.6274,.3298],[.1546,.6217,.3269],[.1429,.616,.324],[.1312,.6103,.321],[.1195,.6046,.3181],[.1078,.5989,.3152],[.1,.5924,.3118],[.096,.585,.308],[.092,.5776,.3041],[.088,.5702,.3003],[.084,.5629,.2964],[.08,.5555,.2926],[.076,.5481,.2887],[.072,.5407,.2849],[.068,.5333,.281],[.064,.526,.2772],[.06,.5186,.2734],[.056,.5112,.2695],[.052,.5038,.2657],[.048,.4964,.2618],[.044,.489,.258],[.04,.4817,.2541],[.036,.4743,.2503],[.032,.4669,.2464],[.028,.4595,.2426],[.024,.4521,.2388],[.02,.4448,.2349],[.016,.4374,.2311],[.012,.43,.2272],[.008,.4226,.2234],[.004,.4152,.2195],[0,.4078,.2157]]};ce.Reds={interpolate:!0,colors:[[1,.9608,.9412],[.9999,.9582,.9375],[.9998,.9556,.9338],[.9996,.953,.9301],[.9995,.9504,.9264],[.9994,.9479,.9227],[.9993,.9453,.919],[.9991,.9427,.9153],[.999,.9401,.9116],[.9989,.9375,.908],[.9988,.9349,.9043],[.9986,.9324,.9006],[.9985,.9298,.8969],[.9984,.9272,.8932],[.9983,.9246,.8895],[.9982,.922,.8858],[.998,.9194,.8821],[.9979,.9169,.8784],[.9978,.9143,.8747],[.9977,.9117,.871],[.9975,.9091,.8674],[.9974,.9065,.8637],[.9973,.9039,.86],[.9972,.9014,.8563],[.997,.8988,.8526],[.9969,.8962,.8489],[.9968,.8936,.8452],[.9967,.891,.8415],[.9966,.8884,.8378],[.9964,.8859,.8341],[.9963,.8833,.8304],[.9962,.8807,.8268],[.996,.8779,.8228],[.9958,.8733,.8167],[.9956,.8688,.8107],[.9953,.8642,.8047],[.9951,.8597,.7987],[.9948,.8551,.7926],[.9946,.8505,.7866],[.9943,.846,.7806],[.9941,.8414,.7745],[.9938,.8369,.7685],[.9936,.8323,.7625],[.9933,.8278,.7565],[.9931,.8232,.7504],[.9928,.8187,.7444],[.9926,.8141,.7384],[.9924,.8096,.7323],[.9921,.805,.7263],[.9919,.8005,.7203],[.9916,.7959,.7143],[.9914,.7914,.7082],[.9911,.7868,.7022],[.9909,.7823,.6962],[.9906,.7777,.6901],[.9904,.7732,.6841],[.9901,.7686,.6781],[.9899,.7641,.6721],[.9897,.7595,.666],[.9894,.755,.66],[.9892,.7504,.654],[.9889,.7459,.648],[.9887,.7413,.6419],[.9884,.7367,.6359],[.9882,.7321,.6299],[.9882,.727,.6241],[.9882,.722,.6184],[.9882,.7169,.6126],[.9882,.7119,.6068],[.9882,.7069,.601],[.9882,.7018,.5952],[.9882,.6968,.5895],[.9882,.6917,.5837],[.9882,.6867,.5779],[.9882,.6816,.5721],[.9882,.6766,.5663],[.9882,.6715,.5605],[.9882,.6665,.5548],[.9882,.6615,.549],[.9882,.6564,.5432],[.9882,.6514,.5374],[.9882,.6463,.5316],[.9882,.6413,.5258],[.9882,.6362,.5201],[.9882,.6312,.5143],[.9882,.6261,.5085],[.9882,.6211,.5027],[.9882,.6161,.4969],[.9882,.611,.4911],[.9882,.606,.4854],[.9882,.6009,.4796],[.9882,.5959,.4738],[.9882,.5908,.468],[.9882,.5858,.4622],[.9882,.5807,.4565],[.9882,.5757,.4507],[.9882,.5707,.4452],[.9881,.5658,.4403],[.9879,.5609,.4354],[.9878,.5559,.4304],[.9877,.551,.4255],[.9876,.5461,.4206],[.9875,.5412,.4157],[.9873,.5363,.4108],[.9872,.5313,.4058],[.9871,.5264,.4009],[.987,.5215,.396],[.9868,.5166,.3911],[.9867,.5116,.3862],[.9866,.5067,.3812],[.9865,.5018,.3763],[.9863,.4969,.3714],[.9862,.492,.3665],[.9861,.487,.3616],[.986,.4821,.3566],[.9859,.4772,.3517],[.9857,.4723,.3468],[.9856,.4674,.3419],[.9855,.4624,.3369],[.9854,.4575,.332],[.9852,.4526,.3271],[.9851,.4477,.3222],[.985,.4428,.3173],[.9849,.4378,.3123],[.9847,.4329,.3074],[.9846,.428,.3025],[.9845,.4231,.2976],[.9844,.4181,.2927],[.9836,.4128,.2884],[.9821,.407,.2847],[.9806,.4012,.281],[.9791,.3954,.2773],[.9777,.3897,.2736],[.9762,.3839,.2699],[.9747,.3781,.2662],[.9732,.3723,.2625],[.9718,.3665,.2588],[.9703,.3608,.2551],[.9688,.355,.2514],[.9673,.3492,.2478],[.9659,.3434,.2441],[.9644,.3376,.2404],[.9629,.3318,.2367],[.9614,.3261,.233],[.96,.3203,.2293],[.9585,.3145,.2256],[.957,.3087,.2219],[.9555,.3029,.2182],[.954,.2971,.2145],[.9526,.2914,.2108],[.9511,.2856,.2072],[.9496,.2798,.2035],[.9481,.274,.1998],[.9467,.2682,.1961],[.9452,.2625,.1924],[.9437,.2567,.1887],[.9422,.2509,.185],[.9408,.2451,.1813],[.9393,.2393,.1776],[.9378,.2335,.1739],[.9345,.2287,.1714],[.9301,.2244,.1696],[.9256,.2201,.1677],[.9212,.2158,.1659],[.9168,.2115,.164],[.9123,.2072,.1622],[.9079,.2028,.1603],[.9035,.1985,.1585],[.8991,.1942,.1566],[.8946,.1899,.1548],[.8902,.1856,.1529],[.8858,.1813,.1511],[.8813,.177,.1493],[.8769,.1727,.1474],[.8725,.1684,.1456],[.8681,.1641,.1437],[.8636,.1598,.1419],[.8592,.1555,.14],[.8548,.1512,.1382],[.8503,.1469,.1363],[.8459,.1426,.1345],[.8415,.1383,.1326],[.837,.1339,.1308],[.8326,.1296,.129],[.8282,.1253,.1271],[.8238,.121,.1253],[.8193,.1167,.1234],[.8149,.1124,.1216],[.8105,.1081,.1197],[.806,.1038,.1179],[.8016,.0995,.116],[.7972,.0952,.1142],[.7926,.0933,.113],[.7879,.0922,.112],[.7832,.0911,.111],[.7785,.09,.11],[.7739,.0889,.1091],[.7692,.0878,.1081],[.7645,.0866,.1071],[.7598,.0855,.1061],[.7552,.0844,.1051],[.7505,.0833,.1041],[.7458,.0822,.1031],[.7411,.0811,.1022],[.7365,.08,.1012],[.7318,.0789,.1002],[.7271,.0778,.0992],[.7224,.0767,.0982],[.7178,.0756,.0972],[.7131,.0745,.0963],[.7084,.0734,.0953],[.7037,.0722,.0943],[.6991,.0711,.0933],[.6944,.07,.0923],[.6897,.0689,.0913],[.685,.0678,.0903],[.6804,.0667,.0894],[.6757,.0656,.0884],[.671,.0645,.0874],[.6663,.0634,.0864],[.6617,.0623,.0854],[.657,.0612,.0844],[.6523,.0601,.0835],[.6476,.059,.0825],[.6404,.0572,.0815],[.6328,.0554,.0805],[.6251,.0535,.0795],[.6175,.0517,.0785],[.6099,.0498,.0776],[.6022,.048,.0766],[.5946,.0461,.0756],[.587,.0443,.0746],[.5794,.0424,.0736],[.5717,.0406,.0726],[.5641,.0388,.0716],[.5565,.0369,.0707],[.5489,.0351,.0697],[.5412,.0332,.0687],[.5336,.0314,.0677],[.526,.0295,.0667],[.5183,.0277,.0657],[.5107,.0258,.0648],[.5031,.024,.0638],[.4955,.0221,.0628],[.4878,.0203,.0618],[.4802,.0185,.0608],[.4726,.0166,.0598],[.4649,.0148,.0589],[.4573,.0129,.0579],[.4497,.0111,.0569],[.4421,.0092,.0559],[.4344,.0074,.0549],[.4268,.0055,.0539],[.4192,.0037,.0529],[.4115,.0018,.052],[.4039,0,.051]]};ce.Set1={interpolate:!1,colors:[[.8941,.102,.1098],[.2157,.4941,.7216],[.302,.6863,.2902],[.5961,.3059,.6392],[1,.498,0],[1,1,.2],[.651,.3373,.1569],[.9686,.5059,.749],[.6,.6,.6]]};ce.Set2={interpolate:!1,colors:[[.4,.7608,.6471],[.9882,.5529,.3843],[.5529,.6275,.7961],[.9059,.5412,.7647],[.651,.8471,.3294],[1,.851,.1843],[.898,.7686,.5804],[.702,.702,.702]]};ce.Set3={interpolate:!1,colors:[[.5529,.8275,.7804],[1,1,.702],[.7451,.7294,.8549],[.9843,.502,.4471],[.502,.6941,.8275],[.9922,.7059,.3843],[.702,.8706,.4118],[.9882,.8039,.898],[.851,.851,.851],[.7373,.502,.7412],[.8,.9216,.7725],[1,.9294,.4353]]};ce.Spectral={interpolate:!0,colors:[[.6196,.0039,.2588],[.6281,.0133,.2608],[.6365,.0227,.2628],[.645,.0321,.2648],[.6534,.0414,.2668],[.6619,.0508,.2688],[.6704,.0602,.2708],[.6788,.0696,.2728],[.6873,.079,.2748],[.6957,.0884,.2768],[.7042,.0977,.2788],[.7126,.1071,.2808],[.7211,.1165,.2828],[.7296,.1259,.2848],[.738,.1353,.2868],[.7465,.1446,.2888],[.7549,.154,.2908],[.7634,.1634,.2928],[.7719,.1728,.2948],[.7803,.1822,.2968],[.7888,.1915,.2988],[.7972,.2009,.3008],[.8057,.2103,.3028],[.8141,.2197,.3048],[.8226,.2291,.3068],[.8311,.2384,.3088],[.8377,.2468,.3089],[.8424,.254,.307],[.8472,.2612,.3052],[.852,.2684,.3033],[.8567,.2757,.3015],[.8615,.2829,.2997],[.8663,.2901,.2978],[.871,.2973,.296],[.8758,.3046,.2941],[.8806,.3118,.2923],[.8854,.319,.2904],[.8901,.3263,.2886],[.8949,.3335,.2867],[.8997,.3407,.2849],[.9044,.3479,.283],[.9092,.3552,.2812],[.914,.3624,.2794],[.9187,.3696,.2775],[.9235,.3769,.2757],[.9283,.3841,.2738],[.933,.3913,.272],[.9378,.3985,.2701],[.9426,.4058,.2683],[.9473,.413,.2664],[.9521,.4202,.2646],[.9569,.4275,.2627],[.9582,.4374,.2674],[.9596,.4474,.272],[.961,.4574,.2766],[.9624,.4674,.2812],[.9638,.4774,.2858],[.9652,.4874,.2904],[.9666,.4974,.295],[.9679,.5074,.2997],[.9693,.5174,.3043],[.9707,.5274,.3089],[.9721,.5374,.3135],[.9735,.5474,.3181],[.9749,.5574,.3227],[.9762,.5674,.3273],[.9776,.5774,.3319],[.979,.5874,.3366],[.9804,.5974,.3412],[.9818,.6074,.3458],[.9832,.6174,.3504],[.9845,.6274,.355],[.9859,.6374,.3596],[.9873,.6474,.3642],[.9887,.6574,.3689],[.9901,.6674,.3735],[.9915,.6774,.3781],[.9922,.6862,.3836],[.9924,.6939,.3901],[.9925,.7016,.3965],[.9927,.7093,.403],[.9928,.717,.4095],[.993,.7246,.4159],[.9932,.7323,.4224],[.9933,.74,.4288],[.9935,.7477,.4353],[.9936,.7554,.4418],[.9938,.7631,.4482],[.9939,.7708,.4547],[.9941,.7785,.4611],[.9942,.7862,.4676],[.9944,.7938,.474],[.9945,.8015,.4805],[.9947,.8092,.487],[.9948,.8169,.4934],[.995,.8246,.4999],[.9952,.8323,.5063],[.9953,.84,.5128],[.9955,.8477,.5193],[.9956,.8554,.5257],[.9958,.8631,.5322],[.9959,.8707,.5386],[.9961,.8784,.5451],[.9962,.8832,.5531],[.9964,.888,.5611],[.9965,.8927,.5691],[.9967,.8975,.5771],[.9968,.9023,.5851],[.997,.907,.5931],[.9972,.9118,.6011],[.9973,.9166,.6091],[.9975,.9213,.6171],[.9976,.9261,.6251],[.9978,.9309,.6331],[.9979,.9356,.6411],[.9981,.9404,.6491],[.9982,.9452,.6571],[.9984,.9499,.6651],[.9985,.9547,.673],[.9987,.9595,.681],[.9988,.9642,.689],[.999,.969,.697],[.9992,.9738,.705],[.9993,.9785,.713],[.9995,.9833,.721],[.9996,.9881,.729],[.9998,.9928,.737],[.9999,.9976,.745],[.9981,.9992,.746],[.9942,.9977,.74],[.9904,.9962,.734],[.9865,.9946,.728],[.9827,.9931,.722],[.9789,.9915,.716],[.975,.99,.71],[.9712,.9885,.704],[.9673,.9869,.698],[.9635,.9854,.692],[.9596,.9839,.686],[.9558,.9823,.68],[.9519,.9808,.674],[.9481,.9792,.6681],[.9443,.9777,.6621],[.9404,.9762,.6561],[.9366,.9746,.6501],[.9327,.9731,.6441],[.9289,.9715,.6381],[.925,.97,.6321],[.9212,.9685,.6261],[.9173,.9669,.6201],[.9135,.9654,.6141],[.9097,.9639,.6081],[.9058,.9623,.6021],[.902,.9608,.5961],[.8929,.9571,.5979],[.8838,.9534,.5998],[.8747,.9497,.6016],[.8657,.946,.6035],[.8566,.9423,.6053],[.8475,.9386,.6072],[.8384,.9349,.609],[.8294,.9313,.6108],[.8203,.9276,.6127],[.8112,.9239,.6145],[.8022,.9202,.6164],[.7931,.9165,.6182],[.784,.9128,.6201],[.7749,.9091,.6219],[.7659,.9054,.6238],[.7568,.9017,.6256],[.7477,.898,.6275],[.7386,.8943,.6293],[.7296,.8907,.6311],[.7205,.887,.633],[.7114,.8833,.6348],[.7023,.8796,.6367],[.6933,.8759,.6385],[.6842,.8722,.6404],[.6751,.8685,.6422],[.6653,.8646,.6432],[.6547,.8604,.6434],[.6441,.8563,.6435],[.6334,.8521,.6437],[.6228,.848,.6438],[.6122,.8438,.644],[.6016,.8397,.6441],[.591,.8355,.6443],[.5804,.8314,.6444],[.5698,.8272,.6446],[.5592,.8231,.6448],[.5486,.8189,.6449],[.5379,.8148,.6451],[.5273,.8106,.6452],[.5167,.8065,.6454],[.5061,.8023,.6455],[.4955,.7982,.6457],[.4849,.794,.6458],[.4743,.7899,.646],[.4637,.7857,.6461],[.4531,.7815,.6463],[.4424,.7774,.6464],[.4318,.7732,.6466],[.4212,.7691,.6468],[.4106,.7649,.6469],[.4,.7608,.6471],[.392,.7519,.6507],[.384,.7429,.6544],[.376,.734,.6581],[.368,.7251,.6618],[.36,.7162,.6655],[.352,.7073,.6692],[.344,.6983,.6729],[.336,.6894,.6766],[.328,.6805,.6803],[.32,.6716,.684],[.312,.6627,.6877],[.304,.6537,.6913],[.296,.6448,.695],[.288,.6359,.6987],[.28,.627,.7024],[.272,.6181,.7061],[.2641,.6092,.7098],[.2561,.6002,.7135],[.2481,.5913,.7172],[.2401,.5824,.7209],[.2321,.5735,.7246],[.2241,.5646,.7283],[.2161,.5556,.7319],[.2081,.5467,.7356],[.2001,.5378,.7393],[.1995,.529,.7391],[.2062,.5202,.7349],[.213,.5114,.7308],[.2198,.5027,.7266],[.2265,.4939,.7225],[.2333,.4851,.7183],[.2401,.4764,.7142],[.2468,.4676,.71],[.2536,.4588,.7059],[.2604,.4501,.7017],[.2671,.4413,.6976],[.2739,.4325,.6934],[.2807,.4238,.6893],[.2874,.415,.6851],[.2942,.4062,.681],[.301,.3975,.6768],[.3077,.3887,.6727],[.3145,.3799,.6685],[.3213,.3712,.6644],[.328,.3624,.6602],[.3348,.3536,.6561],[.3416,.3449,.6519],[.3483,.3361,.6478],[.3551,.3273,.6436],[.3619,.3186,.6394],[.3686,.3098,.6353]]};ce.Wistia={interpolate:!0,colors:[[.8941,1,.4784],[.8958,.9986,.4725],[.8974,.9972,.4666],[.8991,.9958,.4607],[.9008,.9943,.4548],[.9024,.9929,.4489],[.9041,.9915,.443],[.9057,.9901,.4371],[.9074,.9887,.4312],[.9091,.9873,.4253],[.9107,.9859,.4194],[.9124,.9844,.4135],[.914,.983,.4076],[.9157,.9816,.4017],[.9174,.9802,.3958],[.919,.9788,.3899],[.9207,.9774,.3839],[.9224,.9759,.378],[.924,.9745,.3721],[.9257,.9731,.3662],[.9273,.9717,.3603],[.929,.9703,.3544],[.9307,.9689,.3485],[.9323,.9675,.3426],[.934,.966,.3367],[.9356,.9646,.3308],[.9373,.9632,.3249],[.939,.9618,.319],[.9406,.9604,.3131],[.9423,.959,.3072],[.9439,.9576,.3013],[.9456,.9561,.2954],[.9473,.9547,.2895],[.9489,.9533,.2836],[.9506,.9519,.2776],[.9522,.9505,.2717],[.9539,.9491,.2658],[.9556,.9477,.2599],[.9572,.9462,.254],[.9589,.9448,.2481],[.9606,.9434,.2422],[.9622,.942,.2363],[.9639,.9406,.2304],[.9655,.9392,.2245],[.9672,.9377,.2186],[.9689,.9363,.2127],[.9705,.9349,.2068],[.9722,.9335,.2009],[.9738,.9321,.195],[.9755,.9307,.1891],[.9772,.9293,.1832],[.9788,.9278,.1773],[.9805,.9264,.1713],[.9821,.925,.1654],[.9838,.9236,.1595],[.9855,.9222,.1536],[.9871,.9208,.1477],[.9888,.9194,.1418],[.9904,.9179,.1359],[.9921,.9165,.13],[.9938,.9151,.1241],[.9954,.9137,.1182],[.9971,.9123,.1123],[.9988,.9109,.1064],[1,.9091,.1016],[1,.9065,.1],[1,.9039,.0984],[1,.9012,.0968],[1,.8986,.0952],[1,.8959,.0936],[1,.8933,.092],[1,.8906,.0904],[1,.888,.0888],[1,.8853,.0872],[1,.8827,.0856],[1,.88,.084],[1,.8774,.0824],[1,.8748,.0808],[1,.8721,.0792],[1,.8695,.0776],[1,.8668,.076],[1,.8642,.0744],[1,.8615,.0728],[1,.8589,.0712],[1,.8562,.0696],[1,.8536,.068],[1,.8509,.0664],[1,.8483,.0648],[1,.8457,.0632],[1,.843,.0616],[1,.8404,.06],[1,.8377,.0584],[1,.8351,.0568],[1,.8324,.0552],[1,.8298,.0536],[1,.8271,.052],[1,.8245,.0504],[1,.8219,.0488],[1,.8192,.0472],[1,.8166,.0456],[1,.8139,.044],[1,.8113,.0424],[1,.8086,.0408],[1,.806,.0392],[1,.8033,.0376],[1,.8007,.036],[1,.798,.0344],[1,.7954,.0328],[1,.7928,.0312],[1,.7901,.0296],[1,.7875,.028],[1,.7848,.0264],[1,.7822,.0248],[1,.7795,.0232],[1,.7769,.0216],[1,.7742,.02],[1,.7716,.0184],[1,.769,.0168],[1,.7663,.0152],[1,.7637,.0136],[1,.761,.012],[1,.7584,.0104],[1,.7557,.0088],[1,.7531,.0072],[1,.7504,.0056],[1,.7478,.004],[1,.7451,.0024],[1,.7425,8e-4],[1,.7403,0],[1,.7385,0],[1,.7367,0],[1,.7349,0],[1,.7331,0],[1,.7314,0],[1,.7296,0],[1,.7278,0],[1,.726,0],[1,.7242,0],[1,.7224,0],[1,.7207,0],[1,.7189,0],[1,.7171,0],[1,.7153,0],[1,.7135,0],[1,.7117,0],[1,.71,0],[1,.7082,0],[1,.7064,0],[1,.7046,0],[1,.7028,0],[1,.701,0],[1,.6993,0],[1,.6975,0],[1,.6957,0],[1,.6939,0],[1,.6921,0],[1,.6903,0],[1,.6886,0],[1,.6868,0],[1,.685,0],[1,.6832,0],[1,.6814,0],[1,.6796,0],[1,.6778,0],[1,.6761,0],[1,.6743,0],[1,.6725,0],[1,.6707,0],[1,.6689,0],[1,.6671,0],[1,.6654,0],[1,.6636,0],[1,.6618,0],[1,.66,0],[1,.6582,0],[1,.6564,0],[1,.6547,0],[1,.6529,0],[1,.6511,0],[1,.6493,0],[1,.6475,0],[1,.6457,0],[1,.644,0],[1,.6422,0],[1,.6404,0],[1,.6386,0],[1,.6368,0],[1,.635,0],[1,.6332,0],[1,.6315,0],[1,.6297,0],[1,.6279,0],[.9999,.6259,0],[.9997,.6239,0],[.9995,.6219,0],[.9993,.6198,0],[.9991,.6178,0],[.9989,.6158,0],[.9988,.6137,0],[.9986,.6117,0],[.9984,.6097,0],[.9982,.6077,0],[.998,.6056,0],[.9978,.6036,0],[.9976,.6016,0],[.9975,.5995,0],[.9973,.5975,0],[.9971,.5955,0],[.9969,.5934,0],[.9967,.5914,0],[.9965,.5894,0],[.9964,.5874,0],[.9962,.5853,0],[.996,.5833,0],[.9958,.5813,0],[.9956,.5792,0],[.9954,.5772,0],[.9952,.5752,0],[.9951,.5731,0],[.9949,.5711,0],[.9947,.5691,0],[.9945,.5671,0],[.9943,.565,0],[.9941,.563,0],[.994,.561,0],[.9938,.5589,0],[.9936,.5569,0],[.9934,.5549,0],[.9932,.5528,0],[.993,.5508,0],[.9928,.5488,0],[.9927,.5468,0],[.9925,.5447,0],[.9923,.5427,0],[.9921,.5407,0],[.9919,.5386,0],[.9917,.5366,0],[.9916,.5346,0],[.9914,.5325,0],[.9912,.5305,0],[.991,.5285,0],[.9908,.5265,0],[.9906,.5244,0],[.9904,.5224,0],[.9903,.5204,0],[.9901,.5183,0],[.9899,.5163,0],[.9897,.5143,0],[.9895,.5122,0],[.9893,.5102,0],[.9892,.5082,0],[.989,.5062,0],[.9888,.5041,0],[.9886,.5021,0],[.9884,.5001,0],[.9882,.498,0]]};ce.YlGn={interpolate:!0,colors:[[1,1,.898],[.999,.9996,.8926],[.998,.9993,.8872],[.997,.9989,.8818],[.9961,.9985,.8764],[.9951,.9982,.871],[.9941,.9978,.8656],[.9931,.9974,.8601],[.9921,.997,.8547],[.9911,.9967,.8493],[.9902,.9963,.8439],[.9892,.9959,.8385],[.9882,.9956,.8331],[.9872,.9952,.8277],[.9862,.9948,.8223],[.9852,.9945,.8168],[.9843,.9941,.8114],[.9833,.9937,.806],[.9823,.9934,.8006],[.9813,.993,.7952],[.9803,.9926,.7898],[.9793,.9922,.7844],[.9783,.9919,.7789],[.9774,.9915,.7735],[.9764,.9911,.7681],[.9754,.9908,.7627],[.9744,.9904,.7573],[.9734,.99,.7519],[.9724,.9897,.7465],[.9715,.9893,.7411],[.9705,.9889,.7356],[.9695,.9886,.7302],[.9682,.9881,.7252],[.9645,.9866,.7224],[.9608,.9851,.7197],[.9571,.9836,.717],[.9534,.9821,.7143],[.9497,.9807,.7116],[.946,.9792,.7089],[.9423,.9777,.7062],[.9386,.9762,.7035],[.9349,.9748,.7008],[.9313,.9733,.6981],[.9276,.9718,.6954],[.9239,.9703,.6927],[.9202,.9689,.69],[.9165,.9674,.6873],[.9128,.9659,.6846],[.9091,.9644,.6818],[.9054,.963,.6791],[.9017,.9615,.6764],[.898,.96,.6737],[.8943,.9585,.671],[.8907,.957,.6683],[.887,.9556,.6656],[.8833,.9541,.6629],[.8796,.9526,.6602],[.8759,.9511,.6575],[.8722,.9497,.6548],[.8685,.9482,.6521],[.8648,.9467,.6494],[.8611,.9452,.6467],[.8574,.9438,.644],[.8537,.9423,.6412],[.8496,.9406,.6386],[.8442,.9383,.636],[.8388,.9359,.6334],[.8334,.9336,.6308],[.828,.9312,.6282],[.8226,.9289,.6257],[.8171,.9266,.6231],[.8117,.9242,.6205],[.8063,.9219,.6179],[.8009,.9196,.6153],[.7955,.9172,.6127],[.7901,.9149,.6101],[.7847,.9125,.6076],[.7793,.9102,.605],[.7738,.9079,.6024],[.7684,.9055,.5998],[.763,.9032,.5972],[.7576,.9009,.5946],[.7522,.8985,.5921],[.7468,.8962,.5895],[.7414,.8938,.5869],[.7359,.8915,.5843],[.7305,.8892,.5817],[.7251,.8868,.5791],[.7197,.8845,.5766],[.7143,.8822,.574],[.7089,.8798,.5714],[.7035,.8775,.5688],[.6981,.8751,.5662],[.6926,.8728,.5636],[.6872,.8705,.5611],[.6818,.8681,.5585],[.676,.8656,.5559],[.6695,.8628,.5533],[.6629,.8599,.5507],[.6564,.8571,.5481],[.6499,.8543,.5456],[.6434,.8515,.543],[.6369,.8486,.5404],[.6303,.8458,.5378],[.6238,.843,.5352],[.6173,.8401,.5326],[.6108,.8373,.5301],[.6043,.8345,.5275],[.5977,.8316,.5249],[.5912,.8288,.5223],[.5847,.826,.5197],[.5782,.8232,.5171],[.5717,.8203,.5146],[.5651,.8175,.512],[.5586,.8147,.5094],[.5521,.8118,.5068],[.5456,.809,.5042],[.5391,.8062,.5016],[.5325,.8034,.4991],[.526,.8005,.4965],[.5195,.7977,.4939],[.513,.7949,.4913],[.5065,.792,.4887],[.4999,.7892,.4861],[.4934,.7864,.4836],[.4869,.7835,.481],[.4804,.7807,.4784],[.4738,.7779,.4758],[.4672,.7748,.4728],[.4604,.7715,.4693],[.4537,.7682,.4659],[.4469,.7648,.4625],[.4401,.7615,.459],[.4334,.7582,.4556],[.4266,.7549,.4521],[.4198,.7516,.4487],[.4131,.7482,.4452],[.4063,.7449,.4418],[.3995,.7416,.4383],[.3928,.7383,.4349],[.386,.7349,.4314],[.3792,.7316,.428],[.3725,.7283,.4246],[.3657,.725,.4211],[.3589,.7217,.4177],[.3522,.7183,.4142],[.3454,.715,.4108],[.3386,.7117,.4073],[.3319,.7084,.4039],[.3251,.7051,.4004],[.3183,.7017,.397],[.3116,.6984,.3936],[.3048,.6951,.3901],[.298,.6918,.3867],[.2913,.6884,.3832],[.2845,.6851,.3798],[.2777,.6818,.3763],[.271,.6785,.3729],[.2642,.6752,.3694],[.2574,.6718,.366],[.2526,.6676,.3627],[.2489,.6628,.3595],[.2452,.658,.3563],[.2415,.6532,.3531],[.2378,.6484,.3499],[.2341,.6436,.3467],[.2304,.6388,.3435],[.2268,.634,.3403],[.2231,.6292,.3371],[.2194,.6244,.3339],[.2157,.6196,.3307],[.212,.6148,.3275],[.2083,.61,.3243],[.2046,.6052,.3211],[.2009,.6004,.3179],[.1972,.5956,.3147],[.1935,.5908,.3115],[.1899,.586,.3083],[.1862,.5812,.3051],[.1825,.5764,.3019],[.1788,.5716,.2987],[.1751,.5668,.2955],[.1714,.562,.2923],[.1677,.5572,.2891],[.164,.5524,.2859],[.1603,.5476,.2827],[.1566,.5428,.2795],[.1529,.538,.2763],[.1493,.5332,.2731],[.1456,.5284,.2699],[.1419,.5236,.2667],[.1382,.5188,.2635],[.134,.5151,.2616],[.1297,.5116,.2602],[.1254,.5082,.2587],[.1211,.5047,.2572],[.1168,.5013,.2557],[.1125,.4978,.2543],[.1082,.4944,.2528],[.1039,.4909,.2513],[.0996,.4875,.2498],[.0953,.4841,.2484],[.091,.4806,.2469],[.0867,.4772,.2454],[.0824,.4737,.2439],[.078,.4703,.2424],[.0737,.4668,.241],[.0694,.4634,.2395],[.0651,.4599,.238],[.0608,.4565,.2365],[.0565,.4531,.2351],[.0522,.4496,.2336],[.0479,.4462,.2321],[.0436,.4427,.2306],[.0393,.4393,.2292],[.035,.4358,.2277],[.0307,.4324,.2262],[.0264,.4289,.2247],[.0221,.4255,.2233],[.0178,.4221,.2218],[.0135,.4186,.2203],[.0092,.4152,.2188],[.0048,.4117,.2173],[5e-4,.4083,.2159],[0,.4041,.2142],[0,.3998,.2125],[0,.3955,.2107],[0,.3912,.209],[0,.3869,.2073],[0,.3825,.2056],[0,.3782,.2038],[0,.3739,.2021],[0,.3696,.2004],[0,.3653,.1987],[0,.361,.197],[0,.3567,.1952],[0,.3524,.1935],[0,.3481,.1918],[0,.3438,.1901],[0,.3395,.1883],[0,.3352,.1866],[0,.3309,.1849],[0,.3266,.1832],[0,.3223,.1815],[0,.318,.1797],[0,.3136,.178],[0,.3093,.1763],[0,.305,.1746],[0,.3007,.1728],[0,.2964,.1711],[0,.2921,.1694],[0,.2878,.1677],[0,.2835,.166],[0,.2792,.1642],[0,.2749,.1625],[0,.2706,.1608]]};ce.YlGnBu={interpolate:!0,colors:[[1,1,.851],[.9978,.9991,.8461],[.9956,.9983,.8411],[.9934,.9974,.8362],[.9911,.9966,.8313],[.9889,.9957,.8264],[.9867,.9948,.8215],[.9845,.994,.8165],[.9823,.9931,.8116],[.9801,.9922,.8067],[.9779,.9914,.8018],[.9756,.9905,.7968],[.9734,.9897,.7919],[.9712,.9888,.787],[.969,.9879,.7821],[.9668,.9871,.7772],[.9646,.9862,.7722],[.9624,.9854,.7673],[.9601,.9845,.7624],[.9579,.9836,.7575],[.9557,.9828,.7526],[.9535,.9819,.7476],[.9513,.9811,.7427],[.9491,.9802,.7378],[.9469,.9793,.7329],[.9446,.9785,.728],[.9424,.9776,.723],[.9402,.9767,.7181],[.938,.9759,.7132],[.9358,.975,.7083],[.9336,.9742,.7033],[.9313,.9733,.6984],[.9288,.9723,.6942],[.9242,.9705,.6945],[.9195,.9686,.6949],[.9148,.9668,.6953],[.9101,.9649,.6956],[.9055,.9631,.696],[.9008,.9612,.6964],[.8961,.9594,.6967],[.8914,.9576,.6971],[.8868,.9557,.6975],[.8821,.9539,.6979],[.8774,.952,.6982],[.8727,.9502,.6986],[.8681,.9483,.699],[.8634,.9465,.6993],[.8587,.9446,.6997],[.854,.9428,.7001],[.8494,.9409,.7004],[.8447,.9391,.7008],[.84,.9373,.7012],[.8353,.9354,.7015],[.8306,.9336,.7019],[.826,.9317,.7023],[.8213,.9299,.7027],[.8166,.928,.703],[.8119,.9262,.7034],[.8073,.9243,.7038],[.8026,.9225,.7041],[.7979,.9206,.7045],[.7932,.9188,.7049],[.7886,.917,.7052],[.7839,.9151,.7056],[.7782,.9129,.7061],[.7693,.9094,.707],[.7605,.906,.7078],[.7516,.9025,.7087],[.7427,.8991,.7095],[.7339,.8956,.7104],[.725,.8922,.7113],[.7162,.8888,.7121],[.7073,.8853,.713],[.6985,.8819,.7138],[.6896,.8784,.7147],[.6807,.875,.7156],[.6719,.8715,.7164],[.663,.8681,.7173],[.6542,.8646,.7182],[.6453,.8612,.719],[.6364,.8577,.7199],[.6276,.8543,.7207],[.6187,.8509,.7216],[.6099,.8474,.7225],[.601,.844,.7233],[.5922,.8405,.7242],[.5833,.8371,.725],[.5744,.8336,.7259],[.5656,.8302,.7268],[.5567,.8267,.7276],[.5479,.8233,.7285],[.539,.8199,.7294],[.5301,.8164,.7302],[.5213,.813,.7311],[.5124,.8095,.7319],[.5036,.8061,.7328],[.4952,.8029,.7337],[.4876,.8,.7349],[.4799,.7972,.736],[.4723,.7944,.7371],[.4647,.7915,.7382],[.457,.7887,.7393],[.4494,.7859,.7404],[.4418,.7831,.7415],[.4342,.7802,.7426],[.4265,.7774,.7437],[.4189,.7746,.7448],[.4113,.7717,.7459],[.4036,.7689,.747],[.396,.7661,.7481],[.3884,.7632,.7493],[.3808,.7604,.7504],[.3731,.7576,.7515],[.3655,.7548,.7526],[.3579,.7519,.7537],[.3502,.7491,.7548],[.3426,.7463,.7559],[.335,.7434,.757],[.3274,.7406,.7581],[.3197,.7378,.7592],[.3121,.7349,.7603],[.3045,.7321,.7614],[.2969,.7293,.7625],[.2892,.7265,.7636],[.2816,.7236,.7648],[.274,.7208,.7659],[.2663,.718,.767],[.2587,.7151,.7681],[.2527,.7114,.7684],[.2483,.7069,.7679],[.2438,.7023,.7674],[.2394,.6978,.7669],[.235,.6932,.7664],[.2305,.6887,.7659],[.2261,.6841,.7654],[.2217,.6796,.7649],[.2173,.675,.7644],[.2128,.6705,.764],[.2084,.6659,.7635],[.204,.6614,.763],[.1995,.6568,.7625],[.1951,.6523,.762],[.1907,.6477,.7615],[.1863,.6432,.761],[.1818,.6386,.7605],[.1774,.6341,.76],[.173,.6295,.7595],[.1685,.625,.759],[.1641,.6204,.7585],[.1597,.6159,.758],[.1552,.6113,.7576],[.1508,.6068,.7571],[.1464,.6022,.7566],[.142,.5976,.7561],[.1375,.5931,.7556],[.1331,.5885,.7551],[.1287,.584,.7546],[.1242,.5794,.7541],[.1198,.5749,.7536],[.1154,.5703,.7531],[.1141,.5647,.7511],[.1147,.5584,.7481],[.1153,.5522,.7452],[.116,.5459,.7422],[.1166,.5396,.7393],[.1172,.5333,.7363],[.1178,.5271,.7334],[.1184,.5208,.7304],[.119,.5145,.7275],[.1196,.5082,.7245],[.1203,.502,.7216],[.1209,.4957,.7186],[.1215,.4894,.7157],[.1221,.4831,.7127],[.1227,.4769,.7098],[.1233,.4706,.7068],[.124,.4643,.7039],[.1246,.458,.7009],[.1252,.4518,.6979],[.1258,.4455,.695],[.1264,.4392,.692],[.127,.4329,.6891],[.1276,.4267,.6861],[.1283,.4204,.6832],[.1289,.4141,.6802],[.1295,.4078,.6773],[.1301,.4016,.6743],[.1307,.3953,.6714],[.1313,.389,.6684],[.1319,.3827,.6655],[.1326,.3765,.6625],[.1332,.3702,.6596],[.1336,.3648,.657],[.134,.3596,.6545],[.1343,.3544,.6521],[.1347,.3493,.6496],[.1351,.3441,.6471],[.1355,.3389,.6447],[.1358,.3337,.6422],[.1362,.3286,.6398],[.1366,.3234,.6373],[.1369,.3182,.6348],[.1373,.3131,.6324],[.1377,.3079,.6299],[.138,.3027,.6275],[.1384,.2976,.625],[.1388,.2924,.6225],[.1391,.2872,.6201],[.1395,.2821,.6176],[.1399,.2769,.6151],[.1403,.2717,.6127],[.1406,.2666,.6102],[.141,.2614,.6078],[.1414,.2562,.6053],[.1417,.2511,.6028],[.1421,.2459,.6004],[.1425,.2407,.5979],[.1428,.2356,.5955],[.1432,.2304,.593],[.1436,.2252,.5905],[.1439,.2201,.5881],[.1443,.2149,.5856],[.1447,.2097,.5832],[.1451,.2046,.5807],[.142,.2014,.5739],[.1384,.1986,.5666],[.1348,.1958,.5592],[.1313,.193,.5518],[.1277,.1901,.5444],[.1241,.1873,.537],[.1206,.1845,.5296],[.117,.1816,.5223],[.1134,.1788,.5149],[.1099,.176,.5075],[.1063,.1731,.5001],[.1027,.1703,.4927],[.0992,.1675,.4854],[.0956,.1647,.478],[.092,.1618,.4706],[.0885,.159,.4632],[.0849,.1562,.4558],[.0813,.1533,.4484],[.0778,.1505,.4411],[.0742,.1477,.4337],[.0706,.1449,.4263],[.0671,.142,.4189],[.0635,.1392,.4115],[.0599,.1364,.4042],[.0563,.1335,.3968],[.0528,.1307,.3894],[.0492,.1279,.382],[.0456,.125,.3746],[.0421,.1222,.3672],[.0385,.1194,.3599],[.0349,.1166,.3525],[.0314,.1137,.3451]]};ce.YlOrBr={interpolate:!0,colors:[[1,1,.898],[1,.999,.893],[1,.998,.888],[1,.997,.8829],[1,.9961,.8779],[1,.9951,.8728],[1,.9941,.8678],[1,.9931,.8627],[1,.9921,.8577],[1,.9911,.8526],[1,.9902,.8476],[1,.9892,.8426],[1,.9882,.8375],[1,.9872,.8325],[1,.9862,.8274],[1,.9852,.8224],[1,.9843,.8173],[1,.9833,.8123],[1,.9823,.8072],[1,.9813,.8022],[1,.9803,.7972],[1,.9793,.7921],[1,.9783,.7871],[1,.9774,.782],[1,.9764,.777],[1,.9754,.7719],[1,.9744,.7669],[1,.9734,.7618],[1,.9724,.7568],[1,.9715,.7518],[1,.9705,.7467],[1,.9695,.7417],[1,.9683,.7366],[.9999,.9659,.7313],[.9997,.9634,.726],[.9996,.9609,.7207],[.9995,.9585,.7154],[.9994,.956,.7101],[.9992,.9536,.7049],[.9991,.9511,.6996],[.999,.9486,.6943],[.9989,.9462,.689],[.9988,.9437,.6837],[.9986,.9413,.6784],[.9985,.9388,.6731],[.9984,.9363,.6678],[.9983,.9339,.6625],[.9981,.9314,.6572],[.998,.929,.6519],[.9979,.9265,.6467],[.9978,.924,.6414],[.9976,.9216,.6361],[.9975,.9191,.6308],[.9974,.9166,.6255],[.9973,.9142,.6202],[.9972,.9117,.6149],[.997,.9093,.6096],[.9969,.9068,.6043],[.9968,.9043,.599],[.9967,.9019,.5938],[.9965,.8994,.5885],[.9964,.897,.5832],[.9963,.8945,.5779],[.9962,.892,.5726],[.9961,.8892,.5666],[.9961,.8854,.5585],[.9961,.8816,.5504],[.9961,.8778,.5422],[.9961,.874,.5341],[.9961,.8702,.526],[.9961,.8664,.5179],[.9961,.8625,.5098],[.9961,.8587,.5016],[.9961,.8549,.4935],[.9961,.8511,.4854],[.9961,.8473,.4773],[.9961,.8435,.4692],[.9961,.8397,.461],[.9961,.8358,.4529],[.9961,.832,.4448],[.9961,.8282,.4367],[.9961,.8244,.4286],[.9961,.8206,.4204],[.9961,.8168,.4123],[.9961,.813,.4042],[.9961,.8092,.3961],[.9961,.8053,.388],[.9961,.8015,.3798],[.9961,.7977,.3717],[.9961,.7939,.3636],[.9961,.7901,.3555],[.9961,.7863,.3474],[.9961,.7825,.3392],[.9961,.7786,.3311],[.9961,.7748,.323],[.9961,.771,.3149],[.9961,.7666,.3081],[.9961,.7614,.3034],[.9961,.7561,.2987],[.9961,.7508,.294],[.9961,.7455,.2894],[.9961,.7402,.2847],[.9961,.7349,.28],[.9961,.7296,.2753],[.9961,.7243,.2706],[.9961,.719,.266],[.9961,.7137,.2613],[.9961,.7085,.2566],[.9961,.7032,.2519],[.9961,.6979,.2473],[.9961,.6926,.2426],[.9961,.6873,.2379],[.9961,.682,.2332],[.9961,.6767,.2286],[.9961,.6714,.2239],[.9961,.6661,.2192],[.9961,.6608,.2145],[.9961,.6555,.2099],[.9961,.6503,.2052],[.9961,.645,.2005],[.9961,.6397,.1958],[.9961,.6344,.1912],[.9961,.6291,.1865],[.9961,.6238,.1818],[.9961,.6185,.1771],[.9961,.6132,.1725],[.9961,.6079,.1678],[.9961,.6026,.1631],[.995,.5975,.1595],[.9928,.5924,.1569],[.9905,.5874,.1543],[.9883,.5823,.1517],[.9861,.5773,.1492],[.9839,.5723,.1466],[.9817,.5672,.144],[.9795,.5622,.1414],[.9773,.5571,.1388],[.975,.5521,.1362],[.9728,.547,.1337],[.9706,.542,.1311],[.9684,.5369,.1285],[.9662,.5319,.1259],[.964,.5269,.1233],[.9618,.5218,.1207],[.9595,.5168,.1182],[.9573,.5117,.1156],[.9551,.5067,.113],[.9529,.5016,.1104],[.9507,.4966,.1078],[.9485,.4915,.1052],[.9463,.4865,.1027],[.944,.4815,.1001],[.9418,.4764,.0975],[.9396,.4714,.0949],[.9374,.4663,.0923],[.9352,.4613,.0897],[.933,.4562,.0872],[.9307,.4512,.0846],[.9285,.4462,.082],[.9263,.4411,.0794],[.923,.4364,.077],[.9191,.432,.0748],[.9152,.4276,.0726],[.9112,.4232,.0704],[.9073,.4187,.0682],[.9033,.4143,.066],[.8994,.4099,.0638],[.8955,.4054,.0615],[.8915,.401,.0593],[.8876,.3966,.0571],[.8837,.3922,.0549],[.8797,.3877,.0527],[.8758,.3833,.0505],[.8718,.3789,.0483],[.8679,.3744,.046],[.864,.37,.0438],[.86,.3656,.0416],[.8561,.3612,.0394],[.8522,.3567,.0372],[.8482,.3523,.035],[.8443,.3479,.0328],[.8404,.3434,.0305],[.8364,.339,.0283],[.8325,.3346,.0261],[.8285,.3301,.0239],[.8246,.3257,.0217],[.8207,.3213,.0195],[.8167,.3169,.0173],[.8128,.3124,.015],[.8089,.308,.0128],[.8049,.3036,.0106],[.801,.2991,.0084],[.7953,.2958,.008],[.789,.2929,.0083],[.7827,.2899,.0085],[.7765,.287,.0088],[.7702,.284,.009],[.7639,.2811,.0093],[.7576,.2781,.0095],[.7514,.2752,.0098],[.7451,.2722,.01],[.7388,.2693,.0102],[.7325,.2663,.0105],[.7263,.2633,.0107],[.72,.2604,.011],[.7137,.2574,.0112],[.7075,.2545,.0115],[.7012,.2515,.0117],[.6949,.2486,.012],[.6886,.2456,.0122],[.6824,.2427,.0125],[.6761,.2397,.0127],[.6698,.2368,.0129],[.6635,.2338,.0132],[.6573,.2309,.0134],[.651,.2279,.0137],[.6447,.225,.0139],[.6384,.222,.0142],[.6322,.2191,.0144],[.6259,.2161,.0147],[.6196,.2131,.0149],[.6133,.2102,.0152],[.6071,.2072,.0154],[.6008,.2043,.0157],[.5945,.2023,.0159],[.5882,.2005,.0161],[.582,.1986,.0164],[.5757,.1968,.0166],[.5694,.1949,.0169],[.5631,.1931,.0171],[.5569,.1912,.0174],[.5506,.1894,.0176],[.5443,.1875,.0179],[.538,.1857,.0181],[.5318,.1839,.0184],[.5255,.182,.0186],[.5192,.1802,.0189],[.5129,.1783,.0191],[.5067,.1765,.0193],[.5004,.1746,.0196],[.4941,.1728,.0198],[.4878,.1709,.0201],[.4816,.1691,.0203],[.4753,.1672,.0206],[.469,.1654,.0208],[.4627,.1636,.0211],[.4565,.1617,.0213],[.4502,.1599,.0216],[.4439,.158,.0218],[.4376,.1562,.0221],[.4314,.1543,.0223],[.4251,.1525,.0225],[.4188,.1506,.0228],[.4125,.1488,.023],[.4063,.1469,.0233],[.4,.1451,.0235]]};ce.YlOrRd={interpolate:!0,colors:[[1,1,.8],[1,.9978,.7946],[1,.9956,.7892],[1,.9934,.7838],[1,.9911,.7783],[1,.9889,.7729],[1,.9867,.7675],[1,.9845,.7621],[1,.9823,.7567],[1,.9801,.7513],[1,.9779,.7459],[1,.9756,.7405],[1,.9734,.735],[1,.9712,.7296],[1,.969,.7242],[1,.9668,.7188],[1,.9646,.7134],[1,.9624,.708],[1,.9601,.7026],[1,.9579,.6971],[1,.9557,.6917],[1,.9535,.6863],[1,.9513,.6809],[1,.9491,.6755],[1,.9469,.6701],[1,.9446,.6647],[1,.9424,.6593],[1,.9402,.6538],[1,.938,.6484],[1,.9358,.643],[1,.9336,.6376],[1,.9313,.6322],[1,.9291,.6268],[.9999,.9266,.6216],[.9997,.9242,.6165],[.9996,.9217,.6113],[.9995,.9193,.6061],[.9994,.9168,.601],[.9992,.9143,.5958],[.9991,.9119,.5906],[.999,.9094,.5855],[.9989,.907,.5803],[.9988,.9045,.5751],[.9986,.902,.57],[.9985,.8996,.5648],[.9984,.8971,.5596],[.9983,.8947,.5545],[.9981,.8922,.5493],[.998,.8897,.5441],[.9979,.8873,.539],[.9978,.8848,.5338],[.9976,.8824,.5286],[.9975,.8799,.5235],[.9974,.8774,.5183],[.9973,.875,.5131],[.9972,.8725,.508],[.997,.87,.5028],[.9969,.8676,.4976],[.9968,.8651,.4925],[.9967,.8627,.4873],[.9965,.8602,.4821],[.9964,.8577,.477],[.9963,.8553,.4718],[.9962,.8528,.4666],[.9961,.8498,.4615],[.9961,.845,.4563],[.9961,.8402,.4511],[.9961,.8354,.446],[.9961,.8306,.4408],[.9961,.8258,.4356],[.9961,.821,.4304],[.9961,.8162,.4253],[.9961,.8114,.4201],[.9961,.8066,.4149],[.9961,.8018,.4098],[.9961,.797,.4046],[.9961,.7922,.3994],[.9961,.7874,.3943],[.9961,.7826,.3891],[.9961,.7778,.3839],[.9961,.773,.3788],[.9961,.7682,.3736],[.9961,.7634,.3684],[.9961,.7586,.3633],[.9961,.7538,.3581],[.9961,.749,.3529],[.9961,.7442,.3478],[.9961,.7394,.3426],[.9961,.7346,.3374],[.9961,.7298,.3323],[.9961,.725,.3271],[.9961,.7202,.3219],[.9961,.7154,.3168],[.9961,.7106,.3116],[.9961,.7058,.3064],[.9961,.701,.3013],[.996,.6963,.2973],[.9959,.6918,.2953],[.9958,.6872,.2934],[.9957,.6827,.2914],[.9955,.6781,.2894],[.9954,.6736,.2875],[.9953,.669,.2855],[.9952,.6645,.2835],[.995,.6599,.2816],[.9949,.6554,.2796],[.9948,.6508,.2776],[.9947,.6463,.2756],[.9946,.6417,.2737],[.9944,.6372,.2717],[.9943,.6326,.2697],[.9942,.6281,.2678],[.9941,.6235,.2658],[.9939,.6189,.2638],[.9938,.6144,.2619],[.9937,.6098,.2599],[.9936,.6053,.2579],[.9934,.6007,.256],[.9933,.5962,.254],[.9932,.5916,.252],[.9931,.5871,.2501],[.993,.5825,.2481],[.9928,.578,.2461],[.9927,.5734,.2442],[.9926,.5689,.2422],[.9925,.5643,.2402],[.9923,.5598,.2382],[.9922,.5552,.2363],[.9921,.5491,.2342],[.992,.5413,.232],[.9918,.5336,.2298],[.9917,.5258,.2275],[.9916,.5181,.2253],[.9915,.5103,.2231],[.9914,.5026,.2209],[.9912,.4948,.2187],[.9911,.4871,.2165],[.991,.4793,.2143],[.9909,.4716,.212],[.9907,.4638,.2098],[.9906,.4561,.2076],[.9905,.4483,.2054],[.9904,.4406,.2032],[.9902,.4328,.201],[.9901,.4251,.1988],[.99,.4173,.1965],[.9899,.4096,.1943],[.9898,.4018,.1921],[.9896,.394,.1899],[.9895,.3863,.1877],[.9894,.3785,.1855],[.9893,.3708,.1833],[.9891,.363,.181],[.989,.3553,.1788],[.9889,.3475,.1766],[.9888,.3398,.1744],[.9887,.332,.1722],[.9885,.3243,.17],[.9884,.3165,.1678],[.9883,.3088,.1655],[.9863,.3019,.1636],[.9832,.2955,.1619],[.9802,.2891,.1602],[.9771,.2827,.1585],[.974,.2763,.1567],[.9709,.2699,.155],[.9679,.2635,.1533],[.9648,.2571,.1516],[.9617,.2507,.1499],[.9586,.2443,.1481],[.9556,.2379,.1464],[.9525,.2315,.1447],[.9494,.2251,.143],[.9463,.2187,.1412],[.9433,.2123,.1395],[.9402,.2059,.1378],[.9371,.1995,.1361],[.934,.1931,.1343],[.9309,.1867,.1326],[.9279,.1803,.1309],[.9248,.1739,.1292],[.9217,.1675,.1275],[.9186,.1611,.1257],[.9156,.1547,.124],[.9125,.1483,.1223],[.9094,.1419,.1206],[.9063,.1355,.1188],[.9033,.1292,.1171],[.9002,.1228,.1154],[.8971,.1164,.1137],[.894,.11,.112],[.891,.1036,.1102],[.8867,.0996,.1107],[.882,.0964,.112],[.8773,.0932,.1132],[.8727,.09,.1144],[.868,.0868,.1156],[.8633,.0836,.1169],[.8586,.0804,.1181],[.854,.0772,.1193],[.8493,.074,.1206],[.8446,.0708,.1218],[.8399,.0676,.123],[.8353,.0644,.1243],[.8306,.0612,.1255],[.8259,.058,.1267],[.8212,.0548,.128],[.8166,.0516,.1292],[.8119,.0484,.1304],[.8072,.0452,.1316],[.8025,.042,.1329],[.7979,.0388,.1341],[.7932,.0356,.1353],[.7885,.0324,.1366],[.7838,.0292,.1378],[.7792,.026,.139],[.7745,.0228,.1403],[.7698,.0196,.1415],[.7651,.0164,.1427],[.7605,.0132,.1439],[.7558,.01,.1452],[.7511,.0068,.1464],[.7464,.0036,.1476],[.7418,4e-4,.1489],[.7346,0,.149],[.7271,0,.149],[.7196,0,.149],[.7121,0,.149],[.7046,0,.149],[.6971,0,.149],[.6896,0,.149],[.6821,0,.149],[.6746,0,.149],[.6671,0,.149],[.6596,0,.149],[.6521,0,.149],[.6446,0,.149],[.637,0,.149],[.6295,0,.149],[.622,0,.149],[.6145,0,.149],[.607,0,.149],[.5995,0,.149],[.592,0,.149],[.5845,0,.149],[.577,0,.149],[.5695,0,.149],[.562,0,.149],[.5545,0,.149],[.547,0,.149],[.5395,0,.149],[.532,0,.149],[.5245,0,.149],[.517,0,.149],[.5095,0,.149],[.502,0,.149]]};ce.afmhot={interpolate:!0,colors:[[0,0,0],[.0078,0,0],[.0157,0,0],[.0235,0,0],[.0314,0,0],[.0392,0,0],[.0471,0,0],[.0549,0,0],[.0627,0,0],[.0706,0,0],[.0784,0,0],[.0863,0,0],[.0941,0,0],[.102,0,0],[.1098,0,0],[.1176,0,0],[.1255,0,0],[.1333,0,0],[.1412,0,0],[.149,0,0],[.1569,0,0],[.1647,0,0],[.1725,0,0],[.1804,0,0],[.1882,0,0],[.1961,0,0],[.2039,0,0],[.2118,0,0],[.2196,0,0],[.2275,0,0],[.2353,0,0],[.2431,0,0],[.251,0,0],[.2588,0,0],[.2667,0,0],[.2745,0,0],[.2824,0,0],[.2902,0,0],[.298,0,0],[.3059,0,0],[.3137,0,0],[.3216,0,0],[.3294,0,0],[.3373,0,0],[.3451,0,0],[.3529,0,0],[.3608,0,0],[.3686,0,0],[.3765,0,0],[.3843,0,0],[.3922,0,0],[.4,0,0],[.4078,0,0],[.4157,0,0],[.4235,0,0],[.4314,0,0],[.4392,0,0],[.4471,0,0],[.4549,0,0],[.4627,0,0],[.4706,0,0],[.4784,0,0],[.4863,0,0],[.4941,0,0],[.502,.002,0],[.5098,.0098,0],[.5176,.0176,0],[.5255,.0255,0],[.5333,.0333,0],[.5412,.0412,0],[.549,.049,0],[.5569,.0569,0],[.5647,.0647,0],[.5725,.0725,0],[.5804,.0804,0],[.5882,.0882,0],[.5961,.0961,0],[.6039,.1039,0],[.6118,.1118,0],[.6196,.1196,0],[.6275,.1275,0],[.6353,.1353,0],[.6431,.1431,0],[.651,.151,0],[.6588,.1588,0],[.6667,.1667,0],[.6745,.1745,0],[.6824,.1824,0],[.6902,.1902,0],[.698,.198,0],[.7059,.2059,0],[.7137,.2137,0],[.7216,.2216,0],[.7294,.2294,0],[.7373,.2373,0],[.7451,.2451,0],[.7529,.2529,0],[.7608,.2608,0],[.7686,.2686,0],[.7765,.2765,0],[.7843,.2843,0],[.7922,.2922,0],[.8,.3,0],[.8078,.3078,0],[.8157,.3157,0],[.8235,.3235,0],[.8314,.3314,0],[.8392,.3392,0],[.8471,.3471,0],[.8549,.3549,0],[.8627,.3627,0],[.8706,.3706,0],[.8784,.3784,0],[.8863,.3863,0],[.8941,.3941,0],[.902,.402,0],[.9098,.4098,0],[.9176,.4176,0],[.9255,.4255,0],[.9333,.4333,0],[.9412,.4412,0],[.949,.449,0],[.9569,.4569,0],[.9647,.4647,0],[.9725,.4725,0],[.9804,.4804,0],[.9882,.4882,0],[.9961,.4961,0],[1,.5039,.0039],[1,.5118,.0118],[1,.5196,.0196],[1,.5275,.0275],[1,.5353,.0353],[1,.5431,.0431],[1,.551,.051],[1,.5588,.0588],[1,.5667,.0667],[1,.5745,.0745],[1,.5824,.0824],[1,.5902,.0902],[1,.598,.098],[1,.6059,.1059],[1,.6137,.1137],[1,.6216,.1216],[1,.6294,.1294],[1,.6373,.1373],[1,.6451,.1451],[1,.6529,.1529],[1,.6608,.1608],[1,.6686,.1686],[1,.6765,.1765],[1,.6843,.1843],[1,.6922,.1922],[1,.7,.2],[1,.7078,.2078],[1,.7157,.2157],[1,.7235,.2235],[1,.7314,.2314],[1,.7392,.2392],[1,.7471,.2471],[1,.7549,.2549],[1,.7627,.2627],[1,.7706,.2706],[1,.7784,.2784],[1,.7863,.2863],[1,.7941,.2941],[1,.802,.302],[1,.8098,.3098],[1,.8176,.3176],[1,.8255,.3255],[1,.8333,.3333],[1,.8412,.3412],[1,.849,.349],[1,.8569,.3569],[1,.8647,.3647],[1,.8725,.3725],[1,.8804,.3804],[1,.8882,.3882],[1,.8961,.3961],[1,.9039,.4039],[1,.9118,.4118],[1,.9196,.4196],[1,.9275,.4275],[1,.9353,.4353],[1,.9431,.4431],[1,.951,.451],[1,.9588,.4588],[1,.9667,.4667],[1,.9745,.4745],[1,.9824,.4824],[1,.9902,.4902],[1,.998,.498],[1,1,.5059],[1,1,.5137],[1,1,.5216],[1,1,.5294],[1,1,.5373],[1,1,.5451],[1,1,.5529],[1,1,.5608],[1,1,.5686],[1,1,.5765],[1,1,.5843],[1,1,.5922],[1,1,.6],[1,1,.6078],[1,1,.6157],[1,1,.6235],[1,1,.6314],[1,1,.6392],[1,1,.6471],[1,1,.6549],[1,1,.6627],[1,1,.6706],[1,1,.6784],[1,1,.6863],[1,1,.6941],[1,1,.702],[1,1,.7098],[1,1,.7176],[1,1,.7255],[1,1,.7333],[1,1,.7412],[1,1,.749],[1,1,.7569],[1,1,.7647],[1,1,.7725],[1,1,.7804],[1,1,.7882],[1,1,.7961],[1,1,.8039],[1,1,.8118],[1,1,.8196],[1,1,.8275],[1,1,.8353],[1,1,.8431],[1,1,.851],[1,1,.8588],[1,1,.8667],[1,1,.8745],[1,1,.8824],[1,1,.8902],[1,1,.898],[1,1,.9059],[1,1,.9137],[1,1,.9216],[1,1,.9294],[1,1,.9373],[1,1,.9451],[1,1,.9529],[1,1,.9608],[1,1,.9686],[1,1,.9765],[1,1,.9843],[1,1,.9922],[1,1,1]]};ce.autumn={interpolate:!0,colors:[[1,0,0],[1,.0039,0],[1,.0078,0],[1,.0118,0],[1,.0157,0],[1,.0196,0],[1,.0235,0],[1,.0275,0],[1,.0314,0],[1,.0353,0],[1,.0392,0],[1,.0431,0],[1,.0471,0],[1,.051,0],[1,.0549,0],[1,.0588,0],[1,.0627,0],[1,.0667,0],[1,.0706,0],[1,.0745,0],[1,.0784,0],[1,.0824,0],[1,.0863,0],[1,.0902,0],[1,.0941,0],[1,.098,0],[1,.102,0],[1,.1059,0],[1,.1098,0],[1,.1137,0],[1,.1176,0],[1,.1216,0],[1,.1255,0],[1,.1294,0],[1,.1333,0],[1,.1373,0],[1,.1412,0],[1,.1451,0],[1,.149,0],[1,.1529,0],[1,.1569,0],[1,.1608,0],[1,.1647,0],[1,.1686,0],[1,.1725,0],[1,.1765,0],[1,.1804,0],[1,.1843,0],[1,.1882,0],[1,.1922,0],[1,.1961,0],[1,.2,0],[1,.2039,0],[1,.2078,0],[1,.2118,0],[1,.2157,0],[1,.2196,0],[1,.2235,0],[1,.2275,0],[1,.2314,0],[1,.2353,0],[1,.2392,0],[1,.2431,0],[1,.2471,0],[1,.251,0],[1,.2549,0],[1,.2588,0],[1,.2627,0],[1,.2667,0],[1,.2706,0],[1,.2745,0],[1,.2784,0],[1,.2824,0],[1,.2863,0],[1,.2902,0],[1,.2941,0],[1,.298,0],[1,.302,0],[1,.3059,0],[1,.3098,0],[1,.3137,0],[1,.3176,0],[1,.3216,0],[1,.3255,0],[1,.3294,0],[1,.3333,0],[1,.3373,0],[1,.3412,0],[1,.3451,0],[1,.349,0],[1,.3529,0],[1,.3569,0],[1,.3608,0],[1,.3647,0],[1,.3686,0],[1,.3725,0],[1,.3765,0],[1,.3804,0],[1,.3843,0],[1,.3882,0],[1,.3922,0],[1,.3961,0],[1,.4,0],[1,.4039,0],[1,.4078,0],[1,.4118,0],[1,.4157,0],[1,.4196,0],[1,.4235,0],[1,.4275,0],[1,.4314,0],[1,.4353,0],[1,.4392,0],[1,.4431,0],[1,.4471,0],[1,.451,0],[1,.4549,0],[1,.4588,0],[1,.4627,0],[1,.4667,0],[1,.4706,0],[1,.4745,0],[1,.4784,0],[1,.4824,0],[1,.4863,0],[1,.4902,0],[1,.4941,0],[1,.498,0],[1,.502,0],[1,.5059,0],[1,.5098,0],[1,.5137,0],[1,.5176,0],[1,.5216,0],[1,.5255,0],[1,.5294,0],[1,.5333,0],[1,.5373,0],[1,.5412,0],[1,.5451,0],[1,.549,0],[1,.5529,0],[1,.5569,0],[1,.5608,0],[1,.5647,0],[1,.5686,0],[1,.5725,0],[1,.5765,0],[1,.5804,0],[1,.5843,0],[1,.5882,0],[1,.5922,0],[1,.5961,0],[1,.6,0],[1,.6039,0],[1,.6078,0],[1,.6118,0],[1,.6157,0],[1,.6196,0],[1,.6235,0],[1,.6275,0],[1,.6314,0],[1,.6353,0],[1,.6392,0],[1,.6431,0],[1,.6471,0],[1,.651,0],[1,.6549,0],[1,.6588,0],[1,.6627,0],[1,.6667,0],[1,.6706,0],[1,.6745,0],[1,.6784,0],[1,.6824,0],[1,.6863,0],[1,.6902,0],[1,.6941,0],[1,.698,0],[1,.702,0],[1,.7059,0],[1,.7098,0],[1,.7137,0],[1,.7176,0],[1,.7216,0],[1,.7255,0],[1,.7294,0],[1,.7333,0],[1,.7373,0],[1,.7412,0],[1,.7451,0],[1,.749,0],[1,.7529,0],[1,.7569,0],[1,.7608,0],[1,.7647,0],[1,.7686,0],[1,.7725,0],[1,.7765,0],[1,.7804,0],[1,.7843,0],[1,.7882,0],[1,.7922,0],[1,.7961,0],[1,.8,0],[1,.8039,0],[1,.8078,0],[1,.8118,0],[1,.8157,0],[1,.8196,0],[1,.8235,0],[1,.8275,0],[1,.8314,0],[1,.8353,0],[1,.8392,0],[1,.8431,0],[1,.8471,0],[1,.851,0],[1,.8549,0],[1,.8588,0],[1,.8627,0],[1,.8667,0],[1,.8706,0],[1,.8745,0],[1,.8784,0],[1,.8824,0],[1,.8863,0],[1,.8902,0],[1,.8941,0],[1,.898,0],[1,.902,0],[1,.9059,0],[1,.9098,0],[1,.9137,0],[1,.9176,0],[1,.9216,0],[1,.9255,0],[1,.9294,0],[1,.9333,0],[1,.9373,0],[1,.9412,0],[1,.9451,0],[1,.949,0],[1,.9529,0],[1,.9569,0],[1,.9608,0],[1,.9647,0],[1,.9686,0],[1,.9725,0],[1,.9765,0],[1,.9804,0],[1,.9843,0],[1,.9882,0],[1,.9922,0],[1,.9961,0],[1,1,0]]};ce.binary={interpolate:!0,colors:[[1,1,1],[.9961,.9961,.9961],[.9922,.9922,.9922],[.9882,.9882,.9882],[.9843,.9843,.9843],[.9804,.9804,.9804],[.9765,.9765,.9765],[.9725,.9725,.9725],[.9686,.9686,.9686],[.9647,.9647,.9647],[.9608,.9608,.9608],[.9569,.9569,.9569],[.9529,.9529,.9529],[.949,.949,.949],[.9451,.9451,.9451],[.9412,.9412,.9412],[.9373,.9373,.9373],[.9333,.9333,.9333],[.9294,.9294,.9294],[.9255,.9255,.9255],[.9216,.9216,.9216],[.9176,.9176,.9176],[.9137,.9137,.9137],[.9098,.9098,.9098],[.9059,.9059,.9059],[.902,.902,.902],[.898,.898,.898],[.8941,.8941,.8941],[.8902,.8902,.8902],[.8863,.8863,.8863],[.8824,.8824,.8824],[.8784,.8784,.8784],[.8745,.8745,.8745],[.8706,.8706,.8706],[.8667,.8667,.8667],[.8627,.8627,.8627],[.8588,.8588,.8588],[.8549,.8549,.8549],[.851,.851,.851],[.8471,.8471,.8471],[.8431,.8431,.8431],[.8392,.8392,.8392],[.8353,.8353,.8353],[.8314,.8314,.8314],[.8275,.8275,.8275],[.8235,.8235,.8235],[.8196,.8196,.8196],[.8157,.8157,.8157],[.8118,.8118,.8118],[.8078,.8078,.8078],[.8039,.8039,.8039],[.8,.8,.8],[.7961,.7961,.7961],[.7922,.7922,.7922],[.7882,.7882,.7882],[.7843,.7843,.7843],[.7804,.7804,.7804],[.7765,.7765,.7765],[.7725,.7725,.7725],[.7686,.7686,.7686],[.7647,.7647,.7647],[.7608,.7608,.7608],[.7569,.7569,.7569],[.7529,.7529,.7529],[.749,.749,.749],[.7451,.7451,.7451],[.7412,.7412,.7412],[.7373,.7373,.7373],[.7333,.7333,.7333],[.7294,.7294,.7294],[.7255,.7255,.7255],[.7216,.7216,.7216],[.7176,.7176,.7176],[.7137,.7137,.7137],[.7098,.7098,.7098],[.7059,.7059,.7059],[.702,.702,.702],[.698,.698,.698],[.6941,.6941,.6941],[.6902,.6902,.6902],[.6863,.6863,.6863],[.6824,.6824,.6824],[.6784,.6784,.6784],[.6745,.6745,.6745],[.6706,.6706,.6706],[.6667,.6667,.6667],[.6627,.6627,.6627],[.6588,.6588,.6588],[.6549,.6549,.6549],[.651,.651,.651],[.6471,.6471,.6471],[.6431,.6431,.6431],[.6392,.6392,.6392],[.6353,.6353,.6353],[.6314,.6314,.6314],[.6275,.6275,.6275],[.6235,.6235,.6235],[.6196,.6196,.6196],[.6157,.6157,.6157],[.6118,.6118,.6118],[.6078,.6078,.6078],[.6039,.6039,.6039],[.6,.6,.6],[.5961,.5961,.5961],[.5922,.5922,.5922],[.5882,.5882,.5882],[.5843,.5843,.5843],[.5804,.5804,.5804],[.5765,.5765,.5765],[.5725,.5725,.5725],[.5686,.5686,.5686],[.5647,.5647,.5647],[.5608,.5608,.5608],[.5569,.5569,.5569],[.5529,.5529,.5529],[.549,.549,.549],[.5451,.5451,.5451],[.5412,.5412,.5412],[.5373,.5373,.5373],[.5333,.5333,.5333],[.5294,.5294,.5294],[.5255,.5255,.5255],[.5216,.5216,.5216],[.5176,.5176,.5176],[.5137,.5137,.5137],[.5098,.5098,.5098],[.5059,.5059,.5059],[.502,.502,.502],[.498,.498,.498],[.4941,.4941,.4941],[.4902,.4902,.4902],[.4863,.4863,.4863],[.4824,.4824,.4824],[.4784,.4784,.4784],[.4745,.4745,.4745],[.4706,.4706,.4706],[.4667,.4667,.4667],[.4627,.4627,.4627],[.4588,.4588,.4588],[.4549,.4549,.4549],[.451,.451,.451],[.4471,.4471,.4471],[.4431,.4431,.4431],[.4392,.4392,.4392],[.4353,.4353,.4353],[.4314,.4314,.4314],[.4275,.4275,.4275],[.4235,.4235,.4235],[.4196,.4196,.4196],[.4157,.4157,.4157],[.4118,.4118,.4118],[.4078,.4078,.4078],[.4039,.4039,.4039],[.4,.4,.4],[.3961,.3961,.3961],[.3922,.3922,.3922],[.3882,.3882,.3882],[.3843,.3843,.3843],[.3804,.3804,.3804],[.3765,.3765,.3765],[.3725,.3725,.3725],[.3686,.3686,.3686],[.3647,.3647,.3647],[.3608,.3608,.3608],[.3569,.3569,.3569],[.3529,.3529,.3529],[.349,.349,.349],[.3451,.3451,.3451],[.3412,.3412,.3412],[.3373,.3373,.3373],[.3333,.3333,.3333],[.3294,.3294,.3294],[.3255,.3255,.3255],[.3216,.3216,.3216],[.3176,.3176,.3176],[.3137,.3137,.3137],[.3098,.3098,.3098],[.3059,.3059,.3059],[.302,.302,.302],[.298,.298,.298],[.2941,.2941,.2941],[.2902,.2902,.2902],[.2863,.2863,.2863],[.2824,.2824,.2824],[.2784,.2784,.2784],[.2745,.2745,.2745],[.2706,.2706,.2706],[.2667,.2667,.2667],[.2627,.2627,.2627],[.2588,.2588,.2588],[.2549,.2549,.2549],[.251,.251,.251],[.2471,.2471,.2471],[.2431,.2431,.2431],[.2392,.2392,.2392],[.2353,.2353,.2353],[.2314,.2314,.2314],[.2275,.2275,.2275],[.2235,.2235,.2235],[.2196,.2196,.2196],[.2157,.2157,.2157],[.2118,.2118,.2118],[.2078,.2078,.2078],[.2039,.2039,.2039],[.2,.2,.2],[.1961,.1961,.1961],[.1922,.1922,.1922],[.1882,.1882,.1882],[.1843,.1843,.1843],[.1804,.1804,.1804],[.1765,.1765,.1765],[.1725,.1725,.1725],[.1686,.1686,.1686],[.1647,.1647,.1647],[.1608,.1608,.1608],[.1569,.1569,.1569],[.1529,.1529,.1529],[.149,.149,.149],[.1451,.1451,.1451],[.1412,.1412,.1412],[.1373,.1373,.1373],[.1333,.1333,.1333],[.1294,.1294,.1294],[.1255,.1255,.1255],[.1216,.1216,.1216],[.1176,.1176,.1176],[.1137,.1137,.1137],[.1098,.1098,.1098],[.1059,.1059,.1059],[.102,.102,.102],[.098,.098,.098],[.0941,.0941,.0941],[.0902,.0902,.0902],[.0863,.0863,.0863],[.0824,.0824,.0824],[.0784,.0784,.0784],[.0745,.0745,.0745],[.0706,.0706,.0706],[.0667,.0667,.0667],[.0627,.0627,.0627],[.0588,.0588,.0588],[.0549,.0549,.0549],[.051,.051,.051],[.0471,.0471,.0471],[.0431,.0431,.0431],[.0392,.0392,.0392],[.0353,.0353,.0353],[.0314,.0314,.0314],[.0275,.0275,.0275],[.0235,.0235,.0235],[.0196,.0196,.0196],[.0157,.0157,.0157],[.0118,.0118,.0118],[.0078,.0078,.0078],[.0039,.0039,.0039],[0,0,0]]};ce.bone={interpolate:!0,colors:[[0,0,0],[.0034,.0034,.0048],[.0069,.0069,.0095],[.0103,.0103,.0143],[.0137,.0137,.0191],[.0172,.0172,.0239],[.0206,.0206,.0286],[.024,.024,.0334],[.0275,.0275,.0382],[.0309,.0309,.043],[.0343,.0343,.0477],[.0377,.0377,.0525],[.0412,.0412,.0573],[.0446,.0446,.0621],[.048,.048,.0668],[.0515,.0515,.0716],[.0549,.0549,.0764],[.0583,.0583,.0812],[.0618,.0618,.0859],[.0652,.0652,.0907],[.0686,.0686,.0955],[.0721,.0721,.1003],[.0755,.0755,.105],[.0789,.0789,.1098],[.0824,.0824,.1146],[.0858,.0858,.1194],[.0892,.0892,.1241],[.0926,.0926,.1289],[.0961,.0961,.1337],[.0995,.0995,.1384],[.1029,.1029,.1432],[.1064,.1064,.148],[.1098,.1098,.1528],[.1132,.1132,.1575],[.1167,.1167,.1623],[.1201,.1201,.1671],[.1235,.1235,.1719],[.127,.127,.1766],[.1304,.1304,.1814],[.1338,.1338,.1862],[.1373,.1373,.191],[.1407,.1407,.1957],[.1441,.1441,.2005],[.1475,.1475,.2053],[.151,.151,.2101],[.1544,.1544,.2148],[.1578,.1578,.2196],[.1613,.1613,.2244],[.1647,.1647,.2292],[.1681,.1681,.2339],[.1716,.1716,.2387],[.175,.175,.2435],[.1784,.1784,.2483],[.1819,.1819,.253],[.1853,.1853,.2578],[.1887,.1887,.2626],[.1922,.1922,.2673],[.1956,.1956,.2721],[.199,.199,.2769],[.2025,.2025,.2817],[.2059,.2059,.2864],[.2093,.2093,.2912],[.2127,.2127,.296],[.2162,.2162,.3008],[.2196,.2196,.3055],[.223,.223,.3103],[.2265,.2265,.3151],[.2299,.2299,.3199],[.2333,.2333,.3246],[.2368,.2368,.3294],[.2402,.2402,.3342],[.2436,.2436,.339],[.2471,.2471,.3437],[.2505,.2505,.3485],[.2539,.2539,.3533],[.2574,.2574,.3581],[.2608,.2608,.3628],[.2642,.2642,.3676],[.2676,.2676,.3724],[.2711,.2711,.3772],[.2745,.2745,.3819],[.2779,.2779,.3867],[.2814,.2814,.3915],[.2848,.2848,.3962],[.2882,.2882,.401],[.2917,.2917,.4058],[.2951,.2951,.4106],[.2985,.2985,.4153],[.302,.302,.4201],[.3054,.3054,.4249],[.3088,.3088,.4297],[.3123,.3123,.4344],[.3157,.3157,.4392],[.3191,.3191,.444],[.3225,.3237,.4475],[.326,.3284,.451],[.3294,.3331,.4544],[.3328,.3379,.4578],[.3363,.3426,.4613],[.3397,.3473,.4647],[.3431,.352,.4681],[.3466,.3567,.4716],[.35,.3615,.475],[.3534,.3662,.4784],[.3569,.3709,.4819],[.3603,.3756,.4853],[.3637,.3803,.4887],[.3672,.385,.4922],[.3706,.3898,.4956],[.374,.3945,.499],[.3775,.3992,.5025],[.3809,.4039,.5059],[.3843,.4086,.5093],[.3877,.4134,.5127],[.3912,.4181,.5162],[.3946,.4228,.5196],[.398,.4275,.523],[.4015,.4322,.5265],[.4049,.4369,.5299],[.4083,.4417,.5333],[.4118,.4464,.5368],[.4152,.4511,.5402],[.4186,.4558,.5436],[.4221,.4605,.5471],[.4255,.4653,.5505],[.4289,.47,.5539],[.4324,.4747,.5574],[.4358,.4794,.5608],[.4392,.4841,.5642],[.4426,.4888,.5676],[.4461,.4936,.5711],[.4495,.4983,.5745],[.4529,.503,.5779],[.4564,.5077,.5814],[.4598,.5124,.5848],[.4632,.5172,.5882],[.4667,.5219,.5917],[.4701,.5266,.5951],[.4735,.5313,.5985],[.477,.536,.602],[.4804,.5407,.6054],[.4838,.5455,.6088],[.4873,.5502,.6123],[.4907,.5549,.6157],[.4941,.5596,.6191],[.4975,.5643,.6225],[.501,.5691,.626],[.5044,.5738,.6294],[.5078,.5785,.6328],[.5113,.5832,.6363],[.5147,.5879,.6397],[.5181,.5926,.6431],[.5216,.5974,.6466],[.525,.6021,.65],[.5284,.6068,.6534],[.5319,.6115,.6569],[.5353,.6162,.6603],[.5387,.621,.6637],[.5422,.6257,.6672],[.5456,.6304,.6706],[.549,.6351,.674],[.5525,.6398,.6775],[.5559,.6445,.6809],[.5593,.6493,.6843],[.5627,.654,.6877],[.5662,.6587,.6912],[.5696,.6634,.6946],[.573,.6681,.698],[.5765,.6729,.7015],[.5799,.6776,.7049],[.5833,.6823,.7083],[.5868,.687,.7118],[.5902,.6917,.7152],[.5936,.6964,.7186],[.5971,.7012,.7221],[.6005,.7059,.7255],[.6039,.7106,.7289],[.6074,.7153,.7324],[.6108,.72,.7358],[.6142,.7248,.7392],[.6176,.7295,.7426],[.6211,.7342,.7461],[.6245,.7389,.7495],[.6279,.7436,.7529],[.6314,.7483,.7564],[.6348,.7531,.7598],[.6382,.7578,.7632],[.6417,.7625,.7667],[.6451,.7672,.7701],[.6485,.7719,.7735],[.652,.7767,.777],[.6569,.7804,.7804],[.6622,.7838,.7838],[.6676,.7873,.7873],[.6729,.7907,.7907],[.6783,.7941,.7941],[.6837,.7975,.7975],[.689,.801,.801],[.6944,.8044,.8044],[.6998,.8078,.8078],[.7051,.8113,.8113],[.7105,.8147,.8147],[.7158,.8181,.8181],[.7212,.8216,.8216],[.7266,.825,.825],[.7319,.8284,.8284],[.7373,.8319,.8319],[.7426,.8353,.8353],[.748,.8387,.8387],[.7534,.8422,.8422],[.7587,.8456,.8456],[.7641,.849,.849],[.7695,.8525,.8525],[.7748,.8559,.8559],[.7802,.8593,.8593],[.7855,.8627,.8627],[.7909,.8662,.8662],[.7963,.8696,.8696],[.8016,.873,.873],[.807,.8765,.8765],[.8123,.8799,.8799],[.8177,.8833,.8833],[.8231,.8868,.8868],[.8284,.8902,.8902],[.8338,.8936,.8936],[.8392,.8971,.8971],[.8445,.9005,.9005],[.8499,.9039,.9039],[.8552,.9074,.9074],[.8606,.9108,.9108],[.866,.9142,.9142],[.8713,.9176,.9176],[.8767,.9211,.9211],[.882,.9245,.9245],[.8874,.9279,.9279],[.8928,.9314,.9314],[.8981,.9348,.9348],[.9035,.9382,.9382],[.9089,.9417,.9417],[.9142,.9451,.9451],[.9196,.9485,.9485],[.9249,.952,.952],[.9303,.9554,.9554],[.9357,.9588,.9588],[.941,.9623,.9623],[.9464,.9657,.9657],[.9517,.9691,.9691],[.9571,.9725,.9725],[.9625,.976,.976],[.9678,.9794,.9794],[.9732,.9828,.9828],[.9786,.9863,.9863],[.9839,.9897,.9897],[.9893,.9931,.9931],[.9946,.9966,.9966],[1,1,1]]};ce.brg={interpolate:!0,colors:[[0,0,1],[.0078,0,.9922],[.0157,0,.9843],[.0235,0,.9765],[.0314,0,.9686],[.0392,0,.9608],[.0471,0,.9529],[.0549,0,.9451],[.0627,0,.9373],[.0706,0,.9294],[.0784,0,.9216],[.0863,0,.9137],[.0941,0,.9059],[.102,0,.898],[.1098,0,.8902],[.1176,0,.8824],[.1255,0,.8745],[.1333,0,.8667],[.1412,0,.8588],[.149,0,.851],[.1569,0,.8431],[.1647,0,.8353],[.1725,0,.8275],[.1804,0,.8196],[.1882,0,.8118],[.1961,0,.8039],[.2039,0,.7961],[.2118,0,.7882],[.2196,0,.7804],[.2275,0,.7725],[.2353,0,.7647],[.2431,0,.7569],[.251,0,.749],[.2588,0,.7412],[.2667,0,.7333],[.2745,0,.7255],[.2824,0,.7176],[.2902,0,.7098],[.298,0,.702],[.3059,0,.6941],[.3137,0,.6863],[.3216,0,.6784],[.3294,0,.6706],[.3373,0,.6627],[.3451,0,.6549],[.3529,0,.6471],[.3608,0,.6392],[.3686,0,.6314],[.3765,0,.6235],[.3843,0,.6157],[.3922,0,.6078],[.4,0,.6],[.4078,0,.5922],[.4157,0,.5843],[.4235,0,.5765],[.4314,0,.5686],[.4392,0,.5608],[.4471,0,.5529],[.4549,0,.5451],[.4627,0,.5373],[.4706,0,.5294],[.4784,0,.5216],[.4863,0,.5137],[.4941,0,.5059],[.502,0,.498],[.5098,0,.4902],[.5176,0,.4824],[.5255,0,.4745],[.5333,0,.4667],[.5412,0,.4588],[.549,0,.451],[.5569,0,.4431],[.5647,0,.4353],[.5725,0,.4275],[.5804,0,.4196],[.5882,0,.4118],[.5961,0,.4039],[.6039,0,.3961],[.6118,0,.3882],[.6196,0,.3804],[.6275,0,.3725],[.6353,0,.3647],[.6431,0,.3569],[.651,0,.349],[.6588,0,.3412],[.6667,0,.3333],[.6745,0,.3255],[.6824,0,.3176],[.6902,0,.3098],[.698,0,.302],[.7059,0,.2941],[.7137,0,.2863],[.7216,0,.2784],[.7294,0,.2706],[.7373,0,.2627],[.7451,0,.2549],[.7529,0,.2471],[.7608,0,.2392],[.7686,0,.2314],[.7765,0,.2235],[.7843,0,.2157],[.7922,0,.2078],[.8,0,.2],[.8078,0,.1922],[.8157,0,.1843],[.8235,0,.1765],[.8314,0,.1686],[.8392,0,.1608],[.8471,0,.1529],[.8549,0,.1451],[.8627,0,.1373],[.8706,0,.1294],[.8784,0,.1216],[.8863,0,.1137],[.8941,0,.1059],[.902,0,.098],[.9098,0,.0902],[.9176,0,.0824],[.9255,0,.0745],[.9333,0,.0667],[.9412,0,.0588],[.949,0,.051],[.9569,0,.0431],[.9647,0,.0353],[.9725,0,.0275],[.9804,0,.0196],[.9882,0,.0118],[.9961,0,.0039],[.9961,.0039,0],[.9882,.0118,0],[.9804,.0196,0],[.9725,.0275,0],[.9647,.0353,0],[.9569,.0431,0],[.949,.051,0],[.9412,.0588,0],[.9333,.0667,0],[.9255,.0745,0],[.9176,.0824,0],[.9098,.0902,0],[.902,.098,0],[.8941,.1059,0],[.8863,.1137,0],[.8784,.1216,0],[.8706,.1294,0],[.8627,.1373,0],[.8549,.1451,0],[.8471,.1529,0],[.8392,.1608,0],[.8314,.1686,0],[.8235,.1765,0],[.8157,.1843,0],[.8078,.1922,0],[.8,.2,0],[.7922,.2078,0],[.7843,.2157,0],[.7765,.2235,0],[.7686,.2314,0],[.7608,.2392,0],[.7529,.2471,0],[.7451,.2549,0],[.7373,.2627,0],[.7294,.2706,0],[.7216,.2784,0],[.7137,.2863,0],[.7059,.2941,0],[.698,.302,0],[.6902,.3098,0],[.6824,.3176,0],[.6745,.3255,0],[.6667,.3333,0],[.6588,.3412,0],[.651,.349,0],[.6431,.3569,0],[.6353,.3647,0],[.6275,.3725,0],[.6196,.3804,0],[.6118,.3882,0],[.6039,.3961,0],[.5961,.4039,0],[.5882,.4118,0],[.5804,.4196,0],[.5725,.4275,0],[.5647,.4353,0],[.5569,.4431,0],[.549,.451,0],[.5412,.4588,0],[.5333,.4667,0],[.5255,.4745,0],[.5176,.4824,0],[.5098,.4902,0],[.502,.498,0],[.4941,.5059,0],[.4863,.5137,0],[.4784,.5216,0],[.4706,.5294,0],[.4627,.5373,0],[.4549,.5451,0],[.4471,.5529,0],[.4392,.5608,0],[.4314,.5686,0],[.4235,.5765,0],[.4157,.5843,0],[.4078,.5922,0],[.4,.6,0],[.3922,.6078,0],[.3843,.6157,0],[.3765,.6235,0],[.3686,.6314,0],[.3608,.6392,0],[.3529,.6471,0],[.3451,.6549,0],[.3373,.6627,0],[.3294,.6706,0],[.3216,.6784,0],[.3137,.6863,0],[.3059,.6941,0],[.298,.702,0],[.2902,.7098,0],[.2824,.7176,0],[.2745,.7255,0],[.2667,.7333,0],[.2588,.7412,0],[.251,.749,0],[.2431,.7569,0],[.2353,.7647,0],[.2275,.7725,0],[.2196,.7804,0],[.2118,.7882,0],[.2039,.7961,0],[.1961,.8039,0],[.1882,.8118,0],[.1804,.8196,0],[.1725,.8275,0],[.1647,.8353,0],[.1569,.8431,0],[.149,.851,0],[.1412,.8588,0],[.1333,.8667,0],[.1255,.8745,0],[.1176,.8824,0],[.1098,.8902,0],[.102,.898,0],[.0941,.9059,0],[.0863,.9137,0],[.0784,.9216,0],[.0706,.9294,0],[.0627,.9373,0],[.0549,.9451,0],[.0471,.9529,0],[.0392,.9608,0],[.0314,.9686,0],[.0235,.9765,0],[.0157,.9843,0],[.0078,.9922,0],[0,1,0]]};ce.bwr={interpolate:!0,colors:[[0,0,1],[.0078,.0078,1],[.0157,.0157,1],[.0235,.0235,1],[.0314,.0314,1],[.0392,.0392,1],[.0471,.0471,1],[.0549,.0549,1],[.0627,.0627,1],[.0706,.0706,1],[.0784,.0784,1],[.0863,.0863,1],[.0941,.0941,1],[.102,.102,1],[.1098,.1098,1],[.1176,.1176,1],[.1255,.1255,1],[.1333,.1333,1],[.1412,.1412,1],[.149,.149,1],[.1569,.1569,1],[.1647,.1647,1],[.1725,.1725,1],[.1804,.1804,1],[.1882,.1882,1],[.1961,.1961,1],[.2039,.2039,1],[.2118,.2118,1],[.2196,.2196,1],[.2275,.2275,1],[.2353,.2353,1],[.2431,.2431,1],[.251,.251,1],[.2588,.2588,1],[.2667,.2667,1],[.2745,.2745,1],[.2824,.2824,1],[.2902,.2902,1],[.298,.298,1],[.3059,.3059,1],[.3137,.3137,1],[.3216,.3216,1],[.3294,.3294,1],[.3373,.3373,1],[.3451,.3451,1],[.3529,.3529,1],[.3608,.3608,1],[.3686,.3686,1],[.3765,.3765,1],[.3843,.3843,1],[.3922,.3922,1],[.4,.4,1],[.4078,.4078,1],[.4157,.4157,1],[.4235,.4235,1],[.4314,.4314,1],[.4392,.4392,1],[.4471,.4471,1],[.4549,.4549,1],[.4627,.4627,1],[.4706,.4706,1],[.4784,.4784,1],[.4863,.4863,1],[.4941,.4941,1],[.502,.502,1],[.5098,.5098,1],[.5176,.5176,1],[.5255,.5255,1],[.5333,.5333,1],[.5412,.5412,1],[.549,.549,1],[.5569,.5569,1],[.5647,.5647,1],[.5725,.5725,1],[.5804,.5804,1],[.5882,.5882,1],[.5961,.5961,1],[.6039,.6039,1],[.6118,.6118,1],[.6196,.6196,1],[.6275,.6275,1],[.6353,.6353,1],[.6431,.6431,1],[.651,.651,1],[.6588,.6588,1],[.6667,.6667,1],[.6745,.6745,1],[.6824,.6824,1],[.6902,.6902,1],[.698,.698,1],[.7059,.7059,1],[.7137,.7137,1],[.7216,.7216,1],[.7294,.7294,1],[.7373,.7373,1],[.7451,.7451,1],[.7529,.7529,1],[.7608,.7608,1],[.7686,.7686,1],[.7765,.7765,1],[.7843,.7843,1],[.7922,.7922,1],[.8,.8,1],[.8078,.8078,1],[.8157,.8157,1],[.8235,.8235,1],[.8314,.8314,1],[.8392,.8392,1],[.8471,.8471,1],[.8549,.8549,1],[.8627,.8627,1],[.8706,.8706,1],[.8784,.8784,1],[.8863,.8863,1],[.8941,.8941,1],[.902,.902,1],[.9098,.9098,1],[.9176,.9176,1],[.9255,.9255,1],[.9333,.9333,1],[.9412,.9412,1],[.949,.949,1],[.9569,.9569,1],[.9647,.9647,1],[.9725,.9725,1],[.9804,.9804,1],[.9882,.9882,1],[.9961,.9961,1],[1,.9961,.9961],[1,.9882,.9882],[1,.9804,.9804],[1,.9725,.9725],[1,.9647,.9647],[1,.9569,.9569],[1,.949,.949],[1,.9412,.9412],[1,.9333,.9333],[1,.9255,.9255],[1,.9176,.9176],[1,.9098,.9098],[1,.902,.902],[1,.8941,.8941],[1,.8863,.8863],[1,.8784,.8784],[1,.8706,.8706],[1,.8627,.8627],[1,.8549,.8549],[1,.8471,.8471],[1,.8392,.8392],[1,.8314,.8314],[1,.8235,.8235],[1,.8157,.8157],[1,.8078,.8078],[1,.8,.8],[1,.7922,.7922],[1,.7843,.7843],[1,.7765,.7765],[1,.7686,.7686],[1,.7608,.7608],[1,.7529,.7529],[1,.7451,.7451],[1,.7373,.7373],[1,.7294,.7294],[1,.7216,.7216],[1,.7137,.7137],[1,.7059,.7059],[1,.698,.698],[1,.6902,.6902],[1,.6824,.6824],[1,.6745,.6745],[1,.6667,.6667],[1,.6588,.6588],[1,.651,.651],[1,.6431,.6431],[1,.6353,.6353],[1,.6275,.6275],[1,.6196,.6196],[1,.6118,.6118],[1,.6039,.6039],[1,.5961,.5961],[1,.5882,.5882],[1,.5804,.5804],[1,.5725,.5725],[1,.5647,.5647],[1,.5569,.5569],[1,.549,.549],[1,.5412,.5412],[1,.5333,.5333],[1,.5255,.5255],[1,.5176,.5176],[1,.5098,.5098],[1,.502,.502],[1,.4941,.4941],[1,.4863,.4863],[1,.4784,.4784],[1,.4706,.4706],[1,.4627,.4627],[1,.4549,.4549],[1,.4471,.4471],[1,.4392,.4392],[1,.4314,.4314],[1,.4235,.4235],[1,.4157,.4157],[1,.4078,.4078],[1,.4,.4],[1,.3922,.3922],[1,.3843,.3843],[1,.3765,.3765],[1,.3686,.3686],[1,.3608,.3608],[1,.3529,.3529],[1,.3451,.3451],[1,.3373,.3373],[1,.3294,.3294],[1,.3216,.3216],[1,.3137,.3137],[1,.3059,.3059],[1,.298,.298],[1,.2902,.2902],[1,.2824,.2824],[1,.2745,.2745],[1,.2667,.2667],[1,.2588,.2588],[1,.251,.251],[1,.2431,.2431],[1,.2353,.2353],[1,.2275,.2275],[1,.2196,.2196],[1,.2118,.2118],[1,.2039,.2039],[1,.1961,.1961],[1,.1882,.1882],[1,.1804,.1804],[1,.1725,.1725],[1,.1647,.1647],[1,.1569,.1569],[1,.149,.149],[1,.1412,.1412],[1,.1333,.1333],[1,.1255,.1255],[1,.1176,.1176],[1,.1098,.1098],[1,.102,.102],[1,.0941,.0941],[1,.0863,.0863],[1,.0784,.0784],[1,.0706,.0706],[1,.0627,.0627],[1,.0549,.0549],[1,.0471,.0471],[1,.0392,.0392],[1,.0314,.0314],[1,.0235,.0235],[1,.0157,.0157],[1,.0078,.0078],[1,0,0]]};ce.cividis={interpolate:!0,colors:[[0,.1351,.3048],[0,.1381,.3111],[0,.141,.3176],[0,.144,.324],[0,.1469,.3305],[0,.1498,.3371],[0,.1527,.3437],[0,.1554,.3505],[0,.1579,.3575],[0,.1605,.3645],[0,.1631,.3716],[0,.1656,.3788],[0,.1682,.3859],[0,.1708,.3931],[0,.1734,.4004],[0,.1761,.4076],[0,.1788,.4148],[0,.1816,.4219],[0,.1846,.4288],[0,.1869,.4355],[0,.1888,.4396],[0,.191,.4411],[0,.1934,.4416],[.0036,.1959,.4416],[.0179,.1985,.4412],[.0321,.2012,.4408],[.0462,.2039,.4402],[.0584,.2066,.4395],[.069,.2094,.4389],[.0786,.2121,.4381],[.0875,.2149,.4373],[.0956,.2176,.4366],[.1034,.2204,.4358],[.1107,.2232,.4351],[.1176,.2259,.4343],[.1243,.2287,.4335],[.1307,.2315,.4328],[.1368,.2342,.4321],[.1429,.237,.4314],[.1486,.2397,.4308],[.1543,.2425,.4301],[.1597,.2452,.4295],[.1651,.248,.4289],[.1704,.2507,.4283],[.1755,.2534,.4278],[.1805,.2562,.4273],[.1855,.2589,.4268],[.1903,.2616,.4263],[.1951,.2644,.4259],[.1998,.2671,.4255],[.2044,.2698,.4251],[.2089,.2725,.4248],[.2134,.2753,.4245],[.2179,.278,.4242],[.2223,.2807,.4239],[.2266,.2834,.4237],[.2309,.2861,.4235],[.2351,.2888,.4233],[.2393,.2916,.4232],[.2435,.2943,.423],[.2476,.297,.4229],[.2517,.2997,.4229],[.2557,.3024,.4228],[.2597,.3051,.4228],[.2637,.3078,.4228],[.2677,.3105,.4228],[.2716,.3133,.4228],[.2755,.316,.423],[.2794,.3187,.423],[.2832,.3214,.4232],[.2871,.3241,.4234],[.2909,.3268,.4235],[.2947,.3295,.4237],[.2984,.3322,.424],[.3022,.335,.4242],[.3059,.3377,.4245],[.3096,.3404,.4248],[.3133,.3431,.4251],[.3169,.3458,.4255],[.3206,.3486,.4259],[.3242,.3513,.4262],[.3279,.354,.4267],[.3315,.3567,.4271],[.3351,.3595,.4276],[.3387,.3622,.4281],[.3422,.3649,.4286],[.3458,.3677,.4291],[.3493,.3704,.4297],[.3529,.3732,.4302],[.3564,.3759,.4308],[.3599,.3786,.4315],[.3634,.3814,.4321],[.3669,.3841,.4328],[.3704,.3869,.4334],[.3739,.3896,.4342],[.3774,.3924,.4349],[.3808,.3952,.4357],[.3843,.3979,.4365],[.3877,.4007,.4373],[.3912,.4035,.4381],[.3946,.4062,.439],[.398,.409,.4398],[.4014,.4118,.4407],[.4048,.4146,.4416],[.4082,.4174,.4426],[.4116,.4201,.4436],[.415,.4229,.4446],[.4184,.4257,.4456],[.4217,.4285,.4466],[.4251,.4313,.4477],[.4285,.4341,.4489],[.4318,.437,.45],[.4352,.4398,.4511],[.4385,.4426,.4523],[.4418,.4454,.4537],[.4451,.4482,.4549],[.4484,.4511,.4563],[.4518,.4539,.4576],[.4551,.4567,.459],[.4584,.4596,.4605],[.4616,.4624,.462],[.4649,.4652,.4634],[.4683,.4681,.4649],[.4715,.471,.4664],[.4748,.4738,.4677],[.4782,.4767,.4688],[.4816,.4796,.4698],[.4851,.4825,.4704],[.4887,.4853,.471],[.4923,.4882,.4715],[.4959,.4911,.4718],[.4996,.494,.472],[.5032,.4969,.4723],[.5069,.4997,.4724],[.5105,.5026,.4726],[.5142,.5055,.4726],[.5179,.5085,.4727],[.5216,.5114,.4726],[.5253,.5143,.4727],[.5291,.5172,.4725],[.5328,.5201,.4724],[.5366,.5231,.4724],[.5403,.526,.4722],[.5441,.5289,.4719],[.5478,.5319,.4717],[.5516,.5348,.4714],[.5554,.5378,.4711],[.5592,.5408,.4708],[.563,.5437,.4705],[.5668,.5467,.47],[.5706,.5497,.4696],[.5744,.5527,.4692],[.5782,.5557,.4687],[.5821,.5587,.4681],[.5859,.5617,.4676],[.5898,.5647,.4671],[.5936,.5677,.4664],[.5975,.5707,.4658],[.6014,.5737,.4651],[.6052,.5768,.4644],[.6091,.5798,.4636],[.613,.5829,.463],[.6169,.5859,.4622],[.6208,.589,.4614],[.6247,.592,.4606],[.6286,.5951,.4596],[.6325,.5982,.4587],[.6364,.6013,.4578],[.6404,.6044,.4568],[.6443,.6074,.4559],[.6482,.6106,.4548],[.6522,.6137,.4537],[.6561,.6168,.4527],[.6601,.6199,.4515],[.6641,.623,.4503],[.668,.6262,.4493],[.672,.6293,.448],[.676,.6325,.4467],[.68,.6356,.4454],[.6839,.6388,.4443],[.688,.642,.4429],[.692,.6451,.4415],[.696,.6483,.4401],[.7,.6515,.4386],[.704,.6547,.4371],[.7081,.6579,.4356],[.7121,.6612,.4341],[.7162,.6644,.4324],[.7202,.6676,.4308],[.7243,.6709,.4292],[.7283,.6741,.4276],[.7324,.6774,.4257],[.7365,.6806,.424],[.7406,.6839,.4221],[.7447,.6872,.4204],[.7488,.6905,.4184],[.7529,.6938,.4165],[.757,.6971,.4147],[.7611,.7004,.4126],[.7652,.7037,.4106],[.7694,.707,.4085],[.7735,.7104,.4064],[.7777,.7137,.4041],[.7818,.7171,.402],[.786,.7204,.3996],[.7901,.7238,.3974],[.7943,.7272,.395],[.7985,.7306,.3926],[.8027,.734,.3902],[.8069,.7374,.3877],[.8111,.7408,.3852],[.8153,.7442,.3825],[.8195,.7477,.3798],[.8237,.7511,.377],[.828,.7546,.3743],[.8322,.758,.3715],[.8364,.7615,.3687],[.8407,.765,.3657],[.845,.7684,.3627],[.8492,.7719,.3597],[.8535,.7755,.3565],[.8578,.779,.3533],[.8621,.7825,.35],[.8664,.786,.3466],[.8707,.7896,.3433],[.8751,.7931,.3397],[.8794,.7967,.3362],[.8837,.8003,.3326],[.8881,.8038,.3288],[.8924,.8074,.325],[.8968,.811,.321],[.9012,.8146,.317],[.9056,.8183,.3129],[.91,.8219,.3086],[.9144,.8255,.3043],[.9188,.8292,.3],[.9233,.8328,.2952],[.9277,.8365,.2906],[.9322,.8402,.2859],[.9367,.8438,.2809],[.9411,.8475,.2758],[.9457,.8512,.2705],[.9502,.8549,.2651],[.9547,.8586,.2594],[.9593,.8624,.2536],[.9639,.8661,.2474],[.9685,.8698,.2413],[.9731,.8736,.2347],[.9778,.8773,.228],[.9825,.881,.2209],[.9873,.8847,.2133],[.9922,.8884,.2055],[.9948,.893,.2034],[.9952,.8984,.2076],[.9955,.9039,.2124],[.9957,.9093,.2178]]};ce.cool={interpolate:!0,colors:[[0,1,1],[.0039,.9961,1],[.0078,.9922,1],[.0118,.9882,1],[.0157,.9843,1],[.0196,.9804,1],[.0235,.9765,1],[.0275,.9725,1],[.0314,.9686,1],[.0353,.9647,1],[.0392,.9608,1],[.0431,.9569,1],[.0471,.9529,1],[.051,.949,1],[.0549,.9451,1],[.0588,.9412,1],[.0627,.9373,1],[.0667,.9333,1],[.0706,.9294,1],[.0745,.9255,1],[.0784,.9216,1],[.0824,.9176,1],[.0863,.9137,1],[.0902,.9098,1],[.0941,.9059,1],[.098,.902,1],[.102,.898,1],[.1059,.8941,1],[.1098,.8902,1],[.1137,.8863,1],[.1176,.8824,1],[.1216,.8784,1],[.1255,.8745,1],[.1294,.8706,1],[.1333,.8667,1],[.1373,.8627,1],[.1412,.8588,1],[.1451,.8549,1],[.149,.851,1],[.1529,.8471,1],[.1569,.8431,1],[.1608,.8392,1],[.1647,.8353,1],[.1686,.8314,1],[.1725,.8275,1],[.1765,.8235,1],[.1804,.8196,1],[.1843,.8157,1],[.1882,.8118,1],[.1922,.8078,1],[.1961,.8039,1],[.2,.8,1],[.2039,.7961,1],[.2078,.7922,1],[.2118,.7882,1],[.2157,.7843,1],[.2196,.7804,1],[.2235,.7765,1],[.2275,.7725,1],[.2314,.7686,1],[.2353,.7647,1],[.2392,.7608,1],[.2431,.7569,1],[.2471,.7529,1],[.251,.749,1],[.2549,.7451,1],[.2588,.7412,1],[.2627,.7373,1],[.2667,.7333,1],[.2706,.7294,1],[.2745,.7255,1],[.2784,.7216,1],[.2824,.7176,1],[.2863,.7137,1],[.2902,.7098,1],[.2941,.7059,1],[.298,.702,1],[.302,.698,1],[.3059,.6941,1],[.3098,.6902,1],[.3137,.6863,1],[.3176,.6824,1],[.3216,.6784,1],[.3255,.6745,1],[.3294,.6706,1],[.3333,.6667,1],[.3373,.6627,1],[.3412,.6588,1],[.3451,.6549,1],[.349,.651,1],[.3529,.6471,1],[.3569,.6431,1],[.3608,.6392,1],[.3647,.6353,1],[.3686,.6314,1],[.3725,.6275,1],[.3765,.6235,1],[.3804,.6196,1],[.3843,.6157,1],[.3882,.6118,1],[.3922,.6078,1],[.3961,.6039,1],[.4,.6,1],[.4039,.5961,1],[.4078,.5922,1],[.4118,.5882,1],[.4157,.5843,1],[.4196,.5804,1],[.4235,.5765,1],[.4275,.5725,1],[.4314,.5686,1],[.4353,.5647,1],[.4392,.5608,1],[.4431,.5569,1],[.4471,.5529,1],[.451,.549,1],[.4549,.5451,1],[.4588,.5412,1],[.4627,.5373,1],[.4667,.5333,1],[.4706,.5294,1],[.4745,.5255,1],[.4784,.5216,1],[.4824,.5176,1],[.4863,.5137,1],[.4902,.5098,1],[.4941,.5059,1],[.498,.502,1],[.502,.498,1],[.5059,.4941,1],[.5098,.4902,1],[.5137,.4863,1],[.5176,.4824,1],[.5216,.4784,1],[.5255,.4745,1],[.5294,.4706,1],[.5333,.4667,1],[.5373,.4627,1],[.5412,.4588,1],[.5451,.4549,1],[.549,.451,1],[.5529,.4471,1],[.5569,.4431,1],[.5608,.4392,1],[.5647,.4353,1],[.5686,.4314,1],[.5725,.4275,1],[.5765,.4235,1],[.5804,.4196,1],[.5843,.4157,1],[.5882,.4118,1],[.5922,.4078,1],[.5961,.4039,1],[.6,.4,1],[.6039,.3961,1],[.6078,.3922,1],[.6118,.3882,1],[.6157,.3843,1],[.6196,.3804,1],[.6235,.3765,1],[.6275,.3725,1],[.6314,.3686,1],[.6353,.3647,1],[.6392,.3608,1],[.6431,.3569,1],[.6471,.3529,1],[.651,.349,1],[.6549,.3451,1],[.6588,.3412,1],[.6627,.3373,1],[.6667,.3333,1],[.6706,.3294,1],[.6745,.3255,1],[.6784,.3216,1],[.6824,.3176,1],[.6863,.3137,1],[.6902,.3098,1],[.6941,.3059,1],[.698,.302,1],[.702,.298,1],[.7059,.2941,1],[.7098,.2902,1],[.7137,.2863,1],[.7176,.2824,1],[.7216,.2784,1],[.7255,.2745,1],[.7294,.2706,1],[.7333,.2667,1],[.7373,.2627,1],[.7412,.2588,1],[.7451,.2549,1],[.749,.251,1],[.7529,.2471,1],[.7569,.2431,1],[.7608,.2392,1],[.7647,.2353,1],[.7686,.2314,1],[.7725,.2275,1],[.7765,.2235,1],[.7804,.2196,1],[.7843,.2157,1],[.7882,.2118,1],[.7922,.2078,1],[.7961,.2039,1],[.8,.2,1],[.8039,.1961,1],[.8078,.1922,1],[.8118,.1882,1],[.8157,.1843,1],[.8196,.1804,1],[.8235,.1765,1],[.8275,.1725,1],[.8314,.1686,1],[.8353,.1647,1],[.8392,.1608,1],[.8431,.1569,1],[.8471,.1529,1],[.851,.149,1],[.8549,.1451,1],[.8588,.1412,1],[.8627,.1373,1],[.8667,.1333,1],[.8706,.1294,1],[.8745,.1255,1],[.8784,.1216,1],[.8824,.1176,1],[.8863,.1137,1],[.8902,.1098,1],[.8941,.1059,1],[.898,.102,1],[.902,.098,1],[.9059,.0941,1],[.9098,.0902,1],[.9137,.0863,1],[.9176,.0824,1],[.9216,.0784,1],[.9255,.0745,1],[.9294,.0706,1],[.9333,.0667,1],[.9373,.0627,1],[.9412,.0588,1],[.9451,.0549,1],[.949,.051,1],[.9529,.0471,1],[.9569,.0431,1],[.9608,.0392,1],[.9647,.0353,1],[.9686,.0314,1],[.9725,.0275,1],[.9765,.0235,1],[.9804,.0196,1],[.9843,.0157,1],[.9882,.0118,1],[.9922,.0078,1],[.9961,.0039,1],[1,0,1]]};ce.coolwarm={interpolate:!0,colors:[[.2298,.2987,.7537],[.2344,.3055,.7597],[.2389,.3124,.7657],[.2435,.3192,.7717],[.2481,.326,.7777],[.2527,.3328,.7837],[.2572,.3397,.7897],[.2618,.3465,.7957],[.2664,.3533,.8016],[.2711,.36,.8071],[.2758,.3667,.8126],[.2805,.3734,.818],[.2853,.3801,.8235],[.29,.3868,.8289],[.2947,.3935,.8344],[.2994,.4002,.8398],[.3042,.4069,.8453],[.3091,.4135,.8501],[.3139,.4201,.855],[.3188,.4266,.8599],[.3237,.4332,.8647],[.3286,.4397,.8696],[.3335,.4463,.8745],[.3384,.4528,.8793],[.3433,.4594,.8841],[.3483,.4657,.8883],[.3534,.4721,.8926],[.3584,.4784,.8968],[.3635,.4848,.901],[.3685,.4911,.9052],[.3736,.4975,.9095],[.3786,.5039,.9137],[.3837,.5102,.9178],[.3889,.5163,.9214],[.394,.5224,.9249],[.3992,.5285,.9285],[.4044,.5346,.932],[.4096,.5408,.9355],[.4148,.5469,.9391],[.42,.553,.9426],[.4252,.5591,.9461],[.4305,.5649,.9489],[.4358,.5707,.9517],[.4411,.5765,.9545],[.4464,.5824,.9574],[.4517,.5882,.9602],[.457,.594,.963],[.4624,.5998,.9659],[.4677,.6056,.9685],[.4731,.6111,.9706],[.4785,.6166,.9727],[.4839,.622,.9748],[.4892,.6275,.9769],[.4946,.633,.979],[.5,.6385,.9811],[.5054,.644,.9832],[.5108,.6494,.9851],[.5163,.6545,.9864],[.5217,.6596,.9877],[.5271,.6647,.9891],[.5326,.6698,.9904],[.538,.6749,.9917],[.5434,.68,.9931],[.5489,.6851,.9944],[.5543,.6901,.9955],[.5597,.6948,.9961],[.5652,.6994,.9966],[.5706,.7041,.9972],[.5761,.7088,.9978],[.5815,.7135,.9983],[.5869,.7181,.9989],[.5924,.7228,.9994],[.5978,.7273,.9998],[.6032,.7315,.9996],[.6085,.7357,.9994],[.6139,.7399,.9991],[.6193,.7441,.9989],[.6247,.7483,.9987],[.6301,.7525,.9985],[.6355,.7567,.9983],[.6408,.7608,.9978],[.6461,.7644,.9969],[.6514,.7681,.9959],[.6567,.7718,.9949],[.662,.7755,.9939],[.6673,.7792,.993],[.6725,.7829,.992],[.6778,.7865,.991],[.6831,.79,.9898],[.6882,.7932,.988],[.6933,.7963,.9863],[.6985,.7994,.9846],[.7036,.8026,.9828],[.7087,.8057,.9811],[.7139,.8089,.9794],[.719,.812,.9777],[.724,.8149,.9757],[.729,.8175,.9732],[.7339,.82,.9707],[.7388,.8226,.9683],[.7438,.8251,.9658],[.7487,.8277,.9633],[.7536,.8302,.9609],[.7585,.8328,.9584],[.7634,.8351,.9557],[.768,.837,.9525],[.7727,.839,.9493],[.7774,.8409,.9461],[.782,.8429,.943],[.7867,.8448,.9398],[.7914,.8468,.9366],[.7961,.8487,.9335],[.8006,.8504,.93],[.805,.8517,.9262],[.8093,.853,.9223],[.8137,.8543,.9185],[.8181,.8556,.9146],[.8224,.8569,.9108],[.8268,.8582,.907],[.8311,.8595,.9031],[.8353,.8605,.899],[.8394,.8612,.8945],[.8434,.8618,.89],[.8474,.8625,.8855],[.8514,.8631,.8811],[.8554,.8638,.8766],[.8594,.8644,.8721],[.8634,.8651,.8676],[.8674,.8644,.8626],[.8715,.8623,.857],[.8756,.8602,.8514],[.8796,.8582,.8458],[.8837,.8561,.8403],[.8878,.854,.8347],[.8918,.852,.8291],[.8959,.8499,.8235],[.8995,.8475,.8178],[.9028,.8448,.812],[.9062,.8421,.8062],[.9095,.8394,.8003],[.9128,.8367,.7945],[.9161,.834,.7887],[.9194,.8313,.7829],[.9227,.8286,.7771],[.9256,.8255,.7711],[.9281,.8222,.7651],[.9307,.8189,.7591],[.9332,.8156,.7532],[.9358,.8122,.7472],[.9383,.8089,.7412],[.9409,.8056,.7352],[.9434,.8023,.7292],[.9455,.7986,.7231],[.9473,.7947,.717],[.9492,.7908,.7109],[.951,.7869,.7048],[.9528,.783,.6986],[.9546,.7791,.6925],[.9564,.7751,.6864],[.9582,.7712,.6803],[.9595,.767,.6741],[.9606,.7625,.668],[.9616,.758,.6618],[.9627,.7536,.6556],[.9638,.7491,.6494],[.9648,.7446,.6432],[.9659,.7401,.6371],[.967,.7357,.6309],[.9675,.7308,.6247],[.9679,.7258,.6185],[.9682,.7208,.6123],[.9685,.7158,.6061],[.9689,.7108,.5999],[.9692,.7058,.5937],[.9695,.7008,.5875],[.9699,.6958,.5813],[.9697,.6905,.5751],[.9693,.685,.569],[.9689,.6795,.5628],[.9685,.674,.5566],[.9681,.6685,.5505],[.9677,.663,.5443],[.9673,.6575,.5382],[.9669,.652,.532],[.966,.6461,.5259],[.9649,.6402,.5198],[.9638,.6342,.5137],[.9627,.6282,.5076],[.9616,.6222,.5016],[.9605,.6163,.4955],[.9594,.6103,.4894],[.9583,.6043,.4833],[.9567,.598,.4773],[.9549,.5916,.4713],[.9531,.5852,.4654],[.9513,.5788,.4594],[.9495,.5724,.4534],[.9477,.566,.4475],[.9459,.5596,.4415],[.9441,.5532,.4355],[.9417,.5464,.4297],[.9393,.5396,.4239],[.9368,.5327,.4181],[.9343,.5259,.4123],[.9318,.5191,.4065],[.9294,.5123,.4007],[.9269,.5054,.3949],[.9244,.4986,.3891],[.9214,.4914,.3834],[.9183,.4842,.3778],[.9152,.4769,.3722],[.912,.4697,.3666],[.9089,.4624,.361],[.9058,.4552,.3553],[.9027,.4479,.3497],[.8995,.4407,.3441],[.8959,.4331,.3387],[.8921,.4254,.3333],[.8884,.4177,.3279],[.8846,.41,.3225],[.8809,.4023,.3171],[.8771,.3946,.3117],[.8734,.387,.3063],[.8697,.3793,.3009],[.8654,.3711,.2958],[.8611,.3629,.2906],[.8567,.3547,.2855],[.8524,.3465,.2803],[.848,.3383,.2752],[.8437,.3301,.2701],[.8394,.3219,.2649],[.835,.3136,.2598],[.8302,.3047,.2549],[.8253,.2957,.25],[.8204,.2868,.2452],[.8155,.2778,.2403],[.8106,.2688,.2354],[.8057,.2598,.2306],[.8008,.2508,.2257],[.7959,.2418,.2208],[.7906,.2314,.2162],[.7852,.2209,.2117],[.7797,.2103,.2071],[.7743,.1998,.2025],[.7689,.1892,.198],[.7635,.1787,.1934],[.7581,.1681,.1888],[.7527,.1576,.1843],[.7468,.14,.18],[.741,.1222,.1757],[.7351,.1045,.1715],[.7292,.0867,.1672],[.7233,.0689,.163],[.7174,.0511,.1587],[.7116,.0333,.1545],[.7057,.0156,.1502]]};ce.copper={interpolate:!0,colors:[[0,0,0],[.0048,.0031,.002],[.0097,.0061,.0039],[.0145,.0092,.0059],[.0194,.0123,.0078],[.0242,.0153,.0098],[.0291,.0184,.0117],[.0339,.0214,.0137],[.0388,.0245,.0156],[.0436,.0276,.0176],[.0484,.0306,.0195],[.0533,.0337,.0215],[.0581,.0368,.0234],[.063,.0398,.0254],[.0678,.0429,.0273],[.0727,.046,.0293],[.0775,.049,.0312],[.0824,.0521,.0332],[.0872,.0551,.0351],[.092,.0582,.0371],[.0969,.0613,.039],[.1017,.0643,.041],[.1066,.0674,.0429],[.1114,.0705,.0449],[.1163,.0735,.0468],[.1211,.0766,.0488],[.126,.0797,.0507],[.1308,.0827,.0527],[.1356,.0858,.0546],[.1405,.0888,.0566],[.1453,.0919,.0585],[.1502,.095,.0605],[.155,.098,.0624],[.1599,.1011,.0644],[.1647,.1042,.0663],[.1696,.1072,.0683],[.1744,.1103,.0702],[.1792,.1134,.0722],[.1841,.1164,.0741],[.1889,.1195,.0761],[.1938,.1225,.078],[.1986,.1256,.08],[.2035,.1287,.0819],[.2083,.1317,.0839],[.2131,.1348,.0858],[.218,.1379,.0878],[.2228,.1409,.0897],[.2277,.144,.0917],[.2325,.147,.0936],[.2374,.1501,.0956],[.2422,.1532,.0975],[.2471,.1562,.0995],[.2519,.1593,.1015],[.2567,.1624,.1034],[.2616,.1654,.1054],[.2664,.1685,.1073],[.2713,.1716,.1093],[.2761,.1746,.1112],[.281,.1777,.1132],[.2858,.1807,.1151],[.2907,.1838,.1171],[.2955,.1869,.119],[.3003,.1899,.121],[.3052,.193,.1229],[.31,.1961,.1249],[.3149,.1991,.1268],[.3197,.2022,.1288],[.3246,.2053,.1307],[.3294,.2083,.1327],[.3343,.2114,.1346],[.3391,.2144,.1366],[.3439,.2175,.1385],[.3488,.2206,.1405],[.3536,.2236,.1424],[.3585,.2267,.1444],[.3633,.2298,.1463],[.3682,.2328,.1483],[.373,.2359,.1502],[.3779,.239,.1522],[.3827,.242,.1541],[.3875,.2451,.1561],[.3924,.2481,.158],[.3972,.2512,.16],[.4021,.2543,.1619],[.4069,.2573,.1639],[.4118,.2604,.1658],[.4166,.2635,.1678],[.4215,.2665,.1697],[.4263,.2696,.1717],[.4311,.2727,.1736],[.436,.2757,.1756],[.4408,.2788,.1775],[.4457,.2818,.1795],[.4505,.2849,.1814],[.4554,.288,.1834],[.4602,.291,.1853],[.4651,.2941,.1873],[.4699,.2972,.1892],[.4747,.3002,.1912],[.4796,.3033,.1931],[.4844,.3064,.1951],[.4893,.3094,.197],[.4941,.3125,.199],[.499,.3155,.201],[.5038,.3186,.2029],[.5087,.3217,.2049],[.5135,.3247,.2068],[.5183,.3278,.2088],[.5232,.3309,.2107],[.528,.3339,.2127],[.5329,.337,.2146],[.5377,.3401,.2166],[.5426,.3431,.2185],[.5474,.3462,.2205],[.5522,.3492,.2224],[.5571,.3523,.2244],[.5619,.3554,.2263],[.5668,.3584,.2283],[.5716,.3615,.2302],[.5765,.3646,.2322],[.5813,.3676,.2341],[.5862,.3707,.2361],[.591,.3738,.238],[.5958,.3768,.24],[.6007,.3799,.2419],[.6055,.3829,.2439],[.6104,.386,.2458],[.6152,.3891,.2478],[.6201,.3921,.2497],[.6249,.3952,.2517],[.6298,.3983,.2536],[.6346,.4013,.2556],[.6394,.4044,.2575],[.6443,.4074,.2595],[.6491,.4105,.2614],[.654,.4136,.2634],[.6588,.4166,.2653],[.6637,.4197,.2673],[.6685,.4228,.2692],[.6734,.4258,.2712],[.6782,.4289,.2731],[.683,.432,.2751],[.6879,.435,.277],[.6927,.4381,.279],[.6976,.4411,.2809],[.7024,.4442,.2829],[.7073,.4473,.2848],[.7121,.4503,.2868],[.717,.4534,.2887],[.7218,.4565,.2907],[.7266,.4595,.2926],[.7315,.4626,.2946],[.7363,.4657,.2965],[.7412,.4687,.2985],[.746,.4718,.3005],[.7509,.4748,.3024],[.7557,.4779,.3044],[.7606,.481,.3063],[.7654,.484,.3083],[.7702,.4871,.3102],[.7751,.4902,.3122],[.7799,.4932,.3141],[.7848,.4963,.3161],[.7896,.4994,.318],[.7945,.5024,.32],[.7993,.5055,.3219],[.8042,.5085,.3239],[.809,.5116,.3258],[.8138,.5147,.3278],[.8187,.5177,.3297],[.8235,.5208,.3317],[.8284,.5239,.3336],[.8332,.5269,.3356],[.8381,.53,.3375],[.8429,.5331,.3395],[.8478,.5361,.3414],[.8526,.5392,.3434],[.8574,.5422,.3453],[.8623,.5453,.3473],[.8671,.5484,.3492],[.872,.5514,.3512],[.8768,.5545,.3531],[.8817,.5576,.3551],[.8865,.5606,.357],[.8913,.5637,.359],[.8962,.5668,.3609],[.901,.5698,.3629],[.9059,.5729,.3648],[.9107,.5759,.3668],[.9156,.579,.3687],[.9204,.5821,.3707],[.9253,.5851,.3726],[.9301,.5882,.3746],[.9349,.5913,.3765],[.9398,.5943,.3785],[.9446,.5974,.3804],[.9495,.6005,.3824],[.9543,.6035,.3843],[.9592,.6066,.3863],[.964,.6096,.3882],[.9689,.6127,.3902],[.9737,.6158,.3921],[.9785,.6188,.3941],[.9834,.6219,.396],[.9882,.625,.398],[.9931,.628,.4],[.9979,.6311,.4019],[1,.6342,.4039],[1,.6372,.4058],[1,.6403,.4078],[1,.6433,.4097],[1,.6464,.4117],[1,.6495,.4136],[1,.6525,.4156],[1,.6556,.4175],[1,.6587,.4195],[1,.6617,.4214],[1,.6648,.4234],[1,.6678,.4253],[1,.6709,.4273],[1,.674,.4292],[1,.677,.4312],[1,.6801,.4331],[1,.6832,.4351],[1,.6862,.437],[1,.6893,.439],[1,.6924,.4409],[1,.6954,.4429],[1,.6985,.4448],[1,.7015,.4468],[1,.7046,.4487],[1,.7077,.4507],[1,.7107,.4526],[1,.7138,.4546],[1,.7169,.4565],[1,.7199,.4585],[1,.723,.4604],[1,.7261,.4624],[1,.7291,.4643],[1,.7322,.4663],[1,.7352,.4682],[1,.7383,.4702],[1,.7414,.4721],[1,.7444,.4741],[1,.7475,.476],[1,.7506,.478],[1,.7536,.4799],[1,.7567,.4819],[1,.7598,.4838],[1,.7628,.4858],[1,.7659,.4877],[1,.7689,.4897],[1,.772,.4916],[1,.7751,.4936],[1,.7781,.4955],[1,.7812,.4975]]};ce.cubehelix={interpolate:!0,colors:[[0,0,0],[.0067,.0021,.006],[.0133,.0043,.0122],[.0196,.0065,.0186],[.0257,.0088,.0252],[.0317,.0112,.0319],[.0374,.0136,.0389],[.0429,.0161,.046],[.0482,.0187,.0533],[.0533,.0214,.0607],[.0581,.0242,.0682],[.0627,.0271,.0758],[.067,.0301,.0835],[.0711,.0332,.0912],[.0749,.0365,.0991],[.0785,.0398,.1069],[.0819,.0433,.1148],[.085,.0469,.1227],[.0879,.0506,.1306],[.0905,.0545,.1385],[.0928,.0584,.1464],[.095,.0625,.1542],[.0969,.0668,.1619],[.0985,.0712,.1696],[.1,.0757,.1771],[.1012,.0803,.1846],[.1022,.0851,.192],[.103,.09,.1992],[.1036,.095,.2062],[.104,.1001,.2131],[.1043,.1054,.2199],[.1043,.1108,.2264],[.1042,.1163,.2328],[.1039,.122,.2389],[.1035,.1277,.2448],[.103,.1336,.2505],[.1023,.1395,.256],[.1015,.1456,.2612],[.1007,.1518,.2662],[.0997,.158,.2709],[.0987,.1644,.2754],[.0976,.1708,.2796],[.0964,.1773,.2835],[.0952,.1839,.2871],[.094,.1905,.2904],[.0928,.1972,.2935],[.0916,.2039,.2962],[.0904,.2107,.2987],[.0892,.2176,.3009],[.0881,.2244,.3027],[.0871,.2313,.3043],[.0861,.2382,.3056],[.0851,.2452,.3066],[.0843,.2521,.3073],[.0836,.259,.3077],[.083,.2659,.3079],[.0826,.2728,.3077],[.0823,.2797,.3073],[.0821,.2866,.3066],[.0822,.2934,.3057],[.0824,.3001,.3045],[.0828,.3069,.303],[.0834,.3135,.3014],[.0842,.3201,.2994],[.0852,.3266,.2973],[.0865,.3331,.295],[.088,.3394,.2924],[.0898,.3457,.2897],[.0918,.3518,.2868],[.0941,.3579,.2838],[.0966,.3638,.2806],[.0994,.3697,.2772],[.1025,.3754,.2737],[.1059,.381,.2702],[.1096,.3864,.2665],[.1136,.3918,.2627],[.1179,.3969,.2589],[.1225,.402,.255],[.1274,.4069,.2511],[.1325,.4116,.2471],[.138,.4162,.2431],[.1438,.4207,.2392],[.1499,.4249,.2352],[.1563,.4291,.2313],[.163,.433,.2275],[.17,.4368,.2237],[.1773,.4404,.22],[.1849,.4439,.2164],[.1928,.4472,.2129],[.201,.4503,.2096],[.2094,.4533,.2064],[.2181,.4561,.2033],[.2271,.4587,.2004],[.2363,.4611,.1977],[.2457,.4634,.1952],[.2555,.4656,.1929],[.2654,.4676,.1908],[.2755,.4694,.189],[.2859,.4711,.1874],[.2965,.4726,.1861],[.3072,.474,.185],[.3182,.4752,.1842],[.3293,.4763,.1837],[.3405,.4772,.1835],[.3519,.4781,.1836],[.3635,.4788,.1841],[.3751,.4794,.1848],[.3869,.4798,.1859],[.3987,.4802,.1873],[.4106,.4804,.1891],[.4226,.4806,.1912],[.4346,.4807,.1937],[.4467,.4807,.1965],[.4588,.4806,.1997],[.4709,.4804,.2033],[.4829,.4802,.2072],[.495,.4799,.2115],[.507,.4796,.2161],[.519,.4792,.2211],[.5309,.4788,.2265],[.5427,.4784,.2322],[.5544,.4779,.2383],[.5661,.4774,.2448],[.5776,.477,.2516],[.5889,.4765,.2587],[.6002,.476,.2662],[.6112,.4756,.2741],[.6221,.4752,.2822],[.6328,.4748,.2907],[.6434,.4745,.2995],[.6537,.4742,.3086],[.6638,.4739,.318],[.6736,.4738,.3277],[.6832,.4737,.3376],[.6926,.4736,.3478],[.7017,.4737,.3583],[.7106,.4738,.369],[.7192,.4741,.38],[.7274,.4744,.3912],[.7355,.4749,.4025],[.7432,.4755,.4141],[.7506,.4761,.4258],[.7577,.477,.4378],[.7645,.4779,.4498],[.7709,.479,.462],[.7771,.4802,.4743],[.7829,.4816,.4867],[.7884,.4831,.4992],[.7936,.4848,.5118],[.7985,.4866,.5244],[.803,.4886,.5371],[.8072,.4907,.5498],[.8111,.493,.5625],[.8146,.4955,.5753],[.8179,.4981,.5879],[.8208,.5009,.6006],[.8234,.5039,.6132],[.8256,.5071,.6257],[.8276,.5104,.6382],[.8293,.5139,.6506],[.8307,.5175,.6628],[.8318,.5213,.6749],[.8326,.5253,.6869],[.8331,.5295,.6988],[.8334,.5338,.7104],[.8334,.5383,.7219],[.8332,.543,.7332],[.8327,.5478,.7443],[.832,.5528,.7552],[.8311,.5579,.7659],[.83,.5632,.7763],[.8286,.5686,.7864],[.8271,.5742,.7964],[.8254,.5799,.806],[.8236,.5857,.8154],[.8216,.5917,.8245],[.8195,.5978,.8333],[.8172,.604,.8418],[.8149,.6103,.85],[.8124,.6167,.8579],[.8099,.6233,.8654],[.8073,.6299,.8727],[.8046,.6366,.8797],[.8019,.6434,.8863],[.7992,.6502,.8926],[.7964,.6571,.8986],[.7937,.6641,.9042],[.791,.6712,.9096],[.7883,.6783,.9146],[.7856,.6854,.9193],[.783,.6926,.9236],[.7804,.6997,.9277],[.778,.7069,.9314],[.7756,.7142,.9349],[.7733,.7214,.938],[.7711,.7286,.9409],[.7691,.7358,.9434],[.7672,.743,.9457],[.7655,.7501,.9477],[.7639,.7573,.9494],[.7625,.7644,.9509],[.7613,.7714,.9521],[.7602,.7784,.9531],[.7594,.7853,.9538],[.7587,.7922,.9544],[.7583,.799,.9547],[.7581,.8057,.9549],[.7581,.8124,.9548],[.7584,.8189,.9546],[.7588,.8254,.9543],[.7596,.8318,.9538],[.7606,.838,.9531],[.7618,.8442,.9524],[.7633,.8502,.9516],[.765,.8562,.9506],[.767,.862,.9496],[.7693,.8677,.9486],[.7718,.8733,.9475],[.7745,.8787,.9463],[.7776,.884,.9452],[.7808,.8892,.9441],[.7844,.8943,.9429],[.7882,.8992,.9419],[.7922,.904,.9408],[.7965,.9087,.9398],[.801,.9132,.9389],[.8057,.9176,.9381],[.8107,.9218,.9374],[.8158,.926,.9368],[.8212,.93,.9363],[.8268,.9338,.936],[.8326,.9376,.9358],[.8386,.9412,.9358],[.8447,.9447,.9359],[.851,.9481,.9363],[.8575,.9513,.9368],[.8641,.9545,.9376],[.8708,.9575,.9386],[.8777,.9604,.9397],[.8847,.9633,.9412],[.8917,.966,.9429],[.8989,.9687,.9448],[.9061,.9712,.947],[.9134,.9737,.9494],[.9207,.9761,.9521],[.928,.9785,.9551],[.9354,.9808,.9583],[.9428,.983,.9619],[.9501,.9852,.9657],[.9574,.9874,.9697],[.9647,.9895,.9741],[.9719,.9917,.9787],[.9791,.9937,.9836],[.9862,.9958,.9888],[.9931,.9979,.9943],[1,1,1]]};ce.flag={interpolate:!0,colors:[[1,0,0],[1,.3784,.2098],[1,.7005,.4931],[1,.9185,.7774],[1,.9998,1],[.8029,.9325,1],[.5208,.7264,1],[.2355,.4124,1],[0,.037,1],[0,0,.8156],[0,0,.5346],[0,0,.2486],[0,0,0],[.1719,0,0],[.4515,0,0],[.7383,0,0],[.9897,0,0],[1,.309,.1595],[1,.6459,.4377],[1,.8868,.7252],[1,.9957,.9791],[.8528,.9566,1],[.5761,.7752,1],[.2881,.4785,1],[.0316,.1107,1],[0,0,.865],[0,0,.5899],[0,0,.3014],[0,0,.0425],[.123,0,0],[.3964,0,0],[.6852,0,0],[.9464,0,0],[1,.2379,.1111],[1,.5878,.3827],[1,.8502,.6717],[1,.9862,.9352],[.9007,.9755,1],[.631,.8197,1],[.3418,.5421,1],[.0761,.1837,1],[0,0,.9123],[0,0,.6446],[0,0,.3554],[0,0,.0877],[.0761,0,0],[.3418,0,0],[.631,0,0],[.9007,0,0],[1,.1656,.0648],[1,.5264,.3283],[1,.809,.6173],[1,.9713,.8889],[.9464,.9891,1],[.6852,.8598,1],[.3964,.6026,1],[.123,.2558,1],[0,0,.9575],[0,0,.6986],[0,0,.4101],[0,0,.135],[.0316,0,0],[.2881,0,0],[.5761,0,0],[.8528,0,0],[1,.0923,.0209],[1,.4622,.2748],[1,.7634,.5623],[1,.9511,.8405],[.9897,.9973,1],[.7383,.8952,1],[.4515,.6599,1],[.1719,.3265,1],[0,0,1],[0,0,.7514],[0,0,.4654],[0,0,.1844],[0,0,0],[.2355,0,0],[.5208,0,0],[.8029,0,0],[1,.0185,0],[1,.3955,.2226],[1,.7136,.5069],[1,.9256,.7902],[1,1,1],[.7902,.9256,1],[.5069,.7136,1],[.2226,.3955,1],[0,.0185,1],[0,0,.8029],[0,0,.5208],[0,0,.2355],[0,0,0],[.1844,0,0],[.4654,0,0],[.7514,0,0],[1,0,0],[1,.3265,.1719],[1,.6599,.4515],[1,.8952,.7383],[1,.9973,.9897],[.8405,.9511,1],[.5623,.7634,1],[.2748,.4622,1],[.0209,.0923,1],[0,0,.8528],[0,0,.5761],[0,0,.2881],[0,0,.0316],[.135,0,0],[.4101,0,0],[.6986,0,0],[.9575,0,0],[1,.2558,.123],[1,.6026,.3964],[1,.8598,.6852],[1,.9891,.9464],[.8889,.9713,1],[.6173,.809,1],[.3283,.5264,1],[.0648,.1656,1],[0,0,.9007],[0,0,.631],[0,0,.3418],[0,0,.0761],[.0877,0,0],[.3554,0,0],[.6446,0,0],[.9123,0,0],[1,.1837,.0761],[1,.5421,.3418],[1,.8197,.631],[1,.9755,.9007],[.9352,.9862,1],[.6717,.8502,1],[.3827,.5878,1],[.1111,.2379,1],[0,0,.9464],[0,0,.6852],[0,0,.3964],[0,0,.123],[.0425,0,0],[.3014,0,0],[.5899,0,0],[.865,0,0],[1,.1107,.0316],[1,.4785,.2881],[1,.7752,.5761],[1,.9566,.8528],[.9791,.9957,1],[.7252,.8868,1],[.4377,.6459,1],[.1595,.309,1],[0,0,.9897],[0,0,.7383],[0,0,.4515],[0,0,.1719],[0,0,0],[.2486,0,0],[.5346,0,0],[.8156,0,0],[1,.037,0],[1,.4124,.2355],[1,.7264,.5208],[1,.9325,.8029],[1,.9998,1],[.7774,.9185,1],[.4931,.7005,1],[.2098,.3784,1],[0,0,1],[0,0,.7902],[0,0,.5069],[0,0,.2226],[0,0,0],[.1971,0,0],[.4792,0,0],[.7645,0,0],[1,0,0],[1,.3439,.1844],[1,.6737,.4654],[1,.9032,.7514],[1,.9985,1],[.8281,.9452,1],[.5485,.7513,1],[.2617,.4457,1],[.0103,.0739,1],[0,0,.8405],[0,0,.5623],[0,0,.2748],[0,0,.0209],[.1472,0,0],[.4239,0,0],[.7119,0,0],[.9684,0,0],[1,.2737,.135],[1,.6173,.4101],[1,.8691,.6986],[1,.9916,.9575],[.877,.9667,1],[.6036,.798,1],[.3148,.5106,1],[.0536,.1473,1],[0,0,.8889],[0,0,.6173],[0,0,.3283],[0,0,.0648],[.0993,0,0],[.369,0,0],[.6582,0,0],[.9239,0,0],[1,.2019,.0877],[1,.5575,.3554],[1,.8302,.6446],[1,.9794,.9123],[.9239,.983,1],[.6582,.8403,1],[.369,.5727,1],[.0993,.2199,1],[0,0,.9352],[0,0,.6717],[0,0,.3827],[0,0,.1111],[.0536,0,0],[.3148,0,0],[.6036,0,0],[.877,0,0],[1,.129,.0425],[1,.4947,.3014],[1,.7867,.5899],[1,.9618,.865],[.9684,.9939,1],[.7119,.8781,1],[.4239,.6317,1],[.1472,.2914,1],[0,0,.9791],[0,0,.7252],[0,0,.4377],[0,0,.1595],[.0103,0,0],[.2617,0,0],[.5485,0,0],[.8281,0,0],[1,.0554,0],[1,.4291,.2486],[1,.739,.5346],[1,.939,.8156],[1,.9993,1],[.7645,.911,1],[.4792,.6872,1],[.1971,.3612,1],[0,0,1],[0,0,.7774],[0,0,.4931],[0,0,.2098],[0,0,0]]};ce.gist_earth={interpolate:!0,colors:[[0,0,0],[.0026,0,.1687],[.0052,0,.2217],[.0078,0,.2638],[.0105,0,.3059],[.0131,0,.3481],[.0157,0,.3902],[.0183,0,.4324],[.0209,.0089,.4547],[.0235,.0179,.4556],[.0261,.0269,.4563],[.0287,.036,.457],[.0314,.045,.4577],[.034,.054,.4584],[.0366,.063,.4592],[.0392,.072,.4599],[.0418,.0811,.4606],[.0444,.0901,.4613],[.047,.0991,.462],[.0497,.1081,.4627],[.0523,.1171,.4634],[.0549,.1262,.4641],[.0575,.1352,.4648],[.0601,.1442,.4656],[.0627,.1532,.4663],[.0653,.1622,.467],[.0679,.1713,.4677],[.0706,.1803,.4684],[.0732,.1893,.4691],[.0758,.1975,.4698],[.0784,.2056,.4705],[.081,.2138,.4712],[.0836,.2219,.472],[.0862,.2301,.4727],[.0889,.2383,.4734],[.0915,.2464,.4741],[.0941,.2546,.4748],[.0967,.2627,.4755],[.0993,.2709,.4762],[.1019,.279,.4769],[.1045,.2872,.4776],[.1072,.2954,.4784],[.1098,.3035,.4791],[.1124,.3108,.4798],[.115,.3182,.4805],[.1176,.3255,.4812],[.1202,.3328,.4819],[.1228,.3402,.4826],[.1254,.3475,.4833],[.1281,.3548,.484],[.1307,.3622,.4848],[.1333,.3695,.4855],[.1359,.3768,.4862],[.1385,.3842,.4869],[.1411,.3904,.4876],[.1437,.3966,.4883],[.1464,.4028,.489],[.149,.409,.4897],[.1516,.4152,.4904],[.1542,.4214,.4912],[.1568,.4276,.4919],[.1594,.4338,.4926],[.162,.4399,.4933],[.1646,.4461,.494],[.1673,.4523,.4947],[.1699,.4585,.4954],[.1725,.4647,.4961],[.1751,.4709,.4968],[.1777,.4771,.4975],[.1803,.4833,.4983],[.1829,.4895,.499],[.1856,.4957,.4997],[.1882,.5019,.5004],[.19,.5042,.4957],[.1919,.5065,.4909],[.1937,.5087,.4861],[.1956,.511,.4813],[.1974,.5133,.4765],[.1993,.5155,.4717],[.2011,.5178,.4669],[.203,.52,.4621],[.2048,.5223,.4573],[.2067,.5245,.4525],[.2085,.5268,.4477],[.2104,.5291,.4429],[.2122,.5313,.4381],[.2141,.5336,.4333],[.2159,.5358,.4285],[.2178,.5381,.4237],[.2196,.5404,.4189],[.2215,.5426,.4141],[.2233,.5449,.4093],[.2252,.5471,.4045],[.227,.5494,.3997],[.2289,.5516,.3948],[.2307,.5539,.39],[.2326,.5562,.3852],[.2344,.5584,.3804],[.2363,.5607,.3756],[.2381,.5629,.3708],[.24,.5652,.366],[.2418,.5674,.3612],[.2437,.5697,.3564],[.2455,.572,.3516],[.2474,.5742,.3468],[.2492,.5765,.342],[.2511,.5787,.3372],[.2529,.581,.3324],[.2548,.5832,.3276],[.2566,.5855,.3228],[.2585,.5878,.318],[.2603,.59,.3132],[.2622,.5923,.3084],[.264,.5945,.3036],[.2659,.5968,.2988],[.2677,.599,.294],[.2696,.6013,.2892],[.2715,.6036,.2844],[.2802,.6058,.2796],[.2889,.6081,.2748],[.2976,.6103,.2771],[.3063,.6126,.2794],[.315,.6148,.2816],[.3238,.6171,.2839],[.3325,.6194,.2862],[.3412,.6216,.2885],[.3499,.6239,.2908],[.3586,.6261,.2931],[.3673,.6284,.2954],[.3761,.6307,.2976],[.3848,.6329,.2999],[.3935,.6352,.3022],[.4022,.6374,.3045],[.4109,.6397,.3068],[.4196,.6414,.3091],[.4284,.6431,.3114],[.4371,.6448,.3136],[.4458,.6466,.3159],[.4545,.6483,.3182],[.4632,.65,.3205],[.4719,.6517,.3217],[.4784,.6535,.323],[.4849,.6552,.3242],[.4913,.6569,.3255],[.4978,.6586,.3267],[.5043,.6603,.3279],[.5107,.6621,.3292],[.5172,.6638,.3304],[.5237,.6655,.3317],[.5301,.6672,.3329],[.5366,.6689,.3341],[.5431,.6707,.3354],[.5495,.6724,.3366],[.556,.6741,.3379],[.5625,.6758,.3391],[.5689,.6775,.3403],[.5754,.6793,.3416],[.5819,.681,.3428],[.5883,.6827,.344],[.5948,.6844,.3453],[.6013,.6861,.3465],[.6077,.6879,.3478],[.6142,.6896,.349],[.6207,.6913,.3502],[.6271,.693,.3515],[.6336,.6947,.3527],[.6401,.6965,.354],[.6465,.6982,.3552],[.653,.6999,.3564],[.6595,.7016,.3577],[.6659,.7034,.3589],[.6724,.7051,.3602],[.6789,.7068,.3614],[.6853,.7085,.3626],[.6918,.7102,.3639],[.6983,.712,.3651],[.7047,.7137,.3664],[.7112,.7154,.3676],[.7176,.7171,.3688],[.7193,.7137,.3701],[.7209,.7103,.3713],[.7225,.7069,.3726],[.7242,.7035,.3738],[.7258,.7001,.375],[.7275,.6967,.3763],[.7291,.6934,.3775],[.7307,.69,.3788],[.7324,.6866,.38],[.734,.6832,.3812],[.7356,.6798,.3825],[.7373,.6764,.3837],[.7389,.673,.3849],[.7406,.6697,.3862],[.7422,.6663,.3874],[.7438,.6629,.3887],[.7455,.6595,.3899],[.7471,.6561,.3911],[.7488,.6527,.3924],[.7504,.6493,.3936],[.752,.6459,.3949],[.7537,.6426,.3961],[.7553,.6392,.4057],[.7597,.6413,.4153],[.7641,.643,.425],[.7685,.6447,.4346],[.7729,.6464,.4442],[.7773,.6481,.4538],[.7817,.6515,.4634],[.786,.6549,.473],[.7904,.6583,.4826],[.7948,.6617,.4922],[.7992,.6651,.5018],[.8036,.6685,.5114],[.808,.6719,.521],[.8124,.6753,.5306],[.8167,.6787,.5402],[.8211,.6821,.5499],[.8255,.6855,.5595],[.8299,.6889,.5691],[.8343,.6923,.5787],[.8387,.6957,.5883],[.8431,.6991,.5979],[.8475,.7047,.6075],[.8518,.7103,.6171],[.8562,.7159,.6267],[.8606,.7215,.6363],[.865,.7269,.6459],[.8694,.7323,.6555],[.8738,.7377,.6652],[.8782,.7431,.677],[.8825,.7507,.6888],[.8869,.7584,.7006],[.8913,.7661,.7124],[.8957,.7738,.7243],[.9001,.7814,.7361],[.9045,.7891,.7479],[.9089,.7968,.7597],[.9132,.8044,.7715],[.9176,.8121,.7834],[.922,.8198,.7952],[.9264,.8275,.807],[.9308,.8364,.8188],[.9352,.8454,.8306],[.9396,.8544,.8425],[.944,.8634,.8543],[.9483,.8725,.8661],[.9527,.8816,.8779],[.9571,.8931,.8897],[.9615,.9045,.9016],[.9659,.916,.9134],[.9703,.9274,.9252],[.9747,.9389,.937],[.979,.9503,.9488],[.9834,.9618,.9607],[.9878,.9732,.9725],[.9922,.9843,.9843]]};ce.gist_gray={interpolate:!0,colors:[[0,0,0],[.0039,.0039,.0039],[.0078,.0078,.0078],[.0118,.0118,.0118],[.0157,.0157,.0157],[.0196,.0196,.0196],[.0235,.0235,.0235],[.0275,.0275,.0275],[.0314,.0314,.0314],[.0353,.0353,.0353],[.0392,.0392,.0392],[.0431,.0431,.0431],[.0471,.0471,.0471],[.051,.051,.051],[.0549,.0549,.0549],[.0588,.0588,.0588],[.0627,.0627,.0627],[.0667,.0667,.0667],[.0706,.0706,.0706],[.0745,.0745,.0745],[.0784,.0784,.0784],[.0824,.0824,.0824],[.0863,.0863,.0863],[.0902,.0902,.0902],[.0941,.0941,.0941],[.098,.098,.098],[.102,.102,.102],[.1059,.1059,.1059],[.1098,.1098,.1098],[.1137,.1137,.1137],[.1176,.1176,.1176],[.1216,.1216,.1216],[.1255,.1255,.1255],[.1294,.1294,.1294],[.1333,.1333,.1333],[.1373,.1373,.1373],[.1412,.1412,.1412],[.1451,.1451,.1451],[.149,.149,.149],[.1529,.1529,.1529],[.1569,.1569,.1569],[.1608,.1608,.1608],[.1647,.1647,.1647],[.1686,.1686,.1686],[.1725,.1725,.1725],[.1765,.1765,.1765],[.1804,.1804,.1804],[.1843,.1843,.1843],[.1882,.1882,.1882],[.1922,.1922,.1922],[.1961,.1961,.1961],[.2,.2,.2],[.2039,.2039,.2039],[.2078,.2078,.2078],[.2118,.2118,.2118],[.2157,.2157,.2157],[.2196,.2196,.2196],[.2235,.2235,.2235],[.2275,.2275,.2275],[.2314,.2314,.2314],[.2353,.2353,.2353],[.2392,.2392,.2392],[.2431,.2431,.2431],[.2471,.2471,.2471],[.251,.251,.251],[.2549,.2549,.2549],[.2588,.2588,.2588],[.2627,.2627,.2627],[.2667,.2667,.2667],[.2706,.2706,.2706],[.2745,.2745,.2745],[.2784,.2784,.2784],[.2824,.2824,.2824],[.2863,.2863,.2863],[.2902,.2902,.2902],[.2941,.2941,.2941],[.298,.298,.298],[.302,.302,.302],[.3059,.3059,.3059],[.3098,.3098,.3098],[.3137,.3137,.3137],[.3176,.3176,.3176],[.3216,.3216,.3216],[.3255,.3255,.3255],[.3294,.3294,.3294],[.3333,.3333,.3333],[.3373,.3373,.3373],[.3412,.3412,.3412],[.3451,.3451,.3451],[.349,.349,.349],[.3529,.3529,.3529],[.3569,.3569,.3569],[.3608,.3608,.3608],[.3647,.3647,.3647],[.3686,.3686,.3686],[.3725,.3725,.3725],[.3765,.3765,.3765],[.3804,.3804,.3804],[.3843,.3843,.3843],[.3882,.3882,.3882],[.3922,.3922,.3922],[.3961,.3961,.3961],[.4,.4,.4],[.4039,.4039,.4039],[.4078,.4078,.4078],[.4118,.4118,.4118],[.4157,.4157,.4157],[.4196,.4196,.4196],[.4235,.4235,.4235],[.4275,.4275,.4275],[.4314,.4314,.4314],[.4353,.4353,.4353],[.4392,.4392,.4392],[.4431,.4431,.4431],[.4471,.4471,.4471],[.451,.451,.451],[.4549,.4549,.4549],[.4588,.4588,.4588],[.4627,.4627,.4627],[.4667,.4667,.4667],[.4706,.4706,.4706],[.4745,.4745,.4745],[.4784,.4784,.4784],[.4824,.4824,.4824],[.4863,.4863,.4863],[.4902,.4902,.4902],[.4941,.4941,.4941],[.498,.498,.498],[.502,.502,.502],[.5059,.5059,.5059],[.5098,.5098,.5098],[.5137,.5137,.5137],[.5176,.5176,.5176],[.5216,.5216,.5216],[.5255,.5255,.5255],[.5294,.5294,.5294],[.5333,.5333,.5333],[.5373,.5373,.5373],[.5412,.5412,.5412],[.5451,.5451,.5451],[.549,.549,.549],[.5529,.5529,.5529],[.5569,.5569,.5569],[.5608,.5608,.5608],[.5647,.5647,.5647],[.5686,.5686,.5686],[.5725,.5725,.5725],[.5765,.5765,.5765],[.5804,.5804,.5804],[.5843,.5843,.5843],[.5882,.5882,.5882],[.5922,.5922,.5922],[.5961,.5961,.5961],[.6,.6,.6],[.6039,.6039,.6039],[.6078,.6078,.6078],[.6118,.6118,.6118],[.6157,.6157,.6157],[.6196,.6196,.6196],[.6235,.6235,.6235],[.6275,.6275,.6275],[.6314,.6314,.6314],[.6353,.6353,.6353],[.6392,.6392,.6392],[.6431,.6431,.6431],[.6471,.6471,.6471],[.651,.651,.651],[.6549,.6549,.6549],[.6588,.6588,.6588],[.6627,.6627,.6627],[.6667,.6667,.6667],[.6706,.6706,.6706],[.6745,.6745,.6745],[.6784,.6784,.6784],[.6824,.6824,.6824],[.6863,.6863,.6863],[.6902,.6902,.6902],[.6941,.6941,.6941],[.698,.698,.698],[.702,.702,.702],[.7059,.7059,.7059],[.7098,.7098,.7098],[.7137,.7137,.7137],[.7176,.7176,.7176],[.7216,.7216,.7216],[.7255,.7255,.7255],[.7294,.7294,.7294],[.7333,.7333,.7333],[.7373,.7373,.7373],[.7412,.7412,.7412],[.7451,.7451,.7451],[.749,.749,.749],[.7529,.7529,.7529],[.7569,.7569,.7569],[.7608,.7608,.7608],[.7647,.7647,.7647],[.7686,.7686,.7686],[.7725,.7725,.7725],[.7765,.7765,.7765],[.7804,.7804,.7804],[.7843,.7843,.7843],[.7882,.7882,.7882],[.7922,.7922,.7922],[.7961,.7961,.7961],[.8,.8,.8],[.8039,.8039,.8039],[.8078,.8078,.8078],[.8118,.8118,.8118],[.8157,.8157,.8157],[.8196,.8196,.8196],[.8235,.8235,.8235],[.8275,.8275,.8275],[.8314,.8314,.8314],[.8353,.8353,.8353],[.8392,.8392,.8392],[.8431,.8431,.8431],[.8471,.8471,.8471],[.851,.851,.851],[.8549,.8549,.8549],[.8588,.8588,.8588],[.8627,.8627,.8627],[.8667,.8667,.8667],[.8706,.8706,.8706],[.8745,.8745,.8745],[.8784,.8784,.8784],[.8824,.8824,.8824],[.8863,.8863,.8863],[.8902,.8902,.8902],[.8941,.8941,.8941],[.898,.898,.898],[.902,.902,.902],[.9059,.9059,.9059],[.9098,.9098,.9098],[.9137,.9137,.9137],[.9176,.9176,.9176],[.9216,.9216,.9216],[.9255,.9255,.9255],[.9294,.9294,.9294],[.9333,.9333,.9333],[.9373,.9373,.9373],[.9412,.9412,.9412],[.9451,.9451,.9451],[.949,.949,.949],[.9529,.9529,.9529],[.9569,.9569,.9569],[.9608,.9608,.9608],[.9647,.9647,.9647],[.9686,.9686,.9686],[.9725,.9725,.9725],[.9765,.9765,.9765],[.9804,.9804,.9804],[.9843,.9843,.9843],[.9882,.9882,.9882],[.9922,.9922,.9922],[.9961,.9961,.9961],[1,1,1]]};ce.gist_heat={interpolate:!0,colors:[[0,0,0],[.0059,0,0],[.0118,0,0],[.0176,0,0],[.0235,0,0],[.0294,0,0],[.0353,0,0],[.0412,0,0],[.0471,0,0],[.0529,0,0],[.0588,0,0],[.0647,0,0],[.0706,0,0],[.0765,0,0],[.0824,0,0],[.0882,0,0],[.0941,0,0],[.1,0,0],[.1059,0,0],[.1118,0,0],[.1176,0,0],[.1235,0,0],[.1294,0,0],[.1353,0,0],[.1412,0,0],[.1471,0,0],[.1529,0,0],[.1588,0,0],[.1647,0,0],[.1706,0,0],[.1765,0,0],[.1824,0,0],[.1882,0,0],[.1941,0,0],[.2,0,0],[.2059,0,0],[.2118,0,0],[.2176,0,0],[.2235,0,0],[.2294,0,0],[.2353,0,0],[.2412,0,0],[.2471,0,0],[.2529,0,0],[.2588,0,0],[.2647,0,0],[.2706,0,0],[.2765,0,0],[.2824,0,0],[.2882,0,0],[.2941,0,0],[.3,0,0],[.3059,0,0],[.3118,0,0],[.3176,0,0],[.3235,0,0],[.3294,0,0],[.3353,0,0],[.3412,0,0],[.3471,0,0],[.3529,0,0],[.3588,0,0],[.3647,0,0],[.3706,0,0],[.3765,0,0],[.3824,0,0],[.3882,0,0],[.3941,0,0],[.4,0,0],[.4059,0,0],[.4118,0,0],[.4176,0,0],[.4235,0,0],[.4294,0,0],[.4353,0,0],[.4412,0,0],[.4471,0,0],[.4529,0,0],[.4588,0,0],[.4647,0,0],[.4706,0,0],[.4765,0,0],[.4824,0,0],[.4882,0,0],[.4941,0,0],[.5,0,0],[.5059,0,0],[.5118,0,0],[.5176,0,0],[.5235,0,0],[.5294,0,0],[.5353,0,0],[.5412,0,0],[.5471,0,0],[.5529,0,0],[.5588,0,0],[.5647,0,0],[.5706,0,0],[.5765,0,0],[.5824,0,0],[.5882,0,0],[.5941,0,0],[.6,0,0],[.6059,0,0],[.6118,0,0],[.6176,0,0],[.6235,0,0],[.6294,0,0],[.6353,0,0],[.6412,0,0],[.6471,0,0],[.6529,0,0],[.6588,0,0],[.6647,0,0],[.6706,0,0],[.6765,0,0],[.6824,0,0],[.6882,0,0],[.6941,0,0],[.7,0,0],[.7059,0,0],[.7118,0,0],[.7176,0,0],[.7235,0,0],[.7294,0,0],[.7353,0,0],[.7412,0,0],[.7471,0,0],[.7529,.0039,0],[.7588,.0118,0],[.7647,.0196,0],[.7706,.0275,0],[.7765,.0353,0],[.7824,.0431,0],[.7882,.051,0],[.7941,.0588,0],[.8,.0667,0],[.8059,.0745,0],[.8118,.0824,0],[.8176,.0902,0],[.8235,.098,0],[.8294,.1059,0],[.8353,.1137,0],[.8412,.1216,0],[.8471,.1294,0],[.8529,.1373,0],[.8588,.1451,0],[.8647,.1529,0],[.8706,.1608,0],[.8765,.1686,0],[.8824,.1765,0],[.8882,.1843,0],[.8941,.1922,0],[.9,.2,0],[.9059,.2078,0],[.9118,.2157,0],[.9176,.2235,0],[.9235,.2314,0],[.9294,.2392,0],[.9353,.2471,0],[.9412,.2549,0],[.9471,.2627,0],[.9529,.2706,0],[.9588,.2784,0],[.9647,.2863,0],[.9706,.2941,0],[.9765,.302,0],[.9824,.3098,0],[.9882,.3176,0],[.9941,.3255,0],[1,.3333,0],[1,.3412,0],[1,.349,0],[1,.3569,0],[1,.3647,0],[1,.3725,0],[1,.3804,0],[1,.3882,0],[1,.3961,0],[1,.4039,0],[1,.4118,0],[1,.4196,0],[1,.4275,0],[1,.4353,0],[1,.4431,0],[1,.451,0],[1,.4588,0],[1,.4667,0],[1,.4745,0],[1,.4824,0],[1,.4902,0],[1,.498,0],[1,.5059,.0118],[1,.5137,.0275],[1,.5216,.0431],[1,.5294,.0588],[1,.5373,.0745],[1,.5451,.0902],[1,.5529,.1059],[1,.5608,.1216],[1,.5686,.1373],[1,.5765,.1529],[1,.5843,.1686],[1,.5922,.1843],[1,.6,.2],[1,.6078,.2157],[1,.6157,.2314],[1,.6235,.2471],[1,.6314,.2627],[1,.6392,.2784],[1,.6471,.2941],[1,.6549,.3098],[1,.6627,.3255],[1,.6706,.3412],[1,.6784,.3569],[1,.6863,.3725],[1,.6941,.3882],[1,.702,.4039],[1,.7098,.4196],[1,.7176,.4353],[1,.7255,.451],[1,.7333,.4667],[1,.7412,.4824],[1,.749,.498],[1,.7569,.5137],[1,.7647,.5294],[1,.7725,.5451],[1,.7804,.5608],[1,.7882,.5765],[1,.7961,.5922],[1,.8039,.6078],[1,.8118,.6235],[1,.8196,.6392],[1,.8275,.6549],[1,.8353,.6706],[1,.8431,.6863],[1,.851,.702],[1,.8588,.7176],[1,.8667,.7333],[1,.8745,.749],[1,.8824,.7647],[1,.8902,.7804],[1,.898,.7961],[1,.9059,.8118],[1,.9137,.8275],[1,.9216,.8431],[1,.9294,.8588],[1,.9373,.8745],[1,.9451,.8902],[1,.9529,.9059],[1,.9608,.9216],[1,.9686,.9373],[1,.9765,.9529],[1,.9843,.9686],[1,.9922,.9843],[1,1,1]]};ce.gist_ncar={interpolate:!0,colors:[[0,0,.502],[0,.0286,.4651],[0,.0572,.4282],[0,.0859,.3913],[0,.1145,.3544],[0,.1431,.3175],[0,.1717,.2806],[0,.2003,.2437],[0,.229,.2069],[0,.2576,.17],[0,.2862,.1331],[0,.3148,.0962],[0,.3434,.0593],[0,.3721,.0224],[0,.3457,.0871],[0,.3192,.1523],[0,.2926,.2175],[0,.266,.2827],[0,.2394,.3479],[0,.2128,.4132],[0,.1862,.4784],[0,.1596,.5436],[0,.1331,.6088],[0,.1065,.674],[0,.0799,.7392],[0,.0533,.8044],[0,.0267,.8696],[0,1e-4,.9349],[0,.0551,1],[0,.1105,1],[0,.1659,1],[0,.2213,1],[0,.2766,1],[0,.332,1],[0,.3874,1],[0,.4428,1],[0,.4982,1],[0,.5535,1],[0,.6089,1],[0,.6643,1],[0,.7197,1],[0,.7536,1],[0,.7752,1],[0,.7925,1],[0,.8098,1],[0,.8271,1],[0,.8444,1],[0,.8617,1],[0,.8789,1],[0,.8962,1],[0,.9135,1],[0,.9308,1],[0,.9481,.9999],[0,.9654,.9741],[0,.9827,.9484],[0,.9999,.9227],[0,.9982,.897],[0,.9964,.8713],[0,.9947,.8456],[0,.9929,.8199],[0,.9911,.7942],[0,.9893,.7685],[0,.9875,.7428],[0,.9857,.717],[0,.984,.6913],[0,.9822,.6656],[0,.9804,.6399],[0,.9804,.614],[0,.9804,.5731],[0,.9804,.5322],[0,.982,.4913],[0,.9837,.4504],[0,.9853,.4095],[0,.9869,.3685],[0,.9886,.3276],[0,.9902,.2867],[0,.9918,.2458],[0,.9935,.2049],[0,.9951,.164],[0,.9967,.1231],[.025,.9984,.0822],[.05,.9998,.0412],[.0749,.9851,3e-4],[.0999,.9703,0],[.1249,.9556,0],[.1499,.9408,0],[.1748,.926,0],[.1998,.9113,0],[.2248,.8965,0],[.2498,.8818,0],[.2747,.867,0],[.2997,.8523,0],[.3247,.8375,0],[.3497,.8228,0],[.3746,.8082,0],[.3994,.821,0],[.4072,.8337,0],[.4149,.8465,0],[.4227,.8593,0],[.4305,.8721,0],[.4382,.8848,0],[.446,.8976,0],[.4538,.9104,0],[.4615,.9232,0],[.4693,.936,0],[.4771,.9487,0],[.4848,.9615,0],[.4926,.9743,.0156],[.5004,.9871,.0312],[.5183,.9998,.0468],[.5361,1,.0624],[.554,1,.078],[.5718,1,.0937],[.5897,1,.1093],[.6075,1,.1249],[.6254,1,.1405],[.6432,1,.1561],[.6611,1,.1718],[.6789,1,.1874],[.6968,1,.203],[.7146,1,.2186],[.7324,1,.2342],[.7503,1,.2185],[.7681,1,.2029],[.786,1,.1873],[.8038,1,.1717],[.8217,1,.1561],[.8395,1,.1404],[.8574,1,.1248],[.8752,1,.1092],[.8931,1,.0936],[.9109,1,.078],[.9288,1,.0623],[.9466,1,.0467],[.9645,.9904,.0311],[.9823,.9807,.0155],[1,.9711,0],[1,.9614,0],[1,.9517,0],[1,.942,0],[1,.9324,0],[1,.9227,0],[1,.913,0],[1,.9034,0],[1,.8937,0],[1,.884,0],[1,.8743,0],[1,.8647,0],[1,.855,0],[1,.8453,.0042],[1,.8357,.0084],[1,.826,.0127],[1,.8163,.0169],[1,.8066,.0211],[1,.797,.0253],[1,.7873,.0295],[1,.7776,.0338],[1,.768,.038],[1,.7583,.0422],[1,.7486,.0464],[1,.7389,.0506],[1,.7293,.0549],[1,.6973,.0513],[1,.6652,.0476],[1,.6331,.0439],[1,.601,.0403],[1,.5688,.0366],[1,.5367,.033],[1,.5046,.0293],[1,.4725,.0256],[1,.4404,.022],[1,.4083,.0183],[1,.3762,.0146],[1,.344,.011],[1,.3119,.0073],[1,.2798,.0037],[1,.2611,0],[1,.2424,0],[1,.2238,0],[1,.2051,0],[1,.1865,0],[1,.1678,0],[1,.1492,0],[1,.1305,0],[1,.1119,0],[1,.0932,0],[1,.0746,0],[1,.056,0],[1,.0373,0],[1,.0187,.0688],[1,0,.1383],[1,0,.2079],[1,0,.2774],[1,0,.347],[1,0,.4166],[1,0,.4861],[1,0,.5557],[1,0,.6252],[1,0,.6948],[1,0,.7644],[1,0,.8339],[1,0,.9035],[1,0,.973],[.9733,.0134,.9868],[.9463,.0269,1],[.9193,.0404,1],[.8922,.0539,1],[.8652,.0674,1],[.8382,.0809,1],[.8112,.0944,1],[.7842,.1079,1],[.7572,.1214,1],[.7301,.1349,1],[.7031,.1484,1],[.6761,.1619,1],[.6491,.1755,1],[.6221,.1987,.9952],[.6448,.2219,.9905],[.668,.2451,.9858],[.6913,.2683,.9811],[.7145,.2915,.9764],[.7378,.3147,.9717],[.761,.3379,.967],[.7843,.3611,.9623],[.8075,.3843,.9576],[.8308,.4075,.9529],[.854,.4307,.9482],[.8772,.4538,.9435],[.9005,.477,.9388],[.9235,.5002,.9341],[.9263,.5183,.9365],[.9291,.5365,.9389],[.9319,.5547,.9413],[.9347,.5728,.9437],[.9375,.591,.946],[.9403,.6092,.9484],[.9431,.6273,.9508],[.9459,.6455,.9532],[.9486,.6637,.9556],[.9514,.6818,.958],[.9542,.7,.9603],[.957,.7182,.9627],[.9598,.7363,.9651],[.9626,.7545,.9675],[.9654,.7727,.9699],[.9682,.7908,.9723],[.971,.809,.9746],[.9738,.8272,.977],[.9766,.8453,.9794],[.9794,.8635,.9818],[.9821,.8817,.9842],[.9849,.8998,.9866],[.9877,.918,.9889],[.9905,.9362,.9913],[.9933,.9543,.9937],[.9961,.9725,.9961]]};ce.gist_rainbow={interpolate:!0,colors:[[1,0,.16],[1,0,.1391],[1,0,.1182],[1,0,.0973],[1,0,.0763],[1,0,.0554],[1,0,.0345],[1,0,.0136],[1,.0074,0],[1,.0286,0],[1,.0498,0],[1,.071,0],[1,.0922,0],[1,.1134,0],[1,.1346,0],[1,.1558,0],[1,.177,0],[1,.1982,0],[1,.2194,0],[1,.2406,0],[1,.2618,0],[1,.283,0],[1,.3042,0],[1,.3254,0],[1,.3466,0],[1,.3678,0],[1,.389,0],[1,.4102,0],[1,.4314,0],[1,.4526,0],[1,.4738,0],[1,.495,0],[1,.5162,0],[1,.5374,0],[1,.5586,0],[1,.5798,0],[1,.601,0],[1,.6222,0],[1,.6433,0],[1,.6645,0],[1,.6857,0],[1,.7069,0],[1,.7281,0],[1,.7493,0],[1,.7705,0],[1,.7917,0],[1,.8129,0],[1,.8341,0],[1,.8553,0],[1,.8765,0],[1,.8977,0],[1,.9189,0],[1,.9401,0],[1,.9613,0],[1,.9825,0],[.9963,1,0],[.9751,1,0],[.9539,1,0],[.9327,1,0],[.9115,1,0],[.8903,1,0],[.8691,1,0],[.8479,1,0],[.8267,1,0],[.8055,1,0],[.7843,1,0],[.7631,1,0],[.7419,1,0],[.7207,1,0],[.6995,1,0],[.6783,1,0],[.6571,1,0],[.6359,1,0],[.6147,1,0],[.5935,1,0],[.5723,1,0],[.5511,1,0],[.5299,1,0],[.5087,1,0],[.4875,1,0],[.4663,1,0],[.4452,1,0],[.424,1,0],[.4028,1,0],[.3816,1,0],[.3604,1,0],[.3392,1,0],[.318,1,0],[.2968,1,0],[.2756,1,0],[.2544,1,0],[.2332,1,0],[.212,1,0],[.1908,1,0],[.1696,1,0],[.1484,1,0],[.1272,1,0],[.106,1,0],[.0848,1,0],[.0636,1,0],[.0424,1,0],[.0212,1,0],[0,1,0],[0,1,.0211],[0,1,.0422],[0,1,.0633],[0,1,.0843],[0,1,.1054],[0,1,.1265],[0,1,.1476],[0,1,.1687],[0,1,.1898],[0,1,.2108],[0,1,.2319],[0,1,.253],[0,1,.2741],[0,1,.2952],[0,1,.3163],[0,1,.3373],[0,1,.3584],[0,1,.3795],[0,1,.4006],[0,1,.4217],[0,1,.4428],[0,1,.4638],[0,1,.4849],[0,1,.506],[0,1,.5271],[0,1,.5482],[0,1,.5693],[0,1,.5903],[0,1,.6114],[0,1,.6325],[0,1,.6536],[0,1,.6747],[0,1,.6958],[0,1,.7168],[0,1,.7379],[0,1,.759],[0,1,.7801],[0,1,.8012],[0,1,.8223],[0,1,.8433],[0,1,.8644],[0,1,.8855],[0,1,.9066],[0,1,.9277],[0,1,.9488],[0,1,.9699],[0,1,.9909],[0,.9879,1],[0,.9665,1],[0,.9452,1],[0,.9239,1],[0,.9026,1],[0,.8813,1],[0,.86,1],[0,.8387,1],[0,.8173,1],[0,.796,1],[0,.7747,1],[0,.7534,1],[0,.7321,1],[0,.7108,1],[0,.6895,1],[0,.6682,1],[0,.6468,1],[0,.6255,1],[0,.6042,1],[0,.5829,1],[0,.5616,1],[0,.5403,1],[0,.519,1],[0,.4977,1],[0,.4763,1],[0,.455,1],[0,.4337,1],[0,.4124,1],[0,.3911,1],[0,.3698,1],[0,.3485,1],[0,.3272,1],[0,.3058,1],[0,.2845,1],[0,.2632,1],[0,.2419,1],[0,.2206,1],[0,.1993,1],[0,.178,1],[0,.1566,1],[0,.1353,1],[0,.114,1],[0,.0927,1],[0,.0714,1],[0,.0501,1],[0,.0288,1],[0,.0075,1],[.0139,0,1],[.0352,0,1],[.0565,0,1],[.0778,0,1],[.0991,0,1],[.1204,0,1],[.1417,0,1],[.163,0,1],[.1844,0,1],[.2057,0,1],[.227,0,1],[.2483,0,1],[.2696,0,1],[.2909,0,1],[.3122,0,1],[.3335,0,1],[.3549,0,1],[.3762,0,1],[.3975,0,1],[.4188,0,1],[.4401,0,1],[.4614,0,1],[.4827,0,1],[.504,0,1],[.5254,0,1],[.5467,0,1],[.568,0,1],[.5893,0,1],[.6106,0,1],[.6319,0,1],[.6532,0,1],[.6746,0,1],[.6959,0,1],[.7172,0,1],[.7385,0,1],[.7598,0,1],[.7811,0,1],[.8024,0,1],[.8237,0,1],[.8451,0,1],[.8664,0,1],[.8877,0,1],[.909,0,1],[.9303,0,1],[.9516,0,1],[.9729,0,1],[.9942,0,1],[1,0,.9844],[1,0,.9631],[1,0,.9418],[1,0,.9205],[1,0,.8992],[1,0,.8779],[1,0,.8566],[1,0,.8353],[1,0,.8139],[1,0,.7926],[1,0,.7713],[1,0,.75]]};ce.gist_stern={interpolate:!0,colors:[[0,0,0],[.0717,.0039,.0078],[.1434,.0078,.0157],[.2151,.0118,.0235],[.2868,.0157,.0314],[.3585,.0196,.0392],[.4302,.0235,.0471],[.5018,.0275,.0549],[.5735,.0314,.0627],[.6452,.0353,.0706],[.7169,.0392,.0784],[.7886,.0431,.0863],[.8603,.0471,.0941],[.932,.051,.102],[.999,.0549,.1098],[.9795,.0588,.1176],[.9599,.0627,.1255],[.9404,.0667,.1333],[.9208,.0706,.1412],[.9013,.0745,.149],[.8818,.0784,.1569],[.8622,.0824,.1647],[.8427,.0863,.1725],[.8232,.0902,.1804],[.8036,.0941,.1882],[.7841,.098,.1961],[.7645,.102,.2039],[.745,.1059,.2118],[.7255,.1098,.2196],[.7059,.1137,.2275],[.6864,.1176,.2353],[.6669,.1216,.2431],[.6473,.1255,.251],[.6278,.1294,.2588],[.6082,.1333,.2667],[.5887,.1373,.2745],[.5692,.1412,.2824],[.5496,.1451,.2902],[.5301,.149,.298],[.5106,.1529,.3059],[.491,.1569,.3137],[.4715,.1608,.3216],[.4519,.1647,.3294],[.4324,.1686,.3373],[.4129,.1725,.3451],[.3933,.1765,.3529],[.3738,.1804,.3608],[.3543,.1843,.3686],[.3347,.1882,.3765],[.3152,.1922,.3843],[.2956,.1961,.3922],[.2761,.2,.4],[.2566,.2039,.4078],[.237,.2078,.4157],[.2175,.2118,.4235],[.198,.2157,.4314],[.1784,.2196,.4392],[.1589,.2235,.4471],[.1393,.2275,.4549],[.1198,.2314,.4627],[.1003,.2353,.4706],[.0807,.2392,.4784],[.0612,.2431,.4863],[.0417,.2471,.4941],[.251,.251,.502],[.2549,.2549,.5098],[.2588,.2588,.5176],[.2627,.2627,.5255],[.2667,.2667,.5333],[.2706,.2706,.5412],[.2745,.2745,.549],[.2784,.2784,.5569],[.2824,.2824,.5647],[.2863,.2863,.5725],[.2902,.2902,.5804],[.2941,.2941,.5882],[.298,.298,.5961],[.302,.302,.6039],[.3059,.3059,.6118],[.3098,.3098,.6196],[.3137,.3137,.6275],[.3176,.3176,.6353],[.3216,.3216,.6431],[.3255,.3255,.651],[.3294,.3294,.6588],[.3333,.3333,.6667],[.3373,.3373,.6745],[.3412,.3412,.6824],[.3451,.3451,.6902],[.349,.349,.698],[.3529,.3529,.7059],[.3569,.3569,.7137],[.3608,.3608,.7216],[.3647,.3647,.7294],[.3686,.3686,.7373],[.3725,.3725,.7451],[.3765,.3765,.7529],[.3804,.3804,.7608],[.3843,.3843,.7686],[.3882,.3882,.7765],[.3922,.3922,.7843],[.3961,.3961,.7922],[.4,.4,.8],[.4039,.4039,.8078],[.4078,.4078,.8157],[.4118,.4118,.8235],[.4157,.4157,.8314],[.4196,.4196,.8392],[.4235,.4235,.8471],[.4275,.4275,.8549],[.4314,.4314,.8627],[.4353,.4353,.8706],[.4392,.4392,.8784],[.4431,.4431,.8863],[.4471,.4471,.8941],[.451,.451,.902],[.4549,.4549,.9098],[.4588,.4588,.9176],[.4627,.4627,.9255],[.4667,.4667,.9333],[.4706,.4706,.9412],[.4745,.4745,.949],[.4784,.4784,.9569],[.4824,.4824,.9647],[.4863,.4863,.9725],[.4902,.4902,.9804],[.4941,.4941,.9882],[.498,.498,.9961],[.502,.502,.9917],[.5059,.5059,.975],[.5098,.5098,.9583],[.5137,.5137,.9416],[.5176,.5176,.9249],[.5216,.5216,.9082],[.5255,.5255,.8915],[.5294,.5294,.8748],[.5333,.5333,.8582],[.5373,.5373,.8415],[.5412,.5412,.8248],[.5451,.5451,.8081],[.549,.549,.7914],[.5529,.5529,.7747],[.5569,.5569,.758],[.5608,.5608,.7413],[.5647,.5647,.7247],[.5686,.5686,.708],[.5725,.5725,.6913],[.5765,.5765,.6746],[.5804,.5804,.6579],[.5843,.5843,.6412],[.5882,.5882,.6245],[.5922,.5922,.6078],[.5961,.5961,.5912],[.6,.6,.5745],[.6039,.6039,.5578],[.6078,.6078,.5411],[.6118,.6118,.5244],[.6157,.6157,.5077],[.6196,.6196,.491],[.6235,.6235,.4743],[.6275,.6275,.4577],[.6314,.6314,.441],[.6353,.6353,.4243],[.6392,.6392,.4076],[.6431,.6431,.3909],[.6471,.6471,.3742],[.651,.651,.3575],[.6549,.6549,.3408],[.6588,.6588,.3242],[.6627,.6627,.3075],[.6667,.6667,.2908],[.6706,.6706,.2741],[.6745,.6745,.2574],[.6784,.6784,.2407],[.6824,.6824,.224],[.6863,.6863,.2073],[.6902,.6902,.1907],[.6941,.6941,.174],[.698,.698,.1573],[.702,.702,.1406],[.7059,.7059,.1239],[.7098,.7098,.1072],[.7137,.7137,.0905],[.7176,.7176,.0738],[.7216,.7216,.0572],[.7255,.7255,.0405],[.7294,.7294,.0238],[.7333,.7333,.0071],[.7373,.7373,.0085],[.7412,.7412,.0233],[.7451,.7451,.0381],[.749,.749,.0529],[.7529,.7529,.0677],[.7569,.7569,.0825],[.7608,.7608,.0973],[.7647,.7647,.1121],[.7686,.7686,.1269],[.7725,.7725,.1417],[.7765,.7765,.1565],[.7804,.7804,.1713],[.7843,.7843,.1861],[.7882,.7882,.2009],[.7922,.7922,.2157],[.7961,.7961,.2305],[.8,.8,.2453],[.8039,.8039,.2601],[.8078,.8078,.2749],[.8118,.8118,.2897],[.8157,.8157,.3045],[.8196,.8196,.3193],[.8235,.8235,.3341],[.8275,.8275,.3489],[.8314,.8314,.3637],[.8353,.8353,.3785],[.8392,.8392,.3933],[.8431,.8431,.4081],[.8471,.8471,.4229],[.851,.851,.4377],[.8549,.8549,.4525],[.8588,.8588,.4673],[.8627,.8627,.4821],[.8667,.8667,.4969],[.8706,.8706,.5117],[.8745,.8745,.5265],[.8784,.8784,.5413],[.8824,.8824,.556],[.8863,.8863,.5708],[.8902,.8902,.5856],[.8941,.8941,.6004],[.898,.898,.6152],[.902,.902,.63],[.9059,.9059,.6448],[.9098,.9098,.6596],[.9137,.9137,.6744],[.9176,.9176,.6892],[.9216,.9216,.704],[.9255,.9255,.7188],[.9294,.9294,.7336],[.9333,.9333,.7484],[.9373,.9373,.7632],[.9412,.9412,.778],[.9451,.9451,.7928],[.949,.949,.8076],[.9529,.9529,.8224],[.9569,.9569,.8372],[.9608,.9608,.852],[.9647,.9647,.8668],[.9686,.9686,.8816],[.9725,.9725,.8964],[.9765,.9765,.9112],[.9804,.9804,.926],[.9843,.9843,.9408],[.9882,.9882,.9556],[.9922,.9922,.9704],[.9961,.9961,.9852],[1,1,1]]};ce.gist_yarg={interpolate:!0,colors:[[1,1,1],[.9961,.9961,.9961],[.9922,.9922,.9922],[.9882,.9882,.9882],[.9843,.9843,.9843],[.9804,.9804,.9804],[.9765,.9765,.9765],[.9725,.9725,.9725],[.9686,.9686,.9686],[.9647,.9647,.9647],[.9608,.9608,.9608],[.9569,.9569,.9569],[.9529,.9529,.9529],[.949,.949,.949],[.9451,.9451,.9451],[.9412,.9412,.9412],[.9373,.9373,.9373],[.9333,.9333,.9333],[.9294,.9294,.9294],[.9255,.9255,.9255],[.9216,.9216,.9216],[.9176,.9176,.9176],[.9137,.9137,.9137],[.9098,.9098,.9098],[.9059,.9059,.9059],[.902,.902,.902],[.898,.898,.898],[.8941,.8941,.8941],[.8902,.8902,.8902],[.8863,.8863,.8863],[.8824,.8824,.8824],[.8784,.8784,.8784],[.8745,.8745,.8745],[.8706,.8706,.8706],[.8667,.8667,.8667],[.8627,.8627,.8627],[.8588,.8588,.8588],[.8549,.8549,.8549],[.851,.851,.851],[.8471,.8471,.8471],[.8431,.8431,.8431],[.8392,.8392,.8392],[.8353,.8353,.8353],[.8314,.8314,.8314],[.8275,.8275,.8275],[.8235,.8235,.8235],[.8196,.8196,.8196],[.8157,.8157,.8157],[.8118,.8118,.8118],[.8078,.8078,.8078],[.8039,.8039,.8039],[.8,.8,.8],[.7961,.7961,.7961],[.7922,.7922,.7922],[.7882,.7882,.7882],[.7843,.7843,.7843],[.7804,.7804,.7804],[.7765,.7765,.7765],[.7725,.7725,.7725],[.7686,.7686,.7686],[.7647,.7647,.7647],[.7608,.7608,.7608],[.7569,.7569,.7569],[.7529,.7529,.7529],[.749,.749,.749],[.7451,.7451,.7451],[.7412,.7412,.7412],[.7373,.7373,.7373],[.7333,.7333,.7333],[.7294,.7294,.7294],[.7255,.7255,.7255],[.7216,.7216,.7216],[.7176,.7176,.7176],[.7137,.7137,.7137],[.7098,.7098,.7098],[.7059,.7059,.7059],[.702,.702,.702],[.698,.698,.698],[.6941,.6941,.6941],[.6902,.6902,.6902],[.6863,.6863,.6863],[.6824,.6824,.6824],[.6784,.6784,.6784],[.6745,.6745,.6745],[.6706,.6706,.6706],[.6667,.6667,.6667],[.6627,.6627,.6627],[.6588,.6588,.6588],[.6549,.6549,.6549],[.651,.651,.651],[.6471,.6471,.6471],[.6431,.6431,.6431],[.6392,.6392,.6392],[.6353,.6353,.6353],[.6314,.6314,.6314],[.6275,.6275,.6275],[.6235,.6235,.6235],[.6196,.6196,.6196],[.6157,.6157,.6157],[.6118,.6118,.6118],[.6078,.6078,.6078],[.6039,.6039,.6039],[.6,.6,.6],[.5961,.5961,.5961],[.5922,.5922,.5922],[.5882,.5882,.5882],[.5843,.5843,.5843],[.5804,.5804,.5804],[.5765,.5765,.5765],[.5725,.5725,.5725],[.5686,.5686,.5686],[.5647,.5647,.5647],[.5608,.5608,.5608],[.5569,.5569,.5569],[.5529,.5529,.5529],[.549,.549,.549],[.5451,.5451,.5451],[.5412,.5412,.5412],[.5373,.5373,.5373],[.5333,.5333,.5333],[.5294,.5294,.5294],[.5255,.5255,.5255],[.5216,.5216,.5216],[.5176,.5176,.5176],[.5137,.5137,.5137],[.5098,.5098,.5098],[.5059,.5059,.5059],[.502,.502,.502],[.498,.498,.498],[.4941,.4941,.4941],[.4902,.4902,.4902],[.4863,.4863,.4863],[.4824,.4824,.4824],[.4784,.4784,.4784],[.4745,.4745,.4745],[.4706,.4706,.4706],[.4667,.4667,.4667],[.4627,.4627,.4627],[.4588,.4588,.4588],[.4549,.4549,.4549],[.451,.451,.451],[.4471,.4471,.4471],[.4431,.4431,.4431],[.4392,.4392,.4392],[.4353,.4353,.4353],[.4314,.4314,.4314],[.4275,.4275,.4275],[.4235,.4235,.4235],[.4196,.4196,.4196],[.4157,.4157,.4157],[.4118,.4118,.4118],[.4078,.4078,.4078],[.4039,.4039,.4039],[.4,.4,.4],[.3961,.3961,.3961],[.3922,.3922,.3922],[.3882,.3882,.3882],[.3843,.3843,.3843],[.3804,.3804,.3804],[.3765,.3765,.3765],[.3725,.3725,.3725],[.3686,.3686,.3686],[.3647,.3647,.3647],[.3608,.3608,.3608],[.3569,.3569,.3569],[.3529,.3529,.3529],[.349,.349,.349],[.3451,.3451,.3451],[.3412,.3412,.3412],[.3373,.3373,.3373],[.3333,.3333,.3333],[.3294,.3294,.3294],[.3255,.3255,.3255],[.3216,.3216,.3216],[.3176,.3176,.3176],[.3137,.3137,.3137],[.3098,.3098,.3098],[.3059,.3059,.3059],[.302,.302,.302],[.298,.298,.298],[.2941,.2941,.2941],[.2902,.2902,.2902],[.2863,.2863,.2863],[.2824,.2824,.2824],[.2784,.2784,.2784],[.2745,.2745,.2745],[.2706,.2706,.2706],[.2667,.2667,.2667],[.2627,.2627,.2627],[.2588,.2588,.2588],[.2549,.2549,.2549],[.251,.251,.251],[.2471,.2471,.2471],[.2431,.2431,.2431],[.2392,.2392,.2392],[.2353,.2353,.2353],[.2314,.2314,.2314],[.2275,.2275,.2275],[.2235,.2235,.2235],[.2196,.2196,.2196],[.2157,.2157,.2157],[.2118,.2118,.2118],[.2078,.2078,.2078],[.2039,.2039,.2039],[.2,.2,.2],[.1961,.1961,.1961],[.1922,.1922,.1922],[.1882,.1882,.1882],[.1843,.1843,.1843],[.1804,.1804,.1804],[.1765,.1765,.1765],[.1725,.1725,.1725],[.1686,.1686,.1686],[.1647,.1647,.1647],[.1608,.1608,.1608],[.1569,.1569,.1569],[.1529,.1529,.1529],[.149,.149,.149],[.1451,.1451,.1451],[.1412,.1412,.1412],[.1373,.1373,.1373],[.1333,.1333,.1333],[.1294,.1294,.1294],[.1255,.1255,.1255],[.1216,.1216,.1216],[.1176,.1176,.1176],[.1137,.1137,.1137],[.1098,.1098,.1098],[.1059,.1059,.1059],[.102,.102,.102],[.098,.098,.098],[.0941,.0941,.0941],[.0902,.0902,.0902],[.0863,.0863,.0863],[.0824,.0824,.0824],[.0784,.0784,.0784],[.0745,.0745,.0745],[.0706,.0706,.0706],[.0667,.0667,.0667],[.0627,.0627,.0627],[.0588,.0588,.0588],[.0549,.0549,.0549],[.051,.051,.051],[.0471,.0471,.0471],[.0431,.0431,.0431],[.0392,.0392,.0392],[.0353,.0353,.0353],[.0314,.0314,.0314],[.0275,.0275,.0275],[.0235,.0235,.0235],[.0196,.0196,.0196],[.0157,.0157,.0157],[.0118,.0118,.0118],[.0078,.0078,.0078],[.0039,.0039,.0039],[0,0,0]]};ce.gnuplot={interpolate:!0,colors:[[0,0,0],[.0626,0,.0246],[.0886,0,.0493],[.1085,0,.0739],[.1252,0,.0984],[.14,0,.1229],[.1534,0,.1473],[.1657,0,.1716],[.1771,0,.1958],[.1879,0,.2199],[.198,1e-4,.2439],[.2077,1e-4,.2677],[.2169,1e-4,.2914],[.2258,1e-4,.3149],[.2343,2e-4,.3382],[.2425,2e-4,.3612],[.2505,2e-4,.3841],[.2582,3e-4,.4067],[.2657,4e-4,.4291],[.273,4e-4,.4512],[.2801,5e-4,.4731],[.287,6e-4,.4947],[.2937,6e-4,.5159],[.3003,7e-4,.5369],[.3068,8e-4,.5575],[.3131,9e-4,.5778],[.3193,.0011,.5977],[.3254,.0012,.6173],[.3314,.0013,.6365],[.3372,.0015,.6553],[.343,.0016,.6737],[.3487,.0018,.6917],[.3542,.002,.7093],[.3597,.0022,.7264],[.3651,.0024,.7431],[.3705,.0026,.7594],[.3757,.0028,.7752],[.3809,.0031,.7905],[.386,.0033,.8054],[.3911,.0036,.8197],[.3961,.0039,.8336],[.401,.0042,.847],[.4058,.0045,.8598],[.4106,.0048,.8721],[.4154,.0051,.8839],[.4201,.0055,.8952],[.4247,.0059,.9059],[.4293,.0063,.916],[.4339,.0067,.9256],[.4384,.0071,.9347],[.4428,.0075,.9432],[.4472,.008,.9511],[.4516,.0085,.9584],[.4559,.009,.9651],[.4602,.0095,.9713],[.4644,.01,.9768],[.4686,.0106,.9818],[.4728,.0112,.9862],[.4769,.0118,.99],[.481,.0124,.9932],[.4851,.013,.9957],[.4891,.0137,.9977],[.4931,.0144,.9991],[.4971,.0151,.9998],[.501,.0158,1],[.5049,.0166,.9995],[.5087,.0173,.9985],[.5126,.0181,.9968],[.5164,.019,.9945],[.5202,.0198,.9916],[.5239,.0207,.9882],[.5277,.0216,.9841],[.5314,.0225,.9794],[.535,.0235,.9741],[.5387,.0244,.9683],[.5423,.0254,.9618],[.5459,.0265,.9548],[.5495,.0275,.9472],[.5531,.0286,.939],[.5566,.0297,.9302],[.5601,.0309,.9209],[.5636,.0321,.911],[.5671,.0333,.9006],[.5705,.0345,.8896],[.5739,.0357,.8781],[.5774,.037,.866],[.5807,.0384,.8534],[.5841,.0397,.8403],[.5875,.0411,.8267],[.5908,.0425,.8126],[.5941,.044,.798],[.5974,.0454,.7829],[.6007,.047,.7674],[.6039,.0485,.7513],[.6071,.0501,.7348],[.6104,.0517,.7179],[.6136,.0534,.7005],[.6168,.055,.6827],[.6199,.0568,.6645],[.6231,.0585,.6459],[.6262,.0603,.6269],[.6293,.0621,.6075],[.6325,.064,.5878],[.6355,.0659,.5677],[.6386,.0678,.5472],[.6417,.0698,.5264],[.6447,.0718,.5053],[.6478,.0739,.4839],[.6508,.076,.4622],[.6538,.0781,.4402],[.6568,.0803,.418],[.6598,.0825,.3955],[.6627,.0847,.3727],[.6657,.087,.3497],[.6686,.0893,.3265],[.6716,.0917,.3032],[.6745,.0941,.2796],[.6774,.0966,.2558],[.6803,.0991,.2319],[.6831,.1016,.2079],[.686,.1042,.1837],[.6888,.1068,.1595],[.6917,.1095,.1351],[.6945,.1122,.1107],[.6973,.115,.0861],[.7001,.1178,.0616],[.7029,.1206,.037],[.7057,.1235,.0123],[.7085,.1265,0],[.7113,.1295,0],[.714,.1325,0],[.7167,.1356,0],[.7195,.1387,0],[.7222,.1419,0],[.7249,.1451,0],[.7276,.1484,0],[.7303,.1517,0],[.733,.1551,0],[.7356,.1585,0],[.7383,.162,0],[.741,.1655,0],[.7436,.1691,0],[.7462,.1727,0],[.7489,.1764,0],[.7515,.1801,0],[.7541,.1839,0],[.7567,.1877,0],[.7593,.1916,0],[.7618,.1955,0],[.7644,.1995,0],[.767,.2035,0],[.7695,.2076,0],[.7721,.2118,0],[.7746,.216,0],[.7771,.2203,0],[.7796,.2246,0],[.7822,.229,0],[.7847,.2334,0],[.7872,.2379,0],[.7896,.2424,0],[.7921,.247,0],[.7946,.2517,0],[.7971,.2564,0],[.7995,.2612,0],[.802,.266,0],[.8044,.2709,0],[.8068,.2759,0],[.8093,.2809,0],[.8117,.286,0],[.8141,.2911,0],[.8165,.2963,0],[.8189,.3016,0],[.8213,.3069,0],[.8237,.3123,0],[.826,.3177,0],[.8284,.3232,0],[.8308,.3288,0],[.8331,.3344,0],[.8355,.3401,0],[.8378,.3459,0],[.8402,.3517,0],[.8425,.3576,0],[.8448,.3636,0],[.8471,.3696,0],[.8495,.3757,0],[.8518,.3819,0],[.8541,.3881,0],[.8563,.3944,0],[.8586,.4007,0],[.8609,.4072,0],[.8632,.4137,0],[.8655,.4202,0],[.8677,.4269,0],[.87,.4336,0],[.8722,.4403,0],[.8745,.4472,0],[.8767,.4541,0],[.8789,.4611,0],[.8812,.4681,0],[.8834,.4753,0],[.8856,.4825,0],[.8878,.4897,0],[.89,.4971,0],[.8922,.5045,0],[.8944,.512,0],[.8966,.5196,0],[.8988,.5272,0],[.901,.5349,0],[.9032,.5427,0],[.9053,.5506,0],[.9075,.5585,0],[.9096,.5665,0],[.9118,.5746,0],[.9139,.5828,0],[.9161,.591,0],[.9182,.5994,0],[.9204,.6078,0],[.9225,.6163,0],[.9246,.6248,0],[.9267,.6334,0],[.9288,.6422,0],[.9309,.651,0],[.9331,.6598,0],[.9352,.6688,0],[.9372,.6778,0],[.9393,.687,0],[.9414,.6962,0],[.9435,.7054,0],[.9456,.7148,0],[.9476,.7242,0],[.9497,.7338,0],[.9518,.7434,0],[.9538,.7531,0],[.9559,.7629,0],[.9579,.7727,0],[.96,.7827,0],[.962,.7927,0],[.9641,.8028,0],[.9661,.813,0],[.9681,.8233,0],[.9701,.8337,0],[.9722,.8442,0],[.9742,.8547,0],[.9762,.8654,0],[.9782,.8761,0],[.9802,.8869,0],[.9822,.8978,0],[.9842,.9088,0],[.9862,.9199,0],[.9882,.9311,0],[.9901,.9423,0],[.9921,.9537,0],[.9941,.9651,0],[.9961,.9767,0],[.998,.9883,0],[1,1,0]]};ce.gnuplot2={interpolate:!0,colors:[[0,0,0],[0,0,.0157],[0,0,.0314],[0,0,.0471],[0,0,.0627],[0,0,.0784],[0,0,.0941],[0,0,.1098],[0,0,.1255],[0,0,.1412],[0,0,.1569],[0,0,.1725],[0,0,.1882],[0,0,.2039],[0,0,.2196],[0,0,.2353],[0,0,.251],[0,0,.2667],[0,0,.2824],[0,0,.298],[0,0,.3137],[0,0,.3294],[0,0,.3451],[0,0,.3608],[0,0,.3765],[0,0,.3922],[0,0,.4078],[0,0,.4235],[0,0,.4392],[0,0,.4549],[0,0,.4706],[0,0,.4863],[0,0,.502],[0,0,.5176],[0,0,.5333],[0,0,.549],[0,0,.5647],[0,0,.5804],[0,0,.5961],[0,0,.6118],[0,0,.6275],[0,0,.6431],[0,0,.6588],[0,0,.6745],[0,0,.6902],[0,0,.7059],[0,0,.7216],[0,0,.7373],[0,0,.7529],[0,0,.7686],[0,0,.7843],[0,0,.8],[0,0,.8157],[0,0,.8314],[0,0,.8471],[0,0,.8627],[0,0,.8784],[0,0,.8941],[0,0,.9098],[0,0,.9255],[0,0,.9412],[0,0,.9569],[0,0,.9725],[0,0,.9882],[.0031,0,1],[.0153,0,1],[.0276,0,1],[.0398,0,1],[.0521,0,1],[.0643,0,1],[.0766,0,1],[.0888,0,1],[.1011,0,1],[.1134,0,1],[.1256,0,1],[.1379,0,1],[.1501,0,1],[.1624,0,1],[.1746,0,1],[.1869,0,1],[.1991,0,1],[.2114,0,1],[.2237,0,1],[.2359,0,1],[.2482,0,1],[.2604,0,1],[.2727,0,1],[.2849,0,1],[.2972,0,1],[.3094,0,1],[.3217,0,1],[.3339,0,1],[.3462,0,1],[.3585,0,1],[.3707,0,1],[.383,0,1],[.3952,0,1],[.4075,0,1],[.4197,0,1],[.432,0,1],[.4442,0,1],[.4565,0,1],[.4688,0,1],[.481,0,1],[.4933,0,1],[.5055,0,1],[.5178,0,1],[.53,0,1],[.5423,.0071,.9929],[.5545,.0149,.9851],[.5668,.0227,.9773],[.579,.0306,.9694],[.5913,.0384,.9616],[.6036,.0463,.9537],[.6158,.0541,.9459],[.6281,.062,.938],[.6403,.0698,.9302],[.6526,.0776,.9224],[.6648,.0855,.9145],[.6771,.0933,.9067],[.6893,.1012,.8988],[.7016,.109,.891],[.7138,.1169,.8831],[.7261,.1247,.8753],[.7384,.1325,.8675],[.7506,.1404,.8596],[.7629,.1482,.8518],[.7751,.1561,.8439],[.7874,.1639,.8361],[.7996,.1718,.8282],[.8119,.1796,.8204],[.8241,.1875,.8125],[.8364,.1953,.8047],[.8487,.2031,.7969],[.8609,.211,.789],[.8732,.2188,.7812],[.8854,.2267,.7733],[.8977,.2345,.7655],[.9099,.2424,.7576],[.9222,.2502,.7498],[.9344,.258,.742],[.9467,.2659,.7341],[.9589,.2737,.7263],[.9712,.2816,.7184],[.9835,.2894,.7106],[.9957,.2973,.7027],[1,.3051,.6949],[1,.3129,.6871],[1,.3208,.6792],[1,.3286,.6714],[1,.3365,.6635],[1,.3443,.6557],[1,.3522,.6478],[1,.36,.64],[1,.3678,.6322],[1,.3757,.6243],[1,.3835,.6165],[1,.3914,.6086],[1,.3992,.6008],[1,.4071,.5929],[1,.4149,.5851],[1,.4227,.5773],[1,.4306,.5694],[1,.4384,.5616],[1,.4463,.5537],[1,.4541,.5459],[1,.462,.538],[1,.4698,.5302],[1,.4776,.5224],[1,.4855,.5145],[1,.4933,.5067],[1,.5012,.4988],[1,.509,.491],[1,.5169,.4831],[1,.5247,.4753],[1,.5325,.4675],[1,.5404,.4596],[1,.5482,.4518],[1,.5561,.4439],[1,.5639,.4361],[1,.5718,.4282],[1,.5796,.4204],[1,.5875,.4125],[1,.5953,.4047],[1,.6031,.3969],[1,.611,.389],[1,.6188,.3812],[1,.6267,.3733],[1,.6345,.3655],[1,.6424,.3576],[1,.6502,.3498],[1,.658,.342],[1,.6659,.3341],[1,.6737,.3263],[1,.6816,.3184],[1,.6894,.3106],[1,.6973,.3027],[1,.7051,.2949],[1,.7129,.2871],[1,.7208,.2792],[1,.7286,.2714],[1,.7365,.2635],[1,.7443,.2557],[1,.7522,.2478],[1,.76,.24],[1,.7678,.2322],[1,.7757,.2243],[1,.7835,.2165],[1,.7914,.2086],[1,.7992,.2008],[1,.8071,.1929],[1,.8149,.1851],[1,.8227,.1773],[1,.8306,.1694],[1,.8384,.1616],[1,.8463,.1537],[1,.8541,.1459],[1,.862,.138],[1,.8698,.1302],[1,.8776,.1224],[1,.8855,.1145],[1,.8933,.1067],[1,.9012,.0988],[1,.909,.091],[1,.9169,.0831],[1,.9247,.0753],[1,.9325,.0675],[1,.9404,.0596],[1,.9482,.0518],[1,.9561,.0439],[1,.9639,.0361],[1,.9718,.0282],[1,.9796,.0204],[1,.9875,.0125],[1,.9953,.0047],[1,1,.0196],[1,1,.0686],[1,1,.1176],[1,1,.1667],[1,1,.2157],[1,1,.2647],[1,1,.3137],[1,1,.3627],[1,1,.4118],[1,1,.4608],[1,1,.5098],[1,1,.5588],[1,1,.6078],[1,1,.6569],[1,1,.7059],[1,1,.7549],[1,1,.8039],[1,1,.8529],[1,1,.902],[1,1,.951],[1,1,1]]};ce.gray={interpolate:!0,colors:[[0,0,0],[.0039,.0039,.0039],[.0078,.0078,.0078],[.0118,.0118,.0118],[.0157,.0157,.0157],[.0196,.0196,.0196],[.0235,.0235,.0235],[.0275,.0275,.0275],[.0314,.0314,.0314],[.0353,.0353,.0353],[.0392,.0392,.0392],[.0431,.0431,.0431],[.0471,.0471,.0471],[.051,.051,.051],[.0549,.0549,.0549],[.0588,.0588,.0588],[.0627,.0627,.0627],[.0667,.0667,.0667],[.0706,.0706,.0706],[.0745,.0745,.0745],[.0784,.0784,.0784],[.0824,.0824,.0824],[.0863,.0863,.0863],[.0902,.0902,.0902],[.0941,.0941,.0941],[.098,.098,.098],[.102,.102,.102],[.1059,.1059,.1059],[.1098,.1098,.1098],[.1137,.1137,.1137],[.1176,.1176,.1176],[.1216,.1216,.1216],[.1255,.1255,.1255],[.1294,.1294,.1294],[.1333,.1333,.1333],[.1373,.1373,.1373],[.1412,.1412,.1412],[.1451,.1451,.1451],[.149,.149,.149],[.1529,.1529,.1529],[.1569,.1569,.1569],[.1608,.1608,.1608],[.1647,.1647,.1647],[.1686,.1686,.1686],[.1725,.1725,.1725],[.1765,.1765,.1765],[.1804,.1804,.1804],[.1843,.1843,.1843],[.1882,.1882,.1882],[.1922,.1922,.1922],[.1961,.1961,.1961],[.2,.2,.2],[.2039,.2039,.2039],[.2078,.2078,.2078],[.2118,.2118,.2118],[.2157,.2157,.2157],[.2196,.2196,.2196],[.2235,.2235,.2235],[.2275,.2275,.2275],[.2314,.2314,.2314],[.2353,.2353,.2353],[.2392,.2392,.2392],[.2431,.2431,.2431],[.2471,.2471,.2471],[.251,.251,.251],[.2549,.2549,.2549],[.2588,.2588,.2588],[.2627,.2627,.2627],[.2667,.2667,.2667],[.2706,.2706,.2706],[.2745,.2745,.2745],[.2784,.2784,.2784],[.2824,.2824,.2824],[.2863,.2863,.2863],[.2902,.2902,.2902],[.2941,.2941,.2941],[.298,.298,.298],[.302,.302,.302],[.3059,.3059,.3059],[.3098,.3098,.3098],[.3137,.3137,.3137],[.3176,.3176,.3176],[.3216,.3216,.3216],[.3255,.3255,.3255],[.3294,.3294,.3294],[.3333,.3333,.3333],[.3373,.3373,.3373],[.3412,.3412,.3412],[.3451,.3451,.3451],[.349,.349,.349],[.3529,.3529,.3529],[.3569,.3569,.3569],[.3608,.3608,.3608],[.3647,.3647,.3647],[.3686,.3686,.3686],[.3725,.3725,.3725],[.3765,.3765,.3765],[.3804,.3804,.3804],[.3843,.3843,.3843],[.3882,.3882,.3882],[.3922,.3922,.3922],[.3961,.3961,.3961],[.4,.4,.4],[.4039,.4039,.4039],[.4078,.4078,.4078],[.4118,.4118,.4118],[.4157,.4157,.4157],[.4196,.4196,.4196],[.4235,.4235,.4235],[.4275,.4275,.4275],[.4314,.4314,.4314],[.4353,.4353,.4353],[.4392,.4392,.4392],[.4431,.4431,.4431],[.4471,.4471,.4471],[.451,.451,.451],[.4549,.4549,.4549],[.4588,.4588,.4588],[.4627,.4627,.4627],[.4667,.4667,.4667],[.4706,.4706,.4706],[.4745,.4745,.4745],[.4784,.4784,.4784],[.4824,.4824,.4824],[.4863,.4863,.4863],[.4902,.4902,.4902],[.4941,.4941,.4941],[.498,.498,.498],[.502,.502,.502],[.5059,.5059,.5059],[.5098,.5098,.5098],[.5137,.5137,.5137],[.5176,.5176,.5176],[.5216,.5216,.5216],[.5255,.5255,.5255],[.5294,.5294,.5294],[.5333,.5333,.5333],[.5373,.5373,.5373],[.5412,.5412,.5412],[.5451,.5451,.5451],[.549,.549,.549],[.5529,.5529,.5529],[.5569,.5569,.5569],[.5608,.5608,.5608],[.5647,.5647,.5647],[.5686,.5686,.5686],[.5725,.5725,.5725],[.5765,.5765,.5765],[.5804,.5804,.5804],[.5843,.5843,.5843],[.5882,.5882,.5882],[.5922,.5922,.5922],[.5961,.5961,.5961],[.6,.6,.6],[.6039,.6039,.6039],[.6078,.6078,.6078],[.6118,.6118,.6118],[.6157,.6157,.6157],[.6196,.6196,.6196],[.6235,.6235,.6235],[.6275,.6275,.6275],[.6314,.6314,.6314],[.6353,.6353,.6353],[.6392,.6392,.6392],[.6431,.6431,.6431],[.6471,.6471,.6471],[.651,.651,.651],[.6549,.6549,.6549],[.6588,.6588,.6588],[.6627,.6627,.6627],[.6667,.6667,.6667],[.6706,.6706,.6706],[.6745,.6745,.6745],[.6784,.6784,.6784],[.6824,.6824,.6824],[.6863,.6863,.6863],[.6902,.6902,.6902],[.6941,.6941,.6941],[.698,.698,.698],[.702,.702,.702],[.7059,.7059,.7059],[.7098,.7098,.7098],[.7137,.7137,.7137],[.7176,.7176,.7176],[.7216,.7216,.7216],[.7255,.7255,.7255],[.7294,.7294,.7294],[.7333,.7333,.7333],[.7373,.7373,.7373],[.7412,.7412,.7412],[.7451,.7451,.7451],[.749,.749,.749],[.7529,.7529,.7529],[.7569,.7569,.7569],[.7608,.7608,.7608],[.7647,.7647,.7647],[.7686,.7686,.7686],[.7725,.7725,.7725],[.7765,.7765,.7765],[.7804,.7804,.7804],[.7843,.7843,.7843],[.7882,.7882,.7882],[.7922,.7922,.7922],[.7961,.7961,.7961],[.8,.8,.8],[.8039,.8039,.8039],[.8078,.8078,.8078],[.8118,.8118,.8118],[.8157,.8157,.8157],[.8196,.8196,.8196],[.8235,.8235,.8235],[.8275,.8275,.8275],[.8314,.8314,.8314],[.8353,.8353,.8353],[.8392,.8392,.8392],[.8431,.8431,.8431],[.8471,.8471,.8471],[.851,.851,.851],[.8549,.8549,.8549],[.8588,.8588,.8588],[.8627,.8627,.8627],[.8667,.8667,.8667],[.8706,.8706,.8706],[.8745,.8745,.8745],[.8784,.8784,.8784],[.8824,.8824,.8824],[.8863,.8863,.8863],[.8902,.8902,.8902],[.8941,.8941,.8941],[.898,.898,.898],[.902,.902,.902],[.9059,.9059,.9059],[.9098,.9098,.9098],[.9137,.9137,.9137],[.9176,.9176,.9176],[.9216,.9216,.9216],[.9255,.9255,.9255],[.9294,.9294,.9294],[.9333,.9333,.9333],[.9373,.9373,.9373],[.9412,.9412,.9412],[.9451,.9451,.9451],[.949,.949,.949],[.9529,.9529,.9529],[.9569,.9569,.9569],[.9608,.9608,.9608],[.9647,.9647,.9647],[.9686,.9686,.9686],[.9725,.9725,.9725],[.9765,.9765,.9765],[.9804,.9804,.9804],[.9843,.9843,.9843],[.9882,.9882,.9882],[.9922,.9922,.9922],[.9961,.9961,.9961],[1,1,1]]};ce.hot={interpolate:!0,colors:[[.0416,0,0],[.0519,0,0],[.0622,0,0],[.0725,0,0],[.0828,0,0],[.0931,0,0],[.1034,0,0],[.1137,0,0],[.124,0,0],[.1343,0,0],[.1445,0,0],[.1548,0,0],[.1651,0,0],[.1754,0,0],[.1857,0,0],[.196,0,0],[.2063,0,0],[.2166,0,0],[.2269,0,0],[.2372,0,0],[.2475,0,0],[.2578,0,0],[.2681,0,0],[.2784,0,0],[.2887,0,0],[.299,0,0],[.3093,0,0],[.3196,0,0],[.3299,0,0],[.3402,0,0],[.3504,0,0],[.3607,0,0],[.371,0,0],[.3813,0,0],[.3916,0,0],[.4019,0,0],[.4122,0,0],[.4225,0,0],[.4328,0,0],[.4431,0,0],[.4534,0,0],[.4637,0,0],[.474,0,0],[.4843,0,0],[.4946,0,0],[.5049,0,0],[.5152,0,0],[.5255,0,0],[.5358,0,0],[.546,0,0],[.5563,0,0],[.5666,0,0],[.5769,0,0],[.5872,0,0],[.5975,0,0],[.6078,0,0],[.6181,0,0],[.6284,0,0],[.6387,0,0],[.649,0,0],[.6593,0,0],[.6696,0,0],[.6799,0,0],[.6902,0,0],[.7005,0,0],[.7108,0,0],[.7211,0,0],[.7314,0,0],[.7416,0,0],[.7519,0,0],[.7622,0,0],[.7725,0,0],[.7828,0,0],[.7931,0,0],[.8034,0,0],[.8137,0,0],[.824,0,0],[.8343,0,0],[.8446,0,0],[.8549,0,0],[.8652,0,0],[.8755,0,0],[.8858,0,0],[.8961,0,0],[.9064,0,0],[.9167,0,0],[.927,0,0],[.9373,0,0],[.9475,0,0],[.9578,0,0],[.9681,0,0],[.9784,0,0],[.9887,0,0],[.999,0,0],[1,.0093,0],[1,.0196,0],[1,.0299,0],[1,.0402,0],[1,.0505,0],[1,.0608,0],[1,.0711,0],[1,.0814,0],[1,.0917,0],[1,.102,0],[1,.1123,0],[1,.1225,0],[1,.1328,0],[1,.1431,0],[1,.1534,0],[1,.1637,0],[1,.174,0],[1,.1843,0],[1,.1946,0],[1,.2049,0],[1,.2152,0],[1,.2255,0],[1,.2358,0],[1,.2461,0],[1,.2564,0],[1,.2667,0],[1,.277,0],[1,.2873,0],[1,.2975,0],[1,.3078,0],[1,.3181,0],[1,.3284,0],[1,.3387,0],[1,.349,0],[1,.3593,0],[1,.3696,0],[1,.3799,0],[1,.3902,0],[1,.4005,0],[1,.4108,0],[1,.4211,0],[1,.4314,0],[1,.4417,0],[1,.452,0],[1,.4623,0],[1,.4725,0],[1,.4828,0],[1,.4931,0],[1,.5034,0],[1,.5137,0],[1,.524,0],[1,.5343,0],[1,.5446,0],[1,.5549,0],[1,.5652,0],[1,.5755,0],[1,.5858,0],[1,.5961,0],[1,.6064,0],[1,.6167,0],[1,.627,0],[1,.6373,0],[1,.6475,0],[1,.6578,0],[1,.6681,0],[1,.6784,0],[1,.6887,0],[1,.699,0],[1,.7093,0],[1,.7196,0],[1,.7299,0],[1,.7402,0],[1,.7505,0],[1,.7608,0],[1,.7711,0],[1,.7814,0],[1,.7917,0],[1,.802,0],[1,.8123,0],[1,.8225,0],[1,.8328,0],[1,.8431,0],[1,.8534,0],[1,.8637,0],[1,.874,0],[1,.8843,0],[1,.8946,0],[1,.9049,0],[1,.9152,0],[1,.9255,0],[1,.9358,0],[1,.9461,0],[1,.9564,0],[1,.9667,0],[1,.977,0],[1,.9873,0],[1,.9975,0],[1,1,.0118],[1,1,.0272],[1,1,.0426],[1,1,.0581],[1,1,.0735],[1,1,.089],[1,1,.1044],[1,1,.1199],[1,1,.1353],[1,1,.1507],[1,1,.1662],[1,1,.1816],[1,1,.1971],[1,1,.2125],[1,1,.2279],[1,1,.2434],[1,1,.2588],[1,1,.2743],[1,1,.2897],[1,1,.3051],[1,1,.3206],[1,1,.336],[1,1,.3515],[1,1,.3669],[1,1,.3824],[1,1,.3978],[1,1,.4132],[1,1,.4287],[1,1,.4441],[1,1,.4596],[1,1,.475],[1,1,.4904],[1,1,.5059],[1,1,.5213],[1,1,.5368],[1,1,.5522],[1,1,.5676],[1,1,.5831],[1,1,.5985],[1,1,.614],[1,1,.6294],[1,1,.6449],[1,1,.6603],[1,1,.6757],[1,1,.6912],[1,1,.7066],[1,1,.7221],[1,1,.7375],[1,1,.7529],[1,1,.7684],[1,1,.7838],[1,1,.7993],[1,1,.8147],[1,1,.8301],[1,1,.8456],[1,1,.861],[1,1,.8765],[1,1,.8919],[1,1,.9074],[1,1,.9228],[1,1,.9382],[1,1,.9537],[1,1,.9691],[1,1,.9846],[1,1,1]]};ce.hsv={interpolate:!0,colors:[[1,0,0],[1,.0232,0],[1,.0463,0],[1,.0695,0],[1,.0926,0],[1,.1158,0],[1,.139,0],[1,.1621,0],[1,.1853,0],[1,.2085,0],[1,.2316,0],[1,.2548,0],[1,.2779,0],[1,.3011,0],[1,.3243,0],[1,.3474,0],[1,.3706,0],[1,.3938,0],[1,.4169,0],[1,.4401,0],[1,.4632,0],[1,.4864,0],[1,.5096,0],[1,.5327,0],[1,.5559,0],[1,.579,0],[1,.6022,0],[1,.6254,0],[1,.6485,0],[1,.6717,0],[1,.6949,0],[1,.718,0],[1,.7412,0],[1,.7643,0],[1,.7875,0],[1,.8107,0],[1,.8338,0],[1,.857,0],[1,.8801,0],[1,.9033,0],[1,.9265,0],[.996,.9456,0],[.9882,.961,0],[.9805,.9765,0],[.9728,.9919,0],[.9577,1,0],[.9346,1,0],[.9114,1,0],[.8882,1,0],[.8651,1,0],[.8419,1,0],[.8187,1,0],[.7956,1,0],[.7724,1,0],[.7493,1,0],[.7261,1,0],[.7029,1,0],[.6798,1,0],[.6566,1,0],[.6335,1,0],[.6103,1,0],[.5871,1,0],[.564,1,0],[.5408,1,0],[.5176,1,0],[.4945,1,0],[.4713,1,0],[.4482,1,0],[.425,1,0],[.4018,1,0],[.3787,1,0],[.3555,1,0],[.3324,1,0],[.3092,1,0],[.286,1,0],[.2629,1,0],[.2397,1,0],[.2165,1,0],[.1934,1,0],[.1702,1,0],[.1471,1,0],[.1239,1,0],[.1007,1,0],[.0776,1,0],[.0544,1,0],[.0312,1,0],[.0235,1,.0154],[.0158,1,.0309],[.0081,1,.0463],[4e-4,1,.0618],[0,1,.0846],[0,1,.1077],[0,1,.1309],[0,1,.154],[0,1,.1772],[0,1,.2004],[0,1,.2235],[0,1,.2467],[0,1,.2699],[0,1,.293],[0,1,.3162],[0,1,.3393],[0,1,.3625],[0,1,.3857],[0,1,.4088],[0,1,.432],[0,1,.4551],[0,1,.4783],[0,1,.5015],[0,1,.5246],[0,1,.5478],[0,1,.571],[0,1,.5941],[0,1,.6173],[0,1,.6404],[0,1,.6636],[0,1,.6868],[0,1,.7099],[0,1,.7331],[0,1,.7562],[0,1,.7794],[0,1,.8026],[0,1,.8257],[0,1,.8489],[0,1,.8721],[0,1,.8952],[0,1,.9184],[0,1,.9415],[0,1,.9647],[0,1,.9879],[0,.989,1],[0,.9658,1],[0,.9426,1],[0,.9195,1],[0,.8963,1],[0,.8732,1],[0,.85,1],[0,.8268,1],[0,.8037,1],[0,.7805,1],[0,.7574,1],[0,.7342,1],[0,.711,1],[0,.6879,1],[0,.6647,1],[0,.6415,1],[0,.6184,1],[0,.5952,1],[0,.5721,1],[0,.5489,1],[0,.5257,1],[0,.5026,1],[0,.4794,1],[0,.4563,1],[0,.4331,1],[0,.4099,1],[0,.3868,1],[0,.3636,1],[0,.3404,1],[0,.3173,1],[0,.2941,1],[0,.271,1],[0,.2478,1],[0,.2246,1],[0,.2015,1],[0,.1783,1],[0,.1551,1],[0,.132,1],[0,.1088,1],[0,.0857,1],[0,.0625,1],[.0077,.0471,1],[.0154,.0316,1],[.0232,.0162,1],[.0309,7e-4,1],[.0533,0,1],[.0765,0,1],[.0996,0,1],[.1228,0,1],[.146,0,1],[.1691,0,1],[.1923,0,1],[.2154,0,1],[.2386,0,1],[.2618,0,1],[.2849,0,1],[.3081,0,1],[.3312,0,1],[.3544,0,1],[.3776,0,1],[.4007,0,1],[.4239,0,1],[.4471,0,1],[.4702,0,1],[.4934,0,1],[.5165,0,1],[.5397,0,1],[.5629,0,1],[.586,0,1],[.6092,0,1],[.6324,0,1],[.6555,0,1],[.6787,0,1],[.7018,0,1],[.725,0,1],[.7482,0,1],[.7713,0,1],[.7945,0,1],[.8176,0,1],[.8408,0,1],[.864,0,1],[.8871,0,1],[.9103,0,1],[.9335,0,1],[.9566,0,1],[.9724,0,.9926],[.9801,0,.9772],[.9879,0,.9618],[.9956,0,.9463],[1,0,.9276],[1,0,.9044],[1,0,.8813],[1,0,.8581],[1,0,.8349],[1,0,.8118],[1,0,.7886],[1,0,.7654],[1,0,.7423],[1,0,.7191],[1,0,.696],[1,0,.6728],[1,0,.6496],[1,0,.6265],[1,0,.6033],[1,0,.5801],[1,0,.557],[1,0,.5338],[1,0,.5107],[1,0,.4875],[1,0,.4643],[1,0,.4412],[1,0,.418],[1,0,.3949],[1,0,.3717],[1,0,.3485],[1,0,.3254],[1,0,.3022],[1,0,.279],[1,0,.2559],[1,0,.2327],[1,0,.2096],[1,0,.1864],[1,0,.1632],[1,0,.1401],[1,0,.1169],[1,0,.0938]]};ce.inferno={interpolate:!0,colors:[[.0015,5e-4,.0139],[.0023,.0013,.0186],[.0033,.0022,.0242],[.0045,.0034,.0309],[.006,.0047,.0386],[.0077,.0061,.0468],[.0096,.0077,.0551],[.0117,.0094,.0635],[.014,.0112,.0719],[.0166,.0131,.0803],[.0194,.0151,.0888],[.0224,.0172,.0973],[.0258,.0193,.1059],[.0294,.0215,.1146],[.0334,.0237,.1234],[.0377,.0259,.1322],[.0423,.0281,.1411],[.0469,.0303,.1502],[.0516,.0325,.1593],[.0564,.0346,.1684],[.0613,.0366,.1776],[.0663,.0385,.187],[.0714,.0403,.1964],[.0766,.0419,.2058],[.082,.0433,.2153],[.0874,.0446,.2248],[.093,.0456,.2344],[.0987,.0464,.2439],[.1046,.047,.2534],[.1105,.0474,.2629],[.1167,.0476,.2723],[.1229,.0475,.2816],[.1293,.0473,.2908],[.1358,.0469,.2998],[.1424,.0462,.3086],[.1491,.0455,.3171],[.1558,.0446,.3253],[.1627,.0436,.3333],[.1696,.0425,.3409],[.1765,.0414,.3481],[.1834,.0403,.355],[.1904,.0393,.3614],[.1973,.0384,.3675],[.2042,.0376,.3732],[.2111,.037,.3786],[.2179,.0366,.3835],[.2248,.0364,.3881],[.2315,.0364,.3924],[.2383,.0366,.3964],[.245,.0371,.4],[.2516,.0377,.4034],[.2582,.0386,.4065],[.2648,.0396,.4093],[.2713,.0409,.412],[.2778,.0424,.4144],[.2843,.0439,.4166],[.2908,.0456,.4186],[.2972,.0475,.4205],[.3036,.0494,.4222],[.3099,.0514,.4237],[.3163,.0535,.4251],[.3226,.0556,.4264],[.3289,.0578,.4275],[.3352,.0601,.4285],[.3415,.0623,.4294],[.3478,.0646,.4302],[.354,.0669,.4309],[.3603,.0692,.4315],[.3665,.0716,.432],[.3728,.0739,.4324],[.379,.0763,.4327],[.3852,.0786,.433],[.3915,.0809,.4331],[.3977,.0833,.4332],[.4039,.0856,.4332],[.4101,.0879,.4331],[.4163,.0902,.4329],[.4225,.0925,.4327],[.4288,.0948,.4324],[.435,.0971,.432],[.4412,.0993,.4316],[.4474,.1016,.4311],[.4537,.1038,.4305],[.4599,.1061,.4298],[.4661,.1083,.4291],[.4723,.1105,.4283],[.4786,.1128,.4275],[.4848,.115,.4265],[.491,.1172,.4256],[.4973,.1194,.4245],[.5035,.1216,.4234],[.5097,.1238,.4222],[.516,.126,.4209],[.5222,.1281,.4195],[.5284,.1303,.4181],[.5347,.1325,.4167],[.5409,.1347,.4151],[.5472,.1369,.4135],[.5534,.1391,.4118],[.5596,.1413,.4101],[.5659,.1436,.4083],[.5721,.1458,.4064],[.5783,.148,.4044],[.5845,.1503,.4024],[.5907,.1526,.4003],[.5969,.1548,.3981],[.6031,.1572,.3959],[.6093,.1595,.3936],[.6155,.1618,.3912],[.6217,.1642,.3888],[.6278,.1666,.3863],[.634,.169,.3837],[.6401,.1714,.3811],[.6463,.1739,.3784],[.6524,.1764,.3756],[.6585,.179,.3727],[.6645,.1815,.3698],[.6706,.1842,.3669],[.6766,.1868,.3638],[.6827,.1895,.3608],[.6887,.1922,.3576],[.6946,.195,.3544],[.7006,.1979,.3511],[.7065,.2007,.3478],[.7124,.2037,.3444],[.7183,.2066,.3409],[.7241,.2097,.3374],[.7299,.2128,.3339],[.7357,.2159,.3302],[.7414,.2191,.3266],[.7471,.2224,.3229],[.7528,.2257,.3191],[.7584,.2291,.3153],[.764,.2326,.3114],[.7696,.2361,.3075],[.7751,.2397,.3035],[.7805,.2433,.2995],[.7859,.2471,.2955],[.7913,.2509,.2914],[.7966,.2547,.2873],[.8019,.2587,.2831],[.8071,.2627,.2789],[.8122,.2668,.2747],[.8173,.271,.2704],[.8224,.2752,.2661],[.8274,.2795,.2618],[.8323,.2839,.2574],[.8372,.2884,.253],[.842,.2929,.2486],[.8467,.2976,.2441],[.8514,.3023,.2396],[.856,.307,.2351],[.8605,.3119,.2306],[.865,.3168,.2261],[.8694,.3218,.2215],[.8737,.3269,.2169],[.878,.3321,.2123],[.8822,.3373,.2076],[.8863,.3426,.203],[.8903,.348,.1983],[.8943,.3534,.1936],[.8982,.3589,.1889],[.902,.3645,.1841],[.9057,.3701,.1794],[.9094,.3759,.1746],[.913,.3816,.1698],[.9165,.3875,.1649],[.9199,.3934,.1601],[.9232,.3994,.1552],[.9265,.4054,.1503],[.9296,.4115,.1454],[.9327,.4176,.1404],[.9357,.4238,.1354],[.9387,.4301,.1304],[.9415,.4364,.1254],[.9443,.4428,.1204],[.947,.4492,.1153],[.9496,.4557,.1102],[.9521,.4622,.105],[.9545,.4687,.0999],[.9569,.4754,.0947],[.9591,.482,.0895],[.9613,.4887,.0843],[.9634,.4955,.0791],[.9654,.5022,.0739],[.9673,.5091,.0687],[.9692,.5159,.0635],[.9709,.5229,.0584],[.9726,.5298,.0533],[.9742,.5368,.0484],[.9757,.5438,.0436],[.9771,.5508,.039],[.9784,.5579,.0349],[.9797,.5651,.0314],[.9808,.5722,.0285],[.9819,.5794,.0262],[.9829,.5866,.0247],[.9838,.5938,.0238],[.9846,.6011,.0236],[.9853,.6084,.0242],[.986,.6158,.0256],[.9865,.6231,.0278],[.987,.6305,.0309],[.9873,.6379,.0349],[.9876,.6453,.0399],[.9878,.6528,.0456],[.9879,.6602,.0518],[.9879,.6677,.0583],[.9879,.6753,.0653],[.9877,.6828,.0725],[.9875,.6904,.08],[.9871,.6979,.0877],[.9867,.7055,.0957],[.9862,.7132,.1039],[.9856,.7208,.1122],[.9849,.7284,.1208],[.9841,.7361,.1295],[.9832,.7438,.1385],[.9822,.7514,.1476],[.9812,.7591,.1569],[.98,.7668,.1664],[.9788,.7745,.176],[.9775,.7823,.1859],[.9761,.79,.196],[.9746,.7977,.2063],[.9731,.8054,.2169],[.9715,.8131,.2277],[.9698,.8208,.2387],[.968,.8285,.25],[.9662,.8362,.2615],[.9644,.8438,.2734],[.9625,.8515,.2855],[.9606,.8591,.298],[.9587,.8666,.3108],[.9568,.8741,.324],[.955,.8816,.3375],[.9532,.8889,.3514],[.9515,.8962,.3656],[.95,.9034,.3803],[.9487,.9105,.3953],[.9476,.9174,.4107],[.9468,.9242,.4264],[.9464,.9308,.4424],[.9464,.9372,.4586],[.9469,.9433,.475],[.9479,.9493,.4914],[.9495,.9551,.5079],[.9517,.9606,.5242],[.9545,.9659,.5404],[.9579,.971,.5563],[.9618,.9759,.5719],[.9662,.9807,.5872],[.9712,.9853,.6022],[.9765,.9898,.6168],[.9823,.9941,.631],[.9884,.9984,.6449]]};ce.jet={interpolate:!0,colors:[[0,0,.5],[0,0,.5178],[0,0,.5357],[0,0,.5535],[0,0,.5713],[0,0,.5891],[0,0,.607],[0,0,.6248],[0,0,.6426],[0,0,.6604],[0,0,.6783],[0,0,.6961],[0,0,.7139],[0,0,.7317],[0,0,.7496],[0,0,.7674],[0,0,.7852],[0,0,.803],[0,0,.8209],[0,0,.8387],[0,0,.8565],[0,0,.8743],[0,0,.8922],[0,0,.91],[0,0,.9278],[0,0,.9456],[0,0,.9635],[0,0,.9813],[0,0,.9991],[0,0,1],[0,0,1],[0,0,1],[0,.002,1],[0,.0176,1],[0,.0333,1],[0,.049,1],[0,.0647,1],[0,.0804,1],[0,.0961,1],[0,.1118,1],[0,.1275,1],[0,.1431,1],[0,.1588,1],[0,.1745,1],[0,.1902,1],[0,.2059,1],[0,.2216,1],[0,.2373,1],[0,.2529,1],[0,.2686,1],[0,.2843,1],[0,.3,1],[0,.3157,1],[0,.3314,1],[0,.3471,1],[0,.3627,1],[0,.3784,1],[0,.3941,1],[0,.4098,1],[0,.4255,1],[0,.4412,1],[0,.4569,1],[0,.4725,1],[0,.4882,1],[0,.5039,1],[0,.5196,1],[0,.5353,1],[0,.551,1],[0,.5667,1],[0,.5824,1],[0,.598,1],[0,.6137,1],[0,.6294,1],[0,.6451,1],[0,.6608,1],[0,.6765,1],[0,.6922,1],[0,.7078,1],[0,.7235,1],[0,.7392,1],[0,.7549,1],[0,.7706,1],[0,.7863,1],[0,.802,1],[0,.8176,1],[0,.8333,1],[0,.849,1],[0,.8647,.9962],[0,.8804,.9836],[0,.8961,.9709],[.0095,.9118,.9583],[.0221,.9275,.9456],[.0348,.9431,.933],[.0474,.9588,.9203],[.0601,.9745,.9077],[.0727,.9902,.895],[.0854,1,.8824],[.098,1,.8697],[.1107,1,.8571],[.1233,1,.8444],[.136,1,.8318],[.1486,1,.8191],[.1613,1,.8065],[.1739,1,.7938],[.1866,1,.7812],[.1992,1,.7685],[.2119,1,.7559],[.2245,1,.7432],[.2372,1,.7306],[.2498,1,.7179],[.2625,1,.7052],[.2751,1,.6926],[.2878,1,.6799],[.3004,1,.6673],[.3131,1,.6546],[.3257,1,.642],[.3384,1,.6293],[.351,1,.6167],[.3637,1,.604],[.3763,1,.5914],[.389,1,.5787],[.4016,1,.5661],[.4143,1,.5534],[.4269,1,.5408],[.4396,1,.5281],[.4522,1,.5155],[.4649,1,.5028],[.4775,1,.4902],[.4902,1,.4775],[.5028,1,.4649],[.5155,1,.4522],[.5281,1,.4396],[.5408,1,.4269],[.5534,1,.4143],[.5661,1,.4016],[.5787,1,.389],[.5914,1,.3763],[.604,1,.3637],[.6167,1,.351],[.6293,1,.3384],[.642,1,.3257],[.6546,1,.3131],[.6673,1,.3004],[.6799,1,.2878],[.6926,1,.2751],[.7052,1,.2625],[.7179,1,.2498],[.7306,1,.2372],[.7432,1,.2245],[.7559,1,.2119],[.7685,1,.1992],[.7812,1,.1866],[.7938,1,.1739],[.8065,1,.1613],[.8191,1,.1486],[.8318,1,.136],[.8444,1,.1233],[.8571,1,.1107],[.8697,1,.098],[.8824,1,.0854],[.895,1,.0727],[.9077,1,.0601],[.9203,1,.0474],[.933,1,.0348],[.9456,.9884,.0221],[.9583,.9739,.0095],[.9709,.9593,0],[.9836,.9448,0],[.9962,.9303,0],[1,.9158,0],[1,.9012,0],[1,.8867,0],[1,.8722,0],[1,.8577,0],[1,.8431,0],[1,.8286,0],[1,.8141,0],[1,.7996,0],[1,.785,0],[1,.7705,0],[1,.756,0],[1,.7415,0],[1,.7269,0],[1,.7124,0],[1,.6979,0],[1,.6834,0],[1,.6688,0],[1,.6543,0],[1,.6398,0],[1,.6253,0],[1,.6107,0],[1,.5962,0],[1,.5817,0],[1,.5672,0],[1,.5527,0],[1,.5381,0],[1,.5236,0],[1,.5091,0],[1,.4946,0],[1,.48,0],[1,.4655,0],[1,.451,0],[1,.4365,0],[1,.4219,0],[1,.4074,0],[1,.3929,0],[1,.3784,0],[1,.3638,0],[1,.3493,0],[1,.3348,0],[1,.3203,0],[1,.3057,0],[1,.2912,0],[1,.2767,0],[1,.2622,0],[1,.2476,0],[1,.2331,0],[1,.2186,0],[1,.2041,0],[1,.1895,0],[1,.175,0],[1,.1605,0],[1,.146,0],[1,.1314,0],[1,.1169,0],[1,.1024,0],[1,.0879,0],[.9991,.0733,0],[.9813,.0588,0],[.9635,.0443,0],[.9456,.0298,0],[.9278,.0153,0],[.91,7e-4,0],[.8922,0,0],[.8743,0,0],[.8565,0,0],[.8387,0,0],[.8209,0,0],[.803,0,0],[.7852,0,0],[.7674,0,0],[.7496,0,0],[.7317,0,0],[.7139,0,0],[.6961,0,0],[.6783,0,0],[.6604,0,0],[.6426,0,0],[.6248,0,0],[.607,0,0],[.5891,0,0],[.5713,0,0],[.5535,0,0],[.5357,0,0],[.5178,0,0],[.5,0,0]]};ce.magma={interpolate:!0,colors:[[.0015,5e-4,.0139],[.0023,.0013,.0183],[.0033,.0023,.0237],[.0045,.0035,.03],[.006,.0048,.0371],[.0076,.0064,.045],[.0094,.008,.0528],[.0115,.0098,.0608],[.0137,.0118,.0687],[.0162,.0138,.0766],[.0188,.016,.0846],[.0217,.0183,.0926],[.0248,.0207,.1007],[.0281,.0232,.1088],[.0317,.0258,.117],[.0355,.0284,.1252],[.0396,.0311,.1335],[.0438,.0338,.1419],[.0481,.0366,.1503],[.0523,.0394,.1588],[.0566,.0422,.1674],[.0609,.0448,.1761],[.0653,.0473,.1849],[.0698,.0497,.1937],[.0743,.052,.2027],[.0788,.0542,.2117],[.0834,.0562,.2208],[.0882,.0581,.2299],[.0929,.0599,.2392],[.0978,.0615,.2485],[.1028,.063,.2579],[.1079,.0643,.2673],[.1131,.0655,.2768],[.1184,.0665,.2863],[.1238,.0673,.2959],[.1294,.0679,.3054],[.1351,.0684,.315],[.1409,.0687,.3245],[.1468,.0687,.334],[.1528,.0686,.3434],[.159,.0684,.3527],[.1653,.0679,.3618],[.1717,.0673,.3708],[.1782,.0666,.3795],[.1848,.0657,.388],[.1915,.0648,.3962],[.1982,.0639,.404],[.2049,.0629,.4115],[.2117,.062,.4186],[.2185,.0612,.4254],[.2253,.0604,.4317],[.2321,.0599,.4377],[.2388,.0595,.4433],[.2455,.0594,.4484],[.2522,.0594,.4532],[.2589,.0597,.4577],[.2654,.0602,.4618],[.272,.061,.4657],[.2785,.062,.4692],[.285,.0632,.4725],[.2914,.0646,.4755],[.2977,.0661,.4782],[.3041,.0678,.4808],[.3104,.0697,.4832],[.3167,.0717,.4854],[.3229,.0738,.4874],[.3291,.076,.4893],[.3353,.0782,.491],[.3415,.0806,.4926],[.3476,.0829,.4941],[.3538,.0854,.4955],[.3599,.0878,.4968],[.366,.0903,.498],[.3721,.0928,.4991],[.3782,.0953,.5001],[.3843,.0979,.501],[.3904,.1004,.5019],[.3965,.1029,.5027],[.4025,.1054,.5034],[.4086,.1079,.5041],[.4147,.1104,.5047],[.4208,.1129,.5052],[.4269,.1154,.5057],[.433,.1179,.5062],[.4391,.1203,.5066],[.4452,.1227,.5069],[.4513,.1251,.5072],[.4574,.1275,.5074],[.4635,.1299,.5077],[.4696,.1322,.5078],[.4758,.1346,.5079],[.4819,.1369,.508],[.4881,.1392,.508],[.4943,.1415,.508],[.5004,.1437,.5079],[.5066,.146,.5078],[.5128,.1482,.5076],[.519,.1504,.5074],[.5253,.1526,.5072],[.5315,.1547,.5069],[.5378,.1569,.5066],[.544,.159,.5062],[.5503,.1612,.5057],[.5566,.1633,.5052],[.5629,.1654,.5047],[.5692,.1675,.5041],[.5755,.1695,.5035],[.5818,.1716,.5028],[.5882,.1737,.502],[.5945,.1757,.5012],[.6009,.1777,.5004],[.6072,.1798,.4995],[.6136,.1818,.4985],[.62,.1838,.4975],[.6264,.1859,.4965],[.6328,.1879,.4953],[.6392,.1899,.4942],[.6456,.192,.4929],[.6521,.194,.4916],[.6585,.196,.4903],[.6649,.1981,.4888],[.6713,.2001,.4874],[.6778,.2022,.4858],[.6842,.2043,.4842],[.6907,.2064,.4826],[.6971,.2085,.4808],[.7035,.2106,.479],[.71,.2128,.4772],[.7164,.215,.4753],[.7228,.2172,.4733],[.7292,.2194,.4713],[.7356,.2217,.4692],[.742,.224,.467],[.7484,.2264,.4648],[.7547,.2288,.4625],[.7611,.2312,.4602],[.7674,.2337,.4578],[.7737,.2362,.4553],[.78,.2389,.4528],[.7862,.2415,.4502],[.7924,.2442,.4475],[.7986,.247,.4448],[.8048,.2499,.4421],[.8109,.2529,.4393],[.8169,.2559,.4365],[.8229,.259,.4336],[.8289,.2622,.4306],[.8348,.2655,.4277],[.8406,.269,.4247],[.8464,.2725,.4216],[.8521,.2761,.4186],[.8578,.2799,.4155],[.8633,.2837,.4124],[.8688,.2877,.4093],[.8742,.2919,.4062],[.8795,.2961,.4031],[.8847,.3005,.4],[.8897,.3051,.397],[.8947,.3098,.394],[.8996,.3146,.391],[.9043,.3196,.3881],[.9089,.3248,.3853],[.9134,.3301,.3826],[.9177,.3355,.3799],[.9219,.3411,.3774],[.9259,.3468,.375],[.9298,.3527,.3727],[.9336,.3588,.3705],[.9372,.3649,.3686],[.9407,.3712,.3668],[.944,.3776,.3651],[.9472,.3842,.3637],[.9502,.3908,.3625],[.9531,.3976,.3614],[.9558,.4044,.3606],[.9585,.4113,.36],[.9609,.4183,.3596],[.9633,.4254,.3595],[.9655,.4325,.3595],[.9677,.4397,.3598],[.9697,.4469,.3603],[.9716,.4542,.361],[.9734,.4615,.362],[.9751,.4689,.3631],[.9767,.4762,.3645],[.9782,.4836,.366],[.9796,.491,.3678],[.981,.4984,.3697],[.9823,.5059,.3719],[.9835,.5133,.3742],[.9846,.5207,.3767],[.9857,.5281,.3794],[.9867,.5356,.3822],[.9876,.543,.3852],[.9885,.5504,.3884],[.9894,.5579,.3917],[.9901,.5653,.3951],[.9909,.5727,.3987],[.9916,.5801,.4024],[.9922,.5875,.4063],[.9928,.5949,.4103],[.9933,.6023,.4144],[.9938,.6096,.4186],[.9943,.617,.423],[.9947,.6244,.4274],[.9951,.6317,.432],[.9955,.639,.4366],[.9958,.6463,.4414],[.9961,.6537,.4462],[.9963,.661,.4512],[.9966,.6683,.4562],[.9968,.6755,.4613],[.9969,.6828,.4665],[.9971,.6901,.4718],[.9972,.6973,.4772],[.9973,.7046,.4826],[.9973,.7118,.4882],[.9974,.7191,.4938],[.9974,.7263,.4994],[.9973,.7335,.5052],[.9973,.7408,.511],[.9972,.748,.5169],[.9971,.7552,.5228],[.997,.7624,.5288],[.9969,.7696,.5349],[.9967,.7768,.541],[.9966,.784,.5472],[.9964,.7912,.5535],[.9962,.7983,.5598],[.9959,.8055,.5662],[.9957,.8127,.5726],[.9954,.8199,.5791],[.9951,.8271,.5857],[.9949,.8342,.5923],[.9945,.8414,.599],[.9942,.8485,.6057],[.9939,.8557,.6125],[.9935,.8629,.6193],[.9932,.87,.6262],[.9928,.8772,.6331],[.9924,.8843,.6401],[.9921,.8915,.6471],[.9917,.8986,.6542],[.9913,.9058,.6613],[.9909,.9129,.6685],[.9906,.92,.6757],[.9902,.9272,.6829],[.9898,.9343,.6902],[.9894,.9415,.6975],[.9891,.9486,.7049],[.9887,.9557,.7122],[.9884,.9629,.7196],[.988,.97,.7271],[.9877,.9772,.7345],[.9874,.9843,.742],[.9871,.9914,.7495]]};ce.nipy_spectral={interpolate:!0,colors:[[0,0,0],[.0366,0,.0418],[.0732,0,.0837],[.1098,0,.1255],[.1464,0,.1673],[.183,0,.2091],[.2196,0,.251],[.2562,0,.2928],[.2928,0,.3346],[.3294,0,.3764],[.366,0,.4183],[.4026,0,.4601],[.4392,0,.5019],[.468,0,.5346],[.4732,0,.5398],[.4785,0,.5451],[.4837,0,.5503],[.4889,0,.5555],[.4941,0,.5608],[.4993,0,.566],[.5046,0,.5712],[.5098,0,.5765],[.515,0,.5817],[.5202,0,.5869],[.5255,0,.5922],[.5307,0,.5974],[.5124,0,.6026],[.4706,0,.6078],[.4287,0,.6131],[.3869,0,.6183],[.3451,0,.6235],[.3032,0,.6288],[.2614,0,.634],[.2196,0,.6392],[.1778,0,.6445],[.1359,0,.6497],[.0941,0,.6549],[.0523,0,.6602],[.0105,0,.6654],[0,0,.6785],[0,0,.6942],[0,0,.7098],[0,0,.7255],[0,0,.7412],[0,0,.7569],[0,0,.7726],[0,0,.7883],[0,0,.804],[0,0,.8196],[0,0,.8353],[0,0,.851],[0,0,.8667],[0,.0366,.8667],[0,.0732,.8667],[0,.1098,.8667],[0,.1464,.8667],[0,.183,.8667],[0,.2196,.8667],[0,.2562,.8667],[0,.2928,.8667],[0,.3294,.8667],[0,.366,.8667],[0,.4026,.8667],[0,.4392,.8667],[0,.4693,.8667],[0,.4798,.8667],[0,.4902,.8667],[0,.5007,.8667],[0,.5111,.8667],[0,.5216,.8667],[0,.532,.8667],[0,.5425,.8667],[0,.553,.8667],[0,.5634,.8667],[0,.5739,.8667],[0,.5843,.8667],[0,.5948,.8667],[0,.6026,.8589],[0,.6078,.8432],[0,.6131,.8275],[0,.6183,.8118],[0,.6235,.7961],[0,.6288,.7804],[0,.634,.7647],[0,.6392,.7491],[0,.6445,.7334],[0,.6497,.7177],[0,.6549,.702],[0,.6602,.6863],[0,.6654,.6706],[0,.6667,.6589],[0,.6667,.6484],[0,.6667,.6379],[0,.6667,.6275],[0,.6667,.617],[0,.6667,.6065],[0,.6667,.5961],[0,.6667,.5856],[0,.6667,.5752],[0,.6667,.5647],[0,.6667,.5542],[0,.6667,.5438],[0,.6667,.5333],[0,.6615,.4915],[0,.6562,.4496],[0,.651,.4078],[0,.6458,.366],[0,.6405,.3242],[0,.6353,.2823],[0,.6301,.2405],[0,.6248,.1987],[0,.6196,.1569],[0,.6144,.115],[0,.6092,.0732],[0,.6039,.0314],[0,.6026,0],[0,.6131,0],[0,.6235,0],[0,.634,0],[0,.6444,0],[0,.6549,0],[0,.6653,0],[0,.6758,0],[0,.6863,0],[0,.6967,0],[0,.7072,0],[0,.7176,0],[0,.7281,0],[0,.7385,0],[0,.749,0],[0,.7595,0],[0,.7699,0],[0,.7804,0],[0,.7908,0],[0,.8013,0],[0,.8118,0],[0,.8222,0],[0,.8327,0],[0,.8432,0],[0,.8536,0],[0,.8641,0],[0,.8745,0],[0,.885,0],[0,.8955,0],[0,.9059,0],[0,.9164,0],[0,.9268,0],[0,.9373,0],[0,.9477,0],[0,.9582,0],[0,.9686,0],[0,.9791,0],[0,.9895,0],[0,1,0],[.0575,1,0],[.115,1,0],[.1725,1,0],[.2301,1,0],[.2876,1,0],[.3451,1,0],[.4026,1,0],[.4601,1,0],[.5176,1,0],[.5751,1,0],[.6327,1,0],[.6902,1,0],[.7372,.9987,0],[.7529,.9935,0],[.7686,.9882,0],[.7843,.983,0],[.8,.9778,0],[.8157,.9725,0],[.8313,.9673,0],[.847,.9621,0],[.8627,.9568,0],[.8784,.9516,0],[.8941,.9464,0],[.9098,.9411,0],[.9255,.9359,0],[.9359,.9281,0],[.9411,.9176,0],[.9464,.9072,0],[.9516,.8967,0],[.9568,.8863,0],[.9621,.8758,0],[.9673,.8653,0],[.9725,.8549,0],[.9778,.8444,0],[.983,.834,0],[.9882,.8235,0],[.9935,.8131,0],[.9987,.8026,0],[1,.7882,0],[1,.7725,0],[1,.7569,0],[1,.7412,0],[1,.7255,0],[1,.7098,0],[1,.6941,0],[1,.6784,0],[1,.6627,0],[1,.6471,0],[1,.6314,0],[1,.6157,0],[1,.6,0],[1,.5529,0],[1,.5059,0],[1,.4588,0],[1,.4118,0],[1,.3647,0],[1,.3176,0],[1,.2706,0],[1,.2235,0],[1,.1765,0],[1,.1294,0],[1,.0824,0],[1,.0353,0],[.9974,0,0],[.9869,0,0],[.9765,0,0],[.966,0,0],[.9556,0,0],[.9451,0,0],[.9347,0,0],[.9242,0,0],[.9137,0,0],[.9033,0,0],[.8928,0,0],[.8824,0,0],[.8719,0,0],[.8641,0,0],[.8589,0,0],[.8536,0,0],[.8484,0,0],[.8432,0,0],[.8379,0,0],[.8327,0,0],[.8275,0,0],[.8222,0,0],[.817,0,0],[.8118,0,0],[.8065,0,0],[.8013,0,0],[.8,.0471,.0471],[.8,.1098,.1098],[.8,.1725,.1725],[.8,.2353,.2353],[.8,.298,.298],[.8,.3608,.3608],[.8,.4235,.4235],[.8,.4863,.4863],[.8,.549,.549],[.8,.6118,.6118],[.8,.6745,.6745],[.8,.7373,.7373],[.8,.8,.8]]};ce.ocean={interpolate:!0,colors:[[0,.5,0],[0,.4941,.0039],[0,.4882,.0078],[0,.4824,.0118],[0,.4765,.0157],[0,.4706,.0196],[0,.4647,.0235],[0,.4588,.0275],[0,.4529,.0314],[0,.4471,.0353],[0,.4412,.0392],[0,.4353,.0431],[0,.4294,.0471],[0,.4235,.051],[0,.4176,.0549],[0,.4118,.0588],[0,.4059,.0627],[0,.4,.0667],[0,.3941,.0706],[0,.3882,.0745],[0,.3824,.0784],[0,.3765,.0824],[0,.3706,.0863],[0,.3647,.0902],[0,.3588,.0941],[0,.3529,.098],[0,.3471,.102],[0,.3412,.1059],[0,.3353,.1098],[0,.3294,.1137],[0,.3235,.1176],[0,.3176,.1216],[0,.3118,.1255],[0,.3059,.1294],[0,.3,.1333],[0,.2941,.1373],[0,.2882,.1412],[0,.2824,.1451],[0,.2765,.149],[0,.2706,.1529],[0,.2647,.1569],[0,.2588,.1608],[0,.2529,.1647],[0,.2471,.1686],[0,.2412,.1725],[0,.2353,.1765],[0,.2294,.1804],[0,.2235,.1843],[0,.2176,.1882],[0,.2118,.1922],[0,.2059,.1961],[0,.2,.2],[0,.1941,.2039],[0,.1882,.2078],[0,.1824,.2118],[0,.1765,.2157],[0,.1706,.2196],[0,.1647,.2235],[0,.1588,.2275],[0,.1529,.2314],[0,.1471,.2353],[0,.1412,.2392],[0,.1353,.2431],[0,.1294,.2471],[0,.1235,.251],[0,.1176,.2549],[0,.1118,.2588],[0,.1059,.2627],[0,.1,.2667],[0,.0941,.2706],[0,.0882,.2745],[0,.0824,.2784],[0,.0765,.2824],[0,.0706,.2863],[0,.0647,.2902],[0,.0588,.2941],[0,.0529,.298],[0,.0471,.302],[0,.0412,.3059],[0,.0353,.3098],[0,.0294,.3137],[0,.0235,.3176],[0,.0176,.3216],[0,.0118,.3255],[0,.0059,.3294],[0,0,.3333],[0,.0059,.3373],[0,.0118,.3412],[0,.0176,.3451],[0,.0235,.349],[0,.0294,.3529],[0,.0353,.3569],[0,.0412,.3608],[0,.0471,.3647],[0,.0529,.3686],[0,.0588,.3725],[0,.0647,.3765],[0,.0706,.3804],[0,.0765,.3843],[0,.0824,.3882],[0,.0882,.3922],[0,.0941,.3961],[0,.1,.4],[0,.1059,.4039],[0,.1118,.4078],[0,.1176,.4118],[0,.1235,.4157],[0,.1294,.4196],[0,.1353,.4235],[0,.1412,.4275],[0,.1471,.4314],[0,.1529,.4353],[0,.1588,.4392],[0,.1647,.4431],[0,.1706,.4471],[0,.1765,.451],[0,.1824,.4549],[0,.1882,.4588],[0,.1941,.4627],[0,.2,.4667],[0,.2059,.4706],[0,.2118,.4745],[0,.2176,.4784],[0,.2235,.4824],[0,.2294,.4863],[0,.2353,.4902],[0,.2412,.4941],[0,.2471,.498],[0,.2529,.502],[0,.2588,.5059],[0,.2647,.5098],[0,.2706,.5137],[0,.2765,.5176],[0,.2824,.5216],[0,.2882,.5255],[0,.2941,.5294],[0,.3,.5333],[0,.3059,.5373],[0,.3118,.5412],[0,.3176,.5451],[0,.3235,.549],[0,.3294,.5529],[0,.3353,.5569],[0,.3412,.5608],[0,.3471,.5647],[0,.3529,.5686],[0,.3588,.5725],[0,.3647,.5765],[0,.3706,.5804],[0,.3765,.5843],[0,.3824,.5882],[0,.3882,.5922],[0,.3941,.5961],[0,.4,.6],[0,.4059,.6039],[0,.4118,.6078],[0,.4176,.6118],[0,.4235,.6157],[0,.4294,.6196],[0,.4353,.6235],[0,.4412,.6275],[0,.4471,.6314],[0,.4529,.6353],[0,.4588,.6392],[0,.4647,.6431],[0,.4706,.6471],[0,.4765,.651],[0,.4824,.6549],[0,.4882,.6588],[0,.4941,.6627],[0,.5,.6667],[.0118,.5059,.6706],[.0235,.5118,.6745],[.0353,.5176,.6784],[.0471,.5235,.6824],[.0588,.5294,.6863],[.0706,.5353,.6902],[.0824,.5412,.6941],[.0941,.5471,.698],[.1059,.5529,.702],[.1176,.5588,.7059],[.1294,.5647,.7098],[.1412,.5706,.7137],[.1529,.5765,.7176],[.1647,.5824,.7216],[.1765,.5882,.7255],[.1882,.5941,.7294],[.2,.6,.7333],[.2118,.6059,.7373],[.2235,.6118,.7412],[.2353,.6176,.7451],[.2471,.6235,.749],[.2588,.6294,.7529],[.2706,.6353,.7569],[.2824,.6412,.7608],[.2941,.6471,.7647],[.3059,.6529,.7686],[.3176,.6588,.7725],[.3294,.6647,.7765],[.3412,.6706,.7804],[.3529,.6765,.7843],[.3647,.6824,.7882],[.3765,.6882,.7922],[.3882,.6941,.7961],[.4,.7,.8],[.4118,.7059,.8039],[.4235,.7118,.8078],[.4353,.7176,.8118],[.4471,.7235,.8157],[.4588,.7294,.8196],[.4706,.7353,.8235],[.4824,.7412,.8275],[.4941,.7471,.8314],[.5059,.7529,.8353],[.5176,.7588,.8392],[.5294,.7647,.8431],[.5412,.7706,.8471],[.5529,.7765,.851],[.5647,.7824,.8549],[.5765,.7882,.8588],[.5882,.7941,.8627],[.6,.8,.8667],[.6118,.8059,.8706],[.6235,.8118,.8745],[.6353,.8176,.8784],[.6471,.8235,.8824],[.6588,.8294,.8863],[.6706,.8353,.8902],[.6824,.8412,.8941],[.6941,.8471,.898],[.7059,.8529,.902],[.7176,.8588,.9059],[.7294,.8647,.9098],[.7412,.8706,.9137],[.7529,.8765,.9176],[.7647,.8824,.9216],[.7765,.8882,.9255],[.7882,.8941,.9294],[.8,.9,.9333],[.8118,.9059,.9373],[.8235,.9118,.9412],[.8353,.9176,.9451],[.8471,.9235,.949],[.8588,.9294,.9529],[.8706,.9353,.9569],[.8824,.9412,.9608],[.8941,.9471,.9647],[.9059,.9529,.9686],[.9176,.9588,.9725],[.9294,.9647,.9765],[.9412,.9706,.9804],[.9529,.9765,.9843],[.9647,.9824,.9882],[.9765,.9882,.9922],[.9882,.9941,.9961],[1,1,1]]};ce.pink={interpolate:!0,colors:[[.1178,0,0],[.1371,.0254,.0254],[.1564,.0508,.0508],[.1757,.0762,.0762],[.1949,.1017,.1017],[.2088,.1129,.1129],[.2223,.1234,.1234],[.2358,.1339,.1339],[.2494,.1445,.1445],[.2607,.1528,.1528],[.2717,.1609,.1609],[.2828,.1689,.1689],[.2939,.177,.177],[.3037,.184,.184],[.3133,.1908,.1908],[.3229,.1976,.1976],[.3325,.2044,.2044],[.3413,.2106,.2106],[.3499,.2166,.2166],[.3585,.2226,.2226],[.3671,.2286,.2286],[.3751,.2342,.2342],[.3829,.2396,.2396],[.3908,.245,.245],[.3986,.2504,.2504],[.4061,.2555,.2555],[.4134,.2605,.2605],[.4206,.2655,.2655],[.4279,.2705,.2705],[.4349,.2753,.2753],[.4417,.2799,.2799],[.4485,.2845,.2845],[.4553,.2892,.2892],[.4619,.2937,.2937],[.4683,.298,.298],[.4747,.3024,.3024],[.4811,.3067,.3067],[.4873,.311,.311],[.4934,.3151,.3151],[.4995,.3192,.3192],[.5056,.3233,.3233],[.5116,.3274,.3274],[.5174,.3313,.3313],[.5232,.3352,.3352],[.529,.3391,.3391],[.5347,.343,.343],[.5403,.3467,.3467],[.5458,.3505,.3505],[.5514,.3542,.3542],[.5569,.3579,.3579],[.5622,.3615,.3615],[.5675,.3651,.3651],[.5729,.3687,.3687],[.5782,.3722,.3722],[.5833,.3757,.3757],[.5885,.3791,.3791],[.5936,.3826,.3826],[.5987,.386,.386],[.6037,.3894,.3894],[.6087,.3927,.3927],[.6137,.396,.396],[.6186,.3993,.3993],[.6234,.4026,.4026],[.6282,.4058,.4058],[.6331,.409,.409],[.6378,.4122,.4122],[.6425,.4153,.4153],[.6472,.4185,.4185],[.6519,.4216,.4216],[.6565,.4247,.4247],[.6611,.4278,.4278],[.6656,.4308,.4308],[.6702,.4338,.4338],[.6747,.4369,.4369],[.6791,.4398,.4398],[.6836,.4428,.4428],[.688,.4457,.4457],[.6924,.4487,.4487],[.6967,.4515,.4515],[.701,.4544,.4544],[.7053,.4573,.4573],[.7096,.4602,.4602],[.7139,.463,.463],[.7181,.4658,.4658],[.7223,.4686,.4686],[.7265,.4714,.4714],[.7306,.4741,.4741],[.7347,.4769,.4769],[.7388,.4796,.4796],[.7429,.4824,.4824],[.747,.485,.485],[.751,.4877,.4877],[.755,.4904,.4904],[.759,.4931,.4931],[.761,.4988,.4957],[.7627,.5047,.4983],[.7644,.5107,.501],[.7661,.5167,.5036],[.7678,.5224,.5062],[.7695,.5282,.5087],[.7712,.5339,.5113],[.7729,.5396,.5139],[.7746,.5451,.5164],[.7763,.5506,.5189],[.778,.5561,.5214],[.7796,.5615,.5239],[.7813,.5669,.5264],[.783,.5721,.5289],[.7847,.5774,.5313],[.7863,.5827,.5338],[.788,.5878,.5363],[.7896,.5929,.5387],[.7913,.598,.5411],[.7929,.6031,.5435],[.7946,.608,.5459],[.7962,.613,.5483],[.7979,.6179,.5507],[.7995,.6228,.5531],[.8011,.6276,.5554],[.8028,.6324,.5578],[.8044,.6372,.5601],[.806,.6419,.5624],[.8076,.6466,.5648],[.8093,.6512,.5671],[.8109,.6559,.5694],[.8125,.6605,.5717],[.8141,.665,.5739],[.8157,.6695,.5762],[.8173,.674,.5785],[.8189,.6785,.5807],[.8205,.683,.583],[.8221,.6874,.5852],[.8237,.6918,.5874],[.8253,.6961,.5897],[.8268,.7005,.5919],[.8284,.7047,.5941],[.83,.709,.5963],[.8316,.7133,.5985],[.8331,.7175,.6006],[.8347,.7217,.6028],[.8363,.7259,.605],[.8378,.73,.6071],[.8394,.7342,.6093],[.8409,.7383,.6114],[.8425,.7423,.6136],[.844,.7464,.6157],[.8456,.7505,.6178],[.8471,.7545,.6199],[.8487,.7585,.622],[.8502,.7625,.6241],[.8518,.7664,.6262],[.8533,.7703,.6283],[.8548,.7742,.6304],[.8563,.7781,.6324],[.8579,.782,.6345],[.8594,.7859,.6366],[.8609,.7897,.6386],[.8624,.7935,.6407],[.8639,.7974,.6427],[.8655,.8011,.6447],[.867,.8049,.6467],[.8685,.8086,.6488],[.87,.8124,.6508],[.8715,.8161,.6528],[.873,.8198,.6548],[.8745,.8234,.6568],[.876,.8271,.6588],[.8775,.8308,.6607],[.8789,.8344,.6627],[.8804,.838,.6647],[.8819,.8416,.6667],[.8834,.8452,.6686],[.8849,.8487,.6706],[.8863,.8523,.6725],[.8878,.8559,.6745],[.8893,.8594,.6764],[.8908,.8629,.6783],[.8922,.8664,.6802],[.8937,.8699,.6822],[.8952,.8733,.6841],[.8966,.8768,.686],[.8981,.8802,.6879],[.8995,.8837,.6898],[.901,.8871,.6917],[.9024,.8905,.6936],[.9039,.8939,.6954],[.9053,.8972,.6973],[.9068,.9006,.6992],[.9082,.9039,.7011],[.9096,.9073,.7029],[.9111,.9106,.7048],[.9125,.9125,.7094],[.9139,.9139,.7148],[.9154,.9154,.7202],[.9168,.9168,.7256],[.9182,.9182,.7309],[.9196,.9196,.7362],[.9211,.9211,.7414],[.9225,.9225,.7467],[.9239,.9239,.7519],[.9253,.9253,.757],[.9267,.9267,.7621],[.9281,.9281,.7672],[.9295,.9295,.7722],[.9309,.9309,.7772],[.9323,.9323,.7822],[.9338,.9338,.7872],[.9352,.9352,.7921],[.9365,.9365,.7969],[.9379,.9379,.8018],[.9393,.9393,.8067],[.9407,.9407,.8115],[.9421,.9421,.8162],[.9435,.9435,.8209],[.9449,.9449,.8257],[.9463,.9463,.8304],[.9476,.9476,.835],[.949,.949,.8396],[.9504,.9504,.8443],[.9518,.9518,.8489],[.9531,.9531,.8534],[.9545,.9545,.8579],[.9559,.9559,.8625],[.9573,.9573,.867],[.9586,.9586,.8714],[.96,.96,.8758],[.9613,.9613,.8803],[.9627,.9627,.8847],[.9641,.9641,.889],[.9654,.9654,.8934],[.9668,.9668,.8977],[.9681,.9681,.9021],[.9695,.9695,.9063],[.9708,.9708,.9106],[.9722,.9722,.9149],[.9735,.9735,.9191],[.9748,.9748,.9233],[.9762,.9762,.9275],[.9775,.9775,.9317],[.9789,.9789,.9358],[.9802,.9802,.94],[.9815,.9815,.9441],[.9829,.9829,.9482],[.9842,.9842,.9523],[.9855,.9855,.9563],[.9868,.9868,.9604],[.9882,.9882,.9644],[.9895,.9895,.9685],[.9908,.9908,.9724],[.9921,.9921,.9764],[.9934,.9934,.9804],[.9948,.9948,.9844],[.9961,.9961,.9883],[.9974,.9974,.9922],[.9987,.9987,.9961],[1,1,1]]};ce.plasma={interpolate:!0,colors:[[.0504,.0298,.528],[.0635,.0284,.5331],[.0754,.0272,.538],[.0862,.0261,.5427],[.0964,.0252,.5471],[.106,.0243,.5514],[.1151,.0236,.5555],[.1239,.0229,.5594],[.1324,.0223,.5632],[.1406,.0217,.567],[.1486,.0212,.5706],[.1564,.0207,.5741],[.1641,.0202,.5775],[.1716,.0197,.5808],[.179,.0193,.5841],[.1862,.0188,.5872],[.1934,.0184,.5903],[.2004,.0179,.5934],[.2074,.0174,.5963],[.2144,.017,.5992],[.2212,.0165,.6021],[.228,.016,.6049],[.2347,.0155,.6076],[.2414,.015,.6103],[.248,.0144,.6129],[.2546,.0139,.6154],[.2612,.0133,.6179],[.2677,.0127,.6203],[.2742,.0121,.6227],[.2806,.0115,.625],[.2871,.0109,.6273],[.2935,.0102,.6295],[.2999,.0096,.6316],[.3062,.0089,.6337],[.3125,.0082,.6357],[.3189,.0076,.6376],[.3252,.0069,.6395],[.3314,.0063,.6413],[.3377,.0056,.643],[.3439,.005,.6447],[.3502,.0044,.6463],[.3564,.0038,.6478],[.3626,.0032,.6492],[.3687,.0027,.6506],[.3749,.0022,.6519],[.381,.0018,.6531],[.3872,.0014,.6542],[.3933,.0011,.6552],[.3994,9e-4,.6561],[.4055,7e-4,.657],[.4116,6e-4,.6577],[.4176,6e-4,.6584],[.4237,6e-4,.659],[.4297,8e-4,.6594],[.4357,.0011,.6598],[.4417,.0015,.6601],[.4477,.0021,.6602],[.4537,.0028,.6603],[.4596,.0036,.6603],[.4656,.0045,.6601],[.4715,.0057,.6599],[.4773,.007,.6595],[.4832,.0085,.6591],[.4891,.0101,.6585],[.4949,.012,.6579],[.5007,.0141,.6571],[.5065,.0163,.6562],[.5122,.0188,.6552],[.5179,.0216,.6541],[.5236,.0245,.6529],[.5293,.0277,.6516],[.535,.0312,.6502],[.5406,.035,.6486],[.5462,.039,.647],[.5517,.0431,.6453],[.5572,.0473,.6434],[.5627,.0515,.6415],[.5682,.0558,.6395],[.5736,.06,.6373],[.579,.0643,.6351],[.5844,.0686,.6328],[.5897,.0729,.6304],[.595,.0772,.6279],[.6003,.0815,.6253],[.6055,.0859,.6227],[.6107,.0902,.62],[.6158,.0946,.6171],[.6209,.0989,.6143],[.626,.1033,.6113],[.631,.1077,.6083],[.636,.1121,.6052],[.641,.1165,.6021],[.6459,.1209,.5989],[.6507,.1253,.5956],[.6556,.1297,.5923],[.6604,.1341,.589],[.6651,.1386,.5856],[.6698,.143,.5822],[.6745,.1474,.5787],[.6792,.1518,.5752],[.6838,.1563,.5717],[.6883,.1607,.5681],[.6928,.1651,.5645],[.6973,.1696,.5609],[.7018,.174,.5573],[.7062,.1784,.5537],[.7105,.1829,.55],[.7149,.1873,.5463],[.7192,.1917,.5427],[.7234,.1962,.539],[.7277,.2006,.5353],[.7319,.205,.5316],[.736,.2094,.5279],[.7401,.2139,.5242],[.7442,.2183,.5205],[.7483,.2227,.5168],[.7523,.2271,.5131],[.7563,.2316,.5095],[.7603,.236,.5058],[.7642,.2404,.5021],[.7681,.2448,.4985],[.772,.2492,.4948],[.7758,.2537,.4912],[.7796,.2581,.4875],[.7834,.2625,.4839],[.7871,.2669,.4803],[.7909,.2713,.4767],[.7945,.2758,.4731],[.7982,.2802,.4695],[.8019,.2846,.466],[.8055,.2891,.4624],[.8091,.2935,.4589],[.8126,.2979,.4553],[.8161,.3024,.4518],[.8197,.3068,.4483],[.8231,.3113,.4448],[.8266,.3157,.4413],[.83,.3202,.4378],[.8334,.3246,.4344],[.8368,.3291,.4309],[.8402,.3336,.4275],[.8435,.3381,.424],[.8468,.3426,.4206],[.8501,.347,.4172],[.8533,.3516,.4137],[.8565,.3561,.4103],[.8598,.3606,.4069],[.8629,.3651,.4035],[.8661,.3697,.4001],[.8692,.3742,.3967],[.8723,.3788,.3934],[.8754,.3833,.39],[.8784,.3879,.3866],[.8814,.3925,.3832],[.8844,.3971,.3799],[.8874,.4018,.3765],[.8903,.4064,.3731],[.8932,.411,.3698],[.8961,.4157,.3664],[.899,.4204,.363],[.9018,.4251,.3597],[.9046,.4298,.3563],[.9074,.4345,.353],[.9101,.4393,.3496],[.9128,.444,.3463],[.9155,.4488,.3429],[.9181,.4536,.3395],[.9207,.4584,.3362],[.9233,.4633,.3328],[.9258,.4681,.3294],[.9283,.473,.3261],[.9308,.4779,.3227],[.9332,.4828,.3193],[.9356,.4877,.316],[.938,.4927,.3126],[.9403,.4976,.3092],[.9426,.5026,.3058],[.9448,.5077,.3024],[.9471,.5127,.299],[.9492,.5178,.2957],[.9513,.5228,.2923],[.9534,.528,.2889],[.9555,.5331,.2855],[.9575,.5382,.2821],[.9594,.5434,.2787],[.9613,.5486,.2753],[.9632,.5539,.2719],[.965,.5591,.2685],[.9668,.5644,.2651],[.9685,.5697,.2617],[.9702,.575,.2583],[.9718,.5804,.2549],[.9734,.5858,.2515],[.9749,.5912,.2482],[.9764,.5966,.2448],[.9779,.6021,.2414],[.9792,.6075,.238],[.9806,.613,.2346],[.9818,.6186,.2313],[.983,.6241,.2279],[.9842,.6297,.2246],[.9853,.6353,.2213],[.9863,.641,.2179],[.9873,.6466,.2146],[.9883,.6523,.2114],[.9891,.658,.2081],[.9899,.6638,.2049],[.9907,.6696,.2016],[.9914,.6754,.1985],[.992,.6812,.1953],[.9925,.687,.1922],[.993,.6929,.1891],[.9935,.6988,.186],[.9938,.7047,.183],[.9941,.7107,.1801],[.9943,.7167,.1772],[.9945,.7227,.1744],[.9946,.7287,.1716],[.9946,.7348,.1689],[.9945,.7409,.1663],[.9944,.747,.1638],[.9941,.7531,.1614],[.9939,.7593,.1591],[.9935,.7655,.1569],[.993,.7717,.1548],[.9925,.778,.1529],[.9919,.7842,.151],[.9912,.7905,.1494],[.9904,.7969,.1479],[.9896,.8032,.1465],[.9886,.8096,.1454],[.9876,.816,.1444],[.9865,.8224,.1436],[.9853,.8288,.1429],[.984,.8353,.1425],[.9827,.8418,.1423],[.9812,.8483,.1423],[.9796,.8549,.1425],[.978,.8614,.1428],[.9763,.868,.1434],[.9744,.8746,.1441],[.9725,.8812,.1449],[.9705,.8879,.1459],[.9684,.8946,.147],[.9663,.9012,.1482],[.964,.908,.1494],[.9617,.9147,.1505],[.9593,.9214,.1516],[.9568,.9282,.1524],[.9543,.9349,.1529],[.9517,.9417,.1529],[.9492,.9484,.1522],[.9466,.9552,.1503],[.9442,.9619,.1469],[.9419,.9686,.141],[.94,.9752,.1313]]};ce.prism={interpolate:!0,colors:[[1,0,0],[1,0,0],[1,.1296,0],[1,.3203,0],[1,.5116,0],[1,.6909,0],[1,.8464,0],[1,.9679,0],[.889,1,0],[.6991,1,0],[.5073,1,0],[.3262,.9966,0],[.1678,.887,0],[.0425,.7408,.2247],[0,.5675,.4915],[0,.3785,.7259],[0,.1863,.9124],[0,.0036,1],[.1001,0,1],[.2431,0,1],[.4142,0,.9965],[.6022,0,.845],[.7946,0,.6378],[.9788,0,.3885],[1,0,.1136],[1,0,0],[1,.0561,0],[1,.2429,0],[1,.4354,0],[1,.6211,0],[1,.7875,0],[1,.9237,0],[.9619,1,0],[.7764,1,0],[.5838,1,0],[.3969,1,0],[.228,.9359,0],[.0883,.8034,.1123],[0,.6397,.3872],[0,.4555,.6367],[0,.2631,.8441],[0,.0751,.9959],[.0528,0,1],[.1817,0,1],[.3427,0,1],[.5254,0,.9132],[.7176,0,.7269],[.9066,0,.4927],[1,0,.2261],[1,0,0],[1,0,0],[1,.1664,0],[1,.3582,0],[1,.5481,0],[1,.7236,0],[1,.8732,0],[1,.987,0],[.8525,1,0],[.6612,1,0],[.4705,1,0],[.293,.9784,0],[.1403,.861,0],[.0226,.7086,.2788],[0,.5312,.5406],[0,.3406,.7667],[0,.1493,.9423],[.0121,0,1],[.1255,0,1],[.2748,0,1],[.4501,0,.9717],[.64,0,.8083],[.8318,0,.5917],[1,0,.336],[1,0,.0582],[1,0,0],[1,.0917,0],[1,.2806,0],[1,.4728,0],[1,.6556,0],[1,.8169,0],[1,.9461,0],[.9267,1,0],[.7387,1,0],[.5463,1,0],[.362,1,0],[.198,.9129,0],[.0651,.7735,.1674],[0,.6048,.4387],[0,.418,.6811],[0,.2255,.8786],[0,.0398,1],[.0751,0,1],[.2111,0,1],[.3772,0,1],[.5627,0,.8811],[.7553,0,.6843],[.9422,0,.4425],[1,0,.1714],[1,0,0],[1,.0195,0],[1,.2036,0],[1,.396,0],[1,.5841,0],[1,.7554,0],[1,.8987,0],[.9981,1,0],[.8155,1,0],[.6234,1,0],[.4343,1,0],[.2607,.9585,0],[.1142,.8336,.0542],[.0043,.6754,.3322],[0,.4945,.5883],[0,.3027,.8056],[0,.1128,.9698],[.0311,0,1],[.1522,0,1],[.3075,0,1],[.4866,0,.9444],[.6779,0,.7696],[.8686,0,.5441],[1,0,.2827],[1,0,.0027],[1,0,0],[1,.1279,0],[1,.3185,0],[1,.5098,0],[1,.6893,0],[1,.8451,0],[1,.9669,0],[.8908,1,0],[.7009,1,0],[.5091,1,0],[.3279,.9974,0],[.1692,.8883,0],[.0435,.7423,.2221],[0,.5692,.4891],[0,.3803,.7239],[0,.1881,.9109],[0,.0052,1],[.0989,0,1],[.2416,0,1],[.4125,0,.9976],[.6003,0,.8467],[.7928,0,.64],[.9772,0,.391],[1,0,.1163],[1,0,0],[1,.0543,0],[1,.241,0],[1,.4336,0],[1,.6194,0],[1,.786,0],[1,.9226,0],[.9636,1,0],[.7782,1,0],[.5856,1,0],[.3986,1,0],[.2295,.937,0],[.0895,.8049,.1096],[0,.6414,.3847],[0,.4574,.6344],[0,.2649,.8424],[0,.0768,.9947],[.0518,0,1],[.1803,0,1],[.3411,0,1],[.5236,0,.9147],[.7157,0,.729],[.9048,0,.4952],[1,0,.2287],[1,0,0],[1,0,0],[1,.1646,0],[1,.3563,0],[1,.5463,0],[1,.7221,0],[1,.872,0],[1,.9861,0],[.8543,1,0],[.6631,1,0],[.4723,1,0],[.2946,.9793,0],[.1416,.8623,0],[.0235,.7102,.2762],[0,.533,.5382],[0,.3425,.7648],[0,.1511,.9409],[.0112,0,1],[.1242,0,1],[.2732,0,1],[.4484,0,.9729],[.6381,0,.8102],[.83,0,.594],[1,0,.3386],[1,0,.061],[1,0,0],[1,.0899,0],[1,.2788,0],[1,.471,0],[1,.6539,0],[1,.8155,0],[1,.9451,0],[.9284,1,0],[.7406,1,0],[.5481,1,0],[.3637,1,0],[.1994,.914,0],[.0662,.7749,.1647],[0,.6065,.4362],[0,.4199,.679],[0,.2273,.877],[0,.0415,1],[.074,0,1],[.2096,0,1],[.3755,0,1],[.5609,0,.8827],[.7534,0,.6864],[.9405,0,.4449],[1,0,.1741],[1,0,0],[1,.0178,0],[1,.2017,0],[1,.3941,0],[1,.5823,0],[1,.7539,0],[1,.8974,0],[.9997,1,0],[.8173,1,0],[.6252,1,0],[.436,1,0],[.2623,.9595,0],[.1154,.8349,.0515],[.0051,.6771,.3296],[0,.4963,.586],[0,.3046,.8037],[0,.1146,.9685],[.0302,0,1],[.1509,0,1],[.3059,0,1],[.4848,0,.9458],[.676,0,.7716],[.8668,0,.5465],[1,0,.2854],[1,0,.0054],[1,0,0],[1,.1261,0],[1,.3166,0],[1,.508,0],[1,.6877,0],[1,.8437,0],[1,.966,0],[.8925,1,0],[.7028,1,0],[.5109,1,0],[.3295,.9983,0]]};ce.rainbow={interpolate:!0,colors:[[.5,0,1],[.4922,.0123,1],[.4843,.0246,.9999],[.4765,.037,.9998],[.4686,.0493,.9997],[.4608,.0616,.9995],[.4529,.0739,.9993],[.4451,.0861,.9991],[.4373,.0984,.9988],[.4294,.1107,.9985],[.4216,.1229,.9981],[.4137,.1351,.9977],[.4059,.1473,.9973],[.398,.1595,.9968],[.3902,.1716,.9963],[.3824,.1837,.9957],[.3745,.1958,.9951],[.3667,.2079,.9945],[.3588,.2199,.9939],[.351,.2319,.9932],[.3431,.2439,.9924],[.3353,.2558,.9916],[.3275,.2677,.9908],[.3196,.2796,.99],[.3118,.2914,.9891],[.3039,.3032,.9882],[.2961,.3149,.9872],[.2882,.3265,.9862],[.2804,.3382,.9852],[.2725,.3497,.9841],[.2647,.3612,.983],[.2569,.3727,.9818],[.249,.3841,.9806],[.2412,.3955,.9794],[.2333,.4067,.9781],[.2255,.418,.9768],[.2176,.4291,.9755],[.2098,.4402,.9741],[.202,.4512,.9727],[.1941,.4622,.9713],[.1863,.4731,.9698],[.1784,.4839,.9683],[.1706,.4947,.9667],[.1627,.5053,.9651],[.1549,.5159,.9635],[.1471,.5264,.9618],[.1392,.5369,.9601],[.1314,.5472,.9584],[.1235,.5575,.9566],[.1157,.5677,.9548],[.1078,.5778,.9529],[.1,.5878,.9511],[.0922,.5977,.9491],[.0843,.6075,.9472],[.0765,.6173,.9452],[.0686,.6269,.9432],[.0608,.6365,.9411],[.0529,.6459,.939],[.0451,.6553,.9369],[.0373,.6645,.9347],[.0294,.6737,.9325],[.0216,.6827,.9302],[.0137,.6917,.928],[.0059,.7005,.9256],[.002,.7093,.9233],[.0098,.7179,.9209],[.0176,.7264,.9185],[.0255,.7348,.916],[.0333,.7431,.9135],[.0412,.7513,.911],[.049,.7594,.9085],[.0569,.7674,.9059],[.0647,.7752,.9032],[.0725,.7829,.9006],[.0804,.7905,.8979],[.0882,.798,.8952],[.0961,.8054,.8924],[.1039,.8126,.8896],[.1118,.8197,.8868],[.1196,.8267,.8839],[.1275,.8336,.881],[.1353,.8403,.8781],[.1431,.847,.8751],[.151,.8534,.8721],[.1588,.8598,.8691],[.1667,.866,.866],[.1745,.8721,.8629],[.1824,.8781,.8598],[.1902,.8839,.8566],[.198,.8896,.8534],[.2059,.8952,.8502],[.2137,.9006,.847],[.2216,.9059,.8437],[.2294,.911,.8403],[.2373,.916,.837],[.2451,.9209,.8336],[.2529,.9256,.8302],[.2608,.9302,.8267],[.2686,.9347,.8233],[.2765,.939,.8197],[.2843,.9432,.8162],[.2922,.9472,.8126],[.3,.9511,.809],[.3078,.9548,.8054],[.3157,.9584,.8017],[.3235,.9618,.798],[.3314,.9651,.7943],[.3392,.9683,.7905],[.3471,.9713,.7867],[.3549,.9741,.7829],[.3627,.9768,.7791],[.3706,.9794,.7752],[.3784,.9818,.7713],[.3863,.9841,.7674],[.3941,.9862,.7634],[.402,.9882,.7594],[.4098,.99,.7554],[.4176,.9916,.7513],[.4255,.9932,.7473],[.4333,.9945,.7431],[.4412,.9957,.739],[.449,.9968,.7348],[.4569,.9977,.7307],[.4647,.9985,.7264],[.4725,.9991,.7222],[.4804,.9995,.7179],[.4882,.9998,.7136],[.4961,1,.7093],[.5039,1,.7049],[.5118,.9998,.7005],[.5196,.9995,.6961],[.5275,.9991,.6917],[.5353,.9985,.6872],[.5431,.9977,.6827],[.551,.9968,.6782],[.5588,.9957,.6737],[.5667,.9945,.6691],[.5745,.9932,.6645],[.5824,.9916,.6599],[.5902,.99,.6553],[.598,.9882,.6506],[.6059,.9862,.6459],[.6137,.9841,.6412],[.6216,.9818,.6365],[.6294,.9794,.6317],[.6373,.9768,.6269],[.6451,.9741,.6221],[.6529,.9713,.6173],[.6608,.9683,.6124],[.6686,.9651,.6075],[.6765,.9618,.6026],[.6843,.9584,.5977],[.6922,.9548,.5928],[.7,.9511,.5878],[.7078,.9472,.5828],[.7157,.9432,.5778],[.7235,.939,.5727],[.7314,.9347,.5677],[.7392,.9302,.5626],[.7471,.9256,.5575],[.7549,.9209,.5524],[.7627,.916,.5472],[.7706,.911,.5421],[.7784,.9059,.5369],[.7863,.9006,.5317],[.7941,.8952,.5264],[.802,.8896,.5212],[.8098,.8839,.5159],[.8176,.8781,.5106],[.8255,.8721,.5053],[.8333,.866,.5],[.8412,.8598,.4947],[.849,.8534,.4893],[.8569,.847,.4839],[.8647,.8403,.4785],[.8725,.8336,.4731],[.8804,.8267,.4677],[.8882,.8197,.4622],[.8961,.8126,.4567],[.9039,.8054,.4512],[.9118,.798,.4457],[.9196,.7905,.4402],[.9275,.7829,.4347],[.9353,.7752,.4291],[.9431,.7674,.4235],[.951,.7594,.418],[.9588,.7513,.4124],[.9667,.7431,.4067],[.9745,.7348,.4011],[.9824,.7264,.3955],[.9902,.7179,.3898],[.998,.7093,.3841],[1,.7005,.3784],[1,.6917,.3727],[1,.6827,.367],[1,.6737,.3612],[1,.6645,.3555],[1,.6553,.3497],[1,.6459,.3439],[1,.6365,.3382],[1,.6269,.3324],[1,.6173,.3265],[1,.6075,.3207],[1,.5977,.3149],[1,.5878,.309],[1,.5778,.3032],[1,.5677,.2973],[1,.5575,.2914],[1,.5472,.2855],[1,.5369,.2796],[1,.5264,.2737],[1,.5159,.2677],[1,.5053,.2618],[1,.4947,.2558],[1,.4839,.2499],[1,.4731,.2439],[1,.4622,.2379],[1,.4512,.2319],[1,.4402,.226],[1,.4291,.2199],[1,.418,.2139],[1,.4067,.2079],[1,.3955,.2019],[1,.3841,.1958],[1,.3727,.1898],[1,.3612,.1837],[1,.3497,.1777],[1,.3382,.1716],[1,.3265,.1656],[1,.3149,.1595],[1,.3032,.1534],[1,.2914,.1473],[1,.2796,.1412],[1,.2677,.1351],[1,.2558,.129],[1,.2439,.1229],[1,.2319,.1168],[1,.2199,.1107],[1,.2079,.1045],[1,.1958,.0984],[1,.1837,.0923],[1,.1716,.0861],[1,.1595,.08],[1,.1473,.0739],[1,.1351,.0677],[1,.1229,.0616],[1,.1107,.0554],[1,.0984,.0493],[1,.0861,.0431],[1,.0739,.037],[1,.0616,.0308],[1,.0493,.0246],[1,.037,.0185],[1,.0246,.0123],[1,.0123,.0062],[1,0,0]]};ce.seismic={interpolate:!0,colors:[[0,0,.3],[0,0,.311],[0,0,.322],[0,0,.3329],[0,0,.3439],[0,0,.3549],[0,0,.3659],[0,0,.3769],[0,0,.3878],[0,0,.3988],[0,0,.4098],[0,0,.4208],[0,0,.4318],[0,0,.4427],[0,0,.4537],[0,0,.4647],[0,0,.4757],[0,0,.4867],[0,0,.4976],[0,0,.5086],[0,0,.5196],[0,0,.5306],[0,0,.5416],[0,0,.5525],[0,0,.5635],[0,0,.5745],[0,0,.5855],[0,0,.5965],[0,0,.6075],[0,0,.6184],[0,0,.6294],[0,0,.6404],[0,0,.6514],[0,0,.6624],[0,0,.6733],[0,0,.6843],[0,0,.6953],[0,0,.7063],[0,0,.7173],[0,0,.7282],[0,0,.7392],[0,0,.7502],[0,0,.7612],[0,0,.7722],[0,0,.7831],[0,0,.7941],[0,0,.8051],[0,0,.8161],[0,0,.8271],[0,0,.838],[0,0,.849],[0,0,.86],[0,0,.871],[0,0,.882],[0,0,.8929],[0,0,.9039],[0,0,.9149],[0,0,.9259],[0,0,.9369],[0,0,.9478],[0,0,.9588],[0,0,.9698],[0,0,.9808],[0,0,.9918],[.0039,.0039,1],[.0196,.0196,1],[.0353,.0353,1],[.051,.051,1],[.0667,.0667,1],[.0824,.0824,1],[.098,.098,1],[.1137,.1137,1],[.1294,.1294,1],[.1451,.1451,1],[.1608,.1608,1],[.1765,.1765,1],[.1922,.1922,1],[.2078,.2078,1],[.2235,.2235,1],[.2392,.2392,1],[.2549,.2549,1],[.2706,.2706,1],[.2863,.2863,1],[.302,.302,1],[.3176,.3176,1],[.3333,.3333,1],[.349,.349,1],[.3647,.3647,1],[.3804,.3804,1],[.3961,.3961,1],[.4118,.4118,1],[.4275,.4275,1],[.4431,.4431,1],[.4588,.4588,1],[.4745,.4745,1],[.4902,.4902,1],[.5059,.5059,1],[.5216,.5216,1],[.5373,.5373,1],[.5529,.5529,1],[.5686,.5686,1],[.5843,.5843,1],[.6,.6,1],[.6157,.6157,1],[.6314,.6314,1],[.6471,.6471,1],[.6627,.6627,1],[.6784,.6784,1],[.6941,.6941,1],[.7098,.7098,1],[.7255,.7255,1],[.7412,.7412,1],[.7569,.7569,1],[.7725,.7725,1],[.7882,.7882,1],[.8039,.8039,1],[.8196,.8196,1],[.8353,.8353,1],[.851,.851,1],[.8667,.8667,1],[.8824,.8824,1],[.898,.898,1],[.9137,.9137,1],[.9294,.9294,1],[.9451,.9451,1],[.9608,.9608,1],[.9765,.9765,1],[.9922,.9922,1],[1,.9922,.9922],[1,.9765,.9765],[1,.9608,.9608],[1,.9451,.9451],[1,.9294,.9294],[1,.9137,.9137],[1,.898,.898],[1,.8824,.8824],[1,.8667,.8667],[1,.851,.851],[1,.8353,.8353],[1,.8196,.8196],[1,.8039,.8039],[1,.7882,.7882],[1,.7725,.7725],[1,.7569,.7569],[1,.7412,.7412],[1,.7255,.7255],[1,.7098,.7098],[1,.6941,.6941],[1,.6784,.6784],[1,.6627,.6627],[1,.6471,.6471],[1,.6314,.6314],[1,.6157,.6157],[1,.6,.6],[1,.5843,.5843],[1,.5686,.5686],[1,.5529,.5529],[1,.5373,.5373],[1,.5216,.5216],[1,.5059,.5059],[1,.4902,.4902],[1,.4745,.4745],[1,.4588,.4588],[1,.4431,.4431],[1,.4275,.4275],[1,.4118,.4118],[1,.3961,.3961],[1,.3804,.3804],[1,.3647,.3647],[1,.349,.349],[1,.3333,.3333],[1,.3176,.3176],[1,.302,.302],[1,.2863,.2863],[1,.2706,.2706],[1,.2549,.2549],[1,.2392,.2392],[1,.2235,.2235],[1,.2078,.2078],[1,.1922,.1922],[1,.1765,.1765],[1,.1608,.1608],[1,.1451,.1451],[1,.1294,.1294],[1,.1137,.1137],[1,.098,.098],[1,.0824,.0824],[1,.0667,.0667],[1,.051,.051],[1,.0353,.0353],[1,.0196,.0196],[1,.0039,.0039],[.9941,0,0],[.9863,0,0],[.9784,0,0],[.9706,0,0],[.9627,0,0],[.9549,0,0],[.9471,0,0],[.9392,0,0],[.9314,0,0],[.9235,0,0],[.9157,0,0],[.9078,0,0],[.9,0,0],[.8922,0,0],[.8843,0,0],[.8765,0,0],[.8686,0,0],[.8608,0,0],[.8529,0,0],[.8451,0,0],[.8373,0,0],[.8294,0,0],[.8216,0,0],[.8137,0,0],[.8059,0,0],[.798,0,0],[.7902,0,0],[.7824,0,0],[.7745,0,0],[.7667,0,0],[.7588,0,0],[.751,0,0],[.7431,0,0],[.7353,0,0],[.7275,0,0],[.7196,0,0],[.7118,0,0],[.7039,0,0],[.6961,0,0],[.6882,0,0],[.6804,0,0],[.6725,0,0],[.6647,0,0],[.6569,0,0],[.649,0,0],[.6412,0,0],[.6333,0,0],[.6255,0,0],[.6176,0,0],[.6098,0,0],[.602,0,0],[.5941,0,0],[.5863,0,0],[.5784,0,0],[.5706,0,0],[.5627,0,0],[.5549,0,0],[.5471,0,0],[.5392,0,0],[.5314,0,0],[.5235,0,0],[.5157,0,0],[.5078,0,0],[.5,0,0]]};ce.spring={interpolate:!0,colors:[[1,0,1],[1,.0039,.9961],[1,.0078,.9922],[1,.0118,.9882],[1,.0157,.9843],[1,.0196,.9804],[1,.0235,.9765],[1,.0275,.9725],[1,.0314,.9686],[1,.0353,.9647],[1,.0392,.9608],[1,.0431,.9569],[1,.0471,.9529],[1,.051,.949],[1,.0549,.9451],[1,.0588,.9412],[1,.0627,.9373],[1,.0667,.9333],[1,.0706,.9294],[1,.0745,.9255],[1,.0784,.9216],[1,.0824,.9176],[1,.0863,.9137],[1,.0902,.9098],[1,.0941,.9059],[1,.098,.902],[1,.102,.898],[1,.1059,.8941],[1,.1098,.8902],[1,.1137,.8863],[1,.1176,.8824],[1,.1216,.8784],[1,.1255,.8745],[1,.1294,.8706],[1,.1333,.8667],[1,.1373,.8627],[1,.1412,.8588],[1,.1451,.8549],[1,.149,.851],[1,.1529,.8471],[1,.1569,.8431],[1,.1608,.8392],[1,.1647,.8353],[1,.1686,.8314],[1,.1725,.8275],[1,.1765,.8235],[1,.1804,.8196],[1,.1843,.8157],[1,.1882,.8118],[1,.1922,.8078],[1,.1961,.8039],[1,.2,.8],[1,.2039,.7961],[1,.2078,.7922],[1,.2118,.7882],[1,.2157,.7843],[1,.2196,.7804],[1,.2235,.7765],[1,.2275,.7725],[1,.2314,.7686],[1,.2353,.7647],[1,.2392,.7608],[1,.2431,.7569],[1,.2471,.7529],[1,.251,.749],[1,.2549,.7451],[1,.2588,.7412],[1,.2627,.7373],[1,.2667,.7333],[1,.2706,.7294],[1,.2745,.7255],[1,.2784,.7216],[1,.2824,.7176],[1,.2863,.7137],[1,.2902,.7098],[1,.2941,.7059],[1,.298,.702],[1,.302,.698],[1,.3059,.6941],[1,.3098,.6902],[1,.3137,.6863],[1,.3176,.6824],[1,.3216,.6784],[1,.3255,.6745],[1,.3294,.6706],[1,.3333,.6667],[1,.3373,.6627],[1,.3412,.6588],[1,.3451,.6549],[1,.349,.651],[1,.3529,.6471],[1,.3569,.6431],[1,.3608,.6392],[1,.3647,.6353],[1,.3686,.6314],[1,.3725,.6275],[1,.3765,.6235],[1,.3804,.6196],[1,.3843,.6157],[1,.3882,.6118],[1,.3922,.6078],[1,.3961,.6039],[1,.4,.6],[1,.4039,.5961],[1,.4078,.5922],[1,.4118,.5882],[1,.4157,.5843],[1,.4196,.5804],[1,.4235,.5765],[1,.4275,.5725],[1,.4314,.5686],[1,.4353,.5647],[1,.4392,.5608],[1,.4431,.5569],[1,.4471,.5529],[1,.451,.549],[1,.4549,.5451],[1,.4588,.5412],[1,.4627,.5373],[1,.4667,.5333],[1,.4706,.5294],[1,.4745,.5255],[1,.4784,.5216],[1,.4824,.5176],[1,.4863,.5137],[1,.4902,.5098],[1,.4941,.5059],[1,.498,.502],[1,.502,.498],[1,.5059,.4941],[1,.5098,.4902],[1,.5137,.4863],[1,.5176,.4824],[1,.5216,.4784],[1,.5255,.4745],[1,.5294,.4706],[1,.5333,.4667],[1,.5373,.4627],[1,.5412,.4588],[1,.5451,.4549],[1,.549,.451],[1,.5529,.4471],[1,.5569,.4431],[1,.5608,.4392],[1,.5647,.4353],[1,.5686,.4314],[1,.5725,.4275],[1,.5765,.4235],[1,.5804,.4196],[1,.5843,.4157],[1,.5882,.4118],[1,.5922,.4078],[1,.5961,.4039],[1,.6,.4],[1,.6039,.3961],[1,.6078,.3922],[1,.6118,.3882],[1,.6157,.3843],[1,.6196,.3804],[1,.6235,.3765],[1,.6275,.3725],[1,.6314,.3686],[1,.6353,.3647],[1,.6392,.3608],[1,.6431,.3569],[1,.6471,.3529],[1,.651,.349],[1,.6549,.3451],[1,.6588,.3412],[1,.6627,.3373],[1,.6667,.3333],[1,.6706,.3294],[1,.6745,.3255],[1,.6784,.3216],[1,.6824,.3176],[1,.6863,.3137],[1,.6902,.3098],[1,.6941,.3059],[1,.698,.302],[1,.702,.298],[1,.7059,.2941],[1,.7098,.2902],[1,.7137,.2863],[1,.7176,.2824],[1,.7216,.2784],[1,.7255,.2745],[1,.7294,.2706],[1,.7333,.2667],[1,.7373,.2627],[1,.7412,.2588],[1,.7451,.2549],[1,.749,.251],[1,.7529,.2471],[1,.7569,.2431],[1,.7608,.2392],[1,.7647,.2353],[1,.7686,.2314],[1,.7725,.2275],[1,.7765,.2235],[1,.7804,.2196],[1,.7843,.2157],[1,.7882,.2118],[1,.7922,.2078],[1,.7961,.2039],[1,.8,.2],[1,.8039,.1961],[1,.8078,.1922],[1,.8118,.1882],[1,.8157,.1843],[1,.8196,.1804],[1,.8235,.1765],[1,.8275,.1725],[1,.8314,.1686],[1,.8353,.1647],[1,.8392,.1608],[1,.8431,.1569],[1,.8471,.1529],[1,.851,.149],[1,.8549,.1451],[1,.8588,.1412],[1,.8627,.1373],[1,.8667,.1333],[1,.8706,.1294],[1,.8745,.1255],[1,.8784,.1216],[1,.8824,.1176],[1,.8863,.1137],[1,.8902,.1098],[1,.8941,.1059],[1,.898,.102],[1,.902,.098],[1,.9059,.0941],[1,.9098,.0902],[1,.9137,.0863],[1,.9176,.0824],[1,.9216,.0784],[1,.9255,.0745],[1,.9294,.0706],[1,.9333,.0667],[1,.9373,.0627],[1,.9412,.0588],[1,.9451,.0549],[1,.949,.051],[1,.9529,.0471],[1,.9569,.0431],[1,.9608,.0392],[1,.9647,.0353],[1,.9686,.0314],[1,.9725,.0275],[1,.9765,.0235],[1,.9804,.0196],[1,.9843,.0157],[1,.9882,.0118],[1,.9922,.0078],[1,.9961,.0039],[1,1,0]]};ce.summer={interpolate:!0,colors:[[0,.5,.4],[.0039,.502,.4],[.0078,.5039,.4],[.0118,.5059,.4],[.0157,.5078,.4],[.0196,.5098,.4],[.0235,.5118,.4],[.0275,.5137,.4],[.0314,.5157,.4],[.0353,.5176,.4],[.0392,.5196,.4],[.0431,.5216,.4],[.0471,.5235,.4],[.051,.5255,.4],[.0549,.5275,.4],[.0588,.5294,.4],[.0627,.5314,.4],[.0667,.5333,.4],[.0706,.5353,.4],[.0745,.5373,.4],[.0784,.5392,.4],[.0824,.5412,.4],[.0863,.5431,.4],[.0902,.5451,.4],[.0941,.5471,.4],[.098,.549,.4],[.102,.551,.4],[.1059,.5529,.4],[.1098,.5549,.4],[.1137,.5569,.4],[.1176,.5588,.4],[.1216,.5608,.4],[.1255,.5627,.4],[.1294,.5647,.4],[.1333,.5667,.4],[.1373,.5686,.4],[.1412,.5706,.4],[.1451,.5725,.4],[.149,.5745,.4],[.1529,.5765,.4],[.1569,.5784,.4],[.1608,.5804,.4],[.1647,.5824,.4],[.1686,.5843,.4],[.1725,.5863,.4],[.1765,.5882,.4],[.1804,.5902,.4],[.1843,.5922,.4],[.1882,.5941,.4],[.1922,.5961,.4],[.1961,.598,.4],[.2,.6,.4],[.2039,.602,.4],[.2078,.6039,.4],[.2118,.6059,.4],[.2157,.6078,.4],[.2196,.6098,.4],[.2235,.6118,.4],[.2275,.6137,.4],[.2314,.6157,.4],[.2353,.6176,.4],[.2392,.6196,.4],[.2431,.6216,.4],[.2471,.6235,.4],[.251,.6255,.4],[.2549,.6275,.4],[.2588,.6294,.4],[.2627,.6314,.4],[.2667,.6333,.4],[.2706,.6353,.4],[.2745,.6373,.4],[.2784,.6392,.4],[.2824,.6412,.4],[.2863,.6431,.4],[.2902,.6451,.4],[.2941,.6471,.4],[.298,.649,.4],[.302,.651,.4],[.3059,.6529,.4],[.3098,.6549,.4],[.3137,.6569,.4],[.3176,.6588,.4],[.3216,.6608,.4],[.3255,.6627,.4],[.3294,.6647,.4],[.3333,.6667,.4],[.3373,.6686,.4],[.3412,.6706,.4],[.3451,.6725,.4],[.349,.6745,.4],[.3529,.6765,.4],[.3569,.6784,.4],[.3608,.6804,.4],[.3647,.6824,.4],[.3686,.6843,.4],[.3725,.6863,.4],[.3765,.6882,.4],[.3804,.6902,.4],[.3843,.6922,.4],[.3882,.6941,.4],[.3922,.6961,.4],[.3961,.698,.4],[.4,.7,.4],[.4039,.702,.4],[.4078,.7039,.4],[.4118,.7059,.4],[.4157,.7078,.4],[.4196,.7098,.4],[.4235,.7118,.4],[.4275,.7137,.4],[.4314,.7157,.4],[.4353,.7176,.4],[.4392,.7196,.4],[.4431,.7216,.4],[.4471,.7235,.4],[.451,.7255,.4],[.4549,.7275,.4],[.4588,.7294,.4],[.4627,.7314,.4],[.4667,.7333,.4],[.4706,.7353,.4],[.4745,.7373,.4],[.4784,.7392,.4],[.4824,.7412,.4],[.4863,.7431,.4],[.4902,.7451,.4],[.4941,.7471,.4],[.498,.749,.4],[.502,.751,.4],[.5059,.7529,.4],[.5098,.7549,.4],[.5137,.7569,.4],[.5176,.7588,.4],[.5216,.7608,.4],[.5255,.7627,.4],[.5294,.7647,.4],[.5333,.7667,.4],[.5373,.7686,.4],[.5412,.7706,.4],[.5451,.7725,.4],[.549,.7745,.4],[.5529,.7765,.4],[.5569,.7784,.4],[.5608,.7804,.4],[.5647,.7824,.4],[.5686,.7843,.4],[.5725,.7863,.4],[.5765,.7882,.4],[.5804,.7902,.4],[.5843,.7922,.4],[.5882,.7941,.4],[.5922,.7961,.4],[.5961,.798,.4],[.6,.8,.4],[.6039,.802,.4],[.6078,.8039,.4],[.6118,.8059,.4],[.6157,.8078,.4],[.6196,.8098,.4],[.6235,.8118,.4],[.6275,.8137,.4],[.6314,.8157,.4],[.6353,.8176,.4],[.6392,.8196,.4],[.6431,.8216,.4],[.6471,.8235,.4],[.651,.8255,.4],[.6549,.8275,.4],[.6588,.8294,.4],[.6627,.8314,.4],[.6667,.8333,.4],[.6706,.8353,.4],[.6745,.8373,.4],[.6784,.8392,.4],[.6824,.8412,.4],[.6863,.8431,.4],[.6902,.8451,.4],[.6941,.8471,.4],[.698,.849,.4],[.702,.851,.4],[.7059,.8529,.4],[.7098,.8549,.4],[.7137,.8569,.4],[.7176,.8588,.4],[.7216,.8608,.4],[.7255,.8627,.4],[.7294,.8647,.4],[.7333,.8667,.4],[.7373,.8686,.4],[.7412,.8706,.4],[.7451,.8725,.4],[.749,.8745,.4],[.7529,.8765,.4],[.7569,.8784,.4],[.7608,.8804,.4],[.7647,.8824,.4],[.7686,.8843,.4],[.7725,.8863,.4],[.7765,.8882,.4],[.7804,.8902,.4],[.7843,.8922,.4],[.7882,.8941,.4],[.7922,.8961,.4],[.7961,.898,.4],[.8,.9,.4],[.8039,.902,.4],[.8078,.9039,.4],[.8118,.9059,.4],[.8157,.9078,.4],[.8196,.9098,.4],[.8235,.9118,.4],[.8275,.9137,.4],[.8314,.9157,.4],[.8353,.9176,.4],[.8392,.9196,.4],[.8431,.9216,.4],[.8471,.9235,.4],[.851,.9255,.4],[.8549,.9275,.4],[.8588,.9294,.4],[.8627,.9314,.4],[.8667,.9333,.4],[.8706,.9353,.4],[.8745,.9373,.4],[.8784,.9392,.4],[.8824,.9412,.4],[.8863,.9431,.4],[.8902,.9451,.4],[.8941,.9471,.4],[.898,.949,.4],[.902,.951,.4],[.9059,.9529,.4],[.9098,.9549,.4],[.9137,.9569,.4],[.9176,.9588,.4],[.9216,.9608,.4],[.9255,.9627,.4],[.9294,.9647,.4],[.9333,.9667,.4],[.9373,.9686,.4],[.9412,.9706,.4],[.9451,.9725,.4],[.949,.9745,.4],[.9529,.9765,.4],[.9569,.9784,.4],[.9608,.9804,.4],[.9647,.9824,.4],[.9686,.9843,.4],[.9725,.9863,.4],[.9765,.9882,.4],[.9804,.9902,.4],[.9843,.9922,.4],[.9882,.9941,.4],[.9922,.9961,.4],[.9961,.998,.4],[1,1,.4]]};ce.tab10={interpolate:!1,colors:[[.1216,.4667,.7059],[1,.498,.0549],[.1725,.6275,.1725],[.8392,.1529,.1569],[.5804,.4039,.7412],[.549,.3373,.2941],[.8902,.4667,.7608],[.498,.498,.498],[.7373,.7412,.1333],[.0902,.7451,.8118]]};ce.tab20={interpolate:!1,colors:[[.1216,.4667,.7059],[.6824,.7804,.9098],[1,.498,.0549],[1,.7333,.4706],[.1725,.6275,.1725],[.5961,.8745,.5412],[.8392,.1529,.1569],[1,.5961,.5882],[.5804,.4039,.7412],[.7725,.6902,.8353],[.549,.3373,.2941],[.7686,.6118,.5804],[.8902,.4667,.7608],[.9686,.7137,.8235],[.498,.498,.498],[.7804,.7804,.7804],[.7373,.7412,.1333],[.8588,.8588,.5529],[.0902,.7451,.8118],[.6196,.8549,.898]]};ce.tab20b={interpolate:!1,colors:[[.2235,.2314,.4745],[.3216,.3294,.6392],[.4196,.4314,.8118],[.6118,.6196,.8706],[.3882,.4745,.2235],[.549,.6353,.3216],[.7098,.8118,.4196],[.8078,.8588,.6118],[.549,.4275,.1922],[.7412,.6196,.2235],[.9059,.7294,.3216],[.9059,.7961,.5804],[.5176,.2353,.2235],[.6784,.2863,.2902],[.8392,.3804,.4196],[.9059,.5882,.6118],[.4824,.2549,.451],[.6471,.3176,.5804],[.8078,.4275,.7412],[.8706,.6196,.8392]]};ce.tab20c={interpolate:!1,colors:[[.1922,.5098,.7412],[.4196,.6824,.8392],[.6196,.7922,.8824],[.7765,.8588,.9373],[.902,.3333,.051],[.9922,.5529,.2353],[.9922,.6824,.4196],[.9922,.8157,.6353],[.1922,.6392,.3294],[.4549,.7686,.4627],[.6314,.851,.6078],[.7804,.9137,.7529],[.4588,.4196,.6941],[.6196,.6039,.7843],[.7373,.7412,.8627],[.8549,.8549,.9216],[.3882,.3882,.3882],[.5882,.5882,.5882],[.7412,.7412,.7412],[.851,.851,.851]]};ce.terrain={interpolate:!0,colors:[[.2,.2,.6],[.1948,.2105,.6105],[.1895,.2209,.6209],[.1843,.2314,.6314],[.1791,.2418,.6418],[.1739,.2523,.6523],[.1686,.2627,.6627],[.1634,.2732,.6732],[.1582,.2837,.6837],[.1529,.2941,.6941],[.1477,.3046,.7046],[.1425,.315,.715],[.1373,.3255,.7255],[.132,.3359,.7359],[.1268,.3464,.7464],[.1216,.3569,.7569],[.1163,.3673,.7673],[.1111,.3778,.7778],[.1059,.3882,.7882],[.1007,.3987,.7987],[.0954,.4092,.8092],[.0902,.4196,.8196],[.085,.4301,.8301],[.0797,.4405,.8405],[.0745,.451,.851],[.0693,.4614,.8614],[.0641,.4719,.8719],[.0588,.4824,.8824],[.0536,.4928,.8928],[.0484,.5033,.9033],[.0431,.5137,.9137],[.0379,.5242,.9242],[.0327,.5346,.9346],[.0275,.5451,.9451],[.0222,.5556,.9556],[.017,.566,.966],[.0118,.5765,.9765],[.0065,.5869,.9869],[.0013,.5974,.9974],[0,.6059,.9824],[0,.6137,.9588],[0,.6216,.9353],[0,.6294,.9118],[0,.6373,.8882],[0,.6451,.8647],[0,.6529,.8412],[0,.6608,.8176],[0,.6686,.7941],[0,.6765,.7706],[0,.6843,.7471],[0,.6922,.7235],[0,.7,.7],[0,.7078,.6765],[0,.7157,.6529],[0,.7235,.6294],[0,.7314,.6059],[0,.7392,.5824],[0,.7471,.5588],[0,.7549,.5353],[0,.7627,.5118],[0,.7706,.4882],[0,.7784,.4647],[0,.7863,.4412],[0,.7941,.4176],[.0039,.8008,.4008],[.0196,.8039,.4039],[.0353,.8071,.4071],[.051,.8102,.4102],[.0667,.8133,.4133],[.0824,.8165,.4165],[.098,.8196,.4196],[.1137,.8227,.4227],[.1294,.8259,.4259],[.1451,.829,.429],[.1608,.8322,.4322],[.1765,.8353,.4353],[.1922,.8384,.4384],[.2078,.8416,.4416],[.2235,.8447,.4447],[.2392,.8478,.4478],[.2549,.851,.451],[.2706,.8541,.4541],[.2863,.8573,.4573],[.302,.8604,.4604],[.3176,.8635,.4635],[.3333,.8667,.4667],[.349,.8698,.4698],[.3647,.8729,.4729],[.3804,.8761,.4761],[.3961,.8792,.4792],[.4118,.8824,.4824],[.4275,.8855,.4855],[.4431,.8886,.4886],[.4588,.8918,.4918],[.4745,.8949,.4949],[.4902,.898,.498],[.5059,.9012,.5012],[.5216,.9043,.5043],[.5373,.9075,.5075],[.5529,.9106,.5106],[.5686,.9137,.5137],[.5843,.9169,.5169],[.6,.92,.52],[.6157,.9231,.5231],[.6314,.9263,.5263],[.6471,.9294,.5294],[.6627,.9325,.5325],[.6784,.9357,.5357],[.6941,.9388,.5388],[.7098,.942,.542],[.7255,.9451,.5451],[.7412,.9482,.5482],[.7569,.9514,.5514],[.7725,.9545,.5545],[.7882,.9576,.5576],[.8039,.9608,.5608],[.8196,.9639,.5639],[.8353,.9671,.5671],[.851,.9702,.5702],[.8667,.9733,.5733],[.8824,.9765,.5765],[.898,.9796,.5796],[.9137,.9827,.5827],[.9294,.9859,.5859],[.9451,.989,.589],[.9608,.9922,.5922],[.9765,.9953,.5953],[.9922,.9984,.5984],[.9961,.995,.5979],[.9882,.9849,.5936],[.9804,.9749,.5894],[.9725,.9649,.5852],[.9647,.9548,.5809],[.9569,.9448,.5767],[.949,.9347,.5725],[.9412,.9247,.5682],[.9333,.9147,.564],[.9255,.9046,.5598],[.9176,.8946,.5555],[.9098,.8845,.5513],[.902,.8745,.5471],[.8941,.8645,.5428],[.8863,.8544,.5386],[.8784,.8444,.5344],[.8706,.8344,.5301],[.8627,.8243,.5259],[.8549,.8143,.5216],[.8471,.8042,.5174],[.8392,.7942,.5132],[.8314,.7842,.5089],[.8235,.7741,.5047],[.8157,.7641,.5005],[.8078,.754,.4962],[.8,.744,.492],[.7922,.734,.4878],[.7843,.7239,.4835],[.7765,.7139,.4793],[.7686,.7038,.4751],[.7608,.6938,.4708],[.7529,.6838,.4666],[.7451,.6737,.4624],[.7373,.6637,.4581],[.7294,.6536,.4539],[.7216,.6436,.4496],[.7137,.6336,.4454],[.7059,.6235,.4412],[.698,.6135,.4369],[.6902,.6035,.4327],[.6824,.5934,.4285],[.6745,.5834,.4242],[.6667,.5733,.42],[.6588,.5633,.4158],[.651,.5533,.4115],[.6431,.5432,.4073],[.6353,.5332,.4031],[.6275,.5231,.3988],[.6196,.5131,.3946],[.6118,.5031,.3904],[.6039,.493,.3861],[.5961,.483,.3819],[.5882,.4729,.3776],[.5804,.4629,.3734],[.5725,.4529,.3692],[.5647,.4428,.3649],[.5569,.4328,.3607],[.549,.4227,.3565],[.5412,.4127,.3522],[.5333,.4027,.348],[.5255,.3926,.3438],[.5176,.3826,.3395],[.5098,.3725,.3353],[.502,.3625,.3311],[.5059,.3675,.3379],[.5137,.3776,.3484],[.5216,.3876,.3589],[.5294,.3976,.3694],[.5373,.4077,.3799],[.5451,.4177,.3904],[.5529,.4278,.4009],[.5608,.4378,.4115],[.5686,.4478,.422],[.5765,.4579,.4325],[.5843,.4679,.443],[.5922,.478,.4535],[.6,.488,.464],[.6078,.498,.4745],[.6157,.5081,.485],[.6235,.5181,.4955],[.6314,.5282,.506],[.6392,.5382,.5165],[.6471,.5482,.5271],[.6549,.5583,.5376],[.6627,.5683,.5481],[.6706,.5784,.5586],[.6784,.5884,.5691],[.6863,.5984,.5796],[.6941,.6085,.5901],[.702,.6185,.6006],[.7098,.6285,.6111],[.7176,.6386,.6216],[.7255,.6486,.6322],[.7333,.6587,.6427],[.7412,.6687,.6532],[.749,.6787,.6637],[.7569,.6888,.6742],[.7647,.6988,.6847],[.7725,.7089,.6952],[.7804,.7189,.7057],[.7882,.7289,.7162],[.7961,.739,.7267],[.8039,.749,.7373],[.8118,.7591,.7478],[.8196,.7691,.7583],[.8275,.7791,.7688],[.8353,.7892,.7793],[.8431,.7992,.7898],[.851,.8093,.8003],[.8588,.8193,.8108],[.8667,.8293,.8213],[.8745,.8394,.8318],[.8824,.8494,.8424],[.8902,.8595,.8529],[.898,.8695,.8634],[.9059,.8795,.8739],[.9137,.8896,.8844],[.9216,.8996,.8949],[.9294,.9096,.9054],[.9373,.9197,.9159],[.9451,.9297,.9264],[.9529,.9398,.9369],[.9608,.9498,.9475],[.9686,.9598,.958],[.9765,.9699,.9685],[.9843,.9799,.979],[.9922,.99,.9895],[1,1,1]]};ce.turbo={interpolate:!0,colors:[[.19,.0718,.2322],[.1948,.0834,.2615],[.1996,.095,.2902],[.2042,.1065,.3184],[.2086,.118,.3461],[.2129,.1295,.3731],[.2171,.1409,.3996],[.2211,.1522,.4256],[.225,.1635,.451],[.2288,.1748,.4758],[.2324,.186,.5],[.2358,.1972,.5237],[.2392,.2083,.5469],[.2423,.2194,.5694],[.2454,.2304,.5914],[.2483,.2414,.6129],[.2511,.2524,.6337],[.2537,.2633,.6541],[.2562,.2741,.6738],[.2585,.2849,.693],[.2607,.2957,.7116],[.2628,.3064,.7297],[.2647,.3171,.7472],[.2665,.3277,.7641],[.2682,.3382,.7805],[.2697,.3488,.7963],[.271,.3593,.8116],[.2723,.3697,.8262],[.2733,.3801,.8404],[.2743,.3904,.8539],[.2751,.4007,.8669],[.2758,.411,.8794],[.2763,.4212,.8912],[.2767,.4313,.9025],[.2769,.4414,.9133],[.277,.4515,.9235],[.277,.4615,.9331],[.2768,.4715,.9421],[.2765,.4814,.9506],[.276,.4913,.9586],[.2754,.5012,.9659],[.2747,.5109,.9728],[.2738,.5207,.979],[.2727,.5304,.9846],[.2711,.5402,.9893],[.2688,.55,.993],[.2659,.5598,.9958],[.2625,.5697,.9977],[.2586,.5796,.9988],[.2542,.5895,.999],[.2495,.5994,.9984],[.2443,.6094,.997],[.2387,.6193,.9948],[.2329,.6292,.992],[.2268,.6391,.9885],[.2204,.649,.9844],[.2138,.6589,.9796],[.2071,.6687,.9742],[.2002,.6784,.9683],[.1933,.6881,.9619],[.1862,.6978,.955],[.1792,.7073,.9476],[.1722,.7168,.9398],[.1653,.7262,.9316],[.1584,.7355,.923],[.1517,.7447,.9142],[.1452,.7538,.905],[.1389,.7628,.8955],[.1328,.7716,.8858],[.127,.7804,.8759],[.1215,.789,.8658],[.1164,.7974,.8556],[.1117,.8057,.8452],[.1074,.8138,.8348],[.1036,.8218,.8244],[.1003,.8296,.8139],[.0975,.8371,.8034],[.0953,.8446,.793],[.0938,.8518,.7826],[.0929,.8588,.7724],[.0927,.8655,.7623],[.0932,.8721,.7524],[.0945,.8784,.7426],[.0966,.8845,.7332],[.0996,.8904,.7239],[.1034,.896,.715],[.1082,.9014,.706],[.1137,.9067,.6965],[.1201,.9119,.6866],[.1273,.917,.6763],[.1353,.922,.6656],[.1439,.9268,.6545],[.1532,.9315,.6431],[.1632,.9361,.6314],[.1738,.9405,.6194],[.1849,.9448,.6071],[.1966,.949,.5947],[.2088,.953,.582],[.2214,.9569,.5691],[.2345,.9606,.5561],[.248,.9642,.543],[.2618,.9676,.5298],[.276,.9709,.5165],[.2904,.974,.5032],[.3051,.977,.4899],[.3201,.9797,.4765],[.3352,.9823,.4632],[.3504,.9848,.45],[.3658,.987,.4369],[.3813,.9891,.4239],[.3968,.991,.411],[.4123,.9927,.3983],[.4278,.9942,.3858],[.4432,.9955,.3734],[.4585,.9966,.3614],[.4738,.9976,.3496],[.4888,.9983,.3382],[.5036,.9988,.327],[.5182,.9991,.3162],[.5326,.9992,.3058],[.5466,.9991,.2958],[.5603,.9987,.2862],[.5736,.9982,.2771],[.5865,.9974,.2685],[.5989,.9964,.2604],[.6109,.9951,.2528],[.6223,.9937,.2458],[.6332,.992,.2394],[.6436,.99,.2336],[.6539,.9878,.2284],[.6643,.9852,.2237],[.6746,.9825,.2196],[.6849,.9794,.216],[.6952,.9761,.2129],[.7055,.9726,.2103],[.7158,.9688,.2082],[.726,.9647,.2064],[.7361,.9604,.205],[.7462,.9559,.2041],[.7562,.9512,.2034],[.7661,.9463,.2031],[.7759,.9411,.2031],[.7856,.9358,.2034],[.7952,.9302,.2039],[.8047,.9245,.2046],[.8141,.9186,.2055],[.8233,.9125,.2066],[.8324,.9063,.2079],[.8413,.8999,.2093],[.8501,.8933,.2107],[.8587,.8866,.2123],[.8671,.8797,.2139],[.8753,.8727,.2156],[.8833,.8655,.2172],[.8911,.8583,.2188],[.8987,.8509,.2204],[.906,.8434,.2219],[.9132,.8358,.2233],[.92,.8281,.2246],[.9267,.8202,.2257],[.933,.8124,.2267],[.9391,.8044,.2274],[.9449,.7963,.228],[.9504,.7882,.2283],[.9556,.78,.2284],[.9605,.7718,.2281],[.9651,.7635,.2275],[.9693,.7552,.2266],[.9732,.7468,.2254],[.9768,.7384,.2237],[.98,.73,.2216],[.9829,.7214,.2192],[.9855,.7125,.2165],[.9878,.7033,.2136],[.9899,.6938,.2104],[.9916,.6841,.2071],[.9931,.6741,.2035],[.9944,.6639,.1997],[.9954,.6534,.1958],[.9961,.6428,.1916],[.9965,.6319,.1874],[.9968,.6209,.183],[.9967,.6098,.1784],[.9964,.5985,.1738],[.9959,.587,.169],[.9952,.5755,.1641],[.9942,.5639,.1592],[.993,.5521,.1542],[.9915,.5404,.1491],[.9899,.5285,.144],[.988,.5167,.1388],[.9859,.5048,.1337],[.9836,.4929,.1285],[.9811,.481,.1233],[.9784,.4692,.1182],[.9754,.4574,.113],[.9723,.4456,.108],[.969,.434,.1029],[.9656,.4224,.098],[.9619,.4109,.0931],[.958,.3996,.0883],[.954,.3884,.0836],[.9498,.3773,.079],[.9454,.3664,.0746],[.9408,.3557,.0703],[.9361,.3451,.0662],[.9312,.3348,.0622],[.9262,.3247,.0584],[.921,.3149,.0548],[.9157,.3053,.0513],[.9102,.296,.0481],[.9046,.287,.0452],[.8989,.2782,.0424],[.893,.2698,.0399],[.8869,.2615,.0375],[.8807,.2533,.0352],[.8742,.2453,.033],[.8676,.2373,.0308],[.8608,.2294,.0288],[.8538,.2217,.0268],[.8466,.2141,.0249],[.8393,.2065,.023],[.8317,.1991,.0213],[.824,.1918,.0197],[.8161,.1846,.0181],[.808,.1775,.0166],[.7997,.1706,.0152],[.7912,.1637,.0139],[.7826,.1569,.0126],[.7738,.1503,.0115],[.7648,.1437,.0104],[.7556,.1373,.0094],[.7462,.131,.0085],[.7366,.1248,.0077],[.7269,.1187,.007],[.7169,.1127,.0063],[.7068,.1068,.0057],[.6965,.101,.0052],[.686,.0954,.0048],[.6754,.0898,.0045],[.6645,.0844,.0042],[.6534,.079,.0041],[.6422,.0738,.004],[.6308,.0687,.004],[.6192,.0637,.0041],[.6075,.0588,.0043],[.5955,.054,.0045],[.5834,.0493,.0049],[.571,.0447,.0053],[.5585,.0403,.0058],[.5458,.0359,.0064],[.533,.0317,.007],[.5199,.0276,.0078],[.5066,.0235,.0086],[.4932,.0196,.0096],[.4796,.0158,.0106]]};ce.twilight={interpolate:!0,colors:[[.8858,.85,.888],[.8838,.8507,.8872],[.8817,.8513,.8864],[.8795,.8517,.8854],[.8772,.8519,.8843],[.8749,.8519,.8832],[.8723,.8518,.8819],[.8697,.8515,.8805],[.867,.8511,.8791],[.8641,.8505,.8776],[.8611,.8498,.876],[.858,.8489,.8743],[.8547,.8479,.8726],[.8513,.8467,.8709],[.8478,.8455,.869],[.8441,.8441,.8672],[.8403,.8426,.8653],[.8363,.8409,.8633],[.8322,.8392,.8613],[.828,.8374,.8592],[.8236,.8355,.8571],[.819,.8335,.855],[.8144,.8315,.8528],[.8096,.8293,.8506],[.8047,.8271,.8484],[.7997,.8248,.8462],[.7945,.8225,.8439],[.7893,.82,.8416],[.784,.8176,.8394],[.7786,.815,.8371],[.7731,.8124,.8348],[.7675,.8098,.8325],[.7619,.8071,.8303],[.7562,.8044,.828],[.7504,.8016,.8258],[.7446,.7988,.8236],[.7387,.796,.8214],[.7328,.7931,.8193],[.7269,.7902,.8172],[.721,.7872,.8151],[.715,.7843,.8131],[.709,.7813,.8111],[.703,.7782,.8092],[.697,.7752,.8073],[.691,.7721,.8055],[.6851,.769,.8037],[.6791,.7658,.802],[.6731,.7627,.8003],[.6672,.7595,.7986],[.6613,.7563,.797],[.6554,.7531,.7955],[.6496,.7499,.794],[.6438,.7466,.7926],[.638,.7433,.7912],[.6323,.74,.7898],[.6266,.7367,.7885],[.621,.7334,.7872],[.6154,.73,.786],[.6099,.7267,.7847],[.6044,.7233,.7836],[.599,.7199,.7825],[.5936,.7165,.7814],[.5883,.713,.7803],[.583,.7096,.7793],[.5778,.7061,.7783],[.5727,.7027,.7773],[.5676,.6992,.7763],[.5626,.6957,.7754],[.5576,.6922,.7745],[.5527,.6886,.7736],[.5478,.6851,.7728],[.5431,.6815,.7719],[.5383,.678,.7711],[.5337,.6744,.7703],[.5291,.6708,.7696],[.5246,.6672,.7688],[.5201,.6636,.7681],[.5157,.6599,.7673],[.5114,.6563,.7666],[.5071,.6526,.7659],[.5029,.649,.7652],[.4987,.6453,.7645],[.4947,.6416,.7639],[.4907,.6379,.7632],[.4867,.6342,.7626],[.4829,.6304,.7619],[.4791,.6267,.7613],[.4753,.6229,.7607],[.4717,.6192,.76],[.4681,.6154,.7594],[.4646,.6116,.7588],[.4611,.6078,.7582],[.4577,.6039,.7576],[.4544,.6001,.757],[.4512,.5962,.7564],[.448,.5924,.7557],[.4449,.5885,.7551],[.4419,.5846,.7545],[.439,.5807,.7539],[.4361,.5768,.7533],[.4333,.5729,.7527],[.4306,.5689,.752],[.4279,.565,.7514],[.4253,.561,.7508],[.4228,.557,.7501],[.4204,.553,.7494],[.418,.549,.7488],[.4157,.5449,.7481],[.4135,.5409,.7474],[.4114,.5368,.7467],[.4093,.5328,.746],[.4073,.5287,.7452],[.4053,.5246,.7445],[.4035,.5205,.7437],[.4017,.5164,.743],[.3999,.5122,.7422],[.3983,.5081,.7414],[.3967,.5039,.7405],[.3951,.4997,.7397],[.3937,.4955,.7388],[.3923,.4913,.7379],[.3909,.4871,.737],[.3896,.4828,.736],[.3884,.4786,.7351],[.3872,.4743,.7341],[.3861,.47,.7331],[.3851,.4657,.732],[.3841,.4614,.7309],[.3831,.4571,.7298],[.3822,.4527,.7287],[.3814,.4484,.7276],[.3806,.444,.7264],[.3798,.4396,.7251],[.3791,.4352,.7239],[.3784,.4308,.7226],[.3778,.4264,.7213],[.3772,.4219,.7199],[.3766,.4175,.7185],[.3761,.413,.7171],[.3756,.4086,.7156],[.3751,.4041,.7141],[.3747,.3996,.7126],[.3743,.395,.711],[.3739,.3905,.7094],[.3736,.386,.7077],[.3732,.3814,.706],[.3729,.3768,.7042],[.3726,.3723,.7024],[.3724,.3677,.7006],[.3721,.3631,.6987],[.3719,.3584,.6968],[.3716,.3538,.6948],[.3714,.3492,.6927],[.3712,.3445,.6907],[.3709,.3399,.6885],[.3707,.3352,.6863],[.3705,.3305,.6841],[.3703,.3258,.6818],[.3701,.3211,.6794],[.3699,.3164,.677],[.3697,.3117,.6746],[.3694,.3069,.6721],[.3692,.3022,.6695],[.369,.2974,.6668],[.3687,.2927,.6641],[.3684,.2879,.6613],[.3681,.2832,.6585],[.3678,.2784,.6556],[.3675,.2736,.6526],[.3672,.2688,.6496],[.3668,.264,.6465],[.3664,.2593,.6433],[.366,.2545,.64],[.3656,.2497,.6367],[.3651,.2449,.6333],[.3646,.2401,.6298],[.3641,.2354,.6262],[.3635,.2306,.6225],[.3629,.2258,.6188],[.3622,.2211,.615],[.3615,.2164,.611],[.3608,.2116,.607],[.36,.2069,.6029],[.3592,.2023,.5987],[.3583,.1976,.5944],[.3574,.193,.59],[.3564,.1884,.5855],[.3554,.1838,.5809],[.3543,.1793,.5762],[.3531,.1748,.5714],[.3519,.1703,.5665],[.3506,.166,.5615],[.3492,.1616,.5563],[.3478,.1573,.5511],[.3463,.1531,.5458],[.3447,.149,.5403],[.3431,.1449,.5347],[.3414,.1409,.5291],[.3395,.137,.5233],[.3376,.1332,.5174],[.3357,.1295,.5114],[.3336,.1259,.5054],[.3315,.1224,.4992],[.3292,.1191,.4929],[.3269,.1158,.4866],[.3245,.1126,.4802],[.322,.1096,.4737],[.3195,.1067,.4671],[.3168,.1039,.4605],[.3141,.1012,.4539],[.3113,.0987,.4472],[.3084,.0963,.4405],[.3055,.094,.4337],[.3025,.0918,.427],[.2994,.0897,.4202],[.2963,.0877,.4135],[.2931,.0859,.4067],[.2899,.0841,.4],[.2867,.0824,.3933],[.2834,.0809,.3867],[.2801,.0794,.3801],[.2768,.078,.3735],[.2734,.0767,.367],[.2701,.0755,.3606],[.2667,.0743,.3542],[.2634,.0733,.3479],[.26,.0723,.3417],[.2567,.0714,.3356],[.2534,.0705,.3296],[.2501,.0698,.3237],[.2469,.0691,.3179],[.2437,.0684,.3122],[.2405,.0679,.3066],[.2374,.0674,.3011],[.2343,.0669,.2957],[.2313,.0666,.2905],[.2284,.0663,.2854],[.2255,.0661,.2804],[.2227,.0659,.2756],[.22,.0659,.2709],[.2174,.0659,.2663],[.2148,.0659,.2619],[.2124,.0661,.2577],[.21,.0663,.2535],[.2077,.0666,.2495],[.2056,.067,.2457],[.2035,.0674,.2421],[.2016,.068,.2385],[.1997,.0686,.2352],[.1979,.0693,.2319],[.1961,.0703,.2287],[.1941,.0716,.2256],[.192,.0732,.2224],[.1898,.075,.2193],[.1874,.0771,.2162],[.1849,.0794,.2131],[.1877,.0773,.2139],[.1905,.0753,.2147],[.1932,.0736,.2154],[.1957,.0722,.2162],[.1982,.071,.2169],[.2006,.0701,.2176],[.2029,.0694,.2183],[.2053,.0689,.2191],[.2079,.0685,.22],[.2105,.0681,.221],[.2133,.0678,.2221],[.2163,.0676,.2232],[.2193,.0675,.2245],[.2225,.0674,.2259],[.2258,.0674,.2273],[.2292,.0674,.2288],[.2327,.0676,.2304],[.2363,.0677,.232],[.24,.068,.2337],[.2438,.0683,.2355],[.2477,.0687,.2373],[.2517,.0691,.2392],[.2558,.0695,.2411],[.26,.0701,.2431],[.2643,.0706,.2451],[.2686,.0712,.2471],[.273,.0719,.2492],[.2775,.0726,.2512],[.282,.0733,.2533],[.2866,.0741,.2554],[.2913,.0749,.2576],[.296,.0757,.2597],[.3008,.0766,.2618],[.3056,.0775,.2639],[.3105,.0785,.266],[.3154,.0794,.2681],[.3203,.0804,.2702],[.3253,.0814,.2723],[.3303,.0825,.2743],[.3353,.0835,.2763],[.3404,.0846,.2783],[.3455,.0857,.2803],[.3506,.0869,.2822],[.3557,.088,.2841],[.3609,.0892,.2859],[.3661,.0904,.2877],[.3712,.0917,.2895],[.3764,.0929,.2912],[.3816,.0942,.2928],[.3868,.0956,.2944],[.392,.0969,.296],[.3972,.0983,.2974],[.4024,.0997,.2989],[.4076,.1012,.3002],[.4128,.1027,.3015],[.418,.1042,.3028],[.4231,.1058,.304],[.4283,.1074,.3051],[.4334,.1091,.3061],[.4386,.1108,.3071],[.4437,.1125,.308],[.4488,.1144,.3089],[.4538,.1162,.3097],[.4589,.1181,.3104],[.4639,.1201,.3111],[.4689,.1222,.3117],[.4738,.1243,.3123],[.4788,.1264,.3127],[.4837,.1286,.3132],[.4885,.1309,.3135],[.4934,.1333,.3139],[.4981,.1357,.3141],[.5029,.1382,.3144],[.5076,.1407,.3145],[.5123,.1433,.3147],[.5169,.146,.3148],[.5215,.1487,.3148],[.526,.1515,.3148],[.5305,.1544,.3148],[.535,.1573,.3148],[.5394,.1602,.3147],[.5438,.1633,.3146],[.5481,.1664,.3145],[.5524,.1695,.3144],[.5566,.1727,.3142],[.5608,.1759,.3141],[.565,.1792,.3139],[.5691,.1826,.3137],[.5731,.186,.3136],[.5772,.1894,.3134],[.5811,.1929,.3132],[.5851,.1964,.3131],[.5889,.2,.3129],[.5928,.2036,.3127],[.5966,.2072,.3126],[.6004,.2109,.3124],[.6041,.2146,.3123],[.6078,.2184,.3122],[.6114,.2221,.3121],[.615,.2259,.3121],[.6186,.2298,.312],[.6221,.2337,.312],[.6256,.2376,.312],[.629,.2415,.312],[.6324,.2455,.312],[.6358,.2494,.3121],[.6391,.2535,.3122],[.6424,.2575,.3123],[.6457,.2616,.3125],[.6489,.2656,.3127],[.6521,.2697,.3129],[.6552,.2739,.3132],[.6583,.278,.3135],[.6614,.2822,.3138],[.6644,.2864,.3142],[.6674,.2906,.3146],[.6704,.2949,.315],[.6733,.2991,.3155],[.6762,.3034,.3161],[.6791,.3077,.3167],[.6819,.312,.3173],[.6847,.3163,.318],[.6874,.3207,.3187],[.6901,.3251,.3195],[.6928,.3295,.3203],[.6955,.3339,.3211],[.6981,.3383,.3221],[.7006,.3427,.3231],[.7032,.3472,.3241],[.7057,.3517,.3252],[.7081,.3561,.3263],[.7105,.3607,.3275],[.7129,.3652,.3288],[.7153,.3697,.3301],[.7176,.3743,.3315],[.7199,.3788,.333],[.7221,.3834,.3345],[.7243,.388,.3361],[.7265,.3926,.3377],[.7286,.3972,.3395],[.7307,.4019,.3412],[.7328,.4065,.3431],[.7348,.4112,.345],[.7368,.4159,.347],[.7388,.4205,.3491],[.7407,.4252,.3513],[.7426,.4299,.3535],[.7445,.4347,.3558],[.7463,.4394,.3582],[.748,.4441,.3607],[.7498,.4489,.3633],[.7515,.4536,.3659],[.7532,.4584,.3686],[.7548,.4632,.3714],[.7564,.468,.3743],[.758,.4728,.3773],[.7596,.4776,.3804],[.7611,.4824,.3835],[.7626,.4872,.3868],[.764,.492,.3901],[.7655,.4968,.3935],[.7669,.5017,.397],[.7682,.5065,.4006],[.7696,.5113,.4043],[.7709,.5162,.4081],[.7722,.521,.412],[.7734,.5259,.4159],[.7747,.5307,.42],[.7759,.5355,.4241],[.7771,.5404,.4284],[.7783,.5452,.4327],[.7795,.5501,.4371],[.7806,.5549,.4416],[.7817,.5598,.4462],[.7829,.5646,.4509],[.784,.5694,.4557],[.7851,.5742,.4606],[.7862,.5791,.4655],[.7872,.5839,.4706],[.7883,.5887,.4757],[.7894,.5935,.4809],[.7905,.5983,.4862],[.7915,.6031,.4916],[.7926,.6078,.4971],[.7937,.6126,.5026],[.7948,.6174,.5082],[.7958,.6221,.5139],[.7969,.6268,.5196],[.798,.6316,.5255],[.7992,.6363,.5313],[.8003,.641,.5373],[.8014,.6457,.5433],[.8026,.6503,.5494],[.8038,.655,.5556],[.805,.6596,.5618],[.8062,.6643,.568],[.8075,.6689,.5743],[.8087,.6735,.5807],[.81,.678,.5871],[.8114,.6826,.5936],[.8127,.6871,.6001],[.8141,.6916,.6066],[.8155,.6961,.6132],[.8169,.7006,.6198],[.8184,.7051,.6264],[.8199,.7095,.633],[.8214,.7139,.6397],[.8229,.7183,.6464],[.8245,.7226,.6531],[.8261,.727,.6599],[.8278,.7313,.6666],[.8294,.7355,.6733],[.8311,.7398,.6801],[.8328,.744,.6868],[.8346,.7481,.6936],[.8363,.7523,.7003],[.8381,.7564,.707],[.8399,.7604,.7137],[.8417,.7644,.7203],[.8435,.7684,.727],[.8453,.7723,.7336],[.8471,.7761,.7401],[.8489,.7799,.7466],[.8507,.7837,.7531],[.8525,.7873,.7595],[.8543,.791,.7658],[.856,.7945,.7721],[.8578,.798,.7783],[.8594,.8014,.7844],[.8611,.8048,.7904],[.8627,.8081,.7963],[.8642,.8112,.802],[.8656,.8144,.8077],[.8671,.8174,.8131],[.8684,.8203,.8184],[.8697,.8231,.8235],[.8709,.8259,.8284],[.8722,.8285,.833],[.8734,.831,.8375],[.8745,.8333,.8417],[.8757,.8355,.8458],[.8769,.8376,.8496],[.878,.8395,.8533],[.8791,.8413,.8569],[.8802,.8429,.8603],[.8812,.8443,.8636],[.8821,.8456,.8667],[.883,.8467,.8698],[.8837,.8476,.8727],[.8843,.8484,.8756],[.8849,.8491,.8783],[.8853,.8496,.8809],[.8855,.8499,.8834],[.8857,.85,.8857]]};ce.twilight_shifted={interpolate:!0,colors:[[.1874,.0771,.2162],[.1898,.075,.2193],[.192,.0732,.2224],[.1941,.0716,.2256],[.1961,.0703,.2287],[.1979,.0693,.2319],[.1997,.0686,.2352],[.2016,.068,.2385],[.2035,.0674,.2421],[.2056,.067,.2457],[.2077,.0666,.2495],[.21,.0663,.2535],[.2124,.0661,.2577],[.2148,.0659,.2619],[.2174,.0659,.2663],[.22,.0659,.2709],[.2227,.0659,.2756],[.2255,.0661,.2804],[.2284,.0663,.2854],[.2313,.0666,.2905],[.2343,.0669,.2957],[.2374,.0674,.3011],[.2405,.0679,.3066],[.2437,.0684,.3122],[.2469,.0691,.3179],[.2501,.0698,.3237],[.2534,.0705,.3296],[.2567,.0714,.3356],[.26,.0723,.3417],[.2634,.0733,.3479],[.2667,.0743,.3542],[.2701,.0755,.3606],[.2734,.0767,.367],[.2768,.078,.3735],[.2801,.0794,.3801],[.2834,.0809,.3867],[.2867,.0824,.3933],[.2899,.0841,.4],[.2931,.0859,.4067],[.2963,.0877,.4135],[.2994,.0897,.4202],[.3025,.0918,.427],[.3055,.094,.4337],[.3084,.0963,.4405],[.3113,.0987,.4472],[.3141,.1012,.4539],[.3168,.1039,.4605],[.3195,.1067,.4671],[.322,.1096,.4737],[.3245,.1126,.4802],[.3269,.1158,.4866],[.3292,.1191,.4929],[.3315,.1224,.4992],[.3336,.1259,.5054],[.3357,.1295,.5114],[.3376,.1332,.5174],[.3395,.137,.5233],[.3414,.1409,.5291],[.3431,.1449,.5347],[.3447,.149,.5403],[.3463,.1531,.5458],[.3478,.1573,.5511],[.3492,.1616,.5563],[.3506,.166,.5615],[.3519,.1703,.5665],[.3531,.1748,.5714],[.3543,.1793,.5762],[.3554,.1838,.5809],[.3564,.1884,.5855],[.3574,.193,.59],[.3583,.1976,.5944],[.3592,.2023,.5987],[.36,.2069,.6029],[.3608,.2116,.607],[.3615,.2164,.611],[.3622,.2211,.615],[.3629,.2258,.6188],[.3635,.2306,.6225],[.3641,.2354,.6262],[.3646,.2401,.6298],[.3651,.2449,.6333],[.3656,.2497,.6367],[.366,.2545,.64],[.3664,.2593,.6433],[.3668,.264,.6465],[.3672,.2688,.6496],[.3675,.2736,.6526],[.3678,.2784,.6556],[.3681,.2832,.6585],[.3684,.2879,.6613],[.3687,.2927,.6641],[.369,.2974,.6668],[.3692,.3022,.6695],[.3694,.3069,.6721],[.3697,.3117,.6746],[.3699,.3164,.677],[.3701,.3211,.6794],[.3703,.3258,.6818],[.3705,.3305,.6841],[.3707,.3352,.6863],[.3709,.3399,.6885],[.3712,.3445,.6907],[.3714,.3492,.6927],[.3716,.3538,.6948],[.3719,.3584,.6968],[.3721,.3631,.6987],[.3724,.3677,.7006],[.3726,.3723,.7024],[.3729,.3768,.7042],[.3732,.3814,.706],[.3736,.386,.7077],[.3739,.3905,.7094],[.3743,.395,.711],[.3747,.3996,.7126],[.3751,.4041,.7141],[.3756,.4086,.7156],[.3761,.413,.7171],[.3766,.4175,.7185],[.3772,.4219,.7199],[.3778,.4264,.7213],[.3784,.4308,.7226],[.3791,.4352,.7239],[.3798,.4396,.7251],[.3806,.444,.7264],[.3814,.4484,.7276],[.3822,.4527,.7287],[.3831,.4571,.7298],[.3841,.4614,.7309],[.3851,.4657,.732],[.3861,.47,.7331],[.3872,.4743,.7341],[.3884,.4786,.7351],[.3896,.4828,.736],[.3909,.4871,.737],[.3923,.4913,.7379],[.3937,.4955,.7388],[.3951,.4997,.7397],[.3967,.5039,.7405],[.3983,.5081,.7414],[.3999,.5122,.7422],[.4017,.5164,.743],[.4035,.5205,.7437],[.4053,.5246,.7445],[.4073,.5287,.7452],[.4093,.5328,.746],[.4114,.5368,.7467],[.4135,.5409,.7474],[.4157,.5449,.7481],[.418,.549,.7488],[.4204,.553,.7494],[.4228,.557,.7501],[.4253,.561,.7508],[.4279,.565,.7514],[.4306,.5689,.752],[.4333,.5729,.7527],[.4361,.5768,.7533],[.439,.5807,.7539],[.4419,.5846,.7545],[.4449,.5885,.7551],[.448,.5924,.7557],[.4512,.5962,.7564],[.4544,.6001,.757],[.4577,.6039,.7576],[.4611,.6078,.7582],[.4646,.6116,.7588],[.4681,.6154,.7594],[.4717,.6192,.76],[.4753,.6229,.7607],[.4791,.6267,.7613],[.4829,.6304,.7619],[.4867,.6342,.7626],[.4907,.6379,.7632],[.4947,.6416,.7639],[.4987,.6453,.7645],[.5029,.649,.7652],[.5071,.6526,.7659],[.5114,.6563,.7666],[.5157,.6599,.7673],[.5201,.6636,.7681],[.5246,.6672,.7688],[.5291,.6708,.7696],[.5337,.6744,.7703],[.5383,.678,.7711],[.5431,.6815,.7719],[.5478,.6851,.7728],[.5527,.6886,.7736],[.5576,.6922,.7745],[.5626,.6957,.7754],[.5676,.6992,.7763],[.5727,.7027,.7773],[.5778,.7061,.7783],[.583,.7096,.7793],[.5883,.713,.7803],[.5936,.7165,.7814],[.599,.7199,.7825],[.6044,.7233,.7836],[.6099,.7267,.7847],[.6154,.73,.786],[.621,.7334,.7872],[.6266,.7367,.7885],[.6323,.74,.7898],[.638,.7433,.7912],[.6438,.7466,.7926],[.6496,.7499,.794],[.6554,.7531,.7955],[.6613,.7563,.797],[.6672,.7595,.7986],[.6731,.7627,.8003],[.6791,.7658,.802],[.6851,.769,.8037],[.691,.7721,.8055],[.697,.7752,.8073],[.703,.7782,.8092],[.709,.7813,.8111],[.715,.7843,.8131],[.721,.7872,.8151],[.7269,.7902,.8172],[.7328,.7931,.8193],[.7387,.796,.8214],[.7446,.7988,.8236],[.7504,.8016,.8258],[.7562,.8044,.828],[.7619,.8071,.8303],[.7675,.8098,.8325],[.7731,.8124,.8348],[.7786,.815,.8371],[.784,.8176,.8394],[.7893,.82,.8416],[.7945,.8225,.8439],[.7997,.8248,.8462],[.8047,.8271,.8484],[.8096,.8293,.8506],[.8144,.8315,.8528],[.819,.8335,.855],[.8236,.8355,.8571],[.828,.8374,.8592],[.8322,.8392,.8613],[.8363,.8409,.8633],[.8403,.8426,.8653],[.8441,.8441,.8672],[.8478,.8455,.869],[.8513,.8467,.8709],[.8547,.8479,.8726],[.858,.8489,.8743],[.8611,.8498,.876],[.8641,.8505,.8776],[.867,.8511,.8791],[.8697,.8515,.8805],[.8723,.8518,.8819],[.8749,.8519,.8832],[.8772,.8519,.8843],[.8795,.8517,.8854],[.8817,.8513,.8864],[.8838,.8507,.8872],[.8858,.85,.888],[.8857,.85,.8857],[.8855,.8499,.8834],[.8853,.8496,.8809],[.8849,.8491,.8783],[.8843,.8484,.8756],[.8837,.8476,.8727],[.883,.8467,.8698],[.8821,.8456,.8667],[.8812,.8443,.8636],[.8802,.8429,.8603],[.8791,.8413,.8569],[.878,.8395,.8533],[.8769,.8376,.8496],[.8757,.8355,.8458],[.8745,.8333,.8417],[.8734,.831,.8375],[.8722,.8285,.833],[.8709,.8259,.8284],[.8697,.8231,.8235],[.8684,.8203,.8184],[.8671,.8174,.8131],[.8656,.8144,.8077],[.8642,.8112,.802],[.8627,.8081,.7963],[.8611,.8048,.7904],[.8594,.8014,.7844],[.8578,.798,.7783],[.856,.7945,.7721],[.8543,.791,.7658],[.8525,.7873,.7595],[.8507,.7837,.7531],[.8489,.7799,.7466],[.8471,.7761,.7401],[.8453,.7723,.7336],[.8435,.7684,.727],[.8417,.7644,.7203],[.8399,.7604,.7137],[.8381,.7564,.707],[.8363,.7523,.7003],[.8346,.7481,.6936],[.8328,.744,.6868],[.8311,.7398,.6801],[.8294,.7355,.6733],[.8278,.7313,.6666],[.8261,.727,.6599],[.8245,.7226,.6531],[.8229,.7183,.6464],[.8214,.7139,.6397],[.8199,.7095,.633],[.8184,.7051,.6264],[.8169,.7006,.6198],[.8155,.6961,.6132],[.8141,.6916,.6066],[.8127,.6871,.6001],[.8114,.6826,.5936],[.81,.678,.5871],[.8087,.6735,.5807],[.8075,.6689,.5743],[.8062,.6643,.568],[.805,.6596,.5618],[.8038,.655,.5556],[.8026,.6503,.5494],[.8014,.6457,.5433],[.8003,.641,.5373],[.7992,.6363,.5313],[.798,.6316,.5255],[.7969,.6268,.5196],[.7958,.6221,.5139],[.7948,.6174,.5082],[.7937,.6126,.5026],[.7926,.6078,.4971],[.7915,.6031,.4916],[.7905,.5983,.4862],[.7894,.5935,.4809],[.7883,.5887,.4757],[.7872,.5839,.4706],[.7862,.5791,.4655],[.7851,.5742,.4606],[.784,.5694,.4557],[.7829,.5646,.4509],[.7817,.5598,.4462],[.7806,.5549,.4416],[.7795,.5501,.4371],[.7783,.5452,.4327],[.7771,.5404,.4284],[.7759,.5355,.4241],[.7747,.5307,.42],[.7734,.5259,.4159],[.7722,.521,.412],[.7709,.5162,.4081],[.7696,.5113,.4043],[.7682,.5065,.4006],[.7669,.5017,.397],[.7655,.4968,.3935],[.764,.492,.3901],[.7626,.4872,.3868],[.7611,.4824,.3835],[.7596,.4776,.3804],[.758,.4728,.3773],[.7564,.468,.3743],[.7548,.4632,.3714],[.7532,.4584,.3686],[.7515,.4536,.3659],[.7498,.4489,.3633],[.748,.4441,.3607],[.7463,.4394,.3582],[.7445,.4347,.3558],[.7426,.4299,.3535],[.7407,.4252,.3513],[.7388,.4205,.3491],[.7368,.4159,.347],[.7348,.4112,.345],[.7328,.4065,.3431],[.7307,.4019,.3412],[.7286,.3972,.3395],[.7265,.3926,.3377],[.7243,.388,.3361],[.7221,.3834,.3345],[.7199,.3788,.333],[.7176,.3743,.3315],[.7153,.3697,.3301],[.7129,.3652,.3288],[.7105,.3607,.3275],[.7081,.3561,.3263],[.7057,.3517,.3252],[.7032,.3472,.3241],[.7006,.3427,.3231],[.6981,.3383,.3221],[.6955,.3339,.3211],[.6928,.3295,.3203],[.6901,.3251,.3195],[.6874,.3207,.3187],[.6847,.3163,.318],[.6819,.312,.3173],[.6791,.3077,.3167],[.6762,.3034,.3161],[.6733,.2991,.3155],[.6704,.2949,.315],[.6674,.2906,.3146],[.6644,.2864,.3142],[.6614,.2822,.3138],[.6583,.278,.3135],[.6552,.2739,.3132],[.6521,.2697,.3129],[.6489,.2656,.3127],[.6457,.2616,.3125],[.6424,.2575,.3123],[.6391,.2535,.3122],[.6358,.2494,.3121],[.6324,.2455,.312],[.629,.2415,.312],[.6256,.2376,.312],[.6221,.2337,.312],[.6186,.2298,.312],[.615,.2259,.3121],[.6114,.2221,.3121],[.6078,.2184,.3122],[.6041,.2146,.3123],[.6004,.2109,.3124],[.5966,.2072,.3126],[.5928,.2036,.3127],[.5889,.2,.3129],[.5851,.1964,.3131],[.5811,.1929,.3132],[.5772,.1894,.3134],[.5731,.186,.3136],[.5691,.1826,.3137],[.565,.1792,.3139],[.5608,.1759,.3141],[.5566,.1727,.3142],[.5524,.1695,.3144],[.5481,.1664,.3145],[.5438,.1633,.3146],[.5394,.1602,.3147],[.535,.1573,.3148],[.5305,.1544,.3148],[.526,.1515,.3148],[.5215,.1487,.3148],[.5169,.146,.3148],[.5123,.1433,.3147],[.5076,.1407,.3145],[.5029,.1382,.3144],[.4981,.1357,.3141],[.4934,.1333,.3139],[.4885,.1309,.3135],[.4837,.1286,.3132],[.4788,.1264,.3127],[.4738,.1243,.3123],[.4689,.1222,.3117],[.4639,.1201,.3111],[.4589,.1181,.3104],[.4538,.1162,.3097],[.4488,.1144,.3089],[.4437,.1125,.308],[.4386,.1108,.3071],[.4334,.1091,.3061],[.4283,.1074,.3051],[.4231,.1058,.304],[.418,.1042,.3028],[.4128,.1027,.3015],[.4076,.1012,.3002],[.4024,.0997,.2989],[.3972,.0983,.2974],[.392,.0969,.296],[.3868,.0956,.2944],[.3816,.0942,.2928],[.3764,.0929,.2912],[.3712,.0917,.2895],[.3661,.0904,.2877],[.3609,.0892,.2859],[.3557,.088,.2841],[.3506,.0869,.2822],[.3455,.0857,.2803],[.3404,.0846,.2783],[.3353,.0835,.2763],[.3303,.0825,.2743],[.3253,.0814,.2723],[.3203,.0804,.2702],[.3154,.0794,.2681],[.3105,.0785,.266],[.3056,.0775,.2639],[.3008,.0766,.2618],[.296,.0757,.2597],[.2913,.0749,.2576],[.2866,.0741,.2554],[.282,.0733,.2533],[.2775,.0726,.2512],[.273,.0719,.2492],[.2686,.0712,.2471],[.2643,.0706,.2451],[.26,.0701,.2431],[.2558,.0695,.2411],[.2517,.0691,.2392],[.2477,.0687,.2373],[.2438,.0683,.2355],[.24,.068,.2337],[.2363,.0677,.232],[.2327,.0676,.2304],[.2292,.0674,.2288],[.2258,.0674,.2273],[.2225,.0674,.2259],[.2193,.0675,.2245],[.2163,.0676,.2232],[.2133,.0678,.2221],[.2105,.0681,.221],[.2079,.0685,.22],[.2053,.0689,.2191],[.2029,.0694,.2183],[.2006,.0701,.2176],[.1982,.071,.2169],[.1957,.0722,.2162],[.1932,.0736,.2154],[.1905,.0753,.2147],[.1877,.0773,.2139],[.1849,.0794,.2131]]};ce.viridis={interpolate:!0,colors:[[.267,.0049,.3294],[.2685,.0096,.3354],[.2699,.0146,.3414],[.2713,.0199,.3473],[.2726,.0256,.3531],[.2738,.0315,.3589],[.275,.0378,.3645],[.276,.0442,.3702],[.277,.0503,.3757],[.2779,.0563,.3812],[.2788,.0621,.3866],[.2796,.0678,.3919],[.2803,.0734,.3972],[.2809,.0789,.4023],[.2814,.0843,.4074],[.2819,.0897,.4124],[.2823,.095,.4173],[.2827,.1002,.4222],[.2829,.1054,.4269],[.2831,.1106,.4316],[.2832,.1157,.4361],[.2832,.1208,.4406],[.2832,.1258,.445],[.2831,.1309,.4492],[.2829,.1359,.4534],[.2826,.1409,.4575],[.2823,.1459,.4615],[.2819,.1509,.4654],[.2814,.1558,.4692],[.2809,.1608,.4729],[.2803,.1657,.4765],[.2796,.1706,.48],[.2788,.1755,.4834],[.278,.1804,.4867],[.2771,.1852,.4899],[.2762,.1901,.493],[.2752,.1949,.496],[.2741,.1997,.4989],[.273,.2045,.5017],[.2718,.2093,.5044],[.2706,.2141,.5071],[.2693,.2188,.5096],[.268,.2235,.512],[.2666,.2283,.5143],[.2651,.233,.5166],[.2637,.2376,.5188],[.2621,.2423,.5208],[.2606,.2469,.5228],[.259,.2515,.5247],[.2573,.2561,.5266],[.2556,.2607,.5283],[.2539,.2653,.53],[.2522,.2698,.5316],[.2504,.2743,.5331],[.2486,.2788,.5346],[.2468,.2832,.5359],[.245,.2877,.5373],[.2431,.2921,.5385],[.2412,.2965,.5397],[.2393,.3009,.5408],[.2374,.3052,.5419],[.2355,.3095,.5429],[.2336,.3138,.5439],[.2317,.3181,.5448],[.2297,.3224,.5457],[.2278,.3266,.5465],[.2259,.3308,.5473],[.2239,.335,.5481],[.222,.3392,.5488],[.2201,.3433,.5494],[.2181,.3474,.55],[.2162,.3515,.5506],[.2143,.3556,.5512],[.2124,.3597,.5517],[.2105,.3637,.5522],[.2086,.3678,.5527],[.2068,.3718,.5531],[.2049,.3757,.5535],[.2031,.3797,.5539],[.2012,.3837,.5543],[.1994,.3876,.5546],[.1976,.3915,.555],[.1959,.3954,.5553],[.1941,.3993,.5556],[.1924,.4032,.5558],[.1906,.4071,.5561],[.1889,.4109,.5563],[.1872,.4147,.5565],[.1856,.4186,.5568],[.1839,.4224,.5569],[.1823,.4262,.5571],[.1806,.43,.5573],[.179,.4338,.5574],[.1774,.4375,.5576],[.1758,.4413,.5577],[.1743,.445,.5578],[.1727,.4488,.5579],[.1712,.4525,.558],[.1696,.4563,.558],[.1681,.46,.5581],[.1666,.4637,.5581],[.1651,.4674,.5581],[.1636,.4711,.5581],[.1621,.4748,.5581],[.1607,.4785,.5581],[.1592,.4822,.5581],[.1577,.4859,.558],[.1563,.4896,.5579],[.1548,.4933,.5578],[.1534,.497,.5577],[.1519,.5007,.5576],[.1505,.5044,.5574],[.149,.5081,.5572],[.1476,.5117,.557],[.1462,.5154,.5568],[.1448,.5191,.5566],[.1433,.5228,.5563],[.1419,.5265,.556],[.1405,.5301,.5557],[.1391,.5338,.5553],[.1378,.5375,.5549],[.1364,.5412,.5545],[.1351,.5449,.554],[.1337,.5485,.5535],[.1324,.5522,.553],[.1312,.5559,.5525],[.1299,.5596,.5519],[.1287,.5633,.5512],[.1276,.5669,.5506],[.1265,.5706,.5498],[.1254,.5743,.5491],[.1244,.578,.5483],[.1235,.5817,.5474],[.1226,.5854,.5466],[.1218,.5891,.5456],[.1211,.5927,.5446],[.1206,.5964,.5436],[.1201,.6001,.5425],[.1197,.6038,.5414],[.1195,.6075,.5402],[.1194,.6111,.539],[.1195,.6148,.5377],[.1197,.6185,.5363],[.1201,.6222,.5349],[.1206,.6258,.5335],[.1214,.6295,.532],[.1223,.6332,.5304],[.1234,.6368,.5288],[.1248,.6405,.5271],[.1263,.6441,.5253],[.1281,.6477,.5235],[.1301,.6514,.5216],[.1323,.655,.5197],[.1347,.6586,.5176],[.1373,.6623,.5156],[.1402,.6659,.5134],[.1433,.6695,.5112],[.1466,.673,.5089],[.1501,.6766,.5066],[.1539,.6802,.5042],[.1579,.6838,.5017],[.162,.6873,.4991],[.1664,.6909,.4965],[.1709,.6944,.4938],[.1757,.6979,.491],[.1807,.7014,.4882],[.1858,.7049,.4853],[.1911,.7084,.4823],[.1966,.7118,.4792],[.2022,.7153,.4761],[.208,.7187,.4729],[.214,.7221,.4696],[.2201,.7255,.4662],[.2264,.7289,.4628],[.2328,.7322,.4593],[.2394,.7356,.4557],[.2461,.7389,.452],[.2529,.7422,.4483],[.2599,.7455,.4445],[.2669,.7488,.4406],[.2741,.752,.4366],[.2815,.7552,.4326],[.2889,.7584,.4284],[.2965,.7616,.4242],[.3041,.7647,.4199],[.3119,.7678,.4156],[.3198,.7709,.4112],[.3278,.774,.4066],[.3359,.777,.402],[.3441,.78,.3974],[.3524,.783,.3926],[.3607,.786,.3878],[.3692,.7889,.3829],[.3778,.7918,.3779],[.3864,.7946,.3729],[.3952,.7975,.3678],[.404,.8003,.3626],[.4129,.803,.3573],[.4219,.8058,.3519],[.431,.8085,.3465],[.4401,.8111,.341],[.4494,.8138,.3354],[.4587,.8164,.3297],[.4681,.8189,.324],[.4775,.8214,.3182],[.487,.8239,.3123],[.4966,.8264,.3064],[.5063,.8288,.3004],[.516,.8312,.2943],[.5258,.8335,.2881],[.5356,.8358,.2819],[.5455,.838,.2756],[.5555,.8403,.2693],[.5655,.8424,.2629],[.5756,.8446,.2564],[.5857,.8467,.2499],[.5958,.8487,.2433],[.606,.8507,.2367],[.6163,.8527,.2301],[.6266,.8546,.2234],[.6369,.8565,.2166],[.6473,.8584,.2099],[.6576,.8602,.2031],[.6681,.862,.1963],[.6785,.8637,.1895],[.6889,.8654,.1827],[.6994,.8671,.176],[.7099,.8688,.1693],[.7204,.8704,.1626],[.7309,.8719,.156],[.7414,.8734,.1496],[.7519,.875,.1432],[.7624,.8764,.1371],[.7729,.8779,.1311],[.7833,.8793,.1254],[.7938,.8807,.12],[.8042,.882,.115],[.8146,.8834,.1103],[.8249,.8847,.1062],[.8353,.886,.1026],[.8456,.8873,.0997],[.8558,.8886,.0975],[.866,.8899,.096],[.8762,.8911,.0952],[.8863,.8924,.0954],[.8963,.8936,.0963],[.9063,.8949,.0981],[.9162,.8961,.1007],[.9261,.8973,.1041],[.9359,.8986,.1081],[.9456,.8998,.1128],[.9553,.9011,.1181],[.9649,.9023,.1239],[.9744,.9036,.1302],[.9839,.9049,.1369],[.9932,.9062,.1439]]};ce.winter={interpolate:!0,colors:[[0,0,1],[0,.0039,.998],[0,.0078,.9961],[0,.0118,.9941],[0,.0157,.9922],[0,.0196,.9902],[0,.0235,.9882],[0,.0275,.9863],[0,.0314,.9843],[0,.0353,.9824],[0,.0392,.9804],[0,.0431,.9784],[0,.0471,.9765],[0,.051,.9745],[0,.0549,.9725],[0,.0588,.9706],[0,.0627,.9686],[0,.0667,.9667],[0,.0706,.9647],[0,.0745,.9627],[0,.0784,.9608],[0,.0824,.9588],[0,.0863,.9569],[0,.0902,.9549],[0,.0941,.9529],[0,.098,.951],[0,.102,.949],[0,.1059,.9471],[0,.1098,.9451],[0,.1137,.9431],[0,.1176,.9412],[0,.1216,.9392],[0,.1255,.9373],[0,.1294,.9353],[0,.1333,.9333],[0,.1373,.9314],[0,.1412,.9294],[0,.1451,.9275],[0,.149,.9255],[0,.1529,.9235],[0,.1569,.9216],[0,.1608,.9196],[0,.1647,.9176],[0,.1686,.9157],[0,.1725,.9137],[0,.1765,.9118],[0,.1804,.9098],[0,.1843,.9078],[0,.1882,.9059],[0,.1922,.9039],[0,.1961,.902],[0,.2,.9],[0,.2039,.898],[0,.2078,.8961],[0,.2118,.8941],[0,.2157,.8922],[0,.2196,.8902],[0,.2235,.8882],[0,.2275,.8863],[0,.2314,.8843],[0,.2353,.8824],[0,.2392,.8804],[0,.2431,.8784],[0,.2471,.8765],[0,.251,.8745],[0,.2549,.8725],[0,.2588,.8706],[0,.2627,.8686],[0,.2667,.8667],[0,.2706,.8647],[0,.2745,.8627],[0,.2784,.8608],[0,.2824,.8588],[0,.2863,.8569],[0,.2902,.8549],[0,.2941,.8529],[0,.298,.851],[0,.302,.849],[0,.3059,.8471],[0,.3098,.8451],[0,.3137,.8431],[0,.3176,.8412],[0,.3216,.8392],[0,.3255,.8373],[0,.3294,.8353],[0,.3333,.8333],[0,.3373,.8314],[0,.3412,.8294],[0,.3451,.8275],[0,.349,.8255],[0,.3529,.8235],[0,.3569,.8216],[0,.3608,.8196],[0,.3647,.8176],[0,.3686,.8157],[0,.3725,.8137],[0,.3765,.8118],[0,.3804,.8098],[0,.3843,.8078],[0,.3882,.8059],[0,.3922,.8039],[0,.3961,.802],[0,.4,.8],[0,.4039,.798],[0,.4078,.7961],[0,.4118,.7941],[0,.4157,.7922],[0,.4196,.7902],[0,.4235,.7882],[0,.4275,.7863],[0,.4314,.7843],[0,.4353,.7824],[0,.4392,.7804],[0,.4431,.7784],[0,.4471,.7765],[0,.451,.7745],[0,.4549,.7725],[0,.4588,.7706],[0,.4627,.7686],[0,.4667,.7667],[0,.4706,.7647],[0,.4745,.7627],[0,.4784,.7608],[0,.4824,.7588],[0,.4863,.7569],[0,.4902,.7549],[0,.4941,.7529],[0,.498,.751],[0,.502,.749],[0,.5059,.7471],[0,.5098,.7451],[0,.5137,.7431],[0,.5176,.7412],[0,.5216,.7392],[0,.5255,.7373],[0,.5294,.7353],[0,.5333,.7333],[0,.5373,.7314],[0,.5412,.7294],[0,.5451,.7275],[0,.549,.7255],[0,.5529,.7235],[0,.5569,.7216],[0,.5608,.7196],[0,.5647,.7176],[0,.5686,.7157],[0,.5725,.7137],[0,.5765,.7118],[0,.5804,.7098],[0,.5843,.7078],[0,.5882,.7059],[0,.5922,.7039],[0,.5961,.702],[0,.6,.7],[0,.6039,.698],[0,.6078,.6961],[0,.6118,.6941],[0,.6157,.6922],[0,.6196,.6902],[0,.6235,.6882],[0,.6275,.6863],[0,.6314,.6843],[0,.6353,.6824],[0,.6392,.6804],[0,.6431,.6784],[0,.6471,.6765],[0,.651,.6745],[0,.6549,.6725],[0,.6588,.6706],[0,.6627,.6686],[0,.6667,.6667],[0,.6706,.6647],[0,.6745,.6627],[0,.6784,.6608],[0,.6824,.6588],[0,.6863,.6569],[0,.6902,.6549],[0,.6941,.6529],[0,.698,.651],[0,.702,.649],[0,.7059,.6471],[0,.7098,.6451],[0,.7137,.6431],[0,.7176,.6412],[0,.7216,.6392],[0,.7255,.6373],[0,.7294,.6353],[0,.7333,.6333],[0,.7373,.6314],[0,.7412,.6294],[0,.7451,.6275],[0,.749,.6255],[0,.7529,.6235],[0,.7569,.6216],[0,.7608,.6196],[0,.7647,.6176],[0,.7686,.6157],[0,.7725,.6137],[0,.7765,.6118],[0,.7804,.6098],[0,.7843,.6078],[0,.7882,.6059],[0,.7922,.6039],[0,.7961,.602],[0,.8,.6],[0,.8039,.598],[0,.8078,.5961],[0,.8118,.5941],[0,.8157,.5922],[0,.8196,.5902],[0,.8235,.5882],[0,.8275,.5863],[0,.8314,.5843],[0,.8353,.5824],[0,.8392,.5804],[0,.8431,.5784],[0,.8471,.5765],[0,.851,.5745],[0,.8549,.5725],[0,.8588,.5706],[0,.8627,.5686],[0,.8667,.5667],[0,.8706,.5647],[0,.8745,.5627],[0,.8784,.5608],[0,.8824,.5588],[0,.8863,.5569],[0,.8902,.5549],[0,.8941,.5529],[0,.898,.551],[0,.902,.549],[0,.9059,.5471],[0,.9098,.5451],[0,.9137,.5431],[0,.9176,.5412],[0,.9216,.5392],[0,.9255,.5373],[0,.9294,.5353],[0,.9333,.5333],[0,.9373,.5314],[0,.9412,.5294],[0,.9451,.5275],[0,.949,.5255],[0,.9529,.5235],[0,.9569,.5216],[0,.9608,.5196],[0,.9647,.5176],[0,.9686,.5157],[0,.9725,.5137],[0,.9765,.5118],[0,.9804,.5098],[0,.9843,.5078],[0,.9882,.5059],[0,.9922,.5039],[0,.9961,.502],[0,1,.5]]};function zs(r,e,t){let i=X0(e,t);if(!i)return 0;let{colors:s,stops:n}=Tp(i.colors,i.stops);return Eb(r,i.interpolate,s,n,i.reverse)}function Eb(r,e,t,i,s){return r=Math.clamp(r,0,1),s===!0&&(r=1-r),o7(e===!0?Sb(r,t,i):Cb(r,t,i))}function X0(r,e){if(r.startsWith("custom:")){if(r=r.slice(7),!(r in e.customColorMaps)){console.error("Custom colormap "+r+" does not exist!");return}let t=e.customColorMaps[r];return{colors:t.colors.map(i=>Ti(i).rgb),interpolate:t.interpolate,reverse:t.reverse,stops:t.stops}}else{let t=!1;if(r.endsWith("_r")&&(t=!0,r=r.substring(0,r.length-2)),!(r in ce)){console.error("Colormap "+r+" does not exist!");return}return{interpolate:ce[r].interpolate,reverse:t,colors:ce[r].colors.map(i=>Vn([i[0]*255,i[1]*255,i[2]*255]))}}}function Tp(r,e){if(e){if(e=e,e.length<r.length){let i=Math.clamp(e.last()||0,0,1),s=(1-i)/(r.length-1);e=e.concat(Array.from({length:r.length-e.length},(n,o)=>i+o*s))}}else e=Array.from({length:r.length},(i,s)=>s/(r.length-1));let t=r.map((i,s)=>({col:i,stop:e[s]})).sort((i,s)=>i.stop-s.stop);return{colors:t.map(i=>i.col),stops:t.map(i=>i.stop)}}function Sb(r,e,t){let i=t.findLastIndex(d=>d<=r);i===-1&&(i=0);let s=t.findIndex(d=>d>r);s===-1&&(s=e.length-1);let n=s===i?1:(r-t[i])/(t[s]-t[i]),o=e[i],a=e[s],l=$0(o)*(1-n)+$0(a)*n,c=q0(o)*(1-n)+q0(a)*n,h=Y0(o)*(1-n)+Y0(a)*n;return os(l,c,h)}function Cb(r,e,t){return e[Math.max(0,t.findLastIndex(i=>i<=r))]}function o7(r){let e=u.settings.interactivesBrightness[u.app.getTheme()==="moonstone"?"light":"dark"];return n7(r,e)}var hr=(r=>(r[r.WEBGL_LEGACY=0]="WEBGL_LEGACY",r[r.WEBGL=1]="WEBGL",r[r.WEBGL2=2]="WEBGL2",r))(hr||{}),_p=(r=>(r[r.UNKNOWN=0]="UNKNOWN",r[r.WEBGL=1]="WEBGL",r[r.CANVAS=2]="CANVAS",r))(_p||{}),xh=(r=>(r[r.COLOR=16384]="COLOR",r[r.DEPTH=256]="DEPTH",r[r.STENCIL=1024]="STENCIL",r))(xh||{}),ke=(r=>(r[r.NORMAL=0]="NORMAL",r[r.ADD=1]="ADD",r[r.MULTIPLY=2]="MULTIPLY",r[r.SCREEN=3]="SCREEN",r[r.OVERLAY=4]="OVERLAY",r[r.DARKEN=5]="DARKEN",r[r.LIGHTEN=6]="LIGHTEN",r[r.COLOR_DODGE=7]="COLOR_DODGE",r[r.COLOR_BURN=8]="COLOR_BURN",r[r.HARD_LIGHT=9]="HARD_LIGHT",r[r.SOFT_LIGHT=10]="SOFT_LIGHT",r[r.DIFFERENCE=11]="DIFFERENCE",r[r.EXCLUSION=12]="EXCLUSION",r[r.HUE=13]="HUE",r[r.SATURATION=14]="SATURATION",r[r.COLOR=15]="COLOR",r[r.LUMINOSITY=16]="LUMINOSITY",r[r.NORMAL_NPM=17]="NORMAL_NPM",r[r.ADD_NPM=18]="ADD_NPM",r[r.SCREEN_NPM=19]="SCREEN_NPM",r[r.NONE=20]="NONE",r[r.SRC_OVER=0]="SRC_OVER",r[r.SRC_IN=21]="SRC_IN",r[r.SRC_OUT=22]="SRC_OUT",r[r.SRC_ATOP=23]="SRC_ATOP",r[r.DST_OVER=24]="DST_OVER",r[r.DST_IN=25]="DST_IN",r[r.DST_OUT=26]="DST_OUT",r[r.DST_ATOP=27]="DST_ATOP",r[r.ERASE=26]="ERASE",r[r.SUBTRACT=28]="SUBTRACT",r[r.XOR=29]="XOR",r))(ke||{}),K0=(r=>(r[r.POINTS=0]="POINTS",r[r.LINES=1]="LINES",r[r.LINE_LOOP=2]="LINE_LOOP",r[r.LINE_STRIP=3]="LINE_STRIP",r[r.TRIANGLES=4]="TRIANGLES",r[r.TRIANGLE_STRIP=5]="TRIANGLE_STRIP",r[r.TRIANGLE_FAN=6]="TRIANGLE_FAN",r))(K0||{}),le=(r=>(r[r.RGBA=6408]="RGBA",r[r.RGB=6407]="RGB",r[r.RG=33319]="RG",r[r.RED=6403]="RED",r[r.RGBA_INTEGER=36249]="RGBA_INTEGER",r[r.RGB_INTEGER=36248]="RGB_INTEGER",r[r.RG_INTEGER=33320]="RG_INTEGER",r[r.RED_INTEGER=36244]="RED_INTEGER",r[r.ALPHA=6406]="ALPHA",r[r.LUMINANCE=6409]="LUMINANCE",r[r.LUMINANCE_ALPHA=6410]="LUMINANCE_ALPHA",r[r.DEPTH_COMPONENT=6402]="DEPTH_COMPONENT",r[r.DEPTH_STENCIL=34041]="DEPTH_STENCIL",r))(le||{}),ls=(r=>(r[r.TEXTURE_2D=3553]="TEXTURE_2D",r[r.TEXTURE_CUBE_MAP=34067]="TEXTURE_CUBE_MAP",r[r.TEXTURE_2D_ARRAY=35866]="TEXTURE_2D_ARRAY",r[r.TEXTURE_CUBE_MAP_POSITIVE_X=34069]="TEXTURE_CUBE_MAP_POSITIVE_X",r[r.TEXTURE_CUBE_MAP_NEGATIVE_X=34070]="TEXTURE_CUBE_MAP_NEGATIVE_X",r[r.TEXTURE_CUBE_MAP_POSITIVE_Y=34071]="TEXTURE_CUBE_MAP_POSITIVE_Y",r[r.TEXTURE_CUBE_MAP_NEGATIVE_Y=34072]="TEXTURE_CUBE_MAP_NEGATIVE_Y",r[r.TEXTURE_CUBE_MAP_POSITIVE_Z=34073]="TEXTURE_CUBE_MAP_POSITIVE_Z",r[r.TEXTURE_CUBE_MAP_NEGATIVE_Z=34074]="TEXTURE_CUBE_MAP_NEGATIVE_Z",r))(ls||{}),Ce=(r=>(r[r.UNSIGNED_BYTE=5121]="UNSIGNED_BYTE",r[r.UNSIGNED_SHORT=5123]="UNSIGNED_SHORT",r[r.UNSIGNED_SHORT_5_6_5=33635]="UNSIGNED_SHORT_5_6_5",r[r.UNSIGNED_SHORT_4_4_4_4=32819]="UNSIGNED_SHORT_4_4_4_4",r[r.UNSIGNED_SHORT_5_5_5_1=32820]="UNSIGNED_SHORT_5_5_5_1",r[r.UNSIGNED_INT=5125]="UNSIGNED_INT",r[r.UNSIGNED_INT_10F_11F_11F_REV=35899]="UNSIGNED_INT_10F_11F_11F_REV",r[r.UNSIGNED_INT_2_10_10_10_REV=33640]="UNSIGNED_INT_2_10_10_10_REV",r[r.UNSIGNED_INT_24_8=34042]="UNSIGNED_INT_24_8",r[r.UNSIGNED_INT_5_9_9_9_REV=35902]="UNSIGNED_INT_5_9_9_9_REV",r[r.BYTE=5120]="BYTE",r[r.SHORT=5122]="SHORT",r[r.INT=5124]="INT",r[r.FLOAT=5126]="FLOAT",r[r.FLOAT_32_UNSIGNED_INT_24_8_REV=36269]="FLOAT_32_UNSIGNED_INT_24_8_REV",r[r.HALF_FLOAT=36193]="HALF_FLOAT",r))(Ce||{}),Dh=(r=>(r[r.FLOAT=0]="FLOAT",r[r.INT=1]="INT",r[r.UINT=2]="UINT",r))(Dh||{}),Nr=(r=>(r[r.NEAREST=0]="NEAREST",r[r.LINEAR=1]="LINEAR",r))(Nr||{}),dr=(r=>(r[r.CLAMP=33071]="CLAMP",r[r.REPEAT=10497]="REPEAT",r[r.MIRRORED_REPEAT=33648]="MIRRORED_REPEAT",r))(dr||{}),x0=(r=>(r[r.OFF=0]="OFF",r[r.POW2=1]="POW2",r[r.ON=2]="ON",r[r.ON_MANUAL=3]="ON_MANUAL",r))(x0||{}),Qt=(r=>(r[r.NPM=0]="NPM",r[r.UNPACK=1]="UNPACK",r[r.PMA=2]="PMA",r[r.NO_PREMULTIPLIED_ALPHA=0]="NO_PREMULTIPLIED_ALPHA",r[r.PREMULTIPLY_ON_UPLOAD=1]="PREMULTIPLY_ON_UPLOAD",r[r.PREMULTIPLIED_ALPHA=2]="PREMULTIPLIED_ALPHA",r))(Qt||{}),pr=(r=>(r[r.NO=0]="NO",r[r.YES=1]="YES",r[r.AUTO=2]="AUTO",r[r.BLEND=0]="BLEND",r[r.CLEAR=1]="CLEAR",r[r.BLIT=2]="BLIT",r))(pr||{}),bh=(r=>(r[r.AUTO=0]="AUTO",r[r.MANUAL=1]="MANUAL",r))(bh||{}),B0=(r=>(r.LOW="lowp",r.MEDIUM="mediump",r.HIGH="highp",r))(B0||{}),Nt=(r=>(r[r.NONE=0]="NONE",r[r.SCISSOR=1]="SCISSOR",r[r.STENCIL=2]="STENCIL",r[r.SPRITE=3]="SPRITE",r[r.COLOR=4]="COLOR",r))(Nt||{});var ut=(r=>(r[r.NONE=0]="NONE",r[r.LOW=2]="LOW",r[r.MEDIUM=4]="MEDIUM",r[r.HIGH=8]="HIGH",r))(ut||{}),Z0=(r=>(r[r.ELEMENT_ARRAY_BUFFER=34963]="ELEMENT_ARRAY_BUFFER",r[r.ARRAY_BUFFER=34962]="ARRAY_BUFFER",r[r.UNIFORM_BUFFER=35345]="UNIFORM_BUFFER",r))(Z0||{});var Fp={createCanvas:(r,e)=>{let t=document.createElement("canvas");return t.width=r,t.height=e,t},getCanvasRenderingContext2D:()=>CanvasRenderingContext2D,getWebGLRenderingContext:()=>WebGLRenderingContext,getNavigator:()=>navigator,getBaseUrl:()=>document.baseURI??window.location.href,getFontFaceSet:()=>document.fonts,fetch:(r,e)=>fetch(r,e),parseXML:r=>new DOMParser().parseFromString(r,"text/xml")};var K={ADAPTER:Fp,RESOLUTION:1,CREATE_IMAGE_BITMAP:!1,ROUND_PIXELS:!1};var Ap=/iPhone/i,a7=/iPod/i,l7=/iPad/i,c7=/\biOS-universal(?:.+)Mac\b/i,kp=/\bAndroid(?:.+)Mobile\b/i,u7=/Android/i,jo=/(?:SD4930UR|\bSilk(?:.+)Mobile\b)/i,Eh=/Silk/i,cs=/Windows Phone/i,h7=/\bWindows(?:.+)ARM\b/i,d7=/BlackBerry/i,p7=/BB10/i,f7=/Opera Mini/i,g7=/\b(CriOS|Chrome)(?:.+)Mobile/i,m7=/Mobile(?:.+)Firefox\b/i,y7=function(r){return typeof r<"u"&&r.platform==="MacIntel"&&typeof r.maxTouchPoints=="number"&&r.maxTouchPoints>1&&typeof MSStream>"u"};function wb(r){return function(e){return e.test(r)}}function kl(r){var e={userAgent:"",platform:"",maxTouchPoints:0};!r&&typeof navigator<"u"?e={userAgent:navigator.userAgent,platform:navigator.platform,maxTouchPoints:navigator.maxTouchPoints||0}:typeof r=="string"?e.userAgent=r:r&&r.userAgent&&(e={userAgent:r.userAgent,platform:r.platform,maxTouchPoints:r.maxTouchPoints||0});var t=e.userAgent,i=t.split("[FBAN");typeof i[1]<"u"&&(t=i[0]),i=t.split("Twitter"),typeof i[1]<"u"&&(t=i[0]);var s=wb(t),n={apple:{phone:s(Ap)&&!s(cs),ipod:s(a7),tablet:!s(Ap)&&(s(l7)||y7(e))&&!s(cs),universal:s(c7),device:(s(Ap)||s(a7)||s(l7)||s(c7)||y7(e))&&!s(cs)},amazon:{phone:s(jo),tablet:!s(jo)&&s(Eh),device:s(jo)||s(Eh)},android:{phone:!s(cs)&&s(jo)||!s(cs)&&s(kp),tablet:!s(cs)&&!s(jo)&&!s(kp)&&(s(Eh)||s(u7)),device:!s(cs)&&(s(jo)||s(Eh)||s(kp)||s(u7))||s(/\bokhttp\b/i)},windows:{phone:s(cs),tablet:s(h7),device:s(cs)||s(h7)},other:{blackberry:s(d7),blackberry10:s(p7),opera:s(f7),firefox:s(m7),chrome:s(g7),device:s(d7)||s(p7)||s(f7)||s(m7)||s(g7)},any:!1,phone:!1,tablet:!1};return n.any=n.apple.device||n.android.device||n.windows.device||n.other.device,n.phone=n.apple.phone||n.android.phone||n.windows.phone,n.tablet=n.apple.tablet||n.android.tablet||n.windows.tablet,n}var Tb=kl.default??kl,Pr=Tb(globalThis.navigator);var ae={};El(ae,{BaseTextureCache:()=>O0,BoundingBox:()=>Yo,CanvasRenderTarget:()=>Mh,DATA_URI:()=>Ih,EventEmitter:()=>js.default,ProgramCache:()=>Ul,TextureCache:()=>c0,clearTextureCache:()=>r3,correctBlendMode:()=>q7,createIndicesForQuads:()=>Z7,decomposeDataUri:()=>o3,deprecation:()=>Ue,destroyTextureCache:()=>t3,determineCrossOrigin:()=>Bh,earcut:()=>a3.default,getBufferType:()=>Ws,getCanvasBoundingBox:()=>Nh,getResolutionOfUrl:()=>Vl,hex2rgb:()=>W7,hex2string:()=>H7,interleaveTypedArrays:()=>Q7,isMobile:()=>Pr,isPow2:()=>Ol,isWebGLSupported:()=>Ah,log2:()=>Gl,nextPow2:()=>Hs,path:()=>Bp,premultiplyBlendMode:()=>Rl,premultiplyRgba:()=>Y7,premultiplyTint:()=>X7,premultiplyTintToRgba:()=>K7,removeItems:()=>Lh,rgb2hex:()=>$7,sayHello:()=>k7,sign:()=>J7,skipHello:()=>A7,string2hex:()=>j7,trimCanvas:()=>n3,uid:()=>_i,url:()=>Fh});K.RETINA_PREFIX=/@([0-9\.]+)x/;K.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT=!1;var js=St(x7(),1),a3=St(C7(),1);function w7(){throw new Error("Node.js url.parse() was called - this module has been removed to allow mobile compatibility")}function T7(){throw new Error("Node.js url.format() was called - this module has been removed to allow mobile compatibility")}function _7(){throw new Error("Node.js url.resolve() was called - this module has been removed to allow mobile compatibility")}var Fh={parse:w7,format:T7,resolve:_7};function ni(r){if(typeof r!="string")throw new TypeError(`Path must be a string. Received ${JSON.stringify(r)}`)}function Pl(r){return r.split("?")[0].split("#")[0]}function Hb(r){return r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function jb(r,e,t){return r.replace(new RegExp(Hb(e),"g"),t)}function $b(r,e){let t="",i=0,s=-1,n=0,o=-1;for(let a=0;a<=r.length;++a){if(a<r.length)o=r.charCodeAt(a);else{if(o===47)break;o=47}if(o===47){if(!(s===a-1||n===1))if(s!==a-1&&n===2){if(t.length<2||i!==2||t.charCodeAt(t.length-1)!==46||t.charCodeAt(t.length-2)!==46){if(t.length>2){let l=t.lastIndexOf("/");if(l!==t.length-1){l===-1?(t="",i=0):(t=t.slice(0,l),i=t.length-1-t.lastIndexOf("/")),s=a,n=0;continue}}else if(t.length===2||t.length===1){t="",i=0,s=a,n=0;continue}}e&&(t.length>0?t+="/..":t="..",i=2)}else t.length>0?t+=`/${r.slice(s+1,a)}`:t=r.slice(s+1,a),i=a-s-1;s=a,n=0}else o===46&&n!==-1?++n:n=-1}return t}var Bp={toPosix(r){return jb(r,"\\","/")},isUrl(r){return/^https?:/.test(this.toPosix(r))},isDataUrl(r){return/^data:([a-z]+\/[a-z0-9-+.]+(;[a-z0-9-.!#$%*+.{}|~`]+=[a-z0-9-.!#$%*+.{}()_|~`]+)*)?(;base64)?,([a-z0-9!$&',()*+;=\-._~:@\/?%\s<>]*?)$/i.test(r)},hasProtocol(r){return/^[^/:]+:\//.test(this.toPosix(r))},getProtocol(r){ni(r),r=this.toPosix(r);let e="",t=/^file:\/\/\//.exec(r),i=/^[^/:]+:\/\//.exec(r),s=/^[^/:]+:\//.exec(r);if(t||i||s){let n=t?.[0]||i?.[0]||s?.[0];e=n,r=r.slice(n.length)}return e},toAbsolute(r,e,t){if(this.isDataUrl(r))return r;let i=Pl(this.toPosix(e??K.ADAPTER.getBaseUrl())),s=Pl(this.toPosix(t??this.rootname(i)));return ni(r),r=this.toPosix(r),r.startsWith("/")?Bp.join(s,r.slice(1)):this.isAbsolute(r)?r:this.join(i,r)},normalize(r){if(r=this.toPosix(r),ni(r),r.length===0)return".";let e="",t=r.startsWith("/");this.hasProtocol(r)&&(e=this.rootname(r),r=r.slice(e.length));let i=r.endsWith("/");return r=$b(r,!1),r.length>0&&i&&(r+="/"),t?`/${r}`:e+r},isAbsolute(r){return ni(r),r=this.toPosix(r),this.hasProtocol(r)?!0:r.startsWith("/")},join(...r){if(r.length===0)return".";let e;for(let t=0;t<r.length;++t){let i=r[t];if(ni(i),i.length>0)if(e===void 0)e=i;else{let s=r[t-1]??"";this.extname(s)?e+=`/../${i}`:e+=`/${i}`}}return e===void 0?".":this.normalize(e)},dirname(r){if(ni(r),r.length===0)return".";r=this.toPosix(r);let e=r.charCodeAt(0),t=e===47,i=-1,s=!0,n=this.getProtocol(r),o=r;r=r.slice(n.length);for(let a=r.length-1;a>=1;--a)if(e=r.charCodeAt(a),e===47){if(!s){i=a;break}}else s=!1;return i===-1?t?"/":this.isUrl(o)?n+r:n:t&&i===1?"//":n+r.slice(0,i)},rootname(r){ni(r),r=this.toPosix(r);let e="";if(r.startsWith("/")?e="/":e=this.getProtocol(r),this.isUrl(r)){let t=r.indexOf("/",e.length);t!==-1?e=r.slice(0,t):e=r,e.endsWith("/")||(e+="/")}return e},basename(r,e){ni(r),e&&ni(e),r=Pl(this.toPosix(r));let t=0,i=-1,s=!0,n;if(e!==void 0&&e.length>0&&e.length<=r.length){if(e.length===r.length&&e===r)return"";let o=e.length-1,a=-1;for(n=r.length-1;n>=0;--n){let l=r.charCodeAt(n);if(l===47){if(!s){t=n+1;break}}else a===-1&&(s=!1,a=n+1),o>=0&&(l===e.charCodeAt(o)?--o===-1&&(i=n):(o=-1,i=a))}return t===i?i=a:i===-1&&(i=r.length),r.slice(t,i)}for(n=r.length-1;n>=0;--n)if(r.charCodeAt(n)===47){if(!s){t=n+1;break}}else i===-1&&(s=!1,i=n+1);return i===-1?"":r.slice(t,i)},extname(r){ni(r),r=Pl(this.toPosix(r));let e=-1,t=0,i=-1,s=!0,n=0;for(let o=r.length-1;o>=0;--o){let a=r.charCodeAt(o);if(a===47){if(!s){t=o+1;break}continue}i===-1&&(s=!1,i=o+1),a===46?e===-1?e=o:n!==1&&(n=1):e!==-1&&(n=-1)}return e===-1||i===-1||n===0||n===1&&e===i-1&&e===t+1?"":r.slice(e,i)},parse(r){ni(r);let e={root:"",dir:"",base:"",ext:"",name:""};if(r.length===0)return e;r=Pl(this.toPosix(r));let t=r.charCodeAt(0),i=this.isAbsolute(r),s,n="";e.root=this.rootname(r),i||this.hasProtocol(r)?s=1:s=0;let o=-1,a=0,l=-1,c=!0,h=r.length-1,d=0;for(;h>=s;--h){if(t=r.charCodeAt(h),t===47){if(!c){a=h+1;break}continue}l===-1&&(c=!1,l=h+1),t===46?o===-1?o=h:d!==1&&(d=1):o!==-1&&(d=-1)}return o===-1||l===-1||d===0||d===1&&o===l-1&&o===a+1?l!==-1&&(a===0&&i?e.base=e.name=r.slice(1,l):e.base=e.name=r.slice(a,l)):(a===0&&i?(e.name=r.slice(1,o),e.base=r.slice(1,l)):(e.name=r.slice(a,o),e.base=r.slice(a,l)),e.ext=r.slice(o,l)),e.dir=this.dirname(r),n&&(e.dir=n+e.dir),e},sep:"/",delimiter:":"};var F7={};function Ue(r,e,t=3){if(F7[e])return;let i=new Error().stack;typeof i>"u"?console.warn("PixiJS Deprecation Warning: ",`${e}
|
|
Deprecated since v${r}`):(i=i.split(`
|
|
`).splice(t).join(`
|
|
`),console.groupCollapsed?(console.groupCollapsed("%cPixiJS Deprecation Warning: %c%s","color:#614108;background:#fffbe6","font-weight:normal;color:#614108;background:#fffbe6",`${e}
|
|
Deprecated since v${r}`),console.warn(i),console.groupEnd()):(console.warn("PixiJS Deprecation Warning: ",`${e}
|
|
Deprecated since v${r}`),console.warn(i))),F7[e]=!0}function A7(){Ue("7.0.0","skipHello is deprecated, please use settings.RENDER_OPTIONS.hello")}function k7(){Ue("7.0.0",`sayHello is deprecated, please use Renderer's "hello" option`)}var Rp;function Ah(){return typeof Rp>"u"&&(Rp=function(){let e={stencil:!0,failIfMajorPerformanceCaveat:K.FAIL_IF_MAJOR_PERFORMANCE_CAVEAT};try{if(!K.ADAPTER.getWebGLRenderingContext())return!1;let t=K.ADAPTER.createCanvas(),i=t.getContext("webgl",e)||t.getContext("experimental-webgl",e),s=!!i?.getContextAttributes()?.stencil;if(i){let n=i.getExtension("WEBGL_lose_context");n&&n.loseContext()}return i=null,s}catch{return!1}}()),Rp}var qb={grad:.9,turn:360,rad:360/(2*Math.PI)},us=function(r){return typeof r=="string"?r.length>0:typeof r=="number"},l0=function(r,e,t){return e===void 0&&(e=0),t===void 0&&(t=Math.pow(10,e)),Math.round(t*r)/t+0},Br=function(r,e,t){return e===void 0&&(e=0),t===void 0&&(t=1),r>t?t:r>e?r:e},O7=function(r){return(r=isFinite(r)?r%360:0)>0?r:r+360},I7=function(r){return{r:Br(r.r,0,255),g:Br(r.g,0,255),b:Br(r.b,0,255),a:Br(r.a)}},Op=function(r){return{r:l0(r.r),g:l0(r.g),b:l0(r.b),a:l0(r.a,3)}},Yb=/^#([0-9a-f]{3,8})$/i,kh=function(r){var e=r.toString(16);return e.length<2?"0"+e:e},G7=function(r){var e=r.r,t=r.g,i=r.b,s=r.a,n=Math.max(e,t,i),o=n-Math.min(e,t,i),a=o?n===e?(t-i)/o:n===t?2+(i-e)/o:4+(e-t)/o:0;return{h:60*(a<0?a+6:a),s:n?o/n*100:0,v:n/255*100,a:s}},U7=function(r){var e=r.h,t=r.s,i=r.v,s=r.a;e=e/360*6,t/=100,i/=100;var n=Math.floor(e),o=i*(1-t),a=i*(1-(e-n)*t),l=i*(1-(1-e+n)*t),c=n%6;return{r:255*[i,a,o,o,l,i][c],g:255*[l,i,i,a,o,o][c],b:255*[o,o,l,i,i,a][c],a:s}},L7=function(r){return{h:O7(r.h),s:Br(r.s,0,100),l:Br(r.l,0,100),a:Br(r.a)}},M7=function(r){return{h:l0(r.h),s:l0(r.s),l:l0(r.l),a:l0(r.a,3)}},N7=function(r){return U7((t=(e=r).s,{h:e.h,s:(t*=((i=e.l)<50?i:100-i)/100)>0?2*t/(i+t)*100:0,v:i+t,a:e.a}));var e,t,i},Bl=function(r){return{h:(e=G7(r)).h,s:(s=(200-(t=e.s))*(i=e.v)/100)>0&&s<200?t*i/100/(s<=100?s:200-s)*100:0,l:s/2,a:e.a};var e,t,i,s},Xb=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Kb=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Zb=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Qb=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,Vp={string:[[function(r){var e=Yb.exec(r);return e?(r=e[1]).length<=4?{r:parseInt(r[0]+r[0],16),g:parseInt(r[1]+r[1],16),b:parseInt(r[2]+r[2],16),a:r.length===4?l0(parseInt(r[3]+r[3],16)/255,2):1}:r.length===6||r.length===8?{r:parseInt(r.substr(0,2),16),g:parseInt(r.substr(2,2),16),b:parseInt(r.substr(4,2),16),a:r.length===8?l0(parseInt(r.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(r){var e=Zb.exec(r)||Qb.exec(r);return e?e[2]!==e[4]||e[4]!==e[6]?null:I7({r:Number(e[1])/(e[2]?100/255:1),g:Number(e[3])/(e[4]?100/255:1),b:Number(e[5])/(e[6]?100/255:1),a:e[7]===void 0?1:Number(e[7])/(e[8]?100:1)}):null},"rgb"],[function(r){var e=Xb.exec(r)||Kb.exec(r);if(!e)return null;var t,i,s=L7({h:(t=e[1],i=e[2],i===void 0&&(i="deg"),Number(t)*(qb[i]||1)),s:Number(e[3]),l:Number(e[4]),a:e[5]===void 0?1:Number(e[5])/(e[6]?100:1)});return N7(s)},"hsl"]],object:[[function(r){var e=r.r,t=r.g,i=r.b,s=r.a,n=s===void 0?1:s;return us(e)&&us(t)&&us(i)?I7({r:Number(e),g:Number(t),b:Number(i),a:Number(n)}):null},"rgb"],[function(r){var e=r.h,t=r.s,i=r.l,s=r.a,n=s===void 0?1:s;if(!us(e)||!us(t)||!us(i))return null;var o=L7({h:Number(e),s:Number(t),l:Number(i),a:Number(n)});return N7(o)},"hsl"],[function(r){var e=r.h,t=r.s,i=r.v,s=r.a,n=s===void 0?1:s;if(!us(e)||!us(t)||!us(i))return null;var o=function(a){return{h:O7(a.h),s:Br(a.s,0,100),v:Br(a.v,0,100),a:Br(a.a)}}({h:Number(e),s:Number(t),v:Number(i),a:Number(n)});return U7(o)},"hsv"]]},P7=function(r,e){for(var t=0;t<e.length;t++){var i=e[t][0](r);if(i)return[i,e[t][1]]}return[null,void 0]},Jb=function(r){return typeof r=="string"?P7(r.trim(),Vp.string):typeof r=="object"&&r!==null?P7(r,Vp.object):[null,void 0]};var Gp=function(r,e){var t=Bl(r);return{h:t.h,s:Br(t.s+100*e,0,100),l:t.l,a:t.a}},Up=function(r){return(299*r.r+587*r.g+114*r.b)/1e3/255},B7=function(r,e){var t=Bl(r);return{h:t.h,s:t.s,l:Br(t.l+100*e,0,100),a:t.a}},zp=function(){function r(e){this.parsed=Jb(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return r.prototype.isValid=function(){return this.parsed!==null},r.prototype.brightness=function(){return l0(Up(this.rgba),2)},r.prototype.isDark=function(){return Up(this.rgba)<.5},r.prototype.isLight=function(){return Up(this.rgba)>=.5},r.prototype.toHex=function(){return e=Op(this.rgba),t=e.r,i=e.g,s=e.b,o=(n=e.a)<1?kh(l0(255*n)):"","#"+kh(t)+kh(i)+kh(s)+o;var e,t,i,s,n,o},r.prototype.toRgb=function(){return Op(this.rgba)},r.prototype.toRgbString=function(){return e=Op(this.rgba),t=e.r,i=e.g,s=e.b,(n=e.a)<1?"rgba("+t+", "+i+", "+s+", "+n+")":"rgb("+t+", "+i+", "+s+")";var e,t,i,s,n},r.prototype.toHsl=function(){return M7(Bl(this.rgba))},r.prototype.toHslString=function(){return e=M7(Bl(this.rgba)),t=e.h,i=e.s,s=e.l,(n=e.a)<1?"hsla("+t+", "+i+"%, "+s+"%, "+n+")":"hsl("+t+", "+i+"%, "+s+"%)";var e,t,i,s,n},r.prototype.toHsv=function(){return e=G7(this.rgba),{h:l0(e.h),s:l0(e.s),v:l0(e.v),a:l0(e.a,3)};var e},r.prototype.invert=function(){return oi({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},r.prototype.saturate=function(e){return e===void 0&&(e=.1),oi(Gp(this.rgba,e))},r.prototype.desaturate=function(e){return e===void 0&&(e=.1),oi(Gp(this.rgba,-e))},r.prototype.grayscale=function(){return oi(Gp(this.rgba,-1))},r.prototype.lighten=function(e){return e===void 0&&(e=.1),oi(B7(this.rgba,e))},r.prototype.darken=function(e){return e===void 0&&(e=.1),oi(B7(this.rgba,-e))},r.prototype.rotate=function(e){return e===void 0&&(e=15),this.hue(this.hue()+e)},r.prototype.alpha=function(e){return typeof e=="number"?oi({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):l0(this.rgba.a,3);var t},r.prototype.hue=function(e){var t=Bl(this.rgba);return typeof e=="number"?oi({h:e,s:t.s,l:t.l,a:t.a}):l0(t.h)},r.prototype.isEqual=function(e){return this.toHex()===oi(e).toHex()},r}(),oi=function(r){return r instanceof zp?r:new zp(r)},R7=[],V7=function(r){r.forEach(function(e){R7.indexOf(e)<0&&(e(zp,Vp),R7.push(e))})};function z7(r,e){var t={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},i={};for(var s in t)i[t[s]]=s;var n={};r.prototype.toName=function(o){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var a,l,c=i[this.toHex()];if(c)return c;if(o?.closest){var h=this.toRgb(),d=1/0,p="black";if(!n.length)for(var g in t)n[g]=new r(t[g]).toRgb();for(var v in t){var C=(a=h,l=n[v],Math.pow(a.r-l.r,2)+Math.pow(a.g-l.g,2)+Math.pow(a.b-l.b,2));C<d&&(d=C,p=v)}return p}},e.string.push([function(o){var a=o.toLowerCase(),l=a==="transparent"?"#0000":t[a];return l?new r(l).toRgb():null},"name"])}V7([z7]);var qo=class{constructor(r=16777215){this._value=null,this._components=new Float32Array(4),this._components.fill(1),this._int=16777215,this.value=r}get red(){return this._components[0]}get green(){return this._components[1]}get blue(){return this._components[2]}get alpha(){return this._components[3]}setValue(r){return this.value=r,this}set value(r){if(r instanceof qo)this._value=this.cloneSource(r._value),this._int=r._int,this._components.set(r._components);else{if(r===null)throw new Error("Cannot set PIXI.Color#value to null");(this._value===null||!this.isSourceEqual(this._value,r))&&(this.normalize(r),this._value=this.cloneSource(r))}}get value(){return this._value}cloneSource(r){return typeof r=="string"||typeof r=="number"||r instanceof Number||r===null?r:Array.isArray(r)||ArrayBuffer.isView(r)?r.slice(0):typeof r=="object"&&r!==null?{...r}:r}isSourceEqual(r,e){let t=typeof r;if(t!==typeof e)return!1;if(t==="number"||t==="string"||r instanceof Number)return r===e;if(Array.isArray(r)&&Array.isArray(e)||ArrayBuffer.isView(r)&&ArrayBuffer.isView(e))return r.length!==e.length?!1:r.every((s,n)=>s===e[n]);if(r!==null&&e!==null){let s=Object.keys(r),n=Object.keys(e);return s.length!==n.length?!1:s.every(o=>r[o]===e[o])}return r===e}toRgba(){let[r,e,t,i]=this._components;return{r,g:e,b:t,a:i}}toRgb(){let[r,e,t]=this._components;return{r,g:e,b:t}}toRgbaString(){let[r,e,t]=this.toUint8RgbArray();return`rgba(${r},${e},${t},${this.alpha})`}toUint8RgbArray(r){let[e,t,i]=this._components;return r=r??[],r[0]=Math.round(e*255),r[1]=Math.round(t*255),r[2]=Math.round(i*255),r}toRgbArray(r){r=r??[];let[e,t,i]=this._components;return r[0]=e,r[1]=t,r[2]=i,r}toNumber(){return this._int}toLittleEndianNumber(){let r=this._int;return(r>>16)+(r&65280)+((r&255)<<16)}multiply(r){let[e,t,i,s]=qo.temp.setValue(r)._components;return this._components[0]*=e,this._components[1]*=t,this._components[2]*=i,this._components[3]*=s,this.refreshInt(),this._value=null,this}premultiply(r,e=!0){return e&&(this._components[0]*=r,this._components[1]*=r,this._components[2]*=r),this._components[3]=r,this.refreshInt(),this._value=null,this}toPremultiplied(r,e=!0){if(r===1)return(255<<24)+this._int;if(r===0)return e?0:this._int;let t=this._int>>16&255,i=this._int>>8&255,s=this._int&255;return e&&(t=t*r+.5|0,i=i*r+.5|0,s=s*r+.5|0),(r*255<<24)+(t<<16)+(i<<8)+s}toHex(){let r=this._int.toString(16);return`#${"000000".substring(0,6-r.length)+r}`}toHexa(){let e=Math.round(this._components[3]*255).toString(16);return this.toHex()+"00".substring(0,2-e.length)+e}setAlpha(r){return this._components[3]=this._clamp(r),this}round(r){let[e,t,i]=this._components;return this._components[0]=Math.round(e*r)/r,this._components[1]=Math.round(t*r)/r,this._components[2]=Math.round(i*r)/r,this.refreshInt(),this._value=null,this}toArray(r){r=r??[];let[e,t,i,s]=this._components;return r[0]=e,r[1]=t,r[2]=i,r[3]=s,r}normalize(r){let e,t,i,s;if((typeof r=="number"||r instanceof Number)&&r>=0&&r<=16777215){let n=r;e=(n>>16&255)/255,t=(n>>8&255)/255,i=(n&255)/255,s=1}else if((Array.isArray(r)||r instanceof Float32Array)&&r.length>=3&&r.length<=4)r=this._clamp(r),[e,t,i,s=1]=r;else if((r instanceof Uint8Array||r instanceof Uint8ClampedArray)&&r.length>=3&&r.length<=4)r=this._clamp(r,0,255),[e,t,i,s=255]=r,e/=255,t/=255,i/=255,s/=255;else if(typeof r=="string"||typeof r=="object"){if(typeof r=="string"){let o=qo.HEX_PATTERN.exec(r);o&&(r=`#${o[2]}`)}let n=oi(r);n.isValid()&&({r:e,g:t,b:i,a:s}=n.rgba,e/=255,t/=255,i/=255)}if(e!==void 0)this._components[0]=e,this._components[1]=t,this._components[2]=i,this._components[3]=s,this.refreshInt();else throw new Error(`Unable to convert color ${r}`)}refreshInt(){this._clamp(this._components);let[r,e,t]=this._components;this._int=(r*255<<16)+(e*255<<8)+(t*255|0)}_clamp(r,e=0,t=1){return typeof r=="number"?Math.min(Math.max(r,e),t):(r.forEach((i,s)=>{r[s]=Math.min(Math.max(i,e),t)}),r)}},Me=qo;Me.shared=new qo;Me.temp=new qo;Me.HEX_PATTERN=/^(#|0x)?(([a-f0-9]{3}){1,2}([a-f0-9]{2})?)$/i;function W7(r,e=[]){return Ue("7.2.0","utils.hex2rgb is deprecated, use Color#toRgbArray instead"),Me.shared.setValue(r).toRgbArray(e)}function H7(r){return Ue("7.2.0","utils.hex2string is deprecated, use Color#toHex instead"),Me.shared.setValue(r).toHex()}function j7(r){return Ue("7.2.0","utils.string2hex is deprecated, use Color#toNumber instead"),Me.shared.setValue(r).toNumber()}function $7(r){return Ue("7.2.0","utils.rgb2hex is deprecated, use Color#toNumber instead"),Me.shared.setValue(r).toNumber()}function eE(){let r=[],e=[];for(let i=0;i<32;i++)r[i]=i,e[i]=i;r[ke.NORMAL_NPM]=ke.NORMAL,r[ke.ADD_NPM]=ke.ADD,r[ke.SCREEN_NPM]=ke.SCREEN,e[ke.NORMAL]=ke.NORMAL_NPM,e[ke.ADD]=ke.ADD_NPM,e[ke.SCREEN]=ke.SCREEN_NPM;let t=[];return t.push(e),t.push(r),t}var Rl=eE();function q7(r,e){return Rl[e?1:0][r]}function Y7(r,e,t,i=!0){return Ue("7.2.0","utils.premultiplyRgba has moved to Color.premultiply"),Me.shared.setValue(r).premultiply(e,i).toArray(t??new Float32Array(4))}function X7(r,e){return Ue("7.2.0","utils.premultiplyTint has moved to Color.toPremultiplied"),Me.shared.setValue(r).toPremultiplied(e)}function K7(r,e,t,i=!0){return Ue("7.2.0","utils.premultiplyTintToRgba has moved to Color.premultiply"),Me.shared.setValue(r).premultiply(e,i).toArray(t??new Float32Array(4))}var Ih=/^\s*data:(?:([\w-]+)\/([\w+.-]+))?(?:;charset=([\w-]+))?(?:;(base64))?,(.*)/i;function Z7(r,e=null){let t=r*6;if(e=e||new Uint16Array(t),e.length!==t)throw new Error(`Out buffer length is incorrect, got ${e.length} and expected ${t}`);for(let i=0,s=0;i<t;i+=6,s+=4)e[i+0]=s+0,e[i+1]=s+1,e[i+2]=s+2,e[i+3]=s+0,e[i+4]=s+2,e[i+5]=s+3;return e}function Ws(r){if(r.BYTES_PER_ELEMENT===4)return r instanceof Float32Array?"Float32Array":r instanceof Uint32Array?"Uint32Array":"Int32Array";if(r.BYTES_PER_ELEMENT===2){if(r instanceof Uint16Array)return"Uint16Array"}else if(r.BYTES_PER_ELEMENT===1&&r instanceof Uint8Array)return"Uint8Array";return null}var tE={Float32Array,Uint32Array,Int32Array,Uint8Array};function Q7(r,e){let t=0,i=0,s={};for(let l=0;l<r.length;l++)i+=e[l],t+=r[l].length;let n=new ArrayBuffer(t*4),o=null,a=0;for(let l=0;l<r.length;l++){let c=e[l],h=r[l],d=Ws(h);s[d]||(s[d]=new tE[d](n)),o=s[d];for(let p=0;p<h.length;p++){let g=(p/c|0)*i+a,v=p%c;o[g+v]=h[p]}a+=c}return new Float32Array(n)}function Hs(r){return r+=r===0?1:0,--r,r|=r>>>1,r|=r>>>2,r|=r>>>4,r|=r>>>8,r|=r>>>16,r+1}function Ol(r){return!(r&r-1)&&!!r}function Gl(r){let e=(r>65535?1:0)<<4;r>>>=e;let t=(r>255?1:0)<<3;return r>>>=t,e|=t,t=(r>15?1:0)<<2,r>>>=t,e|=t,t=(r>3?1:0)<<1,r>>>=t,e|=t,e|r>>1}function Lh(r,e,t){let i=r.length,s;if(e>=i||t===0)return;t=e+t>i?i-e:t;let n=i-t;for(s=e;s<n;++s)r[s]=r[s+t];r.length=n}function J7(r){return r===0?0:r<0?-1:1}var rE=0;function _i(){return++rE}var e3=class{constructor(r,e,t,i){this.left=r,this.top=e,this.right=t,this.bottom=i}get width(){return this.right-this.left}get height(){return this.bottom-this.top}isEmpty(){return this.left===this.right||this.top===this.bottom}},Yo=e3;Yo.EMPTY=new e3(0,0,0,0);var Ul={},c0=Object.create(null),O0=Object.create(null);function t3(){let r;for(r in c0)c0[r].destroy();for(r in O0)O0[r].destroy()}function r3(){let r;for(r in c0)delete c0[r];for(r in O0)delete O0[r]}var Mh=class{constructor(e,t,i){this._canvas=K.ADAPTER.createCanvas(),this._context=this._canvas.getContext("2d"),this.resolution=i||K.RESOLUTION,this.resize(e,t)}clear(){this._checkDestroyed(),this._context.setTransform(1,0,0,1,0,0),this._context.clearRect(0,0,this._canvas.width,this._canvas.height)}resize(e,t){this._checkDestroyed(),this._canvas.width=Math.round(e*this.resolution),this._canvas.height=Math.round(t*this.resolution)}destroy(){this._context=null,this._canvas=null}get width(){return this._checkDestroyed(),this._canvas.width}set width(e){this._checkDestroyed(),this._canvas.width=Math.round(e)}get height(){return this._checkDestroyed(),this._canvas.height}set height(e){this._checkDestroyed(),this._canvas.height=Math.round(e)}get canvas(){return this._checkDestroyed(),this._canvas}get context(){return this._checkDestroyed(),this._context}_checkDestroyed(){if(this._canvas===null)throw new TypeError("The CanvasRenderTarget has already been destroyed")}};function i3(r,e,t){for(let i=0,s=4*t*e;i<e;++i,s+=4)if(r[s+3]!==0)return!1;return!0}function s3(r,e,t,i,s){let n=4*e;for(let o=i,a=i*n+4*t;o<=s;++o,a+=n)if(r[a+3]!==0)return!1;return!0}function Nh(r){let{width:e,height:t}=r,i=r.getContext("2d",{willReadFrequently:!0});if(i===null)throw new TypeError("Failed to get canvas 2D context");let n=i.getImageData(0,0,e,t).data,o=0,a=0,l=e-1,c=t-1;for(;a<t&&i3(n,e,a);)++a;if(a===t)return Yo.EMPTY;for(;i3(n,e,c);)--c;for(;s3(n,e,o,a,c);)++o;for(;s3(n,e,l,a,c);)--l;return++l,++c,new Yo(o,a,l,c)}function n3(r){let e=Nh(r),{width:t,height:i}=e,s=null;if(!e.isEmpty()){let n=r.getContext("2d");if(n===null)throw new TypeError("Failed to get canvas 2D context");s=n.getImageData(e.left,e.top,t,i)}return{width:t,height:i,data:s}}function o3(r){let e=Ih.exec(r);if(e)return{mediaType:e[1]?e[1].toLowerCase():void 0,subType:e[2]?e[2].toLowerCase():void 0,charset:e[3]?e[3].toLowerCase():void 0,encoding:e[4]?e[4].toLowerCase():void 0,data:e[5]}}var Ph;function Bh(r,e=globalThis.location){if(r.startsWith("data:"))return"";e=e||globalThis.location,Ph||(Ph=document.createElement("a")),Ph.href=r;let t=Fh.parse(Ph.href),i=!t.port&&e.port===""||t.port===e.port;return t.hostname!==e.hostname||!i||t.protocol!==e.protocol?"anonymous":""}function Vl(r,e=1){let t=K.RETINA_PREFIX?.exec(r);return t?parseFloat(t[1]):e}var Z=(r=>(r.Renderer="renderer",r.Application="application",r.RendererSystem="renderer-webgl-system",r.RendererPlugin="renderer-webgl-plugin",r.CanvasRendererSystem="renderer-canvas-system",r.CanvasRendererPlugin="renderer-canvas-plugin",r.Asset="asset",r.LoadParser="load-parser",r.ResolveParser="resolve-parser",r.CacheParser="cache-parser",r.DetectionParser="detection-parser",r))(Z||{}),Wp=r=>{if(typeof r=="function"||typeof r=="object"&&r.extension){if(!r.extension)throw new Error("Extension class must have an extension object");r={...typeof r.extension!="object"?{type:r.extension}:r.extension,ref:r}}if(typeof r=="object")r={...r};else throw new Error("Invalid extension type");return typeof r.type=="string"&&(r.type=[r.type]),r},l3=(r,e)=>Wp(r).priority??e,te={_addHandlers:{},_removeHandlers:{},_queue:{},remove(...r){return r.map(Wp).forEach(e=>{e.type.forEach(t=>this._removeHandlers[t]?.(e))}),this},add(...r){return r.map(Wp).forEach(e=>{e.type.forEach(t=>{let i=this._addHandlers,s=this._queue;i[t]?i[t](e):(s[t]=s[t]||[],s[t].push(e))})}),this},handle(r,e,t){let i=this._addHandlers,s=this._removeHandlers;if(i[r]||s[r])throw new Error(`Extension type ${r} already has a handler`);i[r]=e,s[r]=t;let n=this._queue;return n[r]&&(n[r].forEach(o=>e(o)),delete n[r]),this},handleByMap(r,e){return this.handle(r,t=>{e[t.name]=t.ref},t=>{delete e[t.name]})},handleByList(r,e,t=-1){return this.handle(r,i=>{e.includes(i.ref)||(e.push(i.ref),e.sort((s,n)=>l3(n,t)-l3(s,t)))},i=>{let s=e.indexOf(i.ref);s!==-1&&e.splice(s,1)})}};var $s=class{constructor(e){typeof e=="number"?this.rawBinaryData=new ArrayBuffer(e):e instanceof Uint8Array?this.rawBinaryData=e.buffer:this.rawBinaryData=e,this.uint32View=new Uint32Array(this.rawBinaryData),this.float32View=new Float32Array(this.rawBinaryData)}get int8View(){return this._int8View||(this._int8View=new Int8Array(this.rawBinaryData)),this._int8View}get uint8View(){return this._uint8View||(this._uint8View=new Uint8Array(this.rawBinaryData)),this._uint8View}get int16View(){return this._int16View||(this._int16View=new Int16Array(this.rawBinaryData)),this._int16View}get uint16View(){return this._uint16View||(this._uint16View=new Uint16Array(this.rawBinaryData)),this._uint16View}get int32View(){return this._int32View||(this._int32View=new Int32Array(this.rawBinaryData)),this._int32View}view(e){return this[`${e}View`]}destroy(){this.rawBinaryData=null,this._int8View=null,this._uint8View=null,this._int16View=null,this._uint16View=null,this._int32View=null,this.uint32View=null,this.float32View=null}static sizeOf(e){switch(e){case"int8":case"uint8":return 1;case"int16":case"uint16":return 2;case"int32":case"uint32":case"float32":return 4;default:throw new Error(`${e} isn't a valid view type`)}}};var iE=["precision mediump float;","void main(void){","float test = 0.1;","%forloop%","gl_FragColor = vec4(0.0);","}"].join(`
|
|
`);function sE(r){let e="";for(let t=0;t<r;++t)t>0&&(e+=`
|
|
else `),t<r-1&&(e+=`if(test == ${t}.0){}`);return e}function Rh(r,e){if(r===0)throw new Error("Invalid value of `0` passed to `checkMaxIfStatementsInShader`");let t=e.createShader(e.FRAGMENT_SHADER);for(;;){let i=iE.replace(/%forloop%/gi,sE(r));if(e.shaderSource(t,i),e.compileShader(t),!e.getShaderParameter(t,e.COMPILE_STATUS))r=r/2|0;else break}return r}var Hp=0,jp=1,$p=2,qp=3,Yp=4,Xp=5,D0=class r{constructor(){this.data=0,this.blendMode=ke.NORMAL,this.polygonOffset=0,this.blend=!0,this.depthMask=!0}get blend(){return!!(this.data&1<<Hp)}set blend(e){!!(this.data&1<<Hp)!==e&&(this.data^=1<<Hp)}get offsets(){return!!(this.data&1<<jp)}set offsets(e){!!(this.data&1<<jp)!==e&&(this.data^=1<<jp)}get culling(){return!!(this.data&1<<$p)}set culling(e){!!(this.data&1<<$p)!==e&&(this.data^=1<<$p)}get depthTest(){return!!(this.data&1<<qp)}set depthTest(e){!!(this.data&1<<qp)!==e&&(this.data^=1<<qp)}get depthMask(){return!!(this.data&1<<Xp)}set depthMask(e){!!(this.data&1<<Xp)!==e&&(this.data^=1<<Xp)}get clockwiseFrontFace(){return!!(this.data&1<<Yp)}set clockwiseFrontFace(e){!!(this.data&1<<Yp)!==e&&(this.data^=1<<Yp)}get blendMode(){return this._blendMode}set blendMode(e){this.blend=e!==ke.NONE,this._blendMode=e}get polygonOffset(){return this._polygonOffset}set polygonOffset(e){this.offsets=!!e,this._polygonOffset=e}toString(){return`[@pixi/core:State blendMode=${this.blendMode} clockwiseFrontFace=${this.clockwiseFrontFace} culling=${this.culling} depthMask=${this.depthMask} polygonOffset=${this.polygonOffset}]`}static for2d(){let e=new r;return e.depthTest=!1,e.blend=!0,e}};var Xo=[];function Ko(r,e){if(!r)return null;let t="";if(typeof r=="string"){let i=/\.(\w{3,4})(?:$|\?|#)/i.exec(r);i&&(t=i[1].toLowerCase())}for(let i=Xo.length-1;i>=0;--i){let s=Xo[i];if(s.test&&s.test(r,t))return new s(r,e)}throw new Error("Unrecognized source type to auto-detect Resource")}var Ht=class{constructor(e){this.items=[],this._name=e,this._aliasCount=0}emit(e,t,i,s,n,o,a,l){if(arguments.length>8)throw new Error("max arguments reached");let{name:c,items:h}=this;this._aliasCount++;for(let d=0,p=h.length;d<p;d++)h[d][c](e,t,i,s,n,o,a,l);return h===this.items&&this._aliasCount--,this}ensureNonAliasedItems(){this._aliasCount>0&&this.items.length>1&&(this._aliasCount=0,this.items=this.items.slice(0))}add(e){return e[this._name]&&(this.ensureNonAliasedItems(),this.remove(e),this.items.push(e)),this}remove(e){let t=this.items.indexOf(e);return t!==-1&&(this.ensureNonAliasedItems(),this.items.splice(t,1)),this}contains(e){return this.items.includes(e)}removeAll(){return this.ensureNonAliasedItems(),this.items.length=0,this}destroy(){this.removeAll(),this.items=null,this._name=null}get empty(){return this.items.length===0}get name(){return this._name}};Object.defineProperties(Ht.prototype,{dispatch:{value:Ht.prototype.emit},run:{value:Ht.prototype.emit}});var fr=class{constructor(e=0,t=0){this._width=e,this._height=t,this.destroyed=!1,this.internal=!1,this.onResize=new Ht("setRealSize"),this.onUpdate=new Ht("update"),this.onError=new Ht("onError")}bind(e){this.onResize.add(e),this.onUpdate.add(e),this.onError.add(e),(this._width||this._height)&&this.onResize.emit(this._width,this._height)}unbind(e){this.onResize.remove(e),this.onUpdate.remove(e),this.onError.remove(e)}resize(e,t){(e!==this._width||t!==this._height)&&(this._width=e,this._height=t,this.onResize.emit(e,t))}get valid(){return!!this._width&&!!this._height}update(){this.destroyed||this.onUpdate.emit()}load(){return Promise.resolve(this)}get width(){return this._width}get height(){return this._height}style(e,t,i){return!1}dispose(){}destroy(){this.destroyed||(this.destroyed=!0,this.dispose(),this.onError.removeAll(),this.onError=null,this.onResize.removeAll(),this.onResize=null,this.onUpdate.removeAll(),this.onUpdate=null)}static test(e,t){return!1}};var Q0=class extends fr{constructor(e,t){let{width:i,height:s}=t||{};if(!i||!s)throw new Error("BufferResource width or height invalid");super(i,s),this.data=e}upload(e,t,i){let s=e.gl;s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.alphaMode===Qt.UNPACK);let n=t.realWidth,o=t.realHeight;return i.width===n&&i.height===o?s.texSubImage2D(t.target,0,0,0,n,o,t.format,i.type,this.data):(i.width=n,i.height=o,s.texImage2D(t.target,0,i.internalFormat,n,o,0,t.format,i.type,this.data)),!0}dispose(){this.data=null}static test(e){return e instanceof Float32Array||e instanceof Uint8Array||e instanceof Uint32Array}};var nE={scaleMode:Nr.NEAREST,format:le.RGBA,alphaMode:Qt.NPM},Zo=class extends js.default{constructor(r=null,e=null){super(),e=Object.assign({},Zo.defaultOptions,e);let{alphaMode:t,mipmap:i,anisotropicLevel:s,scaleMode:n,width:o,height:a,wrapMode:l,format:c,type:h,target:d,resolution:p,resourceOptions:g}=e;r&&!(r instanceof fr)&&(r=Ko(r,g),r.internal=!0),this.resolution=p||K.RESOLUTION,this.width=Math.round((o||0)*this.resolution)/this.resolution,this.height=Math.round((a||0)*this.resolution)/this.resolution,this._mipmap=i,this.anisotropicLevel=s,this._wrapMode=l,this._scaleMode=n,this.format=c,this.type=h,this.target=d,this.alphaMode=t,this.uid=_i(),this.touched=0,this.isPowerOfTwo=!1,this._refreshPOT(),this._glTextures={},this.dirtyId=0,this.dirtyStyleId=0,this.cacheId=null,this.valid=o>0&&a>0,this.textureCacheIds=[],this.destroyed=!1,this.resource=null,this._batchEnabled=0,this._batchLocation=0,this.parentTextureArray=null,this.setResource(r)}get realWidth(){return Math.round(this.width*this.resolution)}get realHeight(){return Math.round(this.height*this.resolution)}get mipmap(){return this._mipmap}set mipmap(r){this._mipmap!==r&&(this._mipmap=r,this.dirtyStyleId++)}get scaleMode(){return this._scaleMode}set scaleMode(r){this._scaleMode!==r&&(this._scaleMode=r,this.dirtyStyleId++)}get wrapMode(){return this._wrapMode}set wrapMode(r){this._wrapMode!==r&&(this._wrapMode=r,this.dirtyStyleId++)}setStyle(r,e){let t;return r!==void 0&&r!==this.scaleMode&&(this.scaleMode=r,t=!0),e!==void 0&&e!==this.mipmap&&(this.mipmap=e,t=!0),t&&this.dirtyStyleId++,this}setSize(r,e,t){return t=t||this.resolution,this.setRealSize(r*t,e*t,t)}setRealSize(r,e,t){return this.resolution=t||this.resolution,this.width=Math.round(r)/this.resolution,this.height=Math.round(e)/this.resolution,this._refreshPOT(),this.update(),this}_refreshPOT(){this.isPowerOfTwo=Ol(this.realWidth)&&Ol(this.realHeight)}setResolution(r){let e=this.resolution;return e===r?this:(this.resolution=r,this.valid&&(this.width=Math.round(this.width*e)/r,this.height=Math.round(this.height*e)/r,this.emit("update",this)),this._refreshPOT(),this)}setResource(r){if(this.resource===r)return this;if(this.resource)throw new Error("Resource can be set only once");return r.bind(this),this.resource=r,this}update(){this.valid?(this.dirtyId++,this.dirtyStyleId++,this.emit("update",this)):this.width>0&&this.height>0&&(this.valid=!0,this.emit("loaded",this),this.emit("update",this))}onError(r){this.emit("error",this,r)}destroy(){this.resource&&(this.resource.unbind(this),this.resource.internal&&this.resource.destroy(),this.resource=null),this.cacheId&&(delete O0[this.cacheId],delete c0[this.cacheId],this.cacheId=null),this.dispose(),Zo.removeFromCache(this),this.textureCacheIds=null,this.destroyed=!0}dispose(){this.emit("dispose",this)}castToBaseTexture(){return this}static from(r,e,t=K.STRICT_TEXTURE_CACHE){let i=typeof r=="string",s=null;if(i)s=r;else{if(!r._pixiId){let o=e?.pixiIdPrefix||"pixiid";r._pixiId=`${o}_${_i()}`}s=r._pixiId}let n=O0[s];if(i&&t&&!n)throw new Error(`The cacheId "${s}" does not exist in BaseTextureCache.`);return n||(n=new Zo(r,e),n.cacheId=s,Zo.addToCache(n,s)),n}static fromBuffer(r,e,t,i){r=r||new Float32Array(e*t*4);let s=new Q0(r,{width:e,height:t}),n=r instanceof Float32Array?Ce.FLOAT:Ce.UNSIGNED_BYTE;return new Zo(s,Object.assign({},nE,{type:n},i))}static addToCache(r,e){e&&(r.textureCacheIds.includes(e)||r.textureCacheIds.push(e),O0[e]&&O0[e]!==r&&console.warn(`BaseTexture added to the cache with an id [${e}] that already had an entry`),O0[e]=r)}static removeFromCache(r){if(typeof r=="string"){let e=O0[r];if(e){let t=e.textureCacheIds.indexOf(r);return t>-1&&e.textureCacheIds.splice(t,1),delete O0[r],e}}else if(r?.textureCacheIds){for(let e=0;e<r.textureCacheIds.length;++e)delete O0[r.textureCacheIds[e]];return r.textureCacheIds.length=0,r}return null}},we=Zo;we.defaultOptions={mipmap:x0.POW2,anisotropicLevel:0,scaleMode:Nr.LINEAR,wrapMode:dr.CLAMP,alphaMode:Qt.UNPACK,target:ls.TEXTURE_2D,format:le.RGBA,type:Ce.UNSIGNED_BYTE};we._globalBatch=0;var qs=class{constructor(){this.texArray=null,this.blend=0,this.type=K0.TRIANGLES,this.start=0,this.size=0,this.data=null}};var oE=0,ft=class r{constructor(e,t=!0,i=!1){this.data=e||new Float32Array(1),this._glBuffers={},this._updateID=0,this.index=i,this.static=t,this.id=oE++,this.disposeRunner=new Ht("disposeBuffer")}update(e){e instanceof Array&&(e=new Float32Array(e)),this.data=e||this.data,this._updateID++}dispose(){this.disposeRunner.emit(this,!1)}destroy(){this.dispose(),this.data=null}set index(e){this.type=e?Z0.ELEMENT_ARRAY_BUFFER:Z0.ARRAY_BUFFER}get index(){return this.type===Z0.ELEMENT_ARRAY_BUFFER}static from(e){return e instanceof Array&&(e=new Float32Array(e)),new r(e)}};var Qo=class r{constructor(e,t=0,i=!1,s=Ce.FLOAT,n,o,a,l=1){this.buffer=e,this.size=t,this.normalized=i,this.type=s,this.stride=n,this.start=o,this.instance=a,this.divisor=l}destroy(){this.buffer=null}static from(e,t,i,s,n){return new r(e,t,i,s,n)}};var aE={Float32Array,Uint32Array,Int32Array,Uint8Array};function c3(r,e){let t=0,i=0,s={};for(let l=0;l<r.length;l++)i+=e[l],t+=r[l].length;let n=new ArrayBuffer(t*4),o=null,a=0;for(let l=0;l<r.length;l++){let c=e[l],h=r[l],d=Ws(h);s[d]||(s[d]=new aE[d](n)),o=s[d];for(let p=0;p<h.length;p++){let g=(p/c|0)*i+a,v=p%c;o[g+v]=h[p]}a+=c}return new Float32Array(n)}var u3={5126:4,5123:2,5121:1},lE=0,cE={Float32Array,Uint32Array,Int32Array,Uint8Array,Uint16Array},gr=class r{constructor(e=[],t={}){this.buffers=e,this.indexBuffer=null,this.attributes=t,this.glVertexArrayObjects={},this.id=lE++,this.instanced=!1,this.instanceCount=1,this.disposeRunner=new Ht("disposeGeometry"),this.refCount=0}addAttribute(e,t,i=0,s=!1,n,o,a,l=!1){if(!t)throw new Error("You must pass a buffer when creating an attribute");t instanceof ft||(t instanceof Array&&(t=new Float32Array(t)),t=new ft(t));let c=e.split("|");if(c.length>1){for(let d=0;d<c.length;d++)this.addAttribute(c[d],t,i,s,n);return this}let h=this.buffers.indexOf(t);return h===-1&&(this.buffers.push(t),h=this.buffers.length-1),this.attributes[e]=new Qo(h,i,s,n,o,a,l),this.instanced=this.instanced||l,this}getAttribute(e){return this.attributes[e]}getBuffer(e){return this.buffers[this.getAttribute(e).buffer]}addIndex(e){return e instanceof ft||(e instanceof Array&&(e=new Uint16Array(e)),e=new ft(e)),e.type=Z0.ELEMENT_ARRAY_BUFFER,this.indexBuffer=e,this.buffers.includes(e)||this.buffers.push(e),this}getIndex(){return this.indexBuffer}interleave(){if(this.buffers.length===1||this.buffers.length===2&&this.indexBuffer)return this;let e=[],t=[],i=new ft,s;for(s in this.attributes){let n=this.attributes[s],o=this.buffers[n.buffer];e.push(o.data),t.push(n.size*u3[n.type]/4),n.buffer=0}for(i.data=c3(e,t),s=0;s<this.buffers.length;s++)this.buffers[s]!==this.indexBuffer&&this.buffers[s].destroy();return this.buffers=[i],this.indexBuffer&&this.buffers.push(this.indexBuffer),this}getSize(){for(let e in this.attributes){let t=this.attributes[e];return this.buffers[t.buffer].data.length/(t.stride/4||t.size)}return 0}dispose(){this.disposeRunner.emit(this,!1)}destroy(){this.dispose(),this.buffers=null,this.indexBuffer=null,this.attributes=null}clone(){let e=new r;for(let t=0;t<this.buffers.length;t++)e.buffers[t]=new ft(this.buffers[t].data.slice(0));for(let t in this.attributes){let i=this.attributes[t];e.attributes[t]=new Qo(i.buffer,i.size,i.normalized,i.type,i.stride,i.start,i.instance)}return this.indexBuffer&&(e.indexBuffer=e.buffers[this.buffers.indexOf(this.indexBuffer)],e.indexBuffer.type=Z0.ELEMENT_ARRAY_BUFFER),e}static merge(e){let t=new r,i=[],s=[],n=[],o;for(let a=0;a<e.length;a++){o=e[a];for(let l=0;l<o.buffers.length;l++)s[l]=s[l]||0,s[l]+=o.buffers[l].data.length,n[l]=0}for(let a=0;a<o.buffers.length;a++)i[a]=new cE[Ws(o.buffers[a].data)](s[a]),t.buffers[a]=new ft(i[a]);for(let a=0;a<e.length;a++){o=e[a];for(let l=0;l<o.buffers.length;l++)i[l].set(o.buffers[l].data,n[l]),n[l]+=o.buffers[l].data.length}if(t.attributes=o.attributes,o.indexBuffer){t.indexBuffer=t.buffers[o.buffers.indexOf(o.indexBuffer)],t.indexBuffer.type=Z0.ELEMENT_ARRAY_BUFFER;let a=0,l=0,c=0,h=0;for(let d=0;d<o.buffers.length;d++)if(o.buffers[d]!==o.indexBuffer){h=d;break}for(let d in o.attributes){let p=o.attributes[d];(p.buffer|0)===h&&(l+=p.size*u3[p.type]/4)}for(let d=0;d<e.length;d++){let p=e[d].indexBuffer.data;for(let g=0;g<p.length;g++)t.indexBuffer.data[g+c]+=a;a+=e[d].buffers[h].data.length/l,c+=p.length}}return t}};var Wn=class extends gr{constructor(e=!1){super(),this._buffer=new ft(null,e,!1),this._indexBuffer=new ft(null,e,!0),this.addAttribute("aVertexPosition",this._buffer,2,!1,Ce.FLOAT).addAttribute("aTextureCoord",this._buffer,2,!1,Ce.FLOAT).addAttribute("aColor",this._buffer,4,!0,Ce.UNSIGNED_BYTE).addAttribute("aTextureId",this._buffer,1,!0,Ce.FLOAT).addIndex(this._indexBuffer)}};var Ys=Math.PI*2,Kp=180/Math.PI,Zp=Math.PI/180,vt=(r=>(r[r.POLY=0]="POLY",r[r.RECT=1]="RECT",r[r.CIRC=2]="CIRC",r[r.ELIP=3]="ELIP",r[r.RREC=4]="RREC",r))(vt||{});var Ne=class r{constructor(e=0,t=0){this.x=0,this.y=0,this.x=e,this.y=t}clone(){return new r(this.x,this.y)}copyFrom(e){return this.set(e.x,e.y),this}copyTo(e){return e.set(this.x,this.y),e}equals(e){return e.x===this.x&&e.y===this.y}set(e=0,t=e){return this.x=e,this.y=t,this}toString(){return`[@pixi/math:Point x=${this.x} y=${this.y}]`}};var Oh=[new Ne,new Ne,new Ne,new Ne],Ie=class r{constructor(e=0,t=0,i=0,s=0){this.x=Number(e),this.y=Number(t),this.width=Number(i),this.height=Number(s),this.type=vt.RECT}get left(){return this.x}get right(){return this.x+this.width}get top(){return this.y}get bottom(){return this.y+this.height}static get EMPTY(){return new r(0,0,0,0)}clone(){return new r(this.x,this.y,this.width,this.height)}copyFrom(e){return this.x=e.x,this.y=e.y,this.width=e.width,this.height=e.height,this}copyTo(e){return e.x=this.x,e.y=this.y,e.width=this.width,e.height=this.height,e}contains(e,t){return this.width<=0||this.height<=0?!1:e>=this.x&&e<this.x+this.width&&t>=this.y&&t<this.y+this.height}intersects(e,t){if(!t){let R=this.x<e.x?e.x:this.x;if((this.right>e.right?e.right:this.right)<=R)return!1;let U=this.y<e.y?e.y:this.y;return(this.bottom>e.bottom?e.bottom:this.bottom)>U}let i=this.left,s=this.right,n=this.top,o=this.bottom;if(s<=i||o<=n)return!1;let a=Oh[0].set(e.left,e.top),l=Oh[1].set(e.left,e.bottom),c=Oh[2].set(e.right,e.top),h=Oh[3].set(e.right,e.bottom);if(c.x<=a.x||l.y<=a.y)return!1;let d=Math.sign(t.a*t.d-t.b*t.c);if(d===0||(t.apply(a,a),t.apply(l,l),t.apply(c,c),t.apply(h,h),Math.max(a.x,l.x,c.x,h.x)<=i||Math.min(a.x,l.x,c.x,h.x)>=s||Math.max(a.y,l.y,c.y,h.y)<=n||Math.min(a.y,l.y,c.y,h.y)>=o))return!1;let p=d*(l.y-a.y),g=d*(a.x-l.x),v=p*i+g*n,C=p*s+g*n,w=p*i+g*o,k=p*s+g*o;if(Math.max(v,C,w,k)<=p*a.x+g*a.y||Math.min(v,C,w,k)>=p*h.x+g*h.y)return!1;let B=d*(a.y-c.y),L=d*(c.x-a.x),T=B*i+L*n,W=B*s+L*n,j=B*i+L*o,I=B*s+L*o;return!(Math.max(T,W,j,I)<=B*a.x+L*a.y||Math.min(T,W,j,I)>=B*h.x+L*h.y)}pad(e=0,t=e){return this.x-=e,this.y-=t,this.width+=e*2,this.height+=t*2,this}fit(e){let t=Math.max(this.x,e.x),i=Math.min(this.x+this.width,e.x+e.width),s=Math.max(this.y,e.y),n=Math.min(this.y+this.height,e.y+e.height);return this.x=t,this.width=Math.max(i-t,0),this.y=s,this.height=Math.max(n-s,0),this}ceil(e=1,t=.001){let i=Math.ceil((this.x+this.width-t)*e)/e,s=Math.ceil((this.y+this.height-t)*e)/e;return this.x=Math.floor((this.x+t)*e)/e,this.y=Math.floor((this.y+t)*e)/e,this.width=i-this.x,this.height=s-this.y,this}enlarge(e){let t=Math.min(this.x,e.x),i=Math.max(this.x+this.width,e.x+e.width),s=Math.min(this.y,e.y),n=Math.max(this.y+this.height,e.y+e.height);return this.x=t,this.width=i-t,this.y=s,this.height=n-s,this}toString(){return`[@pixi/math:Rectangle x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}};var zl=class r{constructor(e=0,t=0,i=0){this.x=e,this.y=t,this.radius=i,this.type=vt.CIRC}clone(){return new r(this.x,this.y,this.radius)}contains(e,t){if(this.radius<=0)return!1;let i=this.radius*this.radius,s=this.x-e,n=this.y-t;return s*=s,n*=n,s+n<=i}getBounds(){return new Ie(this.x-this.radius,this.y-this.radius,this.radius*2,this.radius*2)}toString(){return`[@pixi/math:Circle x=${this.x} y=${this.y} radius=${this.radius}]`}};var Wl=class r{constructor(e=0,t=0,i=0,s=0){this.x=e,this.y=t,this.width=i,this.height=s,this.type=vt.ELIP}clone(){return new r(this.x,this.y,this.width,this.height)}contains(e,t){if(this.width<=0||this.height<=0)return!1;let i=(e-this.x)/this.width,s=(t-this.y)/this.height;return i*=i,s*=s,i+s<=1}getBounds(){return new Ie(this.x-this.width,this.y-this.height,this.width,this.height)}toString(){return`[@pixi/math:Ellipse x=${this.x} y=${this.y} width=${this.width} height=${this.height}]`}};var hs=class r{constructor(...e){let t=Array.isArray(e[0])?e[0]:e;if(typeof t[0]!="number"){let i=[];for(let s=0,n=t.length;s<n;s++)i.push(t[s].x,t[s].y);t=i}this.points=t,this.type=vt.POLY,this.closeStroke=!0}clone(){let e=this.points.slice(),t=new r(e);return t.closeStroke=this.closeStroke,t}contains(e,t){let i=!1,s=this.points.length/2;for(let n=0,o=s-1;n<s;o=n++){let a=this.points[n*2],l=this.points[n*2+1],c=this.points[o*2],h=this.points[o*2+1];l>t!=h>t&&e<(c-a)*((t-l)/(h-l))+a&&(i=!i)}return i}toString(){return`[@pixi/math:PolygoncloseStroke=${this.closeStroke}points=${this.points.reduce((e,t)=>`${e}, ${t}`,"")}]`}};var Hl=class r{constructor(e=0,t=0,i=0,s=0,n=20){this.x=e,this.y=t,this.width=i,this.height=s,this.radius=n,this.type=vt.RREC}clone(){return new r(this.x,this.y,this.width,this.height,this.radius)}contains(e,t){if(this.width<=0||this.height<=0)return!1;if(e>=this.x&&e<=this.x+this.width&&t>=this.y&&t<=this.y+this.height){let i=Math.max(0,Math.min(this.radius,Math.min(this.width,this.height)/2));if(t>=this.y+i&&t<=this.y+this.height-i||e>=this.x+i&&e<=this.x+this.width-i)return!0;let s=e-(this.x+i),n=t-(this.y+i),o=i*i;if(s*s+n*n<=o||(s=e-(this.x+this.width-i),s*s+n*n<=o)||(n=t-(this.y+this.height-i),s*s+n*n<=o)||(s=e-(this.x+i),s*s+n*n<=o))return!0}return!1}toString(){return`[@pixi/math:RoundedRectangle x=${this.x} y=${this.y}width=${this.width} height=${this.height} radius=${this.radius}]`}};var je=class r{constructor(e=1,t=0,i=0,s=1,n=0,o=0){this.array=null,this.a=e,this.b=t,this.c=i,this.d=s,this.tx=n,this.ty=o}fromArray(e){this.a=e[0],this.b=e[1],this.c=e[3],this.d=e[4],this.tx=e[2],this.ty=e[5]}set(e,t,i,s,n,o){return this.a=e,this.b=t,this.c=i,this.d=s,this.tx=n,this.ty=o,this}toArray(e,t){this.array||(this.array=new Float32Array(9));let i=t||this.array;return e?(i[0]=this.a,i[1]=this.b,i[2]=0,i[3]=this.c,i[4]=this.d,i[5]=0,i[6]=this.tx,i[7]=this.ty,i[8]=1):(i[0]=this.a,i[1]=this.c,i[2]=this.tx,i[3]=this.b,i[4]=this.d,i[5]=this.ty,i[6]=0,i[7]=0,i[8]=1),i}apply(e,t){t=t||new Ne;let i=e.x,s=e.y;return t.x=this.a*i+this.c*s+this.tx,t.y=this.b*i+this.d*s+this.ty,t}applyInverse(e,t){t=t||new Ne;let i=1/(this.a*this.d+this.c*-this.b),s=e.x,n=e.y;return t.x=this.d*i*s+-this.c*i*n+(this.ty*this.c-this.tx*this.d)*i,t.y=this.a*i*n+-this.b*i*s+(-this.ty*this.a+this.tx*this.b)*i,t}translate(e,t){return this.tx+=e,this.ty+=t,this}scale(e,t){return this.a*=e,this.d*=t,this.c*=e,this.b*=t,this.tx*=e,this.ty*=t,this}rotate(e){let t=Math.cos(e),i=Math.sin(e),s=this.a,n=this.c,o=this.tx;return this.a=s*t-this.b*i,this.b=s*i+this.b*t,this.c=n*t-this.d*i,this.d=n*i+this.d*t,this.tx=o*t-this.ty*i,this.ty=o*i+this.ty*t,this}append(e){let t=this.a,i=this.b,s=this.c,n=this.d;return this.a=e.a*t+e.b*s,this.b=e.a*i+e.b*n,this.c=e.c*t+e.d*s,this.d=e.c*i+e.d*n,this.tx=e.tx*t+e.ty*s+this.tx,this.ty=e.tx*i+e.ty*n+this.ty,this}setTransform(e,t,i,s,n,o,a,l,c){return this.a=Math.cos(a+c)*n,this.b=Math.sin(a+c)*n,this.c=-Math.sin(a-l)*o,this.d=Math.cos(a-l)*o,this.tx=e-(i*this.a+s*this.c),this.ty=t-(i*this.b+s*this.d),this}prepend(e){let t=this.tx;if(e.a!==1||e.b!==0||e.c!==0||e.d!==1){let i=this.a,s=this.c;this.a=i*e.a+this.b*e.c,this.b=i*e.b+this.b*e.d,this.c=s*e.a+this.d*e.c,this.d=s*e.b+this.d*e.d}return this.tx=t*e.a+this.ty*e.c+e.tx,this.ty=t*e.b+this.ty*e.d+e.ty,this}decompose(e){let t=this.a,i=this.b,s=this.c,n=this.d,o=e.pivot,a=-Math.atan2(-s,n),l=Math.atan2(i,t),c=Math.abs(a+l);return c<1e-5||Math.abs(Ys-c)<1e-5?(e.rotation=l,e.skew.x=e.skew.y=0):(e.rotation=0,e.skew.x=a,e.skew.y=l),e.scale.x=Math.sqrt(t*t+i*i),e.scale.y=Math.sqrt(s*s+n*n),e.position.x=this.tx+(o.x*t+o.y*s),e.position.y=this.ty+(o.x*i+o.y*n),e}invert(){let e=this.a,t=this.b,i=this.c,s=this.d,n=this.tx,o=e*s-t*i;return this.a=s/o,this.b=-t/o,this.c=-i/o,this.d=e/o,this.tx=(i*this.ty-s*n)/o,this.ty=-(e*this.ty-t*n)/o,this}identity(){return this.a=1,this.b=0,this.c=0,this.d=1,this.tx=0,this.ty=0,this}clone(){let e=new r;return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e}copyTo(e){return e.a=this.a,e.b=this.b,e.c=this.c,e.d=this.d,e.tx=this.tx,e.ty=this.ty,e}copyFrom(e){return this.a=e.a,this.b=e.b,this.c=e.c,this.d=e.d,this.tx=e.tx,this.ty=e.ty,this}toString(){return`[@pixi/math:Matrix a=${this.a} b=${this.b} c=${this.c} d=${this.d} tx=${this.tx} ty=${this.ty}]`}static get IDENTITY(){return new r}static get TEMP_MATRIX(){return new r}};var Hn=[1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1,0,1],jn=[0,1,1,1,0,-1,-1,-1,0,1,1,1,0,-1,-1,-1],$n=[0,-1,-1,-1,0,1,1,1,0,1,1,1,0,-1,-1,-1],qn=[1,1,0,-1,-1,-1,0,1,-1,-1,0,1,1,1,0,-1],Qp=[],h3=[],Gh=Math.sign;function uE(){for(let r=0;r<16;r++){let e=[];Qp.push(e);for(let t=0;t<16;t++){let i=Gh(Hn[r]*Hn[t]+$n[r]*jn[t]),s=Gh(jn[r]*Hn[t]+qn[r]*jn[t]),n=Gh(Hn[r]*$n[t]+$n[r]*qn[t]),o=Gh(jn[r]*$n[t]+qn[r]*qn[t]);for(let a=0;a<16;a++)if(Hn[a]===i&&jn[a]===s&&$n[a]===n&&qn[a]===o){e.push(a);break}}}for(let r=0;r<16;r++){let e=new je;e.set(Hn[r],jn[r],$n[r],qn[r],0,0),h3.push(e)}}uE();var Ct={E:0,SE:1,S:2,SW:3,W:4,NW:5,N:6,NE:7,MIRROR_VERTICAL:8,MAIN_DIAGONAL:10,MIRROR_HORIZONTAL:12,REVERSE_DIAGONAL:14,uX:r=>Hn[r],uY:r=>jn[r],vX:r=>$n[r],vY:r=>qn[r],inv:r=>r&8?r&15:-r&7,add:(r,e)=>Qp[r][e],sub:(r,e)=>Qp[r][Ct.inv(e)],rotate180:r=>r^4,isVertical:r=>(r&3)===2,byDirection:(r,e)=>Math.abs(r)*2<=Math.abs(e)?e>=0?Ct.S:Ct.N:Math.abs(e)*2<=Math.abs(r)?r>0?Ct.E:Ct.W:e>0?r>0?Ct.SE:Ct.SW:r>0?Ct.NE:Ct.NW,matrixAppendRotationInv:(r,e,t=0,i=0)=>{let s=h3[Ct.inv(e)];s.tx=t,s.ty=i,r.append(s)}};var Rr=class r{constructor(e,t,i=0,s=0){this._x=i,this._y=s,this.cb=e,this.scope=t}clone(e=this.cb,t=this.scope){return new r(e,t,this._x,this._y)}set(e=0,t=e){return(this._x!==e||this._y!==t)&&(this._x=e,this._y=t,this.cb.call(this.scope)),this}copyFrom(e){return(this._x!==e.x||this._y!==e.y)&&(this._x=e.x,this._y=e.y,this.cb.call(this.scope)),this}copyTo(e){return e.set(this._x,this._y),e}equals(e){return e.x===this._x&&e.y===this._y}toString(){return`[@pixi/math:ObservablePoint x=0 y=0 scope=${this.scope}]`}get x(){return this._x}set x(e){this._x!==e&&(this._x=e,this.cb.call(this.scope))}get y(){return this._y}set y(e){this._y!==e&&(this._y=e,this.cb.call(this.scope))}};var d3=class{constructor(){this.worldTransform=new je,this.localTransform=new je,this.position=new Rr(this.onChange,this,0,0),this.scale=new Rr(this.onChange,this,1,1),this.pivot=new Rr(this.onChange,this,0,0),this.skew=new Rr(this.updateSkew,this,0,0),this._rotation=0,this._cx=1,this._sx=0,this._cy=0,this._sy=1,this._localID=0,this._currentLocalID=0,this._worldID=0,this._parentID=0}onChange(){this._localID++}updateSkew(){this._cx=Math.cos(this._rotation+this.skew.y),this._sx=Math.sin(this._rotation+this.skew.y),this._cy=-Math.sin(this._rotation-this.skew.x),this._sy=Math.cos(this._rotation-this.skew.x),this._localID++}toString(){return`[@pixi/math:Transform position=(${this.position.x}, ${this.position.y}) rotation=${this.rotation} scale=(${this.scale.x}, ${this.scale.y}) skew=(${this.skew.x}, ${this.skew.y}) ]`}updateLocalTransform(){let r=this.localTransform;this._localID!==this._currentLocalID&&(r.a=this._cx*this.scale.x,r.b=this._sx*this.scale.x,r.c=this._cy*this.scale.y,r.d=this._sy*this.scale.y,r.tx=this.position.x-(this.pivot.x*r.a+this.pivot.y*r.c),r.ty=this.position.y-(this.pivot.x*r.b+this.pivot.y*r.d),this._currentLocalID=this._localID,this._parentID=-1)}updateTransform(r){let e=this.localTransform;if(this._localID!==this._currentLocalID&&(e.a=this._cx*this.scale.x,e.b=this._sx*this.scale.x,e.c=this._cy*this.scale.y,e.d=this._sy*this.scale.y,e.tx=this.position.x-(this.pivot.x*e.a+this.pivot.y*e.c),e.ty=this.position.y-(this.pivot.x*e.b+this.pivot.y*e.d),this._currentLocalID=this._localID,this._parentID=-1),this._parentID!==r._worldID){let t=r.worldTransform,i=this.worldTransform;i.a=e.a*t.a+e.b*t.c,i.b=e.a*t.b+e.b*t.d,i.c=e.c*t.a+e.d*t.c,i.d=e.c*t.b+e.d*t.d,i.tx=e.tx*t.a+e.ty*t.c+t.tx,i.ty=e.tx*t.b+e.ty*t.d+t.ty,this._parentID=r._worldID,this._worldID++}}setFromMatrix(r){r.decompose(this),this._localID++}get rotation(){return this._rotation}set rotation(r){this._rotation!==r&&(this._rotation=r,this.updateSkew())}},Yn=d3;Yn.IDENTITY=new d3;var p3=`varying vec2 vTextureCoord;
|
|
|
|
uniform sampler2D uSampler;
|
|
|
|
void main(void){
|
|
gl_FragColor *= texture2D(uSampler, vTextureCoord);
|
|
}`;var f3=`attribute vec2 aVertexPosition;
|
|
attribute vec2 aTextureCoord;
|
|
|
|
uniform mat3 projectionMatrix;
|
|
|
|
varying vec2 vTextureCoord;
|
|
|
|
void main(void){
|
|
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
|
vTextureCoord = aTextureCoord;
|
|
}
|
|
`;function Uh(r,e,t){let i=r.createShader(e);return r.shaderSource(i,t),r.compileShader(i),i}function Jp(r){let e=new Array(r);for(let t=0;t<e.length;t++)e[t]=!1;return e}function jl(r,e){switch(r){case"float":return 0;case"vec2":return new Float32Array(2*e);case"vec3":return new Float32Array(3*e);case"vec4":return new Float32Array(4*e);case"int":case"uint":case"sampler2D":case"sampler2DArray":return 0;case"ivec2":return new Int32Array(2*e);case"ivec3":return new Int32Array(3*e);case"ivec4":return new Int32Array(4*e);case"uvec2":return new Uint32Array(2*e);case"uvec3":return new Uint32Array(3*e);case"uvec4":return new Uint32Array(4*e);case"bool":return!1;case"bvec2":return Jp(2*e);case"bvec3":return Jp(3*e);case"bvec4":return Jp(4*e);case"mat2":return new Float32Array([1,0,0,1]);case"mat3":return new Float32Array([1,0,0,0,1,0,0,0,1]);case"mat4":return new Float32Array([1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1])}return null}var Fi=[{test:r=>r.type==="float"&&r.size===1&&!r.isArray,code:r=>`
|
|
if(uv["${r}"] !== ud["${r}"].value)
|
|
{
|
|
ud["${r}"].value = uv["${r}"]
|
|
gl.uniform1f(ud["${r}"].location, uv["${r}"])
|
|
}
|
|
`},{test:(r,e)=>(r.type==="sampler2D"||r.type==="samplerCube"||r.type==="sampler2DArray")&&r.size===1&&!r.isArray&&(e==null||e.castToBaseTexture!==void 0),code:r=>`t = syncData.textureCount++;
|
|
|
|
renderer.texture.bind(uv["${r}"], t);
|
|
|
|
if(ud["${r}"].value !== t)
|
|
{
|
|
ud["${r}"].value = t;
|
|
gl.uniform1i(ud["${r}"].location, t);
|
|
; // eslint-disable-line max-len
|
|
}`},{test:(r,e)=>r.type==="mat3"&&r.size===1&&!r.isArray&&e.a!==void 0,code:r=>`
|
|
gl.uniformMatrix3fv(ud["${r}"].location, false, uv["${r}"].toArray(true));
|
|
`,codeUbo:r=>`
|
|
var ${r}_matrix = uv.${r}.toArray(true);
|
|
|
|
data[offset] = ${r}_matrix[0];
|
|
data[offset+1] = ${r}_matrix[1];
|
|
data[offset+2] = ${r}_matrix[2];
|
|
|
|
data[offset + 4] = ${r}_matrix[3];
|
|
data[offset + 5] = ${r}_matrix[4];
|
|
data[offset + 6] = ${r}_matrix[5];
|
|
|
|
data[offset + 8] = ${r}_matrix[6];
|
|
data[offset + 9] = ${r}_matrix[7];
|
|
data[offset + 10] = ${r}_matrix[8];
|
|
`},{test:(r,e)=>r.type==="vec2"&&r.size===1&&!r.isArray&&e.x!==void 0,code:r=>`
|
|
cv = ud["${r}"].value;
|
|
v = uv["${r}"];
|
|
|
|
if(cv[0] !== v.x || cv[1] !== v.y)
|
|
{
|
|
cv[0] = v.x;
|
|
cv[1] = v.y;
|
|
gl.uniform2f(ud["${r}"].location, v.x, v.y);
|
|
}`,codeUbo:r=>`
|
|
v = uv.${r};
|
|
|
|
data[offset] = v.x;
|
|
data[offset+1] = v.y;
|
|
`},{test:r=>r.type==="vec2"&&r.size===1&&!r.isArray,code:r=>`
|
|
cv = ud["${r}"].value;
|
|
v = uv["${r}"];
|
|
|
|
if(cv[0] !== v[0] || cv[1] !== v[1])
|
|
{
|
|
cv[0] = v[0];
|
|
cv[1] = v[1];
|
|
gl.uniform2f(ud["${r}"].location, v[0], v[1]);
|
|
}
|
|
`},{test:(r,e)=>r.type==="vec4"&&r.size===1&&!r.isArray&&e.width!==void 0,code:r=>`
|
|
cv = ud["${r}"].value;
|
|
v = uv["${r}"];
|
|
|
|
if(cv[0] !== v.x || cv[1] !== v.y || cv[2] !== v.width || cv[3] !== v.height)
|
|
{
|
|
cv[0] = v.x;
|
|
cv[1] = v.y;
|
|
cv[2] = v.width;
|
|
cv[3] = v.height;
|
|
gl.uniform4f(ud["${r}"].location, v.x, v.y, v.width, v.height)
|
|
}`,codeUbo:r=>`
|
|
v = uv.${r};
|
|
|
|
data[offset] = v.x;
|
|
data[offset+1] = v.y;
|
|
data[offset+2] = v.width;
|
|
data[offset+3] = v.height;
|
|
`},{test:(r,e)=>r.type==="vec4"&&r.size===1&&!r.isArray&&e.red!==void 0,code:r=>`
|
|
cv = ud["${r}"].value;
|
|
v = uv["${r}"];
|
|
|
|
if(cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.alpha)
|
|
{
|
|
cv[0] = v.red;
|
|
cv[1] = v.green;
|
|
cv[2] = v.blue;
|
|
cv[3] = v.alpha;
|
|
gl.uniform4f(ud["${r}"].location, v.red, v.green, v.blue, v.alpha)
|
|
}`,codeUbo:r=>`
|
|
v = uv.${r};
|
|
|
|
data[offset] = v.red;
|
|
data[offset+1] = v.green;
|
|
data[offset+2] = v.blue;
|
|
data[offset+3] = v.alpha;
|
|
`},{test:(r,e)=>r.type==="vec3"&&r.size===1&&!r.isArray&&e.red!==void 0,code:r=>`
|
|
cv = ud["${r}"].value;
|
|
v = uv["${r}"];
|
|
|
|
if(cv[0] !== v.red || cv[1] !== v.green || cv[2] !== v.blue || cv[3] !== v.a)
|
|
{
|
|
cv[0] = v.red;
|
|
cv[1] = v.green;
|
|
cv[2] = v.blue;
|
|
|
|
gl.uniform3f(ud["${r}"].location, v.red, v.green, v.blue)
|
|
}`,codeUbo:r=>`
|
|
v = uv.${r};
|
|
|
|
data[offset] = v.red;
|
|
data[offset+1] = v.green;
|
|
data[offset+2] = v.blue;
|
|
`},{test:r=>r.type==="vec4"&&r.size===1&&!r.isArray,code:r=>`
|
|
cv = ud["${r}"].value;
|
|
v = uv["${r}"];
|
|
|
|
if(cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
|
|
{
|
|
cv[0] = v[0];
|
|
cv[1] = v[1];
|
|
cv[2] = v[2];
|
|
cv[3] = v[3];
|
|
|
|
gl.uniform4f(ud["${r}"].location, v[0], v[1], v[2], v[3])
|
|
}`}];var hE={float:`
|
|
if (cv !== v)
|
|
{
|
|
cu.value = v;
|
|
gl.uniform1f(location, v);
|
|
}`,vec2:`
|
|
if (cv[0] !== v[0] || cv[1] !== v[1])
|
|
{
|
|
cv[0] = v[0];
|
|
cv[1] = v[1];
|
|
|
|
gl.uniform2f(location, v[0], v[1])
|
|
}`,vec3:`
|
|
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])
|
|
{
|
|
cv[0] = v[0];
|
|
cv[1] = v[1];
|
|
cv[2] = v[2];
|
|
|
|
gl.uniform3f(location, v[0], v[1], v[2])
|
|
}`,vec4:`
|
|
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
|
|
{
|
|
cv[0] = v[0];
|
|
cv[1] = v[1];
|
|
cv[2] = v[2];
|
|
cv[3] = v[3];
|
|
|
|
gl.uniform4f(location, v[0], v[1], v[2], v[3]);
|
|
}`,int:`
|
|
if (cv !== v)
|
|
{
|
|
cu.value = v;
|
|
|
|
gl.uniform1i(location, v);
|
|
}`,ivec2:`
|
|
if (cv[0] !== v[0] || cv[1] !== v[1])
|
|
{
|
|
cv[0] = v[0];
|
|
cv[1] = v[1];
|
|
|
|
gl.uniform2i(location, v[0], v[1]);
|
|
}`,ivec3:`
|
|
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])
|
|
{
|
|
cv[0] = v[0];
|
|
cv[1] = v[1];
|
|
cv[2] = v[2];
|
|
|
|
gl.uniform3i(location, v[0], v[1], v[2]);
|
|
}`,ivec4:`
|
|
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
|
|
{
|
|
cv[0] = v[0];
|
|
cv[1] = v[1];
|
|
cv[2] = v[2];
|
|
cv[3] = v[3];
|
|
|
|
gl.uniform4i(location, v[0], v[1], v[2], v[3]);
|
|
}`,uint:`
|
|
if (cv !== v)
|
|
{
|
|
cu.value = v;
|
|
|
|
gl.uniform1ui(location, v);
|
|
}`,uvec2:`
|
|
if (cv[0] !== v[0] || cv[1] !== v[1])
|
|
{
|
|
cv[0] = v[0];
|
|
cv[1] = v[1];
|
|
|
|
gl.uniform2ui(location, v[0], v[1]);
|
|
}`,uvec3:`
|
|
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])
|
|
{
|
|
cv[0] = v[0];
|
|
cv[1] = v[1];
|
|
cv[2] = v[2];
|
|
|
|
gl.uniform3ui(location, v[0], v[1], v[2]);
|
|
}`,uvec4:`
|
|
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
|
|
{
|
|
cv[0] = v[0];
|
|
cv[1] = v[1];
|
|
cv[2] = v[2];
|
|
cv[3] = v[3];
|
|
|
|
gl.uniform4ui(location, v[0], v[1], v[2], v[3]);
|
|
}`,bool:`
|
|
if (cv !== v)
|
|
{
|
|
cu.value = v;
|
|
gl.uniform1i(location, v);
|
|
}`,bvec2:`
|
|
if (cv[0] != v[0] || cv[1] != v[1])
|
|
{
|
|
cv[0] = v[0];
|
|
cv[1] = v[1];
|
|
|
|
gl.uniform2i(location, v[0], v[1]);
|
|
}`,bvec3:`
|
|
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2])
|
|
{
|
|
cv[0] = v[0];
|
|
cv[1] = v[1];
|
|
cv[2] = v[2];
|
|
|
|
gl.uniform3i(location, v[0], v[1], v[2]);
|
|
}`,bvec4:`
|
|
if (cv[0] !== v[0] || cv[1] !== v[1] || cv[2] !== v[2] || cv[3] !== v[3])
|
|
{
|
|
cv[0] = v[0];
|
|
cv[1] = v[1];
|
|
cv[2] = v[2];
|
|
cv[3] = v[3];
|
|
|
|
gl.uniform4i(location, v[0], v[1], v[2], v[3]);
|
|
}`,mat2:"gl.uniformMatrix2fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",sampler2D:`
|
|
if (cv !== v)
|
|
{
|
|
cu.value = v;
|
|
|
|
gl.uniform1i(location, v);
|
|
}`,samplerCube:`
|
|
if (cv !== v)
|
|
{
|
|
cu.value = v;
|
|
|
|
gl.uniform1i(location, v);
|
|
}`,sampler2DArray:`
|
|
if (cv !== v)
|
|
{
|
|
cu.value = v;
|
|
|
|
gl.uniform1i(location, v);
|
|
}`},dE={float:"gl.uniform1fv(location, v)",vec2:"gl.uniform2fv(location, v)",vec3:"gl.uniform3fv(location, v)",vec4:"gl.uniform4fv(location, v)",mat4:"gl.uniformMatrix4fv(location, false, v)",mat3:"gl.uniformMatrix3fv(location, false, v)",mat2:"gl.uniformMatrix2fv(location, false, v)",int:"gl.uniform1iv(location, v)",ivec2:"gl.uniform2iv(location, v)",ivec3:"gl.uniform3iv(location, v)",ivec4:"gl.uniform4iv(location, v)",uint:"gl.uniform1uiv(location, v)",uvec2:"gl.uniform2uiv(location, v)",uvec3:"gl.uniform3uiv(location, v)",uvec4:"gl.uniform4uiv(location, v)",bool:"gl.uniform1iv(location, v)",bvec2:"gl.uniform2iv(location, v)",bvec3:"gl.uniform3iv(location, v)",bvec4:"gl.uniform4iv(location, v)",sampler2D:"gl.uniform1iv(location, v)",samplerCube:"gl.uniform1iv(location, v)",sampler2DArray:"gl.uniform1iv(location, v)"};function e2(r,e){let t=[`
|
|
var v = null;
|
|
var cv = null;
|
|
var cu = null;
|
|
var t = 0;
|
|
var gl = renderer.gl;
|
|
`];for(let i in r.uniforms){let s=e[i];if(!s){r.uniforms[i]?.group&&(r.uniforms[i].ubo?t.push(`
|
|
renderer.shader.syncUniformBufferGroup(uv.${i}, '${i}');
|
|
`):t.push(`
|
|
renderer.shader.syncUniformGroup(uv.${i}, syncData);
|
|
`));continue}let n=r.uniforms[i],o=!1;for(let a=0;a<Fi.length;a++)if(Fi[a].test(s,n)){t.push(Fi[a].code(i,n)),o=!0;break}if(!o){let l=(s.size===1&&!s.isArray?hE:dE)[s.type].replace("location",`ud["${i}"].location`);t.push(`
|
|
cu = ud["${i}"];
|
|
cv = cu.value;
|
|
v = uv["${i}"];
|
|
${l};`)}}return new Function("ud","uv","renderer","syncData",t.join(`
|
|
`))}var g3={},Vh=g3;function zh(){if(Vh===g3||Vh?.isContextLost()){let r=K.ADAPTER.createCanvas(),e;K.PREFER_ENV>=hr.WEBGL2&&(e=r.getContext("webgl2",{})),e||(e=r.getContext("webgl",{})||r.getContext("experimental-webgl",{}),e?e.getExtension("WEBGL_draw_buffers"):e=null),Vh=e}return Vh}var Wh;function t2(){if(!Wh){Wh=B0.MEDIUM;let r=zh();r&&r.getShaderPrecisionFormat&&(Wh=r.getShaderPrecisionFormat(r.FRAGMENT_SHADER,r.HIGH_FLOAT).precision?B0.HIGH:B0.MEDIUM)}return Wh}function m3(r,e){let t=r.getShaderSource(e).split(`
|
|
`).map((c,h)=>`${h}: ${c}`),i=r.getShaderInfoLog(e),s=i.split(`
|
|
`),n={},o=s.map(c=>parseFloat(c.replace(/^ERROR\: 0\:([\d]+)\:.*$/,"$1"))).filter(c=>c&&!n[c]?(n[c]=!0,!0):!1),a=[""];o.forEach(c=>{t[c-1]=`%c${t[c-1]}%c`,a.push("background: #FF0000; color:#FFFFFF; font-size: 10px","font-size: 10px")});let l=t.join(`
|
|
`);a[0]=l,console.error(i),console.groupCollapsed("click to view full shader code"),console.warn(...a),console.groupEnd()}function r2(r,e,t,i){r.getProgramParameter(e,r.LINK_STATUS)||(r.getShaderParameter(t,r.COMPILE_STATUS)||m3(r,t),r.getShaderParameter(i,r.COMPILE_STATUS)||m3(r,i),console.error("PixiJS Error: Could not initialize shader."),r.getProgramInfoLog(e)!==""&&console.warn("PixiJS Warning: gl.getProgramInfoLog()",r.getProgramInfoLog(e)))}var pE={float:1,vec2:2,vec3:3,vec4:4,int:1,ivec2:2,ivec3:3,ivec4:4,uint:1,uvec2:2,uvec3:3,uvec4:4,bool:1,bvec2:2,bvec3:3,bvec4:4,mat2:4,mat3:9,mat4:16,sampler2D:1};function $l(r){return pE[r]}var Hh=null,y3={FLOAT:"float",FLOAT_VEC2:"vec2",FLOAT_VEC3:"vec3",FLOAT_VEC4:"vec4",INT:"int",INT_VEC2:"ivec2",INT_VEC3:"ivec3",INT_VEC4:"ivec4",UNSIGNED_INT:"uint",UNSIGNED_INT_VEC2:"uvec2",UNSIGNED_INT_VEC3:"uvec3",UNSIGNED_INT_VEC4:"uvec4",BOOL:"bool",BOOL_VEC2:"bvec2",BOOL_VEC3:"bvec3",BOOL_VEC4:"bvec4",FLOAT_MAT2:"mat2",FLOAT_MAT3:"mat3",FLOAT_MAT4:"mat4",SAMPLER_2D:"sampler2D",INT_SAMPLER_2D:"sampler2D",UNSIGNED_INT_SAMPLER_2D:"sampler2D",SAMPLER_CUBE:"samplerCube",INT_SAMPLER_CUBE:"samplerCube",UNSIGNED_INT_SAMPLER_CUBE:"samplerCube",SAMPLER_2D_ARRAY:"sampler2DArray",INT_SAMPLER_2D_ARRAY:"sampler2DArray",UNSIGNED_INT_SAMPLER_2D_ARRAY:"sampler2DArray"};function ql(r,e){if(!Hh){let t=Object.keys(y3);Hh={};for(let i=0;i<t.length;++i){let s=t[i];Hh[r[s]]=y3[s]}}return Hh[e]}function jh(r,e,t){if(r.substring(0,9)!=="precision"){let i=e;return e===B0.HIGH&&t!==B0.HIGH&&(i=B0.MEDIUM),`precision ${i} float;
|
|
${r}`}else if(t!==B0.HIGH&&r.substring(0,15)==="precision highp")return r.replace("precision highp","precision mediump");return r}var Yl;function $h(){if(typeof Yl=="boolean")return Yl;try{Yl=new Function("param1","param2","param3","return param1[param2] === param3;")({a:"b"},"a","b")===!0}catch{Yl=!1}return Yl}var fE=0,qh={},Jo=class{constructor(r,e,t="pixi-shader",i={}){this.extra={},this.id=fE++,this.vertexSrc=r||Jo.defaultVertexSrc,this.fragmentSrc=e||Jo.defaultFragmentSrc,this.vertexSrc=this.vertexSrc.trim(),this.fragmentSrc=this.fragmentSrc.trim(),this.extra=i,this.vertexSrc.substring(0,8)!=="#version"&&(t=t.replace(/\s+/g,"-"),qh[t]?(qh[t]++,t+=`-${qh[t]}`):qh[t]=1,this.vertexSrc=`#define SHADER_NAME ${t}
|
|
${this.vertexSrc}`,this.fragmentSrc=`#define SHADER_NAME ${t}
|
|
${this.fragmentSrc}`,this.vertexSrc=jh(this.vertexSrc,Jo.defaultVertexPrecision,B0.HIGH),this.fragmentSrc=jh(this.fragmentSrc,Jo.defaultFragmentPrecision,t2())),this.glPrograms={},this.syncUniforms=null}static get defaultVertexSrc(){return f3}static get defaultFragmentSrc(){return p3}static from(r,e,t){let i=r+e,s=Ul[i];return s||(Ul[i]=s=new Jo(r,e,t)),s}},u0=Jo;u0.defaultVertexPrecision=B0.HIGH;u0.defaultFragmentPrecision=Pr.apple.device?B0.HIGH:B0.MEDIUM;var gE=0,G0=class r{constructor(e,t,i){this.group=!0,this.syncUniforms={},this.dirtyId=0,this.id=gE++,this.static=!!t,this.ubo=!!i,e instanceof ft?(this.buffer=e,this.buffer.type=Z0.UNIFORM_BUFFER,this.autoManage=!1,this.ubo=!0):(this.uniforms=e,this.ubo&&(this.buffer=new ft(new Float32Array(1)),this.buffer.type=Z0.UNIFORM_BUFFER,this.autoManage=!0))}update(){this.dirtyId++,!this.autoManage&&this.buffer&&this.buffer.update()}add(e,t,i){if(!this.ubo)this.uniforms[e]=new r(t,i);else throw new Error("[UniformGroup] uniform groups in ubo mode cannot be modified, or have uniform groups nested in them")}static from(e,t,i){return new r(e,t,i)}static uboFrom(e,t){return new r(e,t??!0,!0)}};var b0=class r{constructor(e,t){this.uniformBindCount=0,this.program=e,t?t instanceof G0?this.uniformGroup=t:this.uniformGroup=new G0(t):this.uniformGroup=new G0({}),this.disposeRunner=new Ht("disposeShader")}checkUniformExists(e,t){if(t.uniforms[e])return!0;for(let i in t.uniforms){let s=t.uniforms[i];if(s.group&&this.checkUniformExists(e,s))return!0}return!1}destroy(){this.uniformGroup=null,this.disposeRunner.emit(this),this.disposeRunner.destroy()}get uniforms(){return this.uniformGroup.uniforms}static from(e,t,i){let s=u0.from(e,t);return new r(s,i)}};var Xl=class{constructor(e,t){if(this.vertexSrc=e,this.fragTemplate=t,this.programCache={},this.defaultGroupCache={},!t.includes("%count%"))throw new Error('Fragment template must contain "%count%".');if(!t.includes("%forloop%"))throw new Error('Fragment template must contain "%forloop%".')}generateShader(e){if(!this.programCache[e]){let i=new Int32Array(e);for(let n=0;n<e;n++)i[n]=n;this.defaultGroupCache[e]=G0.from({uSamplers:i},!0);let s=this.fragTemplate;s=s.replace(/%count%/gi,`${e}`),s=s.replace(/%forloop%/gi,this.generateSampleSrc(e)),this.programCache[e]=new u0(this.vertexSrc,s)}let t={tint:new Float32Array([1,1,1,1]),translationMatrix:new je,default:this.defaultGroupCache[e]};return new b0(this.programCache[e],t)}generateSampleSrc(e){let t="";t+=`
|
|
`,t+=`
|
|
`;for(let i=0;i<e;i++)i>0&&(t+=`
|
|
else `),i<e-1&&(t+=`if(vTextureId < ${i}.5)`),t+=`
|
|
{`,t+=`
|
|
color = texture2D(uSamplers[${i}], vTextureCoord);`,t+=`
|
|
}`;return t+=`
|
|
`,t+=`
|
|
`,t}};var Xs=class{constructor(){this.elements=[],this.ids=[],this.count=0}clear(){for(let e=0;e<this.count;e++)this.elements[e]=null;this.count=0}};function v3(){return!Pr.apple.device}function x3(r){let e=!0,t=K.ADAPTER.getNavigator();if(Pr.tablet||Pr.phone){if(Pr.apple.device){let i=t.userAgent.match(/OS (\d+)_(\d+)?/);i&&parseInt(i[1],10)<11&&(e=!1)}if(Pr.android.device){let i=t.userAgent.match(/Android\s([0-9.]*)/);i&&parseInt(i[1],10)<7&&(e=!1)}}return e?r:4}var ai=class{constructor(e){this.renderer=e}flush(){}destroy(){this.renderer=null}start(){}stop(){this.flush()}render(e){}};var D3=`varying vec2 vTextureCoord;
|
|
varying vec4 vColor;
|
|
varying float vTextureId;
|
|
uniform sampler2D uSamplers[%count%];
|
|
|
|
void main(void){
|
|
vec4 color;
|
|
%forloop%
|
|
gl_FragColor = color * vColor;
|
|
}
|
|
`;var b3=`precision highp float;
|
|
attribute vec2 aVertexPosition;
|
|
attribute vec2 aTextureCoord;
|
|
attribute vec4 aColor;
|
|
attribute float aTextureId;
|
|
|
|
uniform mat3 projectionMatrix;
|
|
uniform mat3 translationMatrix;
|
|
uniform vec4 tint;
|
|
|
|
varying vec2 vTextureCoord;
|
|
varying vec4 vColor;
|
|
varying float vTextureId;
|
|
|
|
void main(void){
|
|
gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
|
|
|
vTextureCoord = aTextureCoord;
|
|
vTextureId = aTextureId;
|
|
vColor = aColor * tint;
|
|
}
|
|
`;var li=class extends ai{constructor(r){super(r),this.setShaderGenerator(),this.geometryClass=Wn,this.vertexSize=6,this.state=D0.for2d(),this.size=li.defaultBatchSize*4,this._vertexCount=0,this._indexCount=0,this._bufferedElements=[],this._bufferedTextures=[],this._bufferSize=0,this._shader=null,this._packedGeometries=[],this._packedGeometryPoolSize=2,this._flushId=0,this._aBuffers={},this._iBuffers={},this.maxTextures=1,this.renderer.on("prerender",this.onPrerender,this),r.runners.contextChange.add(this),this._dcIndex=0,this._aIndex=0,this._iIndex=0,this._attributeBuffer=null,this._indexBuffer=null,this._tempBoundTextures=[]}static get defaultMaxTextures(){return this._defaultMaxTextures=this._defaultMaxTextures??x3(32),this._defaultMaxTextures}static set defaultMaxTextures(r){this._defaultMaxTextures=r}static get canUploadSameBuffer(){return this._canUploadSameBuffer=this._canUploadSameBuffer??v3(),this._canUploadSameBuffer}static set canUploadSameBuffer(r){this._canUploadSameBuffer=r}get MAX_TEXTURES(){return Ue("7.1.0","BatchRenderer#MAX_TEXTURES renamed to BatchRenderer#maxTextures"),this.maxTextures}static get defaultVertexSrc(){return b3}static get defaultFragmentTemplate(){return D3}setShaderGenerator({vertex:r=li.defaultVertexSrc,fragment:e=li.defaultFragmentTemplate}={}){this.shaderGenerator=new Xl(r,e)}contextChange(){let r=this.renderer.gl;K.PREFER_ENV===hr.WEBGL_LEGACY?this.maxTextures=1:(this.maxTextures=Math.min(r.getParameter(r.MAX_TEXTURE_IMAGE_UNITS),li.defaultMaxTextures),this.maxTextures=Rh(this.maxTextures,r)),this._shader=this.shaderGenerator.generateShader(this.maxTextures);for(let e=0;e<this._packedGeometryPoolSize;e++)this._packedGeometries[e]=new this.geometryClass;this.initFlushBuffers()}initFlushBuffers(){let{_drawCallPool:r,_textureArrayPool:e}=li,t=this.size/4,i=Math.floor(t/this.maxTextures)+1;for(;r.length<t;)r.push(new qs);for(;e.length<i;)e.push(new Xs);for(let s=0;s<this.maxTextures;s++)this._tempBoundTextures[s]=null}onPrerender(){this._flushId=0}render(r){r._texture.valid&&(this._vertexCount+r.vertexData.length/2>this.size&&this.flush(),this._vertexCount+=r.vertexData.length/2,this._indexCount+=r.indices.length,this._bufferedTextures[this._bufferSize]=r._texture.baseTexture,this._bufferedElements[this._bufferSize++]=r)}buildTexturesAndDrawCalls(){let{_bufferedTextures:r,maxTextures:e}=this,t=li._textureArrayPool,i=this.renderer.batch,s=this._tempBoundTextures,n=this.renderer.textureGC.count,o=++we._globalBatch,a=0,l=t[0],c=0;i.copyBoundTextures(s,e);for(let h=0;h<this._bufferSize;++h){let d=r[h];r[h]=null,d._batchEnabled!==o&&(l.count>=e&&(i.boundArray(l,s,o,e),this.buildDrawCalls(l,c,h),c=h,l=t[++a],++o),d._batchEnabled=o,d.touched=n,l.elements[l.count++]=d)}l.count>0&&(i.boundArray(l,s,o,e),this.buildDrawCalls(l,c,this._bufferSize),++a,++o);for(let h=0;h<s.length;h++)s[h]=null;we._globalBatch=o}buildDrawCalls(r,e,t){let{_bufferedElements:i,_attributeBuffer:s,_indexBuffer:n,vertexSize:o}=this,a=li._drawCallPool,l=this._dcIndex,c=this._aIndex,h=this._iIndex,d=a[l];d.start=this._iIndex,d.texArray=r;for(let p=e;p<t;++p){let g=i[p],v=g._texture.baseTexture,C=Rl[v.alphaMode?1:0][g.blendMode];i[p]=null,e<p&&d.blend!==C&&(d.size=h-d.start,e=p,d=a[++l],d.texArray=r,d.start=h),this.packInterleavedGeometry(g,s,n,c,h),c+=g.vertexData.length/2*o,h+=g.indices.length,d.blend=C}e<t&&(d.size=h-d.start,++l),this._dcIndex=l,this._aIndex=c,this._iIndex=h}bindAndClearTexArray(r){let e=this.renderer.texture;for(let t=0;t<r.count;t++)e.bind(r.elements[t],r.ids[t]),r.elements[t]=null;r.count=0}updateGeometry(){let{_packedGeometries:r,_attributeBuffer:e,_indexBuffer:t}=this;li.canUploadSameBuffer?(r[this._flushId]._buffer.update(e.rawBinaryData),r[this._flushId]._indexBuffer.update(t),this.renderer.geometry.updateBuffers()):(this._packedGeometryPoolSize<=this._flushId&&(this._packedGeometryPoolSize++,r[this._flushId]=new this.geometryClass),r[this._flushId]._buffer.update(e.rawBinaryData),r[this._flushId]._indexBuffer.update(t),this.renderer.geometry.bind(r[this._flushId]),this.renderer.geometry.updateBuffers(),this._flushId++)}drawBatches(){let r=this._dcIndex,{gl:e,state:t}=this.renderer,i=li._drawCallPool,s=null;for(let n=0;n<r;n++){let{texArray:o,type:a,size:l,start:c,blend:h}=i[n];s!==o&&(s=o,this.bindAndClearTexArray(o)),this.state.blendMode=h,t.set(this.state),e.drawElements(a,l,e.UNSIGNED_SHORT,c*2)}}flush(){this._vertexCount!==0&&(this._attributeBuffer=this.getAttributeBuffer(this._vertexCount),this._indexBuffer=this.getIndexBuffer(this._indexCount),this._aIndex=0,this._iIndex=0,this._dcIndex=0,this.buildTexturesAndDrawCalls(),this.updateGeometry(),this.drawBatches(),this._bufferSize=0,this._vertexCount=0,this._indexCount=0)}start(){this.renderer.state.set(this.state),this.renderer.texture.ensureSamplerType(this.maxTextures),this.renderer.shader.bind(this._shader),li.canUploadSameBuffer&&this.renderer.geometry.bind(this._packedGeometries[this._flushId])}stop(){this.flush()}destroy(){for(let r=0;r<this._packedGeometryPoolSize;r++)this._packedGeometries[r]&&this._packedGeometries[r].destroy();this.renderer.off("prerender",this.onPrerender,this),this._aBuffers=null,this._iBuffers=null,this._packedGeometries=null,this._attributeBuffer=null,this._indexBuffer=null,this._shader&&(this._shader.destroy(),this._shader=null),super.destroy()}getAttributeBuffer(r){let e=Hs(Math.ceil(r/8)),t=Gl(e),i=e*8;this._aBuffers.length<=t&&(this._iBuffers.length=t+1);let s=this._aBuffers[i];return s||(this._aBuffers[i]=s=new $s(i*this.vertexSize*4)),s}getIndexBuffer(r){let e=Hs(Math.ceil(r/12)),t=Gl(e),i=e*12;this._iBuffers.length<=t&&(this._iBuffers.length=t+1);let s=this._iBuffers[t];return s||(this._iBuffers[t]=s=new Uint16Array(i)),s}packInterleavedGeometry(r,e,t,i,s){let{uint32View:n,float32View:o}=e,a=i/this.vertexSize,l=r.uvs,c=r.indices,h=r.vertexData,d=r._texture.baseTexture._batchLocation,p=Math.min(r.worldAlpha,1),g=Me.shared.setValue(r._tintRGB).toPremultiplied(p,r._texture.baseTexture.alphaMode>0);for(let v=0;v<h.length;v+=2)o[i++]=h[v],o[i++]=h[v+1],o[i++]=l[v],o[i++]=l[v+1],n[i++]=g,o[i++]=d;for(let v=0;v<c.length;v++)t[s++]=a+c[v]}},mr=li;mr.defaultBatchSize=4096;mr.extension={name:"batch",type:Z.RendererPlugin};mr._drawCallPool=[];mr._textureArrayPool=[];te.add(mr);var E3=`varying vec2 vTextureCoord;
|
|
|
|
uniform sampler2D uSampler;
|
|
|
|
void main(void){
|
|
gl_FragColor = texture2D(uSampler, vTextureCoord);
|
|
}
|
|
`;var S3=`attribute vec2 aVertexPosition;
|
|
|
|
uniform mat3 projectionMatrix;
|
|
|
|
varying vec2 vTextureCoord;
|
|
|
|
uniform vec4 inputSize;
|
|
uniform vec4 outputFrame;
|
|
|
|
vec4 filterVertexPosition( void )
|
|
{
|
|
vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;
|
|
|
|
return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
|
|
}
|
|
|
|
vec2 filterTextureCoord( void )
|
|
{
|
|
return aVertexPosition * (outputFrame.zw * inputSize.zw);
|
|
}
|
|
|
|
void main(void)
|
|
{
|
|
gl_Position = filterVertexPosition();
|
|
vTextureCoord = filterTextureCoord();
|
|
}
|
|
`;var Kl=class extends b0{constructor(r,e,t){let i=u0.from(r||Kl.defaultVertexSrc,e||Kl.defaultFragmentSrc);super(i,t),this.padding=0,this.resolution=Kl.defaultResolution,this.multisample=Kl.defaultMultisample,this.enabled=!0,this.autoFit=!0,this.state=new D0}apply(r,e,t,i,s){r.applyFilter(this,e,t,i)}get blendMode(){return this.state.blendMode}set blendMode(r){this.state.blendMode=r}get resolution(){return this._resolution}set resolution(r){this._resolution=r}static get defaultVertexSrc(){return S3}static get defaultFragmentSrc(){return E3}},ot=Kl;ot.defaultResolution=1;ot.defaultMultisample=ut.NONE;var ds=class{constructor(){this.clearBeforeRender=!0,this._backgroundColor=new Me(0),this.alpha=1}init(e){this.clearBeforeRender=e.clearBeforeRender;let{backgroundColor:t,background:i,backgroundAlpha:s}=e,n=i??t;n!==void 0&&(this.color=n),this.alpha=s}get color(){return this._backgroundColor.value}set color(e){this._backgroundColor.setValue(e)}get alpha(){return this._backgroundColor.alpha}set alpha(e){this._backgroundColor.setAlpha(e)}get backgroundColor(){return this._backgroundColor}destroy(){}};ds.defaultOptions={backgroundAlpha:1,backgroundColor:0,clearBeforeRender:!0};ds.extension={type:[Z.RendererSystem,Z.CanvasRendererSystem],name:"background"};te.add(ds);var ea=class{constructor(e){this.renderer=e,this.emptyRenderer=new ai(e),this.currentRenderer=this.emptyRenderer}setObjectRenderer(e){this.currentRenderer!==e&&(this.currentRenderer.stop(),this.currentRenderer=e,this.currentRenderer.start())}flush(){this.setObjectRenderer(this.emptyRenderer)}reset(){this.setObjectRenderer(this.emptyRenderer)}copyBoundTextures(e,t){let{boundTextures:i}=this.renderer.texture;for(let s=t-1;s>=0;--s)e[s]=i[s]||null,e[s]&&(e[s]._batchLocation=s)}boundArray(e,t,i,s){let{elements:n,ids:o,count:a}=e,l=0;for(let c=0;c<a;c++){let h=n[c],d=h._batchLocation;if(d>=0&&d<s&&t[d]===h){o[c]=d;continue}for(;l<s;){let p=t[l];if(p&&p._batchEnabled===i&&p._batchLocation===l){l++;continue}o[c]=l,h._batchLocation=l,t[l]=h;break}}}destroy(){this.renderer=null}};ea.extension={type:Z.RendererSystem,name:"batch"};te.add(ea);var C3=0,ps=class{constructor(e){this.renderer=e,this.webGLVersion=1,this.extensions={},this.supports={uint32Indices:!1},this.handleContextLost=this.handleContextLost.bind(this),this.handleContextRestored=this.handleContextRestored.bind(this)}get isLost(){return!this.gl||this.gl.isContextLost()}contextChange(e){this.gl=e,this.renderer.gl=e,this.renderer.CONTEXT_UID=C3++}init(e){if(e.context)this.initFromContext(e.context);else{let t=this.renderer.background.alpha<1,i=e.premultipliedAlpha;this.preserveDrawingBuffer=e.preserveDrawingBuffer,this.useContextAlpha=e.useContextAlpha,this.powerPreference=e.powerPreference,this.initFromOptions({alpha:t,premultipliedAlpha:i,antialias:e.antialias,stencil:!0,preserveDrawingBuffer:e.preserveDrawingBuffer,powerPreference:e.powerPreference})}}initFromContext(e){this.gl=e,this.validateContext(e),this.renderer.gl=e,this.renderer.CONTEXT_UID=C3++,this.renderer.runners.contextChange.emit(e);let t=this.renderer.view;t.addEventListener!==void 0&&(t.addEventListener("webglcontextlost",this.handleContextLost,!1),t.addEventListener("webglcontextrestored",this.handleContextRestored,!1))}initFromOptions(e){let t=this.createContext(this.renderer.view,e);this.initFromContext(t)}createContext(e,t){let i;if(K.PREFER_ENV>=hr.WEBGL2&&(i=e.getContext("webgl2",t)),i)this.webGLVersion=2;else if(this.webGLVersion=1,i=e.getContext("webgl",t)||e.getContext("experimental-webgl",t),!i)throw new Error("This browser does not support WebGL. Try using the canvas renderer");return this.gl=i,this.getExtensions(),this.gl}getExtensions(){let{gl:e}=this,t={loseContext:e.getExtension("WEBGL_lose_context"),anisotropicFiltering:e.getExtension("EXT_texture_filter_anisotropic"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),s3tc:e.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:e.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:e.getExtension("WEBGL_compressed_texture_etc"),etc1:e.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:e.getExtension("WEBGL_compressed_texture_atc"),astc:e.getExtension("WEBGL_compressed_texture_astc")};this.webGLVersion===1?Object.assign(this.extensions,t,{drawBuffers:e.getExtension("WEBGL_draw_buffers"),depthTexture:e.getExtension("WEBGL_depth_texture"),vertexArrayObject:e.getExtension("OES_vertex_array_object")||e.getExtension("MOZ_OES_vertex_array_object")||e.getExtension("WEBKIT_OES_vertex_array_object"),uint32ElementIndex:e.getExtension("OES_element_index_uint"),floatTexture:e.getExtension("OES_texture_float"),floatTextureLinear:e.getExtension("OES_texture_float_linear"),textureHalfFloat:e.getExtension("OES_texture_half_float"),textureHalfFloatLinear:e.getExtension("OES_texture_half_float_linear")}):this.webGLVersion===2&&Object.assign(this.extensions,t,{colorBufferFloat:e.getExtension("EXT_color_buffer_float")})}handleContextLost(e){e.preventDefault(),setTimeout(()=>{this.gl.isContextLost()&&this.extensions.loseContext&&this.extensions.loseContext.restoreContext()},0)}handleContextRestored(){this.renderer.runners.contextChange.emit(this.gl)}destroy(){let e=this.renderer.view;this.renderer=null,e.removeEventListener!==void 0&&(e.removeEventListener("webglcontextlost",this.handleContextLost),e.removeEventListener("webglcontextrestored",this.handleContextRestored)),this.gl.useProgram(null),this.extensions.loseContext&&this.extensions.loseContext.loseContext()}postrender(){this.renderer.objectRenderer.renderingToScreen&&this.gl.flush()}validateContext(e){let t=e.getContextAttributes(),i="WebGL2RenderingContext"in globalThis&&e instanceof globalThis.WebGL2RenderingContext;i&&(this.webGLVersion=2),t&&!t.stencil&&console.warn("Provided WebGL context does not have a stencil buffer, masks may not render correctly");let s=i||!!e.getExtension("OES_element_index_uint");this.supports.uint32Indices=s,s||console.warn("Provided WebGL context does not support 32 index buffer, complex graphics may not render correctly")}};ps.defaultOptions={context:null,antialias:!1,premultipliedAlpha:!0,preserveDrawingBuffer:!1,powerPreference:"default"};ps.extension={type:Z.RendererSystem,name:"context"};te.add(ps);var Yh=class extends Q0{upload(e,t,i){let s=e.gl;s.pixelStorei(s.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.alphaMode===Qt.UNPACK);let n=t.realWidth,o=t.realHeight;return i.width===n&&i.height===o?s.texSubImage2D(t.target,0,0,0,n,o,t.format,i.type,this.data):(i.width=n,i.height=o,s.texImage2D(t.target,0,i.internalFormat,n,o,0,t.format,i.type,this.data)),!0}};var Ks=class{constructor(e,t){this.width=Math.round(e||100),this.height=Math.round(t||100),this.stencil=!1,this.depth=!1,this.dirtyId=0,this.dirtyFormat=0,this.dirtySize=0,this.depthTexture=null,this.colorTextures=[],this.glFramebuffers={},this.disposeRunner=new Ht("disposeFramebuffer"),this.multisample=ut.NONE}get colorTexture(){return this.colorTextures[0]}addColorTexture(e=0,t){return this.colorTextures[e]=t||new we(null,{scaleMode:Nr.NEAREST,resolution:1,mipmap:x0.OFF,width:this.width,height:this.height}),this.dirtyId++,this.dirtyFormat++,this}addDepthTexture(e){return this.depthTexture=e||new we(new Yh(null,{width:this.width,height:this.height}),{scaleMode:Nr.NEAREST,resolution:1,width:this.width,height:this.height,mipmap:x0.OFF,format:le.DEPTH_COMPONENT,type:Ce.UNSIGNED_SHORT}),this.dirtyId++,this.dirtyFormat++,this}enableDepth(){return this.depth=!0,this.dirtyId++,this.dirtyFormat++,this}enableStencil(){return this.stencil=!0,this.dirtyId++,this.dirtyFormat++,this}resize(e,t){if(e=Math.round(e),t=Math.round(t),!(e===this.width&&t===this.height)){this.width=e,this.height=t,this.dirtyId++,this.dirtySize++;for(let i=0;i<this.colorTextures.length;i++){let s=this.colorTextures[i],n=s.resolution;s.setSize(e/n,t/n)}if(this.depthTexture){let i=this.depthTexture.resolution;this.depthTexture.setSize(e/i,t/i)}}}dispose(){this.disposeRunner.emit(this,!1)}destroyDepthTexture(){this.depthTexture&&(this.depthTexture.destroy(),this.depthTexture=null,++this.dirtyId,++this.dirtyFormat)}};var Xn=class extends we{constructor(e={}){if(typeof e=="number"){let t=arguments[0],i=arguments[1],s=arguments[2],n=arguments[3];e={width:t,height:i,scaleMode:s,resolution:n}}e.width=e.width||100,e.height=e.height||100,e.multisample??(e.multisample=ut.NONE),super(null,e),this.mipmap=x0.OFF,this.valid=!0,this._clear=new Me([0,0,0,0]),this.framebuffer=new Ks(this.realWidth,this.realHeight).addColorTexture(0,this),this.framebuffer.multisample=e.multisample,this.maskStack=[],this.filterStack=[{}]}set clearColor(e){this._clear.setValue(e)}get clearColor(){return this._clear.value}get clear(){return this._clear}resize(e,t){this.framebuffer.resize(e*this.resolution,t*this.resolution),this.setRealSize(this.framebuffer.width,this.framebuffer.height)}dispose(){this.framebuffer.dispose(),super.dispose()}destroy(){super.destroy(),this.framebuffer.destroyDepthTexture(),this.framebuffer=null}};var E0=class extends fr{constructor(e){let t=e,i=t.naturalWidth||t.videoWidth||t.width,s=t.naturalHeight||t.videoHeight||t.height;super(i,s),this.source=e,this.noSubImage=!1}static crossOrigin(e,t,i){i===void 0&&!t.startsWith("data:")?e.crossOrigin=Bh(t):i!==!1&&(e.crossOrigin=typeof i=="string"?i:"anonymous")}upload(e,t,i,s){let n=e.gl,o=t.realWidth,a=t.realHeight;if(s=s||this.source,typeof HTMLImageElement<"u"&&s instanceof HTMLImageElement){if(!s.complete||s.naturalWidth===0)return!1}else if(typeof HTMLVideoElement<"u"&&s instanceof HTMLVideoElement&&s.readyState<=1&&s.buffered.length===0)return!1;return n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,t.alphaMode===Qt.UNPACK),!this.noSubImage&&t.target===n.TEXTURE_2D&&i.width===o&&i.height===a?n.texSubImage2D(n.TEXTURE_2D,0,0,0,t.format,i.type,s):(i.width=o,i.height=a,n.texImage2D(t.target,0,i.internalFormat,t.format,i.type,s)),!0}update(){if(this.destroyed)return;let e=this.source,t=e.naturalWidth||e.videoWidth||e.width,i=e.naturalHeight||e.videoHeight||e.height;this.resize(t,i),super.update()}dispose(){this.source=null}};var Zs=class extends E0{constructor(e,t){if(t=t||{},typeof e=="string"){let i=new Image;E0.crossOrigin(i,e,t.crossorigin),i.src=e,e=i}super(e),!e.complete&&this._width&&this._height&&(this._width=0,this._height=0),this.url=e.src,this._process=null,this.preserveBitmap=!1,this.createBitmap=(t.createBitmap??K.CREATE_IMAGE_BITMAP)&&!!globalThis.createImageBitmap,this.alphaMode=typeof t.alphaMode=="number"?t.alphaMode:null,this.bitmap=null,this._load=null,t.autoLoad!==!1&&this.load()}load(e){return this._load?this._load:(e!==void 0&&(this.createBitmap=e),this._load=new Promise((t,i)=>{let s=this.source;this.url=s.src;let n=()=>{this.destroyed||(s.onload=null,s.onerror=null,this.resize(s.width,s.height),this._load=null,this.createBitmap?t(this.process()):t(this))};s.complete&&s.src?n():(s.onload=n,s.onerror=o=>{i(o),this.onError.emit(o)})}),this._load)}process(){let e=this.source;if(this._process!==null)return this._process;if(this.bitmap!==null||!globalThis.createImageBitmap)return Promise.resolve(this);let t=globalThis.createImageBitmap,i=!e.crossOrigin||e.crossOrigin==="anonymous";return this._process=fetch(e.src,{mode:i?"cors":"no-cors"}).then(s=>s.blob()).then(s=>t(s,0,0,e.width,e.height,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===Qt.UNPACK?"premultiply":"none"})).then(s=>this.destroyed?Promise.reject():(this.bitmap=s,this.update(),this._process=null,Promise.resolve(this))),this._process}upload(e,t,i){if(typeof this.alphaMode=="number"&&(t.alphaMode=this.alphaMode),!this.createBitmap)return super.upload(e,t,i);if(!this.bitmap&&(this.process(),!this.bitmap))return!1;if(super.upload(e,t,i,this.bitmap),!this.preserveBitmap){let s=!0,n=t._glTextures;for(let o in n){let a=n[o];if(a!==i&&a.dirtyId!==t.dirtyId){s=!1;break}}s&&(this.bitmap.close&&this.bitmap.close(),this.bitmap=null)}return!0}dispose(){this.source.onload=null,this.source.onerror=null,super.dispose(),this.bitmap&&(this.bitmap.close(),this.bitmap=null),this._process=null,this._load=null}static test(e){return typeof HTMLImageElement<"u"&&(typeof e=="string"||e instanceof HTMLImageElement)}};var ta=class{constructor(){this.x0=0,this.y0=0,this.x1=1,this.y1=0,this.x2=1,this.y2=1,this.x3=0,this.y3=1,this.uvsFloat32=new Float32Array(8)}set(e,t,i){let s=t.width,n=t.height;if(i){let o=e.width/2/s,a=e.height/2/n,l=e.x/s+o,c=e.y/n+a;i=Ct.add(i,Ct.NW),this.x0=l+o*Ct.uX(i),this.y0=c+a*Ct.uY(i),i=Ct.add(i,2),this.x1=l+o*Ct.uX(i),this.y1=c+a*Ct.uY(i),i=Ct.add(i,2),this.x2=l+o*Ct.uX(i),this.y2=c+a*Ct.uY(i),i=Ct.add(i,2),this.x3=l+o*Ct.uX(i),this.y3=c+a*Ct.uY(i)}else this.x0=e.x/s,this.y0=e.y/n,this.x1=(e.x+e.width)/s,this.y1=e.y/n,this.x2=(e.x+e.width)/s,this.y2=(e.y+e.height)/n,this.x3=e.x/s,this.y3=(e.y+e.height)/n;this.uvsFloat32[0]=this.x0,this.uvsFloat32[1]=this.y0,this.uvsFloat32[2]=this.x1,this.uvsFloat32[3]=this.y1,this.uvsFloat32[4]=this.x2,this.uvsFloat32[5]=this.y2,this.uvsFloat32[6]=this.x3,this.uvsFloat32[7]=this.y3}toString(){return`[@pixi/core:TextureUvs x0=${this.x0} y0=${this.y0} x1=${this.x1} y1=${this.y1} x2=${this.x2} y2=${this.y2} x3=${this.x3} y3=${this.y3}]`}};var w3=new ta;function Xh(r){r.destroy=function(){},r.on=function(){},r.once=function(){},r.emit=function(){}}var Se=class r extends js.default{constructor(e,t,i,s,n,o,a){if(super(),this.noFrame=!1,t||(this.noFrame=!0,t=new Ie(0,0,1,1)),e instanceof r&&(e=e.baseTexture),this.baseTexture=e,this._frame=t,this.trim=s,this.valid=!1,this._uvs=w3,this.uvMatrix=null,this.orig=i||t,this._rotate=Number(n||0),n===!0)this._rotate=2;else if(this._rotate%2!==0)throw new Error("attempt to use diamond-shaped UVs. If you are sure, set rotation manually");this.defaultAnchor=o?new Ne(o.x,o.y):new Ne(0,0),this.defaultBorders=a,this._updateID=0,this.textureCacheIds=[],e.valid?this.noFrame?e.valid&&this.onBaseTextureUpdated(e):this.frame=t:e.once("loaded",this.onBaseTextureUpdated,this),this.noFrame&&e.on("update",this.onBaseTextureUpdated,this)}update(){this.baseTexture.resource&&this.baseTexture.resource.update()}onBaseTextureUpdated(e){if(this.noFrame){if(!this.baseTexture.valid)return;this._frame.width=e.width,this._frame.height=e.height,this.valid=!0,this.updateUvs()}else this.frame=this._frame;this.emit("update",this)}destroy(e){if(this.baseTexture){if(e){let{resource:t}=this.baseTexture;t?.url&&c0[t.url]&&r.removeFromCache(t.url),this.baseTexture.destroy()}this.baseTexture.off("loaded",this.onBaseTextureUpdated,this),this.baseTexture.off("update",this.onBaseTextureUpdated,this),this.baseTexture=null}this._frame=null,this._uvs=null,this.trim=null,this.orig=null,this.valid=!1,r.removeFromCache(this),this.textureCacheIds=null}clone(){let e=this._frame.clone(),t=this._frame===this.orig?e:this.orig.clone(),i=new r(this.baseTexture,!this.noFrame&&e,t,this.trim?.clone(),this.rotate,this.defaultAnchor,this.defaultBorders);return this.noFrame&&(i._frame=e),i}updateUvs(){this._uvs===w3&&(this._uvs=new ta),this._uvs.set(this._frame,this.baseTexture,this.rotate),this._updateID++}static from(e,t={},i=K.STRICT_TEXTURE_CACHE){let s=typeof e=="string",n=null;if(s)n=e;else if(e instanceof we){if(!e.cacheId){let a=t?.pixiIdPrefix||"pixiid";e.cacheId=`${a}-${_i()}`,we.addToCache(e,e.cacheId)}n=e.cacheId}else{if(!e._pixiId){let a=t?.pixiIdPrefix||"pixiid";e._pixiId=`${a}_${_i()}`}n=e._pixiId}let o=c0[n];if(s&&i&&!o)throw new Error(`The cacheId "${n}" does not exist in TextureCache.`);return!o&&!(e instanceof we)?(t.resolution||(t.resolution=Vl(e)),o=new r(new we(e,t)),o.baseTexture.cacheId=n,we.addToCache(o.baseTexture,n),r.addToCache(o,n)):!o&&e instanceof we&&(o=new r(e),r.addToCache(o,n)),o}static fromURL(e,t){let i=Object.assign({autoLoad:!1},t?.resourceOptions),s=r.from(e,Object.assign({resourceOptions:i},t),!1),n=s.baseTexture.resource;return s.baseTexture.valid?Promise.resolve(s):n.load().then(()=>Promise.resolve(s))}static fromBuffer(e,t,i,s){return new r(we.fromBuffer(e,t,i,s))}static fromLoader(e,t,i,s){let n=new we(e,Object.assign({scaleMode:we.defaultOptions.scaleMode,resolution:Vl(t)},s)),{resource:o}=n;o instanceof Zs&&(o.url=t);let a=new r(n);return i||(i=t),we.addToCache(a.baseTexture,i),r.addToCache(a,i),i!==t&&(we.addToCache(a.baseTexture,t),r.addToCache(a,t)),a.baseTexture.valid?Promise.resolve(a):new Promise(l=>{a.baseTexture.once("loaded",()=>l(a))})}static addToCache(e,t){t&&(e.textureCacheIds.includes(t)||e.textureCacheIds.push(t),c0[t]&&c0[t]!==e&&console.warn(`Texture added to the cache with an id [${t}] that already had an entry`),c0[t]=e)}static removeFromCache(e){if(typeof e=="string"){let t=c0[e];if(t){let i=t.textureCacheIds.indexOf(e);return i>-1&&t.textureCacheIds.splice(i,1),delete c0[e],t}}else if(e?.textureCacheIds){for(let t=0;t<e.textureCacheIds.length;++t)c0[e.textureCacheIds[t]]===e&&delete c0[e.textureCacheIds[t]];return e.textureCacheIds.length=0,e}return null}get resolution(){return this.baseTexture.resolution}get frame(){return this._frame}set frame(e){this._frame=e,this.noFrame=!1;let{x:t,y:i,width:s,height:n}=e,o=t+s>this.baseTexture.width,a=i+n>this.baseTexture.height;if(o||a){let l=o&&a?"and":"or",c=`X: ${t} + ${s} = ${t+s} > ${this.baseTexture.width}`,h=`Y: ${i} + ${n} = ${i+n} > ${this.baseTexture.height}`;throw new Error(`Texture Error: frame does not fit inside the base Texture dimensions: ${c} ${l} ${h}`)}this.valid=s&&n&&this.baseTexture.valid,!this.trim&&!this.rotate&&(this.orig=e),this.valid&&this.updateUvs()}get rotate(){return this._rotate}set rotate(e){this._rotate=e,this.valid&&this.updateUvs()}get width(){return this.orig.width}get height(){return this.orig.height}castToBaseTexture(){return this.baseTexture}static get EMPTY(){return r._EMPTY||(r._EMPTY=new r(new we),Xh(r._EMPTY),Xh(r._EMPTY.baseTexture)),r._EMPTY}static get WHITE(){if(!r._WHITE){let e=K.ADAPTER.createCanvas(16,16),t=e.getContext("2d");e.width=16,e.height=16,t.fillStyle="white",t.fillRect(0,0,16,16),r._WHITE=new r(we.from(e)),Xh(r._WHITE),Xh(r._WHITE.baseTexture)}return r._WHITE}};var Or=class r extends Se{constructor(e,t){super(e,t),this.valid=!0,this.filterFrame=null,this.filterPoolKey=null,this.updateUvs()}get framebuffer(){return this.baseTexture.framebuffer}get multisample(){return this.framebuffer.multisample}set multisample(e){this.framebuffer.multisample=e}resize(e,t,i=!0){let s=this.baseTexture.resolution,n=Math.round(e*s)/s,o=Math.round(t*s)/s;this.valid=n>0&&o>0,this._frame.width=this.orig.width=n,this._frame.height=this.orig.height=o,i&&this.baseTexture.resize(n,o),this.updateUvs()}setResolution(e){let{baseTexture:t}=this;t.resolution!==e&&(t.setResolution(e),this.resize(t.width,t.height,!1))}static create(e){return new r(new Xn(e))}};var ra=class{constructor(e){this.texturePool={},this.textureOptions=e||{},this.enableFullScreen=!1,this._pixelsWidth=0,this._pixelsHeight=0}createTexture(e,t,i=ut.NONE){let s=new Xn(Object.assign({width:e,height:t,resolution:1,multisample:i},this.textureOptions));return new Or(s)}getOptimalTexture(e,t,i=1,s=ut.NONE){let n;e=Math.ceil(e*i-1e-6),t=Math.ceil(t*i-1e-6),!this.enableFullScreen||e!==this._pixelsWidth||t!==this._pixelsHeight?(e=Hs(e),t=Hs(t),n=((e&65535)<<16|t&65535)>>>0,s>1&&(n+=s*4294967296)):n=s>1?-s:-1,this.texturePool[n]||(this.texturePool[n]=[]);let o=this.texturePool[n].pop();return o||(o=this.createTexture(e,t,s)),o.filterPoolKey=n,o.setResolution(i),o}getFilterTexture(e,t,i){let s=this.getOptimalTexture(e.width,e.height,t||e.resolution,i||ut.NONE);return s.filterFrame=e.filterFrame,s}returnTexture(e){let t=e.filterPoolKey;e.filterFrame=null,this.texturePool[t].push(e)}returnFilterTexture(e){this.returnTexture(e)}clear(e){if(e=e!==!1,e)for(let t in this.texturePool){let i=this.texturePool[t];if(i)for(let s=0;s<i.length;s++)i[s].destroy(!0)}this.texturePool={}}setScreenSize(e){if(!(e.width===this._pixelsWidth&&e.height===this._pixelsHeight)){this.enableFullScreen=e.width>0&&e.height>0;for(let t in this.texturePool){if(!(Number(t)<0))continue;let i=this.texturePool[t];if(i)for(let s=0;s<i.length;s++)i[s].destroy(!0);this.texturePool[t]=[]}this._pixelsWidth=e.width,this._pixelsHeight=e.height}}};ra.SCREEN_KEY=-1;var Zl=class extends gr{constructor(){super(),this.addAttribute("aVertexPosition",new Float32Array([0,0,1,0,1,1,0,1])).addIndex([0,1,3,2])}};var Kn=class extends gr{constructor(){super(),this.vertices=new Float32Array([-1,-1,1,-1,1,1,-1,1]),this.uvs=new Float32Array([0,0,1,0,1,1,0,1]),this.vertexBuffer=new ft(this.vertices),this.uvBuffer=new ft(this.uvs),this.addAttribute("aVertexPosition",this.vertexBuffer).addAttribute("aTextureCoord",this.uvBuffer).addIndex([0,1,2,0,2,3])}map(e,t){let i=0,s=0;return this.uvs[0]=i,this.uvs[1]=s,this.uvs[2]=i+t.width/e.width,this.uvs[3]=s,this.uvs[4]=i+t.width/e.width,this.uvs[5]=s+t.height/e.height,this.uvs[6]=i,this.uvs[7]=s+t.height/e.height,i=t.x,s=t.y,this.vertices[0]=i,this.vertices[1]=s,this.vertices[2]=i+t.width,this.vertices[3]=s,this.vertices[4]=i+t.width,this.vertices[5]=s+t.height,this.vertices[6]=i,this.vertices[7]=s+t.height,this.invalidate(),this}invalidate(){return this.vertexBuffer._updateID++,this.uvBuffer._updateID++,this}};var Ql=class{constructor(){this.renderTexture=null,this.target=null,this.legacy=!1,this.resolution=1,this.multisample=ut.NONE,this.sourceFrame=new Ie,this.destinationFrame=new Ie,this.bindingSourceFrame=new Ie,this.bindingDestinationFrame=new Ie,this.filters=[],this.transform=null}clear(){this.target=null,this.filters=null,this.renderTexture=null}};var Kh=[new Ne,new Ne,new Ne,new Ne],i2=new je,ia=class{constructor(e){this.renderer=e,this.defaultFilterStack=[{}],this.texturePool=new ra,this.statePool=[],this.quad=new Zl,this.quadUv=new Kn,this.tempRect=new Ie,this.activeState={},this.globalUniforms=new G0({outputFrame:new Ie,inputSize:new Float32Array(4),inputPixel:new Float32Array(4),inputClamp:new Float32Array(4),resolution:1,filterArea:new Float32Array(4),filterClamp:new Float32Array(4)},!0),this.forceClear=!1,this.useMaxPadding=!1}init(){this.texturePool.setScreenSize(this.renderer.view)}push(e,t){let i=this.renderer,s=this.defaultFilterStack,n=this.statePool.pop()||new Ql,o=this.renderer.renderTexture,a=t[0].resolution,l=t[0].multisample,c=t[0].padding,h=t[0].autoFit,d=t[0].legacy??!0;for(let v=1;v<t.length;v++){let C=t[v];a=Math.min(a,C.resolution),l=Math.min(l,C.multisample),c=this.useMaxPadding?Math.max(c,C.padding):c+C.padding,h=h&&C.autoFit,d=d||(C.legacy??!0)}s.length===1&&(this.defaultFilterStack[0].renderTexture=o.current),s.push(n),n.resolution=a,n.multisample=l,n.legacy=d,n.target=e,n.sourceFrame.copyFrom(e.filterArea||e.getBounds(!0)),n.sourceFrame.pad(c);let p=this.tempRect.copyFrom(o.sourceFrame);i.projection.transform&&this.transformAABB(i2.copyFrom(i.projection.transform).invert(),p),h?(n.sourceFrame.fit(p),(n.sourceFrame.width<=0||n.sourceFrame.height<=0)&&(n.sourceFrame.width=0,n.sourceFrame.height=0)):n.sourceFrame.intersects(p)||(n.sourceFrame.width=0,n.sourceFrame.height=0),this.roundFrame(n.sourceFrame,o.current?o.current.resolution:i.resolution,o.sourceFrame,o.destinationFrame,i.projection.transform),n.renderTexture=this.getOptimalFilterTexture(n.sourceFrame.width,n.sourceFrame.height,a,l),n.filters=t,n.destinationFrame.width=n.renderTexture.width,n.destinationFrame.height=n.renderTexture.height;let g=this.tempRect;g.x=0,g.y=0,g.width=n.sourceFrame.width,g.height=n.sourceFrame.height,n.renderTexture.filterFrame=n.sourceFrame,n.bindingSourceFrame.copyFrom(o.sourceFrame),n.bindingDestinationFrame.copyFrom(o.destinationFrame),n.transform=i.projection.transform,i.projection.transform=null,o.bind(n.renderTexture,n.sourceFrame,g),i.framebuffer.clear(0,0,0,0)}pop(){let e=this.defaultFilterStack,t=e.pop(),i=t.filters;this.activeState=t;let s=this.globalUniforms.uniforms;s.outputFrame=t.sourceFrame,s.resolution=t.resolution;let n=s.inputSize,o=s.inputPixel,a=s.inputClamp;if(n[0]=t.destinationFrame.width,n[1]=t.destinationFrame.height,n[2]=1/n[0],n[3]=1/n[1],o[0]=Math.round(n[0]*t.resolution),o[1]=Math.round(n[1]*t.resolution),o[2]=1/o[0],o[3]=1/o[1],a[0]=.5*o[2],a[1]=.5*o[3],a[2]=t.sourceFrame.width*n[2]-.5*o[2],a[3]=t.sourceFrame.height*n[3]-.5*o[3],t.legacy){let c=s.filterArea;c[0]=t.destinationFrame.width,c[1]=t.destinationFrame.height,c[2]=t.sourceFrame.x,c[3]=t.sourceFrame.y,s.filterClamp=s.inputClamp}this.globalUniforms.update();let l=e[e.length-1];if(this.renderer.framebuffer.blit(),i.length===1)i[0].apply(this,t.renderTexture,l.renderTexture,pr.BLEND,t),this.returnFilterTexture(t.renderTexture);else{let c=t.renderTexture,h=this.getOptimalFilterTexture(c.width,c.height,t.resolution);h.filterFrame=c.filterFrame;let d=0;for(d=0;d<i.length-1;++d){d===1&&t.multisample>1&&(h=this.getOptimalFilterTexture(c.width,c.height,t.resolution),h.filterFrame=c.filterFrame),i[d].apply(this,c,h,pr.CLEAR,t);let p=c;c=h,h=p}i[d].apply(this,c,l.renderTexture,pr.BLEND,t),d>1&&t.multisample>1&&this.returnFilterTexture(t.renderTexture),this.returnFilterTexture(c),this.returnFilterTexture(h)}t.clear(),this.statePool.push(t)}bindAndClear(e,t=pr.CLEAR){let{renderTexture:i,state:s}=this.renderer;if(e===this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?this.renderer.projection.transform=this.activeState.transform:this.renderer.projection.transform=null,e?.filterFrame){let o=this.tempRect;o.x=0,o.y=0,o.width=e.filterFrame.width,o.height=e.filterFrame.height,i.bind(e,e.filterFrame,o)}else e!==this.defaultFilterStack[this.defaultFilterStack.length-1].renderTexture?i.bind(e):this.renderer.renderTexture.bind(e,this.activeState.bindingSourceFrame,this.activeState.bindingDestinationFrame);let n=s.stateId&1||this.forceClear;(t===pr.CLEAR||t===pr.BLIT&&n)&&this.renderer.framebuffer.clear(0,0,0,0)}applyFilter(e,t,i,s){let n=this.renderer;n.state.set(e.state),this.bindAndClear(i,s),e.uniforms.uSampler=t,e.uniforms.filterGlobals=this.globalUniforms,n.shader.bind(e),e.legacy=!!e.program.attributeData.aTextureCoord,e.legacy?(this.quadUv.map(t._frame,t.filterFrame),n.geometry.bind(this.quadUv),n.geometry.draw(K0.TRIANGLES)):(n.geometry.bind(this.quad),n.geometry.draw(K0.TRIANGLE_STRIP))}calculateSpriteMatrix(e,t){let{sourceFrame:i,destinationFrame:s}=this.activeState,{orig:n}=t._texture,o=e.set(s.width,0,0,s.height,i.x,i.y),a=t.worldTransform.copyTo(je.TEMP_MATRIX);return a.invert(),o.prepend(a),o.scale(1/n.width,1/n.height),o.translate(t.anchor.x,t.anchor.y),o}destroy(){this.renderer=null,this.texturePool.clear(!1)}getOptimalFilterTexture(e,t,i=1,s=ut.NONE){return this.texturePool.getOptimalTexture(e,t,i,s)}getFilterTexture(e,t,i){if(typeof e=="number"){let n=e;e=t,t=n}e=e||this.activeState.renderTexture;let s=this.texturePool.getOptimalTexture(e.width,e.height,t||e.resolution,i||ut.NONE);return s.filterFrame=e.filterFrame,s}returnFilterTexture(e){this.texturePool.returnTexture(e)}emptyPool(){this.texturePool.clear(!0)}resize(){this.texturePool.setScreenSize(this.renderer.view)}transformAABB(e,t){let i=Kh[0],s=Kh[1],n=Kh[2],o=Kh[3];i.set(t.left,t.top),s.set(t.left,t.bottom),n.set(t.right,t.top),o.set(t.right,t.bottom),e.apply(i,i),e.apply(s,s),e.apply(n,n),e.apply(o,o);let a=Math.min(i.x,s.x,n.x,o.x),l=Math.min(i.y,s.y,n.y,o.y),c=Math.max(i.x,s.x,n.x,o.x),h=Math.max(i.y,s.y,n.y,o.y);t.x=a,t.y=l,t.width=c-a,t.height=h-l}roundFrame(e,t,i,s,n){if(!(e.width<=0||e.height<=0||i.width<=0||i.height<=0)){if(n){let{a:o,b:a,c:l,d:c}=n;if((Math.abs(a)>1e-4||Math.abs(l)>1e-4)&&(Math.abs(o)>1e-4||Math.abs(c)>1e-4))return}n=n?i2.copyFrom(n):i2.identity(),n.translate(-i.x,-i.y).scale(s.width/i.width,s.height/i.height).translate(s.x,s.y),this.transformAABB(n,e),e.ceil(t),this.transformAABB(n.invert(),e)}}};ia.extension={type:Z.RendererSystem,name:"filter"};te.add(ia);var Jl=class{constructor(e){this.framebuffer=e,this.stencil=null,this.dirtyId=-1,this.dirtyFormat=-1,this.dirtySize=-1,this.multisample=ut.NONE,this.msaaBuffer=null,this.blitFramebuffer=null,this.mipLevel=0}};var mE=new Ie,sa=class{constructor(e){this.renderer=e,this.managedFramebuffers=[],this.unknownFramebuffer=new Ks(10,10),this.msaaSamples=null}contextChange(){this.disposeAll(!0);let e=this.gl=this.renderer.gl;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.current=this.unknownFramebuffer,this.viewport=new Ie,this.hasMRT=!0,this.writeDepthTexture=!0,this.renderer.context.webGLVersion===1){let t=this.renderer.context.extensions.drawBuffers,i=this.renderer.context.extensions.depthTexture;K.PREFER_ENV===hr.WEBGL_LEGACY&&(t=null,i=null),t?e.drawBuffers=s=>t.drawBuffersWEBGL(s):(this.hasMRT=!1,e.drawBuffers=()=>{}),i||(this.writeDepthTexture=!1)}else this.msaaSamples=e.getInternalformatParameter(e.RENDERBUFFER,e.RGBA8,e.SAMPLES)}bind(e,t,i=0){let{gl:s}=this;if(e){let n=e.glFramebuffers[this.CONTEXT_UID]||this.initFramebuffer(e);this.current!==e&&(this.current=e,s.bindFramebuffer(s.FRAMEBUFFER,n.framebuffer)),n.mipLevel!==i&&(e.dirtyId++,e.dirtyFormat++,n.mipLevel=i),n.dirtyId!==e.dirtyId&&(n.dirtyId=e.dirtyId,n.dirtyFormat!==e.dirtyFormat?(n.dirtyFormat=e.dirtyFormat,n.dirtySize=e.dirtySize,this.updateFramebuffer(e,i)):n.dirtySize!==e.dirtySize&&(n.dirtySize=e.dirtySize,this.resizeFramebuffer(e)));for(let o=0;o<e.colorTextures.length;o++){let a=e.colorTextures[o];this.renderer.texture.unbind(a.parentTextureArray||a)}if(e.depthTexture&&this.renderer.texture.unbind(e.depthTexture),t){let o=t.width>>i,a=t.height>>i,l=o/t.width;this.setViewport(t.x*l,t.y*l,o,a)}else{let o=e.width>>i,a=e.height>>i;this.setViewport(0,0,o,a)}}else this.current&&(this.current=null,s.bindFramebuffer(s.FRAMEBUFFER,null)),t?this.setViewport(t.x,t.y,t.width,t.height):this.setViewport(0,0,this.renderer.width,this.renderer.height)}setViewport(e,t,i,s){let n=this.viewport;e=Math.round(e),t=Math.round(t),i=Math.round(i),s=Math.round(s),(n.width!==i||n.height!==s||n.x!==e||n.y!==t)&&(n.x=e,n.y=t,n.width=i,n.height=s,this.gl.viewport(e,t,i,s))}get size(){return this.current?{x:0,y:0,width:this.current.width,height:this.current.height}:{x:0,y:0,width:this.renderer.width,height:this.renderer.height}}clear(e,t,i,s,n=xh.COLOR|xh.DEPTH){let{gl:o}=this;o.clearColor(e,t,i,s),o.clear(n)}initFramebuffer(e){let{gl:t}=this,i=new Jl(t.createFramebuffer());return i.multisample=this.detectSamples(e.multisample),e.glFramebuffers[this.CONTEXT_UID]=i,this.managedFramebuffers.push(e),e.disposeRunner.add(this),i}resizeFramebuffer(e){let{gl:t}=this,i=e.glFramebuffers[this.CONTEXT_UID];i.stencil&&(t.bindRenderbuffer(t.RENDERBUFFER,i.stencil),i.msaaBuffer?t.renderbufferStorageMultisample(t.RENDERBUFFER,i.multisample,t.DEPTH24_STENCIL8,e.width,e.height):t.renderbufferStorage(t.RENDERBUFFER,t.DEPTH_STENCIL,e.width,e.height));let s=e.colorTextures,n=s.length;t.drawBuffers||(n=Math.min(n,1));for(let o=0;o<n;o++){let a=s[o],l=a.parentTextureArray||a;this.renderer.texture.bind(l,0),o===0&&i.msaaBuffer&&(t.bindRenderbuffer(t.RENDERBUFFER,i.msaaBuffer),t.renderbufferStorageMultisample(t.RENDERBUFFER,i.multisample,l._glTextures[this.CONTEXT_UID].internalFormat,e.width,e.height))}e.depthTexture&&this.writeDepthTexture&&this.renderer.texture.bind(e.depthTexture,0)}updateFramebuffer(e,t){let{gl:i}=this,s=e.glFramebuffers[this.CONTEXT_UID],n=e.colorTextures,o=n.length;i.drawBuffers||(o=Math.min(o,1)),s.multisample>1&&this.canMultisampleFramebuffer(e)?s.msaaBuffer=s.msaaBuffer||i.createRenderbuffer():s.msaaBuffer&&(i.deleteRenderbuffer(s.msaaBuffer),s.msaaBuffer=null,s.blitFramebuffer&&(s.blitFramebuffer.dispose(),s.blitFramebuffer=null));let a=[];for(let l=0;l<o;l++){let c=n[l],h=c.parentTextureArray||c;this.renderer.texture.bind(h,0),l===0&&s.msaaBuffer?(i.bindRenderbuffer(i.RENDERBUFFER,s.msaaBuffer),i.renderbufferStorageMultisample(i.RENDERBUFFER,s.multisample,h._glTextures[this.CONTEXT_UID].internalFormat,e.width,e.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0,i.RENDERBUFFER,s.msaaBuffer)):(i.framebufferTexture2D(i.FRAMEBUFFER,i.COLOR_ATTACHMENT0+l,c.target,h._glTextures[this.CONTEXT_UID].texture,t),a.push(i.COLOR_ATTACHMENT0+l))}if(a.length>1&&i.drawBuffers(a),e.depthTexture&&this.writeDepthTexture){let c=e.depthTexture;this.renderer.texture.bind(c,0),i.framebufferTexture2D(i.FRAMEBUFFER,i.DEPTH_ATTACHMENT,i.TEXTURE_2D,c._glTextures[this.CONTEXT_UID].texture,t)}(e.stencil||e.depth)&&!(e.depthTexture&&this.writeDepthTexture)?(s.stencil=s.stencil||i.createRenderbuffer(),i.bindRenderbuffer(i.RENDERBUFFER,s.stencil),s.msaaBuffer?i.renderbufferStorageMultisample(i.RENDERBUFFER,s.multisample,i.DEPTH24_STENCIL8,e.width,e.height):i.renderbufferStorage(i.RENDERBUFFER,i.DEPTH_STENCIL,e.width,e.height),i.framebufferRenderbuffer(i.FRAMEBUFFER,i.DEPTH_STENCIL_ATTACHMENT,i.RENDERBUFFER,s.stencil)):s.stencil&&(i.deleteRenderbuffer(s.stencil),s.stencil=null)}canMultisampleFramebuffer(e){return this.renderer.context.webGLVersion!==1&&e.colorTextures.length<=1&&!e.depthTexture}detectSamples(e){let{msaaSamples:t}=this,i=ut.NONE;if(e<=1||t===null)return i;for(let s=0;s<t.length;s++)if(t[s]<=e){i=t[s];break}return i===1&&(i=ut.NONE),i}blit(e,t,i){let{current:s,renderer:n,gl:o,CONTEXT_UID:a}=this;if(n.context.webGLVersion!==2||!s)return;let l=s.glFramebuffers[a];if(!l)return;if(!e){if(!l.msaaBuffer)return;let h=s.colorTextures[0];if(!h)return;l.blitFramebuffer||(l.blitFramebuffer=new Ks(s.width,s.height),l.blitFramebuffer.addColorTexture(0,h)),e=l.blitFramebuffer,e.colorTextures[0]!==h&&(e.colorTextures[0]=h,e.dirtyId++,e.dirtyFormat++),(e.width!==s.width||e.height!==s.height)&&(e.width=s.width,e.height=s.height,e.dirtyId++,e.dirtySize++)}t||(t=mE,t.width=s.width,t.height=s.height),i||(i=t);let c=t.width===i.width&&t.height===i.height;this.bind(e),o.bindFramebuffer(o.READ_FRAMEBUFFER,l.framebuffer),o.blitFramebuffer(t.left,t.top,t.right,t.bottom,i.left,i.top,i.right,i.bottom,o.COLOR_BUFFER_BIT,c?o.NEAREST:o.LINEAR),o.bindFramebuffer(o.READ_FRAMEBUFFER,e.glFramebuffers[this.CONTEXT_UID].framebuffer)}disposeFramebuffer(e,t){let i=e.glFramebuffers[this.CONTEXT_UID],s=this.gl;if(!i)return;delete e.glFramebuffers[this.CONTEXT_UID];let n=this.managedFramebuffers.indexOf(e);n>=0&&this.managedFramebuffers.splice(n,1),e.disposeRunner.remove(this),t||(s.deleteFramebuffer(i.framebuffer),i.msaaBuffer&&s.deleteRenderbuffer(i.msaaBuffer),i.stencil&&s.deleteRenderbuffer(i.stencil)),i.blitFramebuffer&&this.disposeFramebuffer(i.blitFramebuffer,t)}disposeAll(e){let t=this.managedFramebuffers;this.managedFramebuffers=[];for(let i=0;i<t.length;i++)this.disposeFramebuffer(t[i],e)}forceStencil(){let e=this.current;if(!e)return;let t=e.glFramebuffers[this.CONTEXT_UID];if(!t||t.stencil)return;e.stencil=!0;let i=e.width,s=e.height,n=this.gl,o=n.createRenderbuffer();n.bindRenderbuffer(n.RENDERBUFFER,o),t.msaaBuffer?n.renderbufferStorageMultisample(n.RENDERBUFFER,t.multisample,n.DEPTH24_STENCIL8,i,s):n.renderbufferStorage(n.RENDERBUFFER,n.DEPTH_STENCIL,i,s),t.stencil=o,n.framebufferRenderbuffer(n.FRAMEBUFFER,n.DEPTH_STENCIL_ATTACHMENT,n.RENDERBUFFER,o)}reset(){this.current=this.unknownFramebuffer,this.viewport=new Ie}destroy(){this.renderer=null}};sa.extension={type:Z.RendererSystem,name:"framebuffer"};te.add(sa);var s2={5126:4,5123:2,5121:1},na=class{constructor(e){this.renderer=e,this._activeGeometry=null,this._activeVao=null,this.hasVao=!0,this.hasInstance=!0,this.canUseUInt32ElementIndex=!1,this.managedGeometries={}}contextChange(){this.disposeAll(!0);let e=this.gl=this.renderer.gl,t=this.renderer.context;if(this.CONTEXT_UID=this.renderer.CONTEXT_UID,t.webGLVersion!==2){let i=this.renderer.context.extensions.vertexArrayObject;K.PREFER_ENV===hr.WEBGL_LEGACY&&(i=null),i?(e.createVertexArray=()=>i.createVertexArrayOES(),e.bindVertexArray=s=>i.bindVertexArrayOES(s),e.deleteVertexArray=s=>i.deleteVertexArrayOES(s)):(this.hasVao=!1,e.createVertexArray=()=>null,e.bindVertexArray=()=>null,e.deleteVertexArray=()=>null)}if(t.webGLVersion!==2){let i=e.getExtension("ANGLE_instanced_arrays");i?(e.vertexAttribDivisor=(s,n)=>i.vertexAttribDivisorANGLE(s,n),e.drawElementsInstanced=(s,n,o,a,l)=>i.drawElementsInstancedANGLE(s,n,o,a,l),e.drawArraysInstanced=(s,n,o,a)=>i.drawArraysInstancedANGLE(s,n,o,a)):this.hasInstance=!1}this.canUseUInt32ElementIndex=t.webGLVersion===2||!!t.extensions.uint32ElementIndex}bind(e,t){t=t||this.renderer.shader.shader;let{gl:i}=this,s=e.glVertexArrayObjects[this.CONTEXT_UID],n=!1;s||(this.managedGeometries[e.id]=e,e.disposeRunner.add(this),e.glVertexArrayObjects[this.CONTEXT_UID]=s={},n=!0);let o=s[t.program.id]||this.initGeometryVao(e,t,n);this._activeGeometry=e,this._activeVao!==o&&(this._activeVao=o,this.hasVao?i.bindVertexArray(o):this.activateVao(e,t.program)),this.updateBuffers()}reset(){this.unbind()}updateBuffers(){let e=this._activeGeometry,t=this.renderer.buffer;for(let i=0;i<e.buffers.length;i++){let s=e.buffers[i];t.update(s)}}checkCompatibility(e,t){let i=e.attributes,s=t.attributeData;for(let n in s)if(!i[n])throw new Error(`shader and geometry incompatible, geometry missing the "${n}" attribute`)}getSignature(e,t){let i=e.attributes,s=t.attributeData,n=["g",e.id];for(let o in i)s[o]&&n.push(o,s[o].location);return n.join("-")}initGeometryVao(e,t,i=!0){let s=this.gl,n=this.CONTEXT_UID,o=this.renderer.buffer,a=t.program;a.glPrograms[n]||this.renderer.shader.generateProgram(t),this.checkCompatibility(e,a);let l=this.getSignature(e,a),c=e.glVertexArrayObjects[this.CONTEXT_UID],h=c[l];if(h)return c[a.id]=h,h;let d=e.buffers,p=e.attributes,g={},v={};for(let C in d)g[C]=0,v[C]=0;for(let C in p)!p[C].size&&a.attributeData[C]?p[C].size=a.attributeData[C].size:p[C].size||console.warn(`PIXI Geometry attribute '${C}' size cannot be determined (likely the bound shader does not have the attribute)`),g[p[C].buffer]+=p[C].size*s2[p[C].type];for(let C in p){let w=p[C],k=w.size;w.stride===void 0&&(g[w.buffer]===k*s2[w.type]?w.stride=0:w.stride=g[w.buffer]),w.start===void 0&&(w.start=v[w.buffer],v[w.buffer]+=k*s2[w.type])}h=s.createVertexArray(),s.bindVertexArray(h);for(let C=0;C<d.length;C++){let w=d[C];o.bind(w),i&&w._glBuffers[n].refCount++}return this.activateVao(e,a),c[a.id]=h,c[l]=h,s.bindVertexArray(null),o.unbind(Z0.ARRAY_BUFFER),h}disposeGeometry(e,t){if(!this.managedGeometries[e.id])return;delete this.managedGeometries[e.id];let i=e.glVertexArrayObjects[this.CONTEXT_UID],s=this.gl,n=e.buffers,o=this.renderer?.buffer;if(e.disposeRunner.remove(this),!!i){if(o)for(let a=0;a<n.length;a++){let l=n[a]._glBuffers[this.CONTEXT_UID];l&&(l.refCount--,l.refCount===0&&!t&&o.dispose(n[a],t))}if(!t){for(let a in i)if(a[0]==="g"){let l=i[a];this._activeVao===l&&this.unbind(),s.deleteVertexArray(l)}}delete e.glVertexArrayObjects[this.CONTEXT_UID]}}disposeAll(e){let t=Object.keys(this.managedGeometries);for(let i=0;i<t.length;i++)this.disposeGeometry(this.managedGeometries[t[i]],e)}activateVao(e,t){let i=this.gl,s=this.CONTEXT_UID,n=this.renderer.buffer,o=e.buffers,a=e.attributes;e.indexBuffer&&n.bind(e.indexBuffer);let l=null;for(let c in a){let h=a[c],d=o[h.buffer],p=d._glBuffers[s];if(t.attributeData[c]){l!==p&&(n.bind(d),l=p);let g=t.attributeData[c].location;if(i.enableVertexAttribArray(g),i.vertexAttribPointer(g,h.size,h.type||i.FLOAT,h.normalized,h.stride,h.start),h.instance)if(this.hasInstance)i.vertexAttribDivisor(g,h.divisor);else throw new Error("geometry error, GPU Instancing is not supported on this device")}}}draw(e,t,i,s){let{gl:n}=this,o=this._activeGeometry;if(o.indexBuffer){let a=o.indexBuffer.data.BYTES_PER_ELEMENT,l=a===2?n.UNSIGNED_SHORT:n.UNSIGNED_INT;a===2||a===4&&this.canUseUInt32ElementIndex?o.instanced?n.drawElementsInstanced(e,t||o.indexBuffer.data.length,l,(i||0)*a,s||1):n.drawElements(e,t||o.indexBuffer.data.length,l,(i||0)*a):console.warn("unsupported index buffer type: uint32")}else o.instanced?n.drawArraysInstanced(e,i,t||o.getSize(),s||1):n.drawArrays(e,i,t||o.getSize());return this}unbind(){this.gl.bindVertexArray(null),this._activeVao=null,this._activeGeometry=null}destroy(){this.renderer=null}};na.extension={type:Z.RendererSystem,name:"geometry"};te.add(na);var T3=new je,Qs=class{constructor(e,t){this._texture=e,this.mapCoord=new je,this.uClampFrame=new Float32Array(4),this.uClampOffset=new Float32Array(2),this._textureID=-1,this._updateID=0,this.clampOffset=0,this.clampMargin=typeof t>"u"?.5:t,this.isSimple=!1}get texture(){return this._texture}set texture(e){this._texture=e,this._textureID=-1}multiplyUvs(e,t){t===void 0&&(t=e);let i=this.mapCoord;for(let s=0;s<e.length;s+=2){let n=e[s],o=e[s+1];t[s]=n*i.a+o*i.c+i.tx,t[s+1]=n*i.b+o*i.d+i.ty}return t}update(e){let t=this._texture;if(!t||!t.valid||!e&&this._textureID===t._updateID)return!1;this._textureID=t._updateID,this._updateID++;let i=t._uvs;this.mapCoord.set(i.x1-i.x0,i.y1-i.y0,i.x3-i.x0,i.y3-i.y0,i.x0,i.y0);let s=t.orig,n=t.trim;n&&(T3.set(s.width/n.width,0,0,s.height/n.height,-n.x/n.width,-n.y/n.height),this.mapCoord.append(T3));let o=t.baseTexture,a=this.uClampFrame,l=this.clampMargin/o.resolution,c=this.clampOffset;return a[0]=(t._frame.x+l+c)/o.width,a[1]=(t._frame.y+l+c)/o.height,a[2]=(t._frame.x+t._frame.width-l+c)/o.width,a[3]=(t._frame.y+t._frame.height-l+c)/o.height,this.uClampOffset[0]=c/o.realWidth,this.uClampOffset[1]=c/o.realHeight,this.isSimple=t._frame.width===o.width&&t._frame.height===o.height&&t.rotate===0,!0}};var _3=`varying vec2 vMaskCoord;
|
|
varying vec2 vTextureCoord;
|
|
|
|
uniform sampler2D uSampler;
|
|
uniform sampler2D mask;
|
|
uniform float alpha;
|
|
uniform float npmAlpha;
|
|
uniform vec4 maskClamp;
|
|
|
|
void main(void)
|
|
{
|
|
float clip = step(3.5,
|
|
step(maskClamp.x, vMaskCoord.x) +
|
|
step(maskClamp.y, vMaskCoord.y) +
|
|
step(vMaskCoord.x, maskClamp.z) +
|
|
step(vMaskCoord.y, maskClamp.w));
|
|
|
|
vec4 original = texture2D(uSampler, vTextureCoord);
|
|
vec4 masky = texture2D(mask, vMaskCoord);
|
|
float alphaMul = 1.0 - npmAlpha * (1.0 - masky.a);
|
|
|
|
original *= (alphaMul * masky.r * alpha * clip);
|
|
|
|
gl_FragColor = original;
|
|
}
|
|
`;var F3=`attribute vec2 aVertexPosition;
|
|
attribute vec2 aTextureCoord;
|
|
|
|
uniform mat3 projectionMatrix;
|
|
uniform mat3 otherMatrix;
|
|
|
|
varying vec2 vMaskCoord;
|
|
varying vec2 vTextureCoord;
|
|
|
|
void main(void)
|
|
{
|
|
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
|
|
|
vTextureCoord = aTextureCoord;
|
|
vMaskCoord = ( otherMatrix * vec3( aTextureCoord, 1.0) ).xy;
|
|
}
|
|
`;var ec=class extends ot{constructor(e,t,i){let s=null;typeof e!="string"&&t===void 0&&i===void 0&&(s=e,e=void 0,t=void 0,i=void 0),super(e||F3,t||_3,i),this.maskSprite=s,this.maskMatrix=new je}get maskSprite(){return this._maskSprite}set maskSprite(e){this._maskSprite=e,this._maskSprite&&(this._maskSprite.renderable=!1)}apply(e,t,i,s){let n=this._maskSprite,o=n._texture;o.valid&&(o.uvMatrix||(o.uvMatrix=new Qs(o,0)),o.uvMatrix.update(),this.uniforms.npmAlpha=o.baseTexture.alphaMode?0:1,this.uniforms.mask=o,this.uniforms.otherMatrix=e.calculateSpriteMatrix(this.maskMatrix,n).prepend(o.uvMatrix.mapCoord),this.uniforms.alpha=n.worldAlpha,this.uniforms.maskClamp=o.uvMatrix.uClampFrame,e.applyFilter(this,t,i,s))}};var tc=class{constructor(e=null){this.type=Nt.NONE,this.autoDetect=!0,this.maskObject=e||null,this.pooled=!1,this.isMaskData=!0,this.resolution=null,this.multisample=ot.defaultMultisample,this.enabled=!0,this.colorMask=15,this._filters=null,this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null,this._scissorRectLocal=null,this._colorMask=15,this._target=null}get filter(){return this._filters?this._filters[0]:null}set filter(e){e?this._filters?this._filters[0]=e:this._filters=[e]:this._filters=null}reset(){this.pooled&&(this.maskObject=null,this.type=Nt.NONE,this.autoDetect=!0),this._target=null,this._scissorRectLocal=null}copyCountersOrReset(e){e?(this._stencilCounter=e._stencilCounter,this._scissorCounter=e._scissorCounter,this._scissorRect=e._scissorRect):(this._stencilCounter=0,this._scissorCounter=0,this._scissorRect=null)}};var oa=class{constructor(e){this.renderer=e,this.enableScissor=!0,this.alphaMaskPool=[],this.maskDataPool=[],this.maskStack=[],this.alphaMaskIndex=0}setMaskStack(e){this.maskStack=e,this.renderer.scissor.setMaskStack(e),this.renderer.stencil.setMaskStack(e)}push(e,t){let i=t;if(!i.isMaskData){let n=this.maskDataPool.pop()||new tc;n.pooled=!0,n.maskObject=t,i=n}let s=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null;if(i.copyCountersOrReset(s),i._colorMask=s?s._colorMask:15,i.autoDetect&&this.detect(i),i._target=e,i.type!==Nt.SPRITE&&this.maskStack.push(i),i.enabled)switch(i.type){case Nt.SCISSOR:this.renderer.scissor.push(i);break;case Nt.STENCIL:this.renderer.stencil.push(i);break;case Nt.SPRITE:i.copyCountersOrReset(null),this.pushSpriteMask(i);break;case Nt.COLOR:this.pushColorMask(i);break;default:break}i.type===Nt.SPRITE&&this.maskStack.push(i)}pop(e){let t=this.maskStack.pop();if(!(!t||t._target!==e)){if(t.enabled)switch(t.type){case Nt.SCISSOR:this.renderer.scissor.pop(t);break;case Nt.STENCIL:this.renderer.stencil.pop(t.maskObject);break;case Nt.SPRITE:this.popSpriteMask(t);break;case Nt.COLOR:this.popColorMask(t);break;default:break}if(t.reset(),t.pooled&&this.maskDataPool.push(t),this.maskStack.length!==0){let i=this.maskStack[this.maskStack.length-1];i.type===Nt.SPRITE&&i._filters&&(i._filters[0].maskSprite=i.maskObject)}}}detect(e){let t=e.maskObject;t?t.isSprite?e.type=Nt.SPRITE:this.enableScissor&&this.renderer.scissor.testScissor(e)?e.type=Nt.SCISSOR:e.type=Nt.STENCIL:e.type=Nt.COLOR}pushSpriteMask(e){let{maskObject:t}=e,i=e._target,s=e._filters;s||(s=this.alphaMaskPool[this.alphaMaskIndex],s||(s=this.alphaMaskPool[this.alphaMaskIndex]=[new ec]));let n=this.renderer,o=n.renderTexture,a,l;if(o.current){let h=o.current;a=e.resolution||h.resolution,l=e.multisample??h.multisample}else a=e.resolution||n.resolution,l=e.multisample??n.multisample;s[0].resolution=a,s[0].multisample=l,s[0].maskSprite=t;let c=i.filterArea;i.filterArea=t.getBounds(!0),n.filter.push(i,s),i.filterArea=c,e._filters||this.alphaMaskIndex++}popSpriteMask(e){this.renderer.filter.pop(),e._filters?e._filters[0].maskSprite=null:(this.alphaMaskIndex--,this.alphaMaskPool[this.alphaMaskIndex][0].maskSprite=null)}pushColorMask(e){let t=e._colorMask,i=e._colorMask=t&e.colorMask;i!==t&&this.renderer.gl.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)}popColorMask(e){let t=e._colorMask,i=this.maskStack.length>0?this.maskStack[this.maskStack.length-1]._colorMask:15;i!==t&&this.renderer.gl.colorMask((i&1)!==0,(i&2)!==0,(i&4)!==0,(i&8)!==0)}destroy(){this.renderer=null}};oa.extension={type:Z.RendererSystem,name:"mask"};te.add(oa);var aa=class{constructor(e){this.renderer=e,this.maskStack=[],this.glConst=0}getStackLength(){return this.maskStack.length}setMaskStack(e){let{gl:t}=this.renderer,i=this.getStackLength();this.maskStack=e;let s=this.getStackLength();s!==i&&(s===0?t.disable(this.glConst):(t.enable(this.glConst),this._useCurrent()))}_useCurrent(){}destroy(){this.renderer=null,this.maskStack=null}};var A3=new je,k3=[],Zh=class extends aa{constructor(r){super(r),this.glConst=K.ADAPTER.getWebGLRenderingContext().SCISSOR_TEST}getStackLength(){let r=this.maskStack[this.maskStack.length-1];return r?r._scissorCounter:0}calcScissorRect(r){if(r._scissorRectLocal)return;let e=r._scissorRect,{maskObject:t}=r,{renderer:i}=this,s=i.renderTexture,n=t.getBounds(!0,k3.pop()??new Ie);this.roundFrameToPixels(n,s.current?s.current.resolution:i.resolution,s.sourceFrame,s.destinationFrame,i.projection.transform),e&&n.fit(e),r._scissorRectLocal=n}static isMatrixRotated(r){if(!r)return!1;let{a:e,b:t,c:i,d:s}=r;return(Math.abs(t)>1e-4||Math.abs(i)>1e-4)&&(Math.abs(e)>1e-4||Math.abs(s)>1e-4)}testScissor(r){let{maskObject:e}=r;if(!e.isFastRect||!e.isFastRect()||Zh.isMatrixRotated(e.worldTransform)||Zh.isMatrixRotated(this.renderer.projection.transform))return!1;this.calcScissorRect(r);let t=r._scissorRectLocal;return t.width>0&&t.height>0}roundFrameToPixels(r,e,t,i,s){Zh.isMatrixRotated(s)||(s=s?A3.copyFrom(s):A3.identity(),s.translate(-t.x,-t.y).scale(i.width/t.width,i.height/t.height).translate(i.x,i.y),this.renderer.filter.transformAABB(s,r),r.fit(i),r.x=Math.round(r.x*e),r.y=Math.round(r.y*e),r.width=Math.round(r.width*e),r.height=Math.round(r.height*e))}push(r){r._scissorRectLocal||this.calcScissorRect(r);let{gl:e}=this.renderer;r._scissorRect||e.enable(e.SCISSOR_TEST),r._scissorCounter++,r._scissorRect=r._scissorRectLocal,this._useCurrent()}pop(r){let{gl:e}=this.renderer;r&&k3.push(r._scissorRectLocal),this.getStackLength()>0?this._useCurrent():e.disable(e.SCISSOR_TEST)}_useCurrent(){let r=this.maskStack[this.maskStack.length-1]._scissorRect,e;this.renderer.renderTexture.current?e=r.y:e=this.renderer.height-r.height-r.y,this.renderer.gl.scissor(r.x,e,r.width,r.height)}},Qh=Zh;Qh.extension={type:Z.RendererSystem,name:"scissor"};te.add(Qh);var la=class extends aa{constructor(e){super(e),this.glConst=K.ADAPTER.getWebGLRenderingContext().STENCIL_TEST}getStackLength(){let e=this.maskStack[this.maskStack.length-1];return e?e._stencilCounter:0}push(e){let t=e.maskObject,{gl:i}=this.renderer,s=e._stencilCounter;s===0&&(this.renderer.framebuffer.forceStencil(),i.clearStencil(0),i.clear(i.STENCIL_BUFFER_BIT),i.enable(i.STENCIL_TEST)),e._stencilCounter++;let n=e._colorMask;n!==0&&(e._colorMask=0,i.colorMask(!1,!1,!1,!1)),i.stencilFunc(i.EQUAL,s,4294967295),i.stencilOp(i.KEEP,i.KEEP,i.INCR),t.renderable=!0,t.render(this.renderer),this.renderer.batch.flush(),t.renderable=!1,n!==0&&(e._colorMask=n,i.colorMask((n&1)!==0,(n&2)!==0,(n&4)!==0,(n&8)!==0)),this._useCurrent()}pop(e){let t=this.renderer.gl;if(this.getStackLength()===0)t.disable(t.STENCIL_TEST);else{let i=this.maskStack.length!==0?this.maskStack[this.maskStack.length-1]:null,s=i?i._colorMask:15;s!==0&&(i._colorMask=0,t.colorMask(!1,!1,!1,!1)),t.stencilOp(t.KEEP,t.KEEP,t.DECR),e.renderable=!0,e.render(this.renderer),this.renderer.batch.flush(),e.renderable=!1,s!==0&&(i._colorMask=s,t.colorMask((s&1)!==0,(s&2)!==0,(s&4)!==0,(s&8)!==0)),this._useCurrent()}}_useCurrent(){let e=this.renderer.gl;e.stencilFunc(e.EQUAL,this.getStackLength(),4294967295),e.stencilOp(e.KEEP,e.KEEP,e.KEEP)}};la.extension={type:Z.RendererSystem,name:"stencil"};te.add(la);var ca=class{constructor(e){this.renderer=e,this.plugins={},Object.defineProperties(this.plugins,{extract:{enumerable:!1,get(){return Ue("7.0.0","renderer.plugins.extract has moved to renderer.extract"),e.extract}},prepare:{enumerable:!1,get(){return Ue("7.0.0","renderer.plugins.prepare has moved to renderer.prepare"),e.prepare}},interaction:{enumerable:!1,get(){return Ue("7.0.0","renderer.plugins.interaction has been deprecated, use renderer.events"),e.events}}})}init(){let e=this.rendererPlugins;for(let t in e)this.plugins[t]=new e[t](this.renderer)}destroy(){for(let e in this.plugins)this.plugins[e].destroy(),this.plugins[e]=null}};ca.extension={type:[Z.RendererSystem,Z.CanvasRendererSystem],name:"_plugin"};te.add(ca);var ua=class{constructor(e){this.renderer=e,this.destinationFrame=null,this.sourceFrame=null,this.defaultFrame=null,this.projectionMatrix=new je,this.transform=null}update(e,t,i,s){this.destinationFrame=e||this.destinationFrame||this.defaultFrame,this.sourceFrame=t||this.sourceFrame||e,this.calculateProjection(this.destinationFrame,this.sourceFrame,i,s),this.transform&&this.projectionMatrix.append(this.transform);let n=this.renderer;n.globalUniforms.uniforms.projectionMatrix=this.projectionMatrix,n.globalUniforms.update(),n.shader.shader&&n.shader.syncUniformGroup(n.shader.shader.uniforms.globals)}calculateProjection(e,t,i,s){let n=this.projectionMatrix,o=s?-1:1;n.identity(),n.a=1/t.width*2,n.d=o*(1/t.height*2),n.tx=-1-t.x*n.a,n.ty=-o-t.y*n.d}setTransform(e){}destroy(){this.renderer=null}};ua.extension={type:Z.RendererSystem,name:"projection"};te.add(ua);var yE=new Yn,ha=class{constructor(e){this.renderer=e,this._tempMatrix=new je}generateTexture(e,t){let{region:i,...s}=t||{},n=i||e.getLocalBounds(null,!0);n.width===0&&(n.width=1),n.height===0&&(n.height=1);let o=Or.create({width:n.width,height:n.height,...s});this._tempMatrix.tx=-n.x,this._tempMatrix.ty=-n.y;let a=e.transform;return e.transform=yE,this.renderer.render(e,{renderTexture:o,transform:this._tempMatrix,skipUpdateTransform:!!e.parent,blit:!0}),e.transform=a,o}destroy(){}};ha.extension={type:[Z.RendererSystem,Z.CanvasRendererSystem],name:"textureGenerator"};te.add(ha);var Zn=new Ie,rc=new Ie,da=class{constructor(e){this.renderer=e,this.defaultMaskStack=[],this.current=null,this.sourceFrame=new Ie,this.destinationFrame=new Ie,this.viewportFrame=new Ie}contextChange(){let e=this.renderer?.gl.getContextAttributes();this._rendererPremultipliedAlpha=!!(e&&e.alpha&&e.premultipliedAlpha)}bind(e=null,t,i){let s=this.renderer;this.current=e;let n,o,a;e?(n=e.baseTexture,a=n.resolution,t||(Zn.width=e.frame.width,Zn.height=e.frame.height,t=Zn),i||(rc.x=e.frame.x,rc.y=e.frame.y,rc.width=t.width,rc.height=t.height,i=rc),o=n.framebuffer):(a=s.resolution,t||(Zn.width=s._view.screen.width,Zn.height=s._view.screen.height,t=Zn),i||(i=Zn,i.width=t.width,i.height=t.height));let l=this.viewportFrame;l.x=i.x*a,l.y=i.y*a,l.width=i.width*a,l.height=i.height*a,e||(l.y=s.view.height-(l.y+l.height)),l.ceil(),this.renderer.framebuffer.bind(o,l),this.renderer.projection.update(i,t,a,!o),e?this.renderer.mask.setMaskStack(n.maskStack):this.renderer.mask.setMaskStack(this.defaultMaskStack),this.sourceFrame.copyFrom(t),this.destinationFrame.copyFrom(i)}clear(e,t){let i=this.current?this.current.baseTexture.clear:this.renderer.background.backgroundColor,s=Me.shared.setValue(e||i);(this.current&&this.current.baseTexture.alphaMode>0||!this.current&&this._rendererPremultipliedAlpha)&&s.premultiply(s.alpha);let n=this.destinationFrame,o=this.current?this.current.baseTexture:this.renderer._view.screen,a=n.width!==o.width||n.height!==o.height;if(a){let{x:l,y:c,width:h,height:d}=this.viewportFrame;l=Math.round(l),c=Math.round(c),h=Math.round(h),d=Math.round(d),this.renderer.gl.enable(this.renderer.gl.SCISSOR_TEST),this.renderer.gl.scissor(l,c,h,d)}this.renderer.framebuffer.clear(s.red,s.green,s.blue,s.alpha,t),a&&this.renderer.scissor.pop()}resize(){this.bind(null)}reset(){this.bind(null)}destroy(){this.renderer=null}};da.extension={type:Z.RendererSystem,name:"renderTexture"};te.add(da);var ic=class{constructor(e,t){this.program=e,this.uniformData=t,this.uniformGroups={},this.uniformDirtyGroups={},this.uniformBufferBindings={}}destroy(){this.uniformData=null,this.uniformGroups=null,this.uniformDirtyGroups=null,this.uniformBufferBindings=null,this.program=null}};function I3(r,e){let t={},i=e.getProgramParameter(r,e.ACTIVE_ATTRIBUTES);for(let s=0;s<i;s++){let n=e.getActiveAttrib(r,s);if(n.name.startsWith("gl_"))continue;let o=ql(e,n.type),a={type:o,name:n.name,size:$l(o),location:e.getAttribLocation(r,n.name)};t[n.name]=a}return t}function L3(r,e){let t={},i=e.getProgramParameter(r,e.ACTIVE_UNIFORMS);for(let s=0;s<i;s++){let n=e.getActiveUniform(r,s),o=n.name.replace(/\[.*?\]$/,""),a=!!n.name.match(/\[.*?\]$/),l=ql(e,n.type);t[o]={name:o,index:s,type:l,size:n.size,isArray:a,value:jl(l,n.size)}}return t}function n2(r,e){let t=Uh(r,r.VERTEX_SHADER,e.vertexSrc),i=Uh(r,r.FRAGMENT_SHADER,e.fragmentSrc),s=r.createProgram();r.attachShader(s,t),r.attachShader(s,i);let n=e.extra?.transformFeedbackVaryings;if(n&&(typeof r.transformFeedbackVaryings!="function"?console.warn("TransformFeedback is not supported but TransformFeedbackVaryings are given."):r.transformFeedbackVaryings(s,n.names,n.bufferMode==="separate"?r.SEPARATE_ATTRIBS:r.INTERLEAVED_ATTRIBS)),r.linkProgram(s),r.getProgramParameter(s,r.LINK_STATUS)||r2(r,s,t,i),e.attributeData=I3(s,r),e.uniformData=L3(s,r),!/^[ \t]*#[ \t]*version[ \t]+300[ \t]+es[ \t]*$/m.test(e.vertexSrc)){let l=Object.keys(e.attributeData);l.sort((c,h)=>c>h?1:-1);for(let c=0;c<l.length;c++)e.attributeData[l[c]].location=c,r.bindAttribLocation(s,c,l[c]);r.linkProgram(s)}r.deleteShader(t),r.deleteShader(i);let o={};for(let l in e.uniformData){let c=e.uniformData[l];o[l]={location:r.getUniformLocation(s,l),value:jl(c.type,c.size)}}return new ic(s,o)}function vE(r,e,t,i,s){t.buffer.update(s)}var xE={float:`
|
|
data[offset] = v;
|
|
`,vec2:`
|
|
data[offset] = v[0];
|
|
data[offset+1] = v[1];
|
|
`,vec3:`
|
|
data[offset] = v[0];
|
|
data[offset+1] = v[1];
|
|
data[offset+2] = v[2];
|
|
|
|
`,vec4:`
|
|
data[offset] = v[0];
|
|
data[offset+1] = v[1];
|
|
data[offset+2] = v[2];
|
|
data[offset+3] = v[3];
|
|
`,mat2:`
|
|
data[offset] = v[0];
|
|
data[offset+1] = v[1];
|
|
|
|
data[offset+4] = v[2];
|
|
data[offset+5] = v[3];
|
|
`,mat3:`
|
|
data[offset] = v[0];
|
|
data[offset+1] = v[1];
|
|
data[offset+2] = v[2];
|
|
|
|
data[offset + 4] = v[3];
|
|
data[offset + 5] = v[4];
|
|
data[offset + 6] = v[5];
|
|
|
|
data[offset + 8] = v[6];
|
|
data[offset + 9] = v[7];
|
|
data[offset + 10] = v[8];
|
|
`,mat4:`
|
|
for(var i = 0; i < 16; i++)
|
|
{
|
|
data[offset + i] = v[i];
|
|
}
|
|
`},M3={float:4,vec2:8,vec3:12,vec4:16,int:4,ivec2:8,ivec3:12,ivec4:16,uint:4,uvec2:8,uvec3:12,uvec4:16,bool:4,bvec2:8,bvec3:12,bvec4:16,mat2:16*2,mat3:16*3,mat4:16*4};function N3(r){let e=r.map(n=>({data:n,offset:0,dataLen:0,dirty:0})),t=0,i=0,s=0;for(let n=0;n<e.length;n++){let o=e[n];if(t=M3[o.data.type],o.data.size>1&&(t=Math.max(t,16)*o.data.size),o.dataLen=t,i%t!==0&&i<16){let a=i%t%16;i+=a,s+=a}i+t>16?(s=Math.ceil(s/16)*16,o.offset=s,s+=t,i=t):(o.offset=s,i+=t,s+=t)}return s=Math.ceil(s/16)*16,{uboElements:e,size:s}}function P3(r,e){let t=[];for(let i in r)e[i]&&t.push(e[i]);return t.sort((i,s)=>i.index-s.index),t}function o2(r,e){if(!r.autoManage)return{size:0,syncFunc:vE};let t=P3(r.uniforms,e),{uboElements:i,size:s}=N3(t),n=[`
|
|
var v = null;
|
|
var v2 = null;
|
|
var cv = null;
|
|
var t = 0;
|
|
var gl = renderer.gl
|
|
var index = 0;
|
|
var data = buffer.data;
|
|
`];for(let o=0;o<i.length;o++){let a=i[o],l=r.uniforms[a.data.name],c=a.data.name,h=!1;for(let d=0;d<Fi.length;d++){let p=Fi[d];if(p.codeUbo&&p.test(a.data,l)){n.push(`offset = ${a.offset/4};`,Fi[d].codeUbo(a.data.name,l)),h=!0;break}}if(!h)if(a.data.size>1){let d=$l(a.data.type),p=Math.max(M3[a.data.type]/16,1),g=d/p,v=(4-g%4)%4;n.push(`
|
|
cv = ud.${c}.value;
|
|
v = uv.${c};
|
|
offset = ${a.offset/4};
|
|
|
|
t = 0;
|
|
|
|
for(var i=0; i < ${a.data.size*p}; i++)
|
|
{
|
|
for(var j = 0; j < ${g}; j++)
|
|
{
|
|
data[offset++] = v[t++];
|
|
}
|
|
offset += ${v};
|
|
}
|
|
|
|
`)}else{let d=xE[a.data.type];n.push(`
|
|
cv = ud.${c}.value;
|
|
v = uv.${c};
|
|
offset = ${a.offset/4};
|
|
${d};
|
|
`)}}return n.push(`
|
|
renderer.buffer.update(buffer);
|
|
`),{size:s,syncFunc:new Function("ud","uv","renderer","syncData","buffer",n.join(`
|
|
`))}}var DE=0,Jh={textureCount:0,uboCount:0},pa=class{constructor(e){this.destroyed=!1,this.renderer=e,this.systemCheck(),this.gl=null,this.shader=null,this.program=null,this.cache={},this._uboCache={},this.id=DE++}systemCheck(){if(!$h())throw new Error("Current environment does not allow unsafe-eval, please use @pixi/unsafe-eval module to enable support.")}contextChange(e){this.gl=e,this.reset()}bind(e,t){e.disposeRunner.add(this),e.uniforms.globals=this.renderer.globalUniforms;let i=e.program,s=i.glPrograms[this.renderer.CONTEXT_UID]||this.generateProgram(e);return this.shader=e,this.program!==i&&(this.program=i,this.gl.useProgram(s.program)),t||(Jh.textureCount=0,Jh.uboCount=0,this.syncUniformGroup(e.uniformGroup,Jh)),s}setUniforms(e){let t=this.shader.program,i=t.glPrograms[this.renderer.CONTEXT_UID];t.syncUniforms(i.uniformData,e,this.renderer)}syncUniformGroup(e,t){let i=this.getGlProgram();(!e.static||e.dirtyId!==i.uniformDirtyGroups[e.id])&&(i.uniformDirtyGroups[e.id]=e.dirtyId,this.syncUniforms(e,i,t))}syncUniforms(e,t,i){(e.syncUniforms[this.shader.program.id]||this.createSyncGroups(e))(t.uniformData,e.uniforms,this.renderer,i)}createSyncGroups(e){let t=this.getSignature(e,this.shader.program.uniformData,"u");return this.cache[t]||(this.cache[t]=e2(e,this.shader.program.uniformData)),e.syncUniforms[this.shader.program.id]=this.cache[t],e.syncUniforms[this.shader.program.id]}syncUniformBufferGroup(e,t){let i=this.getGlProgram();if(!e.static||e.dirtyId!==0||!i.uniformGroups[e.id]){e.dirtyId=0;let s=i.uniformGroups[e.id]||this.createSyncBufferGroup(e,i,t);e.buffer.update(),s(i.uniformData,e.uniforms,this.renderer,Jh,e.buffer)}this.renderer.buffer.bindBufferBase(e.buffer,i.uniformBufferBindings[t])}createSyncBufferGroup(e,t,i){let{gl:s}=this.renderer;this.renderer.buffer.bind(e.buffer);let n=this.gl.getUniformBlockIndex(t.program,i);t.uniformBufferBindings[i]=this.shader.uniformBindCount,s.uniformBlockBinding(t.program,n,this.shader.uniformBindCount),this.shader.uniformBindCount++;let o=this.getSignature(e,this.shader.program.uniformData,"ubo"),a=this._uboCache[o];if(a||(a=this._uboCache[o]=o2(e,this.shader.program.uniformData)),e.autoManage){let l=new Float32Array(a.size/4);e.buffer.update(l)}return t.uniformGroups[e.id]=a.syncFunc,t.uniformGroups[e.id]}getSignature(e,t,i){let s=e.uniforms,n=[`${i}-`];for(let o in s)n.push(o),t[o]&&n.push(t[o].type);return n.join("-")}getGlProgram(){return this.shader?this.shader.program.glPrograms[this.renderer.CONTEXT_UID]:null}generateProgram(e){let t=this.gl,i=e.program,s=n2(t,i);return i.glPrograms[this.renderer.CONTEXT_UID]=s,s}reset(){this.program=null,this.shader=null}disposeShader(e){this.shader===e&&(this.shader=null)}destroy(){this.renderer=null,this.destroyed=!0}};pa.extension={type:Z.RendererSystem,name:"shader"};te.add(pa);var fs=class{constructor(e){this.renderer=e}run(e){let{renderer:t}=this;t.runners.init.emit(t.options),e.hello&&console.log(`PixiJS 7.2.4 - ${t.rendererLogId} - https://pixijs.com`),t.resize(t.screen.width,t.screen.height)}destroy(){}};fs.defaultOptions={hello:!1};fs.extension={type:[Z.RendererSystem,Z.CanvasRendererSystem],name:"startup"};te.add(fs);function B3(r,e=[]){return e[ke.NORMAL]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[ke.ADD]=[r.ONE,r.ONE],e[ke.MULTIPLY]=[r.DST_COLOR,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA],e[ke.SCREEN]=[r.ONE,r.ONE_MINUS_SRC_COLOR,r.ONE,r.ONE_MINUS_SRC_ALPHA],e[ke.OVERLAY]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[ke.DARKEN]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[ke.LIGHTEN]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[ke.COLOR_DODGE]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[ke.COLOR_BURN]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[ke.HARD_LIGHT]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[ke.SOFT_LIGHT]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[ke.DIFFERENCE]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[ke.EXCLUSION]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[ke.HUE]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[ke.SATURATION]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[ke.COLOR]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[ke.LUMINOSITY]=[r.ONE,r.ONE_MINUS_SRC_ALPHA],e[ke.NONE]=[0,0],e[ke.NORMAL_NPM]=[r.SRC_ALPHA,r.ONE_MINUS_SRC_ALPHA,r.ONE,r.ONE_MINUS_SRC_ALPHA],e[ke.ADD_NPM]=[r.SRC_ALPHA,r.ONE,r.ONE,r.ONE],e[ke.SCREEN_NPM]=[r.SRC_ALPHA,r.ONE_MINUS_SRC_COLOR,r.ONE,r.ONE_MINUS_SRC_ALPHA],e[ke.SRC_IN]=[r.DST_ALPHA,r.ZERO],e[ke.SRC_OUT]=[r.ONE_MINUS_DST_ALPHA,r.ZERO],e[ke.SRC_ATOP]=[r.DST_ALPHA,r.ONE_MINUS_SRC_ALPHA],e[ke.DST_OVER]=[r.ONE_MINUS_DST_ALPHA,r.ONE],e[ke.DST_IN]=[r.ZERO,r.SRC_ALPHA],e[ke.DST_OUT]=[r.ZERO,r.ONE_MINUS_SRC_ALPHA],e[ke.DST_ATOP]=[r.ONE_MINUS_DST_ALPHA,r.SRC_ALPHA],e[ke.XOR]=[r.ONE_MINUS_DST_ALPHA,r.ONE_MINUS_SRC_ALPHA],e[ke.SUBTRACT]=[r.ONE,r.ONE,r.ONE,r.ONE,r.FUNC_REVERSE_SUBTRACT,r.FUNC_ADD],e}var bE=0,EE=1,SE=2,CE=3,wE=4,TE=5,a2=class{constructor(){this.gl=null,this.stateId=0,this.polygonOffset=0,this.blendMode=ke.NONE,this._blendEq=!1,this.map=[],this.map[bE]=this.setBlend,this.map[EE]=this.setOffset,this.map[SE]=this.setCullFace,this.map[CE]=this.setDepthTest,this.map[wE]=this.setFrontFace,this.map[TE]=this.setDepthMask,this.checks=[],this.defaultState=new D0,this.defaultState.blend=!0}contextChange(r){this.gl=r,this.blendModes=B3(r),this.set(this.defaultState),this.reset()}set(r){if(r=r||this.defaultState,this.stateId!==r.data){let e=this.stateId^r.data,t=0;for(;e;)e&1&&this.map[t].call(this,!!(r.data&1<<t)),e=e>>1,t++;this.stateId=r.data}for(let e=0;e<this.checks.length;e++)this.checks[e](this,r)}forceState(r){r=r||this.defaultState;for(let e=0;e<this.map.length;e++)this.map[e].call(this,!!(r.data&1<<e));for(let e=0;e<this.checks.length;e++)this.checks[e](this,r);this.stateId=r.data}setBlend(r){this.updateCheck(a2.checkBlendMode,r),this.gl[r?"enable":"disable"](this.gl.BLEND)}setOffset(r){this.updateCheck(a2.checkPolygonOffset,r),this.gl[r?"enable":"disable"](this.gl.POLYGON_OFFSET_FILL)}setDepthTest(r){this.gl[r?"enable":"disable"](this.gl.DEPTH_TEST)}setDepthMask(r){this.gl.depthMask(r)}setCullFace(r){this.gl[r?"enable":"disable"](this.gl.CULL_FACE)}setFrontFace(r){this.gl.frontFace(this.gl[r?"CW":"CCW"])}setBlendMode(r){if(r===this.blendMode)return;this.blendMode=r;let e=this.blendModes[r],t=this.gl;e.length===2?t.blendFunc(e[0],e[1]):t.blendFuncSeparate(e[0],e[1],e[2],e[3]),e.length===6?(this._blendEq=!0,t.blendEquationSeparate(e[4],e[5])):this._blendEq&&(this._blendEq=!1,t.blendEquationSeparate(t.FUNC_ADD,t.FUNC_ADD))}setPolygonOffset(r,e){this.gl.polygonOffset(r,e)}reset(){this.gl.pixelStorei(this.gl.UNPACK_FLIP_Y_WEBGL,!1),this.forceState(this.defaultState),this._blendEq=!0,this.blendMode=-1,this.setBlendMode(0)}updateCheck(r,e){let t=this.checks.indexOf(r);e&&t===-1?this.checks.push(r):!e&&t!==-1&&this.checks.splice(t,1)}static checkBlendMode(r,e){r.setBlendMode(e.blendMode)}static checkPolygonOffset(r,e){r.setPolygonOffset(1,e.polygonOffset)}destroy(){this.gl=null}},ed=a2;ed.extension={type:Z.RendererSystem,name:"state"};te.add(ed);var fa=class extends js.default{constructor(){super(...arguments),this.runners={},this._systemsHash={}}setup(e){this.addRunners(...e.runners);let t=(e.priority??[]).filter(s=>e.systems[s]),i=[...t,...Object.keys(e.systems).filter(s=>!t.includes(s))];for(let s of i)this.addSystem(e.systems[s],s)}addRunners(...e){e.forEach(t=>{this.runners[t]=new Ht(t)})}addSystem(e,t){let i=new e(this);if(this[t])throw new Error(`Whoops! The name "${t}" is already in use`);this[t]=i,this._systemsHash[t]=i;for(let s in this.runners)this.runners[s].add(i);return this}emitWithCustomOptions(e,t){let i=Object.keys(this._systemsHash);e.items.forEach(s=>{let n=i.find(o=>this._systemsHash[o]===s);s[e.name](t[n])})}destroy(){Object.values(this.runners).forEach(e=>{e.destroy()}),this._systemsHash={}}};var td=class{constructor(r){this.renderer=r,this.count=0,this.checkCount=0,this.maxIdle=td.defaultMaxIdle,this.checkCountMax=td.defaultCheckCountMax,this.mode=td.defaultMode}postrender(){this.renderer.objectRenderer.renderingToScreen&&(this.count++,this.mode!==bh.MANUAL&&(this.checkCount++,this.checkCount>this.checkCountMax&&(this.checkCount=0,this.run())))}run(){let r=this.renderer.texture,e=r.managedTextures,t=!1;for(let i=0;i<e.length;i++){let s=e[i];!s.framebuffer&&this.count-s.touched>this.maxIdle&&(r.destroyTexture(s,!0),e[i]=null,t=!0)}if(t){let i=0;for(let s=0;s<e.length;s++)e[s]!==null&&(e[i++]=e[s]);e.length=i}}unload(r){let e=this.renderer.texture,t=r._texture;t&&!t.framebuffer&&e.destroyTexture(t);for(let i=r.children.length-1;i>=0;i--)this.unload(r.children[i])}destroy(){this.renderer=null}},J0=td;J0.defaultMode=bh.AUTO;J0.defaultMaxIdle=60*60;J0.defaultCheckCountMax=60*10;J0.extension={type:Z.RendererSystem,name:"textureGC"};te.add(J0);var Qn=class{constructor(e){this.texture=e,this.width=-1,this.height=-1,this.dirtyId=-1,this.dirtyStyleId=-1,this.mipmap=!1,this.wrapMode=33071,this.type=Ce.UNSIGNED_BYTE,this.internalFormat=le.RGBA,this.samplerType=0}};function R3(r){let e;return"WebGL2RenderingContext"in globalThis&&r instanceof globalThis.WebGL2RenderingContext?e={[Ce.UNSIGNED_BYTE]:{[le.RGBA]:r.RGBA8,[le.RGB]:r.RGB8,[le.RG]:r.RG8,[le.RED]:r.R8,[le.RGBA_INTEGER]:r.RGBA8UI,[le.RGB_INTEGER]:r.RGB8UI,[le.RG_INTEGER]:r.RG8UI,[le.RED_INTEGER]:r.R8UI,[le.ALPHA]:r.ALPHA,[le.LUMINANCE]:r.LUMINANCE,[le.LUMINANCE_ALPHA]:r.LUMINANCE_ALPHA},[Ce.BYTE]:{[le.RGBA]:r.RGBA8_SNORM,[le.RGB]:r.RGB8_SNORM,[le.RG]:r.RG8_SNORM,[le.RED]:r.R8_SNORM,[le.RGBA_INTEGER]:r.RGBA8I,[le.RGB_INTEGER]:r.RGB8I,[le.RG_INTEGER]:r.RG8I,[le.RED_INTEGER]:r.R8I},[Ce.UNSIGNED_SHORT]:{[le.RGBA_INTEGER]:r.RGBA16UI,[le.RGB_INTEGER]:r.RGB16UI,[le.RG_INTEGER]:r.RG16UI,[le.RED_INTEGER]:r.R16UI,[le.DEPTH_COMPONENT]:r.DEPTH_COMPONENT16},[Ce.SHORT]:{[le.RGBA_INTEGER]:r.RGBA16I,[le.RGB_INTEGER]:r.RGB16I,[le.RG_INTEGER]:r.RG16I,[le.RED_INTEGER]:r.R16I},[Ce.UNSIGNED_INT]:{[le.RGBA_INTEGER]:r.RGBA32UI,[le.RGB_INTEGER]:r.RGB32UI,[le.RG_INTEGER]:r.RG32UI,[le.RED_INTEGER]:r.R32UI,[le.DEPTH_COMPONENT]:r.DEPTH_COMPONENT24},[Ce.INT]:{[le.RGBA_INTEGER]:r.RGBA32I,[le.RGB_INTEGER]:r.RGB32I,[le.RG_INTEGER]:r.RG32I,[le.RED_INTEGER]:r.R32I},[Ce.FLOAT]:{[le.RGBA]:r.RGBA32F,[le.RGB]:r.RGB32F,[le.RG]:r.RG32F,[le.RED]:r.R32F,[le.DEPTH_COMPONENT]:r.DEPTH_COMPONENT32F},[Ce.HALF_FLOAT]:{[le.RGBA]:r.RGBA16F,[le.RGB]:r.RGB16F,[le.RG]:r.RG16F,[le.RED]:r.R16F},[Ce.UNSIGNED_SHORT_5_6_5]:{[le.RGB]:r.RGB565},[Ce.UNSIGNED_SHORT_4_4_4_4]:{[le.RGBA]:r.RGBA4},[Ce.UNSIGNED_SHORT_5_5_5_1]:{[le.RGBA]:r.RGB5_A1},[Ce.UNSIGNED_INT_2_10_10_10_REV]:{[le.RGBA]:r.RGB10_A2,[le.RGBA_INTEGER]:r.RGB10_A2UI},[Ce.UNSIGNED_INT_10F_11F_11F_REV]:{[le.RGB]:r.R11F_G11F_B10F},[Ce.UNSIGNED_INT_5_9_9_9_REV]:{[le.RGB]:r.RGB9_E5},[Ce.UNSIGNED_INT_24_8]:{[le.DEPTH_STENCIL]:r.DEPTH24_STENCIL8},[Ce.FLOAT_32_UNSIGNED_INT_24_8_REV]:{[le.DEPTH_STENCIL]:r.DEPTH32F_STENCIL8}}:e={[Ce.UNSIGNED_BYTE]:{[le.RGBA]:r.RGBA,[le.RGB]:r.RGB,[le.ALPHA]:r.ALPHA,[le.LUMINANCE]:r.LUMINANCE,[le.LUMINANCE_ALPHA]:r.LUMINANCE_ALPHA},[Ce.UNSIGNED_SHORT_5_6_5]:{[le.RGB]:r.RGB},[Ce.UNSIGNED_SHORT_4_4_4_4]:{[le.RGBA]:r.RGBA},[Ce.UNSIGNED_SHORT_5_5_5_1]:{[le.RGBA]:r.RGBA}},e}var ga=class{constructor(e){this.renderer=e,this.boundTextures=[],this.currentLocation=-1,this.managedTextures=[],this._unknownBoundTextures=!1,this.unknownTexture=new we,this.hasIntegerTextures=!1}contextChange(){let e=this.gl=this.renderer.gl;this.CONTEXT_UID=this.renderer.CONTEXT_UID,this.webGLVersion=this.renderer.context.webGLVersion,this.internalFormats=R3(e);let t=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS);this.boundTextures.length=t;for(let s=0;s<t;s++)this.boundTextures[s]=null;this.emptyTextures={};let i=new Qn(e.createTexture());e.bindTexture(e.TEXTURE_2D,i.texture),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,new Uint8Array(4)),this.emptyTextures[e.TEXTURE_2D]=i,this.emptyTextures[e.TEXTURE_CUBE_MAP]=new Qn(e.createTexture()),e.bindTexture(e.TEXTURE_CUBE_MAP,this.emptyTextures[e.TEXTURE_CUBE_MAP].texture);for(let s=0;s<6;s++)e.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+s,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,null);e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_CUBE_MAP,e.TEXTURE_MIN_FILTER,e.LINEAR);for(let s=0;s<this.boundTextures.length;s++)this.bind(null,s)}bind(e,t=0){let{gl:i}=this;if(e=e?.castToBaseTexture(),e?.valid&&!e.parentTextureArray){e.touched=this.renderer.textureGC.count;let s=e._glTextures[this.CONTEXT_UID]||this.initTexture(e);this.boundTextures[t]!==e&&(this.currentLocation!==t&&(this.currentLocation=t,i.activeTexture(i.TEXTURE0+t)),i.bindTexture(e.target,s.texture)),s.dirtyId!==e.dirtyId?(this.currentLocation!==t&&(this.currentLocation=t,i.activeTexture(i.TEXTURE0+t)),this.updateTexture(e)):s.dirtyStyleId!==e.dirtyStyleId&&this.updateTextureStyle(e),this.boundTextures[t]=e}else this.currentLocation!==t&&(this.currentLocation=t,i.activeTexture(i.TEXTURE0+t)),i.bindTexture(i.TEXTURE_2D,this.emptyTextures[i.TEXTURE_2D].texture),this.boundTextures[t]=null}reset(){this._unknownBoundTextures=!0,this.hasIntegerTextures=!1,this.currentLocation=-1;for(let e=0;e<this.boundTextures.length;e++)this.boundTextures[e]=this.unknownTexture}unbind(e){let{gl:t,boundTextures:i}=this;if(this._unknownBoundTextures){this._unknownBoundTextures=!1;for(let s=0;s<i.length;s++)i[s]===this.unknownTexture&&this.bind(null,s)}for(let s=0;s<i.length;s++)i[s]===e&&(this.currentLocation!==s&&(t.activeTexture(t.TEXTURE0+s),this.currentLocation=s),t.bindTexture(e.target,this.emptyTextures[e.target].texture),i[s]=null)}ensureSamplerType(e){let{boundTextures:t,hasIntegerTextures:i,CONTEXT_UID:s}=this;if(i)for(let n=e-1;n>=0;--n){let o=t[n];o&&o._glTextures[s].samplerType!==Dh.FLOAT&&this.renderer.texture.unbind(o)}}initTexture(e){let t=new Qn(this.gl.createTexture());return t.dirtyId=-1,e._glTextures[this.CONTEXT_UID]=t,this.managedTextures.push(e),e.on("dispose",this.destroyTexture,this),t}initTextureType(e,t){t.internalFormat=this.internalFormats[e.type]?.[e.format]??e.format,this.webGLVersion===2&&e.type===Ce.HALF_FLOAT?t.type=this.gl.HALF_FLOAT:t.type=e.type}updateTexture(e){let t=e._glTextures[this.CONTEXT_UID];if(!t)return;let i=this.renderer;if(this.initTextureType(e,t),e.resource?.upload(i,e,t))t.samplerType!==Dh.FLOAT&&(this.hasIntegerTextures=!0);else{let s=e.realWidth,n=e.realHeight,o=i.gl;(t.width!==s||t.height!==n||t.dirtyId<0)&&(t.width=s,t.height=n,o.texImage2D(e.target,0,t.internalFormat,s,n,0,e.format,t.type,null))}e.dirtyStyleId!==t.dirtyStyleId&&this.updateTextureStyle(e),t.dirtyId=e.dirtyId}destroyTexture(e,t){let{gl:i}=this;if(e=e.castToBaseTexture(),e._glTextures[this.CONTEXT_UID]&&(this.unbind(e),i.deleteTexture(e._glTextures[this.CONTEXT_UID].texture),e.off("dispose",this.destroyTexture,this),delete e._glTextures[this.CONTEXT_UID],!t)){let s=this.managedTextures.indexOf(e);s!==-1&&Lh(this.managedTextures,s,1)}}updateTextureStyle(e){let t=e._glTextures[this.CONTEXT_UID];t&&((e.mipmap===x0.POW2||this.webGLVersion!==2)&&!e.isPowerOfTwo?t.mipmap=!1:t.mipmap=e.mipmap>=1,this.webGLVersion!==2&&!e.isPowerOfTwo?t.wrapMode=dr.CLAMP:t.wrapMode=e.wrapMode,e.resource?.style(this.renderer,e,t)||this.setStyle(e,t),t.dirtyStyleId=e.dirtyStyleId)}setStyle(e,t){let i=this.gl;if(t.mipmap&&e.mipmap!==x0.ON_MANUAL&&i.generateMipmap(e.target),i.texParameteri(e.target,i.TEXTURE_WRAP_S,t.wrapMode),i.texParameteri(e.target,i.TEXTURE_WRAP_T,t.wrapMode),t.mipmap){i.texParameteri(e.target,i.TEXTURE_MIN_FILTER,e.scaleMode===Nr.LINEAR?i.LINEAR_MIPMAP_LINEAR:i.NEAREST_MIPMAP_NEAREST);let s=this.renderer.context.extensions.anisotropicFiltering;if(s&&e.anisotropicLevel>0&&e.scaleMode===Nr.LINEAR){let n=Math.min(e.anisotropicLevel,i.getParameter(s.MAX_TEXTURE_MAX_ANISOTROPY_EXT));i.texParameterf(e.target,s.TEXTURE_MAX_ANISOTROPY_EXT,n)}}else i.texParameteri(e.target,i.TEXTURE_MIN_FILTER,e.scaleMode===Nr.LINEAR?i.LINEAR:i.NEAREST);i.texParameteri(e.target,i.TEXTURE_MAG_FILTER,e.scaleMode===Nr.LINEAR?i.LINEAR:i.NEAREST)}destroy(){this.renderer=null}};ga.extension={type:Z.RendererSystem,name:"texture"};te.add(ga);var ma=class{constructor(e){this.renderer=e}contextChange(){this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){let{gl:t,CONTEXT_UID:i}=this,s=e._glTransformFeedbacks[i]||this.createGLTransformFeedback(e);t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,s)}unbind(){let{gl:e}=this;e.bindTransformFeedback(e.TRANSFORM_FEEDBACK,null)}beginTransformFeedback(e,t){let{gl:i,renderer:s}=this;t&&s.shader.bind(t),i.beginTransformFeedback(e)}endTransformFeedback(){let{gl:e}=this;e.endTransformFeedback()}createGLTransformFeedback(e){let{gl:t,renderer:i,CONTEXT_UID:s}=this,n=t.createTransformFeedback();e._glTransformFeedbacks[s]=n,t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,n);for(let o=0;o<e.buffers.length;o++){let a=e.buffers[o];a&&(i.buffer.update(a),a._glBuffers[s].refCount++,t.bindBufferBase(t.TRANSFORM_FEEDBACK_BUFFER,o,a._glBuffers[s].buffer||null))}return t.bindTransformFeedback(t.TRANSFORM_FEEDBACK,null),e.disposeRunner.add(this),n}disposeTransformFeedback(e,t){let i=e._glTransformFeedbacks[this.CONTEXT_UID],s=this.gl;e.disposeRunner.remove(this);let n=this.renderer.buffer;if(n)for(let o=0;o<e.buffers.length;o++){let a=e.buffers[o];if(!a)continue;let l=a._glBuffers[this.CONTEXT_UID];l&&(l.refCount--,l.refCount===0&&!t&&n.dispose(a,t))}i&&(t||s.deleteTransformFeedback(i),delete e._glTransformFeedbacks[this.CONTEXT_UID])}destroy(){this.renderer=null}};ma.extension={type:Z.RendererSystem,name:"transformFeedback"};te.add(ma);var gs=class{constructor(e){this.renderer=e}init(e){this.screen=new Ie(0,0,e.width,e.height),this.element=e.view||K.ADAPTER.createCanvas(),this.resolution=e.resolution||K.RESOLUTION,this.autoDensity=!!e.autoDensity}resizeView(e,t){this.element.width=Math.round(e*this.resolution),this.element.height=Math.round(t*this.resolution);let i=this.element.width/this.resolution,s=this.element.height/this.resolution;this.screen.width=i,this.screen.height=s,this.autoDensity&&(this.element.style.width=`${i}px`,this.element.style.height=`${s}px`),this.renderer.emit("resize",i,s),this.renderer.runners.resize.emit(this.screen.width,this.screen.height)}destroy(e){e&&this.element.parentNode?.removeChild(this.element),this.renderer=null,this.element=null,this.screen=null}};gs.defaultOptions={width:800,height:600,resolution:K.RESOLUTION,autoDensity:!1};gs.extension={type:[Z.RendererSystem,Z.CanvasRendererSystem],name:"_view"};te.add(gs);K.PREFER_ENV=hr.WEBGL2;K.STRICT_TEXTURE_CACHE=!1;K.RENDER_OPTIONS={...ps.defaultOptions,...ds.defaultOptions,...gs.defaultOptions,...fs.defaultOptions};Object.defineProperties(K,{WRAP_MODE:{get(){return we.defaultOptions.wrapMode},set(r){Ue("7.1.0","settings.WRAP_MODE is deprecated, use BaseTexture.defaultOptions.wrapMode"),we.defaultOptions.wrapMode=r}},SCALE_MODE:{get(){return we.defaultOptions.scaleMode},set(r){Ue("7.1.0","settings.SCALE_MODE is deprecated, use BaseTexture.defaultOptions.scaleMode"),we.defaultOptions.scaleMode=r}},MIPMAP_TEXTURES:{get(){return we.defaultOptions.mipmap},set(r){Ue("7.1.0","settings.MIPMAP_TEXTURES is deprecated, use BaseTexture.defaultOptions.mipmap"),we.defaultOptions.mipmap=r}},ANISOTROPIC_LEVEL:{get(){return we.defaultOptions.anisotropicLevel},set(r){Ue("7.1.0","settings.ANISOTROPIC_LEVEL is deprecated, use BaseTexture.defaultOptions.anisotropicLevel"),we.defaultOptions.anisotropicLevel=r}},FILTER_RESOLUTION:{get(){return Ue("7.1.0","settings.FILTER_RESOLUTION is deprecated, use Filter.defaultResolution"),ot.defaultResolution},set(r){ot.defaultResolution=r}},FILTER_MULTISAMPLE:{get(){return Ue("7.1.0","settings.FILTER_MULTISAMPLE is deprecated, use Filter.defaultMultisample"),ot.defaultMultisample},set(r){ot.defaultMultisample=r}},SPRITE_MAX_TEXTURES:{get(){return mr.defaultMaxTextures},set(r){Ue("7.1.0","settings.SPRITE_MAX_TEXTURES is deprecated, use BatchRenderer.defaultMaxTextures"),mr.defaultMaxTextures=r}},SPRITE_BATCH_SIZE:{get(){return mr.defaultBatchSize},set(r){Ue("7.1.0","settings.SPRITE_BATCH_SIZE is deprecated, use BatchRenderer.defaultBatchSize"),mr.defaultBatchSize=r}},CAN_UPLOAD_SAME_BUFFER:{get(){return mr.canUploadSameBuffer},set(r){Ue("7.1.0","settings.CAN_UPLOAD_SAME_BUFFER is deprecated, use BatchRenderer.canUploadSameBuffer"),mr.canUploadSameBuffer=r}},GC_MODE:{get(){return J0.defaultMode},set(r){Ue("7.1.0","settings.GC_MODE is deprecated, use TextureGCSystem.defaultMode"),J0.defaultMode=r}},GC_MAX_IDLE:{get(){return J0.defaultMaxIdle},set(r){Ue("7.1.0","settings.GC_MAX_IDLE is deprecated, use TextureGCSystem.defaultMaxIdle"),J0.defaultMaxIdle=r}},GC_MAX_CHECK_COUNT:{get(){return J0.defaultCheckCountMax},set(r){Ue("7.1.0","settings.GC_MAX_CHECK_COUNT is deprecated, use TextureGCSystem.defaultCheckCountMax"),J0.defaultCheckCountMax=r}},PRECISION_VERTEX:{get(){return u0.defaultVertexPrecision},set(r){Ue("7.1.0","settings.PRECISION_VERTEX is deprecated, use Program.defaultVertexPrecision"),u0.defaultVertexPrecision=r}},PRECISION_FRAGMENT:{get(){return u0.defaultFragmentPrecision},set(r){Ue("7.1.0","settings.PRECISION_FRAGMENT is deprecated, use Program.defaultFragmentPrecision"),u0.defaultFragmentPrecision=r}}});var yr=(r=>(r[r.INTERACTION=50]="INTERACTION",r[r.HIGH=25]="HIGH",r[r.NORMAL=0]="NORMAL",r[r.LOW=-25]="LOW",r[r.UTILITY=-50]="UTILITY",r))(yr||{});var ya=class{constructor(e,t=null,i=0,s=!1){this.next=null,this.previous=null,this._destroyed=!1,this.fn=e,this.context=t,this.priority=i,this.once=s}match(e,t=null){return this.fn===e&&this.context===t}emit(e){this.fn&&(this.context?this.fn.call(this.context,e):this.fn(e));let t=this.next;return this.once&&this.destroy(!0),this._destroyed&&(this.next=null),t}connect(e){this.previous=e,e.next&&(e.next.previous=this),this.next=e.next,e.next=this}destroy(e=!1){this._destroyed=!0,this.fn=null,this.context=null,this.previous&&(this.previous.next=this.next),this.next&&(this.next.previous=this.previous);let t=this.next;return this.next=e?null:t,this.previous=null,t}};var vr=class{constructor(){this.autoStart=!1,this.deltaTime=1,this.lastTime=-1,this.speed=1,this.started=!1,this._requestId=null,this._maxElapsedMS=100,this._minElapsedMS=0,this._protected=!1,this._lastFrame=-1,this._head=new ya(null,null,1/0),this.deltaMS=1/vr.targetFPMS,this.elapsedMS=1/vr.targetFPMS,this._tick=r=>{this._requestId=null,this.started&&(this.update(r),this.started&&this._requestId===null&&this._head.next&&(this._requestId=requestAnimationFrame(this._tick)))}}_requestIfNeeded(){this._requestId===null&&this._head.next&&(this.lastTime=performance.now(),this._lastFrame=this.lastTime,this._requestId=requestAnimationFrame(this._tick))}_cancelIfNeeded(){this._requestId!==null&&(cancelAnimationFrame(this._requestId),this._requestId=null)}_startIfPossible(){this.started?this._requestIfNeeded():this.autoStart&&this.start()}add(r,e,t=yr.NORMAL){return this._addListener(new ya(r,e,t))}addOnce(r,e,t=yr.NORMAL){return this._addListener(new ya(r,e,t,!0))}_addListener(r){let e=this._head.next,t=this._head;if(!e)r.connect(t);else{for(;e;){if(r.priority>e.priority){r.connect(t);break}t=e,e=e.next}r.previous||r.connect(t)}return this._startIfPossible(),this}remove(r,e){let t=this._head.next;for(;t;)t.match(r,e)?t=t.destroy():t=t.next;return this._head.next||this._cancelIfNeeded(),this}get count(){if(!this._head)return 0;let r=0,e=this._head;for(;e=e.next;)r++;return r}start(){this.started||(this.started=!0,this._requestIfNeeded())}stop(){this.started&&(this.started=!1,this._cancelIfNeeded())}destroy(){if(!this._protected){this.stop();let r=this._head.next;for(;r;)r=r.destroy(!0);this._head.destroy(),this._head=null}}update(r=performance.now()){let e;if(r>this.lastTime){if(e=this.elapsedMS=r-this.lastTime,e>this._maxElapsedMS&&(e=this._maxElapsedMS),e*=this.speed,this._minElapsedMS){let s=r-this._lastFrame|0;if(s<this._minElapsedMS)return;this._lastFrame=r-s%this._minElapsedMS}this.deltaMS=e,this.deltaTime=this.deltaMS*vr.targetFPMS;let t=this._head,i=t.next;for(;i;)i=i.emit(this.deltaTime);t.next||this._cancelIfNeeded()}else this.deltaTime=this.deltaMS=this.elapsedMS=0;this.lastTime=r}get FPS(){return 1e3/this.elapsedMS}get minFPS(){return 1e3/this._maxElapsedMS}set minFPS(r){let e=Math.min(this.maxFPS,r),t=Math.min(Math.max(0,e)/1e3,vr.targetFPMS);this._maxElapsedMS=1/t}get maxFPS(){return this._minElapsedMS?Math.round(1e3/this._minElapsedMS):0}set maxFPS(r){if(r===0)this._minElapsedMS=0;else{let e=Math.max(this.minFPS,r);this._minElapsedMS=1/(e/1e3)}}static get shared(){if(!vr._shared){let r=vr._shared=new vr;r.autoStart=!0,r._protected=!0}return vr._shared}static get system(){if(!vr._system){let r=vr._system=new vr;r.autoStart=!0,r._protected=!0}return vr._system}},It=vr;It.targetFPMS=.06;Object.defineProperties(K,{TARGET_FPMS:{get(){return It.targetFPMS},set(r){Ue("7.1.0","settings.TARGET_FPMS is deprecated, use Ticker.targetFPMS"),It.targetFPMS=r}}});var sc=class{static init(e){e=Object.assign({autoStart:!0,sharedTicker:!1},e),Object.defineProperty(this,"ticker",{set(t){this._ticker&&this._ticker.remove(this.render,this),this._ticker=t,t&&t.add(this.render,this,yr.LOW)},get(){return this._ticker}}),this.stop=()=>{this._ticker.stop()},this.start=()=>{this._ticker.start()},this._ticker=null,this.ticker=e.sharedTicker?It.shared:new It,e.autoStart&&this.start()}static destroy(){if(this._ticker){let e=this._ticker;this.ticker=null,e.destroy()}}};sc.extension=Z.Application;te.add(sc);var O3=[];te.handleByList(Z.Renderer,O3);function l2(r){for(let e of O3)if(e.test(r))return new e(r);throw new Error("Unable to auto-detect a suitable renderer.")}var G3=`attribute vec2 aVertexPosition;
|
|
attribute vec2 aTextureCoord;
|
|
|
|
uniform mat3 projectionMatrix;
|
|
|
|
varying vec2 vTextureCoord;
|
|
|
|
void main(void)
|
|
{
|
|
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
|
vTextureCoord = aTextureCoord;
|
|
}`;var U3=`attribute vec2 aVertexPosition;
|
|
|
|
uniform mat3 projectionMatrix;
|
|
|
|
varying vec2 vTextureCoord;
|
|
|
|
uniform vec4 inputSize;
|
|
uniform vec4 outputFrame;
|
|
|
|
vec4 filterVertexPosition( void )
|
|
{
|
|
vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;
|
|
|
|
return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
|
|
}
|
|
|
|
vec2 filterTextureCoord( void )
|
|
{
|
|
return aVertexPosition * (outputFrame.zw * inputSize.zw);
|
|
}
|
|
|
|
void main(void)
|
|
{
|
|
gl_Position = filterVertexPosition();
|
|
vTextureCoord = filterTextureCoord();
|
|
}
|
|
`;var c2=G3,nc=U3;var oc=class{constructor(e){this.renderer=e}contextChange(e){let t;if(this.renderer.context.webGLVersion===1){let i=e.getParameter(e.FRAMEBUFFER_BINDING);e.bindFramebuffer(e.FRAMEBUFFER,null),t=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.FRAMEBUFFER,i)}else{let i=e.getParameter(e.DRAW_FRAMEBUFFER_BINDING);e.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),t=e.getParameter(e.SAMPLES),e.bindFramebuffer(e.DRAW_FRAMEBUFFER,i)}t>=ut.HIGH?this.multisample=ut.HIGH:t>=ut.MEDIUM?this.multisample=ut.MEDIUM:t>=ut.LOW?this.multisample=ut.LOW:this.multisample=ut.NONE}destroy(){}};oc.extension={type:Z.RendererSystem,name:"_multisample"};te.add(oc);var rd=class{constructor(e){this.buffer=e||null,this.updateID=-1,this.byteLength=-1,this.refCount=0}};var ac=class{constructor(e){this.renderer=e,this.managedBuffers={},this.boundBufferBases={}}destroy(){this.renderer=null}contextChange(){this.disposeAll(!0),this.gl=this.renderer.gl,this.CONTEXT_UID=this.renderer.CONTEXT_UID}bind(e){let{gl:t,CONTEXT_UID:i}=this,s=e._glBuffers[i]||this.createGLBuffer(e);t.bindBuffer(e.type,s.buffer)}unbind(e){let{gl:t}=this;t.bindBuffer(e,null)}bindBufferBase(e,t){let{gl:i,CONTEXT_UID:s}=this;if(this.boundBufferBases[t]!==e){let n=e._glBuffers[s]||this.createGLBuffer(e);this.boundBufferBases[t]=e,i.bindBufferBase(i.UNIFORM_BUFFER,t,n.buffer)}}bindBufferRange(e,t,i){let{gl:s,CONTEXT_UID:n}=this;i=i||0;let o=e._glBuffers[n]||this.createGLBuffer(e);s.bindBufferRange(s.UNIFORM_BUFFER,t||0,o.buffer,i*256,256)}update(e){let{gl:t,CONTEXT_UID:i}=this,s=e._glBuffers[i]||this.createGLBuffer(e);if(e._updateID!==s.updateID)if(s.updateID=e._updateID,t.bindBuffer(e.type,s.buffer),s.byteLength>=e.data.byteLength)t.bufferSubData(e.type,0,e.data);else{let n=e.static?t.STATIC_DRAW:t.DYNAMIC_DRAW;s.byteLength=e.data.byteLength,t.bufferData(e.type,e.data,n)}}dispose(e,t){if(!this.managedBuffers[e.id])return;delete this.managedBuffers[e.id];let i=e._glBuffers[this.CONTEXT_UID],s=this.gl;e.disposeRunner.remove(this),i&&(t||s.deleteBuffer(i.buffer),delete e._glBuffers[this.CONTEXT_UID])}disposeAll(e){let t=Object.keys(this.managedBuffers);for(let i=0;i<t.length;i++)this.dispose(this.managedBuffers[t[i]],e)}createGLBuffer(e){let{CONTEXT_UID:t,gl:i}=this;return e._glBuffers[t]=new rd(i.createBuffer()),this.managedBuffers[e.id]=e,e.disposeRunner.add(this),e._glBuffers[t]}};ac.extension={type:Z.RendererSystem,name:"buffer"};te.add(ac);var lc=class{constructor(e){this.renderer=e}render(e,t){let i=this.renderer,s,n,o,a;if(t&&(s=t.renderTexture,n=t.clear,o=t.transform,a=t.skipUpdateTransform),this.renderingToScreen=!s,i.runners.prerender.emit(),i.emit("prerender"),i.projection.transform=o,!i.context.isLost){if(s||(this.lastObjectRendered=e),!a){let l=e.enableTempParent();e.updateTransform(),e.disableTempParent(l)}i.renderTexture.bind(s),i.batch.currentRenderer.start(),(n??i.background.clearBeforeRender)&&i.renderTexture.clear(),e.render(i),i.batch.currentRenderer.flush(),s&&(t.blit&&i.framebuffer.blit(),s.baseTexture.update()),i.runners.postrender.emit(),i.projection.transform=null,i.emit("postrender")}}destroy(){this.renderer=null,this.lastObjectRendered=null}};lc.extension={type:Z.RendererSystem,name:"objectRenderer"};te.add(lc);var u2=class extends fa{constructor(r){super(),this.type=_p.WEBGL,r=Object.assign({},K.RENDER_OPTIONS,r),this.gl=null,this.CONTEXT_UID=0,this.globalUniforms=new G0({projectionMatrix:new je},!0);let e={runners:["init","destroy","contextChange","resolutionChange","reset","update","postrender","prerender","resize"],systems:u2.__systems,priority:["_view","textureGenerator","background","_plugin","startup","context","state","texture","buffer","geometry","framebuffer","transformFeedback","mask","scissor","stencil","projection","textureGC","filter","renderTexture","batch","objectRenderer","_multisample"]};this.setup(e),"useContextAlpha"in r&&(Ue("7.0.0","options.useContextAlpha is deprecated, use options.premultipliedAlpha and options.backgroundAlpha instead"),r.premultipliedAlpha=r.useContextAlpha&&r.useContextAlpha!=="notMultiplied",r.backgroundAlpha=r.useContextAlpha===!1?1:r.backgroundAlpha),this._plugin.rendererPlugins=u2.__plugins,this.options=r,this.startup.run(this.options)}static test(r){return r?.forceCanvas?!1:Ah()}render(r,e){this.objectRenderer.render(r,e)}resize(r,e){this._view.resizeView(r,e)}reset(){return this.runners.reset.emit(),this}clear(){this.renderTexture.bind(),this.renderTexture.clear()}destroy(r=!1){this.runners.destroy.items.reverse(),this.emitWithCustomOptions(this.runners.destroy,{_view:r}),super.destroy()}get plugins(){return this._plugin.plugins}get multisample(){return this._multisample.multisample}get width(){return this._view.element.width}get height(){return this._view.element.height}get resolution(){return this._view.resolution}set resolution(r){this._view.resolution=r,this.runners.resolutionChange.emit(r)}get autoDensity(){return this._view.autoDensity}get view(){return this._view.element}get screen(){return this._view.screen}get lastObjectRendered(){return this.objectRenderer.lastObjectRendered}get renderingToScreen(){return this.objectRenderer.renderingToScreen}get rendererLogId(){return`WebGL ${this.context.webGLVersion}`}get clearBeforeRender(){return Ue("7.0.0","renderer.clearBeforeRender has been deprecated, please use renderer.background.clearBeforeRender instead."),this.background.clearBeforeRender}get useContextAlpha(){return Ue("7.0.0","renderer.useContextAlpha has been deprecated, please use renderer.context.premultipliedAlpha instead."),this.context.useContextAlpha}get preserveDrawingBuffer(){return Ue("7.0.0","renderer.preserveDrawingBuffer has been deprecated, we cannot truly know this unless pixi created the context"),this.context.preserveDrawingBuffer}get backgroundColor(){return Ue("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color}set backgroundColor(r){Ue("7.0.0","renderer.backgroundColor has been deprecated, use renderer.background.color instead."),this.background.color=r}get backgroundAlpha(){return Ue("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha}set backgroundAlpha(r){Ue("7.0.0","renderer.backgroundAlpha has been deprecated, use renderer.background.alpha instead."),this.background.alpha=r}get powerPreference(){return Ue("7.0.0","renderer.powerPreference has been deprecated, we can only know this if pixi creates the context"),this.context.powerPreference}generateTexture(r,e){return this.textureGenerator.generateTexture(r,e)}},Jn=u2;Jn.extension={type:Z.Renderer,priority:1};Jn.__plugins={};Jn.__systems={};te.handleByMap(Z.RendererPlugin,Jn.__plugins);te.handleByMap(Z.RendererSystem,Jn.__systems);te.add(Jn);var Js=class extends fr{constructor(e,t){let{width:i,height:s}=t||{};super(i,s),this.items=[],this.itemDirtyIds=[];for(let n=0;n<e;n++){let o=new we;this.items.push(o),this.itemDirtyIds.push(-2)}this.length=e,this._load=null,this.baseTexture=null}initFromArray(e,t){for(let i=0;i<this.length;i++)e[i]&&(e[i].castToBaseTexture?this.addBaseTextureAt(e[i].castToBaseTexture(),i):e[i]instanceof fr?this.addResourceAt(e[i],i):this.addResourceAt(Ko(e[i],t),i))}dispose(){for(let e=0,t=this.length;e<t;e++)this.items[e].destroy();this.items=null,this.itemDirtyIds=null,this._load=null}addResourceAt(e,t){if(!this.items[t])throw new Error(`Index ${t} is out of bounds`);return e.valid&&!this.valid&&this.resize(e.width,e.height),this.items[t].setResource(e),this}bind(e){if(this.baseTexture!==null)throw new Error("Only one base texture per TextureArray is allowed");super.bind(e);for(let t=0;t<this.length;t++)this.items[t].parentTextureArray=e,this.items[t].on("update",e.update,e)}unbind(e){super.unbind(e);for(let t=0;t<this.length;t++)this.items[t].parentTextureArray=null,this.items[t].off("update",e.update,e)}load(){if(this._load)return this._load;let t=this.items.map(i=>i.resource).filter(i=>i).map(i=>i.load());return this._load=Promise.all(t).then(()=>{let{realWidth:i,realHeight:s}=this.items[0];return this.resize(i,s),Promise.resolve(this)}),this._load}};var va=class extends Js{constructor(e,t){let{width:i,height:s}=t||{},n,o;Array.isArray(e)?(n=e,o=e.length):o=e,super(o,{width:i,height:s}),n&&this.initFromArray(n,t)}addBaseTextureAt(e,t){if(e.resource)this.addResourceAt(e.resource,t);else throw new Error("ArrayResource does not support RenderTexture");return this}bind(e){super.bind(e),e.target=ls.TEXTURE_2D_ARRAY}upload(e,t,i){let{length:s,itemDirtyIds:n,items:o}=this,{gl:a}=e;i.dirtyId<0&&a.texImage3D(a.TEXTURE_2D_ARRAY,0,i.internalFormat,this._width,this._height,s,0,t.format,i.type,null);for(let l=0;l<s;l++){let c=o[l];n[l]<c.dirtyId&&(n[l]=c.dirtyId,c.valid&&a.texSubImage3D(a.TEXTURE_2D_ARRAY,0,0,0,l,c.resource.width,c.resource.height,1,t.format,i.type,c.resource.source))}return!0}};var xa=class extends E0{constructor(e){super(e)}static test(e){let{OffscreenCanvas:t}=globalThis;return t&&e instanceof t?!0:globalThis.HTMLCanvasElement&&e instanceof HTMLCanvasElement}};var cc=class extends Js{constructor(r,e){let{width:t,height:i,autoLoad:s,linkBaseTexture:n}=e||{};if(r&&r.length!==cc.SIDES)throw new Error(`Invalid length. Got ${r.length}, expected 6`);super(6,{width:t,height:i});for(let o=0;o<cc.SIDES;o++)this.items[o].target=ls.TEXTURE_CUBE_MAP_POSITIVE_X+o;this.linkBaseTexture=n!==!1,r&&this.initFromArray(r,e),s!==!1&&this.load()}bind(r){super.bind(r),r.target=ls.TEXTURE_CUBE_MAP}addBaseTextureAt(r,e,t){if(t===void 0&&(t=this.linkBaseTexture),!this.items[e])throw new Error(`Index ${e} is out of bounds`);if(!this.linkBaseTexture||r.parentTextureArray||Object.keys(r._glTextures).length>0)if(r.resource)this.addResourceAt(r.resource,e);else throw new Error("CubeResource does not support copying of renderTexture.");else r.target=ls.TEXTURE_CUBE_MAP_POSITIVE_X+e,r.parentTextureArray=this.baseTexture,this.items[e]=r;return r.valid&&!this.valid&&this.resize(r.realWidth,r.realHeight),this.items[e]=r,this}upload(r,e,t){let i=this.itemDirtyIds;for(let s=0;s<cc.SIDES;s++){let n=this.items[s];(i[s]<n.dirtyId||t.dirtyId<e.dirtyId)&&(n.valid&&n.resource?(n.resource.upload(r,n,t),i[s]=n.dirtyId):i[s]<-1&&(r.gl.texImage2D(n.target,0,t.internalFormat,e.realWidth,e.realHeight,0,e.format,t.type,null),i[s]=-1))}return!0}static test(r){return Array.isArray(r)&&r.length===cc.SIDES}},uc=cc;uc.SIDES=6;var Da=class r extends E0{constructor(e,t){t=t||{};let i,s;typeof e=="string"?(i=r.EMPTY,s=e):(i=e,s=null),super(i),this.url=s,this.crossOrigin=t.crossOrigin??!0,this.alphaMode=typeof t.alphaMode=="number"?t.alphaMode:null,this._load=null,t.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(async(e,t)=>{if(this.url===null){e(this);return}try{let i=await K.ADAPTER.fetch(this.url,{mode:this.crossOrigin?"cors":"no-cors"});if(this.destroyed)return;let s=await i.blob();if(this.destroyed)return;let n=await createImageBitmap(s,{premultiplyAlpha:this.alphaMode===null||this.alphaMode===Qt.UNPACK?"premultiply":"none"});if(this.destroyed)return;this.source=n,this.update(),e(this)}catch(i){if(this.destroyed)return;t(i),this.onError.emit(i)}}),this._load)}upload(e,t,i){return this.source instanceof ImageBitmap?(typeof this.alphaMode=="number"&&(t.alphaMode=this.alphaMode),super.upload(e,t,i)):(this.load(),!1)}dispose(){this.source instanceof ImageBitmap&&this.source.close(),super.dispose(),this._load=null}static test(e){return!!globalThis.createImageBitmap&&typeof ImageBitmap<"u"&&(typeof e=="string"||e instanceof ImageBitmap)}static get EMPTY(){return r._EMPTY=r._EMPTY??K.ADAPTER.createCanvas(0,0),r._EMPTY}};var id=class extends E0{constructor(r,e){e=e||{},super(K.ADAPTER.createCanvas()),this._width=0,this._height=0,this.svg=r,this.scale=e.scale||1,this._overrideWidth=e.width,this._overrideHeight=e.height,this._resolve=null,this._crossorigin=e.crossorigin,this._load=null,e.autoLoad!==!1&&this.load()}load(){return this._load?this._load:(this._load=new Promise(r=>{if(this._resolve=()=>{this.resize(this.source.width,this.source.height),r(this)},id.SVG_XML.test(this.svg.trim())){if(!btoa)throw new Error("Your browser doesn't support base64 conversions.");this.svg=`data:image/svg+xml;base64,${btoa(unescape(encodeURIComponent(this.svg)))}`}this._loadSvg()}),this._load)}_loadSvg(){let r=new Image;E0.crossOrigin(r,this.svg,this._crossorigin),r.src=this.svg,r.onerror=e=>{this._resolve&&(r.onerror=null,this.onError.emit(e))},r.onload=()=>{if(!this._resolve)return;let e=r.width,t=r.height;if(!e||!t)throw new Error("The SVG image must have width and height defined (in pixels), canvas API needs them.");let i=e*this.scale,s=t*this.scale;(this._overrideWidth||this._overrideHeight)&&(i=this._overrideWidth||this._overrideHeight/t*e,s=this._overrideHeight||this._overrideWidth/e*t),i=Math.round(i),s=Math.round(s);let n=this.source;n.width=i,n.height=s,n._pixiId=`canvas_${_i()}`,n.getContext("2d").drawImage(r,0,0,e,t,0,0,i,s),this._resolve(),this._resolve=null}}static getSize(r){let e=id.SVG_SIZE.exec(r),t={};return e&&(t[e[1]]=Math.round(parseFloat(e[3])),t[e[5]]=Math.round(parseFloat(e[7]))),t}dispose(){super.dispose(),this._resolve=null,this._crossorigin=null}static test(r,e){return e==="svg"||typeof r=="string"&&r.startsWith("data:image/svg+xml")||typeof r=="string"&&id.SVG_XML.test(r)}},ms=id;ms.SVG_XML=/^(<\?xml[^?]+\?>)?\s*(<!--[^(-->)]*-->)?\s*\<svg/m;ms.SVG_SIZE=/<svg[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*(?:\s(width|height)=('|")(\d*(?:\.\d+)?)(?:px)?('|"))[^>]*>/i;var h2=class extends E0{constructor(r,e){if(e=e||{},!(r instanceof HTMLVideoElement)){let t=document.createElement("video");t.setAttribute("preload","auto"),t.setAttribute("webkit-playsinline",""),t.setAttribute("playsinline",""),typeof r=="string"&&(r=[r]);let i=r[0].src||r[0];E0.crossOrigin(t,i,e.crossorigin);for(let s=0;s<r.length;++s){let n=document.createElement("source"),{src:o,mime:a}=r[s];o=o||r[s];let l=o.split("?").shift().toLowerCase(),c=l.slice(l.lastIndexOf(".")+1);a=a||h2.MIME_TYPES[c]||`video/${c}`,n.src=o,n.type=a,t.appendChild(n)}r=t}super(r),this.noSubImage=!0,this._autoUpdate=!0,this._isConnectedToTicker=!1,this._updateFPS=e.updateFPS||0,this._msToNextUpdate=0,this.autoPlay=e.autoPlay!==!1,this._load=null,this._resolve=null,this._onCanPlay=this._onCanPlay.bind(this),this._onError=this._onError.bind(this),e.autoLoad!==!1&&this.load()}update(r=0){if(!this.destroyed){let e=It.shared.elapsedMS*this.source.playbackRate;this._msToNextUpdate=Math.floor(this._msToNextUpdate-e),(!this._updateFPS||this._msToNextUpdate<=0)&&(super.update(),this._msToNextUpdate=this._updateFPS?Math.floor(1e3/this._updateFPS):0)}}load(){if(this._load)return this._load;let r=this.source;return(r.readyState===r.HAVE_ENOUGH_DATA||r.readyState===r.HAVE_FUTURE_DATA)&&r.width&&r.height&&(r.complete=!0),r.addEventListener("play",this._onPlayStart.bind(this)),r.addEventListener("pause",this._onPlayStop.bind(this)),this._isSourceReady()?this._onCanPlay():(r.addEventListener("canplay",this._onCanPlay),r.addEventListener("canplaythrough",this._onCanPlay),r.addEventListener("error",this._onError,!0)),this._load=new Promise(e=>{this.valid?e(this):(this._resolve=e,r.load())}),this._load}_onError(r){this.source.removeEventListener("error",this._onError,!0),this.onError.emit(r)}_isSourcePlaying(){let r=this.source;return!r.paused&&!r.ended&&this._isSourceReady()}_isSourceReady(){return this.source.readyState>2}_onPlayStart(){this.valid||this._onCanPlay(),this.autoUpdate&&!this._isConnectedToTicker&&(It.shared.add(this.update,this),this._isConnectedToTicker=!0)}_onPlayStop(){this._isConnectedToTicker&&(It.shared.remove(this.update,this),this._isConnectedToTicker=!1)}_onCanPlay(){let r=this.source;r.removeEventListener("canplay",this._onCanPlay),r.removeEventListener("canplaythrough",this._onCanPlay);let e=this.valid;this.resize(r.videoWidth,r.videoHeight),!e&&this._resolve&&(this._resolve(this),this._resolve=null),this._isSourcePlaying()?this._onPlayStart():this.autoPlay&&r.play()}dispose(){this._isConnectedToTicker&&(It.shared.remove(this.update,this),this._isConnectedToTicker=!1);let r=this.source;r&&(r.removeEventListener("error",this._onError,!0),r.pause(),r.src="",r.load()),super.dispose()}get autoUpdate(){return this._autoUpdate}set autoUpdate(r){r!==this._autoUpdate&&(this._autoUpdate=r,!this._autoUpdate&&this._isConnectedToTicker?(It.shared.remove(this.update,this),this._isConnectedToTicker=!1):this._autoUpdate&&!this._isConnectedToTicker&&this._isSourcePlaying()&&(It.shared.add(this.update,this),this._isConnectedToTicker=!0))}get updateFPS(){return this._updateFPS}set updateFPS(r){r!==this._updateFPS&&(this._updateFPS=r)}static test(r,e){return globalThis.HTMLVideoElement&&r instanceof HTMLVideoElement||h2.TYPES.includes(e)}},ba=h2;ba.TYPES=["mp4","m4v","webm","ogg","ogv","h264","avi","mov"];ba.MIME_TYPES={ogv:"video/ogg",mov:"video/quicktime",m4v:"video/mp4"};Xo.push(Da,Zs,xa,ba,ms,Q0,uc,va);var Ai=class{constructor(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0,this.rect=null,this.updateID=-1}isEmpty(){return this.minX>this.maxX||this.minY>this.maxY}clear(){this.minX=1/0,this.minY=1/0,this.maxX=-1/0,this.maxY=-1/0}getRectangle(e){return this.minX>this.maxX||this.minY>this.maxY?Ie.EMPTY:(e=e||new Ie(0,0,1,1),e.x=this.minX,e.y=this.minY,e.width=this.maxX-this.minX,e.height=this.maxY-this.minY,e)}addPoint(e){this.minX=Math.min(this.minX,e.x),this.maxX=Math.max(this.maxX,e.x),this.minY=Math.min(this.minY,e.y),this.maxY=Math.max(this.maxY,e.y)}addPointMatrix(e,t){let{a:i,b:s,c:n,d:o,tx:a,ty:l}=e,c=i*t.x+n*t.y+a,h=s*t.x+o*t.y+l;this.minX=Math.min(this.minX,c),this.maxX=Math.max(this.maxX,c),this.minY=Math.min(this.minY,h),this.maxY=Math.max(this.maxY,h)}addQuad(e){let t=this.minX,i=this.minY,s=this.maxX,n=this.maxY,o=e[0],a=e[1];t=o<t?o:t,i=a<i?a:i,s=o>s?o:s,n=a>n?a:n,o=e[2],a=e[3],t=o<t?o:t,i=a<i?a:i,s=o>s?o:s,n=a>n?a:n,o=e[4],a=e[5],t=o<t?o:t,i=a<i?a:i,s=o>s?o:s,n=a>n?a:n,o=e[6],a=e[7],t=o<t?o:t,i=a<i?a:i,s=o>s?o:s,n=a>n?a:n,this.minX=t,this.minY=i,this.maxX=s,this.maxY=n}addFrame(e,t,i,s,n){this.addFrameMatrix(e.worldTransform,t,i,s,n)}addFrameMatrix(e,t,i,s,n){let o=e.a,a=e.b,l=e.c,c=e.d,h=e.tx,d=e.ty,p=this.minX,g=this.minY,v=this.maxX,C=this.maxY,w=o*t+l*i+h,k=a*t+c*i+d;p=w<p?w:p,g=k<g?k:g,v=w>v?w:v,C=k>C?k:C,w=o*s+l*i+h,k=a*s+c*i+d,p=w<p?w:p,g=k<g?k:g,v=w>v?w:v,C=k>C?k:C,w=o*t+l*n+h,k=a*t+c*n+d,p=w<p?w:p,g=k<g?k:g,v=w>v?w:v,C=k>C?k:C,w=o*s+l*n+h,k=a*s+c*n+d,p=w<p?w:p,g=k<g?k:g,v=w>v?w:v,C=k>C?k:C,this.minX=p,this.minY=g,this.maxX=v,this.maxY=C}addVertexData(e,t,i){let s=this.minX,n=this.minY,o=this.maxX,a=this.maxY;for(let l=t;l<i;l+=2){let c=e[l],h=e[l+1];s=c<s?c:s,n=h<n?h:n,o=c>o?c:o,a=h>a?h:a}this.minX=s,this.minY=n,this.maxX=o,this.maxY=a}addVertices(e,t,i,s){this.addVerticesMatrix(e.worldTransform,t,i,s)}addVerticesMatrix(e,t,i,s,n=0,o=n){let a=e.a,l=e.b,c=e.c,h=e.d,d=e.tx,p=e.ty,g=this.minX,v=this.minY,C=this.maxX,w=this.maxY;for(let k=i;k<s;k+=2){let B=t[k],L=t[k+1],T=a*B+c*L+d,W=h*L+l*B+p;g=Math.min(g,T-n),C=Math.max(C,T+n),v=Math.min(v,W-o),w=Math.max(w,W+o)}this.minX=g,this.minY=v,this.maxX=C,this.maxY=w}addBounds(e){let t=this.minX,i=this.minY,s=this.maxX,n=this.maxY;this.minX=e.minX<t?e.minX:t,this.minY=e.minY<i?e.minY:i,this.maxX=e.maxX>s?e.maxX:s,this.maxY=e.maxY>n?e.maxY:n}addBoundsMask(e,t){let i=e.minX>t.minX?e.minX:t.minX,s=e.minY>t.minY?e.minY:t.minY,n=e.maxX<t.maxX?e.maxX:t.maxX,o=e.maxY<t.maxY?e.maxY:t.maxY;if(i<=n&&s<=o){let a=this.minX,l=this.minY,c=this.maxX,h=this.maxY;this.minX=i<a?i:a,this.minY=s<l?s:l,this.maxX=n>c?n:c,this.maxY=o>h?o:h}}addBoundsMatrix(e,t){this.addFrameMatrix(t,e.minX,e.minY,e.maxX,e.maxY)}addBoundsArea(e,t){let i=e.minX>t.x?e.minX:t.x,s=e.minY>t.y?e.minY:t.y,n=e.maxX<t.x+t.width?e.maxX:t.x+t.width,o=e.maxY<t.y+t.height?e.maxY:t.y+t.height;if(i<=n&&s<=o){let a=this.minX,l=this.minY,c=this.maxX,h=this.maxY;this.minX=i<a?i:a,this.minY=s<l?s:l,this.maxX=n>c?n:c,this.maxY=o>h?o:h}}pad(e=0,t=e){this.isEmpty()||(this.minX-=e,this.maxX+=e,this.minY-=t,this.maxY+=t)}addFramePad(e,t,i,s,n,o){e-=n,t-=o,i+=n,s+=o,this.minX=this.minX<e?this.minX:e,this.maxX=this.maxX>i?this.maxX:i,this.minY=this.minY<t?this.minY:t,this.maxY=this.maxY>s?this.maxY:s}};var at=class r extends ae.EventEmitter{constructor(){super(),this.tempDisplayObjectParent=null,this.transform=new Yn,this.alpha=1,this.visible=!0,this.renderable=!0,this.cullable=!1,this.cullArea=null,this.parent=null,this.worldAlpha=1,this._lastSortedIndex=0,this._zIndex=0,this.filterArea=null,this.filters=null,this._enabledFilters=null,this._bounds=new Ai,this._localBounds=null,this._boundsID=0,this._boundsRect=null,this._localBoundsRect=null,this._mask=null,this._maskRefCount=0,this._destroyed=!1,this.isSprite=!1,this.isMask=!1}static mixin(e){let t=Object.keys(e);for(let i=0;i<t.length;++i){let s=t[i];Object.defineProperty(r.prototype,s,Object.getOwnPropertyDescriptor(e,s))}}get destroyed(){return this._destroyed}_recursivePostUpdateTransform(){this.parent?(this.parent._recursivePostUpdateTransform(),this.transform.updateTransform(this.parent.transform)):this.transform.updateTransform(this._tempDisplayObjectParent.transform)}updateTransform(){this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha}getBounds(e,t){return e||(this.parent?(this._recursivePostUpdateTransform(),this.updateTransform()):(this.parent=this._tempDisplayObjectParent,this.updateTransform(),this.parent=null)),this._bounds.updateID!==this._boundsID&&(this.calculateBounds(),this._bounds.updateID=this._boundsID),t||(this._boundsRect||(this._boundsRect=new Ie),t=this._boundsRect),this._bounds.getRectangle(t)}getLocalBounds(e){e||(this._localBoundsRect||(this._localBoundsRect=new Ie),e=this._localBoundsRect),this._localBounds||(this._localBounds=new Ai);let t=this.transform,i=this.parent;this.parent=null,this.transform=this._tempDisplayObjectParent.transform;let s=this._bounds,n=this._boundsID;this._bounds=this._localBounds;let o=this.getBounds(!1,e);return this.parent=i,this.transform=t,this._bounds=s,this._bounds.updateID+=this._boundsID-n,o}toGlobal(e,t,i=!1){return i||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.apply(e,t)}toLocal(e,t,i,s){return t&&(e=t.toGlobal(e,i,s)),s||(this._recursivePostUpdateTransform(),this.parent?this.displayObjectUpdateTransform():(this.parent=this._tempDisplayObjectParent,this.displayObjectUpdateTransform(),this.parent=null)),this.worldTransform.applyInverse(e,i)}setParent(e){if(!e||!e.addChild)throw new Error("setParent: Argument must be a Container");return e.addChild(this),e}removeFromParent(){this.parent?.removeChild(this)}setTransform(e=0,t=0,i=1,s=1,n=0,o=0,a=0,l=0,c=0){return this.position.x=e,this.position.y=t,this.scale.x=i||1,this.scale.y=s||1,this.rotation=n,this.skew.x=o,this.skew.y=a,this.pivot.x=l,this.pivot.y=c,this}destroy(e){this.removeFromParent(),this._destroyed=!0,this.transform=null,this.parent=null,this._bounds=null,this.mask=null,this.cullArea=null,this.filters=null,this.filterArea=null,this.hitArea=null,this.eventMode="auto",this.interactiveChildren=!1,this.emit("destroyed"),this.removeAllListeners()}get _tempDisplayObjectParent(){return this.tempDisplayObjectParent===null&&(this.tempDisplayObjectParent=new sd),this.tempDisplayObjectParent}enableTempParent(){let e=this.parent;return this.parent=this._tempDisplayObjectParent,e}disableTempParent(e){this.parent=e}get x(){return this.position.x}set x(e){this.transform.position.x=e}get y(){return this.position.y}set y(e){this.transform.position.y=e}get worldTransform(){return this.transform.worldTransform}get localTransform(){return this.transform.localTransform}get position(){return this.transform.position}set position(e){this.transform.position.copyFrom(e)}get scale(){return this.transform.scale}set scale(e){this.transform.scale.copyFrom(e)}get pivot(){return this.transform.pivot}set pivot(e){this.transform.pivot.copyFrom(e)}get skew(){return this.transform.skew}set skew(e){this.transform.skew.copyFrom(e)}get rotation(){return this.transform.rotation}set rotation(e){this.transform.rotation=e}get angle(){return this.transform.rotation*Kp}set angle(e){this.transform.rotation=e*Zp}get zIndex(){return this._zIndex}set zIndex(e){this._zIndex=e,this.parent&&(this.parent.sortDirty=!0)}get worldVisible(){let e=this;do{if(!e.visible)return!1;e=e.parent}while(e);return!0}get mask(){return this._mask}set mask(e){if(this._mask!==e){if(this._mask){let t=this._mask.isMaskData?this._mask.maskObject:this._mask;t&&(t._maskRefCount--,t._maskRefCount===0&&(t.renderable=!0,t.isMask=!1))}if(this._mask=e,this._mask){let t=this._mask.isMaskData?this._mask.maskObject:this._mask;t&&(t._maskRefCount===0&&(t.renderable=!1,t.isMask=!0),t._maskRefCount++)}}}},sd=class extends at{constructor(){super(...arguments),this.sortDirty=null}};at.prototype.displayObjectUpdateTransform=at.prototype.updateTransform;var _E=new je;function FE(r,e){return r.zIndex===e.zIndex?r._lastSortedIndex-e._lastSortedIndex:r.zIndex-e.zIndex}var d2=class extends at{constructor(){super(),this.children=[],this.sortableChildren=d2.defaultSortableChildren,this.sortDirty=!1}onChildrenChange(r){}addChild(...r){if(r.length>1)for(let e=0;e<r.length;e++)this.addChild(r[e]);else{let e=r[0];e.parent&&e.parent.removeChild(e),e.parent=this,this.sortDirty=!0,e.transform._parentID=-1,this.children.push(e),this._boundsID++,this.onChildrenChange(this.children.length-1),this.emit("childAdded",e,this,this.children.length-1),e.emit("added",this)}return r[0]}addChildAt(r,e){if(e<0||e>this.children.length)throw new Error(`${r}addChildAt: The index ${e} supplied is out of bounds ${this.children.length}`);return r.parent&&r.parent.removeChild(r),r.parent=this,this.sortDirty=!0,r.transform._parentID=-1,this.children.splice(e,0,r),this._boundsID++,this.onChildrenChange(e),r.emit("added",this),this.emit("childAdded",r,this,e),r}swapChildren(r,e){if(r===e)return;let t=this.getChildIndex(r),i=this.getChildIndex(e);this.children[t]=e,this.children[i]=r,this.onChildrenChange(t<i?t:i)}getChildIndex(r){let e=this.children.indexOf(r);if(e===-1)throw new Error("The supplied DisplayObject must be a child of the caller");return e}setChildIndex(r,e){if(e<0||e>=this.children.length)throw new Error(`The index ${e} supplied is out of bounds ${this.children.length}`);let t=this.getChildIndex(r);ae.removeItems(this.children,t,1),this.children.splice(e,0,r),this.onChildrenChange(e)}getChildAt(r){if(r<0||r>=this.children.length)throw new Error(`getChildAt: Index (${r}) does not exist.`);return this.children[r]}removeChild(...r){if(r.length>1)for(let e=0;e<r.length;e++)this.removeChild(r[e]);else{let e=r[0],t=this.children.indexOf(e);if(t===-1)return null;e.parent=null,e.transform._parentID=-1,ae.removeItems(this.children,t,1),this._boundsID++,this.onChildrenChange(t),e.emit("removed",this),this.emit("childRemoved",e,this,t)}return r[0]}removeChildAt(r){let e=this.getChildAt(r);return e.parent=null,e.transform._parentID=-1,ae.removeItems(this.children,r,1),this._boundsID++,this.onChildrenChange(r),e.emit("removed",this),this.emit("childRemoved",e,this,r),e}removeChildren(r=0,e=this.children.length){let t=r,i=e,s=i-t,n;if(s>0&&s<=i){n=this.children.splice(t,s);for(let o=0;o<n.length;++o)n[o].parent=null,n[o].transform&&(n[o].transform._parentID=-1);this._boundsID++,this.onChildrenChange(r);for(let o=0;o<n.length;++o)n[o].emit("removed",this),this.emit("childRemoved",n[o],this,o);return n}else if(s===0&&this.children.length===0)return[];throw new RangeError("removeChildren: numeric values are outside the acceptable range.")}sortChildren(){let r=!1;for(let e=0,t=this.children.length;e<t;++e){let i=this.children[e];i._lastSortedIndex=e,!r&&i.zIndex!==0&&(r=!0)}r&&this.children.length>1&&this.children.sort(FE),this.sortDirty=!1}updateTransform(){this.sortableChildren&&this.sortDirty&&this.sortChildren(),this._boundsID++,this.transform.updateTransform(this.parent.transform),this.worldAlpha=this.alpha*this.parent.worldAlpha;for(let r=0,e=this.children.length;r<e;++r){let t=this.children[r];t.visible&&t.updateTransform()}}calculateBounds(){this._bounds.clear(),this._calculateBounds();for(let r=0;r<this.children.length;r++){let e=this.children[r];if(!(!e.visible||!e.renderable))if(e.calculateBounds(),e._mask){let t=e._mask.isMaskData?e._mask.maskObject:e._mask;t?(t.calculateBounds(),this._bounds.addBoundsMask(e._bounds,t._bounds)):this._bounds.addBounds(e._bounds)}else e.filterArea?this._bounds.addBoundsArea(e._bounds,e.filterArea):this._bounds.addBounds(e._bounds)}this._bounds.updateID=this._boundsID}getLocalBounds(r,e=!1){let t=super.getLocalBounds(r);if(!e)for(let i=0,s=this.children.length;i<s;++i){let n=this.children[i];n.visible&&n.updateTransform()}return t}_calculateBounds(){}_renderWithCulling(r){let e=r.renderTexture.sourceFrame;if(!(e.width>0&&e.height>0))return;let t,i;this.cullArea?(t=this.cullArea,i=this.worldTransform):this._render!==d2.prototype._render&&(t=this.getBounds(!0));let s=r.projection.transform;if(s&&(i?(i=_E.copyFrom(i),i.prepend(s)):i=s),t&&e.intersects(t,i))this._render(r);else if(this.cullArea)return;for(let n=0,o=this.children.length;n<o;++n){let a=this.children[n],l=a.cullable;a.cullable=l||!this.cullArea,a.render(r),a.cullable=l}}render(r){if(!(!this.visible||this.worldAlpha<=0||!this.renderable))if(this._mask||this.filters?.length)this.renderAdvanced(r);else if(this.cullable)this._renderWithCulling(r);else{this._render(r);for(let e=0,t=this.children.length;e<t;++e)this.children[e].render(r)}}renderAdvanced(r){let e=this.filters,t=this._mask;if(e){this._enabledFilters||(this._enabledFilters=[]),this._enabledFilters.length=0;for(let s=0;s<e.length;s++)e[s].enabled&&this._enabledFilters.push(e[s])}let i=e&&this._enabledFilters?.length||t&&(!t.isMaskData||t.enabled&&(t.autoDetect||t.type!==Nt.NONE));if(i&&r.batch.flush(),e&&this._enabledFilters?.length&&r.filter.push(this,this._enabledFilters),t&&r.mask.push(this,this._mask),this.cullable)this._renderWithCulling(r);else{this._render(r);for(let s=0,n=this.children.length;s<n;++s)this.children[s].render(r)}i&&r.batch.flush(),t&&r.mask.pop(this),e&&this._enabledFilters?.length&&r.filter.pop()}_render(r){}destroy(r){super.destroy(),this.sortDirty=!1;let e=typeof r=="boolean"?r:r?.children,t=this.removeChildren(0,this.children.length);if(e)for(let i=0;i<t.length;++i)t[i].destroy(r)}get width(){return this.scale.x*this.getLocalBounds().width}set width(r){let e=this.getLocalBounds().width;e!==0?this.scale.x=r/e:this.scale.x=1,this._width=r}get height(){return this.scale.y*this.getLocalBounds().height}set height(r){let e=this.getLocalBounds().height;e!==0?this.scale.y=r/e:this.scale.y=1,this._height=r}},tt=d2;tt.defaultSortableChildren=!1;tt.prototype.containerUpdateTransform=tt.prototype.updateTransform;Object.defineProperties(K,{SORTABLE_CHILDREN:{get(){return tt.defaultSortableChildren},set(r){ae.deprecation("7.1.0","settings.SORTABLE_CHILDREN is deprecated, use Container.defaultSortableChildren"),tt.defaultSortableChildren=r}}});var hc=new Ne,AE=new Uint16Array([0,1,2,0,2,3]),Lt=class r extends tt{constructor(e){super(),this._anchor=new Rr(this._onAnchorUpdate,this,e?e.defaultAnchor.x:0,e?e.defaultAnchor.y:0),this._texture=null,this._width=0,this._height=0,this._tintColor=new Me(16777215),this._tintRGB=null,this.tint=16777215,this.blendMode=ke.NORMAL,this._cachedTint=16777215,this.uvs=null,this.texture=e||Se.EMPTY,this.vertexData=new Float32Array(8),this.vertexTrimmedData=null,this._transformID=-1,this._textureID=-1,this._transformTrimmedID=-1,this._textureTrimmedID=-1,this.indices=AE,this.pluginName="batch",this.isSprite=!0,this._roundPixels=K.ROUND_PIXELS}_onTextureUpdate(){this._textureID=-1,this._textureTrimmedID=-1,this._cachedTint=16777215,this._width&&(this.scale.x=ae.sign(this.scale.x)*this._width/this._texture.orig.width),this._height&&(this.scale.y=ae.sign(this.scale.y)*this._height/this._texture.orig.height)}_onAnchorUpdate(){this._transformID=-1,this._transformTrimmedID=-1}calculateVertices(){let e=this._texture;if(this._transformID===this.transform._worldID&&this._textureID===e._updateID)return;this._textureID!==e._updateID&&(this.uvs=this._texture._uvs.uvsFloat32),this._transformID=this.transform._worldID,this._textureID=e._updateID;let t=this.transform.worldTransform,i=t.a,s=t.b,n=t.c,o=t.d,a=t.tx,l=t.ty,c=this.vertexData,h=e.trim,d=e.orig,p=this._anchor,g=0,v=0,C=0,w=0;if(h?(v=h.x-p._x*d.width,g=v+h.width,w=h.y-p._y*d.height,C=w+h.height):(v=-p._x*d.width,g=v+d.width,w=-p._y*d.height,C=w+d.height),c[0]=i*v+n*w+a,c[1]=o*w+s*v+l,c[2]=i*g+n*w+a,c[3]=o*w+s*g+l,c[4]=i*g+n*C+a,c[5]=o*C+s*g+l,c[6]=i*v+n*C+a,c[7]=o*C+s*v+l,this._roundPixels){let k=K.RESOLUTION;for(let B=0;B<c.length;++B)c[B]=Math.round(c[B]*k)/k}}calculateTrimmedVertices(){if(!this.vertexTrimmedData)this.vertexTrimmedData=new Float32Array(8);else if(this._transformTrimmedID===this.transform._worldID&&this._textureTrimmedID===this._texture._updateID)return;this._transformTrimmedID=this.transform._worldID,this._textureTrimmedID=this._texture._updateID;let e=this._texture,t=this.vertexTrimmedData,i=e.orig,s=this._anchor,n=this.transform.worldTransform,o=n.a,a=n.b,l=n.c,c=n.d,h=n.tx,d=n.ty,p=-s._x*i.width,g=p+i.width,v=-s._y*i.height,C=v+i.height;t[0]=o*p+l*v+h,t[1]=c*v+a*p+d,t[2]=o*g+l*v+h,t[3]=c*v+a*g+d,t[4]=o*g+l*C+h,t[5]=c*C+a*g+d,t[6]=o*p+l*C+h,t[7]=c*C+a*p+d}_render(e){this.calculateVertices(),e.batch.setObjectRenderer(e.plugins[this.pluginName]),e.plugins[this.pluginName].render(this)}_calculateBounds(){let e=this._texture.trim,t=this._texture.orig;!e||e.width===t.width&&e.height===t.height?(this.calculateVertices(),this._bounds.addQuad(this.vertexData)):(this.calculateTrimmedVertices(),this._bounds.addQuad(this.vertexTrimmedData))}getLocalBounds(e){return this.children.length===0?(this._localBounds||(this._localBounds=new Ai),this._localBounds.minX=this._texture.orig.width*-this._anchor._x,this._localBounds.minY=this._texture.orig.height*-this._anchor._y,this._localBounds.maxX=this._texture.orig.width*(1-this._anchor._x),this._localBounds.maxY=this._texture.orig.height*(1-this._anchor._y),e||(this._localBoundsRect||(this._localBoundsRect=new Ie),e=this._localBoundsRect),this._localBounds.getRectangle(e)):super.getLocalBounds.call(this,e)}containsPoint(e){this.worldTransform.applyInverse(e,hc);let t=this._texture.orig.width,i=this._texture.orig.height,s=-t*this.anchor.x,n=0;return hc.x>=s&&hc.x<s+t&&(n=-i*this.anchor.y,hc.y>=n&&hc.y<n+i)}destroy(e){if(super.destroy(e),this._texture.off("update",this._onTextureUpdate,this),this._anchor=null,typeof e=="boolean"?e:e?.texture){let i=typeof e=="boolean"?e:e?.baseTexture;this._texture.destroy(!!i)}this._texture=null}static from(e,t){let i=e instanceof Se?e:Se.from(e,t);return new r(i)}set roundPixels(e){this._roundPixels!==e&&(this._transformID=-1),this._roundPixels=e}get roundPixels(){return this._roundPixels}get width(){return Math.abs(this.scale.x)*this._texture.orig.width}set width(e){let t=ae.sign(this.scale.x)||1;this.scale.x=t*e/this._texture.orig.width,this._width=e}get height(){return Math.abs(this.scale.y)*this._texture.orig.height}set height(e){let t=ae.sign(this.scale.y)||1;this.scale.y=t*e/this._texture.orig.height,this._height=e}get anchor(){return this._anchor}set anchor(e){this._anchor.copyFrom(e)}get tint(){return this._tintColor.value}set tint(e){this._tintColor.setValue(e),this._tintRGB=this._tintColor.toLittleEndianNumber()}get tintValue(){return this._tintColor.toNumber()}get texture(){return this._texture}set texture(e){this._texture!==e&&(this._texture&&this._texture.off("update",this._onTextureUpdate,this),this._texture=e||Se.EMPTY,this._cachedTint=16777215,this._textureID=-1,this._textureTrimmedID=-1,e&&(e.baseTexture.valid?this._onTextureUpdate():e.once("update",this._onTextureUpdate,this)))}};var V3=new je;at.prototype._cacheAsBitmap=!1;at.prototype._cacheData=null;at.prototype._cacheAsBitmapResolution=null;at.prototype._cacheAsBitmapMultisample=null;var p2=class{constructor(){this.textureCacheId=null,this.originalRender=null,this.originalRenderCanvas=null,this.originalCalculateBounds=null,this.originalGetLocalBounds=null,this.originalUpdateTransform=null,this.originalDestroy=null,this.originalMask=null,this.originalFilterArea=null,this.originalContainsPoint=null,this.sprite=null}};Object.defineProperties(at.prototype,{cacheAsBitmapResolution:{get(){return this._cacheAsBitmapResolution},set(r){r!==this._cacheAsBitmapResolution&&(this._cacheAsBitmapResolution=r,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmapMultisample:{get(){return this._cacheAsBitmapMultisample},set(r){r!==this._cacheAsBitmapMultisample&&(this._cacheAsBitmapMultisample=r,this.cacheAsBitmap&&(this.cacheAsBitmap=!1,this.cacheAsBitmap=!0))}},cacheAsBitmap:{get(){return this._cacheAsBitmap},set(r){if(this._cacheAsBitmap===r)return;this._cacheAsBitmap=r;let e;r?(this._cacheData||(this._cacheData=new p2),e=this._cacheData,e.originalRender=this.render,e.originalRenderCanvas=this.renderCanvas,e.originalUpdateTransform=this.updateTransform,e.originalCalculateBounds=this.calculateBounds,e.originalGetLocalBounds=this.getLocalBounds,e.originalDestroy=this.destroy,e.originalContainsPoint=this.containsPoint,e.originalMask=this._mask,e.originalFilterArea=this.filterArea,this.render=this._renderCached,this.renderCanvas=this._renderCachedCanvas,this.destroy=this._cacheAsBitmapDestroy):(e=this._cacheData,e.sprite&&this._destroyCachedDisplayObject(),this.render=e.originalRender,this.renderCanvas=e.originalRenderCanvas,this.calculateBounds=e.originalCalculateBounds,this.getLocalBounds=e.originalGetLocalBounds,this.destroy=e.originalDestroy,this.updateTransform=e.originalUpdateTransform,this.containsPoint=e.originalContainsPoint,this._mask=e.originalMask,this.filterArea=e.originalFilterArea)}}});at.prototype._renderCached=function(e){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObject(e),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._render(e))};at.prototype._initCachedDisplayObject=function(e){if(this._cacheData?.sprite)return;let t=this.alpha;this.alpha=1,e.batch.flush();let i=this.getLocalBounds(null,!0).clone();if(this.filters?.length){let p=this.filters[0].padding;i.pad(p)}i.ceil(K.RESOLUTION);let s=e.renderTexture.current,n=e.renderTexture.sourceFrame.clone(),o=e.renderTexture.destinationFrame.clone(),a=e.projection.transform,l=Or.create({width:i.width,height:i.height,resolution:this.cacheAsBitmapResolution||e.resolution,multisample:this.cacheAsBitmapMultisample??e.multisample}),c=`cacheAsBitmap_${ae.uid()}`;this._cacheData.textureCacheId=c,we.addToCache(l.baseTexture,c),Se.addToCache(l,c);let h=this.transform.localTransform.copyTo(V3).invert().translate(-i.x,-i.y);this.render=this._cacheData.originalRender,e.render(this,{renderTexture:l,clear:!0,transform:h,skipUpdateTransform:!1}),e.framebuffer.blit(),e.projection.transform=a,e.renderTexture.bind(s,n,o),this.render=this._renderCached,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=t;let d=new Lt(l);d.transform.worldTransform=this.transform.worldTransform,d.anchor.x=-(i.x/i.width),d.anchor.y=-(i.y/i.height),d.alpha=t,d._bounds=this._bounds,this._cacheData.sprite=d,this.transform._parentID=-1,this.parent?this.updateTransform():(this.enableTempParent(),this.updateTransform(),this.disableTempParent(null)),this.containsPoint=d.containsPoint.bind(d)};at.prototype._renderCachedCanvas=function(e){!this.visible||this.worldAlpha<=0||!this.renderable||(this._initCachedDisplayObjectCanvas(e),this._cacheData.sprite.worldAlpha=this.worldAlpha,this._cacheData.sprite._renderCanvas(e))};at.prototype._initCachedDisplayObjectCanvas=function(e){if(this._cacheData?.sprite)return;let t=this.getLocalBounds(null,!0),i=this.alpha;this.alpha=1;let s=e.canvasContext.activeContext,n=e._projTransform;t.ceil(K.RESOLUTION);let o=Or.create({width:t.width,height:t.height}),a=`cacheAsBitmap_${ae.uid()}`;this._cacheData.textureCacheId=a,we.addToCache(o.baseTexture,a),Se.addToCache(o,a);let l=V3;this.transform.localTransform.copyTo(l),l.invert(),l.tx-=t.x,l.ty-=t.y,this.renderCanvas=this._cacheData.originalRenderCanvas,e.render(this,{renderTexture:o,clear:!0,transform:l,skipUpdateTransform:!1}),e.canvasContext.activeContext=s,e._projTransform=n,this.renderCanvas=this._renderCachedCanvas,this.updateTransform=this.displayObjectUpdateTransform,this.calculateBounds=this._calculateCachedBounds,this.getLocalBounds=this._getCachedLocalBounds,this._mask=null,this.filterArea=null,this.alpha=i;let c=new Lt(o);c.transform.worldTransform=this.transform.worldTransform,c.anchor.x=-(t.x/t.width),c.anchor.y=-(t.y/t.height),c.alpha=i,c._bounds=this._bounds,this._cacheData.sprite=c,this.transform._parentID=-1,this.parent?this.updateTransform():(this.parent=e._tempDisplayObjectParent,this.updateTransform(),this.parent=null),this.containsPoint=c.containsPoint.bind(c)};at.prototype._calculateCachedBounds=function(){this._bounds.clear(),this._cacheData.sprite.transform._worldID=this.transform._worldID,this._cacheData.sprite._calculateBounds(),this._bounds.updateID=this._boundsID};at.prototype._getCachedLocalBounds=function(){return this._cacheData.sprite.getLocalBounds(null)};at.prototype._destroyCachedDisplayObject=function(){this._cacheData.sprite._texture.destroy(!0),this._cacheData.sprite=null,we.removeFromCache(this._cacheData.textureCacheId),Se.removeFromCache(this._cacheData.textureCacheId),this._cacheData.textureCacheId=null};at.prototype._cacheAsBitmapDestroy=function(e){this.cacheAsBitmap=!1,this.destroy(e)};at.prototype.name=null;tt.prototype.getChildByName=function(e,t){for(let i=0,s=this.children.length;i<s;i++)if(this.children[i].name===e)return this.children[i];if(t)for(let i=0,s=this.children.length;i<s;i++){let n=this.children[i];if(!n.getChildByName)continue;let o=n.getChildByName(e,!0);if(o)return o}return null};at.prototype.getGlobalPosition=function(e=new Ne,t=!1){return this.parent?this.parent.toGlobal(this.position,e,t):(e.x=this.position.x,e.y=this.position.y),e};var z3=`varying vec2 vTextureCoord;
|
|
|
|
uniform sampler2D uSampler;
|
|
uniform float uAlpha;
|
|
|
|
void main(void)
|
|
{
|
|
gl_FragColor = texture2D(uSampler, vTextureCoord) * uAlpha;
|
|
}
|
|
`;var dc=class extends ot{constructor(e=1){super(c2,z3,{uAlpha:1}),this.alpha=e}get alpha(){return this.uniforms.uAlpha}set alpha(e){this.uniforms.uAlpha=e}};var kE={5:[.153388,.221461,.250301],7:[.071303,.131514,.189879,.214607],9:[.028532,.067234,.124009,.179044,.20236],11:[.0093,.028002,.065984,.121703,.175713,.198596],13:[.002406,.009255,.027867,.065666,.121117,.174868,.197641],15:[489e-6,.002403,.009246,.02784,.065602,.120999,.174697,.197448]},IE=["varying vec2 vBlurTexCoords[%size%];","uniform sampler2D uSampler;","void main(void)","{"," gl_FragColor = vec4(0.0);"," %blur%","}"].join(`
|
|
`);function W3(r){let e=kE[r],t=e.length,i=IE,s="",n="gl_FragColor += texture2D(uSampler, vBlurTexCoords[%index%]) * %value%;",o;for(let a=0;a<r;a++){let l=n.replace("%index%",a.toString());o=a,a>=t&&(o=r-a-1),l=l.replace("%value%",e[o].toString()),s+=l,s+=`
|
|
`}return i=i.replace("%blur%",s),i=i.replace("%size%",r.toString()),i}var LE=`
|
|
attribute vec2 aVertexPosition;
|
|
|
|
uniform mat3 projectionMatrix;
|
|
|
|
uniform float strength;
|
|
|
|
varying vec2 vBlurTexCoords[%size%];
|
|
|
|
uniform vec4 inputSize;
|
|
uniform vec4 outputFrame;
|
|
|
|
vec4 filterVertexPosition( void )
|
|
{
|
|
vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;
|
|
|
|
return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
|
|
}
|
|
|
|
vec2 filterTextureCoord( void )
|
|
{
|
|
return aVertexPosition * (outputFrame.zw * inputSize.zw);
|
|
}
|
|
|
|
void main(void)
|
|
{
|
|
gl_Position = filterVertexPosition();
|
|
|
|
vec2 textureCoord = filterTextureCoord();
|
|
%blur%
|
|
}`;function H3(r,e){let t=Math.ceil(r/2),i=LE,s="",n;e?n="vBlurTexCoords[%index%] = textureCoord + vec2(%sampleIndex% * strength, 0.0);":n="vBlurTexCoords[%index%] = textureCoord + vec2(0.0, %sampleIndex% * strength);";for(let o=0;o<r;o++){let a=n.replace("%index%",o.toString());a=a.replace("%sampleIndex%",`${o-(t-1)}.0`),s+=a,s+=`
|
|
`}return i=i.replace("%blur%",s),i=i.replace("%size%",r.toString()),i}var en=class extends ot{constructor(e,t=8,i=4,s=ot.defaultResolution,n=5){let o=H3(n,e),a=W3(n);super(o,a),this.horizontal=e,this.resolution=s,this._quality=0,this.quality=i,this.blur=t}apply(e,t,i,s){if(i?this.horizontal?this.uniforms.strength=1/i.width*(i.width/t.width):this.uniforms.strength=1/i.height*(i.height/t.height):this.horizontal?this.uniforms.strength=1/e.renderer.width*(e.renderer.width/t.width):this.uniforms.strength=1/e.renderer.height*(e.renderer.height/t.height),this.uniforms.strength*=this.strength,this.uniforms.strength/=this.passes,this.passes===1)e.applyFilter(this,t,i,s);else{let n=e.getFilterTexture(),o=e.renderer,a=t,l=n;this.state.blend=!1,e.applyFilter(this,a,l,pr.CLEAR);for(let c=1;c<this.passes-1;c++){e.bindAndClear(a,pr.BLIT),this.uniforms.uSampler=l;let h=l;l=a,a=h,o.shader.bind(this),o.geometry.draw(5)}this.state.blend=!0,e.applyFilter(this,l,i,s),e.returnFilterTexture(n)}}get blur(){return this.strength}set blur(e){this.padding=1+Math.abs(e)*2,this.strength=e}get quality(){return this._quality}set quality(e){this._quality=e,this.passes=e}};var pc=class extends ot{constructor(e=8,t=4,i=ot.defaultResolution,s=5){super(),this._repeatEdgePixels=!1,this.blurXFilter=new en(!0,e,t,i,s),this.blurYFilter=new en(!1,e,t,i,s),this.resolution=i,this.quality=t,this.blur=e,this.repeatEdgePixels=!1}apply(e,t,i,s){let n=Math.abs(this.blurXFilter.strength),o=Math.abs(this.blurYFilter.strength);if(n&&o){let a=e.getFilterTexture();this.blurXFilter.apply(e,t,a,pr.CLEAR),this.blurYFilter.apply(e,a,i,s),e.returnFilterTexture(a)}else o?this.blurYFilter.apply(e,t,i,s):this.blurXFilter.apply(e,t,i,s)}updatePadding(){this._repeatEdgePixels?this.padding=0:this.padding=Math.max(Math.abs(this.blurXFilter.strength),Math.abs(this.blurYFilter.strength))*2}get blur(){return this.blurXFilter.blur}set blur(e){this.blurXFilter.blur=this.blurYFilter.blur=e,this.updatePadding()}get quality(){return this.blurXFilter.quality}set quality(e){this.blurXFilter.quality=this.blurYFilter.quality=e}get blurX(){return this.blurXFilter.blur}set blurX(e){this.blurXFilter.blur=e,this.updatePadding()}get blurY(){return this.blurYFilter.blur}set blurY(e){this.blurYFilter.blur=e,this.updatePadding()}get blendMode(){return this.blurYFilter.blendMode}set blendMode(e){this.blurYFilter.blendMode=e}get repeatEdgePixels(){return this._repeatEdgePixels}set repeatEdgePixels(e){this._repeatEdgePixels=e,this.updatePadding()}};var j3=`varying vec2 vTextureCoord;
|
|
uniform sampler2D uSampler;
|
|
uniform float m[20];
|
|
uniform float uAlpha;
|
|
|
|
void main(void)
|
|
{
|
|
vec4 c = texture2D(uSampler, vTextureCoord);
|
|
|
|
if (uAlpha == 0.0) {
|
|
gl_FragColor = c;
|
|
return;
|
|
}
|
|
|
|
// Un-premultiply alpha before applying the color matrix. See issue #3539.
|
|
if (c.a > 0.0) {
|
|
c.rgb /= c.a;
|
|
}
|
|
|
|
vec4 result;
|
|
|
|
result.r = (m[0] * c.r);
|
|
result.r += (m[1] * c.g);
|
|
result.r += (m[2] * c.b);
|
|
result.r += (m[3] * c.a);
|
|
result.r += m[4];
|
|
|
|
result.g = (m[5] * c.r);
|
|
result.g += (m[6] * c.g);
|
|
result.g += (m[7] * c.b);
|
|
result.g += (m[8] * c.a);
|
|
result.g += m[9];
|
|
|
|
result.b = (m[10] * c.r);
|
|
result.b += (m[11] * c.g);
|
|
result.b += (m[12] * c.b);
|
|
result.b += (m[13] * c.a);
|
|
result.b += m[14];
|
|
|
|
result.a = (m[15] * c.r);
|
|
result.a += (m[16] * c.g);
|
|
result.a += (m[17] * c.b);
|
|
result.a += (m[18] * c.a);
|
|
result.a += m[19];
|
|
|
|
vec3 rgb = mix(c.rgb, result.rgb, uAlpha);
|
|
|
|
// Premultiply alpha again.
|
|
rgb *= result.a;
|
|
|
|
gl_FragColor = vec4(rgb, result.a);
|
|
}
|
|
`;var eo=class extends ot{constructor(){let e={m:new Float32Array([1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0]),uAlpha:1};super(nc,j3,e),this.alpha=1}_loadMatrix(e,t=!1){let i=e;t&&(this._multiply(i,this.uniforms.m,e),i=this._colorMatrix(i)),this.uniforms.m=i}_multiply(e,t,i){return e[0]=t[0]*i[0]+t[1]*i[5]+t[2]*i[10]+t[3]*i[15],e[1]=t[0]*i[1]+t[1]*i[6]+t[2]*i[11]+t[3]*i[16],e[2]=t[0]*i[2]+t[1]*i[7]+t[2]*i[12]+t[3]*i[17],e[3]=t[0]*i[3]+t[1]*i[8]+t[2]*i[13]+t[3]*i[18],e[4]=t[0]*i[4]+t[1]*i[9]+t[2]*i[14]+t[3]*i[19]+t[4],e[5]=t[5]*i[0]+t[6]*i[5]+t[7]*i[10]+t[8]*i[15],e[6]=t[5]*i[1]+t[6]*i[6]+t[7]*i[11]+t[8]*i[16],e[7]=t[5]*i[2]+t[6]*i[7]+t[7]*i[12]+t[8]*i[17],e[8]=t[5]*i[3]+t[6]*i[8]+t[7]*i[13]+t[8]*i[18],e[9]=t[5]*i[4]+t[6]*i[9]+t[7]*i[14]+t[8]*i[19]+t[9],e[10]=t[10]*i[0]+t[11]*i[5]+t[12]*i[10]+t[13]*i[15],e[11]=t[10]*i[1]+t[11]*i[6]+t[12]*i[11]+t[13]*i[16],e[12]=t[10]*i[2]+t[11]*i[7]+t[12]*i[12]+t[13]*i[17],e[13]=t[10]*i[3]+t[11]*i[8]+t[12]*i[13]+t[13]*i[18],e[14]=t[10]*i[4]+t[11]*i[9]+t[12]*i[14]+t[13]*i[19]+t[14],e[15]=t[15]*i[0]+t[16]*i[5]+t[17]*i[10]+t[18]*i[15],e[16]=t[15]*i[1]+t[16]*i[6]+t[17]*i[11]+t[18]*i[16],e[17]=t[15]*i[2]+t[16]*i[7]+t[17]*i[12]+t[18]*i[17],e[18]=t[15]*i[3]+t[16]*i[8]+t[17]*i[13]+t[18]*i[18],e[19]=t[15]*i[4]+t[16]*i[9]+t[17]*i[14]+t[18]*i[19]+t[19],e}_colorMatrix(e){let t=new Float32Array(e);return t[4]/=255,t[9]/=255,t[14]/=255,t[19]/=255,t}brightness(e,t){let i=[e,0,0,0,0,0,e,0,0,0,0,0,e,0,0,0,0,0,1,0];this._loadMatrix(i,t)}tint(e,t){let[i,s,n]=Me.shared.setValue(e).toArray(),o=[i,0,0,0,0,0,s,0,0,0,0,0,n,0,0,0,0,0,1,0];this._loadMatrix(o,t)}greyscale(e,t){let i=[e,e,e,0,0,e,e,e,0,0,e,e,e,0,0,0,0,0,1,0];this._loadMatrix(i,t)}blackAndWhite(e){let t=[.3,.6,.1,0,0,.3,.6,.1,0,0,.3,.6,.1,0,0,0,0,0,1,0];this._loadMatrix(t,e)}hue(e,t){e=(e||0)/180*Math.PI;let i=Math.cos(e),s=Math.sin(e),n=Math.sqrt,o=1/3,a=n(o),l=i+(1-i)*o,c=o*(1-i)-a*s,h=o*(1-i)+a*s,d=o*(1-i)+a*s,p=i+o*(1-i),g=o*(1-i)-a*s,v=o*(1-i)-a*s,C=o*(1-i)+a*s,w=i+o*(1-i),k=[l,c,h,0,0,d,p,g,0,0,v,C,w,0,0,0,0,0,1,0];this._loadMatrix(k,t)}contrast(e,t){let i=(e||0)+1,s=-.5*(i-1),n=[i,0,0,0,s,0,i,0,0,s,0,0,i,0,s,0,0,0,1,0];this._loadMatrix(n,t)}saturate(e=0,t){let i=e*2/3+1,s=(i-1)*-.5,n=[i,s,s,0,0,s,i,s,0,0,s,s,i,0,0,0,0,0,1,0];this._loadMatrix(n,t)}desaturate(){this.saturate(-1)}negative(e){let t=[-1,0,0,1,0,0,-1,0,1,0,0,0,-1,1,0,0,0,0,1,0];this._loadMatrix(t,e)}sepia(e){let t=[.393,.7689999,.18899999,0,0,.349,.6859999,.16799999,0,0,.272,.5339999,.13099999,0,0,0,0,0,1,0];this._loadMatrix(t,e)}technicolor(e){let t=[1.9125277891456083,-.8545344976951645,-.09155508482755585,0,11.793603434377337,-.3087833385928097,1.7658908555458428,-.10601743074722245,0,-70.35205161461398,-.231103377548616,-.7501899197440212,1.847597816108189,0,30.950940869491138,0,0,0,1,0];this._loadMatrix(t,e)}polaroid(e){let t=[1.438,-.062,-.062,0,0,-.122,1.378,-.122,0,0,-.016,-.016,1.483,0,0,0,0,0,1,0];this._loadMatrix(t,e)}toBGR(e){let t=[0,0,1,0,0,0,1,0,0,0,1,0,0,0,0,0,0,0,1,0];this._loadMatrix(t,e)}kodachrome(e){let t=[1.1285582396593525,-.3967382283601348,-.03992559172921793,0,63.72958762196502,-.16404339962244616,1.0835251566291304,-.05498805115633132,0,24.732407896706203,-.16786010706155763,-.5603416277695248,1.6014850761964943,0,35.62982807460946,0,0,0,1,0];this._loadMatrix(t,e)}browni(e){let t=[.5997023498159715,.34553243048391263,-.2708298674538042,0,47.43192855600873,-.037703249837783157,.8609577587992641,.15059552388459913,0,-36.96841498319127,.24113635128153335,-.07441037908422492,.44972182064877153,0,-7.562075277591283,0,0,0,1,0];this._loadMatrix(t,e)}vintage(e){let t=[.6279345635605994,.3202183420819367,-.03965408211312453,0,9.651285835294123,.02578397704808868,.6441188644374771,.03259127616149294,0,7.462829176470591,.0466055556782719,-.0851232987247891,.5241648018700465,0,5.159190588235296,0,0,0,1,0];this._loadMatrix(t,e)}colorTone(e,t,i,s,n){e=e||.2,t=t||.15,i=i||16770432,s=s||3375104;let o=Me.shared,[a,l,c]=o.setValue(i).toArray(),[h,d,p]=o.setValue(s).toArray(),g=[.3,.59,.11,0,0,a,l,c,e,0,h,d,p,t,0,a-h,l-d,c-p,0,0];this._loadMatrix(g,n)}night(e,t){e=e||.1;let i=[e*-2,-e,0,0,0,-e,0,e,0,0,0,e,e*2,0,0,0,0,0,1,0];this._loadMatrix(i,t)}predator(e,t){let i=[11.224130630493164*e,-4.794486999511719*e,-2.8746118545532227*e,0*e,.40342438220977783*e,-3.6330697536468506*e,9.193157196044922*e,-2.951810836791992*e,0*e,-1.316135048866272*e,-3.2184197902679443*e,-4.2375030517578125*e,7.476448059082031*e,0*e,.8044459223747253*e,0,0,0,1,0];this._loadMatrix(i,t)}lsd(e){let t=[2,-.4,.5,0,0,-.5,2,-.4,0,0,-.4,-.5,3,0,0,0,0,0,1,0];this._loadMatrix(t,e)}reset(){let e=[1,0,0,0,0,0,1,0,0,0,0,0,1,0,0,0,0,0,1,0];this._loadMatrix(e,!1)}get matrix(){return this.uniforms.m}set matrix(e){this.uniforms.m=e}get alpha(){return this.uniforms.uAlpha}set alpha(e){this.uniforms.uAlpha=e}};eo.prototype.grayscale=eo.prototype.greyscale;var $3=`varying vec2 vFilterCoord;
|
|
varying vec2 vTextureCoord;
|
|
|
|
uniform vec2 scale;
|
|
uniform mat2 rotation;
|
|
uniform sampler2D uSampler;
|
|
uniform sampler2D mapSampler;
|
|
|
|
uniform highp vec4 inputSize;
|
|
uniform vec4 inputClamp;
|
|
|
|
void main(void)
|
|
{
|
|
vec4 map = texture2D(mapSampler, vFilterCoord);
|
|
|
|
map -= 0.5;
|
|
map.xy = scale * inputSize.zw * (rotation * map.xy);
|
|
|
|
gl_FragColor = texture2D(uSampler, clamp(vec2(vTextureCoord.x + map.x, vTextureCoord.y + map.y), inputClamp.xy, inputClamp.zw));
|
|
}
|
|
`;var q3=`attribute vec2 aVertexPosition;
|
|
|
|
uniform mat3 projectionMatrix;
|
|
uniform mat3 filterMatrix;
|
|
|
|
varying vec2 vTextureCoord;
|
|
varying vec2 vFilterCoord;
|
|
|
|
uniform vec4 inputSize;
|
|
uniform vec4 outputFrame;
|
|
|
|
vec4 filterVertexPosition( void )
|
|
{
|
|
vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;
|
|
|
|
return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
|
|
}
|
|
|
|
vec2 filterTextureCoord( void )
|
|
{
|
|
return aVertexPosition * (outputFrame.zw * inputSize.zw);
|
|
}
|
|
|
|
void main(void)
|
|
{
|
|
gl_Position = filterVertexPosition();
|
|
vTextureCoord = filterTextureCoord();
|
|
vFilterCoord = ( filterMatrix * vec3( vTextureCoord, 1.0) ).xy;
|
|
}
|
|
`;var fc=class extends ot{constructor(e,t){let i=new je;e.renderable=!1,super(q3,$3,{mapSampler:e._texture,filterMatrix:i,scale:{x:1,y:1},rotation:new Float32Array([1,0,0,1])}),this.maskSprite=e,this.maskMatrix=i,t==null&&(t=20),this.scale=new Ne(t,t)}apply(e,t,i,s){this.uniforms.filterMatrix=e.calculateSpriteMatrix(this.maskMatrix,this.maskSprite),this.uniforms.scale.x=this.scale.x,this.uniforms.scale.y=this.scale.y;let n=this.maskSprite.worldTransform,o=Math.sqrt(n.a*n.a+n.b*n.b),a=Math.sqrt(n.c*n.c+n.d*n.d);o!==0&&a!==0&&(this.uniforms.rotation[0]=n.a/o,this.uniforms.rotation[1]=n.b/o,this.uniforms.rotation[2]=n.c/a,this.uniforms.rotation[3]=n.d/a),e.applyFilter(this,t,i,s)}get map(){return this.uniforms.mapSampler}set map(e){this.uniforms.mapSampler=e}};var Y3=`varying vec2 v_rgbNW;
|
|
varying vec2 v_rgbNE;
|
|
varying vec2 v_rgbSW;
|
|
varying vec2 v_rgbSE;
|
|
varying vec2 v_rgbM;
|
|
|
|
varying vec2 vFragCoord;
|
|
uniform sampler2D uSampler;
|
|
uniform highp vec4 inputSize;
|
|
|
|
|
|
/**
|
|
Basic FXAA implementation based on the code on geeks3d.com with the
|
|
modification that the texture2DLod stuff was removed since it's
|
|
unsupported by WebGL.
|
|
|
|
--
|
|
|
|
From:
|
|
https://github.com/mitsuhiko/webgl-meincraft
|
|
|
|
Copyright (c) 2011 by Armin Ronacher.
|
|
|
|
Some rights reserved.
|
|
|
|
Redistribution and use in source and binary forms, with or without
|
|
modification, are permitted provided that the following conditions are
|
|
met:
|
|
|
|
* Redistributions of source code must retain the above copyright
|
|
notice, this list of conditions and the following disclaimer.
|
|
|
|
* Redistributions in binary form must reproduce the above
|
|
copyright notice, this list of conditions and the following
|
|
disclaimer in the documentation and/or other materials provided
|
|
with the distribution.
|
|
|
|
* The names of the contributors may not be used to endorse or
|
|
promote products derived from this software without specific
|
|
prior written permission.
|
|
|
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
|
"AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
|
LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
|
A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
|
OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
|
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
|
LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
|
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
|
THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
|
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
|
*/
|
|
|
|
#ifndef FXAA_REDUCE_MIN
|
|
#define FXAA_REDUCE_MIN (1.0/ 128.0)
|
|
#endif
|
|
#ifndef FXAA_REDUCE_MUL
|
|
#define FXAA_REDUCE_MUL (1.0 / 8.0)
|
|
#endif
|
|
#ifndef FXAA_SPAN_MAX
|
|
#define FXAA_SPAN_MAX 8.0
|
|
#endif
|
|
|
|
//optimized version for mobile, where dependent
|
|
//texture reads can be a bottleneck
|
|
vec4 fxaa(sampler2D tex, vec2 fragCoord, vec2 inverseVP,
|
|
vec2 v_rgbNW, vec2 v_rgbNE,
|
|
vec2 v_rgbSW, vec2 v_rgbSE,
|
|
vec2 v_rgbM) {
|
|
vec4 color;
|
|
vec3 rgbNW = texture2D(tex, v_rgbNW).xyz;
|
|
vec3 rgbNE = texture2D(tex, v_rgbNE).xyz;
|
|
vec3 rgbSW = texture2D(tex, v_rgbSW).xyz;
|
|
vec3 rgbSE = texture2D(tex, v_rgbSE).xyz;
|
|
vec4 texColor = texture2D(tex, v_rgbM);
|
|
vec3 rgbM = texColor.xyz;
|
|
vec3 luma = vec3(0.299, 0.587, 0.114);
|
|
float lumaNW = dot(rgbNW, luma);
|
|
float lumaNE = dot(rgbNE, luma);
|
|
float lumaSW = dot(rgbSW, luma);
|
|
float lumaSE = dot(rgbSE, luma);
|
|
float lumaM = dot(rgbM, luma);
|
|
float lumaMin = min(lumaM, min(min(lumaNW, lumaNE), min(lumaSW, lumaSE)));
|
|
float lumaMax = max(lumaM, max(max(lumaNW, lumaNE), max(lumaSW, lumaSE)));
|
|
|
|
mediump vec2 dir;
|
|
dir.x = -((lumaNW + lumaNE) - (lumaSW + lumaSE));
|
|
dir.y = ((lumaNW + lumaSW) - (lumaNE + lumaSE));
|
|
|
|
float dirReduce = max((lumaNW + lumaNE + lumaSW + lumaSE) *
|
|
(0.25 * FXAA_REDUCE_MUL), FXAA_REDUCE_MIN);
|
|
|
|
float rcpDirMin = 1.0 / (min(abs(dir.x), abs(dir.y)) + dirReduce);
|
|
dir = min(vec2(FXAA_SPAN_MAX, FXAA_SPAN_MAX),
|
|
max(vec2(-FXAA_SPAN_MAX, -FXAA_SPAN_MAX),
|
|
dir * rcpDirMin)) * inverseVP;
|
|
|
|
vec3 rgbA = 0.5 * (
|
|
texture2D(tex, fragCoord * inverseVP + dir * (1.0 / 3.0 - 0.5)).xyz +
|
|
texture2D(tex, fragCoord * inverseVP + dir * (2.0 / 3.0 - 0.5)).xyz);
|
|
vec3 rgbB = rgbA * 0.5 + 0.25 * (
|
|
texture2D(tex, fragCoord * inverseVP + dir * -0.5).xyz +
|
|
texture2D(tex, fragCoord * inverseVP + dir * 0.5).xyz);
|
|
|
|
float lumaB = dot(rgbB, luma);
|
|
if ((lumaB < lumaMin) || (lumaB > lumaMax))
|
|
color = vec4(rgbA, texColor.a);
|
|
else
|
|
color = vec4(rgbB, texColor.a);
|
|
return color;
|
|
}
|
|
|
|
void main() {
|
|
|
|
vec4 color;
|
|
|
|
color = fxaa(uSampler, vFragCoord, inputSize.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);
|
|
|
|
gl_FragColor = color;
|
|
}
|
|
`;var X3=`
|
|
attribute vec2 aVertexPosition;
|
|
|
|
uniform mat3 projectionMatrix;
|
|
|
|
varying vec2 v_rgbNW;
|
|
varying vec2 v_rgbNE;
|
|
varying vec2 v_rgbSW;
|
|
varying vec2 v_rgbSE;
|
|
varying vec2 v_rgbM;
|
|
|
|
varying vec2 vFragCoord;
|
|
|
|
uniform vec4 inputSize;
|
|
uniform vec4 outputFrame;
|
|
|
|
vec4 filterVertexPosition( void )
|
|
{
|
|
vec2 position = aVertexPosition * max(outputFrame.zw, vec2(0.)) + outputFrame.xy;
|
|
|
|
return vec4((projectionMatrix * vec3(position, 1.0)).xy, 0.0, 1.0);
|
|
}
|
|
|
|
void texcoords(vec2 fragCoord, vec2 inverseVP,
|
|
out vec2 v_rgbNW, out vec2 v_rgbNE,
|
|
out vec2 v_rgbSW, out vec2 v_rgbSE,
|
|
out vec2 v_rgbM) {
|
|
v_rgbNW = (fragCoord + vec2(-1.0, -1.0)) * inverseVP;
|
|
v_rgbNE = (fragCoord + vec2(1.0, -1.0)) * inverseVP;
|
|
v_rgbSW = (fragCoord + vec2(-1.0, 1.0)) * inverseVP;
|
|
v_rgbSE = (fragCoord + vec2(1.0, 1.0)) * inverseVP;
|
|
v_rgbM = vec2(fragCoord * inverseVP);
|
|
}
|
|
|
|
void main(void) {
|
|
|
|
gl_Position = filterVertexPosition();
|
|
|
|
vFragCoord = aVertexPosition * outputFrame.zw;
|
|
|
|
texcoords(vFragCoord, inputSize.zw, v_rgbNW, v_rgbNE, v_rgbSW, v_rgbSE, v_rgbM);
|
|
}
|
|
`;var gc=class extends ot{constructor(){super(X3,Y3)}};var K3=`precision highp float;
|
|
|
|
varying vec2 vTextureCoord;
|
|
varying vec4 vColor;
|
|
|
|
uniform float uNoise;
|
|
uniform float uSeed;
|
|
uniform sampler2D uSampler;
|
|
|
|
float rand(vec2 co)
|
|
{
|
|
return fract(sin(dot(co.xy, vec2(12.9898, 78.233))) * 43758.5453);
|
|
}
|
|
|
|
void main()
|
|
{
|
|
vec4 color = texture2D(uSampler, vTextureCoord);
|
|
float randomValue = rand(gl_FragCoord.xy * uSeed);
|
|
float diff = (randomValue - 0.5) * uNoise;
|
|
|
|
// Un-premultiply alpha before applying the color matrix. See issue #3539.
|
|
if (color.a > 0.0) {
|
|
color.rgb /= color.a;
|
|
}
|
|
|
|
color.r += diff;
|
|
color.g += diff;
|
|
color.b += diff;
|
|
|
|
// Premultiply alpha again.
|
|
color.rgb *= color.a;
|
|
|
|
gl_FragColor = color;
|
|
}
|
|
`;var mc=class extends ot{constructor(e=.5,t=Math.random()){super(nc,K3,{uNoise:0,uSeed:0}),this.noise=e,this.seed=t}get noise(){return this.uniforms.uNoise}set noise(e){this.uniforms.uNoise=e}get seed(){return this.uniforms.uSeed}set seed(e){this.uniforms.uSeed=e}};var f2={AlphaFilter:dc,BlurFilter:pc,BlurFilterPass:en,ColorMatrixFilter:eo,DisplacementFilter:fc,FXAAFilter:gc,NoiseFilter:mc};Object.entries(f2).forEach(([r,e])=>{Object.defineProperty(f2,r,{get(){return ae.deprecation("7.1.0",`filters.${r} has moved to ${r}`),e}})});var g2=class{constructor(){this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}init(e){this.removeTickerListener(),this.events=e,this.interactionFrequency=10,this._deltaTime=0,this._didMove=!1,this.tickerAdded=!1,this._pauseUpdate=!0}get pauseUpdate(){return this._pauseUpdate}set pauseUpdate(e){this._pauseUpdate=e}addTickerListener(){this.tickerAdded||!this.domElement||(It.system.add(this.tickerUpdate,this,yr.INTERACTION),this.tickerAdded=!0)}removeTickerListener(){this.tickerAdded&&(It.system.remove(this.tickerUpdate,this),this.tickerAdded=!1)}pointerMoved(){this._didMove=!0}update(){if(!this.domElement||this._pauseUpdate)return;if(this._didMove){this._didMove=!1;return}let e=this.events.rootPointerEvent;this.events.supportsTouchEvents&&e.pointerType==="touch"||globalThis.document.dispatchEvent(new PointerEvent("pointermove",{clientX:e.clientX,clientY:e.clientY}))}tickerUpdate(e){this._deltaTime+=e,!(this._deltaTime<this.interactionFrequency)&&(this._deltaTime=0,this.update())}},ki=new g2;var ys=class r{constructor(e){this.bubbles=!0,this.cancelBubble=!0,this.cancelable=!1,this.composed=!1,this.defaultPrevented=!1,this.eventPhase=r.prototype.NONE,this.propagationStopped=!1,this.propagationImmediatelyStopped=!1,this.layer=new Ne,this.page=new Ne,this.NONE=0,this.CAPTURING_PHASE=1,this.AT_TARGET=2,this.BUBBLING_PHASE=3,this.manager=e}get layerX(){return this.layer.x}get layerY(){return this.layer.y}get pageX(){return this.page.x}get pageY(){return this.page.y}get data(){return this}composedPath(){return this.manager&&(!this.path||this.path[this.path.length-1]!==this.target)&&(this.path=this.target?this.manager.propagationPath(this.target):[]),this.path}initEvent(e,t,i){throw new Error("initEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}initUIEvent(e,t,i,s,n){throw new Error("initUIEvent() is a legacy DOM API. It is not implemented in the Federated Events API.")}preventDefault(){this.nativeEvent instanceof Event&&this.nativeEvent.cancelable&&this.nativeEvent.preventDefault(),this.defaultPrevented=!0}stopImmediatePropagation(){this.propagationImmediatelyStopped=!0}stopPropagation(){this.propagationStopped=!0}};var Ii=class extends ys{constructor(){super(...arguments),this.client=new Ne,this.movement=new Ne,this.offset=new Ne,this.global=new Ne,this.screen=new Ne}get clientX(){return this.client.x}get clientY(){return this.client.y}get x(){return this.clientX}get y(){return this.clientY}get movementX(){return this.movement.x}get movementY(){return this.movement.y}get offsetX(){return this.offset.x}get offsetY(){return this.offset.y}get globalX(){return this.global.x}get globalY(){return this.global.y}get screenX(){return this.screen.x}get screenY(){return this.screen.y}getLocalPosition(e,t,i){return e.worldTransform.applyInverse(i||this.global,t)}getModifierState(e){return"getModifierState"in this.nativeEvent&&this.nativeEvent.getModifierState(e)}initMouseEvent(e,t,i,s,n,o,a,l,c,h,d,p,g,v,C){throw new Error("Method not implemented.")}};var F0=class extends Ii{constructor(){super(...arguments),this.width=0,this.height=0,this.isPrimary=!1}getCoalescedEvents(){return this.type==="pointermove"||this.type==="mousemove"||this.type==="touchmove"?[this]:[]}getPredictedEvents(){throw new Error("getPredictedEvents is not supported!")}};var ci=class extends Ii{constructor(){super(...arguments),this.DOM_DELTA_PIXEL=0,this.DOM_DELTA_LINE=1,this.DOM_DELTA_PAGE=2}};ci.DOM_DELTA_PIXEL=0;ci.DOM_DELTA_LINE=1;ci.DOM_DELTA_PAGE=2;var ME=2048,NE=new Ne,m2=new Ne,yc=class{constructor(e){this.dispatch=new ae.EventEmitter,this.moveOnAll=!1,this.enableGlobalMoveEvents=!0,this.mappingState={trackingData:{}},this.eventPool=new Map,this._allInteractiveElements=[],this._hitElements=[],this._isPointerMoveEvent=!1,this.rootTarget=e,this.hitPruneFn=this.hitPruneFn.bind(this),this.hitTestFn=this.hitTestFn.bind(this),this.mapPointerDown=this.mapPointerDown.bind(this),this.mapPointerMove=this.mapPointerMove.bind(this),this.mapPointerOut=this.mapPointerOut.bind(this),this.mapPointerOver=this.mapPointerOver.bind(this),this.mapPointerUp=this.mapPointerUp.bind(this),this.mapPointerUpOutside=this.mapPointerUpOutside.bind(this),this.mapWheel=this.mapWheel.bind(this),this.mappingTable={},this.addEventMapping("pointerdown",this.mapPointerDown),this.addEventMapping("pointermove",this.mapPointerMove),this.addEventMapping("pointerout",this.mapPointerOut),this.addEventMapping("pointerleave",this.mapPointerOut),this.addEventMapping("pointerover",this.mapPointerOver),this.addEventMapping("pointerup",this.mapPointerUp),this.addEventMapping("pointerupoutside",this.mapPointerUpOutside),this.addEventMapping("wheel",this.mapWheel)}addEventMapping(e,t){this.mappingTable[e]||(this.mappingTable[e]=[]),this.mappingTable[e].push({fn:t,priority:0}),this.mappingTable[e].sort((i,s)=>i.priority-s.priority)}dispatchEvent(e,t){e.propagationStopped=!1,e.propagationImmediatelyStopped=!1,this.propagate(e,t),this.dispatch.emit(t||e.type,e)}mapEvent(e){if(!this.rootTarget)return;let t=this.mappingTable[e.type];if(t)for(let i=0,s=t.length;i<s;i++)t[i].fn(e);else console.warn(`[EventBoundary]: Event mapping not defined for ${e.type}`)}hitTest(e,t){ki.pauseUpdate=!0;let s=this._isPointerMoveEvent&&this.enableGlobalMoveEvents?"hitTestMoveRecursive":"hitTestRecursive",n=this[s](this.rootTarget,this.rootTarget.eventMode,NE.set(e,t),this.hitTestFn,this.hitPruneFn);return n&&n[0]}propagate(e,t){if(!e.target)return;let i=e.composedPath();e.eventPhase=e.CAPTURING_PHASE;for(let s=0,n=i.length-1;s<n;s++)if(e.currentTarget=i[s],this.notifyTarget(e,t),e.propagationStopped||e.propagationImmediatelyStopped)return;if(e.eventPhase=e.AT_TARGET,e.currentTarget=e.target,this.notifyTarget(e,t),!(e.propagationStopped||e.propagationImmediatelyStopped)){e.eventPhase=e.BUBBLING_PHASE;for(let s=i.length-2;s>=0;s--)if(e.currentTarget=i[s],this.notifyTarget(e,t),e.propagationStopped||e.propagationImmediatelyStopped)return}}all(e,t,i=this._allInteractiveElements){if(i.length===0)return;e.eventPhase=e.BUBBLING_PHASE;let s=Array.isArray(t)?t:[t];for(let n=i.length-1;n>=0;n--)s.forEach(o=>{e.currentTarget=i[n],this.notifyTarget(e,o)})}propagationPath(e){let t=[e];for(let i=0;i<ME&&e!==this.rootTarget;i++){if(!e.parent)throw new Error("Cannot find propagation path to disconnected target");t.push(e.parent),e=e.parent}return t.reverse(),t}hitTestMoveRecursive(e,t,i,s,n,o=!1){let a=!1;if(this._interactivePrune(e))return null;if((e.eventMode==="dynamic"||t==="dynamic")&&(ki.pauseUpdate=!1),e.interactiveChildren&&e.children){let h=e.children;for(let d=h.length-1;d>=0;d--){let p=h[d],g=this.hitTestMoveRecursive(p,this._isInteractive(t)?t:p.eventMode,i,s,n,o||n(e,i));if(g){if(g.length>0&&!g[g.length-1].parent)continue;let v=e.isInteractive();(g.length>0||v)&&(v&&this._allInteractiveElements.push(e),g.push(e)),this._hitElements.length===0&&(this._hitElements=g),a=!0}}}let l=this._isInteractive(t),c=e.isInteractive();return c&&c&&this._allInteractiveElements.push(e),o||this._hitElements.length>0?null:a?this._hitElements:l&&!n(e,i)&&s(e,i)?c?[e]:[]:null}hitTestRecursive(e,t,i,s,n){if(this._interactivePrune(e)||n(e,i))return null;if((e.eventMode==="dynamic"||t==="dynamic")&&(ki.pauseUpdate=!1),e.interactiveChildren&&e.children){let l=e.children;for(let c=l.length-1;c>=0;c--){let h=l[c],d=this.hitTestRecursive(h,this._isInteractive(t)?t:h.eventMode,i,s,n);if(d){if(d.length>0&&!d[d.length-1].parent)continue;let p=e.isInteractive();return(d.length>0||p)&&d.push(e),d}}}let o=this._isInteractive(t),a=e.isInteractive();return o&&s(e,i)?a?[e]:[]:null}_isInteractive(e){return e==="static"||e==="dynamic"}_interactivePrune(e){return!!(!e||e.isMask||!e.visible||!e.renderable||e.eventMode==="none"||e.eventMode==="passive"&&!e.interactiveChildren||e.isMask)}hitPruneFn(e,t){if(e.hitArea&&(e.worldTransform.applyInverse(t,m2),!e.hitArea.contains(m2.x,m2.y)))return!0;if(e._mask){let i=e._mask.isMaskData?e._mask.maskObject:e._mask;if(i&&!i.containsPoint?.(t))return!0}return!1}hitTestFn(e,t){return e.eventMode==="passive"?!1:e.hitArea?!0:e.containsPoint?e.containsPoint(t):!1}notifyTarget(e,t){t=t??e.type;let i=`on${t}`;e.currentTarget[i]?.(e);let s=e.eventPhase===e.CAPTURING_PHASE||e.eventPhase===e.AT_TARGET?`${t}capture`:t;this.notifyListeners(e,s),e.eventPhase===e.AT_TARGET&&this.notifyListeners(e,t)}mapPointerDown(e){if(!(e instanceof F0)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}let t=this.createPointerEvent(e);if(this.dispatchEvent(t,"pointerdown"),t.pointerType==="touch")this.dispatchEvent(t,"touchstart");else if(t.pointerType==="mouse"||t.pointerType==="pen"){let s=t.button===2;this.dispatchEvent(t,s?"rightdown":"mousedown")}let i=this.trackingData(e.pointerId);i.pressTargetsByButton[e.button]=t.composedPath(),this.freeEvent(t)}mapPointerMove(e){if(!(e instanceof F0)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}this._allInteractiveElements.length=0,this._hitElements.length=0,this._isPointerMoveEvent=!0;let t=this.createPointerEvent(e);this._isPointerMoveEvent=!1;let i=t.pointerType==="mouse"||t.pointerType==="pen",s=this.trackingData(e.pointerId),n=this.findMountedTarget(s.overTargets);if(s.overTargets?.length>0&&n!==t.target){let l=e.type==="mousemove"?"mouseout":"pointerout",c=this.createPointerEvent(e,l,n);if(this.dispatchEvent(c,"pointerout"),i&&this.dispatchEvent(c,"mouseout"),!t.composedPath().includes(n)){let h=this.createPointerEvent(e,"pointerleave",n);for(h.eventPhase=h.AT_TARGET;h.target&&!t.composedPath().includes(h.target);)h.currentTarget=h.target,this.notifyTarget(h),i&&this.notifyTarget(h,"mouseleave"),h.target=h.target.parent;this.freeEvent(h)}this.freeEvent(c)}if(n!==t.target){let l=e.type==="mousemove"?"mouseover":"pointerover",c=this.clonePointerEvent(t,l);this.dispatchEvent(c,"pointerover"),i&&this.dispatchEvent(c,"mouseover");let h=n?.parent;for(;h&&h!==this.rootTarget.parent&&h!==t.target;)h=h.parent;if(!h||h===this.rootTarget.parent){let p=this.clonePointerEvent(t,"pointerenter");for(p.eventPhase=p.AT_TARGET;p.target&&p.target!==n&&p.target!==this.rootTarget.parent;)p.currentTarget=p.target,this.notifyTarget(p),i&&this.notifyTarget(p,"mouseenter"),p.target=p.target.parent;this.freeEvent(p)}this.freeEvent(c)}let o=[],a=this.enableGlobalMoveEvents??!0;this.moveOnAll?o.push("pointermove"):this.dispatchEvent(t,"pointermove"),a&&o.push("globalpointermove"),t.pointerType==="touch"&&(this.moveOnAll?o.splice(1,0,"touchmove"):this.dispatchEvent(t,"touchmove"),a&&o.push("globaltouchmove")),i&&(this.moveOnAll?o.splice(1,0,"mousemove"):this.dispatchEvent(t,"mousemove"),a&&o.push("globalmousemove"),this.cursor=t.target?.cursor),o.length>0&&this.all(t,o),this._allInteractiveElements.length=0,this._hitElements.length=0,s.overTargets=t.composedPath(),this.freeEvent(t)}mapPointerOver(e){if(!(e instanceof F0)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}let t=this.trackingData(e.pointerId),i=this.createPointerEvent(e),s=i.pointerType==="mouse"||i.pointerType==="pen";this.dispatchEvent(i,"pointerover"),s&&this.dispatchEvent(i,"mouseover"),i.pointerType==="mouse"&&(this.cursor=i.target?.cursor);let n=this.clonePointerEvent(i,"pointerenter");for(n.eventPhase=n.AT_TARGET;n.target&&n.target!==this.rootTarget.parent;)n.currentTarget=n.target,this.notifyTarget(n),s&&this.notifyTarget(n,"mouseenter"),n.target=n.target.parent;t.overTargets=i.composedPath(),this.freeEvent(i),this.freeEvent(n)}mapPointerOut(e){if(!(e instanceof F0)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}let t=this.trackingData(e.pointerId);if(t.overTargets){let i=e.pointerType==="mouse"||e.pointerType==="pen",s=this.findMountedTarget(t.overTargets),n=this.createPointerEvent(e,"pointerout",s);this.dispatchEvent(n),i&&this.dispatchEvent(n,"mouseout");let o=this.createPointerEvent(e,"pointerleave",s);for(o.eventPhase=o.AT_TARGET;o.target&&o.target!==this.rootTarget.parent;)o.currentTarget=o.target,this.notifyTarget(o),i&&this.notifyTarget(o,"mouseleave"),o.target=o.target.parent;t.overTargets=null,this.freeEvent(n),this.freeEvent(o)}this.cursor=null}mapPointerUp(e){if(!(e instanceof F0)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}let t=performance.now(),i=this.createPointerEvent(e);if(this.dispatchEvent(i,"pointerup"),i.pointerType==="touch")this.dispatchEvent(i,"touchend");else if(i.pointerType==="mouse"||i.pointerType==="pen"){let a=i.button===2;this.dispatchEvent(i,a?"rightup":"mouseup")}let s=this.trackingData(e.pointerId),n=this.findMountedTarget(s.pressTargetsByButton[e.button]),o=n;if(n&&!i.composedPath().includes(n)){let a=n;for(;a&&!i.composedPath().includes(a);){if(i.currentTarget=a,this.notifyTarget(i,"pointerupoutside"),i.pointerType==="touch")this.notifyTarget(i,"touchendoutside");else if(i.pointerType==="mouse"||i.pointerType==="pen"){let l=i.button===2;this.notifyTarget(i,l?"rightupoutside":"mouseupoutside")}a=a.parent}delete s.pressTargetsByButton[e.button],o=a}if(o){let a=this.clonePointerEvent(i,"click");a.target=o,a.path=null,s.clicksByButton[e.button]||(s.clicksByButton[e.button]={clickCount:0,target:a.target,timeStamp:t});let l=s.clicksByButton[e.button];if(l.target===a.target&&t-l.timeStamp<200?++l.clickCount:l.clickCount=1,l.target=a.target,l.timeStamp=t,a.detail=l.clickCount,a.pointerType==="mouse"){let c=a.button===2;this.dispatchEvent(a,c?"rightclick":"click")}else a.pointerType==="touch"&&this.dispatchEvent(a,"tap");this.dispatchEvent(a,"pointertap"),this.freeEvent(a)}this.freeEvent(i)}mapPointerUpOutside(e){if(!(e instanceof F0)){console.warn("EventBoundary cannot map a non-pointer event as a pointer event");return}let t=this.trackingData(e.pointerId),i=this.findMountedTarget(t.pressTargetsByButton[e.button]),s=this.createPointerEvent(e);if(i){let n=i;for(;n;)s.currentTarget=n,this.notifyTarget(s,"pointerupoutside"),s.pointerType==="touch"?this.notifyTarget(s,"touchendoutside"):(s.pointerType==="mouse"||s.pointerType==="pen")&&this.notifyTarget(s,s.button===2?"rightupoutside":"mouseupoutside"),n=n.parent;delete t.pressTargetsByButton[e.button]}this.freeEvent(s)}mapWheel(e){if(!(e instanceof ci)){console.warn("EventBoundary cannot map a non-wheel event as a wheel event");return}let t=this.createWheelEvent(e);this.dispatchEvent(t),this.freeEvent(t)}findMountedTarget(e){if(!e)return null;let t=e[0];for(let i=1;i<e.length&&e[i].parent===t;i++)t=e[i];return t}createPointerEvent(e,t,i){let s=this.allocateEvent(F0);return this.copyPointerData(e,s),this.copyMouseData(e,s),this.copyData(e,s),s.nativeEvent=e.nativeEvent,s.originalEvent=e,s.target=i??this.hitTest(s.global.x,s.global.y)??this._hitElements[0],typeof t=="string"&&(s.type=t),s}createWheelEvent(e){let t=this.allocateEvent(ci);return this.copyWheelData(e,t),this.copyMouseData(e,t),this.copyData(e,t),t.nativeEvent=e.nativeEvent,t.originalEvent=e,t.target=this.hitTest(t.global.x,t.global.y),t}clonePointerEvent(e,t){let i=this.allocateEvent(F0);return i.nativeEvent=e.nativeEvent,i.originalEvent=e.originalEvent,this.copyPointerData(e,i),this.copyMouseData(e,i),this.copyData(e,i),i.target=e.target,i.path=e.composedPath().slice(),i.type=t??i.type,i}copyWheelData(e,t){t.deltaMode=e.deltaMode,t.deltaX=e.deltaX,t.deltaY=e.deltaY,t.deltaZ=e.deltaZ}copyPointerData(e,t){e instanceof F0&&t instanceof F0&&(t.pointerId=e.pointerId,t.width=e.width,t.height=e.height,t.isPrimary=e.isPrimary,t.pointerType=e.pointerType,t.pressure=e.pressure,t.tangentialPressure=e.tangentialPressure,t.tiltX=e.tiltX,t.tiltY=e.tiltY,t.twist=e.twist)}copyMouseData(e,t){e instanceof Ii&&t instanceof Ii&&(t.altKey=e.altKey,t.button=e.button,t.buttons=e.buttons,t.client.copyFrom(e.client),t.ctrlKey=e.ctrlKey,t.metaKey=e.metaKey,t.movement.copyFrom(e.movement),t.screen.copyFrom(e.screen),t.shiftKey=e.shiftKey,t.global.copyFrom(e.global))}copyData(e,t){t.isTrusted=e.isTrusted,t.srcElement=e.srcElement,t.timeStamp=performance.now(),t.type=e.type,t.detail=e.detail,t.view=e.view,t.which=e.which,t.layer.copyFrom(e.layer),t.page.copyFrom(e.page)}trackingData(e){return this.mappingState.trackingData[e]||(this.mappingState.trackingData[e]={pressTargetsByButton:{},clicksByButton:{},overTarget:null}),this.mappingState.trackingData[e]}allocateEvent(e){this.eventPool.has(e)||this.eventPool.set(e,[]);let t=this.eventPool.get(e).pop()||new e(this);return t.eventPhase=t.NONE,t.currentTarget=null,t.path=null,t.target=null,t}freeEvent(e){if(e.manager!==this)throw new Error("It is illegal to free an event not managed by this EventBoundary!");let t=e.constructor;this.eventPool.has(t)||this.eventPool.set(t,[]),this.eventPool.get(t).push(e)}notifyListeners(e,t){let i=e.currentTarget._events[t];if(i&&e.currentTarget.isInteractive())if("fn"in i)i.once&&e.currentTarget.removeListener(t,i.fn,void 0,!0),i.fn.call(i.context,e);else for(let s=0,n=i.length;s<n&&!e.propagationImmediatelyStopped;s++)i[s].once&&e.currentTarget.removeListener(t,i[s].fn,void 0,!0),i[s].fn.call(i[s].context,e)}};var PE=1,BE={touchstart:"pointerdown",touchend:"pointerup",touchendoutside:"pointerupoutside",touchmove:"pointermove",touchcancel:"pointercancel"},y2=class{constructor(r){this.supportsTouchEvents="ontouchstart"in globalThis,this.supportsPointerEvents=!!globalThis.PointerEvent,this.domElement=null,this.resolution=1,this.renderer=r,this.rootBoundary=new yc(null),ki.init(this),this.autoPreventDefault=!0,this.eventsAdded=!1,this.rootPointerEvent=new F0(null),this.rootWheelEvent=new ci(null),this.cursorStyles={default:"inherit",pointer:"pointer"},this.features=new Proxy({...y2.defaultEventFeatures},{set:(e,t,i)=>(t==="globalMove"&&(this.rootBoundary.enableGlobalMoveEvents=i),e[t]=i,!0)}),this.onPointerDown=this.onPointerDown.bind(this),this.onPointerMove=this.onPointerMove.bind(this),this.onPointerUp=this.onPointerUp.bind(this),this.onPointerOverOut=this.onPointerOverOut.bind(this),this.onWheel=this.onWheel.bind(this)}static get defaultEventMode(){return this._defaultEventMode}init(r){let{view:e,resolution:t}=this.renderer;this.setTargetElement(e),this.resolution=t,y2._defaultEventMode=r.eventMode??"auto",Object.assign(this.features,r.eventFeatures??{}),this.rootBoundary.enableGlobalMoveEvents=this.features.globalMove}resolutionChange(r){this.resolution=r}destroy(){this.setTargetElement(null),this.renderer=null}setCursor(r){r=r||"default";let e=!0;if(globalThis.OffscreenCanvas&&this.domElement instanceof OffscreenCanvas&&(e=!1),this.currentCursor===r)return;this.currentCursor=r;let t=this.cursorStyles[r];if(t)switch(typeof t){case"string":e&&(this.domElement.style.cursor=t);break;case"function":t(r);break;case"object":e&&Object.assign(this.domElement.style,t);break}else e&&typeof r=="string"&&!Object.prototype.hasOwnProperty.call(this.cursorStyles,r)&&(this.domElement.style.cursor=r)}get pointer(){return this.rootPointerEvent}onPointerDown(r){if(!this.features.click||(this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,this.supportsTouchEvents&&r.pointerType==="touch"))return;let e=this.normalizeToPointerData(r);this.autoPreventDefault&&e[0].isNormalized&&(r.cancelable||!("cancelable"in r))&&r.preventDefault();for(let t=0,i=e.length;t<i;t++){let s=e[t],n=this.bootstrapEvent(this.rootPointerEvent,s);this.rootBoundary.mapEvent(n)}this.setCursor(this.rootBoundary.cursor)}onPointerMove(r){if(!this.features.move||(this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,this.supportsTouchEvents&&r.pointerType==="touch"))return;ki.pointerMoved();let e=this.normalizeToPointerData(r);for(let t=0,i=e.length;t<i;t++){let s=this.bootstrapEvent(this.rootPointerEvent,e[t]);this.rootBoundary.mapEvent(s)}this.setCursor(this.rootBoundary.cursor)}onPointerUp(r){if(!this.features.click||(this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,this.supportsTouchEvents&&r.pointerType==="touch"))return;let e=r.target;r.composedPath&&r.composedPath().length>0&&(e=r.composedPath()[0]);let t=e!==this.domElement?"outside":"",i=this.normalizeToPointerData(r);for(let s=0,n=i.length;s<n;s++){let o=this.bootstrapEvent(this.rootPointerEvent,i[s]);o.type+=t,this.rootBoundary.mapEvent(o)}this.setCursor(this.rootBoundary.cursor)}onPointerOverOut(r){if(!this.features.click||(this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,this.supportsTouchEvents&&r.pointerType==="touch"))return;let e=this.normalizeToPointerData(r);for(let t=0,i=e.length;t<i;t++){let s=this.bootstrapEvent(this.rootPointerEvent,e[t]);this.rootBoundary.mapEvent(s)}this.setCursor(this.rootBoundary.cursor)}onWheel(r){if(!this.features.wheel)return;let e=this.normalizeWheelEvent(r);this.rootBoundary.rootTarget=this.renderer.lastObjectRendered,this.rootBoundary.mapEvent(e)}setTargetElement(r){this.removeEvents(),this.domElement=r,ki.domElement=r,this.addEvents()}addEvents(){if(this.eventsAdded||!this.domElement)return;ki.addTickerListener();let r=this.domElement.style;r&&(globalThis.navigator.msPointerEnabled?(r.msContentZooming="none",r.msTouchAction="none"):this.supportsPointerEvents&&(r.touchAction="none")),this.supportsPointerEvents?(globalThis.document.addEventListener("pointermove",this.onPointerMove,!0),this.domElement.addEventListener("pointerdown",this.onPointerDown,!0),this.domElement.addEventListener("pointerleave",this.onPointerOverOut,!0),this.domElement.addEventListener("pointerover",this.onPointerOverOut,!0),globalThis.addEventListener("pointerup",this.onPointerUp,!0)):(globalThis.document.addEventListener("mousemove",this.onPointerMove,!0),this.domElement.addEventListener("mousedown",this.onPointerDown,!0),this.domElement.addEventListener("mouseout",this.onPointerOverOut,!0),this.domElement.addEventListener("mouseover",this.onPointerOverOut,!0),globalThis.addEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.domElement.addEventListener("touchstart",this.onPointerDown,!0),this.domElement.addEventListener("touchend",this.onPointerUp,!0),this.domElement.addEventListener("touchmove",this.onPointerMove,!0)),this.domElement.addEventListener("wheel",this.onWheel,{passive:!0,capture:!0}),this.eventsAdded=!0}removeEvents(){if(!this.eventsAdded||!this.domElement)return;ki.removeTickerListener();let r=this.domElement.style;globalThis.navigator.msPointerEnabled?(r.msContentZooming="",r.msTouchAction=""):this.supportsPointerEvents&&(r.touchAction=""),this.supportsPointerEvents?(globalThis.document.removeEventListener("pointermove",this.onPointerMove,!0),this.domElement.removeEventListener("pointerdown",this.onPointerDown,!0),this.domElement.removeEventListener("pointerleave",this.onPointerOverOut,!0),this.domElement.removeEventListener("pointerover",this.onPointerOverOut,!0),globalThis.removeEventListener("pointerup",this.onPointerUp,!0)):(globalThis.document.removeEventListener("mousemove",this.onPointerMove,!0),this.domElement.removeEventListener("mousedown",this.onPointerDown,!0),this.domElement.removeEventListener("mouseout",this.onPointerOverOut,!0),this.domElement.removeEventListener("mouseover",this.onPointerOverOut,!0),globalThis.removeEventListener("mouseup",this.onPointerUp,!0)),this.supportsTouchEvents&&(this.domElement.removeEventListener("touchstart",this.onPointerDown,!0),this.domElement.removeEventListener("touchend",this.onPointerUp,!0),this.domElement.removeEventListener("touchmove",this.onPointerMove,!0)),this.domElement.removeEventListener("wheel",this.onWheel,!0),this.domElement=null,this.eventsAdded=!1}mapPositionToPoint(r,e,t){let i;this.domElement.parentElement?i=this.domElement.getBoundingClientRect():i={x:0,y:0,width:this.domElement.width,height:this.domElement.height,left:0,top:0};let s=1/this.resolution;r.x=(e-i.left)*(this.domElement.width/i.width)*s,r.y=(t-i.top)*(this.domElement.height/i.height)*s}normalizeToPointerData(r){let e=[];if(this.supportsTouchEvents&&r instanceof TouchEvent)for(let t=0,i=r.changedTouches.length;t<i;t++){let s=r.changedTouches[t];typeof s.button>"u"&&(s.button=0),typeof s.buttons>"u"&&(s.buttons=1),typeof s.isPrimary>"u"&&(s.isPrimary=r.touches.length===1&&r.type==="touchstart"),typeof s.width>"u"&&(s.width=s.radiusX||1),typeof s.height>"u"&&(s.height=s.radiusY||1),typeof s.tiltX>"u"&&(s.tiltX=0),typeof s.tiltY>"u"&&(s.tiltY=0),typeof s.pointerType>"u"&&(s.pointerType="touch"),typeof s.pointerId>"u"&&(s.pointerId=s.identifier||0),typeof s.pressure>"u"&&(s.pressure=s.force||.5),typeof s.twist>"u"&&(s.twist=0),typeof s.tangentialPressure>"u"&&(s.tangentialPressure=0),typeof s.layerX>"u"&&(s.layerX=s.offsetX=s.clientX),typeof s.layerY>"u"&&(s.layerY=s.offsetY=s.clientY),s.isNormalized=!0,s.type=r.type,e.push(s)}else if(!globalThis.MouseEvent||r instanceof MouseEvent&&(!this.supportsPointerEvents||!(r instanceof globalThis.PointerEvent))){let t=r;typeof t.isPrimary>"u"&&(t.isPrimary=!0),typeof t.width>"u"&&(t.width=1),typeof t.height>"u"&&(t.height=1),typeof t.tiltX>"u"&&(t.tiltX=0),typeof t.tiltY>"u"&&(t.tiltY=0),typeof t.pointerType>"u"&&(t.pointerType="mouse"),typeof t.pointerId>"u"&&(t.pointerId=PE),typeof t.pressure>"u"&&(t.pressure=.5),typeof t.twist>"u"&&(t.twist=0),typeof t.tangentialPressure>"u"&&(t.tangentialPressure=0),t.isNormalized=!0,e.push(t)}else e.push(r);return e}normalizeWheelEvent(r){let e=this.rootWheelEvent;return this.transferMouseData(e,r),e.deltaX=r.deltaX,e.deltaY=r.deltaY,e.deltaZ=r.deltaZ,e.deltaMode=r.deltaMode,this.mapPositionToPoint(e.screen,r.clientX,r.clientY),e.global.copyFrom(e.screen),e.offset.copyFrom(e.screen),e.nativeEvent=r,e.type=r.type,e}bootstrapEvent(r,e){return r.originalEvent=null,r.nativeEvent=e,r.pointerId=e.pointerId,r.width=e.width,r.height=e.height,r.isPrimary=e.isPrimary,r.pointerType=e.pointerType,r.pressure=e.pressure,r.tangentialPressure=e.tangentialPressure,r.tiltX=e.tiltX,r.tiltY=e.tiltY,r.twist=e.twist,this.transferMouseData(r,e),this.mapPositionToPoint(r.screen,e.clientX,e.clientY),r.global.copyFrom(r.screen),r.offset.copyFrom(r.screen),r.isTrusted=e.isTrusted,r.type==="pointerleave"&&(r.type="pointerout"),r.type.startsWith("mouse")&&(r.type=r.type.replace("mouse","pointer")),r.type.startsWith("touch")&&(r.type=BE[r.type]||r.type),r}transferMouseData(r,e){r.isTrusted=e.isTrusted,r.srcElement=e.srcElement,r.timeStamp=performance.now(),r.type=e.type,r.altKey=e.altKey,r.button=e.button,r.buttons=e.buttons,r.client.x=e.clientX,r.client.y=e.clientY,r.ctrlKey=e.ctrlKey,r.metaKey=e.metaKey,r.movement.x=e.movementX,r.movement.y=e.movementY,r.page.x=e.pageX,r.page.y=e.pageY,r.relatedTarget=null,r.shiftKey=e.shiftKey}},to=y2;to.extension={name:"events",type:[Z.RendererSystem,Z.CanvasRendererSystem]};to.defaultEventFeatures={move:!0,globalMove:!0,click:!0,wheel:!0};te.add(to);function Z3(r){return r==="dynamic"||r==="static"}var Q3={onclick:null,onmousedown:null,onmouseenter:null,onmouseleave:null,onmousemove:null,onglobalmousemove:null,onmouseout:null,onmouseover:null,onmouseup:null,onmouseupoutside:null,onpointercancel:null,onpointerdown:null,onpointerenter:null,onpointerleave:null,onpointermove:null,onglobalpointermove:null,onpointerout:null,onpointerover:null,onpointertap:null,onpointerup:null,onpointerupoutside:null,onrightclick:null,onrightdown:null,onrightup:null,onrightupoutside:null,ontap:null,ontouchcancel:null,ontouchend:null,ontouchendoutside:null,ontouchmove:null,onglobaltouchmove:null,ontouchstart:null,onwheel:null,_internalInteractive:void 0,get interactive(){return this._internalInteractive??Z3(to.defaultEventMode)},set interactive(r){ae.deprecation("7.2.0","Setting interactive is deprecated, use eventMode = 'none'/'passive'/'auto'/'static'/'dynamic' instead."),this._internalInteractive=r,this.eventMode=r?"static":"auto"},_internalEventMode:void 0,get eventMode(){return this._internalEventMode??to.defaultEventMode},set eventMode(r){this._internalInteractive=Z3(r),this._internalEventMode=r},isInteractive(){return this.eventMode==="static"||this.eventMode==="dynamic"},interactiveChildren:!0,hitArea:null,addEventListener(r,e,t){let i=typeof t=="boolean"&&t||typeof t=="object"&&t.capture,s=typeof e=="function"?void 0:e;r=i?`${r}capture`:r,e=typeof e=="function"?e:e.handleEvent,this.on(r,e,s)},removeEventListener(r,e,t){let i=typeof t=="boolean"&&t||typeof t=="object"&&t.capture,s=typeof e=="function"?void 0:e;r=i?`${r}capture`:r,e=typeof e=="function"?e:e.handleEvent,this.off(r,e,s)},dispatchEvent(r){if(!(r instanceof ys))throw new Error("DisplayObject cannot propagate events outside of the Federated Events API");return r.defaultPrevented=!1,r.path=null,r.target=this,r.manager.dispatchEvent(r),!r.defaultPrevented}};at.mixin(Q3);var v2={accessible:!1,accessibleTitle:null,accessibleHint:null,tabIndex:0,_accessibleActive:!1,_accessibleDiv:null,accessibleType:"button",accessiblePointerEvents:"auto",accessibleChildren:!0,renderId:-1};at.mixin(v2);var RE=9,nd=100,OE=0,GE=0,J3=2,ef=1,UE=-1e3,VE=-1e3,zE=2,vc=class{constructor(e){this.debug=!1,this._isActive=!1,this._isMobileAccessibility=!1,this.pool=[],this.renderId=0,this.children=[],this.androidUpdateCount=0,this.androidUpdateFrequency=500,this._hookDiv=null,(ae.isMobile.tablet||ae.isMobile.phone)&&this.createTouchHook();let t=document.createElement("div");t.style.width=`${nd}px`,t.style.height=`${nd}px`,t.style.position="absolute",t.style.top=`${OE}px`,t.style.left=`${GE}px`,t.style.zIndex=J3.toString(),this.div=t,this.renderer=e,this._onKeyDown=this._onKeyDown.bind(this),this._onMouseMove=this._onMouseMove.bind(this),globalThis.addEventListener("keydown",this._onKeyDown,!1)}get isActive(){return this._isActive}get isMobileAccessibility(){return this._isMobileAccessibility}createTouchHook(){let e=document.createElement("button");e.style.width=`${ef}px`,e.style.height=`${ef}px`,e.style.position="absolute",e.style.top=`${UE}px`,e.style.left=`${VE}px`,e.style.zIndex=zE.toString(),e.style.backgroundColor="#FF0000",e.title="select to enable accessibility for this content",e.addEventListener("focus",()=>{this._isMobileAccessibility=!0,this.activate(),this.destroyTouchHook()}),document.body.appendChild(e),this._hookDiv=e}destroyTouchHook(){this._hookDiv&&(document.body.removeChild(this._hookDiv),this._hookDiv=null)}activate(){this._isActive||(this._isActive=!0,globalThis.document.addEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown,!1),this.renderer.on("postrender",this.update,this),this.renderer.view.parentNode?.appendChild(this.div))}deactivate(){!this._isActive||this._isMobileAccessibility||(this._isActive=!1,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.addEventListener("keydown",this._onKeyDown,!1),this.renderer.off("postrender",this.update),this.div.parentNode?.removeChild(this.div))}updateAccessibleObjects(e){if(!e.visible||!e.accessibleChildren)return;e.accessible&&e.isInteractive()&&(e._accessibleActive||this.addChild(e),e.renderId=this.renderId);let t=e.children;if(t)for(let i=0;i<t.length;i++)this.updateAccessibleObjects(t[i])}update(){let e=performance.now();if(ae.isMobile.android.device&&e<this.androidUpdateCount||(this.androidUpdateCount=e+this.androidUpdateFrequency,!this.renderer.renderingToScreen))return;this.renderer.lastObjectRendered&&this.updateAccessibleObjects(this.renderer.lastObjectRendered);let{x:t,y:i,width:s,height:n}=this.renderer.view.getBoundingClientRect(),{width:o,height:a,resolution:l}=this.renderer,c=s/o*l,h=n/a*l,d=this.div;d.style.left=`${t}px`,d.style.top=`${i}px`,d.style.width=`${o}px`,d.style.height=`${a}px`;for(let p=0;p<this.children.length;p++){let g=this.children[p];if(g.renderId!==this.renderId)g._accessibleActive=!1,ae.removeItems(this.children,p,1),this.div.removeChild(g._accessibleDiv),this.pool.push(g._accessibleDiv),g._accessibleDiv=null,p--;else{d=g._accessibleDiv;let v=g.hitArea,C=g.worldTransform;g.hitArea?(d.style.left=`${(C.tx+v.x*C.a)*c}px`,d.style.top=`${(C.ty+v.y*C.d)*h}px`,d.style.width=`${v.width*C.a*c}px`,d.style.height=`${v.height*C.d*h}px`):(v=g.getBounds(),this.capHitArea(v),d.style.left=`${v.x*c}px`,d.style.top=`${v.y*h}px`,d.style.width=`${v.width*c}px`,d.style.height=`${v.height*h}px`,d.title!==g.accessibleTitle&&g.accessibleTitle!==null&&(d.title=g.accessibleTitle),d.getAttribute("aria-label")!==g.accessibleHint&&g.accessibleHint!==null&&d.setAttribute("aria-label",g.accessibleHint)),(g.accessibleTitle!==d.title||g.tabIndex!==d.tabIndex)&&(d.title=g.accessibleTitle,d.tabIndex=g.tabIndex,this.debug&&this.updateDebugHTML(d))}}this.renderId++}updateDebugHTML(e){e.innerHTML=`type: ${e.type}</br> title : ${e.title}</br> tabIndex: ${e.tabIndex}`}capHitArea(e){e.x<0&&(e.width+=e.x,e.x=0),e.y<0&&(e.height+=e.y,e.y=0);let{width:t,height:i}=this.renderer;e.x+e.width>t&&(e.width=t-e.x),e.y+e.height>i&&(e.height=i-e.y)}addChild(e){let t=this.pool.pop();t||(t=document.createElement("button"),t.style.width=`${nd}px`,t.style.height=`${nd}px`,t.style.backgroundColor=this.debug?"rgba(255,255,255,0.5)":"transparent",t.style.position="absolute",t.style.zIndex=J3.toString(),t.style.borderStyle="none",navigator.userAgent.toLowerCase().includes("chrome")?t.setAttribute("aria-live","off"):t.setAttribute("aria-live","polite"),navigator.userAgent.match(/rv:.*Gecko\//)?t.setAttribute("aria-relevant","additions"):t.setAttribute("aria-relevant","text"),t.addEventListener("click",this._onClick.bind(this)),t.addEventListener("focus",this._onFocus.bind(this)),t.addEventListener("focusout",this._onFocusOut.bind(this))),t.style.pointerEvents=e.accessiblePointerEvents,t.type=e.accessibleType,e.accessibleTitle&&e.accessibleTitle!==null?t.title=e.accessibleTitle:(!e.accessibleHint||e.accessibleHint===null)&&(t.title=`displayObject ${e.tabIndex}`),e.accessibleHint&&e.accessibleHint!==null&&t.setAttribute("aria-label",e.accessibleHint),this.debug&&this.updateDebugHTML(t),e._accessibleActive=!0,e._accessibleDiv=t,t.displayObject=e,this.children.push(e),this.div.appendChild(e._accessibleDiv),e._accessibleDiv.tabIndex=e.tabIndex}_dispatchEvent(e,t){let{displayObject:i}=e.target,s=this.renderer.events.rootBoundary,n=Object.assign(new ys(s),{target:i});s.rootTarget=this.renderer.lastObjectRendered,t.forEach(o=>s.dispatchEvent(n,o))}_onClick(e){this._dispatchEvent(e,["click","pointertap","tap"])}_onFocus(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","assertive"),this._dispatchEvent(e,["mouseover"])}_onFocusOut(e){e.target.getAttribute("aria-live")||e.target.setAttribute("aria-live","polite"),this._dispatchEvent(e,["mouseout"])}_onKeyDown(e){e.keyCode===RE&&this.activate()}_onMouseMove(e){e.movementX===0&&e.movementY===0||this.deactivate()}destroy(){this.destroyTouchHook(),this.div=null,globalThis.document.removeEventListener("mousemove",this._onMouseMove,!0),globalThis.removeEventListener("keydown",this._onKeyDown),this.pool=null,this.children=null,this.renderer=null}};vc.extension={name:"accessibility",type:[Z.RendererPlugin,Z.CanvasRendererPlugin]};te.add(vc);var x2=class{constructor(r){this.stage=new tt,r=Object.assign({forceCanvas:!1},r),this.renderer=l2(r),x2._plugins.forEach(e=>{e.init.call(this,r)})}render(){this.renderer.render(this.stage)}get view(){return this.renderer.view}get screen(){return this.renderer.screen}destroy(r,e){let t=x2._plugins.slice(0);t.reverse(),t.forEach(i=>{i.destroy.call(this)}),this.stage.destroy(e),this.stage=null,this.renderer.destroy(r),this.renderer=null}},D2=x2;D2._plugins=[];te.handleByList(Z.Application,D2._plugins);var xc=class{static init(e){Object.defineProperty(this,"resizeTo",{set(t){globalThis.removeEventListener("resize",this.queueResize),this._resizeTo=t,t&&(globalThis.addEventListener("resize",this.queueResize),this.resize())},get(){return this._resizeTo}}),this.queueResize=()=>{this._resizeTo&&(this.cancelResize(),this._resizeId=requestAnimationFrame(()=>this.resize()))},this.cancelResize=()=>{this._resizeId&&(cancelAnimationFrame(this._resizeId),this._resizeId=null)},this.resize=()=>{if(!this._resizeTo)return;this.cancelResize();let t,i;if(this._resizeTo===globalThis.window)t=globalThis.innerWidth,i=globalThis.innerHeight;else{let{clientWidth:s,clientHeight:n}=this._resizeTo;t=s,i=n}this.renderer.resize(t,i),this.render()},this._resizeId=null,this._resizeTo=null,this.resizeTo=e.resizeTo||null}static destroy(){globalThis.removeEventListener("resize",this.queueResize),this.cancelResize(),this.cancelResize=null,this.queueResize=null,this.resizeTo=null,this.resize=null}};xc.extension=Z.Application;te.add(xc);var tf={loader:Z.LoadParser,resolver:Z.ResolveParser,cache:Z.CacheParser,detection:Z.DetectionParser};te.handle(Z.Asset,r=>{let e=r.ref;Object.entries(tf).filter(([t])=>!!e[t]).forEach(([t,i])=>te.add(Object.assign(e[t],{extension:e[t].extension??i})))},r=>{let e=r.ref;Object.keys(tf).filter(t=>!!e[t]).forEach(t=>te.remove(e[t]))});var od=class{constructor(e,t=!1){this._loader=e,this._assetList=[],this._isLoading=!1,this._maxConcurrent=1,this.verbose=t}add(e){e.forEach(t=>{this._assetList.push(t)}),this.verbose&&console.log("[BackgroundLoader] assets: ",this._assetList),this._isActive&&!this._isLoading&&this._next()}async _next(){if(this._assetList.length&&this._isActive){this._isLoading=!0;let e=[],t=Math.min(this._assetList.length,this._maxConcurrent);for(let i=0;i<t;i++)e.push(this._assetList.pop());await this._loader.load(e),this._isLoading=!1,this._next()}}get active(){return this._isActive}set active(e){this._isActive!==e&&(this._isActive=e,e&&!this._isLoading&&this._next())}};function Gr(r,e){if(Array.isArray(e)){for(let t of e)if(r.startsWith(`data:${t}`))return!0;return!1}return r.startsWith(`data:${e}`)}function A0(r,e){let t=r.split("?")[0],i=ae.path.extname(t).toLowerCase();return Array.isArray(e)?e.includes(i):i===e}var U0=(r,e)=>(Array.isArray(r)||(r=[r]),e?r.map(t=>typeof t=="string"?e(t):t):r);var ro=(r,e)=>{let t=e.split("?")[1];return t&&(r+=`?${t}`),r};function rf(r,e,t,i,s){let n=e[t];for(let o=0;o<n.length;o++){let a=n[o];t<e.length-1?rf(r.replace(i[t],a),e,t+1,i,s):s.push(r.replace(i[t],a))}}function ad(r){let e=/\{(.*?)\}/g,t=r.match(e),i=[];if(t){let s=[];t.forEach(n=>{let o=n.substring(1,n.length-1).split(",");s.push(o)}),rf(r,s,0,t,i)}else i.push(r);return i}var vs=r=>!Array.isArray(r);var b2=class{constructor(){this._parsers=[],this._cache=new Map,this._cacheMap=new Map}reset(){this._cacheMap.clear(),this._cache.clear()}has(e){return this._cache.has(e)}get(e){let t=this._cache.get(e);return t||console.warn(`[Assets] Asset id ${e} was not found in the Cache`),t}set(e,t){let i=U0(e),s;for(let a=0;a<this.parsers.length;a++){let l=this.parsers[a];if(l.test(t)){s=l.getCacheableAssets(i,t);break}}s||(s={},i.forEach(a=>{s[a]=t}));let n=Object.keys(s),o={cacheKeys:n,keys:i};if(i.forEach(a=>{this._cacheMap.set(a,o)}),n.forEach(a=>{this._cache.has(a)&&this._cache.get(a)!==t&&console.warn("[Cache] already has key:",a),this._cache.set(a,s[a])}),t instanceof Se){let a=t;i.forEach(l=>{a.baseTexture!==Se.EMPTY.baseTexture&&we.addToCache(a.baseTexture,l),Se.addToCache(a,l)})}}remove(e){if(this._cacheMap.get(e),!this._cacheMap.has(e)){console.warn(`[Assets] Asset id ${e} was not found in the Cache`);return}let t=this._cacheMap.get(e);t.cacheKeys.forEach(s=>{this._cache.delete(s)}),t.keys.forEach(s=>{this._cacheMap.delete(s)})}get parsers(){return this._parsers}},tn=new b2;var ld=class{constructor(){this._parsers=[],this._parsersValidated=!1,this.parsers=new Proxy(this._parsers,{set:(e,t,i)=>(this._parsersValidated=!1,e[t]=i,!0)}),this.promiseCache={}}reset(){this._parsersValidated=!1,this.promiseCache={}}_getLoadPromiseAndParser(e,t){let i={promise:null,parser:null};return i.promise=(async()=>{let s=null,n=null;if(t.loadParser&&(n=this._parserHash[t.loadParser],n||console.warn(`[Assets] specified load parser "${t.loadParser}" not found while loading ${e}`)),!n){for(let o=0;o<this.parsers.length;o++){let a=this.parsers[o];if(a.load&&a.test?.(e,t,this)){n=a;break}}if(!n)return console.warn(`[Assets] ${e} could not be loaded as we don't know how to parse it, ensure the correct parser has been added`),null}s=await n.load(e,t,this),i.parser=n;for(let o=0;o<this.parsers.length;o++){let a=this.parsers[o];a.parse&&a.parse&&await a.testParse?.(s,t,this)&&(s=await a.parse(s,t,this)||s,i.parser=a)}return s})(),i}async load(e,t){this._parsersValidated||this._validateParsers();let i=0,s={},n=vs(e),o=U0(e,c=>({src:c})),a=o.length,l=o.map(async c=>{let h=ae.path.toAbsolute(c.src);if(!s[c.src])try{this.promiseCache[h]||(this.promiseCache[h]=this._getLoadPromiseAndParser(h,c)),s[c.src]=await this.promiseCache[h].promise,t&&t(++i/a)}catch(d){throw delete this.promiseCache[h],delete s[c.src],new Error(`[Loader.load] Failed to load ${h}.
|
|
${d}`)}});return await Promise.all(l),n?s[o[0].src]:s}async unload(e){let i=U0(e,s=>({src:s})).map(async s=>{let n=ae.path.toAbsolute(s.src),o=this.promiseCache[n];if(o){let a=await o.promise;o.parser?.unload?.(a,s,this),delete this.promiseCache[n]}});await Promise.all(i)}_validateParsers(){this._parsersValidated=!0,this._parserHash=this._parsers.filter(e=>e.name).reduce((e,t)=>(e[t.name]&&console.warn(`[Assets] loadParser name conflict "${t.name}"`),{...e,[t.name]:t}),{})}};var jt=(r=>(r[r.Low=0]="Low",r[r.Normal=1]="Normal",r[r.High=2]="High",r))(jt||{});var WE=".json",HE="application/json",E2={extension:{type:Z.LoadParser,priority:jt.Low},name:"loadJson",test(r){return Gr(r,HE)||A0(r,WE)},async load(r){return await(await K.ADAPTER.fetch(r)).json()}};te.add(E2);var jE=".txt",$E="text/plain",S2={name:"loadTxt",extension:{type:Z.LoadParser,priority:jt.Low},test(r){return Gr(r,$E)||A0(r,jE)},async load(r){return await(await K.ADAPTER.fetch(r)).text()}};te.add(S2);var qE=["normal","bold","100","200","300","400","500","600","700","800","900"],YE=[".ttf",".otf",".woff",".woff2"],XE=["font/ttf","font/otf","font/woff","font/woff2"],KE=/^(--|-?[A-Z_])[0-9A-Z_-]*$/i;function C2(r){let e=ae.path.extname(r),s=ae.path.basename(r,e).replace(/(-|_)/g," ").toLowerCase().split(" ").map(a=>a.charAt(0).toUpperCase()+a.slice(1)),n=s.length>0;for(let a of s)if(!a.match(KE)){n=!1;break}let o=s.join(" ");return n||(o=`"${o.replace(/[\\"]/g,"\\$&")}"`),o}var w2={extension:{type:Z.LoadParser,priority:jt.Low},name:"loadWebFont",test(r){return Gr(r,XE)||A0(r,YE)},async load(r,e){let t=K.ADAPTER.getFontFaceSet();if(t){let i=[],s=e.data?.family??C2(r),n=e.data?.weights?.filter(a=>qE.includes(a))??["normal"],o=e.data??{};for(let a=0;a<n.length;a++){let l=n[a],c=new FontFace(s,`url(${encodeURI(r)})`,{...o,weight:l});await c.load(),t.add(c),i.push(c)}return i.length===1?i[0]:i}return console.warn("[loadWebFont] FontFace API is not supported. Skipping loading font"),null},unload(r){(Array.isArray(r)?r:[r]).forEach(e=>K.ADAPTER.getFontFaceSet().delete(e))}};te.add(w2);var sf=0,T2,ZE="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mP8/x8AAwMCAO+ip1sAAAAASUVORK5CYII=",QE={id:"checkImageBitmap",code:`
|
|
async function checkImageBitmap()
|
|
{
|
|
try
|
|
{
|
|
if (typeof createImageBitmap !== 'function') return false;
|
|
|
|
const response = await fetch('${ZE}');
|
|
const imageBlob = await response.blob();
|
|
const imageBitmap = await createImageBitmap(imageBlob);
|
|
|
|
return imageBitmap.width === 1 && imageBitmap.height === 1;
|
|
}
|
|
catch (e)
|
|
{
|
|
return false;
|
|
}
|
|
}
|
|
checkImageBitmap().then((result) => { self.postMessage(result); });
|
|
`},JE={id:"loadImageBitmap",code:`
|
|
async function loadImageBitmap(url)
|
|
{
|
|
const response = await fetch(url);
|
|
|
|
if (!response.ok)
|
|
{
|
|
throw new Error(\`[WorkerManager.loadImageBitmap] Failed to fetch \${url}: \`
|
|
+ \`\${response.status} \${response.statusText}\`);
|
|
}
|
|
|
|
const imageBlob = await response.blob();
|
|
const imageBitmap = await createImageBitmap(imageBlob);
|
|
|
|
return imageBitmap;
|
|
}
|
|
self.onmessage = async (event) =>
|
|
{
|
|
try
|
|
{
|
|
const imageBitmap = await loadImageBitmap(event.data.data[0]);
|
|
|
|
self.postMessage({
|
|
data: imageBitmap,
|
|
uuid: event.data.uuid,
|
|
id: event.data.id,
|
|
}, [imageBitmap]);
|
|
}
|
|
catch(e)
|
|
{
|
|
self.postMessage({
|
|
error: e,
|
|
uuid: event.data.uuid,
|
|
id: event.data.id,
|
|
});
|
|
}
|
|
};`},_2,F2=class{constructor(){this._initialized=!1,this._createdWorkers=0,this.workerPool=[],this.queue=[],this.resolveHash={}}isImageBitmapSupported(){return this._isImageBitmapSupported!==void 0?this._isImageBitmapSupported:(this._isImageBitmapSupported=new Promise(e=>{let t=URL.createObjectURL(new Blob([QE.code],{type:"application/javascript"})),i=new Worker(t);i.addEventListener("message",s=>{i.terminate(),URL.revokeObjectURL(t),e(s.data)})}),this._isImageBitmapSupported)}loadImageBitmap(e){return this._run("loadImageBitmap",[e])}async _initWorkers(){this._initialized||(this._initialized=!0)}getWorker(){T2===void 0&&(T2=navigator.hardwareConcurrency||4);let e=this.workerPool.pop();return!e&&this._createdWorkers<T2&&(_2||(_2=URL.createObjectURL(new Blob([JE.code],{type:"application/javascript"}))),this._createdWorkers++,e=new Worker(_2),e.addEventListener("message",t=>{this.complete(t.data),this.returnWorker(t.target),this.next()})),e}returnWorker(e){this.workerPool.push(e)}complete(e){e.error!==void 0?this.resolveHash[e.uuid].reject(e.error):this.resolveHash[e.uuid].resolve(e.data),this.resolveHash[e.uuid]=null}async _run(e,t){await this._initWorkers();let i=new Promise((s,n)=>{this.queue.push({id:e,arguments:t,resolve:s,reject:n})});return this.next(),i}next(){if(!this.queue.length)return;let e=this.getWorker();if(!e)return;let t=this.queue.pop(),i=t.id;this.resolveHash[sf]={resolve:t.resolve,reject:t.reject},e.postMessage({data:t.arguments,uuid:sf++,id:i})}},A2=new F2;function Li(r,e,t){let i=new Se(r);return i.baseTexture.on("dispose",()=>{delete e.promiseCache[t]}),i}var eS=[".jpeg",".jpg",".png",".webp",".avif"],tS=["image/jpeg","image/png","image/webp","image/avif"];async function k2(r){let e=await K.ADAPTER.fetch(r);if(!e.ok)throw new Error(`[loadImageBitmap] Failed to fetch ${r}: ${e.status} ${e.statusText}`);let t=await e.blob();return await createImageBitmap(t)}var xs={name:"loadTextures",extension:{type:Z.LoadParser,priority:jt.High},config:{preferWorkers:!0,preferCreateImageBitmap:!0,crossOrigin:"anonymous"},test(r){return Gr(r,tS)||A0(r,eS)},async load(r,e,t){let i=null;globalThis.createImageBitmap&&this.config.preferCreateImageBitmap?this.config.preferWorkers&&await A2.isImageBitmapSupported()?i=await A2.loadImageBitmap(r):i=await k2(r):i=await new Promise(n=>{i=new Image,i.crossOrigin=this.config.crossOrigin,i.src=r,i.complete?n(i):i.onload=()=>{n(i)}});let s=new we(i,{resolution:ae.getResolutionOfUrl(r),...e.data});return s.resource.src=r,Li(s,t,r)},unload(r){r.destroy(!0)}};te.add(xs);var rS=".svg",iS="image/svg+xml",I2={extension:{type:Z.LoadParser,priority:jt.High},name:"loadSVG",test(r){return Gr(r,iS)||A0(r,rS)},async testParse(r){return ms.test(r)},async parse(r,e,t){let i=new ms(r,e?.data?.resourceOptions);await i.load();let s=new we(i,{resolution:ae.getResolutionOfUrl(r),...e?.data});return s.resource.src=r,Li(s,t,r)},async load(r,e){return(await K.ADAPTER.fetch(r)).text()},unload:xs.unload};te.add(I2);var cd=class{constructor(){this._defaultBundleIdentifierOptions={connector:"-",createBundleAssetId:(e,t)=>`${e}${this._bundleIdConnector}${t}`,extractAssetIdFromBundle:(e,t)=>t.replace(`${e}${this._bundleIdConnector}`,"")},this._bundleIdConnector=this._defaultBundleIdentifierOptions.connector,this._createBundleAssetId=this._defaultBundleIdentifierOptions.createBundleAssetId,this._extractAssetIdFromBundle=this._defaultBundleIdentifierOptions.extractAssetIdFromBundle,this._assetMap={},this._preferredOrder=[],this._parsers=[],this._resolverHash={},this._bundles={}}setBundleIdentifier(e){if(this._bundleIdConnector=e.connector??this._bundleIdConnector,this._createBundleAssetId=e.createBundleAssetId??this._createBundleAssetId,this._extractAssetIdFromBundle=e.extractAssetIdFromBundle??this._extractAssetIdFromBundle,this._extractAssetIdFromBundle("foo",this._createBundleAssetId("foo","bar"))!=="bar")throw new Error("[Resolver] GenerateBundleAssetId are not working correctly")}prefer(...e){e.forEach(t=>{this._preferredOrder.push(t),t.priority||(t.priority=Object.keys(t.params))}),this._resolverHash={}}set basePath(e){this._basePath=e}get basePath(){return this._basePath}set rootPath(e){this._rootPath=e}get rootPath(){return this._rootPath}get parsers(){return this._parsers}reset(){this.setBundleIdentifier(this._defaultBundleIdentifierOptions),this._assetMap={},this._preferredOrder=[],this._resolverHash={},this._rootPath=null,this._basePath=null,this._manifest=null,this._bundles={},this._defaultSearchParams=null}setDefaultSearchParams(e){if(typeof e=="string")this._defaultSearchParams=e;else{let t=e;this._defaultSearchParams=Object.keys(t).map(i=>`${encodeURIComponent(i)}=${encodeURIComponent(t[i])}`).join("&")}}addManifest(e){this._manifest&&console.warn("[Resolver] Manifest already exists, this will be overwritten"),this._manifest=e,e.bundles.forEach(t=>{this.addBundle(t.name,t.assets)})}addBundle(e,t){let i=[];Array.isArray(t)?t.forEach(s=>{if(typeof s.name=="string"){let n=this._createBundleAssetId(e,s.name);i.push(n),this.add([s.name,n],s.srcs,s.data)}else{let n=s.name.map(o=>this._createBundleAssetId(e,o));n.forEach(o=>{i.push(o)}),this.add([...s.name,...n],s.srcs)}}):Object.keys(t).forEach(s=>{i.push(this._createBundleAssetId(e,s)),this.add([s,this._createBundleAssetId(e,s)],t[s])}),this._bundles[e]=i}add(e,t,i){let s=U0(e);s.forEach(o=>{this.hasKey(o)&&console.warn(`[Resolver] already has key: ${o} overwriting`)}),Array.isArray(t)||(typeof t=="string"?t=ad(t):t=[t]);let n=t.map(o=>{let a=o;if(typeof o=="string"){let l=!1;for(let c=0;c<this._parsers.length;c++){let h=this._parsers[c];if(h.test(o)){a=h.parse(o),l=!0;break}}l||(a={src:o})}return a.format||(a.format=a.src.split(".").pop()),a.alias||(a.alias=s),(this._basePath||this._rootPath)&&(a.src=ae.path.toAbsolute(a.src,this._basePath,this._rootPath)),a.src=this._appendDefaultSearchParams(a.src),a.data=a.data??i,a});s.forEach(o=>{this._assetMap[o]=n})}resolveBundle(e){let t=vs(e);e=U0(e);let i={};return e.forEach(s=>{let n=this._bundles[s];if(n){let o=this.resolve(n),a={};for(let l in o){let c=o[l];a[this._extractAssetIdFromBundle(s,l)]=c}i[s]=a}}),t?i[e[0]]:i}resolveUrl(e){let t=this.resolve(e);if(typeof e!="string"){let i={};for(let s in t)i[s]=t[s].src;return i}return t.src}resolve(e){let t=vs(e);e=U0(e);let i={};return e.forEach(s=>{if(!this._resolverHash[s])if(this._assetMap[s]){let n=this._assetMap[s],o=this._getPreferredOrder(n),a=n[0];o?.priority.forEach(l=>{o.params[l].forEach(c=>{let h=n.filter(d=>d[l]?d[l]===c:!1);h.length&&(n=h)})}),this._resolverHash[s]=n[0]??a}else{let n=s;(this._basePath||this._rootPath)&&(n=ae.path.toAbsolute(n,this._basePath,this._rootPath)),n=this._appendDefaultSearchParams(n),this._resolverHash[s]={src:n}}i[s]=this._resolverHash[s]}),t?i[e[0]]:i}hasKey(e){return!!this._assetMap[e]}hasBundle(e){return!!this._bundles[e]}_getPreferredOrder(e){for(let t=0;t<e.length;t++){let i=e[0],s=this._preferredOrder.find(n=>n.params.format.includes(i.format));if(s)return s}return this._preferredOrder[0]}_appendDefaultSearchParams(e){if(!this._defaultSearchParams)return e;let t=/\?/.test(e)?"&":"?";return`${e}${t}${this._defaultSearchParams}`}};var ud=class{constructor(){this._detections=[],this._initialized=!1,this.resolver=new cd,this.loader=new ld,this.cache=tn,this._backgroundLoader=new od(this.loader),this._backgroundLoader.active=!0,this.reset()}async init(e={}){if(this._initialized){console.warn("[Assets]AssetManager already initialized, did you load before calling this Asset.init()?");return}if(this._initialized=!0,e.defaultSearchParams&&this.resolver.setDefaultSearchParams(e.defaultSearchParams),e.basePath&&(this.resolver.basePath=e.basePath),e.bundleIdentifier&&this.resolver.setBundleIdentifier(e.bundleIdentifier),e.manifest){let n=e.manifest;typeof n=="string"&&(n=await this.load(n)),this.resolver.addManifest(n)}let t=e.texturePreference?.resolution??1,i=typeof t=="number"?[t]:t,s=[];if(e.texturePreference?.format){let n=e.texturePreference?.format;s=typeof n=="string"?[n]:n;for(let o of this._detections)await o.test()||(s=await o.remove(s))}else for(let n of this._detections)await n.test()&&(s=await n.add(s));this.resolver.prefer({params:{format:s,resolution:i}}),e.preferences&&this.setPreferences(e.preferences)}add(e,t,i){this.resolver.add(e,t,i)}async load(e,t){this._initialized||await this.init();let i=vs(e),s=U0(e).map(a=>typeof a!="string"?(this.resolver.add(a.src,a),a.src):(this.resolver.hasKey(a)||this.resolver.add(a,a),a)),n=this.resolver.resolve(s),o=await this._mapLoadToResolve(n,t);return i?o[s[0]]:o}addBundle(e,t){this.resolver.addBundle(e,t)}async loadBundle(e,t){this._initialized||await this.init();let i=!1;typeof e=="string"&&(i=!0,e=[e]);let s=this.resolver.resolveBundle(e),n={},o=Object.keys(s),a=0,l=0,c=()=>{t?.(++a/l)},h=o.map(d=>{let p=s[d];return l+=Object.keys(p).length,this._mapLoadToResolve(p,c).then(g=>{n[d]=g})});return await Promise.all(h),i?n[e[0]]:n}async backgroundLoad(e){this._initialized||await this.init(),typeof e=="string"&&(e=[e]);let t=this.resolver.resolve(e);this._backgroundLoader.add(Object.values(t))}async backgroundLoadBundle(e){this._initialized||await this.init(),typeof e=="string"&&(e=[e]);let t=this.resolver.resolveBundle(e);Object.values(t).forEach(i=>{this._backgroundLoader.add(Object.values(i))})}reset(){this.resolver.reset(),this.loader.reset(),this.cache.reset(),this._initialized=!1}get(e){if(typeof e=="string")return tn.get(e);let t={};for(let i=0;i<e.length;i++)t[i]=tn.get(e[i]);return t}async _mapLoadToResolve(e,t){let i=Object.values(e),s=Object.keys(e);this._backgroundLoader.active=!1;let n=await this.loader.load(i,t);this._backgroundLoader.active=!0;let o={};return i.forEach((a,l)=>{let c=n[a.src],h=[a.src];a.alias&&h.push(...a.alias),o[s[l]]=c,tn.set(h,c)}),o}async unload(e){this._initialized||await this.init();let t=U0(e).map(s=>typeof s!="string"?s.src:s),i=this.resolver.resolve(t);await this._unloadFromResolved(i)}async unloadBundle(e){this._initialized||await this.init(),e=U0(e);let t=this.resolver.resolveBundle(e),i=Object.keys(t).map(s=>this._unloadFromResolved(t[s]));await Promise.all(i)}async _unloadFromResolved(e){let t=Object.values(e);t.forEach(i=>{tn.remove(i.src)}),await this.loader.unload(t)}get detections(){return this._detections}get preferWorkers(){return xs.config.preferWorkers}set preferWorkers(e){ae.deprecation("7.2.0","Assets.prefersWorkers is deprecated, use Assets.setPreferences({ preferWorkers: true }) instead."),this.setPreferences({preferWorkers:e})}setPreferences(e){this.loader.parsers.forEach(t=>{t.config&&Object.keys(t.config).filter(i=>i in e).forEach(i=>{t.config[i]=e[i]})})}},Ds=new ud;te.handleByList(Z.LoadParser,Ds.loader.parsers).handleByList(Z.ResolveParser,Ds.resolver.parsers).handleByList(Z.CacheParser,Ds.cache.parsers).handleByList(Z.DetectionParser,Ds.detections);var L2={extension:Z.CacheParser,test:r=>Array.isArray(r)&&r.every(e=>e instanceof Se),getCacheableAssets:(r,e)=>{let t={};return r.forEach(i=>{e.forEach((s,n)=>{t[i+(n===0?"":n+1)]=s})}),t}};te.add(L2);var M2={extension:{type:Z.DetectionParser,priority:1},test:async()=>{if(!globalThis.createImageBitmap)return!1;let e=await K.ADAPTER.fetch("data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAAB0AAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAIAAAACAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQ0MAAAAABNjb2xybmNseAACAAIAAYAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAACVtZGF0EgAKCBgANogQEAwgMg8f8D///8WfhwB8+ErK42A=").then(t=>t.blob());return createImageBitmap(e).then(()=>!0,()=>!1)},add:async r=>[...r,"avif"],remove:async r=>r.filter(e=>e!=="avif")};te.add(M2);var N2={extension:{type:Z.DetectionParser,priority:0},test:async()=>{if(!globalThis.createImageBitmap)return!1;let e=await K.ADAPTER.fetch("data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA=").then(t=>t.blob());return createImageBitmap(e).then(()=>!0,()=>!1)},add:async r=>[...r,"webp"],remove:async r=>r.filter(e=>e!=="webp")};te.add(N2);var nf=["png","jpg","jpeg"],P2={extension:{type:Z.DetectionParser,priority:-1},test:()=>Promise.resolve(!0),add:async r=>[...r,...nf],remove:async r=>r.filter(e=>!nf.includes(e))};te.add(P2);var B2={extension:Z.ResolveParser,test:xs.test,parse:r=>({resolution:parseFloat(K.RETINA_PREFIX.exec(r)?.[1]??"1"),format:r.split(".").pop(),src:r})};te.add(B2);var V0=(r=>(r[r.COMPRESSED_RGB_S3TC_DXT1_EXT=33776]="COMPRESSED_RGB_S3TC_DXT1_EXT",r[r.COMPRESSED_RGBA_S3TC_DXT1_EXT=33777]="COMPRESSED_RGBA_S3TC_DXT1_EXT",r[r.COMPRESSED_RGBA_S3TC_DXT3_EXT=33778]="COMPRESSED_RGBA_S3TC_DXT3_EXT",r[r.COMPRESSED_RGBA_S3TC_DXT5_EXT=33779]="COMPRESSED_RGBA_S3TC_DXT5_EXT",r[r.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT=35917]="COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT",r[r.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT=35918]="COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT",r[r.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT=35919]="COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT",r[r.COMPRESSED_SRGB_S3TC_DXT1_EXT=35916]="COMPRESSED_SRGB_S3TC_DXT1_EXT",r[r.COMPRESSED_R11_EAC=37488]="COMPRESSED_R11_EAC",r[r.COMPRESSED_SIGNED_R11_EAC=37489]="COMPRESSED_SIGNED_R11_EAC",r[r.COMPRESSED_RG11_EAC=37490]="COMPRESSED_RG11_EAC",r[r.COMPRESSED_SIGNED_RG11_EAC=37491]="COMPRESSED_SIGNED_RG11_EAC",r[r.COMPRESSED_RGB8_ETC2=37492]="COMPRESSED_RGB8_ETC2",r[r.COMPRESSED_RGBA8_ETC2_EAC=37496]="COMPRESSED_RGBA8_ETC2_EAC",r[r.COMPRESSED_SRGB8_ETC2=37493]="COMPRESSED_SRGB8_ETC2",r[r.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC=37497]="COMPRESSED_SRGB8_ALPHA8_ETC2_EAC",r[r.COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2=37494]="COMPRESSED_RGB8_PUNCHTHROUGH_ALPHA1_ETC2",r[r.COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2=37495]="COMPRESSED_SRGB8_PUNCHTHROUGH_ALPHA1_ETC2",r[r.COMPRESSED_RGB_PVRTC_4BPPV1_IMG=35840]="COMPRESSED_RGB_PVRTC_4BPPV1_IMG",r[r.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG=35842]="COMPRESSED_RGBA_PVRTC_4BPPV1_IMG",r[r.COMPRESSED_RGB_PVRTC_2BPPV1_IMG=35841]="COMPRESSED_RGB_PVRTC_2BPPV1_IMG",r[r.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG=35843]="COMPRESSED_RGBA_PVRTC_2BPPV1_IMG",r[r.COMPRESSED_RGB_ETC1_WEBGL=36196]="COMPRESSED_RGB_ETC1_WEBGL",r[r.COMPRESSED_RGB_ATC_WEBGL=35986]="COMPRESSED_RGB_ATC_WEBGL",r[r.COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL=35986]="COMPRESSED_RGBA_ATC_EXPLICIT_ALPHA_WEBGL",r[r.COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL=34798]="COMPRESSED_RGBA_ATC_INTERPOLATED_ALPHA_WEBGL",r[r.COMPRESSED_RGBA_ASTC_4x4_KHR=37808]="COMPRESSED_RGBA_ASTC_4x4_KHR",r))(V0||{}),rn={33776:.5,33777:.5,33778:1,33779:1,35916:.5,35917:.5,35918:1,35919:1,37488:.5,37489:.5,37490:1,37491:1,37492:.5,37496:1,37493:.5,37497:1,37494:.5,37495:.5,35840:.5,35842:.5,35841:.25,35843:.25,36196:.5,35986:.5,35986:1,34798:1,37808:1};var bs,Ea;function of(){Ea={s3tc:bs.getExtension("WEBGL_compressed_texture_s3tc"),s3tc_sRGB:bs.getExtension("WEBGL_compressed_texture_s3tc_srgb"),etc:bs.getExtension("WEBGL_compressed_texture_etc"),etc1:bs.getExtension("WEBGL_compressed_texture_etc1"),pvrtc:bs.getExtension("WEBGL_compressed_texture_pvrtc")||bs.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc"),atc:bs.getExtension("WEBGL_compressed_texture_atc"),astc:bs.getExtension("WEBGL_compressed_texture_astc")}}var R2={extension:{type:Z.DetectionParser,priority:2},test:async()=>{let e=K.ADAPTER.createCanvas().getContext("webgl");return e?(bs=e,!0):(console.warn("WebGL not available for compressed textures."),!1)},add:async r=>{Ea||of();let e=[];for(let t in Ea)Ea[t]&&e.push(t);return[...e,...r]},remove:async r=>(Ea||of(),r.filter(e=>!(e in Ea)))};te.add(R2);var Sa=class extends Q0{constructor(e,t={width:1,height:1,autoLoad:!0}){let i,s;typeof e=="string"?(i=e,s=new Uint8Array):(i=null,s=e),super(s,t),this.origin=i,this.buffer=s?new $s(s):null,this._load=null,this.loaded=!1,this.origin!==null&&t.autoLoad!==!1&&this.load(),this.origin===null&&this.buffer&&(this._load=Promise.resolve(this),this.loaded=!0,this.onBlobLoaded(this.buffer.rawBinaryData))}onBlobLoaded(e){}load(){return this._load?this._load:(this._load=fetch(this.origin).then(e=>e.blob()).then(e=>e.arrayBuffer()).then(e=>(this.data=new Uint32Array(e),this.buffer=new $s(e),this.loaded=!0,this.onBlobLoaded(e),this.update(),this)),this._load)}};var Es=class r extends Sa{constructor(e,t){super(e,t),this.format=t.format,this.levels=t.levels||1,this._width=t.width,this._height=t.height,this._extension=r._formatToExtension(this.format),(t.levelBuffers||this.buffer)&&(this._levelBuffers=t.levelBuffers||r._createLevelBuffers(e instanceof Uint8Array?e:this.buffer.uint8View,this.format,this.levels,4,4,this.width,this.height))}upload(e,t,i){let s=e.gl;if(!e.context.extensions[this._extension])throw new Error(`${this._extension} textures are not supported on the current machine`);if(!this._levelBuffers)return!1;for(let o=0,a=this.levels;o<a;o++){let{levelID:l,levelWidth:c,levelHeight:h,levelBuffer:d}=this._levelBuffers[o];s.compressedTexImage2D(s.TEXTURE_2D,l,this.format,c,h,0,d)}return!0}onBlobLoaded(){this._levelBuffers=r._createLevelBuffers(this.buffer.uint8View,this.format,this.levels,4,4,this.width,this.height)}static _formatToExtension(e){if(e>=33776&&e<=33779)return"s3tc";if(e>=37488&&e<=37497)return"etc";if(e>=35840&&e<=35843)return"pvrtc";if(e>=36196)return"etc1";if(e>=35986&&e<=34798)return"atc";throw new Error("Invalid (compressed) texture format given!")}static _createLevelBuffers(e,t,i,s,n,o,a){let l=new Array(i),c=e.byteOffset,h=o,d=a,p=h+s-1&~(s-1),g=d+n-1&~(n-1),v=p*g*rn[t];for(let C=0;C<i;C++)l[C]={levelID:C,levelWidth:i>1?h:p,levelHeight:i>1?d:g,levelBuffer:new Uint8Array(e.buffer,c,v)},c+=v,h=h>>1||1,d=d>>1||1,p=h+s-1&~(s-1),g=d+n-1&~(n-1),v=p*g*rn[t];return l}};var O2=4,hd=124,sS=32,af=20,nS=542327876,dd={SIZE:1,FLAGS:2,HEIGHT:3,WIDTH:4,MIPMAP_COUNT:7,PIXEL_FORMAT:19},oS={SIZE:0,FLAGS:1,FOURCC:2,RGB_BITCOUNT:3,R_BIT_MASK:4,G_BIT_MASK:5,B_BIT_MASK:6,A_BIT_MASK:7},pd={DXGI_FORMAT:0,RESOURCE_DIMENSION:1,MISC_FLAG:2,ARRAY_SIZE:3,MISC_FLAGS2:4};var aS=1,lS=2,cS=4,uS=64,hS=512,dS=131072,pS=827611204,fS=861165636,gS=894720068,mS=808540228,yS=4,vS={[pS]:V0.COMPRESSED_RGBA_S3TC_DXT1_EXT,[fS]:V0.COMPRESSED_RGBA_S3TC_DXT3_EXT,[gS]:V0.COMPRESSED_RGBA_S3TC_DXT5_EXT},xS={70:V0.COMPRESSED_RGBA_S3TC_DXT1_EXT,71:V0.COMPRESSED_RGBA_S3TC_DXT1_EXT,73:V0.COMPRESSED_RGBA_S3TC_DXT3_EXT,74:V0.COMPRESSED_RGBA_S3TC_DXT3_EXT,76:V0.COMPRESSED_RGBA_S3TC_DXT5_EXT,77:V0.COMPRESSED_RGBA_S3TC_DXT5_EXT,72:V0.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT,75:V0.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT,78:V0.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT};function fd(r){let e=new Uint32Array(r);if(e[0]!==nS)throw new Error("Invalid DDS file magic word");let i=new Uint32Array(r,0,hd/Uint32Array.BYTES_PER_ELEMENT),s=i[dd.HEIGHT],n=i[dd.WIDTH],o=i[dd.MIPMAP_COUNT],a=new Uint32Array(r,dd.PIXEL_FORMAT*Uint32Array.BYTES_PER_ELEMENT,sS/Uint32Array.BYTES_PER_ELEMENT),l=a[aS];if(l&cS){let c=a[oS.FOURCC];if(c!==mS){let L=vS[c],T=O2+hd,W=new Uint8Array(r,T);return[new Es(W,{format:L,width:n,height:s,levels:o})]}let h=O2+hd,d=new Uint32Array(e.buffer,h,af/Uint32Array.BYTES_PER_ELEMENT),p=d[pd.DXGI_FORMAT],g=d[pd.RESOURCE_DIMENSION],v=d[pd.MISC_FLAG],C=d[pd.ARRAY_SIZE],w=xS[p];if(w===void 0)throw new Error(`DDSParser cannot parse texture data with DXGI format ${p}`);if(v===yS)throw new Error("DDSParser does not support cubemap textures");if(g===6)throw new Error("DDSParser does not supported 3D texture data");let k=new Array,B=O2+hd+af;if(C===1)k.push(new Uint8Array(r,B));else{let L=rn[w],T=0,W=n,j=s;for(let R=0;R<o;R++){let z=Math.max(1,W+3&-4),U=Math.max(1,j+3&-4),q=z*U*L;T+=q,W=W>>>1,j=j>>>1}let I=B;for(let R=0;R<C;R++)k.push(new Uint8Array(r,I,T)),I+=T}return k.map(L=>new Es(L,{format:w,width:n,height:s,levels:o}))}throw l&uS?new Error("DDSParser does not support uncompressed texture data."):l&hS?new Error("DDSParser does not supported YUV uncompressed texture data."):l&dS?new Error("DDSParser does not support single-channel (lumninance) texture data!"):l&lS?new Error("DDSParser does not support single-channel (alpha) texture data!"):new Error("DDSParser failed to load a texture file due to an unknown reason!")}var lf=[171,75,84,88,32,49,49,187,13,10,26,10],DS=67305985,ui={FILE_IDENTIFIER:0,ENDIANNESS:12,GL_TYPE:16,GL_TYPE_SIZE:20,GL_FORMAT:24,GL_INTERNAL_FORMAT:28,GL_BASE_INTERNAL_FORMAT:32,PIXEL_WIDTH:36,PIXEL_HEIGHT:40,PIXEL_DEPTH:44,NUMBER_OF_ARRAY_ELEMENTS:48,NUMBER_OF_FACES:52,NUMBER_OF_MIPMAP_LEVELS:56,BYTES_OF_KEY_VALUE_DATA:60},G2=64,gd={[Ce.UNSIGNED_BYTE]:1,[Ce.UNSIGNED_SHORT]:2,[Ce.INT]:4,[Ce.UNSIGNED_INT]:4,[Ce.FLOAT]:4,[Ce.HALF_FLOAT]:8},U2={[le.RGBA]:4,[le.RGB]:3,[le.RG]:2,[le.RED]:1,[le.LUMINANCE]:1,[le.LUMINANCE_ALPHA]:2,[le.ALPHA]:1},V2={[Ce.UNSIGNED_SHORT_4_4_4_4]:2,[Ce.UNSIGNED_SHORT_5_5_5_1]:2,[Ce.UNSIGNED_SHORT_5_6_5]:2};function md(r,e,t=!1){let i=new DataView(e);if(!bS(r,i))return null;let s=i.getUint32(ui.ENDIANNESS,!0)===DS,n=i.getUint32(ui.GL_TYPE,s),o=i.getUint32(ui.GL_FORMAT,s),a=i.getUint32(ui.GL_INTERNAL_FORMAT,s),l=i.getUint32(ui.PIXEL_WIDTH,s),c=i.getUint32(ui.PIXEL_HEIGHT,s)||1,h=i.getUint32(ui.PIXEL_DEPTH,s)||1,d=i.getUint32(ui.NUMBER_OF_ARRAY_ELEMENTS,s)||1,p=i.getUint32(ui.NUMBER_OF_FACES,s),g=i.getUint32(ui.NUMBER_OF_MIPMAP_LEVELS,s),v=i.getUint32(ui.BYTES_OF_KEY_VALUE_DATA,s);if(c===0||h!==1)throw new Error("Only 2D textures are supported");if(p!==1)throw new Error("CubeTextures are not supported by KTXLoader yet!");if(d!==1)throw new Error("WebGL does not support array textures");let C=4,w=4,k=l+3&-4,B=c+3&-4,L=new Array(d),T=l*c;n===0&&(T=k*B);let W;if(n!==0?gd[n]?W=gd[n]*U2[o]:W=V2[n]:W=rn[a],W===void 0)throw new Error("Unable to resolve the pixel format stored in the *.ktx file!");let j=t?SS(i,v,s):null,R=T*W,z=l,U=c,q=k,re=B,$=G2+v;for(let Q=0;Q<g;Q++){let Te=i.getUint32($,s),ye=$+4;for(let xe=0;xe<d;xe++){let De=L[xe];De||(De=L[xe]=new Array(g)),De[Q]={levelID:Q,levelWidth:g>1||n!==0?z:q,levelHeight:g>1||n!==0?U:re,levelBuffer:new Uint8Array(e,ye,R)},ye+=R}$+=Te+4,$=$%4!==0?$+4-$%4:$,z=z>>1||1,U=U>>1||1,q=z+C-1&~(C-1),re=U+w-1&~(w-1),R=q*re*W}return n!==0?{uncompressed:L.map(Q=>{let Te=Q[0].levelBuffer,ye=!1;return n===Ce.FLOAT?Te=new Float32Array(Q[0].levelBuffer.buffer,Q[0].levelBuffer.byteOffset,Q[0].levelBuffer.byteLength/4):n===Ce.UNSIGNED_INT?(ye=!0,Te=new Uint32Array(Q[0].levelBuffer.buffer,Q[0].levelBuffer.byteOffset,Q[0].levelBuffer.byteLength/4)):n===Ce.INT&&(ye=!0,Te=new Int32Array(Q[0].levelBuffer.buffer,Q[0].levelBuffer.byteOffset,Q[0].levelBuffer.byteLength/4)),{resource:new Q0(Te,{width:Q[0].levelWidth,height:Q[0].levelHeight}),type:n,format:ye?ES(o):o}}),kvData:j}:{compressed:L.map(Q=>new Es(null,{format:a,width:l,height:c,levels:g,levelBuffers:Q})),kvData:j}}function bS(r,e){for(let t=0;t<lf.length;t++)if(e.getUint8(t)!==lf[t])return console.error(`${r} is not a valid *.ktx file!`),!1;return!0}function ES(r){switch(r){case le.RGBA:return le.RGBA_INTEGER;case le.RGB:return le.RGB_INTEGER;case le.RG:return le.RG_INTEGER;case le.RED:return le.RED_INTEGER;default:return r}}function SS(r,e,t){let i=new Map,s=0;for(;s<e;){let n=r.getUint32(G2+s,t),o=G2+s+4,a=3-(n+3)%4;if(n===0||n>e-s){console.error("KTXLoader: keyAndValueByteSize out of bounds");break}let l=0;for(;l<n&&r.getUint8(o+l)!==0;l++);if(l===-1){console.error("KTXLoader: Failed to find null byte terminating kvData key");break}let c=new TextDecoder().decode(new Uint8Array(r.buffer,o,l)),h=new DataView(r.buffer,o+l+1,n-l-1);i.set(c,h),s+=4+n+a}return i}var z2={extension:{type:Z.LoadParser,priority:jt.High},name:"loadDDS",test(r){return A0(r,".dds")},async load(r,e,t){let s=await(await K.ADAPTER.fetch(r)).arrayBuffer(),o=fd(s).map(a=>{let l=new we(a,{mipmap:x0.OFF,alphaMode:Qt.NO_PREMULTIPLIED_ALPHA,resolution:ae.getResolutionOfUrl(r),...e.data});return Li(l,t,r)});return o.length===1?o[0]:o},unload(r){Array.isArray(r)?r.forEach(e=>e.destroy(!0)):r.destroy(!0)}};te.add(z2);var W2={extension:{type:Z.LoadParser,priority:jt.High},name:"loadKTX",test(r){return A0(r,".ktx")},async load(r,e,t){let s=await(await K.ADAPTER.fetch(r)).arrayBuffer(),{compressed:n,uncompressed:o,kvData:a}=md(r,s),l=n??o,c={mipmap:x0.OFF,alphaMode:Qt.NO_PREMULTIPLIED_ALPHA,resolution:ae.getResolutionOfUrl(r),...e.data},h=l.map(d=>{l===o&&Object.assign(c,{type:d.type,format:d.format});let p=new we(d,c);return p.ktxKeyValueData=a,Li(p,t,r)});return h.length===1?h[0]:h},unload(r){Array.isArray(r)?r.forEach(e=>e.destroy(!0)):r.destroy(!0)}};te.add(W2);var H2={extension:Z.ResolveParser,test:r=>{let t=r.split("?")[0].split(".").pop();return["basis","ktx","dds"].includes(t)},parse:r=>{if(r.split("?")[0].split(".").pop()==="ktx"){let i=[".s3tc.ktx",".s3tc_sRGB.ktx",".etc.ktx",".etc1.ktx",".pvrt.ktx",".atc.ktx",".astc.ktx"];if(i.some(s=>r.endsWith(s)))return{resolution:parseFloat(K.RETINA_PREFIX.exec(r)?.[1]??"1"),format:i.find(s=>r.endsWith(s)),src:r}}return{resolution:parseFloat(K.RETINA_PREFIX.exec(r)?.[1]??"1"),format:r.split(".").pop(),src:r}}};te.add(H2);var CS=new Ie,wS=4,Dc=class{constructor(r){this.renderer=r}async image(r,e,t){let i=new Image;return i.src=await this.base64(r,e,t),i}async base64(r,e,t){let i=this.canvas(r);if(i.toBlob!==void 0)return new Promise((s,n)=>{i.toBlob(o=>{if(!o){n(new Error("ICanvas.toBlob failed!"));return}let a=new FileReader;a.onload=()=>s(a.result),a.onerror=n,a.readAsDataURL(o)},e,t)});if(i.toDataURL!==void 0)return i.toDataURL(e,t);if(i.convertToBlob!==void 0){let s=await i.convertToBlob({type:e,quality:t});return new Promise((n,o)=>{let a=new FileReader;a.onload=()=>n(a.result),a.onerror=o,a.readAsDataURL(s)})}throw new Error("Extract.base64() requires ICanvas.toDataURL, ICanvas.toBlob, or ICanvas.convertToBlob to be implemented")}canvas(r,e){let{pixels:t,width:i,height:s,flipY:n}=this._rawPixels(r,e);n&&Dc._flipY(t,i,s),Dc._unpremultiplyAlpha(t);let o=new ae.CanvasRenderTarget(i,s,1),a=new ImageData(new Uint8ClampedArray(t.buffer),i,s);return o.context.putImageData(a,0,0),o.canvas}pixels(r,e){let{pixels:t,width:i,height:s,flipY:n}=this._rawPixels(r,e);return n&&Dc._flipY(t,i,s),Dc._unpremultiplyAlpha(t),t}_rawPixels(r,e){let t=this.renderer;if(!t)throw new Error("The Extract has already been destroyed");let i,s=!1,n,o=!1;if(r&&(r instanceof Or?n=r:(n=t.generateTexture(r,{resolution:t.resolution,multisample:t.multisample}),o=!0)),n){if(i=n.baseTexture.resolution,e=e??n.frame,s=!1,!o){t.renderTexture.bind(n);let d=n.framebuffer.glFramebuffers[t.CONTEXT_UID];d.blitFramebuffer&&t.framebuffer.bind(d.blitFramebuffer)}}else i=t.resolution,e||(e=CS,e.width=t.width/i,e.height=t.height/i),s=!0,t.renderTexture.bind();let a=Math.round(e.width*i),l=Math.round(e.height*i),c=new Uint8Array(wS*a*l),h=t.gl;return h.readPixels(Math.round(e.x*i),Math.round(e.y*i),a,l,h.RGBA,h.UNSIGNED_BYTE,c),o&&n?.destroy(!0),{pixels:c,width:a,height:l,flipY:s}}destroy(){this.renderer=null}static _flipY(r,e,t){let i=e<<2,s=t>>1,n=new Uint8Array(i);for(let o=0;o<s;o++){let a=o*i,l=(t-o-1)*i;n.set(r.subarray(a,a+i)),r.copyWithin(a,l,l+i),r.set(n,l)}}static _unpremultiplyAlpha(r){r instanceof Uint8ClampedArray&&(r=new Uint8Array(r.buffer));let e=r.length;for(let t=0;t<e;t+=4){let i=r[t+3];if(i!==0){let s=255.001/i;r[t]=r[t]*s+.5,r[t+1]=r[t+1]*s+.5,r[t+2]=r[t+2]*s+.5}}}},j2=Dc;j2.extension={name:"extract",type:Z.RendererSystem};te.add(j2);var sn={build(r){let e=r.points,t,i,s,n,o,a;if(r.type===vt.CIRC){let v=r.shape;t=v.x,i=v.y,o=a=v.radius,s=n=0}else if(r.type===vt.ELIP){let v=r.shape;t=v.x,i=v.y,o=v.width,a=v.height,s=n=0}else{let v=r.shape,C=v.width/2,w=v.height/2;t=v.x+C,i=v.y+w,o=a=Math.max(0,Math.min(v.radius,Math.min(C,w))),s=C-o,n=w-a}if(!(o>=0&&a>=0&&s>=0&&n>=0)){e.length=0;return}let l=Math.ceil(2.3*Math.sqrt(o+a)),c=l*8+(s?4:0)+(n?4:0);if(e.length=c,c===0)return;if(l===0){e.length=8,e[0]=e[6]=t+s,e[1]=e[3]=i+n,e[2]=e[4]=t-s,e[5]=e[7]=i-n;return}let h=0,d=l*4+(s?2:0)+2,p=d,g=c;{let v=s+o,C=n,w=t+v,k=t-v,B=i+C;if(e[h++]=w,e[h++]=B,e[--d]=B,e[--d]=k,n){let L=i-C;e[p++]=k,e[p++]=L,e[--g]=L,e[--g]=w}}for(let v=1;v<l;v++){let C=Math.PI/2*(v/l),w=s+Math.cos(C)*o,k=n+Math.sin(C)*a,B=t+w,L=t-w,T=i+k,W=i-k;e[h++]=B,e[h++]=T,e[--d]=T,e[--d]=L,e[p++]=L,e[p++]=W,e[--g]=W,e[--g]=B}{let v=s,C=n+a,w=t+v,k=t-v,B=i+C,L=i-C;e[h++]=w,e[h++]=B,e[--g]=L,e[--g]=w,s&&(e[h++]=k,e[h++]=B,e[--g]=L,e[--g]=k)}},triangulate(r,e){let t=r.points,i=e.points,s=e.indices;if(t.length===0)return;let n=i.length/2,o=n,a,l;if(r.type!==vt.RREC){let h=r.shape;a=h.x,l=h.y}else{let h=r.shape;a=h.x+h.width/2,l=h.y+h.height/2}let c=r.matrix;i.push(r.matrix?c.a*a+c.c*l+c.tx:a,r.matrix?c.b*a+c.d*l+c.ty:l),n++,i.push(t[0],t[1]);for(let h=2;h<t.length;h+=2)i.push(t[h],t[h+1]),s.push(n++,o,n);s.push(o+1,o,n)}};function cf(r,e=!1){let t=r.length;if(t<6)return;let i=0;for(let s=0,n=r[t-2],o=r[t-1];s<t;s+=2){let a=r[s],l=r[s+1];i+=(a-n)*(l+o),n=a,o=l}if(!e&&i>0||e&&i<=0){let s=t/2;for(let n=s+s%2;n<t;n+=2){let o=t-n-2,a=t-n-1,l=n,c=n+1;[r[o],r[l]]=[r[l],r[o]],[r[a],r[c]]=[r[c],r[a]]}}}var Ca={build(r){r.points=r.shape.points.slice()},triangulate(r,e){let t=r.points,i=r.holes,s=e.points,n=e.indices;if(t.length>=6){cf(t,!1);let o=[];for(let c=0;c<i.length;c++){let h=i[c];cf(h.points,!0),o.push(t.length/2),t=t.concat(h.points)}let a=ae.earcut(t,o,2);if(!a)return;let l=s.length/2;for(let c=0;c<a.length;c+=3)n.push(a[c]+l),n.push(a[c+1]+l),n.push(a[c+2]+l);for(let c=0;c<t.length;c++)s.push(t[c])}}};var yd={build(r){let e=r.shape,t=e.x,i=e.y,s=e.width,n=e.height,o=r.points;o.length=0,s>=0&&n>=0&&o.push(t,i,t+s,i,t+s,i+n,t,i+n)},triangulate(r,e){let t=r.points,i=e.points;if(t.length===0)return;let s=i.length/2;i.push(t[0],t[1],t[2],t[3],t[6],t[7],t[4],t[5]),e.indices.push(s,s+1,s+2,s+1,s+2,s+3)}};var vd={build(r){sn.build(r)},triangulate(r,e){sn.triangulate(r,e)}};var z0=(r=>(r.MITER="miter",r.BEVEL="bevel",r.ROUND="round",r))(z0||{}),hi=(r=>(r.BUTT="butt",r.ROUND="round",r.SQUARE="square",r))(hi||{}),Ur={adaptive:!0,maxLength:10,minSegments:8,maxSegments:2048,epsilon:1e-4,_segmentsCount(r,e=20){if(!this.adaptive||!r||isNaN(r))return e;let t=Math.ceil(r/this.maxLength);return t<this.minSegments?t=this.minSegments:t>this.maxSegments&&(t=this.maxSegments),t}};var io=class{static curveTo(e,t,i,s,n,o){let a=o[o.length-2],c=o[o.length-1]-t,h=a-e,d=s-t,p=i-e,g=Math.abs(c*p-h*d);if(g<1e-8||n===0)return(o[o.length-2]!==e||o[o.length-1]!==t)&&o.push(e,t),null;let v=c*c+h*h,C=d*d+p*p,w=c*d+h*p,k=n*Math.sqrt(v)/g,B=n*Math.sqrt(C)/g,L=k*w/v,T=B*w/C,W=k*p+B*h,j=k*d+B*c,I=h*(B+L),R=c*(B+L),z=p*(k+T),U=d*(k+T),q=Math.atan2(R-j,I-W),re=Math.atan2(U-j,z-W);return{cx:W+e,cy:j+t,radius:n,startAngle:q,endAngle:re,anticlockwise:h*d>p*c}}static arc(e,t,i,s,n,o,a,l,c){let h=a-o,d=Ur._segmentsCount(Math.abs(h)*n,Math.ceil(Math.abs(h)/Ys)*40),p=h/(d*2),g=p*2,v=Math.cos(p),C=Math.sin(p),w=d-1,k=w%1/w;for(let B=0;B<=w;++B){let L=B+k*B,T=p+o+g*L,W=Math.cos(T),j=-Math.sin(T);c.push((v*W+C*j)*n+i,(v*-j+C*W)*n+s)}}};var wa=class{constructor(){this.reset()}begin(e,t,i){this.reset(),this.style=e,this.start=t,this.attribStart=i}end(e,t){this.attribSize=t-this.attribStart,this.size=e-this.start}reset(){this.style=null,this.size=0,this.start=0,this.attribStart=0,this.attribSize=0}};var Ta=class r{static curveLength(e,t,i,s,n,o,a,l){let h=0,d=0,p=0,g=0,v=0,C=0,w=0,k=0,B=0,L=0,T=0,W=e,j=t;for(let I=1;I<=10;++I)d=I/10,p=d*d,g=p*d,v=1-d,C=v*v,w=C*v,k=w*e+3*C*d*i+3*v*p*n+g*a,B=w*t+3*C*d*s+3*v*p*o+g*l,L=W-k,T=j-B,W=k,j=B,h+=Math.sqrt(L*L+T*T);return h}static curveTo(e,t,i,s,n,o,a){let l=a[a.length-2],c=a[a.length-1];a.length-=2;let h=Ur._segmentsCount(r.curveLength(l,c,e,t,i,s,n,o)),d=0,p=0,g=0,v=0,C=0;a.push(l,c);for(let w=1,k=0;w<=h;++w)k=w/h,d=1-k,p=d*d,g=p*d,v=k*k,C=v*k,a.push(g*l+3*p*k*e+3*d*v*i+C*n,g*c+3*p*k*t+3*d*v*s+C*o)}};function uf(r,e,t,i,s,n,o,a){let l=r-t*s,c=e-i*s,h=r+t*n,d=e+i*n,p,g;o?(p=i,g=-t):(p=-i,g=t);let v=l+p,C=c+g,w=h+p,k=d+g;return a.push(v,C,w,k),2}function so(r,e,t,i,s,n,o,a){let l=t-r,c=i-e,h=Math.atan2(l,c),d=Math.atan2(s-r,n-e);a&&h<d?h+=Math.PI*2:!a&&h>d&&(d+=Math.PI*2);let p=h,g=d-h,v=Math.abs(g),C=Math.sqrt(l*l+c*c),w=(15*v*Math.sqrt(C)/Math.PI>>0)+1,k=g/w;if(p+=k,a){o.push(r,e,t,i);for(let B=1,L=p;B<w;B++,L+=k)o.push(r,e,r+Math.sin(L)*C,e+Math.cos(L)*C);o.push(r,e,s,n)}else{o.push(t,i,r,e);for(let B=1,L=p;B<w;B++,L+=k)o.push(r+Math.sin(L)*C,e+Math.cos(L)*C,r,e);o.push(s,n,r,e)}return w*2}function TS(r,e){let t=r.shape,i=r.points||t.points.slice(),s=e.closePointEps;if(i.length===0)return;let n=r.lineStyle,o=new Ne(i[0],i[1]),a=new Ne(i[i.length-2],i[i.length-1]),l=t.type!==vt.POLY||t.closeStroke,c=Math.abs(o.x-a.x)<s&&Math.abs(o.y-a.y)<s;if(l){i=i.slice(),c&&(i.pop(),i.pop(),a.set(i[i.length-2],i[i.length-1]));let xe=(o.x+a.x)*.5,De=(a.y+o.y)*.5;i.unshift(xe,De),i.push(xe,De)}let h=e.points,d=i.length/2,p=i.length,g=h.length/2,v=n.width/2,C=v*v,w=n.miterLimit*n.miterLimit,k=i[0],B=i[1],L=i[2],T=i[3],W=0,j=0,I=-(B-T),R=k-L,z=0,U=0,q=Math.sqrt(I*I+R*R);I/=q,R/=q,I*=v,R*=v;let re=n.alignment,$=(1-re)*2,Q=re*2;l||(n.cap===hi.ROUND?p+=so(k-I*($-Q)*.5,B-R*($-Q)*.5,k-I*$,B-R*$,k+I*Q,B+R*Q,h,!0)+2:n.cap===hi.SQUARE&&(p+=uf(k,B,I,R,$,Q,!0,h))),h.push(k-I*$,B-R*$,k+I*Q,B+R*Q);for(let xe=1;xe<d-1;++xe){k=i[(xe-1)*2],B=i[(xe-1)*2+1],L=i[xe*2],T=i[xe*2+1],W=i[(xe+1)*2],j=i[(xe+1)*2+1],I=-(B-T),R=k-L,q=Math.sqrt(I*I+R*R),I/=q,R/=q,I*=v,R*=v,z=-(T-j),U=L-W,q=Math.sqrt(z*z+U*U),z/=q,U/=q,z*=v,U*=v;let De=L-k,_e=B-T,Mt=L-W,rt=j-T,et=De*Mt+_e*rt,gt=_e*Mt-rt*De,Dt=gt<0;if(Math.abs(gt)<.001*Math.abs(et)){h.push(L-I*$,T-R*$,L+I*Q,T+R*Q),et>=0&&(n.join===z0.ROUND?p+=so(L,T,L-I*$,T-R*$,L-z*$,T-U*$,h,!1)+4:p+=2,h.push(L-z*Q,T-U*Q,L+z*$,T+U*$));continue}let I0=(-I+k)*(-R+T)-(-I+L)*(-R+B),de=(-z+W)*(-U+T)-(-z+L)*(-U+j),oe=(De*de-Mt*I0)/gt,ve=(rt*I0-_e*de)/gt,Yt=(oe-L)*(oe-L)+(ve-T)*(ve-T),Ut=L+(oe-L)*$,r0=T+(ve-T)*$,Ft=L-(oe-L)*Q,it=T-(ve-T)*Q,p0=Math.min(De*De+_e*_e,Mt*Mt+rt*rt),i0=Dt?$:Q,C0=p0+i0*i0*C,Zr=Yt<=C0,wt=n.join;if(wt===z0.MITER&&Yt/C>w&&(wt=z0.BEVEL),Zr)switch(wt){case z0.MITER:{h.push(Ut,r0,Ft,it);break}case z0.BEVEL:{Dt?h.push(Ut,r0,L+I*Q,T+R*Q,Ut,r0,L+z*Q,T+U*Q):h.push(L-I*$,T-R*$,Ft,it,L-z*$,T-U*$,Ft,it),p+=2;break}case z0.ROUND:{Dt?(h.push(Ut,r0,L+I*Q,T+R*Q),p+=so(L,T,L+I*Q,T+R*Q,L+z*Q,T+U*Q,h,!0)+4,h.push(Ut,r0,L+z*Q,T+U*Q)):(h.push(L-I*$,T-R*$,Ft,it),p+=so(L,T,L-I*$,T-R*$,L-z*$,T-U*$,h,!1)+4,h.push(L-z*$,T-U*$,Ft,it));break}}else{switch(h.push(L-I*$,T-R*$,L+I*Q,T+R*Q),wt){case z0.MITER:{Dt?h.push(Ft,it,Ft,it):h.push(Ut,r0,Ut,r0),p+=2;break}case z0.ROUND:{Dt?p+=so(L,T,L+I*Q,T+R*Q,L+z*Q,T+U*Q,h,!0)+2:p+=so(L,T,L-I*$,T-R*$,L-z*$,T-U*$,h,!1)+2;break}}h.push(L-z*$,T-U*$,L+z*Q,T+U*Q),p+=2}}k=i[(d-2)*2],B=i[(d-2)*2+1],L=i[(d-1)*2],T=i[(d-1)*2+1],I=-(B-T),R=k-L,q=Math.sqrt(I*I+R*R),I/=q,R/=q,I*=v,R*=v,h.push(L-I*$,T-R*$,L+I*Q,T+R*Q),l||(n.cap===hi.ROUND?p+=so(L-I*($-Q)*.5,T-R*($-Q)*.5,L-I*$,T-R*$,L+I*Q,T+R*Q,h,!1)+2:n.cap===hi.SQUARE&&(p+=uf(L,T,I,R,$,Q,!1,h)));let Te=e.indices,ye=Ur.epsilon*Ur.epsilon;for(let xe=g;xe<p+g-2;++xe)k=h[xe*2],B=h[xe*2+1],L=h[(xe+1)*2],T=h[(xe+1)*2+1],W=h[(xe+2)*2],j=h[(xe+2)*2+1],!(Math.abs(k*(T-j)+L*(j-B)+W*(B-T))<ye)&&Te.push(xe,xe+1,xe+2)}function _S(r,e){let t=0,i=r.shape,s=r.points||i.points,n=i.type!==vt.POLY||i.closeStroke;if(s.length===0)return;let o=e.points,a=e.indices,l=s.length/2,c=o.length/2,h=c;for(o.push(s[0],s[1]),t=1;t<l;t++)o.push(s[t*2],s[t*2+1]),a.push(h,h+1),h++;n&&a.push(h,c)}function bc(r,e){r.lineStyle.native?_S(r,e):TS(r,e)}var _a=class r{static curveLength(e,t,i,s,n,o){let a=e-2*i+n,l=t-2*s+o,c=2*i-2*e,h=2*s-2*t,d=4*(a*a+l*l),p=4*(a*c+l*h),g=c*c+h*h,v=2*Math.sqrt(d+p+g),C=Math.sqrt(d),w=2*d*C,k=2*Math.sqrt(g),B=p/C;return(w*v+C*p*(v-k)+(4*g*d-p*p)*Math.log((2*C+B+v)/(B+k)))/(4*w)}static curveTo(e,t,i,s,n){let o=n[n.length-2],a=n[n.length-1],l=Ur._segmentsCount(r.curveLength(o,a,e,t,i,s)),c=0,h=0;for(let d=1;d<=l;++d){let p=d/l;c=o+(e-o)*p,h=a+(t-a)*p,n.push(c+(e+(i-e)*p-c)*p,h+(t+(s-t)*p-h)*p)}}};var Ec={[vt.POLY]:Ca,[vt.CIRC]:sn,[vt.ELIP]:sn,[vt.RECT]:yd,[vt.RREC]:vd},xd=[],Fa=[];var Aa=class r{constructor(e,t=null,i=null,s=null){this.points=[],this.holes=[],this.shape=e,this.lineStyle=i,this.fillStyle=t,this.matrix=s,this.type=e.type}clone(){return new r(this.shape,this.fillStyle,this.lineStyle,this.matrix)}destroy(){this.shape=null,this.holes.length=0,this.holes=null,this.points.length=0,this.points=null,this.lineStyle=null,this.fillStyle=null}};var ka=new Ne,hf=class extends Wn{constructor(){super(),this.closePointEps=1e-4,this.boundsPadding=0,this.uvsFloat32=null,this.indicesUint16=null,this.batchable=!1,this.points=[],this.colors=[],this.uvs=[],this.indices=[],this.textureIds=[],this.graphicsData=[],this.drawCalls=[],this.batchDirty=-1,this.batches=[],this.dirty=0,this.cacheDirty=-1,this.clearDirty=0,this.shapeIndex=0,this._bounds=new Ai,this.boundsDirty=-1}get bounds(){return this.updateBatches(),this.boundsDirty!==this.dirty&&(this.boundsDirty=this.dirty,this.calculateBounds()),this._bounds}invalidate(){this.boundsDirty=-1,this.dirty++,this.batchDirty++,this.shapeIndex=0,this.points.length=0,this.colors.length=0,this.uvs.length=0,this.indices.length=0,this.textureIds.length=0;for(let r=0;r<this.drawCalls.length;r++)this.drawCalls[r].texArray.clear(),Fa.push(this.drawCalls[r]);this.drawCalls.length=0;for(let r=0;r<this.batches.length;r++){let e=this.batches[r];e.reset(),xd.push(e)}this.batches.length=0}clear(){return this.graphicsData.length>0&&(this.invalidate(),this.clearDirty++,this.graphicsData.length=0),this}drawShape(r,e=null,t=null,i=null){let s=new Aa(r,e,t,i);return this.graphicsData.push(s),this.dirty++,this}drawHole(r,e=null){if(!this.graphicsData.length)return null;let t=new Aa(r,null,null,e),i=this.graphicsData[this.graphicsData.length-1];return t.lineStyle=i.lineStyle,i.holes.push(t),this.dirty++,this}destroy(){super.destroy();for(let r=0;r<this.graphicsData.length;++r)this.graphicsData[r].destroy();this.points.length=0,this.points=null,this.colors.length=0,this.colors=null,this.uvs.length=0,this.uvs=null,this.indices.length=0,this.indices=null,this.indexBuffer.destroy(),this.indexBuffer=null,this.graphicsData.length=0,this.graphicsData=null,this.drawCalls.length=0,this.drawCalls=null,this.batches.length=0,this.batches=null,this._bounds=null}containsPoint(r){let e=this.graphicsData;for(let t=0;t<e.length;++t){let i=e[t];if(i.fillStyle.visible&&i.shape&&(i.matrix?i.matrix.applyInverse(r,ka):ka.copyFrom(r),i.shape.contains(ka.x,ka.y))){let s=!1;if(i.holes){for(let n=0;n<i.holes.length;n++)if(i.holes[n].shape.contains(ka.x,ka.y)){s=!0;break}}if(!s)return!0}}return!1}updateBatches(){if(!this.graphicsData.length){this.batchable=!0;return}if(!this.validateBatching())return;this.cacheDirty=this.dirty;let r=this.uvs,e=this.graphicsData,t=null,i=null;this.batches.length>0&&(t=this.batches[this.batches.length-1],i=t.style);for(let a=this.shapeIndex;a<e.length;a++){this.shapeIndex++;let l=e[a],c=l.fillStyle,h=l.lineStyle;Ec[l.type].build(l),l.matrix&&this.transformPoints(l.points,l.matrix),(c.visible||h.visible)&&this.processHoles(l.holes);for(let p=0;p<2;p++){let g=p===0?c:h;if(!g.visible)continue;let v=g.texture.baseTexture,C=this.indices.length,w=this.points.length/2;v.wrapMode=dr.REPEAT,p===0?this.processFill(l):this.processLine(l);let k=this.points.length/2-w;k!==0&&(t&&!this._compareStyles(i,g)&&(t.end(C,w),t=null),t||(t=xd.pop()||new wa,t.begin(g,C,w),this.batches.push(t),i=g),this.addUvs(this.points,r,g.texture,w,k,g.matrix))}}let s=this.indices.length,n=this.points.length/2;if(t&&t.end(s,n),this.batches.length===0){this.batchable=!0;return}let o=n>65535;this.indicesUint16&&this.indices.length===this.indicesUint16.length&&o===this.indicesUint16.BYTES_PER_ELEMENT>2?this.indicesUint16.set(this.indices):this.indicesUint16=o?new Uint32Array(this.indices):new Uint16Array(this.indices),this.batchable=this.isBatchable(),this.batchable?this.packBatches():this.buildDrawCalls()}_compareStyles(r,e){return!(!r||!e||r.texture.baseTexture!==e.texture.baseTexture||r.color+r.alpha!==e.color+e.alpha||!!r.native!=!!e.native)}validateBatching(){if(this.dirty===this.cacheDirty||!this.graphicsData.length)return!1;for(let r=0,e=this.graphicsData.length;r<e;r++){let t=this.graphicsData[r],i=t.fillStyle,s=t.lineStyle;if(i&&!i.texture.baseTexture.valid||s&&!s.texture.baseTexture.valid)return!1}return!0}packBatches(){this.batchDirty++,this.uvsFloat32=new Float32Array(this.uvs);let r=this.batches;for(let e=0,t=r.length;e<t;e++){let i=r[e];for(let s=0;s<i.size;s++){let n=i.start+s;this.indicesUint16[n]=this.indicesUint16[n]-i.attribStart}}}isBatchable(){if(this.points.length>65535*2)return!1;let r=this.batches;for(let e=0;e<r.length;e++)if(r[e].style.native)return!1;return this.points.length<hf.BATCHABLE_SIZE*2}buildDrawCalls(){let r=++we._globalBatch;for(let h=0;h<this.drawCalls.length;h++)this.drawCalls[h].texArray.clear(),Fa.push(this.drawCalls[h]);this.drawCalls.length=0;let e=this.colors,t=this.textureIds,i=Fa.pop();i||(i=new qs,i.texArray=new Xs),i.texArray.count=0,i.start=0,i.size=0,i.type=K0.TRIANGLES;let s=0,n=null,o=0,a=!1,l=K0.TRIANGLES,c=0;this.drawCalls.push(i);for(let h=0;h<this.batches.length;h++){let d=this.batches[h],p=8,g=d.style,v=g.texture.baseTexture;a!==!!g.native&&(a=!!g.native,l=a?K0.LINES:K0.TRIANGLES,n=null,s=p,r++),n!==v&&(n=v,v._batchEnabled!==r&&(s===p&&(r++,s=0,i.size>0&&(i=Fa.pop(),i||(i=new qs,i.texArray=new Xs),this.drawCalls.push(i)),i.start=c,i.size=0,i.texArray.count=0,i.type=l),v.touched=1,v._batchEnabled=r,v._batchLocation=s,v.wrapMode=dr.REPEAT,i.texArray.elements[i.texArray.count++]=v,s++)),i.size+=d.size,c+=d.size,o=v._batchLocation,this.addColors(e,g.color,g.alpha,d.attribSize,d.attribStart),this.addTextureIds(t,o,d.attribSize,d.attribStart)}we._globalBatch=r,this.packAttributes()}packAttributes(){let r=this.points,e=this.uvs,t=this.colors,i=this.textureIds,s=new ArrayBuffer(r.length*3*4),n=new Float32Array(s),o=new Uint32Array(s),a=0;for(let l=0;l<r.length/2;l++)n[a++]=r[l*2],n[a++]=r[l*2+1],n[a++]=e[l*2],n[a++]=e[l*2+1],o[a++]=t[l],n[a++]=i[l];this._buffer.update(s),this._indexBuffer.update(this.indicesUint16)}processFill(r){r.holes.length?Ca.triangulate(r,this):Ec[r.type].triangulate(r,this)}processLine(r){bc(r,this);for(let e=0;e<r.holes.length;e++)bc(r.holes[e],this)}processHoles(r){for(let e=0;e<r.length;e++){let t=r[e];Ec[t.type].build(t),t.matrix&&this.transformPoints(t.points,t.matrix)}}calculateBounds(){let r=this._bounds;r.clear(),r.addVertexData(this.points,0,this.points.length),r.pad(this.boundsPadding,this.boundsPadding)}transformPoints(r,e){for(let t=0;t<r.length/2;t++){let i=r[t*2],s=r[t*2+1];r[t*2]=e.a*i+e.c*s+e.tx,r[t*2+1]=e.b*i+e.d*s+e.ty}}addColors(r,e,t,i,s=0){let n=Me.shared.setValue(e).toLittleEndianNumber(),o=Me.shared.setValue(n).toPremultiplied(t);r.length=Math.max(r.length,s+i);for(let a=0;a<i;a++)r[s+a]=o}addTextureIds(r,e,t,i=0){r.length=Math.max(r.length,i+t);for(let s=0;s<t;s++)r[i+s]=e}addUvs(r,e,t,i,s,n=null){let o=0,a=e.length,l=t.frame;for(;o<s;){let h=r[(i+o)*2],d=r[(i+o)*2+1];if(n){let p=n.a*h+n.c*d+n.tx;d=n.b*h+n.d*d+n.ty,h=p}o++,e.push(h/l.width,d/l.height)}let c=t.baseTexture;(l.width<c.width||l.height<c.height)&&this.adjustUvs(e,t,a,s)}adjustUvs(r,e,t,i){let s=e.baseTexture,n=1e-6,o=t+i*2,a=e.frame,l=a.width/s.width,c=a.height/s.height,h=a.x/a.width,d=a.y/a.height,p=Math.floor(r[t]+n),g=Math.floor(r[t+1]+n);for(let v=t+2;v<o;v+=2)p=Math.min(p,Math.floor(r[v]+n)),g=Math.min(g,Math.floor(r[v+1]+n));h-=p,d-=g;for(let v=t;v<o;v+=2)r[v]=(r[v]+h)*l,r[v+1]=(r[v+1]+d)*c}},Dd=hf;Dd.BATCHABLE_SIZE=100;var no=class r{constructor(){this.color=16777215,this.alpha=1,this.texture=Se.WHITE,this.matrix=null,this.visible=!1,this.reset()}clone(){let e=new r;return e.color=this.color,e.alpha=this.alpha,e.texture=this.texture,e.matrix=this.matrix,e.visible=this.visible,e}reset(){this.color=16777215,this.alpha=1,this.texture=Se.WHITE,this.matrix=null,this.visible=!1}destroy(){this.texture=null,this.matrix=null}};var Sc=class r extends no{constructor(){super(...arguments),this.width=0,this.alignment=.5,this.native=!1,this.cap=hi.BUTT,this.join=z0.MITER,this.miterLimit=10}clone(){let e=new r;return e.color=this.color,e.alpha=this.alpha,e.texture=this.texture,e.matrix=this.matrix,e.visible=this.visible,e.width=this.width,e.alignment=this.alignment,e.native=this.native,e.cap=this.cap,e.join=this.join,e.miterLimit=this.miterLimit,e}reset(){super.reset(),this.color=0,this.alignment=.5,this.width=0,this.native=!1}};var $2={},bd=class extends tt{constructor(r=null){super(),this.shader=null,this.pluginName="batch",this.currentPath=null,this.batches=[],this.batchTint=-1,this.batchDirty=-1,this.vertexData=null,this._fillStyle=new no,this._lineStyle=new Sc,this._matrix=null,this._holeMode=!1,this.state=D0.for2d(),this._geometry=r||new Dd,this._geometry.refCount++,this._transformID=-1,this._tintColor=new Me(16777215),this.blendMode=ke.NORMAL}get geometry(){return this._geometry}clone(){return this.finishPoly(),new bd(this._geometry)}set blendMode(r){this.state.blendMode=r}get blendMode(){return this.state.blendMode}get tint(){return this._tintColor.value}set tint(r){this._tintColor.setValue(r)}get fill(){return this._fillStyle}get line(){return this._lineStyle}lineStyle(r=null,e=0,t,i=.5,s=!1){return typeof r=="number"&&(r={width:r,color:e,alpha:t,alignment:i,native:s}),this.lineTextureStyle(r)}lineTextureStyle(r){let e={width:0,texture:Se.WHITE,color:r?.texture?16777215:0,matrix:null,alignment:.5,native:!1,cap:hi.BUTT,join:z0.MITER,miterLimit:10};r=Object.assign(e,r),this.normalizeColor(r),this.currentPath&&this.startPoly();let t=r.width>0&&r.alpha>0;return t?(r.matrix&&(r.matrix=r.matrix.clone(),r.matrix.invert()),Object.assign(this._lineStyle,{visible:t},r)):this._lineStyle.reset(),this}startPoly(){if(this.currentPath){let r=this.currentPath.points,e=this.currentPath.points.length;e>2&&(this.drawShape(this.currentPath),this.currentPath=new hs,this.currentPath.closeStroke=!1,this.currentPath.points.push(r[e-2],r[e-1]))}else this.currentPath=new hs,this.currentPath.closeStroke=!1}finishPoly(){this.currentPath&&(this.currentPath.points.length>2?(this.drawShape(this.currentPath),this.currentPath=null):this.currentPath.points.length=0)}moveTo(r,e){return this.startPoly(),this.currentPath.points[0]=r,this.currentPath.points[1]=e,this}lineTo(r,e){this.currentPath||this.moveTo(0,0);let t=this.currentPath.points,i=t[t.length-2],s=t[t.length-1];return(i!==r||s!==e)&&t.push(r,e),this}_initCurve(r=0,e=0){this.currentPath?this.currentPath.points.length===0&&(this.currentPath.points=[r,e]):this.moveTo(r,e)}quadraticCurveTo(r,e,t,i){this._initCurve();let s=this.currentPath.points;return s.length===0&&this.moveTo(0,0),_a.curveTo(r,e,t,i,s),this}bezierCurveTo(r,e,t,i,s,n){return this._initCurve(),Ta.curveTo(r,e,t,i,s,n,this.currentPath.points),this}arcTo(r,e,t,i,s){this._initCurve(r,e);let n=this.currentPath.points,o=io.curveTo(r,e,t,i,s,n);if(o){let{cx:a,cy:l,radius:c,startAngle:h,endAngle:d,anticlockwise:p}=o;this.arc(a,l,c,h,d,p)}return this}arc(r,e,t,i,s,n=!1){if(i===s)return this;if(!n&&s<=i?s+=Ys:n&&i<=s&&(i+=Ys),s-i===0)return this;let a=r+Math.cos(i)*t,l=e+Math.sin(i)*t,c=this._geometry.closePointEps,h=this.currentPath?this.currentPath.points:null;if(h){let d=Math.abs(h[h.length-2]-a),p=Math.abs(h[h.length-1]-l);d<c&&p<c||h.push(a,l)}else this.moveTo(a,l),h=this.currentPath.points;return io.arc(a,l,r,e,t,i,s,n,h),this}beginFill(r=0,e){return this.beginTextureFill({texture:Se.WHITE,color:r,alpha:e})}normalizeColor(r){let e=Me.shared.setValue(r.color??0);r.color=e.toNumber(),r.alpha??(r.alpha=e.alpha)}beginTextureFill(r){let e={texture:Se.WHITE,color:16777215,matrix:null};r=Object.assign(e,r),this.normalizeColor(r),this.currentPath&&this.startPoly();let t=r.alpha>0;return t?(r.matrix&&(r.matrix=r.matrix.clone(),r.matrix.invert()),Object.assign(this._fillStyle,{visible:t},r)):this._fillStyle.reset(),this}endFill(){return this.finishPoly(),this._fillStyle.reset(),this}drawRect(r,e,t,i){return this.drawShape(new Ie(r,e,t,i))}drawRoundedRect(r,e,t,i,s){return this.drawShape(new Hl(r,e,t,i,s))}drawCircle(r,e,t){return this.drawShape(new zl(r,e,t))}drawEllipse(r,e,t,i){return this.drawShape(new Wl(r,e,t,i))}drawPolygon(...r){let e,t=!0,i=r[0];i.points?(t=i.closeStroke,e=i.points):Array.isArray(r[0])?e=r[0]:e=r;let s=new hs(e);return s.closeStroke=t,this.drawShape(s),this}drawShape(r){return this._holeMode?this._geometry.drawHole(r,this._matrix):this._geometry.drawShape(r,this._fillStyle.clone(),this._lineStyle.clone(),this._matrix),this}clear(){return this._geometry.clear(),this._lineStyle.reset(),this._fillStyle.reset(),this._boundsID++,this._matrix=null,this._holeMode=!1,this.currentPath=null,this}isFastRect(){let r=this._geometry.graphicsData;return r.length===1&&r[0].shape.type===vt.RECT&&!r[0].matrix&&!r[0].holes.length&&!(r[0].lineStyle.visible&&r[0].lineStyle.width)}_render(r){this.finishPoly();let e=this._geometry;e.updateBatches(),e.batchable?(this.batchDirty!==e.batchDirty&&this._populateBatches(),this._renderBatched(r)):(r.batch.flush(),this._renderDirect(r))}_populateBatches(){let r=this._geometry,e=this.blendMode,t=r.batches.length;this.batchTint=-1,this._transformID=-1,this.batchDirty=r.batchDirty,this.batches.length=t,this.vertexData=new Float32Array(r.points);for(let i=0;i<t;i++){let s=r.batches[i],n=s.style.color,o=new Float32Array(this.vertexData.buffer,s.attribStart*4*2,s.attribSize*2),a=new Float32Array(r.uvsFloat32.buffer,s.attribStart*4*2,s.attribSize*2),l=new Uint16Array(r.indicesUint16.buffer,s.start*2,s.size),c={vertexData:o,blendMode:e,indices:l,uvs:a,_batchRGB:Me.shared.setValue(n).toRgbArray(),_tintRGB:n,_texture:s.style.texture,alpha:s.style.alpha,worldAlpha:1};this.batches[i]=c}}_renderBatched(r){if(this.batches.length){r.batch.setObjectRenderer(r.plugins[this.pluginName]),this.calculateVertices(),this.calculateTints();for(let e=0,t=this.batches.length;e<t;e++){let i=this.batches[e];i.worldAlpha=this.worldAlpha*i.alpha,r.plugins[this.pluginName].render(i)}}}_renderDirect(r){let e=this._resolveDirectShader(r),t=this._geometry,i=this.worldAlpha,s=e.uniforms,n=t.drawCalls;s.translationMatrix=this.transform.worldTransform,Me.shared.setValue(this._tintColor).premultiply(i).toArray(s.tint),r.shader.bind(e),r.geometry.bind(t,e),r.state.set(this.state);for(let o=0,a=n.length;o<a;o++)this._renderDrawCallDirect(r,t.drawCalls[o])}_renderDrawCallDirect(r,e){let{texArray:t,type:i,size:s,start:n}=e,o=t.count;for(let a=0;a<o;a++)r.texture.bind(t.elements[a],a);r.geometry.draw(i,s,n)}_resolveDirectShader(r){let e=this.shader,t=this.pluginName;if(!e){if(!$2[t]){let{maxTextures:i}=r.plugins[t],s=new Int32Array(i);for(let a=0;a<i;a++)s[a]=a;let n={tint:new Float32Array([1,1,1,1]),translationMatrix:new je,default:G0.from({uSamplers:s},!0)},o=r.plugins[t]._shader.program;$2[t]=new b0(o,n)}e=$2[t]}return e}_calculateBounds(){this.finishPoly();let r=this._geometry;if(!r.graphicsData.length)return;let{minX:e,minY:t,maxX:i,maxY:s}=r.bounds;this._bounds.addFrame(this.transform,e,t,i,s)}containsPoint(r){return this.worldTransform.applyInverse(r,bd._TEMP_POINT),this._geometry.containsPoint(bd._TEMP_POINT)}calculateTints(){if(this.batchTint!==this.tint){this.batchTint=this._tintColor.toNumber();for(let r=0;r<this.batches.length;r++){let e=this.batches[r];e._tintRGB=Me.shared.setValue(this._tintColor).multiply(e._batchRGB).toLittleEndianNumber()}}}calculateVertices(){let r=this.transform._worldID;if(this._transformID===r)return;this._transformID=r;let e=this.transform.worldTransform,t=e.a,i=e.b,s=e.c,n=e.d,o=e.tx,a=e.ty,l=this._geometry.points,c=this.vertexData,h=0;for(let d=0;d<l.length;d+=2){let p=l[d],g=l[d+1];c[h++]=t*p+s*g+o,c[h++]=n*g+i*p+a}}closePath(){let r=this.currentPath;return r&&(r.closeStroke=!0,this.finishPoly()),this}setMatrix(r){return this._matrix=r,this}beginHole(){return this.finishPoly(),this._holeMode=!0,this}endHole(){return this.finishPoly(),this._holeMode=!1,this}destroy(r){this._geometry.refCount--,this._geometry.refCount===0&&this._geometry.dispose(),this._matrix=null,this.currentPath=null,this._lineStyle.destroy(),this._lineStyle=null,this._fillStyle.destroy(),this._fillStyle=null,this._geometry=null,this.shader=null,this.vertexData=null,this.batches.length=0,this.batches=null,super.destroy(r)}},lt=bd;lt.curves=Ur;lt._TEMP_POINT=new Ne;var Cc=class{constructor(e,t){this.uvBuffer=e,this.uvMatrix=t,this.data=null,this._bufferUpdateId=-1,this._textureUpdateId=-1,this._updateID=0}update(e){if(!e&&this._bufferUpdateId===this.uvBuffer._updateID&&this._textureUpdateId===this.uvMatrix._updateID)return;this._bufferUpdateId=this.uvBuffer._updateID,this._textureUpdateId=this.uvMatrix._updateID;let t=this.uvBuffer.data;(!this.data||this.data.length!==t.length)&&(this.data=new Float32Array(t.length)),this.uvMatrix.multiplyUvs(t,this.data),this._updateID++}};var q2=new Ne,df=new hs,pf=class extends tt{constructor(r,e,t,i=K0.TRIANGLES){super(),this.geometry=r,this.shader=e,this.state=t||D0.for2d(),this.drawMode=i,this.start=0,this.size=0,this.uvs=null,this.indices=null,this.vertexData=new Float32Array(1),this.vertexDirty=-1,this._transformID=-1,this._roundPixels=K.ROUND_PIXELS,this.batchUvs=null}get geometry(){return this._geometry}set geometry(r){this._geometry!==r&&(this._geometry&&(this._geometry.refCount--,this._geometry.refCount===0&&this._geometry.dispose()),this._geometry=r,this._geometry&&this._geometry.refCount++,this.vertexDirty=-1)}get uvBuffer(){return this.geometry.buffers[1]}get verticesBuffer(){return this.geometry.buffers[0]}set material(r){this.shader=r}get material(){return this.shader}set blendMode(r){this.state.blendMode=r}get blendMode(){return this.state.blendMode}set roundPixels(r){this._roundPixels!==r&&(this._transformID=-1),this._roundPixels=r}get roundPixels(){return this._roundPixels}get tint(){return"tint"in this.shader?this.shader.tint:null}set tint(r){this.shader.tint=r}get tintValue(){return this.shader.tintValue}get texture(){return"texture"in this.shader?this.shader.texture:null}set texture(r){this.shader.texture=r}_render(r){let e=this.geometry.buffers[0].data;this.shader.batchable&&this.drawMode===K0.TRIANGLES&&e.length<pf.BATCHABLE_SIZE*2?this._renderToBatch(r):this._renderDefault(r)}_renderDefault(r){let e=this.shader;e.alpha=this.worldAlpha,e.update&&e.update(),r.batch.flush(),e.uniforms.translationMatrix=this.transform.worldTransform.toArray(!0),r.shader.bind(e),r.state.set(this.state),r.geometry.bind(this.geometry,e),r.geometry.draw(this.drawMode,this.size,this.start,this.geometry.instanceCount)}_renderToBatch(r){let e=this.geometry,t=this.shader;t.uvMatrix&&(t.uvMatrix.update(),this.calculateUvs()),this.calculateVertices(),this.indices=e.indexBuffer.data,this._tintRGB=t._tintRGB,this._texture=t.texture;let i=this.material.pluginName;r.batch.setObjectRenderer(r.plugins[i]),r.plugins[i].render(this)}calculateVertices(){let e=this.geometry.buffers[0],t=e.data,i=e._updateID;if(i===this.vertexDirty&&this._transformID===this.transform._worldID)return;this._transformID=this.transform._worldID,this.vertexData.length!==t.length&&(this.vertexData=new Float32Array(t.length));let s=this.transform.worldTransform,n=s.a,o=s.b,a=s.c,l=s.d,c=s.tx,h=s.ty,d=this.vertexData;for(let p=0;p<d.length/2;p++){let g=t[p*2],v=t[p*2+1];d[p*2]=n*g+a*v+c,d[p*2+1]=o*g+l*v+h}if(this._roundPixels){let p=K.RESOLUTION;for(let g=0;g<d.length;++g)d[g]=Math.round(d[g]*p)/p}this.vertexDirty=i}calculateUvs(){let r=this.geometry.buffers[1],e=this.shader;e.uvMatrix.isSimple?this.uvs=r.data:(this.batchUvs||(this.batchUvs=new Cc(r,e.uvMatrix)),this.batchUvs.update(),this.uvs=this.batchUvs.data)}_calculateBounds(){this.calculateVertices(),this._bounds.addVertexData(this.vertexData,0,this.vertexData.length)}containsPoint(r){if(!this.getBounds().contains(r.x,r.y))return!1;this.worldTransform.applyInverse(r,q2);let e=this.geometry.getBuffer("aVertexPosition").data,t=df.points,i=this.geometry.getIndex().data,s=i.length,n=this.drawMode===4?3:1;for(let o=0;o+2<s;o+=n){let a=i[o]*2,l=i[o+1]*2,c=i[o+2]*2;if(t[0]=e[a],t[1]=e[a+1],t[2]=e[l],t[3]=e[l+1],t[4]=e[c],t[5]=e[c+1],df.contains(q2.x,q2.y))return!0}return!1}destroy(r){super.destroy(r),this._cachedTexture&&(this._cachedTexture.destroy(),this._cachedTexture=null),this.geometry=null,this.shader=null,this.state=null,this.uvs=null,this.indices=null,this.vertexData=null}},nn=pf;nn.BATCHABLE_SIZE=100;var on=class extends gr{constructor(e,t,i){super();let s=new ft(e),n=new ft(t,!0),o=new ft(i,!0,!0);this.addAttribute("aVertexPosition",s,2,!1,Ce.FLOAT).addAttribute("aTextureCoord",n,2,!1,Ce.FLOAT).addIndex(o),this._updateId=-1}get vertexDirtyId(){return this.buffers[0]._updateID}};var ff=`varying vec2 vTextureCoord;
|
|
uniform vec4 uColor;
|
|
|
|
uniform sampler2D uSampler;
|
|
|
|
void main(void)
|
|
{
|
|
gl_FragColor = texture2D(uSampler, vTextureCoord) * uColor;
|
|
}
|
|
`;var gf=`attribute vec2 aVertexPosition;
|
|
attribute vec2 aTextureCoord;
|
|
|
|
uniform mat3 projectionMatrix;
|
|
uniform mat3 translationMatrix;
|
|
uniform mat3 uTextureMatrix;
|
|
|
|
varying vec2 vTextureCoord;
|
|
|
|
void main(void)
|
|
{
|
|
gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
|
|
|
vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;
|
|
}
|
|
`;var Ss=class extends b0{constructor(e,t){let i={uSampler:e,alpha:1,uTextureMatrix:je.IDENTITY,uColor:new Float32Array([1,1,1,1])};t=Object.assign({tint:16777215,alpha:1,pluginName:"batch"},t),t.uniforms&&Object.assign(i,t.uniforms),super(t.program||u0.from(gf,ff),i),this._colorDirty=!1,this.uvMatrix=new Qs(e),this.batchable=t.program===void 0,this.pluginName=t.pluginName,this._tintColor=new Me(t.tint),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0,this.alpha=t.alpha}get texture(){return this.uniforms.uSampler}set texture(e){this.uniforms.uSampler!==e&&(!this.uniforms.uSampler.baseTexture.alphaMode!=!e.baseTexture.alphaMode&&(this._colorDirty=!0),this.uniforms.uSampler=e,this.uvMatrix.texture=e)}set alpha(e){e!==this._alpha&&(this._alpha=e,this._colorDirty=!0)}get alpha(){return this._alpha}set tint(e){e!==this.tint&&(this._tintColor.setValue(e),this._tintRGB=this._tintColor.toLittleEndianNumber(),this._colorDirty=!0)}get tint(){return this._tintColor.value}get tintValue(){return this._tintColor.toNumber()}update(){if(this._colorDirty){this._colorDirty=!1;let t=this.texture.baseTexture.alphaMode;Me.shared.setValue(this._tintColor).premultiply(this._alpha,t).toArray(this.uniforms.uColor)}this.uvMatrix.update()&&(this.uniforms.uTextureMatrix=this.uvMatrix.mapCoord)}};var wc=class{constructor(e,t,i){this.geometry=new gr,this.indexBuffer=null,this.size=i,this.dynamicProperties=[],this.staticProperties=[];for(let s=0;s<e.length;++s){let n=e[s];n={attributeName:n.attributeName,size:n.size,uploadFunction:n.uploadFunction,type:n.type||Ce.FLOAT,offset:n.offset},t[s]?this.dynamicProperties.push(n):this.staticProperties.push(n)}this.staticStride=0,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.dynamicStride=0,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this._updateID=0,this.initBuffers()}initBuffers(){let e=this.geometry,t=0;this.indexBuffer=new ft(ae.createIndicesForQuads(this.size),!0,!0),e.addIndex(this.indexBuffer),this.dynamicStride=0;for(let o=0;o<this.dynamicProperties.length;++o){let a=this.dynamicProperties[o];a.offset=t,t+=a.size,this.dynamicStride+=a.size}let i=new ArrayBuffer(this.size*this.dynamicStride*4*4);this.dynamicData=new Float32Array(i),this.dynamicDataUint32=new Uint32Array(i),this.dynamicBuffer=new ft(this.dynamicData,!1,!1);let s=0;this.staticStride=0;for(let o=0;o<this.staticProperties.length;++o){let a=this.staticProperties[o];a.offset=s,s+=a.size,this.staticStride+=a.size}let n=new ArrayBuffer(this.size*this.staticStride*4*4);this.staticData=new Float32Array(n),this.staticDataUint32=new Uint32Array(n),this.staticBuffer=new ft(this.staticData,!0,!1);for(let o=0;o<this.dynamicProperties.length;++o){let a=this.dynamicProperties[o];e.addAttribute(a.attributeName,this.dynamicBuffer,0,a.type===Ce.UNSIGNED_BYTE,a.type,this.dynamicStride*4,a.offset*4)}for(let o=0;o<this.staticProperties.length;++o){let a=this.staticProperties[o];e.addAttribute(a.attributeName,this.staticBuffer,0,a.type===Ce.UNSIGNED_BYTE,a.type,this.staticStride*4,a.offset*4)}}uploadDynamic(e,t,i){for(let s=0;s<this.dynamicProperties.length;s++){let n=this.dynamicProperties[s];n.uploadFunction(e,t,i,n.type===Ce.UNSIGNED_BYTE?this.dynamicDataUint32:this.dynamicData,this.dynamicStride,n.offset)}this.dynamicBuffer._updateID++}uploadStatic(e,t,i){for(let s=0;s<this.staticProperties.length;s++){let n=this.staticProperties[s];n.uploadFunction(e,t,i,n.type===Ce.UNSIGNED_BYTE?this.staticDataUint32:this.staticData,this.staticStride,n.offset)}this.staticBuffer._updateID++}destroy(){this.indexBuffer=null,this.dynamicProperties=null,this.dynamicBuffer=null,this.dynamicData=null,this.dynamicDataUint32=null,this.staticProperties=null,this.staticBuffer=null,this.staticData=null,this.staticDataUint32=null,this.geometry.destroy()}};var mf=`varying vec2 vTextureCoord;
|
|
varying vec4 vColor;
|
|
|
|
uniform sampler2D uSampler;
|
|
|
|
void main(void){
|
|
vec4 color = texture2D(uSampler, vTextureCoord) * vColor;
|
|
gl_FragColor = color;
|
|
}`;var yf=`attribute vec2 aVertexPosition;
|
|
attribute vec2 aTextureCoord;
|
|
attribute vec4 aColor;
|
|
|
|
attribute vec2 aPositionCoord;
|
|
attribute float aRotation;
|
|
|
|
uniform mat3 translationMatrix;
|
|
uniform vec4 uColor;
|
|
|
|
varying vec2 vTextureCoord;
|
|
varying vec4 vColor;
|
|
|
|
void main(void){
|
|
float x = (aVertexPosition.x) * cos(aRotation) - (aVertexPosition.y) * sin(aRotation);
|
|
float y = (aVertexPosition.x) * sin(aRotation) + (aVertexPosition.y) * cos(aRotation);
|
|
|
|
vec2 v = vec2(x, y);
|
|
v = v + aPositionCoord;
|
|
|
|
gl_Position = vec4((translationMatrix * vec3(v, 1.0)).xy, 0.0, 1.0);
|
|
|
|
vTextureCoord = aTextureCoord;
|
|
vColor = aColor * uColor;
|
|
}
|
|
`;var Tc=class extends ai{constructor(e){super(e),this.shader=null,this.properties=null,this.tempMatrix=new je,this.properties=[{attributeName:"aVertexPosition",size:2,uploadFunction:this.uploadVertices,offset:0},{attributeName:"aPositionCoord",size:2,uploadFunction:this.uploadPosition,offset:0},{attributeName:"aRotation",size:1,uploadFunction:this.uploadRotation,offset:0},{attributeName:"aTextureCoord",size:2,uploadFunction:this.uploadUvs,offset:0},{attributeName:"aColor",size:1,type:Ce.UNSIGNED_BYTE,uploadFunction:this.uploadTint,offset:0}],this.shader=b0.from(yf,mf,{}),this.state=D0.for2d()}render(e){let t=e.children,i=e._maxSize,s=e._batchSize,n=this.renderer,o=t.length;if(o===0)return;o>i&&!e.autoResize&&(o=i);let a=e._buffers;a||(a=e._buffers=this.generateBuffers(e));let l=t[0]._texture.baseTexture,c=l.alphaMode>0;this.state.blendMode=ae.correctBlendMode(e.blendMode,c),n.state.set(this.state);let h=n.gl,d=e.worldTransform.copyTo(this.tempMatrix);d.prepend(n.globalUniforms.uniforms.projectionMatrix),this.shader.uniforms.translationMatrix=d.toArray(!0),this.shader.uniforms.uColor=Me.shared.setValue(e.tintRgb).premultiply(e.worldAlpha,c).toArray(this.shader.uniforms.uColor),this.shader.uniforms.uSampler=l,this.renderer.shader.bind(this.shader);let p=!1;for(let g=0,v=0;g<o;g+=s,v+=1){let C=o-g;C>s&&(C=s),v>=a.length&&a.push(this._generateOneMoreBuffer(e));let w=a[v];w.uploadDynamic(t,g,C);let k=e._bufferUpdateIDs[v]||0;p=p||w._updateID<k,p&&(w._updateID=e._updateID,w.uploadStatic(t,g,C)),n.geometry.bind(w.geometry),h.drawElements(h.TRIANGLES,C*6,h.UNSIGNED_SHORT,0)}}generateBuffers(e){let t=[],i=e._maxSize,s=e._batchSize,n=e._properties;for(let o=0;o<i;o+=s)t.push(new wc(this.properties,n,s));return t}_generateOneMoreBuffer(e){let t=e._batchSize,i=e._properties;return new wc(this.properties,i,t)}uploadVertices(e,t,i,s,n,o){let a=0,l=0,c=0,h=0;for(let d=0;d<i;++d){let p=e[t+d],g=p._texture,v=p.scale.x,C=p.scale.y,w=g.trim,k=g.orig;w?(l=w.x-p.anchor.x*k.width,a=l+w.width,h=w.y-p.anchor.y*k.height,c=h+w.height):(a=k.width*(1-p.anchor.x),l=k.width*-p.anchor.x,c=k.height*(1-p.anchor.y),h=k.height*-p.anchor.y),s[o]=l*v,s[o+1]=h*C,s[o+n]=a*v,s[o+n+1]=h*C,s[o+n*2]=a*v,s[o+n*2+1]=c*C,s[o+n*3]=l*v,s[o+n*3+1]=c*C,o+=n*4}}uploadPosition(e,t,i,s,n,o){for(let a=0;a<i;a++){let l=e[t+a].position;s[o]=l.x,s[o+1]=l.y,s[o+n]=l.x,s[o+n+1]=l.y,s[o+n*2]=l.x,s[o+n*2+1]=l.y,s[o+n*3]=l.x,s[o+n*3+1]=l.y,o+=n*4}}uploadRotation(e,t,i,s,n,o){for(let a=0;a<i;a++){let l=e[t+a].rotation;s[o]=l,s[o+n]=l,s[o+n*2]=l,s[o+n*3]=l,o+=n*4}}uploadUvs(e,t,i,s,n,o){for(let a=0;a<i;++a){let l=e[t+a]._texture._uvs;l?(s[o]=l.x0,s[o+1]=l.y0,s[o+n]=l.x1,s[o+n+1]=l.y1,s[o+n*2]=l.x2,s[o+n*2+1]=l.y2,s[o+n*3]=l.x3,s[o+n*3+1]=l.y3,o+=n*4):(s[o]=0,s[o+1]=0,s[o+n]=0,s[o+n+1]=0,s[o+n*2]=0,s[o+n*2+1]=0,s[o+n*3]=0,s[o+n*3+1]=0,o+=n*4)}}uploadTint(e,t,i,s,n,o){for(let a=0;a<i;++a){let l=e[t+a],c=Me.shared.setValue(l._tintRGB).toPremultiplied(l.alpha,l.texture.baseTexture.alphaMode>0);s[o]=c,s[o+n]=c,s[o+n*2]=c,s[o+n*3]=c,o+=n*4}}destroy(){super.destroy(),this.shader&&(this.shader.destroy(),this.shader=null),this.tempMatrix=null}};Tc.extension={name:"particle",type:Z.RendererPlugin};te.add(Tc);var an=(r=>(r[r.LINEAR_VERTICAL=0]="LINEAR_VERTICAL",r[r.LINEAR_HORIZONTAL=1]="LINEAR_HORIZONTAL",r))(an||{});var Ed={willReadFrequently:!0},Ae=class{static get experimentalLetterSpacingSupported(){let r=Ae._experimentalLetterSpacingSupported;if(r!==void 0){let e=K.ADAPTER.getCanvasRenderingContext2D().prototype;r=Ae._experimentalLetterSpacingSupported="letterSpacing"in e||"textLetterSpacing"in e}return r}constructor(r,e,t,i,s,n,o,a,l){this.text=r,this.style=e,this.width=t,this.height=i,this.lines=s,this.lineWidths=n,this.lineHeight=o,this.maxLineWidth=a,this.fontProperties=l}static measureText(r,e,t,i=Ae._canvas){t=t??e.wordWrap;let s=e.toFontString(),n=Ae.measureFont(s);n.fontSize===0&&(n.fontSize=e.fontSize,n.ascent=e.fontSize);let o=i.getContext("2d",Ed);o.font=s;let l=(t?Ae.wordWrap(r,e,i):r).split(/(?:\r\n|\r|\n)/),c=new Array(l.length),h=0;for(let v=0;v<l.length;v++){let C=Ae._measureText(l[v],e.letterSpacing,o);c[v]=C,h=Math.max(h,C)}let d=h+e.strokeThickness;e.dropShadow&&(d+=e.dropShadowDistance);let p=e.lineHeight||n.fontSize+e.strokeThickness,g=Math.max(p,n.fontSize+e.strokeThickness*2)+(l.length-1)*(p+e.leading);return e.dropShadow&&(g+=e.dropShadowDistance),new Ae(r,e,d,g,l,c,p+e.leading,h,n)}static _measureText(r,e,t){let i=!1;Ae.experimentalLetterSpacingSupported&&(Ae.experimentalLetterSpacing?(t.letterSpacing=`${e}px`,t.textLetterSpacing=`${e}px`,i=!0):(t.letterSpacing="0px",t.textLetterSpacing="0px"));let s=t.measureText(r).width;return s>0&&(i?s-=e:s+=(Ae.graphemeSegmenter(r).length-1)*e),s}static wordWrap(r,e,t=Ae._canvas){let i=t.getContext("2d",Ed),s=0,n="",o="",a=Object.create(null),{letterSpacing:l,whiteSpace:c}=e,h=Ae.collapseSpaces(c),d=Ae.collapseNewlines(c),p=!h,g=e.wordWrapWidth+l,v=Ae.tokenize(r);for(let C=0;C<v.length;C++){let w=v[C];if(Ae.isNewline(w)){if(!d){o+=Ae.addLine(n),p=!h,n="",s=0;continue}w=" "}if(h){let B=Ae.isBreakingSpace(w),L=Ae.isBreakingSpace(n[n.length-1]);if(B&&L)continue}let k=Ae.getFromCache(w,l,a,i);if(k>g)if(n!==""&&(o+=Ae.addLine(n),n="",s=0),Ae.canBreakWords(w,e.breakWords)){let B=Ae.wordWrapSplit(w);for(let L=0;L<B.length;L++){let T=B[L],W=T,j=1;for(;B[L+j];){let R=B[L+j];if(!Ae.canBreakChars(W,R,w,L,e.breakWords))T+=R;else break;W=R,j++}L+=j-1;let I=Ae.getFromCache(T,l,a,i);I+s>g&&(o+=Ae.addLine(n),p=!1,n="",s=0),n+=T,s+=I}}else{n.length>0&&(o+=Ae.addLine(n),n="",s=0);let B=C===v.length-1;o+=Ae.addLine(w,!B),p=!1,n="",s=0}else k+s>g&&(p=!1,o+=Ae.addLine(n),n="",s=0),(n.length>0||!Ae.isBreakingSpace(w)||p)&&(n+=w,s+=k)}return o+=Ae.addLine(n,!1),o}static addLine(r,e=!0){return r=Ae.trimRight(r),r=e?`${r}
|
|
`:r,r}static getFromCache(r,e,t,i){let s=t[r];return typeof s!="number"&&(s=Ae._measureText(r,e,i)+e,t[r]=s),s}static collapseSpaces(r){return r==="normal"||r==="pre-line"}static collapseNewlines(r){return r==="normal"}static trimRight(r){if(typeof r!="string")return"";for(let e=r.length-1;e>=0;e--){let t=r[e];if(!Ae.isBreakingSpace(t))break;r=r.slice(0,-1)}return r}static isNewline(r){return typeof r!="string"?!1:Ae._newlines.includes(r.charCodeAt(0))}static isBreakingSpace(r,e){return typeof r!="string"?!1:Ae._breakingSpaces.includes(r.charCodeAt(0))}static tokenize(r){let e=[],t="";if(typeof r!="string")return e;for(let i=0;i<r.length;i++){let s=r[i],n=r[i+1];if(Ae.isBreakingSpace(s,n)||Ae.isNewline(s)){t!==""&&(e.push(t),t=""),e.push(s);continue}t+=s}return t!==""&&e.push(t),e}static canBreakWords(r,e){return e}static canBreakChars(r,e,t,i,s){return!0}static wordWrapSplit(r){return Ae.graphemeSegmenter(r)}static measureFont(r){if(Ae._fonts[r])return Ae._fonts[r];let e={ascent:0,descent:0,fontSize:0},t=Ae._canvas,i=Ae._context;i.font=r;let s=Ae.METRICS_STRING+Ae.BASELINE_SYMBOL,n=Math.ceil(i.measureText(s).width),o=Math.ceil(i.measureText(Ae.BASELINE_SYMBOL).width),a=Math.ceil(Ae.HEIGHT_MULTIPLIER*o);if(o=o*Ae.BASELINE_MULTIPLIER|0,n===0||a===0)return Ae._fonts[r]=e,e;t.width=n,t.height=a,i.fillStyle="#f00",i.fillRect(0,0,n,a),i.font=r,i.textBaseline="alphabetic",i.fillStyle="#000",i.fillText(s,0,o);let l=i.getImageData(0,0,n,a).data,c=l.length,h=n*4,d=0,p=0,g=!1;for(d=0;d<o;++d){for(let v=0;v<h;v+=4)if(l[p+v]!==255){g=!0;break}if(!g)p+=h;else break}for(e.ascent=o-d,p=c-h,g=!1,d=a;d>o;--d){for(let v=0;v<h;v+=4)if(l[p+v]!==255){g=!0;break}if(!g)p-=h;else break}return e.descent=d-o,e.fontSize=e.ascent+e.descent,Ae._fonts[r]=e,e}static clearMetrics(r=""){r?delete Ae._fonts[r]:Ae._fonts={}}static get _canvas(){if(!Ae.__canvas){let r;try{let e=new OffscreenCanvas(0,0);if(e.getContext("2d",Ed)?.measureText)return Ae.__canvas=e,e;r=K.ADAPTER.createCanvas()}catch{r=K.ADAPTER.createCanvas()}r.width=r.height=10,Ae.__canvas=r}return Ae.__canvas}static get _context(){return Ae.__context||(Ae.__context=Ae._canvas.getContext("2d",Ed)),Ae.__context}},xt=Ae;xt.METRICS_STRING="|\xC9q\xC5";xt.BASELINE_SYMBOL="M";xt.BASELINE_MULTIPLIER=1.4;xt.HEIGHT_MULTIPLIER=2;xt.graphemeSegmenter=(()=>{if(typeof Intl?.Segmenter=="function"){let r=new Intl.Segmenter;return e=>[...r.segment(e)].map(t=>t.segment)}return r=>[...r]})();xt.experimentalLetterSpacing=!1;xt._fonts={};xt._newlines=[10,13];xt._breakingSpaces=[9,32,8192,8193,8194,8195,8196,8197,8198,8200,8201,8202,8287,12288];var IS=["serif","sans-serif","monospace","cursive","fantasy","system-ui"],_c=class{constructor(r){this.styleID=0,this.reset(),X2(this,r,r)}clone(){let r={};return X2(r,this,_c.defaultStyle),new _c(r)}reset(){X2(this,_c.defaultStyle,_c.defaultStyle)}get align(){return this._align}set align(r){this._align!==r&&(this._align=r,this.styleID++)}get breakWords(){return this._breakWords}set breakWords(r){this._breakWords!==r&&(this._breakWords=r,this.styleID++)}get dropShadow(){return this._dropShadow}set dropShadow(r){this._dropShadow!==r&&(this._dropShadow=r,this.styleID++)}get dropShadowAlpha(){return this._dropShadowAlpha}set dropShadowAlpha(r){this._dropShadowAlpha!==r&&(this._dropShadowAlpha=r,this.styleID++)}get dropShadowAngle(){return this._dropShadowAngle}set dropShadowAngle(r){this._dropShadowAngle!==r&&(this._dropShadowAngle=r,this.styleID++)}get dropShadowBlur(){return this._dropShadowBlur}set dropShadowBlur(r){this._dropShadowBlur!==r&&(this._dropShadowBlur=r,this.styleID++)}get dropShadowColor(){return this._dropShadowColor}set dropShadowColor(r){let e=Y2(r);this._dropShadowColor!==e&&(this._dropShadowColor=e,this.styleID++)}get dropShadowDistance(){return this._dropShadowDistance}set dropShadowDistance(r){this._dropShadowDistance!==r&&(this._dropShadowDistance=r,this.styleID++)}get fill(){return this._fill}set fill(r){let e=Y2(r);this._fill!==e&&(this._fill=e,this.styleID++)}get fillGradientType(){return this._fillGradientType}set fillGradientType(r){this._fillGradientType!==r&&(this._fillGradientType=r,this.styleID++)}get fillGradientStops(){return this._fillGradientStops}set fillGradientStops(r){LS(this._fillGradientStops,r)||(this._fillGradientStops=r,this.styleID++)}get fontFamily(){return this._fontFamily}set fontFamily(r){this.fontFamily!==r&&(this._fontFamily=r,this.styleID++)}get fontSize(){return this._fontSize}set fontSize(r){this._fontSize!==r&&(this._fontSize=r,this.styleID++)}get fontStyle(){return this._fontStyle}set fontStyle(r){this._fontStyle!==r&&(this._fontStyle=r,this.styleID++)}get fontVariant(){return this._fontVariant}set fontVariant(r){this._fontVariant!==r&&(this._fontVariant=r,this.styleID++)}get fontWeight(){return this._fontWeight}set fontWeight(r){this._fontWeight!==r&&(this._fontWeight=r,this.styleID++)}get letterSpacing(){return this._letterSpacing}set letterSpacing(r){this._letterSpacing!==r&&(this._letterSpacing=r,this.styleID++)}get lineHeight(){return this._lineHeight}set lineHeight(r){this._lineHeight!==r&&(this._lineHeight=r,this.styleID++)}get leading(){return this._leading}set leading(r){this._leading!==r&&(this._leading=r,this.styleID++)}get lineJoin(){return this._lineJoin}set lineJoin(r){this._lineJoin!==r&&(this._lineJoin=r,this.styleID++)}get miterLimit(){return this._miterLimit}set miterLimit(r){this._miterLimit!==r&&(this._miterLimit=r,this.styleID++)}get padding(){return this._padding}set padding(r){this._padding!==r&&(this._padding=r,this.styleID++)}get stroke(){return this._stroke}set stroke(r){let e=Y2(r);this._stroke!==e&&(this._stroke=e,this.styleID++)}get strokeThickness(){return this._strokeThickness}set strokeThickness(r){this._strokeThickness!==r&&(this._strokeThickness=r,this.styleID++)}get textBaseline(){return this._textBaseline}set textBaseline(r){this._textBaseline!==r&&(this._textBaseline=r,this.styleID++)}get trim(){return this._trim}set trim(r){this._trim!==r&&(this._trim=r,this.styleID++)}get whiteSpace(){return this._whiteSpace}set whiteSpace(r){this._whiteSpace!==r&&(this._whiteSpace=r,this.styleID++)}get wordWrap(){return this._wordWrap}set wordWrap(r){this._wordWrap!==r&&(this._wordWrap=r,this.styleID++)}get wordWrapWidth(){return this._wordWrapWidth}set wordWrapWidth(r){this._wordWrapWidth!==r&&(this._wordWrapWidth=r,this.styleID++)}toFontString(){let r=typeof this.fontSize=="number"?`${this.fontSize}px`:this.fontSize,e=this.fontFamily;Array.isArray(this.fontFamily)||(e=this.fontFamily.split(","));for(let t=e.length-1;t>=0;t--){let i=e[t].trim();!/([\"\'])[^\'\"]+\1/.test(i)&&!IS.includes(i)&&(i=`"${i}"`),e[t]=i}return`${this.fontStyle} ${this.fontVariant} ${this.fontWeight} ${r} ${e.join(",")}`}},s0=_c;s0.defaultStyle={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fillGradientType:an.LINEAR_VERTICAL,fillGradientStops:[],fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",leading:0,letterSpacing:0,lineHeight:0,lineJoin:"miter",miterLimit:10,padding:0,stroke:"black",strokeThickness:0,textBaseline:"alphabetic",trim:!1,whiteSpace:"pre",wordWrap:!1,wordWrapWidth:100};function Y2(r){let e=Me.shared;return Array.isArray(r)?r.map(t=>e.setValue(t).toHex()):e.setValue(r).toHex()}function LS(r,e){if(!Array.isArray(r)||!Array.isArray(e)||r.length!==e.length)return!1;for(let t=0;t<r.length;++t)if(r[t]!==e[t])return!1;return!0}function X2(r,e,t){for(let i in t)Array.isArray(e[i])?r[i]=e[i].slice():r[i]=e[i]}var MS={texture:!0,children:!1,baseTexture:!0},K2=class extends Lt{constructor(r,e,t){let i=!1;t||(t=K.ADAPTER.createCanvas(),i=!0),t.width=3,t.height=3;let s=Se.from(t);s.orig=new Ie,s.trim=new Ie,super(s),this._ownCanvas=i,this.canvas=t,this.context=t.getContext("2d",{willReadFrequently:!0}),this._resolution=K2.defaultResolution??K.RESOLUTION,this._autoResolution=K2.defaultAutoResolution,this._text=null,this._style=null,this._styleListener=null,this._font="",this.text=r,this.style=e,this.localStyleID=-1}static get experimentalLetterSpacing(){return xt.experimentalLetterSpacing}static set experimentalLetterSpacing(r){ae.deprecation("7.1.0","Text.experimentalLetterSpacing is deprecated, use TextMetrics.experimentalLetterSpacing"),xt.experimentalLetterSpacing=r}updateText(r){let e=this._style;if(this.localStyleID!==e.styleID&&(this.dirty=!0,this.localStyleID=e.styleID),!this.dirty&&r)return;this._font=this._style.toFontString();let t=this.context,i=xt.measureText(this._text||" ",this._style,this._style.wordWrap,this.canvas),s=i.width,n=i.height,o=i.lines,a=i.lineHeight,l=i.lineWidths,c=i.maxLineWidth,h=i.fontProperties;this.canvas.width=Math.ceil(Math.ceil(Math.max(1,s)+e.padding*2)*this._resolution),this.canvas.height=Math.ceil(Math.ceil(Math.max(1,n)+e.padding*2)*this._resolution),t.scale(this._resolution,this._resolution),t.clearRect(0,0,this.canvas.width,this.canvas.height),t.font=this._font,t.lineWidth=e.strokeThickness,t.textBaseline=e.textBaseline,t.lineJoin=e.lineJoin,t.miterLimit=e.miterLimit;let d,p,g=e.dropShadow?2:1;for(let v=0;v<g;++v){let C=e.dropShadow&&v===0,w=C?Math.ceil(Math.max(1,n)+e.padding*2):0,k=w*this._resolution;if(C){t.fillStyle="black",t.strokeStyle="black";let L=e.dropShadowColor,T=e.dropShadowBlur*this._resolution,W=e.dropShadowDistance*this._resolution;t.shadowColor=Me.shared.setValue(L).setAlpha(e.dropShadowAlpha).toRgbaString(),t.shadowBlur=T,t.shadowOffsetX=Math.cos(e.dropShadowAngle)*W,t.shadowOffsetY=Math.sin(e.dropShadowAngle)*W+k}else t.fillStyle=this._generateFillStyle(e,o,i),t.strokeStyle=e.stroke,t.shadowColor="black",t.shadowBlur=0,t.shadowOffsetX=0,t.shadowOffsetY=0;let B=(a-h.fontSize)/2;a-h.fontSize<0&&(B=0);for(let L=0;L<o.length;L++)d=e.strokeThickness/2,p=e.strokeThickness/2+L*a+h.ascent+B,e.align==="right"?d+=c-l[L]:e.align==="center"&&(d+=(c-l[L])/2),e.stroke&&e.strokeThickness&&this.drawLetterSpacing(o[L],d+e.padding,p+e.padding-w,!0),e.fill&&this.drawLetterSpacing(o[L],d+e.padding,p+e.padding-w)}this.updateTexture()}drawLetterSpacing(r,e,t,i=!1){let n=this._style.letterSpacing,o=!1;if(xt.experimentalLetterSpacingSupported&&(xt.experimentalLetterSpacing?(this.context.letterSpacing=`${n}px`,this.context.textLetterSpacing=`${n}px`,o=!0):(this.context.letterSpacing="0px",this.context.textLetterSpacing="0px")),n===0||o){i?this.context.strokeText(r,e,t):this.context.fillText(r,e,t);return}let a=e,l=xt.graphemeSegmenter(r),c=this.context.measureText(r).width,h=0;for(let d=0;d<l.length;++d){let p=l[d];i?this.context.strokeText(p,a,t):this.context.fillText(p,a,t);let g="";for(let v=d+1;v<l.length;++v)g+=l[v];h=this.context.measureText(g).width,a+=c-h+n,c=h}}updateTexture(){let r=this.canvas;if(this._style.trim){let n=ae.trimCanvas(r);n.data&&(r.width=n.width,r.height=n.height,this.context.putImageData(n.data,0,0))}let e=this._texture,t=this._style,i=t.trim?0:t.padding,s=e.baseTexture;e.trim.width=e._frame.width=r.width/this._resolution,e.trim.height=e._frame.height=r.height/this._resolution,e.trim.x=-i,e.trim.y=-i,e.orig.width=e._frame.width-i*2,e.orig.height=e._frame.height-i*2,this._onTextureUpdate(),s.setRealSize(r.width,r.height,this._resolution),e.updateUvs(),this.dirty=!1}_render(r){this._autoResolution&&this._resolution!==r.resolution&&(this._resolution=r.resolution,this.dirty=!0),this.updateText(!0),super._render(r)}updateTransform(){this.updateText(!0),super.updateTransform()}getBounds(r,e){return this.updateText(!0),this._textureID===-1&&(r=!1),super.getBounds(r,e)}getLocalBounds(r){return this.updateText(!0),super.getLocalBounds.call(this,r)}_calculateBounds(){this.calculateVertices(),this._bounds.addQuad(this.vertexData)}_generateFillStyle(r,e,t){let i=r.fill;if(Array.isArray(i)){if(i.length===1)return i[0]}else return i;let s,n=r.dropShadow?r.dropShadowDistance:0,o=r.padding||0,a=this.canvas.width/this._resolution-n-o*2,l=this.canvas.height/this._resolution-n-o*2,c=i.slice(),h=r.fillGradientStops.slice();if(!h.length){let d=c.length+1;for(let p=1;p<d;++p)h.push(p/d)}if(c.unshift(i[0]),h.unshift(0),c.push(i[i.length-1]),h.push(1),r.fillGradientType===an.LINEAR_VERTICAL){s=this.context.createLinearGradient(a/2,o,a/2,l+o);let d=t.fontProperties.fontSize+r.strokeThickness;for(let p=0;p<e.length;p++){let g=t.lineHeight*(p-1)+d,v=t.lineHeight*p,C=v;p>0&&g>v&&(C=(v+g)/2);let w=v+d,k=t.lineHeight*(p+1),B=w;p+1<e.length&&k<w&&(B=(w+k)/2);let L=(B-C)/l;for(let T=0;T<c.length;T++){let W=0;typeof h[T]=="number"?W=h[T]:W=T/c.length;let j=Math.min(1,Math.max(0,C/l+W*L));j=Number(j.toFixed(5)),s.addColorStop(j,c[T])}}}else{s=this.context.createLinearGradient(o,l/2,a+o,l/2);let d=c.length+1,p=1;for(let g=0;g<c.length;g++){let v;typeof h[g]=="number"?v=h[g]:v=p/d,s.addColorStop(v,c[g]),p++}}return s}destroy(r){typeof r=="boolean"&&(r={children:r}),r=Object.assign({},MS,r),super.destroy(r),this._ownCanvas&&(this.canvas.height=this.canvas.width=0),this.context=null,this.canvas=null,this._style=null}get width(){return this.updateText(!0),Math.abs(this.scale.x)*this._texture.orig.width}set width(r){this.updateText(!0);let e=ae.sign(this.scale.x)||1;this.scale.x=e*r/this._texture.orig.width,this._width=r}get height(){return this.updateText(!0),Math.abs(this.scale.y)*this._texture.orig.height}set height(r){this.updateText(!0);let e=ae.sign(this.scale.y)||1;this.scale.y=e*r/this._texture.orig.height,this._height=r}get style(){return this._style}set style(r){r=r||{},r instanceof s0?this._style=r:this._style=new s0(r),this.localStyleID=-1,this.dirty=!0}get text(){return this._text}set text(r){r=String(r??""),this._text!==r&&(this._text=r,this.dirty=!0)}get resolution(){return this._resolution}set resolution(r){this._autoResolution=!1,this._resolution!==r&&(this._resolution=r,this.dirty=!0)}},di=K2;di.defaultAutoResolution=!0;var Fc=class{constructor(e){this.maxItemsPerFrame=e,this.itemsLeft=0}beginFrame(){this.itemsLeft=this.maxItemsPerFrame}allowedToUpload(){return this.itemsLeft-- >0}};function NS(r,e){let t=!1;if(r?._textures?.length){for(let i=0;i<r._textures.length;i++)if(r._textures[i]instanceof Se){let s=r._textures[i].baseTexture;e.includes(s)||(e.push(s),t=!0)}}return t}function PS(r,e){if(r.baseTexture instanceof we){let t=r.baseTexture;return e.includes(t)||e.push(t),!0}return!1}function BS(r,e){if(r._texture&&r._texture instanceof Se){let t=r._texture.baseTexture;return e.includes(t)||e.push(t),!0}return!1}function RS(r,e){return e instanceof di?(e.updateText(!0),!0):!1}function OS(r,e){if(e instanceof s0){let t=e.toFontString();return xt.measureFont(t),!0}return!1}function GS(r,e){if(r instanceof di){e.includes(r.style)||e.push(r.style),e.includes(r)||e.push(r);let t=r._texture.baseTexture;return e.includes(t)||e.push(t),!0}return!1}function US(r,e){return r instanceof s0?(e.includes(r)||e.push(r),!0):!1}var vf=class{constructor(r){this.limiter=new Fc(vf.uploadsPerFrame),this.renderer=r,this.uploadHookHelper=null,this.queue=[],this.addHooks=[],this.uploadHooks=[],this.completes=[],this.ticking=!1,this.delayedTick=()=>{this.queue&&this.prepareItems()},this.registerFindHook(GS),this.registerFindHook(US),this.registerFindHook(NS),this.registerFindHook(PS),this.registerFindHook(BS),this.registerUploadHook(RS),this.registerUploadHook(OS)}upload(r){return new Promise(e=>{r&&this.add(r),this.queue.length?(this.completes.push(e),this.ticking||(this.ticking=!0,It.system.addOnce(this.tick,this,yr.UTILITY))):e()})}tick(){setTimeout(this.delayedTick,0)}prepareItems(){for(this.limiter.beginFrame();this.queue.length&&this.limiter.allowedToUpload();){let r=this.queue[0],e=!1;if(r&&!r._destroyed){for(let t=0,i=this.uploadHooks.length;t<i;t++)if(this.uploadHooks[t](this.uploadHookHelper,r)){this.queue.shift(),e=!0;break}}e||this.queue.shift()}if(this.queue.length)It.system.addOnce(this.tick,this,yr.UTILITY);else{this.ticking=!1;let r=this.completes.slice(0);this.completes.length=0;for(let e=0,t=r.length;e<t;e++)r[e]()}}registerFindHook(r){return r&&this.addHooks.push(r),this}registerUploadHook(r){return r&&this.uploadHooks.push(r),this}add(r){for(let e=0,t=this.addHooks.length;e<t&&!this.addHooks[e](r,this.queue);e++);if(r instanceof tt)for(let e=r.children.length-1;e>=0;e--)this.add(r.children[e]);return this}destroy(){this.ticking&&It.system.remove(this.tick,this),this.ticking=!1,this.addHooks=null,this.uploadHooks=null,this.renderer=null,this.completes=null,this.queue=null,this.limiter=null,this.uploadHookHelper=null}},oo=vf;oo.uploadsPerFrame=4;Object.defineProperties(K,{UPLOADS_PER_FRAME:{get(){return oo.uploadsPerFrame},set(r){ae.deprecation("7.1.0","settings.UPLOADS_PER_FRAME is deprecated, use prepare.BasePrepare.uploadsPerFrame"),oo.uploadsPerFrame=r}}});function xf(r,e){return e instanceof we?(e._glTextures[r.CONTEXT_UID]||r.texture.bind(e),!0):!1}function VS(r,e){if(!(e instanceof lt))return!1;let{geometry:t}=e;e.finishPoly(),t.updateBatches();let{batches:i}=t;for(let s=0;s<i.length;s++){let{texture:n}=i[s].style;n&&xf(r,n.baseTexture)}return t.batchable||r.geometry.bind(t,e._resolveDirectShader(r)),!0}function zS(r,e){return r instanceof lt?(e.push(r),!0):!1}var Ac=class extends oo{constructor(e){super(e),this.uploadHookHelper=this.renderer,this.registerFindHook(zS),this.registerUploadHook(xf),this.registerUploadHook(VS)}};Ac.extension={name:"prepare",type:Z.RendererSystem};te.add(Ac);var Pie=new Ne;var Df=`#version 300 es
|
|
#define SHADER_NAME Tiling-Sprite-100
|
|
|
|
precision lowp float;
|
|
|
|
in vec2 vTextureCoord;
|
|
|
|
out vec4 fragmentColor;
|
|
|
|
uniform sampler2D uSampler;
|
|
uniform vec4 uColor;
|
|
uniform mat3 uMapCoord;
|
|
uniform vec4 uClampFrame;
|
|
uniform vec2 uClampOffset;
|
|
|
|
void main(void)
|
|
{
|
|
vec2 coord = vTextureCoord + ceil(uClampOffset - vTextureCoord);
|
|
coord = (uMapCoord * vec3(coord, 1.0)).xy;
|
|
vec2 unclamped = coord;
|
|
coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);
|
|
|
|
vec4 texSample = texture(uSampler, coord, unclamped == coord ? 0.0f : -32.0f);// lod-bias very negative to force lod 0
|
|
|
|
fragmentColor = texSample * uColor;
|
|
}
|
|
`;var bf=`#version 300 es
|
|
#define SHADER_NAME Tiling-Sprite-300
|
|
|
|
precision lowp float;
|
|
|
|
in vec2 aVertexPosition;
|
|
in vec2 aTextureCoord;
|
|
|
|
uniform mat3 projectionMatrix;
|
|
uniform mat3 translationMatrix;
|
|
uniform mat3 uTransform;
|
|
|
|
out vec2 vTextureCoord;
|
|
|
|
void main(void)
|
|
{
|
|
gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
|
|
|
vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;
|
|
}
|
|
`;var Ef=`#version 100
|
|
#ifdef GL_EXT_shader_texture_lod
|
|
#extension GL_EXT_shader_texture_lod : enable
|
|
#endif
|
|
#define SHADER_NAME Tiling-Sprite-100
|
|
|
|
precision lowp float;
|
|
|
|
varying vec2 vTextureCoord;
|
|
|
|
uniform sampler2D uSampler;
|
|
uniform vec4 uColor;
|
|
uniform mat3 uMapCoord;
|
|
uniform vec4 uClampFrame;
|
|
uniform vec2 uClampOffset;
|
|
|
|
void main(void)
|
|
{
|
|
vec2 coord = vTextureCoord + ceil(uClampOffset - vTextureCoord);
|
|
coord = (uMapCoord * vec3(coord, 1.0)).xy;
|
|
vec2 unclamped = coord;
|
|
coord = clamp(coord, uClampFrame.xy, uClampFrame.zw);
|
|
|
|
#ifdef GL_EXT_shader_texture_lod
|
|
vec4 texSample = unclamped == coord
|
|
? texture2D(uSampler, coord)
|
|
: texture2DLodEXT(uSampler, coord, 0);
|
|
#else
|
|
vec4 texSample = texture2D(uSampler, coord);
|
|
#endif
|
|
|
|
gl_FragColor = texSample * uColor;
|
|
}
|
|
`;var Z2=`#version 100
|
|
#define SHADER_NAME Tiling-Sprite-100
|
|
|
|
precision lowp float;
|
|
|
|
attribute vec2 aVertexPosition;
|
|
attribute vec2 aTextureCoord;
|
|
|
|
uniform mat3 projectionMatrix;
|
|
uniform mat3 translationMatrix;
|
|
uniform mat3 uTransform;
|
|
|
|
varying vec2 vTextureCoord;
|
|
|
|
void main(void)
|
|
{
|
|
gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
|
|
|
vTextureCoord = (uTransform * vec3(aTextureCoord, 1.0)).xy;
|
|
}
|
|
`;var Sf=`#version 100
|
|
#define SHADER_NAME Tiling-Sprite-Simple-100
|
|
|
|
precision lowp float;
|
|
|
|
varying vec2 vTextureCoord;
|
|
|
|
uniform sampler2D uSampler;
|
|
uniform vec4 uColor;
|
|
|
|
void main(void)
|
|
{
|
|
vec4 texSample = texture2D(uSampler, vTextureCoord);
|
|
gl_FragColor = texSample * uColor;
|
|
}
|
|
`;var Sd=new je,kc=class extends ai{constructor(e){super(e),e.runners.contextChange.add(this),this.quad=new Kn,this.state=D0.for2d()}contextChange(){let e=this.renderer,t={globals:e.globalUniforms};this.simpleShader=b0.from(Z2,Sf,t),this.shader=e.context.webGLVersion>1?b0.from(bf,Df,t):b0.from(Z2,Ef,t)}render(e){let t=this.renderer,i=this.quad,s=i.vertices;s[0]=s[6]=e._width*-e.anchor.x,s[1]=s[3]=e._height*-e.anchor.y,s[2]=s[4]=e._width*(1-e.anchor.x),s[5]=s[7]=e._height*(1-e.anchor.y);let n=e.uvRespectAnchor?e.anchor.x:0,o=e.uvRespectAnchor?e.anchor.y:0;s=i.uvs,s[0]=s[6]=-n,s[1]=s[3]=-o,s[2]=s[4]=1-n,s[5]=s[7]=1-o,i.invalidate();let a=e._texture,l=a.baseTexture,c=l.alphaMode>0,h=e.tileTransform.localTransform,d=e.uvMatrix,p=l.isPowerOfTwo&&a.frame.width===l.width&&a.frame.height===l.height;p&&(l._glTextures[t.CONTEXT_UID]?p=l.wrapMode!==dr.CLAMP:l.wrapMode===dr.CLAMP&&(l.wrapMode=dr.REPEAT));let g=p?this.simpleShader:this.shader,v=a.width,C=a.height,w=e._width,k=e._height;Sd.set(h.a*v/w,h.b*v/k,h.c*C/w,h.d*C/k,h.tx/w,h.ty/k),Sd.invert(),p?Sd.prepend(d.mapCoord):(g.uniforms.uMapCoord=d.mapCoord.toArray(!0),g.uniforms.uClampFrame=d.uClampFrame,g.uniforms.uClampOffset=d.uClampOffset),g.uniforms.uTransform=Sd.toArray(!0),g.uniforms.uColor=Me.shared.setValue(e.tint).premultiply(e.worldAlpha,c).toArray(g.uniforms.uColor),g.uniforms.translationMatrix=e.transform.worldTransform.toArray(!0),g.uniforms.uSampler=a,t.shader.bind(g),t.geometry.bind(i),this.state.blendMode=ae.correctBlendMode(e.blendMode,c),t.state.set(this.state),t.geometry.draw(this.renderer.gl.TRIANGLES,6,0)}};kc.extension={name:"tilingSprite",type:Z.RendererPlugin};te.add(kc);var Ic=class{constructor(r,e,t=null){this.linkedSheets=[],this._texture=r instanceof Se?r:null,this.baseTexture=r instanceof we?r:this._texture.baseTexture,this.textures={},this.animations={},this.data=e;let i=this.baseTexture.resource;this.resolution=this._updateResolution(t||(i?i.url:null)),this._frames=this.data.frames,this._frameKeys=Object.keys(this._frames),this._batchIndex=0,this._callback=null}_updateResolution(r=null){let{scale:e}=this.data.meta,t=ae.getResolutionOfUrl(r,null);return t===null&&(t=parseFloat(e??"1")),t!==1&&this.baseTexture.setResolution(t),t}parse(){return new Promise(r=>{this._callback=r,this._batchIndex=0,this._frameKeys.length<=Ic.BATCH_SIZE?(this._processFrames(0),this._processAnimations(),this._parseComplete()):this._nextBatch()})}_processFrames(r){let e=r,t=Ic.BATCH_SIZE;for(;e-r<t&&e<this._frameKeys.length;){let i=this._frameKeys[e],s=this._frames[i],n=s.frame;if(n){let o=null,a=null,l=s.trimmed!==!1&&s.sourceSize?s.sourceSize:s.frame,c=new Ie(0,0,Math.floor(l.w)/this.resolution,Math.floor(l.h)/this.resolution);s.rotated?o=new Ie(Math.floor(n.x)/this.resolution,Math.floor(n.y)/this.resolution,Math.floor(n.h)/this.resolution,Math.floor(n.w)/this.resolution):o=new Ie(Math.floor(n.x)/this.resolution,Math.floor(n.y)/this.resolution,Math.floor(n.w)/this.resolution,Math.floor(n.h)/this.resolution),s.trimmed!==!1&&s.spriteSourceSize&&(a=new Ie(Math.floor(s.spriteSourceSize.x)/this.resolution,Math.floor(s.spriteSourceSize.y)/this.resolution,Math.floor(n.w)/this.resolution,Math.floor(n.h)/this.resolution)),this.textures[i]=new Se(this.baseTexture,o,c,a,s.rotated?2:0,s.anchor,s.borders),Se.addToCache(this.textures[i],i)}e++}}_processAnimations(){let r=this.data.animations||{};for(let e in r){this.animations[e]=[];for(let t=0;t<r[e].length;t++){let i=r[e][t];this.animations[e].push(this.textures[i])}}}_parseComplete(){let r=this._callback;this._callback=null,this._batchIndex=0,r.call(this,this.textures)}_nextBatch(){this._processFrames(this._batchIndex*Ic.BATCH_SIZE),this._batchIndex++,setTimeout(()=>{this._batchIndex*Ic.BATCH_SIZE<this._frameKeys.length?this._nextBatch():(this._processAnimations(),this._parseComplete())},0)}destroy(r=!1){for(let e in this.textures)this.textures[e].destroy();this._frames=null,this._frameKeys=null,this.data=null,this.textures=null,r&&(this._texture?.destroy(),this.baseTexture.destroy()),this._texture=null,this.baseTexture=null,this.linkedSheets=[]}},Lc=Ic;Lc.BATCH_SIZE=1e3;var WS=["jpg","png","jpeg","avif","webp"];function Cf(r,e,t){let i={};if(r.forEach(s=>{i[s]=e}),Object.keys(e.textures).forEach(s=>{i[s]=e.textures[s]}),!t){let s=ae.path.dirname(r[0]);e.linkedSheets.forEach((n,o)=>{let a=Cf([`${s}/${e.data.meta.related_multi_packs[o]}`],n,!0);Object.assign(i,a)})}return i}var wf={extension:Z.Asset,cache:{test:r=>r instanceof Lc,getCacheableAssets:(r,e)=>Cf(r,e,!1)},resolver:{test:r=>{let t=r.split("?")[0].split("."),i=t.pop(),s=t.pop();return i==="json"&&WS.includes(s)},parse:r=>{let e=r.split(".");return{resolution:parseFloat(K.RETINA_PREFIX.exec(r)?.[1]??"1"),format:e[e.length-2],src:r}}},loader:{name:"spritesheetLoader",extension:{type:Z.LoadParser,priority:jt.Normal},async testParse(r,e){return ae.path.extname(e.src).toLowerCase()===".json"&&!!r.frames},async parse(r,e,t){let i=ae.path.dirname(e.src);i&&i.lastIndexOf("/")!==i.length-1&&(i+="/");let s=i+r.meta.image;s=ro(s,e.src);let o=(await t.load([s]))[s],a=new Lc(o.baseTexture,r,e.src);await a.parse();let l=r?.meta?.related_multi_packs;if(Array.isArray(l)){let c=[];for(let d of l){if(typeof d!="string")continue;let p=i+d;e.data?.ignoreMultiPack||(p=ro(p,e.src),c.push(t.load({src:p,data:{ignoreMultiPack:!0}})))}let h=await Promise.all(c);a.linkedSheets=h,h.forEach(d=>{d.linkedSheets=[a].concat(a.linkedSheets.filter(p=>p!==d))})}return a},unload(r){r.destroy(!0)}}};te.add(wf);var Mi=class{constructor(){this.info=[],this.common=[],this.page=[],this.char=[],this.kerning=[],this.distanceField=[]}};var Ni=class{static test(e){return typeof e=="string"&&e.startsWith("info face=")}static parse(e){let t=e.match(/^[a-z]+\s+.+$/gm),i={info:[],common:[],page:[],char:[],chars:[],kerning:[],kernings:[],distanceField:[]};for(let n in t){let o=t[n].match(/^[a-z]+/gm)[0],a=t[n].match(/[a-zA-Z]+=([^\s"']+|"([^"]*)")/gm),l={};for(let c in a){let h=a[c].split("="),d=h[0],p=h[1].replace(/"/gm,""),g=parseFloat(p),v=isNaN(g)?p:g;l[d]=v}i[o].push(l)}let s=new Mi;return i.info.forEach(n=>s.info.push({face:n.face,size:parseInt(n.size,10)})),i.common.forEach(n=>s.common.push({lineHeight:parseInt(n.lineHeight,10)})),i.page.forEach(n=>s.page.push({id:parseInt(n.id,10),file:n.file})),i.char.forEach(n=>s.char.push({id:parseInt(n.id,10),page:parseInt(n.page,10),x:parseInt(n.x,10),y:parseInt(n.y,10),width:parseInt(n.width,10),height:parseInt(n.height,10),xoffset:parseInt(n.xoffset,10),yoffset:parseInt(n.yoffset,10),xadvance:parseInt(n.xadvance,10)})),i.kerning.forEach(n=>s.kerning.push({first:parseInt(n.first,10),second:parseInt(n.second,10),amount:parseInt(n.amount,10)})),i.distanceField.forEach(n=>s.distanceField.push({distanceRange:parseInt(n.distanceRange,10),fieldType:n.fieldType})),s}};var Cs=class{static test(e){let t=e;return"getElementsByTagName"in t&&t.getElementsByTagName("page").length&&t.getElementsByTagName("info")[0].getAttribute("face")!==null}static parse(e){let t=new Mi,i=e.getElementsByTagName("info"),s=e.getElementsByTagName("common"),n=e.getElementsByTagName("page"),o=e.getElementsByTagName("char"),a=e.getElementsByTagName("kerning"),l=e.getElementsByTagName("distanceField");for(let c=0;c<i.length;c++)t.info.push({face:i[c].getAttribute("face"),size:parseInt(i[c].getAttribute("size"),10)});for(let c=0;c<s.length;c++)t.common.push({lineHeight:parseInt(s[c].getAttribute("lineHeight"),10)});for(let c=0;c<n.length;c++)t.page.push({id:parseInt(n[c].getAttribute("id"),10)||0,file:n[c].getAttribute("file")});for(let c=0;c<o.length;c++){let h=o[c];t.char.push({id:parseInt(h.getAttribute("id"),10),page:parseInt(h.getAttribute("page"),10)||0,x:parseInt(h.getAttribute("x"),10),y:parseInt(h.getAttribute("y"),10),width:parseInt(h.getAttribute("width"),10),height:parseInt(h.getAttribute("height"),10),xoffset:parseInt(h.getAttribute("xoffset"),10),yoffset:parseInt(h.getAttribute("yoffset"),10),xadvance:parseInt(h.getAttribute("xadvance"),10)})}for(let c=0;c<a.length;c++)t.kerning.push({first:parseInt(a[c].getAttribute("first"),10),second:parseInt(a[c].getAttribute("second"),10),amount:parseInt(a[c].getAttribute("amount"),10)});for(let c=0;c<l.length;c++)t.distanceField.push({fieldType:l[c].getAttribute("fieldType"),distanceRange:parseInt(l[c].getAttribute("distanceRange"),10)});return t}};var ws=class{static test(e){return typeof e=="string"&&e.includes("<font>")?Cs.test(K.ADAPTER.parseXML(e)):!1}static parse(e){return Cs.parse(K.ADAPTER.parseXML(e))}};var Q2=[Ni,Cs,ws];function J2(r){for(let e=0;e<Q2.length;e++)if(Q2[e].test(r))return Q2[e];return null}function e8(r,e,t,i,s,n){let o=t.fill;if(Array.isArray(o)){if(o.length===1)return o[0]}else return o;let a,l=t.dropShadow?t.dropShadowDistance:0,c=t.padding||0,h=r.width/i-l-c*2,d=r.height/i-l-c*2,p=o.slice(),g=t.fillGradientStops.slice();if(!g.length){let v=p.length+1;for(let C=1;C<v;++C)g.push(C/v)}if(p.unshift(o[0]),g.unshift(0),p.push(o[o.length-1]),g.push(1),t.fillGradientType===an.LINEAR_VERTICAL){a=e.createLinearGradient(h/2,c,h/2,d+c);let v=0,w=(n.fontProperties.fontSize+t.strokeThickness)/d;for(let k=0;k<s.length;k++){let B=n.lineHeight*k;for(let L=0;L<p.length;L++){let T=0;typeof g[L]=="number"?T=g[L]:T=L/p.length;let W=B/d+T*w,j=Math.max(v,W);j=Math.min(j,1),a.addColorStop(j,p[L]),v=j}}}else{a=e.createLinearGradient(c,d/2,h+c,d/2);let v=p.length+1,C=1;for(let w=0;w<p.length;w++){let k;typeof g[w]=="number"?k=g[w]:k=C/v,a.addColorStop(k,p[w]),C++}}return a}function t8(r,e,t,i,s,n,o){let a=t.text,l=t.fontProperties;e.translate(i,s),e.scale(n,n);let c=o.strokeThickness/2,h=-(o.strokeThickness/2);if(e.font=o.toFontString(),e.lineWidth=o.strokeThickness,e.textBaseline=o.textBaseline,e.lineJoin=o.lineJoin,e.miterLimit=o.miterLimit,e.fillStyle=e8(r,e,o,n,[a],t),e.strokeStyle=o.stroke,o.dropShadow){let d=o.dropShadowColor,p=o.dropShadowBlur*n,g=o.dropShadowDistance*n;e.shadowColor=Me.shared.setValue(d).setAlpha(o.dropShadowAlpha).toRgbaString(),e.shadowBlur=p,e.shadowOffsetX=Math.cos(o.dropShadowAngle)*g,e.shadowOffsetY=Math.sin(o.dropShadowAngle)*g}else e.shadowColor="black",e.shadowBlur=0,e.shadowOffsetX=0,e.shadowOffsetY=0;o.stroke&&o.strokeThickness&&e.strokeText(a,c,h+t.lineHeight-l.descent),o.fill&&e.fillText(a,c,h+t.lineHeight-l.descent),e.setTransform(1,0,0,1,0,0),e.fillStyle="rgba(0, 0, 0, 0)"}function ao(r){return r.codePointAt?r.codePointAt(0):r.charCodeAt(0)}function Mc(r){return Array.from?Array.from(r):r.split("")}function r8(r){typeof r=="string"&&(r=[r]);let e=[];for(let t=0,i=r.length;t<i;t++){let s=r[t];if(Array.isArray(s)){if(s.length!==2)throw new Error(`[BitmapFont]: Invalid character range length, expecting 2 got ${s.length}.`);let n=s[0].charCodeAt(0),o=s[1].charCodeAt(0);if(o<n)throw new Error("[BitmapFont]: Invalid character range.");for(let a=n,l=o;a<=l;a++)e.push(String.fromCharCode(a))}else e.push(...Mc(s))}if(e.length===0)throw new Error("[BitmapFont]: Empty set when resolving characters.");return e}var pi=class{constructor(r,e,t){let[i]=r.info,[s]=r.common,[n]=r.page,[o]=r.distanceField,a=ae.getResolutionOfUrl(n.file),l={};this._ownsTextures=t,this.font=i.face,this.size=i.size,this.lineHeight=s.lineHeight/a,this.chars={},this.pageTextures=l;for(let c=0;c<r.page.length;c++){let{id:h,file:d}=r.page[c];l[h]=e instanceof Array?e[c]:e[d],o?.fieldType&&o.fieldType!=="none"&&(l[h].baseTexture.alphaMode=Qt.NO_PREMULTIPLIED_ALPHA,l[h].baseTexture.mipmap=x0.OFF)}for(let c=0;c<r.char.length;c++){let{id:h,page:d}=r.char[c],{x:p,y:g,width:v,height:C,xoffset:w,yoffset:k,xadvance:B}=r.char[c];p/=a,g/=a,v/=a,C/=a,w/=a,k/=a,B/=a;let L=new Ie(p+l[d].frame.x/a,g+l[d].frame.y/a,v,C);this.chars[h]={xOffset:w,yOffset:k,xAdvance:B,kerning:{},texture:new Se(l[d].baseTexture,L),page:d}}for(let c=0;c<r.kerning.length;c++){let{first:h,second:d,amount:p}=r.kerning[c];h/=a,d/=a,p/=a,this.chars[d]&&(this.chars[d].kerning[h]=p)}this.distanceFieldRange=o?.distanceRange,this.distanceFieldType=o?.fieldType?.toLowerCase()??"none"}destroy(){for(let r in this.chars)this.chars[r].texture.destroy(),this.chars[r].texture=null;for(let r in this.pageTextures)this._ownsTextures&&this.pageTextures[r].destroy(!0),this.pageTextures[r]=null;this.chars=null,this.pageTextures=null}static install(r,e,t){let i;if(r instanceof Mi)i=r;else{let n=J2(r);if(!n)throw new Error("Unrecognized data format for font.");i=n.parse(r)}e instanceof Se&&(e=[e]);let s=new pi(i,e,t);return pi.available[s.font]=s,s}static uninstall(r){let e=pi.available[r];if(!e)throw new Error(`No font found named '${r}'`);e.destroy(),delete pi.available[r]}static from(r,e,t){if(!r)throw new Error("[BitmapFont] Property `name` is required.");let{chars:i,padding:s,resolution:n,textureWidth:o,textureHeight:a,...l}=Object.assign({},pi.defaultOptions,t),c=r8(i),h=e instanceof s0?e:new s0(e),d=o,p=new Mi;p.info[0]={face:h.fontFamily,size:h.fontSize},p.common[0]={lineHeight:h.fontSize};let g=0,v=0,C,w,k,B=0,L=[],T=[];for(let j=0;j<c.length;j++){C||(C=K.ADAPTER.createCanvas(),C.width=o,C.height=a,w=C.getContext("2d"),k=new we(C,{resolution:n,...l}),L.push(k),T.push(new Se(k)),p.page.push({id:T.length-1,file:""}));let I=c[j],R=xt.measureText(I,h,!1,C),z=R.width,U=Math.ceil(R.height),q=Math.ceil((h.fontStyle==="italic"?2:1)*z);if(v>=a-U*n){if(v===0)throw new Error(`[BitmapFont] textureHeight ${a}px is too small (fontFamily: '${h.fontFamily}', fontSize: ${h.fontSize}px, char: '${I}')`);--j,C=null,w=null,k=null,v=0,g=0,B=0;continue}if(B=Math.max(U+R.fontProperties.descent,B),q*n+g>=d){if(g===0)throw new Error(`[BitmapFont] textureWidth ${o}px is too small (fontFamily: '${h.fontFamily}', fontSize: ${h.fontSize}px, char: '${I}')`);--j,v+=B*n,v=Math.ceil(v),g=0,B=0;continue}t8(C,w,R,g,v,n,h);let re=ao(R.text);p.char.push({id:re,page:T.length-1,x:g/n,y:v/n,width:q,height:U,xoffset:0,yoffset:0,xadvance:z-(h.dropShadow?h.dropShadowDistance:0)-(h.stroke?h.strokeThickness:0)}),g+=(q+2*s)*n,g=Math.ceil(g)}for(let j=0,I=c.length;j<I;j++){let R=c[j];for(let z=0;z<I;z++){let U=c[z],q=w.measureText(R).width,re=w.measureText(U).width,Q=w.measureText(R+U).width-(q+re);Q&&p.kerning.push({first:ao(R),second:ao(U),amount:Q})}}let W=new pi(p,T,!0);return pi.available[r]!==void 0&&pi.uninstall(r),pi.available[r]=W,W}},S0=pi;S0.ALPHA=[["a","z"],["A","Z"]," "];S0.NUMERIC=[["0","9"]];S0.ALPHANUMERIC=[["a","z"],["A","Z"],["0","9"]," "];S0.ASCII=[[" ","~"]];S0.defaultOptions={resolution:1,textureWidth:512,textureHeight:512,padding:4,chars:pi.ALPHANUMERIC};S0.available={};var Tf=`// Pixi texture info\r
|
|
varying vec2 vTextureCoord;\r
|
|
uniform sampler2D uSampler;\r
|
|
\r
|
|
// Tint\r
|
|
uniform vec4 uColor;\r
|
|
\r
|
|
// on 2D applications fwidth is screenScale / glyphAtlasScale * distanceFieldRange\r
|
|
uniform float uFWidth;\r
|
|
\r
|
|
void main(void) {\r
|
|
\r
|
|
// To stack MSDF and SDF we need a non-pre-multiplied-alpha texture.\r
|
|
vec4 texColor = texture2D(uSampler, vTextureCoord);\r
|
|
\r
|
|
// MSDF\r
|
|
float median = texColor.r + texColor.g + texColor.b -\r
|
|
min(texColor.r, min(texColor.g, texColor.b)) -\r
|
|
max(texColor.r, max(texColor.g, texColor.b));\r
|
|
// SDF\r
|
|
median = min(median, texColor.a);\r
|
|
\r
|
|
float screenPxDistance = uFWidth * (median - 0.5);\r
|
|
float alpha = clamp(screenPxDistance + 0.5, 0.0, 1.0);\r
|
|
if (median < 0.01) {\r
|
|
alpha = 0.0;\r
|
|
} else if (median > 0.99) {\r
|
|
alpha = 1.0;\r
|
|
}\r
|
|
\r
|
|
// Gamma correction for coverage-like alpha\r
|
|
float luma = dot(uColor.rgb, vec3(0.299, 0.587, 0.114));\r
|
|
float gamma = mix(1.0, 1.0 / 2.2, luma);\r
|
|
float coverage = pow(uColor.a * alpha, gamma); \r
|
|
\r
|
|
// NPM Textures, NPM outputs\r
|
|
gl_FragColor = vec4(uColor.rgb, coverage);\r
|
|
}\r
|
|
`;var _f=`// Mesh material default fragment\r
|
|
attribute vec2 aVertexPosition;\r
|
|
attribute vec2 aTextureCoord;\r
|
|
\r
|
|
uniform mat3 projectionMatrix;\r
|
|
uniform mat3 translationMatrix;\r
|
|
uniform mat3 uTextureMatrix;\r
|
|
\r
|
|
varying vec2 vTextureCoord;\r
|
|
\r
|
|
void main(void)\r
|
|
{\r
|
|
gl_Position = vec4((projectionMatrix * translationMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);\r
|
|
\r
|
|
vTextureCoord = (uTextureMatrix * vec3(aTextureCoord, 1.0)).xy;\r
|
|
}\r
|
|
`;var Ff=[],Af=[],kf=[],If=class extends tt{constructor(r,e={}){super();let{align:t,tint:i,maxWidth:s,letterSpacing:n,fontName:o,fontSize:a}=Object.assign({},If.styleDefaults,e);if(!S0.available[o])throw new Error(`Missing BitmapFont "${o}"`);this._activePagesMeshData=[],this._textWidth=0,this._textHeight=0,this._align=t,this._tintColor=new Me(i),this._font=void 0,this._fontName=o,this._fontSize=a,this.text=r,this._maxWidth=s,this._maxLineHeight=0,this._letterSpacing=n,this._anchor=new Rr(()=>{this.dirty=!0},this,0,0),this._roundPixels=K.ROUND_PIXELS,this.dirty=!0,this._resolution=K.RESOLUTION,this._autoResolution=!0,this._textureCache={}}updateText(){let r=S0.available[this._fontName],e=this.fontSize,t=e/r.size,i=new Ne,s=[],n=[],o=[],a=this._text.replace(/(?:\r\n|\r)/g,`
|
|
`)||" ",l=Mc(a),c=this._maxWidth*r.size/e,h=r.distanceFieldType==="none"?Ff:Af,d=null,p=0,g=0,v=0,C=-1,w=0,k=0,B=0,L=0;for(let U=0;U<l.length;U++){let q=l[U],re=ao(q);if(/(?:\s)/.test(q)&&(C=U,w=p,L++),q==="\r"||q===`
|
|
`){n.push(p),o.push(-1),g=Math.max(g,p),++v,++k,i.x=0,i.y+=r.lineHeight,d=null,L=0;continue}let $=r.chars[re];if(!$)continue;d&&$.kerning[d]&&(i.x+=$.kerning[d]);let Q=kf.pop()||{texture:Se.EMPTY,line:0,charCode:0,prevSpaces:0,position:new Ne};Q.texture=$.texture,Q.line=v,Q.charCode=re,Q.position.x=Math.round(i.x+$.xOffset+this._letterSpacing/2),Q.position.y=Math.round(i.y+$.yOffset),Q.prevSpaces=L,s.push(Q),p=Q.position.x+Math.max($.xAdvance-$.xOffset,$.texture.orig.width),i.x+=$.xAdvance+this._letterSpacing,B=Math.max(B,$.yOffset+$.texture.height),d=re,C!==-1&&c>0&&i.x>c&&(++k,ae.removeItems(s,1+C-k,1+U-C),U=C,C=-1,n.push(w),o.push(s.length>0?s[s.length-1].prevSpaces:0),g=Math.max(g,w),v++,i.x=0,i.y+=r.lineHeight,d=null,L=0)}let T=l[l.length-1];T!=="\r"&&T!==`
|
|
`&&(/(?:\s)/.test(T)&&(p=w),n.push(p),g=Math.max(g,p),o.push(-1));let W=[];for(let U=0;U<=v;U++){let q=0;this._align==="right"?q=g-n[U]:this._align==="center"?q=(g-n[U])/2:this._align==="justify"&&(q=o[U]<0?0:(g-n[U])/o[U]),W.push(q)}let j=s.length,I={},R=[],z=this._activePagesMeshData;h.push(...z);for(let U=0;U<j;U++){let q=s[U].texture,re=q.baseTexture.uid;if(!I[re]){let $=h.pop();if(!$){let Te=new on,ye,xe;r.distanceFieldType==="none"?(ye=new Ss(Se.EMPTY),xe=ke.NORMAL):(ye=new Ss(Se.EMPTY,{program:u0.from(_f,Tf),uniforms:{uFWidth:0}}),xe=ke.NORMAL_NPM);let De=new nn(Te,ye);De.blendMode=xe,$={index:0,indexCount:0,vertexCount:0,uvsCount:0,total:0,mesh:De,vertices:null,uvs:null,indices:null}}$.index=0,$.indexCount=0,$.vertexCount=0,$.uvsCount=0,$.total=0;let{_textureCache:Q}=this;Q[re]=Q[re]||new Se(q.baseTexture),$.mesh.texture=Q[re],$.mesh.tint=this._tintColor.value,R.push($),I[re]=$}I[re].total++}for(let U=0;U<z.length;U++)R.includes(z[U])||this.removeChild(z[U].mesh);for(let U=0;U<R.length;U++)R[U].mesh.parent!==this&&this.addChild(R[U].mesh);this._activePagesMeshData=R;for(let U in I){let q=I[U],re=q.total;if(!(q.indices?.length>6*re)||q.vertices.length<nn.BATCHABLE_SIZE*2)q.vertices=new Float32Array(4*2*re),q.uvs=new Float32Array(4*2*re),q.indices=new Uint16Array(6*re);else{let $=q.total,Q=q.vertices;for(let Te=$*4*2;Te<Q.length;Te++)Q[Te]=0}q.mesh.size=6*re}for(let U=0;U<j;U++){let q=s[U],re=q.position.x+W[q.line]*(this._align==="justify"?q.prevSpaces:1);this._roundPixels&&(re=Math.round(re));let $=re*t,Q=q.position.y*t,Te=q.texture,ye=I[Te.baseTexture.uid],xe=Te.frame,De=Te._uvs,_e=ye.index++;ye.indices[_e*6+0]=0+_e*4,ye.indices[_e*6+1]=1+_e*4,ye.indices[_e*6+2]=2+_e*4,ye.indices[_e*6+3]=0+_e*4,ye.indices[_e*6+4]=2+_e*4,ye.indices[_e*6+5]=3+_e*4,ye.vertices[_e*8+0]=$,ye.vertices[_e*8+1]=Q,ye.vertices[_e*8+2]=$+xe.width*t,ye.vertices[_e*8+3]=Q,ye.vertices[_e*8+4]=$+xe.width*t,ye.vertices[_e*8+5]=Q+xe.height*t,ye.vertices[_e*8+6]=$,ye.vertices[_e*8+7]=Q+xe.height*t,ye.uvs[_e*8+0]=De.x0,ye.uvs[_e*8+1]=De.y0,ye.uvs[_e*8+2]=De.x1,ye.uvs[_e*8+3]=De.y1,ye.uvs[_e*8+4]=De.x2,ye.uvs[_e*8+5]=De.y2,ye.uvs[_e*8+6]=De.x3,ye.uvs[_e*8+7]=De.y3}this._textWidth=g*t,this._textHeight=(i.y+r.lineHeight)*t;for(let U in I){let q=I[U];if(this.anchor.x!==0||this.anchor.y!==0){let Te=0,ye=this._textWidth*this.anchor.x,xe=this._textHeight*this.anchor.y;for(let De=0;De<q.total;De++)q.vertices[Te++]-=ye,q.vertices[Te++]-=xe,q.vertices[Te++]-=ye,q.vertices[Te++]-=xe,q.vertices[Te++]-=ye,q.vertices[Te++]-=xe,q.vertices[Te++]-=ye,q.vertices[Te++]-=xe}this._maxLineHeight=B*t;let re=q.mesh.geometry.getBuffer("aVertexPosition"),$=q.mesh.geometry.getBuffer("aTextureCoord"),Q=q.mesh.geometry.getIndex();re.data=q.vertices,$.data=q.uvs,Q.data=q.indices,re.update(),$.update(),Q.update()}for(let U=0;U<s.length;U++)kf.push(s[U]);this._font=r,this.dirty=!1}updateTransform(){this.validate(),this.containerUpdateTransform()}_render(r){this._autoResolution&&this._resolution!==r.resolution&&(this._resolution=r.resolution,this.dirty=!0);let{distanceFieldRange:e,distanceFieldType:t,size:i}=S0.available[this._fontName];if(t!=="none"){let{a:s,b:n,c:o,d:a}=this.worldTransform,l=Math.sqrt(s*s+n*n),c=Math.sqrt(o*o+a*a),h=(Math.abs(l)+Math.abs(c))/2,d=this.fontSize/i,p=r._view.resolution;for(let g of this._activePagesMeshData)g.mesh.shader.uniforms.uFWidth=h*e*d*p}super._render(r)}getLocalBounds(){return this.validate(),super.getLocalBounds()}validate(){let r=S0.available[this._fontName];if(!r)throw new Error(`Missing BitmapFont "${this._fontName}"`);this._font!==r&&(this.dirty=!0),this.dirty&&this.updateText()}get tint(){return this._tintColor.value}set tint(r){if(this.tint!==r){this._tintColor.setValue(r);for(let e=0;e<this._activePagesMeshData.length;e++)this._activePagesMeshData[e].mesh.tint=r}}get align(){return this._align}set align(r){this._align!==r&&(this._align=r,this.dirty=!0)}get fontName(){return this._fontName}set fontName(r){if(!S0.available[r])throw new Error(`Missing BitmapFont "${r}"`);this._fontName!==r&&(this._fontName=r,this.dirty=!0)}get fontSize(){return this._fontSize??S0.available[this._fontName].size}set fontSize(r){this._fontSize!==r&&(this._fontSize=r,this.dirty=!0)}get anchor(){return this._anchor}set anchor(r){typeof r=="number"?this._anchor.set(r):this._anchor.copyFrom(r)}get text(){return this._text}set text(r){r=String(r??""),this._text!==r&&(this._text=r,this.dirty=!0)}get maxWidth(){return this._maxWidth}set maxWidth(r){this._maxWidth!==r&&(this._maxWidth=r,this.dirty=!0)}get maxLineHeight(){return this.validate(),this._maxLineHeight}get textWidth(){return this.validate(),this._textWidth}get letterSpacing(){return this._letterSpacing}set letterSpacing(r){this._letterSpacing!==r&&(this._letterSpacing=r,this.dirty=!0)}get roundPixels(){return this._roundPixels}set roundPixels(r){r!==this._roundPixels&&(this._roundPixels=r,this.dirty=!0)}get textHeight(){return this.validate(),this._textHeight}get resolution(){return this._resolution}set resolution(r){this._autoResolution=!1,this._resolution!==r&&(this._resolution=r,this.dirty=!0)}destroy(r){let{_textureCache:e}=this,i=S0.available[this._fontName].distanceFieldType==="none"?Ff:Af;i.push(...this._activePagesMeshData);for(let s of this._activePagesMeshData)this.removeChild(s.mesh);this._activePagesMeshData=[],i.filter(s=>e[s.mesh.texture.baseTexture.uid]).forEach(s=>{s.mesh.texture=Se.EMPTY});for(let s in e)e[s].destroy(),delete e[s];this._font=null,this._tintColor=null,this._textureCache=null,super.destroy(r)}},Lf=If;Lf.styleDefaults={align:"left",tint:16777215,maxWidth:0,letterSpacing:0};var HS=[".xml",".fnt"],Mf={extension:{type:Z.LoadParser,priority:jt.Normal},name:"loadBitmapFont",test(r){return HS.includes(ae.path.extname(r).toLowerCase())},async testParse(r){return Ni.test(r)||ws.test(r)},async parse(r,e,t){let i=Ni.test(r)?Ni.parse(r):ws.parse(r),{src:s}=e,{page:n}=i,o=[];for(let c=0;c<n.length;++c){let h=n[c].file,d=ae.path.join(ae.path.dirname(s),h);d=ro(d,s),o.push(d)}let a=await t.load(o),l=o.map(c=>a[c]);return S0.install(i,l,!0)},async load(r,e){return(await K.ADAPTER.fetch(r)).text()},unload(r){r.destroy()}};te.add(Mf);var Ia=class extends s0{constructor(){super(...arguments),this._fonts=[],this._overrides=[],this._stylesheet="",this.fontsDirty=!1}static from(r){return new Ia(Object.keys(Ia.defaultOptions).reduce((e,t)=>({...e,[t]:r[t]}),{}))}cleanFonts(){this._fonts.length>0&&(this._fonts.forEach(r=>{URL.revokeObjectURL(r.src),r.refs--,r.refs===0&&(r.fontFace&&document.fonts.delete(r.fontFace),delete Ia.availableFonts[r.originalUrl])}),this.fontFamily="Arial",this._fonts.length=0,this.styleID++,this.fontsDirty=!0)}loadFont(r,e={}){let{availableFonts:t}=Ia;if(t[r]){let i=t[r];return this._fonts.push(i),i.refs++,this.styleID++,this.fontsDirty=!0,Promise.resolve()}return K.ADAPTER.fetch(r).then(i=>i.blob()).then(async i=>new Promise((s,n)=>{let o=URL.createObjectURL(i),a=new FileReader;a.onload=()=>s([o,a.result]),a.onerror=n,a.readAsDataURL(i)})).then(async([i,s])=>{let n=Object.assign({family:ae.path.basename(r,ae.path.extname(r)),weight:"normal",style:"normal",src:i,dataSrc:s,refs:1,originalUrl:r,fontFace:null},e);t[r]=n,this._fonts.push(n),this.styleID++;let o=new FontFace(n.family,`url(${n.src})`,{weight:n.weight,style:n.style});n.fontFace=o,await o.load(),document.fonts.add(o),await document.fonts.ready,this.styleID++,this.fontsDirty=!0})}addOverride(...r){let e=r.filter(t=>!this._overrides.includes(t));e.length>0&&(this._overrides.push(...e),this.styleID++)}removeOverride(...r){let e=r.filter(t=>this._overrides.includes(t));e.length>0&&(this._overrides=this._overrides.filter(t=>!e.includes(t)),this.styleID++)}toCSS(r){return[`transform: scale(${r})`,"transform-origin: top left","display: inline-block",`color: ${this.normalizeColor(this.fill)}`,`font-size: ${this.fontSize}px`,`font-family: ${this.fontFamily}`,`font-weight: ${this.fontWeight}`,`font-style: ${this.fontStyle}`,`font-variant: ${this.fontVariant}`,`letter-spacing: ${this.letterSpacing}px`,`text-align: ${this.align}`,`padding: ${this.padding}px`,`white-space: ${this.whiteSpace}`,...this.lineHeight?[`line-height: ${this.lineHeight}px`]:[],...this.wordWrap?[`word-wrap: ${this.breakWords?"break-all":"break-word"}`,`max-width: ${this.wordWrapWidth}px`]:[],...this.strokeThickness?[`-webkit-text-stroke-width: ${this.strokeThickness}px`,`-webkit-text-stroke-color: ${this.normalizeColor(this.stroke)}`,`text-stroke-width: ${this.strokeThickness}px`,`text-stroke-color: ${this.normalizeColor(this.stroke)}`,"paint-order: stroke"]:[],...this.dropShadow?[this.dropShadowToCSS()]:[],...this._overrides].join(";")}toGlobalCSS(){return this._fonts.reduce((r,e)=>`${r}
|
|
@font-face {
|
|
font-family: "${e.family}";
|
|
src: url('${e.dataSrc}');
|
|
font-weight: ${e.weight};
|
|
font-style: ${e.style};
|
|
}`,this._stylesheet)}get stylesheet(){return this._stylesheet}set stylesheet(r){this._stylesheet!==r&&(this._stylesheet=r,this.styleID++)}normalizeColor(r){return Array.isArray(r)&&(r=ae.rgb2hex(r)),typeof r=="number"?ae.hex2string(r):r}dropShadowToCSS(){let r=this.normalizeColor(this.dropShadowColor),e=this.dropShadowAlpha,t=Math.round(Math.cos(this.dropShadowAngle)*this.dropShadowDistance),i=Math.round(Math.sin(this.dropShadowAngle)*this.dropShadowDistance);r.startsWith("#")&&e<1&&(r+=(e*255|0).toString(16).padStart(2,"0"));let s=`${t}px ${i}px`;return this.dropShadowBlur>0?`text-shadow: ${s} ${this.dropShadowBlur}px ${r}`:`text-shadow: ${s} ${r}`}reset(){Object.assign(this,Ia.defaultOptions)}onBeforeDraw(){let{fontsDirty:r}=this;return this.fontsDirty=!1,this.isSafari&&this._fonts.length>0&&r?new Promise(e=>setTimeout(e,100)):Promise.resolve()}get isSafari(){let{userAgent:r}=K.ADAPTER.getNavigator();return/^((?!chrome|android).)*safari/i.test(r)}set fillGradientStops(r){console.warn("[HTMLTextStyle] fillGradientStops is not supported by HTMLText")}get fillGradientStops(){return super.fillGradientStops}set fillGradientType(r){console.warn("[HTMLTextStyle] fillGradientType is not supported by HTMLText")}get fillGradientType(){return super.fillGradientType}set miterLimit(r){console.warn("[HTMLTextStyle] miterLimit is not supported by HTMLText")}get miterLimit(){return super.miterLimit}set trim(r){console.warn("[HTMLTextStyle] trim is not supported by HTMLText")}get trim(){return super.trim}set textBaseline(r){console.warn("[HTMLTextStyle] textBaseline is not supported by HTMLText")}get textBaseline(){return super.textBaseline}set leading(r){console.warn("[HTMLTextStyle] leading is not supported by HTMLText")}get leading(){return super.leading}set lineJoin(r){console.warn("[HTMLTextStyle] lineJoin is not supported by HTMLText")}get lineJoin(){return super.lineJoin}},lo=Ia;lo.availableFonts={};lo.defaultOptions={align:"left",breakWords:!1,dropShadow:!1,dropShadowAlpha:1,dropShadowAngle:Math.PI/6,dropShadowBlur:0,dropShadowColor:"black",dropShadowDistance:5,fill:"black",fontFamily:"Arial",fontSize:26,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0,lineHeight:0,padding:0,stroke:"black",strokeThickness:0,whiteSpace:"normal",wordWrap:!1,wordWrapWidth:100};var La=class extends Lt{constructor(r="",e={}){super(Se.EMPTY),this._text=null,this._style=null,this._autoResolution=!0,this._loading=!1,this.localStyleID=-1,this.dirty=!1,this.ownsStyle=!1;let t=new Image,i=Se.from(t,{scaleMode:K.SCALE_MODE,resourceOptions:{autoLoad:!1}});i.orig=new Ie,i.trim=new Ie,this.texture=i;let s="http://www.w3.org/2000/svg",n="http://www.w3.org/1999/xhtml",o=document.createElementNS(s,"svg"),a=document.createElementNS(s,"foreignObject"),l=document.createElementNS(n,"div"),c=document.createElementNS(n,"style");a.setAttribute("width","10000"),a.setAttribute("height","10000"),a.style.overflow="hidden",o.appendChild(a),this.maxWidth=La.defaultMaxWidth,this.maxHeight=La.defaultMaxHeight,this._domElement=l,this._styleElement=c,this._svgRoot=o,this._foreignObject=a,this._foreignObject.appendChild(c),this._foreignObject.appendChild(l),this._image=t,this._loadImage=new Image,this._autoResolution=La.defaultAutoResolution,this._resolution=La.defaultResolution??K.RESOLUTION,this.text=r,this.style=e}measureText(r){let{text:e,style:t,resolution:i}=Object.assign({text:this._text,style:this._style,resolution:this._resolution},r);Object.assign(this._domElement,{innerHTML:e,style:t.toCSS(i)}),this._styleElement.textContent=t.toGlobalCSS(),document.body.appendChild(this._svgRoot);let s=this._domElement.getBoundingClientRect();this._svgRoot.remove();let n=Math.min(this.maxWidth,Math.ceil(s.width)),o=Math.min(this.maxHeight,Math.ceil(s.height));return this._svgRoot.setAttribute("width",n.toString()),this._svgRoot.setAttribute("height",o.toString()),e!==this._text&&(this._domElement.innerHTML=this._text),t!==this._style&&(Object.assign(this._domElement,{style:this._style?.toCSS(i)}),this._styleElement.textContent=this._style?.toGlobalCSS()),{width:n+t.padding*2,height:o+t.padding*2}}async updateText(r=!0){let{style:e,_image:t,_loadImage:i}=this;if(this.localStyleID!==e.styleID&&(this.dirty=!0,this.localStyleID=e.styleID),!this.dirty&&r)return;let{width:s,height:n}=this.measureText();t.width=i.width=Math.ceil(Math.max(1,s)),t.height=i.height=Math.ceil(Math.max(1,n)),this._loading||(this._loading=!0,await new Promise(o=>{i.onload=async()=>{await e.onBeforeDraw(),this._loading=!1,t.src=i.src,i.onload=null,i.src="",this.updateTexture(),o()};let a=new XMLSerializer().serializeToString(this._svgRoot);i.src=`data:image/svg+xml;charset=utf8,${encodeURIComponent(a)}`}))}get source(){return this._image}updateTexture(){let{style:r,texture:e,_image:t,resolution:i}=this,{padding:s}=r,{baseTexture:n}=e;e.trim.width=e._frame.width=t.width/i,e.trim.height=e._frame.height=t.height/i,e.trim.x=-s,e.trim.y=-s,e.orig.width=e._frame.width-s*2,e.orig.height=e._frame.height-s*2,this._onTextureUpdate(),n.setRealSize(t.width,t.height,i),this.dirty=!1}_render(r){this._autoResolution&&this._resolution!==r.resolution&&(this._resolution=r.resolution,this.dirty=!0),this.updateText(!0),super._render(r)}_renderCanvas(r){this._autoResolution&&this._resolution!==r.resolution&&(this._resolution=r.resolution,this.dirty=!0),this.updateText(!0),super._renderCanvas(r)}getLocalBounds(r){return this.updateText(!0),super.getLocalBounds(r)}_calculateBounds(){this.updateText(!0),this.calculateVertices(),this._bounds.addQuad(this.vertexData)}_onStyleChange(){this.dirty=!0}destroy(r){typeof r=="boolean"&&(r={children:r}),r=Object.assign({},La.defaultDestroyOptions,r),super.destroy(r);let e=null;this.ownsStyle&&this._style?.cleanFonts(),this._style=e,this._svgRoot?.remove(),this._svgRoot=e,this._domElement?.remove(),this._domElement=e,this._foreignObject?.remove(),this._foreignObject=e,this._styleElement?.remove(),this._styleElement=e,this._loadImage.src="",this._loadImage.onload=null,this._loadImage=e,this._image.src="",this._image=e}get width(){return this.updateText(!0),Math.abs(this.scale.x)*this._image.width/this.resolution}set width(r){this.updateText(!0);let e=ae.sign(this.scale.x)||1;this.scale.x=e*r/this._image.width/this.resolution,this._width=r}get height(){return this.updateText(!0),Math.abs(this.scale.y)*this._image.height/this.resolution}set height(r){this.updateText(!0);let e=ae.sign(this.scale.y)||1;this.scale.y=e*r/this._image.height/this.resolution,this._height=r}get style(){return this._style}set style(r){this._style!==r&&(r=r||{},r instanceof lo?(this.ownsStyle=!1,this._style=r):r instanceof s0?(console.warn("[HTMLText] Cloning TextStyle, if this is not what you want, use HTMLTextStyle"),this.ownsStyle=!0,this._style=lo.from(r)):(this.ownsStyle=!0,this._style=new lo(r)),this.localStyleID=-1,this.dirty=!0)}get text(){return this._text}set text(r){r=String(r===""||r===null||r===void 0?" ":r),r=this.sanitiseText(r),this._text!==r&&(this._text=r,this.dirty=!0)}get resolution(){return this._resolution}set resolution(r){this._autoResolution=!1,this._resolution!==r&&(this._resolution=r,this.dirty=!0)}sanitiseText(r){return r.replace(/<br>/gi,"<br/>").replace(/<hr>/gi,"<hr/>").replace(/ /gi," ")}},Nc=La;Nc.defaultDestroyOptions={texture:!0,children:!1,baseTexture:!0};Nc.defaultMaxWidth=2024;Nc.defaultMaxHeight=2024;Nc.defaultAutoResolution=!0;function Vn(r){return os(r[0],r[1],r[2])}function Nf(r){return h0(Vn(r))}function h0(r){return as(r)}function Vr(r){return Ti(r).rgb}function cn(r,e="black",t="white"){return $0(r)*.299+q0(r)*.587+Y0(r)*.114>150?e:t}function Pi(r){return new Me(r).toNumber()}function Pf(r){return new Me(r).toHex()}function Ma(r){if(typeof r=="string")return Vr(r);if(typeof r=="number")return r;if(Array.isArray(r)){let e=r[Math.floor(r.length/2)];if(typeof e=="string")return Vr(e);if(typeof e=="number")return e}else if(r instanceof CanvasGradient||r instanceof CanvasPattern){let e=document.createElement("canvas"),t=e.getContext("2d");if(t){e.width=100,e.height=100,t.fillStyle=r,t.fillRect(0,0,100,100);let i=t.getImageData(Math.floor(e.width/2),Math.floor(e.height/2),1,1);return Vn([i.data[0],i.data[1],i.data[2]])}e.detach()}}function Na(r,e,t){let i=r.getContext("2d");if(!i)return;let s=X0(e,t);s&&(i.clearRect(0,0,r.width,r.height),Pa(r,s.reverse,s.interpolate,s.colors,s.stops))}function Pa(r,e,t,i,s){let n=r.getContext("2d");if(!n)return;n.clearRect(0,0,r.width,r.height);let{colors:o,stops:a}=Tp(i,s);if(t){let l=n.createLinearGradient(0,0,r.width,0);for(let c=0;c<o.length;++c){let h=a[c];l.addColorStop(h,as(o[c]))}n.fillStyle=l,n.fillRect(0,0,r.width,r.height)}else for(let l=0;l<o.length;++l){let c=l===0?0:a[l],h=l===o.length-1?1:a[Math.min(l+1,a.length-1)];n.fillStyle=as(o[l]),n.fillRect(c*r.width,0,h*r.width,r.height)}r.addClass("palette-canvas"),r.toggleClass("reversed",e)}function Cd(){return s8.random(50,95)}var ln=class ln{constructor(){}static random(e=50,t=95){return ln.h+=ln.goldenRatioConjugate,ln.h%=1,mh.hsl(Math.floor(ln.h*360),e,t).num()}};ln.goldenRatioConjugate=.618033988749895,ln.h=Math.random();var s8=ln;function Bf(r){let e=document.createElement("canvas"),t=e.getContext("2d");if(t){e.width=30,e.height=30,t.font='20px "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji", "Android Emoji", EmojiSymbols, Symbola, "Twemoji Mozilla", "Twemoji Mozilla Color Emoji", "Twemoji Mozilla Color Emoji 13.1.0"',t.textAlign="center",t.textBaseline="middle",t.fillText(r,e.width/2,e.height/2);let s=t.getImageData(0,0,e.width,e.height).data,n=0,o=0,a=0,l=0;for(let p=0;p<s.length;p+=4)s[p+3]>0&&(n+=s[p],o+=s[p+1],a+=s[p+2],l++);let c=Math.round(n/l),h=Math.round(o/l),d=Math.round(a/l);return Vn([c,h,d])}}function i8(r,e,t){return t===void 0&&(t=.9),r*t+e*(1-t)}function Ba(r,e){return os(i8($0(r),$0(e)),i8(q0(r),q0(e)),i8(Y0(r),Y0(e)))}var Of=require("obsidian");var Rf="extended-graph-css-div",ue=class ue extends Of.Component{constructor(e){super(),this.instances=e}onload(){ue.computeBackgroundColor(this.instances.renderer),this.createStyleElementsForCSSBridge()}createStyleElementsForCSSBridge(){if(!this.instances.settings.enableCSS||!u.app.customCss.enabledSnippets.has(u.settings.cssSnippetFilename))return;let e=this.instances.renderer.iframeEl.contentDocument;e&&(this.removeStylingForCSSBridge(),this.instances.coreStyleEl=e.createElement("style"),this.instances.coreStyleEl.setAttribute("type","text/css"),e.head.appendChild(this.instances.coreStyleEl),this.instances.extendedStyleEl=e.createElement("style"),this.instances.extendedStyleEl.setAttribute("type","text/css"),e.head.appendChild(this.instances.extendedStyleEl),this.computeStylingFromCSSBridge())}onunload(){this.removeStylingForCSSBridge()}removeStylingForCSSBridge(){this.instances.coreStyleEl?.remove(),this.instances.extendedStyleEl?.remove()}onCSSChange(){ue.computeBackgroundColor(this.instances.renderer),this.computeStylingFromCSSBridge(),this.instances.nodesSet&&(this.instances.nodesSet.onCSSChange(),this.instances.linksSet.onCSSChange(),this.instances.settings.enableCSS&&this.instances.foldersSet?.onCSSChange(),this.instances.renderer.changed())}computeStylingFromCSSBridge(){this.applyCSSStyle(),this.instances.stylesData={nodeText:this.getNodeTextStyle(),folder:this.getFolderStyle()}}applyCSSStyle(){this.applyCoreCSSStyle(),this.applyExtendedCSSStyle()}applyCoreCSSStyle(){if(!this.instances.coreStyleEl)return;let e=this.instances.renderer.colors,t=`
|
|
.graph-view.color-fill {
|
|
color: ${ue.colorAttributes2hex(e.fill)};
|
|
}
|
|
.graph-view.color-fill-focused {
|
|
color: ${ue.colorAttributes2hex(e.fillFocused)};
|
|
}
|
|
.graph-view.color-fill-tag {
|
|
color: ${ue.colorAttributes2hex(e.fillTag)};
|
|
}
|
|
.graph-view.color-fill-attachment {
|
|
color: ${ue.colorAttributes2hex(e.fillAttachment)};
|
|
}
|
|
.graph-view.color-fill-unresolved {
|
|
color: ${ue.colorAttributes2hex(e.fillUnresolved)};
|
|
opacity: ${e.fillUnresolved.a};
|
|
}
|
|
.graph-view.color-arrow {
|
|
color: ${ue.colorAttributes2hex(e.arrow)};
|
|
opacity: ${e.arrow.a};
|
|
}
|
|
.graph-view.color-circle {
|
|
color: ${ue.colorAttributes2hex(e.fillFocused)};
|
|
}
|
|
.graph-view.color-line {
|
|
color: ${ue.colorAttributes2hex(e.line)};
|
|
}
|
|
.graph-view.color-text {
|
|
color: ${ue.colorAttributes2hex(e.text)};
|
|
}
|
|
.graph-view.color-fill-highlight {
|
|
color: ${ue.colorAttributes2hex(e.fillHighlight)};
|
|
}
|
|
.graph-view.color-line-highlight {
|
|
color: ${ue.colorAttributes2hex(e.lineHighlight)};
|
|
}
|
|
body {
|
|
font-family: ${getComputedStyle(this.instances.renderer.interactiveEl).fontFamily};
|
|
}`;this.instances.coreStyleEl.innerHTML=t}applyExtendedCSSStyle(){if(!this.instances.extendedStyleEl)return;let e=`
|
|
.graph-view.node-text {
|
|
font-family: ${ue.DEFAULT_TEXT_STYLE.fontFamily};
|
|
font-size: ${ue.DEFAULT_TEXT_STYLE.fontSize};
|
|
font-style: ${ue.DEFAULT_TEXT_STYLE.fontStyle};
|
|
font-variant: ${ue.DEFAULT_TEXT_STYLE.fontVariant};
|
|
font-weight: ${ue.DEFAULT_TEXT_STYLE.fontWeight};
|
|
letter-spacing: ${ue.DEFAULT_TEXT_STYLE.letterSpacing}px;
|
|
}
|
|
.graph-view.link-text {
|
|
font-family: ${ue.DEFAULT_LINK_LABEL_STYLE.textStyle.fontFamily};
|
|
font-size: ${ue.DEFAULT_LINK_LABEL_STYLE.textStyle.fontSize};
|
|
font-style: ${ue.DEFAULT_LINK_LABEL_STYLE.textStyle.fontStyle};
|
|
font-variant: ${ue.DEFAULT_LINK_LABEL_STYLE.textStyle.fontVariant};
|
|
font-weight: ${ue.DEFAULT_LINK_LABEL_STYLE.textStyle.fontWeight};
|
|
letter-spacing: ${ue.DEFAULT_LINK_LABEL_STYLE.textStyle.letterSpacing}px;
|
|
|
|
border-radius: ${ue.DEFAULT_LINK_LABEL_STYLE.radius}px;
|
|
border-width: ${ue.DEFAULT_LINK_LABEL_STYLE.borderWidth}px;
|
|
border-color: ${ue.colorAttributes2hex(ue.DEFAULT_LINK_LABEL_STYLE.borderColor)};
|
|
padding: ${ue.DEFAULT_LINK_LABEL_STYLE.padding.top}px ${ue.DEFAULT_LINK_LABEL_STYLE.padding.right}px ${ue.DEFAULT_LINK_LABEL_STYLE.padding.bottom}px ${ue.DEFAULT_LINK_LABEL_STYLE.padding.left}px;
|
|
background-color: ${ue.colorAttributes2hex(ue.DEFAULT_LINK_LABEL_STYLE.backgroundColor)};
|
|
}
|
|
.graph-view.folder {
|
|
font-family: ${ue.DEFAULT_FOLDER_STYLE.textStyle.textStyle.fontFamily};
|
|
font-size: ${ue.DEFAULT_FOLDER_STYLE.textStyle.textStyle.fontSize}px;
|
|
font-style: ${ue.DEFAULT_FOLDER_STYLE.textStyle.textStyle.fontStyle};
|
|
font-variant: ${ue.DEFAULT_FOLDER_STYLE.textStyle.textStyle.fontVariant};
|
|
font-weight: ${ue.DEFAULT_FOLDER_STYLE.textStyle.textStyle.fontWeight};
|
|
letter-spacing: ${ue.DEFAULT_FOLDER_STYLE.textStyle.textStyle.letterSpacing}px;
|
|
text-align: ${ue.DEFAULT_FOLDER_STYLE.textStyle.align};
|
|
|
|
border-radius: ${ue.DEFAULT_FOLDER_STYLE.radius}px;
|
|
border-width: ${ue.DEFAULT_FOLDER_STYLE.borderWidth}px;
|
|
opacity: ${ue.DEFAULT_FOLDER_STYLE.fillOpacity};
|
|
padding: ${ue.DEFAULT_FOLDER_STYLE.padding.top}px ${ue.DEFAULT_FOLDER_STYLE.padding.right}px ${ue.DEFAULT_FOLDER_STYLE.padding.bottom}px ${ue.DEFAULT_FOLDER_STYLE.padding.left}px;
|
|
}`,t=u.settings.cssSnippetFilename;if(!u.app.customCss.enabledSnippets.has(t))return;let i=[...u.app.customCss.csscache.entries()].find(s=>fi(s[0],".css").basename===t);i&&(this.instances.extendedStyleEl.innerHTML=e+`
|
|
`+i[1])}getGraphComputedStyle(e,t={}){if(!this.instances.extendedStyleEl)return;let i=this.instances.type==="localgraph"?"graph-local":"graph-global";this.detachCSSDiv();let s=this.instances.extendedStyleEl.ownerDocument.createElement("div",{});if(this.instances.extendedStyleEl.ownerDocument.body.appendChild(s),s.classList.add("graph-view",i,e),s.id=Rf,this.instances.type==="localgraph"){let o=this.instances.view;o.file&&s.setAttribute("data-focus-file",o.file.path)}return t.path&&s.setAttribute("data-path",t.path),t.source&&s.setAttribute("data-source",t.source),t.target&&s.setAttribute("data-target",t.target),t.isCurrent&&s.classList.add("is-current"),s.style.borderStyle="solid",getComputedStyle(s)}getTextStyle(e,t={}){if(!this.instances.extendedStyleEl)return ue.DEFAULT_TEXT_STYLE;let i=this.getGraphComputedStyle(e,t);if(!i)return ue.DEFAULT_TEXT_STYLE;let s=i.fontFamily,n=this.getUnitlessValue(i.fontSize,ue.DEFAULT_TEXT_STYLE.fontSize),o=i.fontStyle.toLowerCase();["normal","italic","oblique"].contains(o)||(o=ue.DEFAULT_TEXT_STYLE.fontStyle);let a=i.fontVariant.toLowerCase();["normal","small-caps"].contains(a)||(a=ue.DEFAULT_TEXT_STYLE.fontVariant);let l=i.fontWeight.toLowerCase();["normal","bold","bolder","lighter","100","200","300","400","500","600","700","800","900"].contains(l)||(l=ue.DEFAULT_TEXT_STYLE.fontWeight);let c=this.getTextShadow(i),h=this.getTextStroke(i),d=this.getUnitlessValue(i.letterSpacing,ue.DEFAULT_TEXT_STYLE.letterSpacing),p=this.getGraphComputedStyle("color-text",t)?.color??ue.DEFAULT_TEXT_STYLE.fill,g={fontFamily:s,fontSize:n,fontStyle:o,fontVariant:a,fontWeight:l,letterSpacing:d,fill:p,dropShadow:c,stroke:h};return this.detachCSSDiv(),g}getNodeTextStyle(e){return this.getTextStyle("node-text",{path:e,isCurrent:e&&this.instances.type==="localgraph"?this.instances.nodesSet.extendedElementsMap.get(e)?.isCurrentNode:void 0})}getLinkLabelStyle(e={}){let t=this.getTextStyle("link-text",e),i=this.getGraphComputedStyle("link-text",e);if(!i)return ue.DEFAULT_LINK_LABEL_STYLE;let s=this.getUnitlessValue(i.borderRadius,ue.DEFAULT_LINK_LABEL_STYLE.radius),n=this.getUnitlessValue(i.borderWidth,ue.DEFAULT_LINK_LABEL_STYLE.borderWidth),o={left:this.getUnitlessValue(i.paddingLeft,ue.DEFAULT_LINK_LABEL_STYLE.padding.left),top:this.getUnitlessValue(i.paddingTop,ue.DEFAULT_LINK_LABEL_STYLE.padding.top),right:this.getUnitlessValue(i.paddingRight,ue.DEFAULT_LINK_LABEL_STYLE.padding.right),bottom:this.getUnitlessValue(i.paddingBottom,ue.DEFAULT_LINK_LABEL_STYLE.padding.bottom)};return{textStyle:t,borderWidth:n,padding:o,radius:s,backgroundColor:si(i.backgroundColor),borderColor:si(i.borderColor)}}getFolderStyle(e){let t=this.getTextStyle("folder",{path:e}),i=this.getGraphComputedStyle("folder",{path:e});if(!i)return ue.DEFAULT_FOLDER_STYLE;let s=i.textAlign.toLowerCase();["left","center","right"].contains(s)||(s=ue.DEFAULT_FOLDER_STYLE.textStyle.align);let n=this.getUnitlessValue(i.borderRadius,ue.DEFAULT_FOLDER_STYLE.radius),o=this.getUnitlessValue(i.borderWidth,ue.DEFAULT_FOLDER_STYLE.borderWidth),a={left:this.getUnitlessValue(i.paddingLeft,ue.DEFAULT_FOLDER_STYLE.padding.left),top:this.getUnitlessValue(i.paddingTop,ue.DEFAULT_FOLDER_STYLE.padding.top),right:this.getUnitlessValue(i.paddingRight,ue.DEFAULT_FOLDER_STYLE.padding.right),bottom:this.getUnitlessValue(i.paddingBottom,ue.DEFAULT_FOLDER_STYLE.padding.bottom)},l=i.opacity.toLowerCase(),c=ue.DEFAULT_FOLDER_STYLE.fillOpacity;c=parseFloat(l.toLowerCase()),isNaN(c)?c=ue.DEFAULT_FOLDER_STYLE.fillOpacity:c=Math.clamp(c,0,1);let h=Math.min(c*15,1),d={textStyle:{textStyle:t,align:s},radius:n,borderWidth:o,fillOpacity:c,strokeOpacity:h,padding:a};return this.detachCSSDiv(),d}detachCSSDiv(){this.instances.extendedStyleEl?.ownerDocument.getElementById(Rf)?.remove()}getUnitlessValue(e,t){e=e.toLowerCase();let i=t;return i=parseFloat(e.substring(0,e.length-2)),isNaN(i)&&(i=t),i}getTextShadow(e){let t=e.textShadow;if(!t||t==="none")return;let i=t.match(/((^rgba?\(\d+,\s?\d+,\s?\d+(?:,\s?\d+(?:\.\d+)?)?\))(.*))*/);if(!i)return;let s=si(i[2]),n=i[3].split(",")[0].trim().split(" ");if(n.length!==3)return;let o=this.getUnitlessValue(n[0],0),a=this.getUnitlessValue(n[1],0),l=e.getPropertyValue("--text-shadow-current-color");return{distance:Math.sqrt(o*o+a*a),angle:Math.atan2(a,o),blur:this.getUnitlessValue(n[2],0),color:s.rgb,alpha:s.a,offsetX:o,offsetY:a,useCurrentColor:["true","currentcolor"].contains(l.toLowerCase())}}getTextStroke(e){let t=this.getUnitlessValue(e.webkitTextStrokeWidth,0);if(!(t<=0)){if(e.webkitTextStrokeColor){let i=si(e.webkitTextStrokeColor);return{width:t,color:i.a>0?i.rgb:ue.backgroundColor}}return{width:t,color:ue.backgroundColor}}}getPrimaryColor(){return si(window.getComputedStyle(this.instances.renderer.interactiveEl).getPropertyValue("--color-base-100")).rgb}getSearchColor(){return si(window.getComputedStyle(this.instances.renderer.interactiveEl).getPropertyValue("--text-highlight-bg")).rgb}getThemeColor(e){return si(window.getComputedStyle(this.instances.renderer.interactiveEl).getPropertyValue("--color-"+e)).rgb}static isNodeTextStyleDefault(e){return e.fontStyle==="normal"&&e.fontVariant==="normal"&&e.fontWeight==="normal"&&e.letterSpacing===0}static colorAttributes2hex(e){return as(e.rgb,e.a)}static getCSSSplitRGB(e){return`${$0(e)}, ${q0(e)}, ${Y0(e)}`}static applyTextShadow(e,t,i){e.dropShadow=!0,e.dropShadowAlpha=t.alpha,e.dropShadowBlur=t.blur,e.dropShadowColor=t.useCurrentColor?i:t.color,e.dropShadowDistance=0,e.dropShadowAngle=0,e.padding=t.blur}static applyTextStroke(e,t){t.width<=0||(e.stroke=t.color,e.strokeThickness=t.width,e.lineJoin="round")}static computeBackgroundColor(e){let t=window.getComputedStyle(e.interactiveEl).backgroundColor,i=e.interactiveEl;for(;t.startsWith("rgba(")&&t.endsWith(", 0)")&&i.parentElement;)i=i.parentElement,t=window.getComputedStyle(i).backgroundColor;return ue.backgroundColor=si(t).rgb,ue.backgroundColor}};ue.DEFAULT_TEXT_STYLE={fontFamily:'ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Inter", "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Microsoft YaHei Light", sans-serif',fontSize:14,fontStyle:"normal",fontVariant:"normal",fontWeight:"normal",letterSpacing:0},ue.DEFAULT_FOLDER_STYLE={textStyle:{textStyle:ue.DEFAULT_TEXT_STYLE,align:"center"},radius:50,borderWidth:2,fillOpacity:.03,strokeOpacity:.03*15,padding:{left:0,top:0,right:0,bottom:0}},ue.DEFAULT_LINK_LABEL_STYLE={textStyle:ue.DEFAULT_TEXT_STYLE,radius:0,borderWidth:0,padding:{left:0,top:0,right:0,bottom:0},borderColor:{rgb:0,a:0},backgroundColor:{rgb:0,a:0}};var $e=ue;var Gf=require("obsidian");var wd=class extends Gf.Component{constructor(e){super(),this.instances=e,this.instances.graph=this,this.initializeInteractiveManagers(),this.instances.settings.enableFeatures[this.instances.type].layers&&(this.instances.layersManager=new co(this.instances)),this.instances.nodesSet=new Ad(this.instances,this.getNodeManagers()),this.instances.linksSet=new Fd(this.instances,this.getLinkManagers()),e.settings.enableFeatures[e.type].folders&&(this.instances.foldersSet=new _d(this.instances,this.getFolderManagers())),this.overrideOnOptionsChange()}initializeInteractiveManagers(){let e=this.getInteractiveManagerKeys();for(let t of e){let i=new Td(this.instances,t);this.instances.interactiveManagers.set(t,i),this.addChild(i)}}getInteractiveManagerKeys(){let e=[];if(this.instances.settings.enableFeatures[this.instances.type].properties)for(let t in this.instances.settings.additionalProperties)this.instances.settings.additionalProperties[t][this.instances.type]&&e.push(t);return this.instances.settings.enableFeatures[this.instances.type].tags&&e.push(He),this.instances.settings.enableFeatures[this.instances.type].links&&e.push(ne),this.instances.settings.enableFeatures[this.instances.type].folders&&e.push(pe),e}getNodeManagers(){return Array.from(this.instances.interactiveManagers.values()).filter(e=>e.name!==ne&&e.name!==pe)}getLinkManagers(){let e=this.instances.interactiveManagers.get(ne);return e?[e]:[]}getFolderManagers(){let e=this.instances.interactiveManagers.get(pe);return e?[e]:[]}overrideOnOptionsChange(){this.onOptionsChangeOriginal=this.instances.view.onOptionsChange,this.instances.view.onOptionsChange=()=>{}}onload(){this.initSets().then(()=>{this.instances.graphEventsDispatcher.onGraphReady()}).catch(e=>{console.error(e)})}async initSets(){await this.delay(this.instances.settings.delay),this.instances.nodesSet.load(),this.instances.linksSet.load(),this.instances.foldersSet?.load()}delay(e){return new Promise(t=>setTimeout(t,e))}onunload(){this.restoreOriginalFunctions(),this.instances.layersManager?.unload(),this.instances.nodesSet.unload(),this.instances.linksSet.unload(),this.instances.foldersSet?.unload()}restoreOriginalFunctions(){this.instances.view.onOptionsChange=this.onOptionsChangeOriginal}disableLinkTypes(e){for(let t of e)this.instances.linksSet.disableType(ne,t)}enableLinkTypes(e){for(let t of e)this.instances.linksSet.enableType(ne,t)}disableNodeInteractiveTypes(e,t){let i=[];for(let s of t)i=i.concat(this.instances.nodesSet.disableType(e,s));if(this.instances.settings.fadeOnDisable&&i.length>0)this.fadeOutNodes(i);else if(i.length>0){let s=[...this.instances.linksSet.extendedElementsMap.values()].filter(n=>(i.includes(n.coreElement.source.id)||i.includes(n.coreElement.target.id))&&n.isEnabled);for(let n of s)n.disable()}}enableNodeInteractiveTypes(e,t){let i=[];for(let s of t)i=i.concat(this.instances.nodesSet.enableType(e,s));this.instances.settings.fadeOnDisable&&i.length>0&&this.fadeInNodes(i)}fadeOutNodes(e){for(let t of e){let i=this.instances.nodesSet.extendedElementsMap.get(t);i&&i.graphicsWrapper?.makeFaded()}return!1}fadeInNodes(e){for(let t of e){let i=this.instances.nodesSet.extendedElementsMap.get(t);i&&i.graphicsWrapper?.makeOpaque()}return!1}};var uo=require("obsidian");var Zf=St(kd()),Qf=St(Ld());var Md=class{constructor(e){this.instances=e}filterData(e){this.excludeNodes(e),this.addExternalLinks(e);let t=[],i=[],s=Object.entries(e.nodes);for(let[n,o]of s){if(this.flagAsPotentialOrphan(o,n,i))continue;let a=qe(n);if(!(a&&(this.filterLinksByFolders(o,n,i)||(this.ignoreInlineLinks(a,o),this.filterLinksByTypes(a,o,n,t),this.flagAsPotentialOrphan(o,n,i))))){for(let l of t)delete e.nodes[l];t=[]}}return e=this.filterOrphans(e,i),u.graphsManager.updateStatusBarItem(this.instances.view.leaf,Object.keys(e.nodes).length),e}excludeNodes(e){let t=[];for(let[s,n]of Object.entries(e.nodes))this.shouldRemoveNode(s,n)&&t.push(s);let i=Object.keys(e.nodes).filter(s=>!t.includes(s));for(let s of t){delete e.nodes[s];for(let n of i.filter(o=>s in e.nodes[o].links))delete e.nodes[n].links[s]}}shouldRemoveNode(e,t){for(let i of this.instances.settings.filterAbstractFiles)if(new RegExp(i.regex,i.flag).test(e))return!0;if(this.instances.settings.enableFeatures[this.instances.type].layers&&this.instances.layersManager?.isEnabled&&(this.instances.settings.nodesWithoutLayerOpacity===0&&this.instances.layersManager.notInLayers.nodeIDs.contains(e)||this.instances.layersManager.nodeLookup[e]?.group.alpha===0))return!0;if(!this.instances.settings.fadeOnDisable){let i=qe(e);if(i)for(let[s,n]of this.instances.nodesSet.managers){let o=ct(s,i,this.instances.settings);if(o.size===0&&o.add(this.instances.settings.interactiveSettings[s].noneType),o.size>0&&!n.isActiveBasedOnTypes([...o]))return!0}else if(t.type==="tag"&&this.instances.settings.enableFeatures[this.instances.type].tags){let s=this.instances.interactiveManagers.get(He);if(s&&!s.isActiveBasedOnTypes([e.replace("#","")]))return!0}}return!1}filterOrphans(e,t){if(!this.instances.engine.options.showOrphans){let n=Object.values(e.nodes);for(let o of t)n.find(a=>o in a.links)||delete e.nodes[o]}let i=Object.values(e.nodes),s=Object.entries(e.nodes).filter(([n,o])=>(o.type==="unresolved"||o.type==="tag")&&!i.find(a=>n in a.links));for(let n of s)delete e.nodes[n[0]];return e}filterLinksByFolders(e,t,i){let s=(o,a)=>Jf(a)?.test(o)??o.startsWith(a);if(this.instances.settings.enableFeatures[this.instances.type].links&&this.instances.settings.excludedSourcesFolder.find(o=>s(t,o)))return e.links={},!0;let n=Object.keys(e.links);for(let o of n)this.instances.settings.enableFeatures[this.instances.type].links&&this.instances.settings.excludedTargetsFolder.find(a=>s(o,a))&&delete e.links[o];return Object.keys(e.links).length===0?(this.instances.engine.options.showOrphans||i.push(t),!0):!1}ignoreInlineLinks(e,t){if(!this.instances.settings.ignoreInlineLinks||!t.links)return;let i=u.app.metadataCache.getFileCache(e)?.frontmatterLinks;if(!i){t.links={};return}let s=i.map(n=>u.app.metadataCache.getFirstLinkpathDest(n.link,e.path)?.path??n.link);for(let n of Object.keys(t.links))s.contains(n)||delete t.links[n]}filterLinksByTypes(e,t,i,s){for(let[n,o]of this.instances.linksSet.managers){let a=Lo(this.instances.settings,e),l=new Map([...a.entries()].reduce((c,h)=>(h[1]=new Set([...h[1]].filter(d=>o.getTypes().includes(d))),h[1].size>0&&c.push(h),c),[]));for(let[c,h]of l)c in t.links&&h.size>0&&!o.isActiveBasedOnTypes([...h])&&(delete t.links[c],this.instances.settings.disableSource&&s.push(i),this.instances.settings.disableTarget&&s.push(c));if(!o.isActiveBasedOnTypes([this.instances.settings.interactiveSettings[o.name].noneType])){let c=Object.keys(t.links).filter(h=>!l.has(h));for(let h of c)delete t.links[h]}}}flagAsPotentialOrphan(e,t,i){return Object.keys(e.links).length===0?(this.instances.engine.options.showOrphans||i.push(t),!0):!1}addExternalLinks(e){if(!this.instances.engine.options.showAttachments||this.instances.settings.ignoreInlineLinks)return;let t=[],i=Object.keys(e.nodes);for(let s of i){let n=this.instances.nodesSet.getExternalLinks(s);for(let o of n)o.href&&(e.numLinks++,e.nodes[s].links[o.href]=!0,o.href in e.nodes||(t.push(o.href),e.nodes[o.href]={color:this.instances.renderer.colors.fillAttachment,type:"attachment",links:{}})),o.domain&&(e.numLinks++,o.domain in e.nodes||(t.push(o.domain),e.nodes[o.domain]={color:this.instances.renderer.colors.fillAttachment,type:"attachment",links:{}}),o.href?e.nodes[o.href].links[o.domain]=!0:e.nodes[s].links[o.domain]=!0)}if(this.instances.type==="localgraph"&&t.length>0){let s=this.instances.view.file?.path,n=this.instances.engine.options.localJumps??1,o=new Zf.default;for(let l in e.nodes){o.hasNode(l)||o.addNode(l);for(let c in e.nodes[l].links)o.hasNode(c)||o.addNode(c),o.addDirectedEdge(l,c)}let a=(0,Qf.undirectedSingleSourceLength)(o,s);for(let l of t)a[l]>n&&(delete e.nodes[l],e.numLinks--)}}};var Wu=class extends uo.Component{constructor(t,i){super();this.isLocalResetting=!1;this.listenStage=!0;t.graphEventsDispatcher=this,this.instances=t,this.reloadStateDuringInit=i,this.instances.cssBridge=new $e(t),this.addChild(this.instances.cssBridge),this.instances.interactiveEventsDispatcher=new Nd(t),this.addChild(this.instances.interactiveEventsDispatcher),this.instances.filter=new Md(this.instances),this.initializeGraph(),this.initializeUI(),this.initializeFoldersUI()}initializeGraph(){new wd(this.instances),this.addChild(this.instances.graph)}initializeUI(){this.initializeLayersUI(),this.initializeLegendUI(),this.instances.statesUI=new Od(this.instances),this.instances.statesUI.updateStatesList(),this.addChild(this.instances.statesUI)}initializeLegendUI(){let t=this.instances.settings;(t.enableFeatures[this.instances.type].links||t.enableFeatures[this.instances.type].tags||this.hasAdditionalProperties(t))&&(this.instances.legendUI=new Rd(this.instances),this.addChild(this.instances.legendUI))}initializeFoldersUI(){if(!this.instances.settings.enableFeatures[this.instances.type].folders||!u.graphsManager.globalUIs.get(this.instances.view.leaf.id)?.control)return;let i=this.instances.foldersSet?.managers.get(pe);i&&(this.instances.foldersUI=new Gd(this.instances,i),this.instances.foldersUI.display())}initializeLayersUI(){this.instances.settings.enableFeatures[this.instances.type].layers&&(this.instances.layersUI=new Bd(this.instances),this.addChild(this.instances.layersUI))}hasAdditionalProperties(t){return t.enableFeatures[this.instances.type].properties&&Object.values(t.additionalProperties).some(i=>i[this.instances.type])}onload(){this.loadCurrentStateEngineOptions(),this.initGraphologyStats(),this.createSetDataProxy()}loadCurrentStateEngineOptions(){if(!this.reloadStateDuringInit)return;let t=u.settings.states.find(i=>i.id===this.instances.statesUI.currentStateID);if(t){this.instances.engine.setOptions(t.engineOptions);for(let i of this.instances.renderer.nodes)i.fontDirty=!0}}onGraphReady(){try{this.updateOpacityLayerColor(),this.isLocalResetting?(this.isLocalResetting=!1,this.instances.layersManager?.isEnabled&&(this.instances.layersManager.updateLayers(),this.instances.engine.render()),this.instances.stateData&&(this.instances.statePinnedNodes=structuredClone(this.instances.stateData.pinNodes)??{})):(this.bindStageEvents(),this.inputsManager=new Pd(this.instances),this.createRenderCallbackProxy(),this.createInitGraphicsProxy(),this.createDestroyGraphicsProxy(),this.changeArrowAlpha(),this.removeLineHighlight(),this.loadLastFilteringAction(),this.registerEventsForLastFilteringAction(),this.reloadStateDuringInit&&u.statesManager.changeState(this.instances,this.instances.statesUI.currentStateID),this.instances.layersManager?.isEnabled?(this.instances.layersManager.updateLayers(),this.instances.engine.render()):this.instances.stateData?.enableLayers&&this.instances.layersManager?.enable()),u.graphsManager.onPluginLoaded(this.instances.view),this.instances.settings.fadeInElements?this.instances.renderer.changed():this.instances.renderer.idleFrames>60&&(this.instances.renderer.idleFrames=60,this.instances.renderer.queueRender())}catch(t){this.listenStage=!1,typeof t=="string"?console.error(t.toUpperCase()):t instanceof Error&&console.error(t.message),u.graphsManager.disablePluginFromLeafID(this.instances.view.leaf.id);return}}updateOpacityLayerColor(){this.instances.settings.fadeOnDisable&&this.instances.nodesSet.updateOpacityLayerColor()}bindStageEvents(){this.onChildAddedToStage=this.onChildAddedToStage.bind(this),this.instances.renderer.hanger.on("childAdded",this.onChildAddedToStage),this.onChildRemovedFromStage=this.onChildRemovedFromStage.bind(this),this.instances.renderer.hanger.on("childRemoved",this.onChildRemovedFromStage)}createRenderCallbackProxy(){let t=this.beforeRenderCallback.bind(this);u.proxysManager.registerProxy(this.instances.renderer,"renderCallback",{apply(i,s,n){return t(),Reflect.apply(i,s,n)}})}initGraphologyStats(){Xe.needDynamicGraphology(this.instances)&&(this.instances.graphologyGraph=new zr(this.instances),Xe.needDynamicGraphology(this.instances,{element:"node",stat:"size"})&&(this.instances.nodesSizeCalculator=cr.getCalculator("size",this.instances),this.instances.nodesSizeCalculator?.computeStats(this.instances.settings.graphStatsDirection).catch(t=>{console.error(t),new uo.Notice(`${m("notices.nodeStatSizeFailed")} (${is[this.instances.settings.nodesSizeFunction]}). ${m("notices.functionToDefault")}`),this.instances.settings.nodesSizeFunction="default",this.instances.nodesSizeCalculator=void 0})),Xe.needDynamicGraphology(this.instances,{element:"node",stat:"color"})&&(this.instances.nodesColorCalculator=cr.getCalculator("color",this.instances),this.instances.nodesColorCalculator?.computeStats(this.instances.settings.graphStatsDirection).catch(t=>{console.error(t),new uo.Notice(`${m("notices.nodeStatColorFailed")} (${is[this.instances.settings.nodesColorFunction]}). ${m("notices.functionToDefault")}`),this.instances.settings.nodesColorFunction="default",this.instances.nodesColorCalculator=void 0})),Xe.needDynamicGraphology(this.instances,{element:"link",stat:"size"})&&(this.instances.linksSizeCalculator=Ps.getCalculator("size",this.instances),this.instances.linksSizeCalculator?.computeStats(this.instances.settings.graphStatsDirection).catch(t=>{console.error(t),new uo.Notice(`${m("notices.linkStatSizeFailed")} (${rs[this.instances.settings.linksSizeFunction]}). ${m("notices.functionToDefault")}`),this.instances.settings.linksSizeFunction="default",this.instances.linksSizeCalculator=void 0})),Xe.needDynamicGraphology(this.instances,{element:"link",stat:"color"})&&(this.instances.linksColorCalculator=Ps.getCalculator("color",this.instances),this.instances.linksColorCalculator?.computeStats(this.instances.settings.graphStatsDirection).catch(t=>{console.error(t),new uo.Notice(`${m("notices.linkStatColorFailed")} (${rs[this.instances.settings.linksColorFunction]}). ${m("notices.functionToDefault")}`),this.instances.settings.linksColorFunction="default",this.instances.linksColorCalculator=void 0})))}createSetDataProxy(){let t=this.updateData.bind(this),i=this.instances;u.proxysManager.registerProxy(this.instances.renderer,"setData",{apply(s,n,o){let a=t(o[0]);if(a){o[0]=a;let l=Reflect.apply(s,n,o);return i.graphologyGraph?.buildGraphology(),l}else return!1}})}createDestroyGraphicsProxy(){let t=this.beforeDestroyGraphics.bind(this);u.proxysManager.registerProxy(this.instances.renderer,"destroyGraphics",{apply(i,s,n){return t(),Reflect.apply(i,s,n)}})}createInitGraphicsProxy(){let t=this.afterInitGraphics.bind(this);u.proxysManager.registerProxy(this.instances.renderer,"initGraphics",{apply(i,s,n){let o=Reflect.apply(i,s,n);return t(),o}})}changeArrowAlpha(){!this.instances.settings.enableFeatures[this.instances.type].arrows||!this.instances.settings.opaqueArrowsButKeepFading||(this.coreArrowAlpha=this.instances.renderer.colors.arrow.a,this.instances.renderer.colors.arrow.a=1)}removeLineHighlight(){this.instances.settings.noLineHighlight&&(this.coreLineHighlightColor=this.instances.renderer.colors.lineHighlight,this.instances.renderer.colors.lineHighlight=this.instances.renderer.colors.line)}loadLastFilteringAction(){this.lastFilteringAction={id:void 0,searchNew:this.instances.engine.filterOptions.search.getValue()||"",searchOld:this.instances.engine.filterOptions.search.getValue()||"",showTagsNew:this.instances.engine.options.showTags||!1,showTagsOld:this.instances.engine.options.showTags||!1,showAttachmentsNew:this.instances.engine.options.showAttachments||!1,showAttachmentsOld:this.instances.engine.options.showAttachments||!1,hideUnresolvedNew:this.instances.engine.options.hideUnresolved||!1,hideUnresolvedOld:this.instances.engine.options.hideUnresolved||!1,showOrphansNew:this.instances.engine.options.showOrphans||!0,showOrphansOld:this.instances.engine.options.showOrphans||!0,localJumpsNew:this.instances.engine.options.localJumps||1,localJumpsOld:this.instances.engine.options.localJumps||1,localForelinksNew:this.instances.engine.options.localForelinks||!0,localForelinksOld:this.instances.engine.options.localForelinks||!0,localBacklinksNew:this.instances.engine.options.localBacklinks||!0,localBacklinksOld:this.instances.engine.options.localBacklinks||!0,interactives:{key:"",types:[]},stateIDNew:this.instances.statesUI.currentStateID,stateIDOld:this.instances.statesUI.currentStateID,record:!0,userChange:!1}}registerEventsForLastFilteringAction(){if(!this.lastFilteringAction)return;let t=this.lastFilteringAction;this.instances.engine.filterOptions.search.changeCallback&&u.proxysManager.registerProxy(this.instances.engine.filterOptions.search,"changeCallback",{apply(s,n,o){return t.record&&(t.id="core-search",t.userChange=!0,t.searchOld=t.searchNew,t.searchNew=o[0]),Reflect.apply(s,n,o)}}),this.updateLastCheckboxToggled=this.updateLastCheckboxToggled.bind(this);let i=this.instances.view.contentEl.querySelectorAll(".graph-control-section.mod-filter .checkbox-container");for(let s of Array.from(i))s.addEventListener("mousedown",this.updateLastCheckboxToggled);u.proxysManager.registerProxy(this.instances.engine,"options",{set(s,n,o,a){return t.record&&(n==="showTags"?(t.id="core-tags",t.userChange=!0,t.showTagsOld=t.showTagsNew,t.showTagsNew=o):n==="showAttachments"?(t.id="core-attachments",t.userChange=!0,t.showAttachmentsOld=t.showAttachmentsNew,t.showAttachmentsNew=o):n==="hideUnresolved"?(t.id="core-hide-unresolved",t.userChange=!0,t.hideUnresolvedOld=t.hideUnresolvedNew,t.hideUnresolvedNew=o):n==="showOrphans"?(t.id="core-orphans",t.userChange=!0,t.showOrphansOld=t.showOrphansNew,t.showOrphansNew=o):n==="localJumps"?(t.id="core-local-jumps",t.userChange=!0,t.localJumpsOld=t.localJumpsNew,t.localJumpsNew=o):n==="localForelinks"?(t.id="core-local-forelinks",t.userChange=!0,t.localForelinksOld=t.localForelinksNew,t.localForelinksNew=o):n==="localBacklinks"&&(t.id="core-local-backlinks",t.userChange=!0,t.localBacklinksOld=t.localBacklinksNew,t.localBacklinksNew=o)),Reflect.set(s,n,o,a)}})}setLastFilteringActionAsStateChange(t){!this.lastFilteringAction||!this.lastFilteringAction.record||(this.lastFilteringAction.id="plugin-state-change",this.lastFilteringAction.userChange=!0,this.lastFilteringAction.stateIDOld=this.lastFilteringAction.stateIDNew,this.lastFilteringAction.stateIDNew=t)}setLastFilteringActionAsInteractive(t,i){!this.lastFilteringAction||!this.lastFilteringAction.record||t!==pe&&(this.lastFilteringAction.id="plugin-interactives",this.lastFilteringAction.userChange=!0,this.lastFilteringAction.interactives={key:t,types:i})}updateLastCheckboxToggled(t){this.lastCheckboxContainerToggled=t.currentTarget}reloadLocalDispatcher(){this.instances.type==="localgraph"&&(this.isLocalResetting=!0,this.instances.graph.unload(),this.instances.graph.load())}onunload(){this.unbindStageEvents(),u.proxysManager.unregisterProxy(this.instances.renderer.renderCallback),u.proxysManager.unregisterProxy(this.instances.renderer.setData),u.proxysManager.unregisterProxy(this.instances.renderer.destroyGraphics),u.proxysManager.unregisterProxy(this.instances.renderer.initGraphics),this.instances.foldersUI?.destroy(),this.inputsManager.unload(),u.graphsManager.onPluginUnloaded(this.instances.view),this.restoreArrowAlpha(),this.restoreLineHighlight(),this.unregisterEventsForLastFilteringAction(),this.instances.engine.render()}unbindStageEvents(){this.instances.renderer.hanger.off("childAdded",this.onChildAddedToStage),this.instances.renderer.hanger.off("childRemoved",this.onChildRemovedFromStage)}restoreArrowAlpha(){this.coreArrowAlpha!==void 0&&(this.instances.renderer.colors.arrow.a=this.coreArrowAlpha,this.coreArrowAlpha=void 0)}restoreLineHighlight(){this.coreLineHighlightColor!==void 0&&(this.instances.renderer.colors.lineHighlight=this.coreLineHighlightColor,this.coreLineHighlightColor=void 0)}unregisterEventsForLastFilteringAction(){u.proxysManager.unregisterProxy(this.instances.engine.filterOptions.search.changeCallback);let t=this.instances.view.contentEl.querySelectorAll(".graph-control-section.mod-filter .checkbox-container");for(let i of Array.from(t))i.addEventListener("mousedown",this.updateLastCheckboxToggled);u.proxysManager.unregisterProxy(this.instances.engine.options)}onChildAddedToStage(t,i,s){if(!this.listenStage)return;let n=this.instances.renderer.nodes.find(a=>a.circle===t);if(n){if(u.graphsManager.isNodeLimitExceededForView(this.instances.view)){this.listenStage=!1,setTimeout(()=>{u.graphsManager.disablePluginFromLeafID(this.instances.view.leaf.id)},200);return}let a=this.instances.nodesSet.extendedElementsMap.get(n.id);a?(a.setCoreElement(n),this.instances.layersManager?.addNode(n.id)):this.instances.nodesSet.load();let l=qe(n.id),c=this.instances.foldersSet?.managers.get(pe);if(l&&c){let h=ct(pe,l);for(let d of h)c.isActive(d)&&this.instances.foldersSet?.loadFolder(pe,d)}}let o=this.instances.renderer.links.find(a=>a.px===t||a.arrow===t);if(o){let a=c=>{let h=this.instances.linksSet.extendedElementsMap.get(Wt(c));h?h.setCoreElement(c):this.instances.linksSet.load(Wt(c)),this.instances.layersManager?.addLinkToContainer(c)},l=c=>c.line&&(!this.instances.renderer.fShowArrow||!!c.arrow);l(o)?a(o):o.px===t&&t.on("childAdded",(c,h,d)=>{c instanceof Oa||l(o)&&a(o)})}if("text"in t){let a=this.instances.renderer.nodes.find(l=>l.text===t);if(a){let l=this.instances.nodesSet.extendedElementsMap.get(a.id);l&&l.extendedText.init()}}}onChildRemovedFromStage(t,i,s){if(this.listenStage&&this.instances.foldersSet)for(let[n,o]of this.instances.foldersSet.foldersMap){let a=o.nodes.filter(l=>l.circle===null);for(let l of a)o.removeNode(l);a.length>0&&o.updateGraphics(this.instances.renderer.scale)}}updateData(t){t=this.instances.filter.filterData(t);for(let s of this.instances.linksSet.extendedElementsMap.values()){let n=!(s.coreElement.source.id in t.nodes)||!(s.coreElement.target.id in t.nodes)||!(s.coreElement.target.id in t.nodes[s.coreElement.source.id].links);s.isEnabled&&n?s.disable():!s.isEnabled&&!n&&s.enable()}let i=this.lastFilteringAction?.userChange||!0;if(this.lastFilteringAction&&(this.lastFilteringAction.userChange=!1),u.graphsManager.isNodeLimitExceededForData(t,i))if(u.settings.revertAction&&this.lastFilteringAction){this.revertLastFilteringAction();return}else{this.listenStage=!1,setTimeout(()=>{u.graphsManager.disablePluginFromLeafID(this.instances.view.leaf.id)},200);return}return t}beforeDestroyGraphics(){this.instances.cssBridge.unload(),this.unbindStageEvents(),this.inputsManager.unbindStageEvents(),u.proxysManager.unregisterProxy(this.instances.renderer.renderCallback),this.instances.layersManager?.destroyContainers();for(let t of this.instances.nodesSet.extendedElementsMap.values())u.proxysManager.unregisterProxy(t.coreElement.text);for(let t of this.instances.linksSet.extendedElementsMap.values())t.restoreCoreElement()}showDestroyed(t,i=[],s=1){if("children"in t)for(let n of t.children)if(n.destroyed)console.debug(s),console.debug(i),console.debug(n);else{let o=[...i];o.push(Object.getPrototypeOf(n).constructor.name),this.showDestroyed(n,o,s+1)}}afterInitGraphics(){setTimeout(()=>{this.instances.cssBridge.load();for(let t of this.instances.linksSet.extendedElementsMap.values())t.init();for(let t of this.instances.nodesSet.extendedElementsMap.values())t.init();if(this.instances.nodesSet.onCSSChange(),this.instances.foldersSet?.initGraphics(),this.createRenderCallbackProxy(),this.instances.layersManager?.rebuildContainers(),this.instances.settings.enableFeatures[this.instances.type].focus){if(this.instances.settings.highlightOpenNodes)for(let t of u.graphsManager.openNodes)this.instances.nodesSet.extendedElementsMap.get(t)?.toggleOpenInTab(!0);if(this.instances.settings.highlightSearchResults)for(let t of u.graphsManager.getSearchResults())this.instances.nodesSet.extendedElementsMap.get(t)?.toggleIsSearchResult(!0)}this.bindStageEvents(),this.inputsManager.bindStageEvents(),this.instances.renderer.changed()},this.instances.settings.delay)}beforeRenderCallback(){if(this.instances.statePinnedNodes&&new yt(this.instances).setPinnedNodesFromState(),this.instances.foldersSet&&this.instances.foldersSet.updateGraphics(),this.instances.settings.enableFeatures[this.instances.type].links&&(this.instances.settings.interactiveSettings[ne].showOnGraph||this.instances.settings.curvedLinks||this.instances.settings.displayLinkTypeLabel))for(let t of this.instances.linksSet.connectedIDs){let i=this.instances.linksSet.extendedElementsMap.get(t);i&&(i.graphicsWrapper?.pixiElement.updateFrame(),i.updateRenderedTexts())}}revertLastFilteringAction(){if(!this.lastFilteringAction||this.lastFilteringAction.id===void 0){this.listenStage=!1,u.graphsManager.disablePluginFromLeafID(this.instances.view.leaf.id);return}switch(this.lastFilteringAction.id){case"core-search":this.instances.engine.filterOptions.search.inputEl.blur(),this.lastFilteringAction.searchNew=this.lastFilteringAction.searchOld,this.instances.engine.filterOptions.search.inputEl.value=this.lastFilteringAction.searchOld,this.instances.engine.updateSearch();break;case"core-tags":this.lastCheckboxContainerToggled?.dispatchEvent(new Event("click")),this.lastFilteringAction.showTagsNew=this.lastFilteringAction.showTagsOld;break;case"core-attachments":this.lastCheckboxContainerToggled?.dispatchEvent(new Event("click")),this.lastFilteringAction.showAttachmentsNew=this.lastFilteringAction.showAttachmentsOld;break;case"core-hide-unresolved":this.lastCheckboxContainerToggled?.dispatchEvent(new Event("click")),this.lastFilteringAction.hideUnresolvedNew=this.lastFilteringAction.hideUnresolvedOld;break;case"core-orphans":this.lastCheckboxContainerToggled?.dispatchEvent(new Event("click")),this.lastFilteringAction.showOrphansNew=this.lastFilteringAction.showOrphansOld;break;case"core-local-jumps":this.lastCheckboxContainerToggled?.dispatchEvent(new Event("click")),this.lastFilteringAction.localJumpsNew=this.lastFilteringAction.localJumpsOld;break;case"core-local-forelinks":this.lastCheckboxContainerToggled?.dispatchEvent(new Event("click")),this.lastFilteringAction.localForelinksNew=this.lastFilteringAction.localForelinksOld;break;case"core-local-backlinks":this.lastCheckboxContainerToggled?.dispatchEvent(new Event("click")),this.lastFilteringAction.localBacklinksNew=this.lastFilteringAction.localBacklinksOld;break;case"plugin-interactives":let t=this.instances.interactiveManagers.get(this.lastFilteringAction.interactives.key);if(t){t.disable(this.lastFilteringAction.interactives.types);for(let i of this.lastFilteringAction.interactives.types)this.instances.legendUI?.disableUI(this.lastFilteringAction.interactives.key,i)}break;case"plugin-state-change":this.lastFilteringAction.stateIDNew!==this.lastFilteringAction.stateIDOld&&(this.lastFilteringAction.stateIDNew=this.lastFilteringAction.stateIDOld,this.instances.statesUI.setValue(this.lastFilteringAction.stateIDOld),u.statesManager.changeState(this.instances,this.lastFilteringAction.stateIDOld));break}}changeState(t){this.setLastFilteringActionAsStateChange(t),u.statesManager.changeState(this.instances,t)}};var e5=require("obsidian");var Nd=class extends e5.Component{constructor(e){super(),this.instances=e}onInteractivesAdded(e,t){e===ne?this.onLinkTypesAdded(t):e===pe?this.onFoldersAdded(t):this.onNodeInteractiveTypesAdded(e,t)}onInteractivesRemoved(e,t){e===ne?this.onLinkTypesRemoved(t):e===pe?this.onFoldersRemoved(t):this.onNodeInteractiveTypesRemoved(e,t)}onInteractiveColorChanged(e,t,i){e===ne?this.onLinkColorChanged(t,i):e===pe?this.onFolderColorChanged(t,i):this.onNodeInteractiveColorChanged(e,t,i)}onInteractivesDisabled(e,t){e===ne?(this.instances.graph.disableLinkTypes(t),this.instances.engine.render(),this.instances.renderer.changed()):e===pe?this.disableFolders(t):(this.instances.graph.disableNodeInteractiveTypes(e,t),this.instances.settings.fadeOnDisable||this.instances.engine.render(),this.instances.renderer.changed())}onInteractivesEnabled(e,t){this.instances.graphEventsDispatcher.setLastFilteringActionAsInteractive(e,t),e===ne?(this.instances.graph.enableLinkTypes(t),this.instances.engine.render(),this.instances.renderer.changed()):e===pe?this.enableFolders(t):(this.instances.graph.enableNodeInteractiveTypes(e,t),this.instances.settings.fadeOnDisable||this.instances.engine.render(),this.instances.renderer.changed())}onInteractivesLogicChanged(e){if(e===ne)for(let[t,i]of this.instances.linksSet.extendedElementsMap){let s=i.isAnyManagerDisabled();i.isEnabled&&s?i.disable():!i.isEnabled&&!s&&i.enable()}}onNodeInteractiveTypesAdded(e,t){if(this.instances.legendUI)for(let[i,s]of t)this.instances.legendUI.add(e,i,s);this.instances.nodesSet.resetArcs(e),this.instances.renderer.changed()}onNodeInteractiveTypesRemoved(e,t){this.instances.legendUI?.remove(e,t),this.instances.nodesSet.resetArcs(e),this.instances.renderer.changed()}onNodeInteractiveColorChanged(e,t,i){this.instances.nodesSet.updateTypeColor(e,t,i),this.instances.legendUI?.update(e,t,i),this.instances.renderer.changed()}onLinkTypesAdded(e){if(this.instances.legendUI)for(let[t,i]of e)this.instances.legendUI.add(ne,t,i);this.instances.settings.interactiveSettings[ne].enableByDefault&&(e.forEach((t,i)=>{this.instances.linksSet.updateTypeColor(ne,i,t)}),this.instances.renderer.changed())}onLinkTypesRemoved(e){this.instances.legendUI?.remove(ne,e)}onLinkColorChanged(e,t){this.instances.linksSet.updateTypeColor(ne,e,t),this.instances.legendUI?.update(ne,e,t),this.instances.renderer.changed()}onFoldersAdded(e){if(this.instances.foldersUI)for(let[t,i]of e)this.instances.foldersUI.add(pe,t,i);if(this.instances.settings.interactiveSettings[pe].enableByDefault&&this.instances.foldersSet){for(let[t,i]of e)this.instances.foldersSet.loadFolder(pe,t);this.instances.renderer.changed()}}onFoldersRemoved(e){this.instances.foldersUI?.remove(pe,e);for(let t of e)this.removeBBox(t)}onFolderColorChanged(e,t){this.instances.foldersSet&&(this.instances.foldersSet.updateColor(pe,e),this.instances.foldersUI?.update(pe,e,t),this.instances.renderer.changed())}disableFolders(e){this.instances.graphEventsDispatcher.listenStage=!1;for(let t of e)this.removeBBox(t);this.instances.graphEventsDispatcher.listenStage=!0}enableFolders(e){this.instances.graphEventsDispatcher.listenStage=!1;for(let t of e)this.addBBox(t);this.instances.graphEventsDispatcher.listenStage=!0}addBBox(e){this.instances.foldersSet&&(this.instances.foldersSet.loadFolder(pe,e),this.instances.renderer.changed())}removeBBox(e){this.instances.foldersSet&&(this.instances.foldersSet.removeFolder(e),this.instances.renderer.changed())}};var t5=require("obsidian");var c8=class{constructor(e,t){this.type=e,this.color=t,this.isActive=!0}setColor(e){this.color=e}},Td=class extends t5.Component{constructor(e,t){super(),this.interactives=new Map,this.instances=e,this.name=t}disable(e){let t=[];e.forEach(i=>{let s=this.interactives.get(i);s&&(s.isActive=!1,t.push(i))}),t.length>0&&this.instances.interactiveEventsDispatcher.onInteractivesDisabled(this.name,t)}enable(e){let t=[];e.forEach(i=>{let s=this.interactives.get(i);s&&(s.isActive=!0,t.push(i))}),t.length>0&&this.instances.interactiveEventsDispatcher.onInteractivesEnabled(this.name,t)}isActive(e){let t=this.interactives.get(e);return t?t.isActive:!1}isActiveBasedOnTypes(e){this.addTypes(e.filter(i=>!this.interactives.has(i)));let t=this.getTypes().filter(i=>this.isActive(i));switch(Bn.getLogicType(this.instances,this.name)){case"AND":return t.every(i=>e.includes(i));case"OR":return t.some(i=>e.includes(i))}}setColor(e,t){let i=this.interactives.get(e);i&&(i.setColor(t),this.instances.interactiveEventsDispatcher.onInteractiveColorChanged(this.name,e,t))}removeTypes(e){e.forEach(t=>{this.interactives.delete(t)}),this.recomputeColors(),this.instances.interactiveEventsDispatcher.onInteractivesRemoved(this.name,e)}addTypes(e){if([...e].length===0)return;let t=new Map,i=new Set([...this.interactives.keys(),...e].sort()),s=new Set(i);s.delete(this.instances.settings.interactiveSettings[this.name].noneType),e.forEach(n=>{if(Xe.excludeType(this.instances.settings,this.name,n)||this.interactives.has(n))return;let o=this.tryComputeColorFromType(n);if(!o){let a=s.size,l=[...s].indexOf(n);o=this.computeColorFromIndex(l,a)}t.set(n,o),this.interactives.set(n,new c8(n,o))}),this.interactives=new Map([...this.interactives.entries()].sort()),this.recomputeColors(),t.size>0&&this.instances.interactiveEventsDispatcher.onInteractivesAdded(this.name,t)}getColor(e){let t=this.interactives.get(e);return t?t.color:0}getTypes(){return Array.from(this.interactives.keys())}getTypesWithoutNone(){let e=this.getTypes();return e.remove(this.instances.settings.interactiveSettings[this.name].noneType),e}update(e){this.interactives.clear(),this.addTypes(e)}recomputeColors(){this.interactives.forEach((e,t)=>{let i=this.tryComputeColorFromType(t);i&&this.setColor(t,i)})}recomputeColor(e){if(!this.interactives.has(e))return;let t=this.tryComputeColorFromType(e);t&&this.setColor(e,t)}tryComputeColorFromType(e){let t,i=this.instances.settings.interactiveSettings[this.name].colors.find(s=>s.type===e||s.recursive&&e.startsWith(s.type.endsWith("/")?s.type:s.type+"/"))?.color;if(i)t=Vr(i);else if(e===this.instances.settings.interactiveSettings[this.name].noneType)this.name===ne?t=this.instances.renderer.colors.line.rgb:t=V6;else{let s=[...this.interactives.keys()];s.remove(this.instances.settings.interactiveSettings[this.name].noneType);let n=s.length,o=s.indexOf(e);if(o<0)return null;t=this.computeColorFromIndex(o,n)}return t}computeColorFromIndex(e,t){let i=t===1?.5:e/(t-1);return zs(i,this.instances.settings.interactiveSettings[this.name].colormap,this.instances.settings)}};var ho=require("obsidian");var Pd=class{constructor(e){this.isListeningToUnselect=!1;this.isSelecting=!1;this.isDragging=!1;this.instances=e,this.selectionRectangle=new lt,this.selectionRectangle.eventMode="none",this.bindStageEvents(),this.changeNodeOnClick(),this.preventDraggingPinnedNodes()}bindStageEvents(){this.onPointerDownOnStage=this.onPointerDownOnStage.bind(this),this.instances.renderer.px.stage.on("pointerdown",this.onPointerDownOnStage),this.onPointerUpOnStage=this.onPointerUpOnStage.bind(this),this.instances.renderer.px.stage.on("pointerup",this.onPointerUpOnStage),this.onPointerMoveOnStage=this.onPointerMoveOnStage.bind(this),this.instances.renderer.px.stage.on("pointermove",this.onPointerMoveOnStage),this.onPointerUpOnWindow=this.onPointerUpOnWindow.bind(this),this.onInputToUnselectNodes=this.onInputToUnselectNodes.bind(this)}changeNodeOnClick(){(this.instances.settings.openInNewTab||this.instances.settings.externalLinks!=="none")&&(this.onNodeClick=this.onNodeClick.bind(this),this.coreOnNodeClick=this.instances.renderer.onNodeClick,this.instances.renderer.onNodeClick=this.onNodeClick),(this.instances.settings.useRadialMenu||this.instances.settings.pinNodeModifier)&&(this.onNodeRightClick=this.onNodeRightClick.bind(this),this.coreOnNodeRightClick=this.instances.renderer.onNodeRightClick,this.instances.renderer.onNodeRightClick=this.onNodeRightClick)}unload(){this.unbindStageEvents(),this.restoreOnNodeClick()}unbindStageEvents(){this.instances.renderer.px.stage.off("pointerdown",this.onPointerDownOnStage),this.instances.renderer.px.stage.off("pointerup",this.onPointerUpOnStage),this.instances.renderer.px.stage.off("pointermove",this.onPointerMoveOnStage),this.instances.renderer.interactiveEl.win.window.removeEventListener("mouseup",this.onPointerUpOnWindow),this.instances.renderer.interactiveEl.win.window.removeEventListener("mouseup",this.onInputToUnselectNodes),this.instances.renderer.interactiveEl.win.window.removeEventListener("keydown",this.onInputToUnselectNodes)}restoreOnNodeClick(){this.coreOnNodeClick&&(this.instances.renderer.onNodeClick=this.coreOnNodeClick,this.coreOnNodeClick=void 0),this.coreOnNodeRightClick&&(this.instances.renderer.onNodeRightClick=this.coreOnNodeRightClick,this.coreOnNodeRightClick=void 0)}onPointerDownOnStage(e){this.preventDraggingPinnedNodes(),e.button===0&&ho.Keymap.isModifier(e,u.settings.selectNodeModifier)&&!this.instances.renderer.dragNode&&(this.selectionStartPosition=e.getLocalPosition(this.instances.renderer.hanger),this.selectionRectangle.parent!==this.instances.renderer.hanger&&ze(this.instances.renderer.hanger,this.selectionRectangle),this.selectionRectangle.clear(),this.selectionRectangle.visible=!0,this.preventPan(),this.instances.renderer.interactiveEl.win.window.addEventListener("mouseup",this.onPointerUpOnWindow),this.isSelecting=!0)}onPointerUpOnStage(){this.pinDraggingPinnedNode()}onPointerUpOnWindow(e){e.button===0&&(this.selectionRectangle.visible=!1,this.allowPan(),this.instances.renderer.interactiveEl.win.window.removeEventListener("mouseup",this.onPointerUpOnWindow),this.isSelecting=!1,this.instances.nodesSet.selectNodesInRectangle(this.selectionRectangle.getLocalBounds()))}startListeningToUnselectNodes(){this.isListeningToUnselect||(this.isListeningToUnselect=!0,this.instances.renderer.px.stage.addEventListener("mouseup",this.onInputToUnselectNodes),this.instances.renderer.interactiveEl.win.window.addEventListener("keydown",this.onInputToUnselectNodes))}stopListeningToUnselectNodes(){this.instances.renderer.px.stage.removeEventListener("mouseup",this.onInputToUnselectNodes),this.instances.renderer.interactiveEl.win.window.removeEventListener("keydown",this.onInputToUnselectNodes),this.isListeningToUnselect=!1}preventPan(){let e=this.instances.renderer;u.proxysManager.registerProxy(this.instances.renderer,"setPan",{apply(t,i,s){return e.panvX=0,e.panvY=0,e.panning=!1,!1}})}allowPan(){u.proxysManager.unregisterProxy(this.instances.renderer.setPan)}onPointerMoveOnStage(e){if(this.isSelecting){let t=e.getLocalPosition(this.instances.renderer.hanger);this.selectionRectangle.clear(),this.selectionRectangle.beginFill(9990901,.1),this.selectionRectangle.lineStyle(2,9990901,.3),this.selectionRectangle.drawRect(Math.min(this.selectionStartPosition.x,t.x),Math.min(this.selectionStartPosition.y,t.y),Math.abs(t.x-this.selectionStartPosition.x),Math.abs(t.y-this.selectionStartPosition.y)),this.selectionRectangle.endFill()}else this.instances.nodesSet.moveSelectedNodes(e.getLocalPosition(this.instances.renderer.hanger))}onInputToUnselectNodes(e){if(!("instanceOf"in e&&e.instanceOf(KeyboardEvent))||e.key==="Escape"){if("target"in e&&this.instances.renderer.nodes.find(t=>t.circle===e.target)&&!this.isDragging)return;this.isDragging?(this.isDragging=!1,this.instances.nodesSet.stopMovingSelectedNodes()):(this.instances.nodesSet.unselectNodes(),this.instances.renderer.changed())}}onNodeClick(e,t,i){if(e&&u.settings.useLeftClickToSelect&&ho.Keymap.isModifier(e,u.settings.selectNodeModifier)){this.instances.nodesSet.selectNodes([this.instances.renderer.nodeLookup[t]]);return}if(this.instances.settings.externalLinks!=="none"&&i==="attachment")try{let s;for(let n of Object.values(this.instances.nodesSet.cachedExternalLinks))if(s=n.find(o=>{let a=this.instances.nodesSet.convertExternalLink(o);return a.domain===t||a.href===t||o.toString()===t}),s)break;if(s){if(u.settings.externalLinkOpenMode==="choice"||u.settings.externalLinkOpenMode==="note"){let n=this.findExternalLinkFiles(t);if(u.settings.externalLinkOpenMode==="note"&&n.length>0){this.instances.settings.openInNewTab?u.app.workspace.openLinkText(n[0].path,"","tab"):u.app.workspace.openLinkText(n[0].path,"",ho.Keymap.isModEvent(e));return}else if(n.length>0){new Vd(n,a=>{a?this.instances.settings.openInNewTab?u.app.workspace.openLinkText(a.path,"","tab"):u.app.workspace.openLinkText(a.path,"",ho.Keymap.isModEvent(e)):window.open(s.href,"")}).open();return}}window.open(s.href,"");return}}catch(s){console.error(s)}if(this.instances.settings.openInNewTab&&i!=="tag"){u.app.workspace.openLinkText(t,"","tab");return}this.coreOnNodeClick&&this.coreOnNodeClick(e,t,i)}onNodeRightClick(e,t,i){if(e&&u.settings.useRadialMenu&&ho.Keymap.isModifier(e,u.settings.radialMenuModifier)){new Ud(this.instances,t,i).open(e);return}if(e&&u.settings.pinNodeModifier&&ho.Keymap.isModifier(e,u.settings.pinNodeModifier)){let s=new yt(this.instances);this.instances.nodesSet.isNodePinned(t)?s.unpinNode(t):s.pinNode(t);return}this.coreOnNodeRightClick&&this.coreOnNodeRightClick(e,t,i)}findExternalLinkFiles(e){let t=[],i=[],s=[];for(let n of u.app.vault.getMarkdownFiles())for(let o of u.settings.externalLinksProperties){let a=ct(o,n);for(let l of a)try{let c=new URL(l);if(c.toString()===e){if(t.push(n),u.settings.externalLinkOpenMode==="note")return t}else c.origin+c.pathname===e?i.push(n):c.hostname===e&&s.push(n)}catch{continue}}return t.concat(i).concat(s)}onNodeMenuOpened(e,t){e.addSections(["extended-graph"]),e.addItem(i=>{this.instances.nodesSet.isNodePinned(t.path)?(i.iconEl.addClass("extended-graph-pin-off"),i.setIcon("pin-off"),i.setTitle(m("features.unpinNode")),i.onClick(()=>{this.unpinNode(t)})):(i.iconEl.addClass("extended-graph-pin"),i.setIcon("pin"),i.setTitle(m("features.pinNode")),i.onClick(()=>{this.pinNode(t)}))})}pinNode(e){new yt(this.instances).pinNode(e.path)}pinNodeFromId(e){new yt(this.instances).pinNode(e)}unpinNode(e){new yt(this.instances).unpinNode(e.path),this.instances.renderer.changed()}unpinNodeFromId(e){new yt(this.instances).unpinNode(e),this.instances.renderer.changed()}preventDraggingPinnedNodes(){let e=this.instances.renderer.dragNode;e&&this.instances.nodesSet.isNodePinned(e.id)&&new yt(this.instances).setLastDraggedPinnedNode(e.id)}pinDraggingPinnedNode(){new yt(this.instances).pinLastDraggedPinnedNode()}};var co=class r{constructor(e){this.layerGroups=[];this.nodeLookup={};this.graphicsArray={circles:new Set,names:new Set,arrows:new Set,links:new Set,linksPixiElements:new Set,linksContainer:new Set};this.isEnabled=!1;this.instances=e,this.currentLevel=e.stateData?.currentLayerLevel??0;let t=this.instances.settings.layersOrder==="ASC"?-1e4:1e4;this.notInLayers={nodeIDs:[],layerGroup:{level:t,alpha:0,layers:[{id:"",level:t,label:"",nodes:[],container:this.getNewContainer("",t)}]}},this.notInLayers.layerGroup.alpha=e.settings.nodesWithoutLayerOpacity,this.notInLayers.layerGroup.layers[0].container.alpha=e.settings.nodesWithoutLayerOpacity}rebuildContainers(){for(let t of this.layerGroups)for(let i of t.layers)if(i.container.destroyed){i.container=this.getNewContainer(i.id,i.level),i.container.alpha=t.alpha;for(let s of i.nodes){let n=this.instances.renderer.nodeLookup[s];n&&this.addToContainer(n)}}let e=this.notInLayers.layerGroup.layers[0];e.container=this.getNewContainer(e.id,e.level),e.container.alpha=this.notInLayers.layerGroup.alpha;for(let t of this.notInLayers.nodeIDs){let i=this.instances.renderer.nodeLookup[t];i&&this.addToContainer(i)}}addNode(e){if(this.nodeLookup[e]){if(this.isEnabled){let i=this.instances.renderer.nodeLookup[e];i&&this.addToContainer(i)}return}let t=qe(e);if(t){let i=r.getNodeLayer(t,this.instances.settings);if(i){let s=this.layerGroups.find(o=>o.level===i.level),n=s?.layers.find(o=>o.id===i.id);s&&n?n.nodes.push(e):(s||(s={level:i.level,layers:[],alpha:1},this.layerGroups.push(s)),n={id:i.id,label:i.label,level:i.level,nodes:[e],container:this.getNewContainer(i.id,i.level)},s.layers.push(n)),this.nodeLookup[e]={group:s,graphLayer:n};return}}if(this.notInLayers.nodeIDs.push(e),this.nodeLookup[e]={group:this.notInLayers.layerGroup,graphLayer:this.notInLayers.layerGroup.layers[0]},this.isEnabled){let i=this.instances.renderer.nodeLookup[e];i&&this.addToContainer(i)}}getNewContainer(e,t){let i=new tt;return i.name="layer-"+e,i.zIndex=this.instances.settings.layersOrder==="ASC"?t:-1*t,ze(this.instances.renderer.hanger,i),i}moveElementsInContainers(){for(let e in this.nodeLookup){let t=this.instances.renderer.nodeLookup[e];t&&this.addToContainer(t)}}add(e,t,i,s){if(!e.destroyed&&e.parent&&(e.parent===this.instances.renderer.hanger||e.parent.name?.startsWith("layer-")&&e.parent!==t.container)){let n=u.proxysManager.getTargetForProxy(e)??e;s!==void 0?Jt(t.container,n,s):ze(t.container,n),this.graphicsArray[i].add(n),n.on("destroyed",()=>{this.graphicsArray[i].delete(n)})}}addToContainer(e){if(!this.isEnabled)return;let t=this.nodeLookup[e.id].graphLayer;if(t){e.circle&&this.add(e.circle,t,"circles"),e.text&&this.add(e.text,t,"names");for(let i of Object.values(e.forward).concat(Object.values(e.reverse)).map(s=>s))this.addLinkToContainer(i)}}addLinkToContainer(e){if(!this.isEnabled)return;let t=this.nodeLookup[e.source.id]?.graphLayer;if(!t)return;let i=Wt(e),s=this.instances.linksSet.extendedElementsMap.get(i),n=this.nodeLookup[e.target.id]?.graphLayer,o=n&&n.level<t.level&&this.instances.settings.layersOrder==="ASC"?n:t;if(s?.container)s.container&&this.add(s.container,o,"linksContainer",0);else{let a=s?.graphicsWrapper?.pixiElement;a&&this.add(a,o,"linksPixiElements",0),e.arrow&&this.add(e.arrow,o,"arrows",0),e.px&&this.add(e.px,o,"links",0)}}moveElementsOutOfContainers(){for(let e of this.graphicsArray.links)ze(this.instances.renderer.hanger,e);for(let e of this.graphicsArray.arrows)ze(this.instances.renderer.hanger,e);for(let e of this.graphicsArray.linksPixiElements)ze(this.instances.renderer.hanger,e);for(let e of this.graphicsArray.linksContainer)ze(this.instances.renderer.hanger,e);for(let e of this.graphicsArray.circles)ze(this.instances.renderer.hanger,e);for(let e of this.graphicsArray.names)ze(this.instances.renderer.hanger,e);this.graphicsArray.links.clear(),this.graphicsArray.arrows.clear(),this.graphicsArray.linksPixiElements.clear(),this.graphicsArray.linksContainer.clear(),this.graphicsArray.circles.clear(),this.graphicsArray.names.clear()}increaseCurrentLevel(){let e=this.getCurrentIndex();e!==this.layerGroups.length-1&&this.setCurrentLevel(this.layerGroups[e+1].level)}decreaseCurrentLevel(){let e=this.getCurrentIndex();e!==0&&this.setCurrentLevel(this.layerGroups[e-1].level)}setCurrentLevel(e,t=!0){this.currentLevel=e,this.isEnabled&&(this.updateOpacity(),t&&this.instances.engine.render(),this.instances.layersUI?.updateCurrentLevelUI(this.getCurrentIndex()))}getCurrentIndex(){return r5(this.layerGroups.map(e=>e.level),this.currentLevel)}updateLayers(){this.isEnabled&&(this.sortLayers(),this.updateOpacity(),this.updateUI())}sortLayers(){this.layerGroups.sort((e,t)=>e.level-t.level),this.instances.settings.layersOrder==="DESC"&&this.layerGroups.reverse()}updateOpacity(){let e=this.getCurrentIndex();for(let t=0;t<this.layerGroups.length;t++){this.layerGroups[t].alpha=this.getOpacity(e,t);for(let i of this.layerGroups[t].layers)i.container.alpha=this.layerGroups[t].alpha}}getOpacity(e,t){let i=t-e;if(i<0||i>=this.instances.settings.numberOfActiveLayers)return 0;if(!this.instances.settings.useLayerCustomOpacity)return(this.instances.settings.numberOfActiveLayers-i)/this.instances.settings.numberOfActiveLayers;let s=this.layerGroups[t].level;if(s in this.instances.settings.layersCustomOpacity)return this.instances.settings.layersCustomOpacity[s];let n=this.layerGroups.slice(e,e+this.instances.settings.numberOfActiveLayers),o={opacity:1,index:0};for(let c=i;c>=0;c--)if(n[c].level in this.instances.settings.layersCustomOpacity){o={opacity:this.instances.settings.layersCustomOpacity[n[c].level],index:c};break}let a={opacity:0,index:this.instances.settings.numberOfActiveLayers};for(let c=i;c<n.length;c++)if(n[c].level in this.instances.settings.layersCustomOpacity){a={opacity:this.instances.settings.layersCustomOpacity[n[c].level],index:c};break}let l=(i-o.index)/(a.index-o.index);return(1-l)*o.opacity+l*a.opacity}updateUI(){this.instances.layersUI?.updateLevels(this.layerGroups),this.instances.layersUI?.updateCurrentLevelUI(this.getCurrentIndex())}enable(){this.isEnabled=!0,this.instances.layersUI?.open(),this.moveElementsInContainers(),this.updateLayers(),this.instances.engine.render()}disable(){this.isEnabled=!1,this.moveElementsOutOfContainers(),this.instances.layersUI?.close(),this.instances.engine.render()}unload(){this.instances.graphEventsDispatcher.isLocalResetting||(this.isEnabled=!1),this.destroyContainers(),this.nodeLookup={},this.layerGroups=[],this.notInLayers.nodeIDs=[],this.notInLayers.layerGroup.layers[0].nodes=[]}destroyContainers(){for(let e of this.layerGroups)for(let t of e.layers)t.container.on("childRemoved",(i,s)=>{s.children.length===0&&(s.removeFromParent(),s.destroy())});this.notInLayers.layerGroup.layers[0].container.on("childRemoved",(e,t)=>{t.children.length===0&&(t.removeFromParent(),t.destroy())}),this.moveElementsOutOfContainers()}static parseLayerID(e){let t=e.split("_");if(t.length===0)return{label:e};let i=parseInt(t[0]),s=t.length>1?t.slice(1).join("_"):"";return isNaN(i)&&(i=void 0,s=e),{level:i,label:s}}static getNodeLayer(e,t){for(let i of t.layerProperties.filter(s=>s!=="")){let s=ct(i,e,t);for(let n of s){let o=r.parseLayerID(n);return{id:n,level:o.level??t.layersLevels[e.path]??t.defaultLevelForLayers,label:o.label,levelFromID:o.level!==void 0,levelFromDefault:o.level===void 0&&!(e.path in t.layersLevels)}}}return null}static getAllLayers(e){let t=u.app.vault.getMarkdownFiles(),i=[];for(let s of t)r.addLayerIfNeeded(e,i,s);return r.sortData(e,i),i}static sortData(e,t){t.sort((i,s)=>i.level===s.level?Ri(i.label,s.label):i.level-s.level),e.layersOrder==="DESC"&&t.reverse()}static addLayerIfNeeded(e,t,i){let s=r.getNodeLayer(i,e);s&&(t.some(n=>n.id===s.id)||t.push(s))}};var Ga=class{constructor(e,t,i,s){this.isEnabled=!0;this.instances=e,this.coreElement=t,this.id=this.getID(),this.managers=new Map,this.types=i;for(let n of s){let o=n.name;this.managers.set(o,n)}this.additionalConstruct(),this.needGraphicsWrapper()&&this.createGraphicsWrapper()}additionalConstruct(){}init(){this.graphicsWrapper?.pixiElement.destroyed&&this.graphicsWrapper.createGraphics(),this.graphicsWrapper?.connect(),this.modifyCoreElement()}unload(){this.restoreCoreElement(),this.graphicsWrapper?.disconnect(),this.graphicsWrapper?.clearGraphics(),this.graphicsWrapper?.destroyGraphics()}setCoreElement(e){e&&e!==this.coreElement&&(this.graphicsWrapper?.disconnect(),this.coreElement=e,this.init())}findCoreElement(){return this.isCoreElementUptodate()?this.coreElement:this.getCoreCollection().find(t=>this.isSameCoreElement(t))}isAnyManagerDisabled(){for(let[e,t]of this.managers){let i=this.getTypes(e);if(i.size!==0&&!t.isActiveBasedOnTypes([...i]))return!0}return!1}getActiveType(e){let t=this.managers.get(e);if(!t)return;let i=this.getTypes(e);for(let s of i)if(t.isActive(s))return s}matchesTypes(e,t){let i=this.getTypes(e),s=structuredClone(i),n=structuredClone(t);for(let o of t)i.has(o)&&(s.delete(o),n.remove(o));return{typesToRemove:[...s],typesToAdd:n}}hasType(e,t){return!!this.types.get(e)?.has(t)}getTypes(e){let t=this.types.get(e);return t||new Set}setTypes(e,t){this.types.set(e,t);let i=this.graphicsWrapper?.managerGraphicsMap?.get(e);i&&(i.types=t)}disableType(e,t){this.graphicsWrapper?.managerGraphicsMap?.get(e)?.toggleType(t,!1)}enableType(e,t){this.graphicsWrapper?.managerGraphicsMap?.get(e)?.toggleType(t,!0)}disable(){this.isEnabled=!1}enable(){this.isEnabled=!0,this.init()}};var tC=`attribute vec2 aVertexPosition;
|
|
attribute vec2 aTextureCoord;
|
|
|
|
uniform mat3 projectionMatrix;
|
|
|
|
varying vec2 vTextureCoord;
|
|
|
|
void main(void)
|
|
{
|
|
gl_Position = vec4((projectionMatrix * vec3(aVertexPosition, 1.0)).xy, 0.0, 1.0);
|
|
vTextureCoord = aTextureCoord;
|
|
}`,rC=`varying vec2 vTextureCoord;
|
|
uniform sampler2D uSampler;
|
|
uniform vec4 filterClamp;
|
|
|
|
uniform float uAlpha;
|
|
uniform vec2 uThickness;
|
|
uniform vec4 uColor;
|
|
uniform bool uKnockout;
|
|
|
|
const float DOUBLE_PI = 2. * 3.14159265358979323846264;
|
|
const float ANGLE_STEP = \${angleStep};
|
|
|
|
float outlineMaxAlphaAtPos(vec2 pos) {
|
|
if (uThickness.x == 0. || uThickness.y == 0.) {
|
|
return 0.;
|
|
}
|
|
|
|
vec4 displacedColor;
|
|
vec2 displacedPos;
|
|
float maxAlpha = 0.;
|
|
|
|
for (float angle = 0.; angle <= DOUBLE_PI; angle += ANGLE_STEP) {
|
|
displacedPos.x = vTextureCoord.x + uThickness.x * cos(angle);
|
|
displacedPos.y = vTextureCoord.y + uThickness.y * sin(angle);
|
|
displacedColor = texture2D(uSampler, clamp(displacedPos, filterClamp.xy, filterClamp.zw));
|
|
maxAlpha = max(maxAlpha, displacedColor.a);
|
|
}
|
|
|
|
return maxAlpha;
|
|
}
|
|
|
|
void main(void) {
|
|
vec4 sourceColor = texture2D(uSampler, vTextureCoord);
|
|
vec4 contentColor = sourceColor * float(!uKnockout);
|
|
float outlineAlpha = uAlpha * outlineMaxAlphaAtPos(vTextureCoord.xy) * (1.-sourceColor.a);
|
|
vec4 outlineColor = vec4(vec3(uColor) * outlineAlpha, outlineAlpha);
|
|
gl_FragColor = contentColor + outlineColor;
|
|
}
|
|
`,zd=class extends ot{constructor(r=1,e=0,t=.1,i=1,s=!1){super(tC,rC.replace(/\$\{angleStep\}/,zd.getAngleStep(t))),this._thickness=1,this._alpha=1,this._knockout=!1,this.uniforms.uThickness=new Float32Array([0,0]),this.uniforms.uColor=new Float32Array([0,0,0,1]),this.uniforms.uAlpha=i,this.uniforms.uKnockout=s,Object.assign(this,{thickness:r,color:e,quality:t,alpha:i,knockout:s})}static getAngleStep(r){let e=Math.max(r*zd.MAX_SAMPLES,zd.MIN_SAMPLES);return(Math.PI*2/e).toFixed(7)}apply(r,e,t,i){this.uniforms.uThickness[0]=this._thickness/e._frame.width,this.uniforms.uThickness[1]=this._thickness/e._frame.height,this.uniforms.uAlpha=this._alpha,this.uniforms.uKnockout=this._knockout,r.applyFilter(this,e,t,i)}get alpha(){return this._alpha}set alpha(r){this._alpha=r}get color(){return ae.rgb2hex(this.uniforms.uColor)}set color(r){ae.hex2rgb(r,this.uniforms.uColor)}get knockout(){return this._knockout}set knockout(r){this._knockout=r}get thickness(){return this._thickness}set thickness(r){this._thickness=r,this.padding=r}},un=zd;un.MIN_SAMPLES=1,un.MAX_SAMPLES=100;var Wd=class extends Ga{constructor(){super(...arguments);this.hasChangedArrowShape=!1}additionalConstruct(){Xe.needToChangeArrow(this.instances)&&(this.extendedArrow=new Hd(this.instances,this)),this.firstSibling=!0}init(){this.findSiblingLink(),super.init(),this.extendedArrow?.init(),this.displayText(),this.isEnabled&&this.isAnyManagerDisabled()&&this.disable()}findSiblingLink(){if(this.instances.settings.enableFeatures[this.instances.type].links&&this.instances.settings.curvedLinks)return;let t=Wt({source:{id:this.coreElement.target.id},target:{id:this.coreElement.source.id}});this.siblingLink=this.instances.linksSet.extendedElementsMap.get(t),this.siblingLink&&(this.firstSibling=!!this.coreElement.line?.visible,this.siblingLink.siblingLink||(this.siblingLink.siblingLink=this,this.siblingLink.updateDisplayedTexts()))}modifyCoreElement(){this.modifyClearGraphics(),this.changeCoreLinkThickness(),this.proxyLine(),this.createContainer(),(this.isCurveLine()||this.graphicsWrapper?.pixiElement instanceof po)&&this.coreElement.line&&(this.coreElement.line.renderable=!1)}modifyClearGraphics(){this.coreClearGraphics||(this.coreClearGraphics=this.coreElement.clearGraphics,this.coreElement.clearGraphics=(()=>{u.proxysManager.unregisterProxy(this.coreElement.arrow),u.proxysManager.unregisterProxy(this.coreElement.line),this.coreClearGraphics&&(this.coreElement.clearGraphics=this.coreClearGraphics,this.coreClearGraphics=void 0,this.coreElement.clearGraphics())}).bind(this))}restoreCoreElement(){this.coreClearGraphics&&(this.coreElement.clearGraphics=this.coreClearGraphics,this.coreClearGraphics=void 0),this.restoreCoreLinkThickness(),u.proxysManager.unregisterProxy(this.coreElement.line),this.extendedArrow?.unload(),this.removeContainer(),this.coreElement.line&&(this.coreElement.line.renderable=!0)}unload(){super.unload(),this.removeTexts()}needGraphicsWrapper(){return!!(this.instances.settings.enableFeatures[this.instances.type].links&&(this.instances.settings.curvedLinks||this.instances.settings.allowMultipleLinkTypes&&(this.instances.settings.allowMultipleLinkTypes||this.instances.settings.interactiveSettings[ne].showOnGraph)))}createGraphicsWrapper(){this.graphicsWrapper||(this.graphicsWrapper=this.instances.settings.curvedLinks&&this.instances.settings.curvedFactor!==0?new qd(this):new Yd(this),this.graphicsWrapper.createGraphics())}isCurveLine(){return this.graphicsWrapper?.pixiElement instanceof hn}isRendered(){return!!this.coreElement.line?.visible||this.instances.settings.enableFeatures[this.instances.type].links&&this.instances.settings.curvedLinks}changeCoreLinkThickness(){this.coreElement.px&&u.settings.enableFeatures[this.instances.type]["elements-stats"]&&u.settings.linksSizeFunction!=="default"&&(u.settings.enableFeatures[this.instances.type].links&&!this.instances.settings.curvedLinks||!u.settings.enableFeatures[this.instances.type].links)?this.coreElement.px.scale.y=this.getThicknessScale():this.restoreCoreLinkThickness()}restoreCoreLinkThickness(){this.coreElement.px&&(this.coreElement.px.scale.y=1)}getThicknessScale(){if(!u.settings.enableFeatures[this.instances.type]["elements-stats"]||u.settings.linksSizeFunction==="default")return 1;let t=this.instances.linksSizeCalculator??u.graphsManager.linksSizeCalculator;return!t||!(this.coreElement.source.id in t.linksStats)||!(this.coreElement.target.id in t.linksStats[this.coreElement.source.id])?1:t.linksStats[this.coreElement.source.id][this.coreElement.target.id].value}createContainer(){if(!this.instances.settings.enableFeatures[this.instances.type].links||!this.instances.settings.outlineLinks)return;let t;this.siblingLink?.container?t=this.siblingLink.container:(this.container=new tt,t=this.container),this.coreElement.px&&(this.coreElement.px.removeFromParent(),ze(t,this.coreElement.px),this.coreElement.px.addListener("destroyed",this.removeContainer)),this.coreElement.arrow&&(this.coreElement.arrow.removeFromParent(),ze(t,this.coreElement.arrow),this.coreElement.arrow.addListener("destroyed",this.removeContainer)),this.graphicsWrapper?.pixiElement&&(this.graphicsWrapper.pixiElement.removeFromParent(),ze(t,this.graphicsWrapper.pixiElement),this.graphicsWrapper.pixiElement.addListener("destroyed",this.removeContainer)),t.filters=[new un(1,this.instances.cssBridge.getPrimaryColor(),.1,1,!1)],ze(this.coreElement.renderer.hanger,t)}removeContainer(){if(this.coreElement&&(this.coreElement.px&&this.coreElement.px.removeEventListener("destroyed",this.removeContainer),this.coreElement.arrow&&this.coreElement.arrow.removeEventListener("destroyed",this.removeContainer),this.graphicsWrapper?.pixiElement&&this.graphicsWrapper.pixiElement.removeEventListener("destroyed",this.removeContainer),!!this.container)){for(let t of this.container.children.filter(i=>!i.destroyed))ze(this.coreElement.renderer.hanger,t);this.container.destroy(),this.container=void 0}}proxyLine(){if(!Xe.needToChangeLinkColor(this.instances))return;let t=this.coreElement;if(t.line){let i=this.getStrokeColor.bind(this);u.proxysManager.registerProxy(this.coreElement,"line",{set(s,n,o,a){return n==="tint"&&(o=i()??o),Reflect.set(s,n,o,a)}}),t.line.on("destroyed",()=>u.proxysManager.unregisterProxy(this.coreElement.line))}}isHighlighted(){return this.instances.settings.noLineHighlight?!1:this.coreElement.source===this.coreElement.renderer.getHighlightNode()||this.coreElement.target===this.coreElement.renderer.getHighlightNode()}getStrokeColor(t=!1){if(!t&&this.isHighlighted())return;let i;if(this.instances.settings.enableFeatures[this.instances.type].links&&this.instances.settings.interactiveSettings[ne].showOnGraph){let s=this.managers.get(ne),n=this.getActiveType(ne);if(!this.isCurveLine()&&(!n||n===this.instances.settings.interactiveSettings[ne].noneType)&&this.siblingLink&&(n=this.siblingLink.getActiveType(ne)),s&&n&&n!==this.instances.settings.interactiveSettings[ne].noneType)return s.getColor(n)}if(u.settings.enableFeatures[this.instances.type]["elements-stats"]&&u.settings.linksColorFunction!=="default"){let s=this.instances.linksColorCalculator??u.graphsManager.linksColorCalculator;if(s){if(this.coreElement.source.id in s.linksStats&&this.coreElement.target.id in s.linksStats[this.coreElement.source.id]){let n=s.linksStats[this.coreElement.source.id][this.coreElement.target.id]?.value;if(n)return n}if(!this.isCurveLine()&&this.siblingLink&&this.siblingLink.coreElement.source.id in s.linksStats&&this.siblingLink.coreElement.target.id in s.linksStats[this.siblingLink.coreElement.source.id]){let n=s.linksStats[this.siblingLink.coreElement.source.id][this.siblingLink.coreElement.target.id]?.value;if(n)return n}}}if(this.instances.settings.enableFeatures[this.instances.type].linksSameColorAsNode)return this.instances.settings.enableFeatures[this.instances.type].arrows&&this.instances.settings.invertArrows?i=this.coreElement.target.getFillColor().rgb:i=this.coreElement.source.getFillColor().rgb,i}initAnimation(){this.instances.renderer.dragNode&&this.animatedDot||(this.animatedDot&&(this.animatedDot.destroy(),this.animatedDot=void 0),this.isCurveLine()?this.animatedDot=new jd(this):this.animatedDot=new $d(this),ze(this.coreElement.renderer.hanger,this.animatedDot),this.animationLoop())}async animate(){if(this.coreElement.renderer.idleFrames=0,this.isCurveLine()&&this.graphicsWrapper?.pixiElement)this.animatedDot?.updateFrame(this.graphicsWrapper.pixiElement.bezier);else{let t=this.coreElement.renderer.nodeScale,i=this.coreElement.source,s=this.coreElement.target,n={x:s.x-i.x,y:s.y-i.y},o=Math.sqrt(n.x*n.x+n.y*n.y);n.x/=o,n.y/=o;let a={x:i.x+t*i.getSize()*n.x,y:i.y+t*i.getSize()*n.y},l={x:s.x-t*s.getSize()*n.x,y:s.y-t*s.getSize()*n.y};this.animatedDot?.updateFrame({P0:a,P1:{x:(a.x+l.x)*.5,y:(a.y+l.y)*.5},P2:l})}}animationLoop(){requestAnimationFrame(async()=>{await this.animate(),this.coreElement.renderer.getHighlightNode()===this.coreElement.source||this.coreElement.renderer.getHighlightNode()===this.coreElement.target?this.animationLoop():(this.animatedDot?.destroy(),this.animatedDot=void 0)})}isCoreElementUptodate(){return!!this.coreElement.line}isSameCoreElement(t){return t.source.id===this.coreElement.source.id&&t.target.id===this.coreElement.target.id}isSameCoreGraphics(t){return t.line===this.coreElement.line}getCoreCollection(){return this.coreElement.renderer.links}getCoreParentGraphics(t){return this.instances.settings.curvedLinks?t.px:t.line}canBeAddedWithEngineOptions(){let t=this.instances.nodesSet.extendedElementsMap.get(this.coreElement.source.id),i=this.instances.nodesSet.extendedElementsMap.get(this.coreElement.target.id);return!t||!i?!1:t.canBeAddedWithEngineOptions()&&i.canBeAddedWithEngineOptions()}getID(){return Wt(this.coreElement)}disableType(t,i){super.disableType(t,i),this.updateDisplayedTexts()}enableType(t,i){super.enableType(t,i),this.updateDisplayedTexts()}disable(){if(super.disable(),this.extendedArrow?.unload(),this.graphicsWrapper?.disconnect(),this.texts)for(let t of this.texts)t.isRendered=!1,t.visible=!1}displayText(){if(!this.instances.settings.displayLinkTypeLabel||!this.coreElement.px?.renderable)return;this.texts||(this.texts=[]);let t=this.getDisplayedTexts();for(let i of t){let s=this.texts.find(n=>n.text.text===i);s?.destroyed&&this.texts.remove(s),(!s||s.destroyed)&&(this.graphicsWrapper?.pixiElement instanceof Va?s=new Xd(i,this):this.graphicsWrapper?.pixiElement instanceof Ua?s=new Kd(i,this):this.graphicsWrapper?.pixiElement instanceof po?s=new Zd(i,this):s=new Qd(i,this),this.texts.push(s)),s.setDisplayedText(i),s.connect(),s.updateFrame()}}getDisplayedTexts(){if(this.instances.settings.allowMultipleLinkTypes){let t=[...this.getTypes(ne)].filter(i=>this.managers.get(ne)?.isActive(i)&&i!==this.instances.settings.interactiveSettings[ne].noneType);if(!this.isCurveLine()&&this.siblingLink){let i=[...this.siblingLink.getTypes(ne)].filter(s=>this.managers.get(ne)?.isActive(s)&&s!==this.instances.settings.interactiveSettings[ne].noneType);t=[...new Set([...t,...i])]}return t}else{let t=this.getActiveType(ne);if(!t||t===this.instances.settings.interactiveSettings[ne].noneType){if(this.isCurveLine())return[];if(t=this.siblingLink?.getActiveType(ne),!t||t===this.instances.settings.interactiveSettings[ne].noneType)return[]}return[t]}}updateDisplayedTexts(){if(!this.texts)return;let t=this.getDisplayedTexts();if(this.instances.settings.allowMultipleLinkTypes)for(let i of t){let s=this.texts.find(n=>n.text.text===i);s&&(s.setDisplayedText(i),s.updateTextColor())}else{if(t.length===0)return;this.texts[0].setDisplayedText(t[0]),this.texts[0].applyCSSChanges()}}updateRenderedTexts(){if(!this.texts||!this.isEnabled)return;let t=za(1,this.coreElement.source.circle?.position??{x:0,y:0},this.coreElement.target.circle?.position??{x:0,y:0}),i=this.texts.filter(o=>this.instances.linksSet.managers.get(ne)?.isActive(o.text.text)),s=t/i.length,n=0;for(let o of this.texts)i.contains(o)?(Math.floor((n-s)/110)<Math.floor(n/110)?(o.isRendered=!0,o.updateFrame()):(o.isRendered=!1,o.visible=!1),n+=s):(o.isRendered=!1,o.visible=!1)}removeTexts(){if(this.texts){for(let t of this.texts)t.removeFromParent(),t.destroy();this.texts=void 0}}};function Wt(r){return r.source.id+"--to--"+r.target.id}var n5=require("obsidian");var e1=require("obsidian");function qe(r){return u.app.vault.getFileByPath(r)}function ct(r,e,t){if(u.app.metadataCache.isUserIgnored(e.path))return new Set;if(e.extension!=="md")return new Set;let i;switch(r){case He:i=iC(e);break;case pe:i=aC(e);break;default:i=nC(t??u.settings,r,e);break}return new Set([...i].filter(s=>!Xe.excludeType(t??u.settings,r,s)))}function i5(r,e,t,i){if(e.extension!=="md")return 0;switch(r){case He:return sC(e,t);case pe:return 1;default:return oC(r,e,t,i)}}function iC(r){let e=u.app.metadataCache.getCache(r.path);if(!e)return new Set;let t=(0,e1.getAllTags)(e)?.map(i=>i.replace("#",""));return t?new Set(t.sort()):new Set}function sC(r,e){let t=u.app.metadataCache.getCache(r.path);if(!t)return 0;let i="#"+e.replace("#",""),s=t.frontmatter?.tags?.filter(o=>o===e||o===i)||[],n=t.tags?.reduce((o,a)=>((a.tag===e||a.tag===i)&&o.push(a.tag),o),[])||[];return s.length+n.length}function Jd(r,e){if(r){if(typeof r=="string")if(r.startsWith("[[")&&r.endsWith("]]")){let t=(0,e1.getLinkpath)(r.slice(2,r.length-2)),i=t.indexOf("|"),s=i>=0?t.slice(0,i):t;e.add(fi(s).basename)}else e.add(r);else if(typeof r=="number")e.add(String(r));else if(typeof r=="boolean")e.add(String(r));else if(typeof r=="object"&&"path"in r)e.add(fi(r.path).basename);else if(Array.isArray(r))for(let t of r)Jd(t,e)}}function nC(r,e,t){let i=N0(r.ignoreInlineLinks),s=new Set;if(i){let n=i.page(t.path);if(r.canonicalizePropertiesWithDataview){let a=Object.keys(n).filter(l=>zt(l)===zt(e)).reduce((l,c)=>n[c]===null||n[c]===void 0||n[c]===""?l:l.concat([n[c]]),[]);if(a.length===0)return new Set;Jd(a,s)}else{let o=n[e];if(o==null||o==="")return new Set;Jd(o,s)}}else{let n=u.app.metadataCache.getFileCache(t)?.frontmatter;if(n?.hasOwnProperty(e)){let o=n[e];Jd(o,s)}}return s}function u8(r,e){if(typeof r=="string"||typeof r=="number"){if(e===String(r))return 1}else if(r&&typeof r=="object"&&"path"in r){let t=qe(r.path);if(t&&u.app.metadataCache.fileToLinktext(t,r.path,!0)===e)return 1;if(!t&&r.path===e)return 1}else if(Array.isArray(r)){let t=0;for(let i of r)t+=u8(i,e);return t}return 0}function oC(r,e,t,i){let s=N0(i);if(s){let o=s.page(e.path)[r];return o==null||o===""?0:u8(o,t)}else{let n=u.app.metadataCache.getFileCache(e)?.frontmatter;if(n?.hasOwnProperty(r)){let o=n[r];return u8(o,t)}}return 1}function t1(r){let e=N0(r.ignoreInlineLinks);return e?e.pages().values.reduce((t,i)=>t.concat(s5(r.canonicalizePropertiesWithDataview,i)),[]):Object.keys(u.app.metadataCache.getAllPropertyInfos())}function aC(r){let e=new Set;return r.parent&&e.add(r.parent.path),e}function Lo(r,e){let t=N0(r.ignoreInlineLinks);return t?lC(r,t,e):cC(e)}function lC(r,e,t){let i=new Map,s=e.page(t.path);for(let[n,o]of Object.entries(s))if(!(n==="file"||r.imageProperties.contains(n))&&!(o==null||o==="")&&!(!r.canonicalizePropertiesWithDataview&&n===zt(n)&&Object.keys(s).some(a=>zt(a)===zt(n)&&a!==n))){if(o&&typeof o=="object"&&"path"in o){let a=o.path,l=i.get(a);l||(l=new Set,i.set(a,l)),l.add(r.canonicalizePropertiesWithDataview?zt(n):n)}else if(Array.isArray(o)){for(let a of o)if(a&&typeof a=="object"&&"path"in a){let l=a.path,c=i.get(l);c||(c=new Set,i.set(l,c)),c.add(r.canonicalizePropertiesWithDataview?zt(n):n)}}}return i}function cC(r){let e=new Map,t=u.app.metadataCache.getFileCache(r)?.frontmatterLinks;if(t&&t.length>0)for(let i of t){let s=i.key.split(".")[0],n=u.app.metadataCache.getFirstLinkpathDest(i.link,".")?.path;n&&(e.has(n)||e.set(n,new Set),e.get(n)?.add(s))}return e}function H6(r){let e=u.app.metadataCache.getFileCache(r),t=[];if(e){if(e.links)for(let i=0;i<e.links.length;i++){let s=e.links[i];t.push(u.app.metadataCache.getFirstLinkpathDest(s.link,r.path)?.path??s.link)}if(e.embeds)for(let i=0;i<e.embeds.length;i++){let s=e.embeds[i];t.push(u.app.metadataCache.getFirstLinkpathDest(s.link,r.path)?.path??s.link)}if(e.frontmatterLinks)for(let i=0;i<e.frontmatterLinks.length;i++){let s=e.frontmatterLinks[i];t.push(u.app.metadataCache.getFirstLinkpathDest(s.link,r.path)?.path??s.link)}}return t}var Oi=class extends Ga{constructor(){super(...arguments);this.isPinned=!1;this.graphicsWrapperScale=1}additionalConstruct(){this.isCurrentNode=this.instances.type==="localgraph"&&this.instances.view.file?.path===this.id,this.extendedText=new r1(this.instances,this.coreElement),this.getIcon(),this.radius=We.RADIUS,this.computeRadius()}init(){super.init(),this.addAnimationListener(),this.isPinned&&this.pinnedPosition&&new yt(this.instances).pinNode(this.id,this.pinnedPosition.x,this.pinnedPosition.y),this.extendedText.init()}modifyCoreElement(){this.proxyGetSize(),this.proxyGetFillColor(),this.proxyInitGraphics(),this.proxyRender(),this.coreElement.circle?.addListener("destroyed",()=>this.restoreCoreElement())}proxyGetSize(){if(!(this.graphicsWrapper&&this.graphicsWrapper.shape!=="circle")&&this.radius===We.RADIUS&&!(this.instances.settings.enableFeatures[this.instances.type]["elements-stats"]&&this.instances.settings.nodesSizeFunction!=="default"))return;let t=this.getSize.bind(this);u.proxysManager.registerProxy(this.coreElement,"getSize",{apply(i,s,n){return t.call(this,...n)}})}needToChangeColor(){return!!(this.instances.type==="localgraph"&&(this.instances.settings.colorBasedOnDepth||this.instances.settings.currentNode.useColor&&this.isCurrentNode)||this.icon?.color&&this.instances.settings.useIconColorForBackgroud)}needToUpdateGraphicsColor(){return!1}proxyGetFillColor(){let t=this.needToUpdateGraphicsColor(),i=this.needToChangeColor();if(!(t||i))return;let s=this.onGetFillColorCalled.bind(this);u.proxysManager.registerProxy(this.coreElement,"getFillColor",{apply(n,o,a){return s(t,i,n,o,a)}})}proxyInitGraphics(){let t=this.onInitGraphicsCalled.bind(this);u.proxysManager.registerProxy(this.coreElement,"initGraphics",{apply(i,s,n){let o=Reflect.apply(i,s,n);return t(),o}})}proxyRender(){if(!(this.instances.settings.enableFeatures[this.instances.type].names&&this.instances.settings.showNamesWhenNeighborHighlighted||this.icon||this.graphicsWrapper&&this.graphicsWrapper.shape!=="circle"||this.instances.type==="graph"&&this.instances.settings.enableFeatures.graph.focus&&this.instances.settings.focusScaleFactor!==1))return;let t=this.onRenderCalled.bind(this);u.proxysManager.registerProxy(this.coreElement,"render",{apply(i,s,n){let o=Reflect.apply(i,s,n);return t(),o}})}unload(){this.removeAnimationListener(),this.isPinned&&new yt(this.instances).unpinNode(this.id),this.extendedText.unload(),this.coreElement.circle?.filters&&(this.coreElement.circle.filters.remove(this.instances.nodesSet.selectionFilter),this.coreElement.circle.filters.remove(this.instances.nodesSet.openFilter),this.coreElement.circle.filters.remove(this.instances.nodesSet.searchResultFilter)),super.unload()}restoreCoreElement(){u.proxysManager.unregisterProxy(this.coreElement.getSize),u.proxysManager.unregisterProxy(this.coreElement.getFillColor),u.proxysManager.unregisterProxy(this.coreElement.initGraphics),u.proxysManager.unregisterProxy(this.coreElement.render)}needGraphicsWrapper(){return this.needPin()||this.needOpacityLayer()||!!this.icon}needOpacityLayer(){return this.instances.settings.fadeOnDisable}needPin(){return this.instances.settings.showPinIcon}needIcon(){return this.instances.settings.enableFeatures[this.instances.type].icons}getIcon(){if(!this.needIcon())return;let t=this.instances.settings.useParentIcon?c5(this.id).reverse():[this.id],i=null;if(this.instances.settings.iconProperties.some(s=>s!=="")){let s=qe(this.id);if(s){let n=!1;for(let o of this.instances.settings.iconProperties){let a=ct(o,s,this.instances.settings);for(let l of a){if(Bc(l)){i={svg:null,color:null,emoji:l},n=!0;break}let c=(0,n5.getIcon)(l);if(c){c.setAttribute("stroke","white"),i={svg:c,color:null,emoji:null},n=!0;break}}if(n)break}}}if(!i&&this.instances.settings.usePluginForIcon){for(let s of t)if(i=o5(s),i||(i=a5(s)),i)break;i?.svg&&h8(i.svg,"white")}if(i&&!this.instances.settings.usePluginForIconColor&&(i.color=null),i?.emoji){let s=Bf(i.emoji);s&&(i.color=h0(s))}this.icon&&this.icon.svg==null&&this.icon.emoji==null?this.icon=null:this.icon=i}onInitGraphicsCalled(){this.graphicsWrapper?.connect()}onRenderCalled(){if(this.instances.settings.enableFeatures[this.instances.type].names&&this.instances.settings.showNamesWhenNeighborHighlighted&&this.extendedText.makeVisibleIfNeighborHighlighted(),this.coreElement.circle){if(this.graphicsWrapper&&this.graphicsWrapper.shape!=="circle")this.coreElement.circle.tint=$e.backgroundColor;else if(this.icon){let t=!this.graphicsWrapper||!("background"in this.graphicsWrapper)||!this.graphicsWrapper.background;this.coreElement.circle.tint=t?yh($e.backgroundColor,this.coreElement.getFillColor().rgb,this.instances.settings.backgroundOpacityWithIcon):$e.backgroundColor,this.coreElement.circle.alpha=1}this.instances.type==="graph"&&this.instances.settings.enableFeatures.graph.focus&&this.instances.settings.focusScaleFactor!==1&&this.id===u.app.workspace.getActiveFile()?.path&&(this.coreElement.circle.scale.x*=this.instances.settings.focusScaleFactor,this.coreElement.circle.scale.y*=this.instances.settings.focusScaleFactor)}}computeRadius(){let t=!1;if(this.instances.settings.enableFeatures[this.instances.type]["elements-stats"]){let i=this.instances.settings.nodesSizeProperties.filter(s=>s!=="");if(i.length>0){let s=qe(this.id);if(s)for(let n of i){let o=ct(n,s,this.instances.settings);for(let a of o)if(l5(a)){this.radius=parseInt(a),isNaN(this.radius)&&(this.radius=We.RADIUS),t=!0;break}if(t)break}}}!t&&this.isCurrentNode&&this.instances.settings.currentNode.size!==gi.currentNode.size&&(this.radius=this.instances.settings.currentNode.size)}getSize(){return this.getSizeWithoutScaling()*this.graphicsWrapperScale}getSizeWithoutScaling(){let t=this.radius/We.RADIUS,i=this.coreElement;if(this.instances.settings.enableFeatures[this.instances.type]["elements-stats"]&&this.instances.settings.nodesSizeFunction!=="default"){let s=i.renderer.fNodeSizeMult*8,n=(this.instances.nodesSizeCalculator??u.graphsManager.nodesSizeCalculator)?.filesStats.get(this.id)?.value;return s*t*(n??1)}else return i.renderer.fNodeSizeMult*Math.max(8,Math.min(3*Math.sqrt(i.weight+1),30))*t}onGetFillColorCalled(t,i,s,n,o){let a=this.coreElement.renderer.getHighlightNode()===this.coreElement,l=this.coreElement.type==="focused",c=Reflect.apply(s,n,o),h=c;return i&&(a||(h=this.getFillColor.call(this,...o)??c)),t&&this.graphicsWrapper?.updateFillColor(h.rgb,a),h}getFillColor(){if(this.isCurrentNode&&this.instances.settings.currentNode.useColor)return{rgb:Vr(this.instances.settings.currentNode.color),a:this.instances.renderer.colors.fillFocused.a>0?this.instances.renderer.colors.fillFocused.a:1};if(this.icon?.color&&this.instances.settings.useIconColorForBackgroud)return{rgb:si(this.icon.color).rgb,a:this.instances.renderer.colors.fill.a}}isCoreElementUptodate(){return!!this.coreElement.circle}isSameCoreElement(t){return t.id===this.id}isSameCoreGraphics(t){return t.circle===this.coreElement.circle}getCoreCollection(){return this.coreElement.renderer.nodes}setCoreElement(t){t&&(this.extendedText.coreElement=t),super.setCoreElement(t)}getCoreParentGraphics(t){return t.circle}canBeAddedWithEngineOptions(){return!(this.coreElement.type==="tag"&&!this.instances.engine.getOptions().showTags||this.coreElement.type==="attachment"&&!this.instances.engine.getOptions().showAttachments||this.coreElement.type==="unresolved"&&this.instances.engine.getOptions().hideUnresolved)}getID(){return this.coreElement.id}pin(){this.isPinned=!0,this.pinnedPosition={x:this.coreElement.x,y:this.coreElement.y},this.graphicsWrapper?.pin()}unpin(){this.isPinned=!1,this.pinnedPosition=void 0,this.graphicsWrapper?.unpin()}select(){return this.coreElement.circle?(this.coreElement.circle.filters?this.coreElement.circle.filters.contains(this.instances.nodesSet.selectionFilter)||this.coreElement.circle.filters.push(this.instances.nodesSet.selectionFilter):this.coreElement.circle.filters=[this.instances.nodesSet.selectionFilter],!0):!1}unselect(){this.coreElement.circle?.filters?.remove(this.instances.nodesSet.selectionFilter)}addAnimationListener(){this.instances.settings.animateDotsOnLinks&&(this.initLinksAnimation=this.initLinksAnimation.bind(this),this.coreElement.circle?.addListener("mouseenter",this.initLinksAnimation))}removeAnimationListener(){this.coreElement.circle?.removeListener("mouseenter",this.initLinksAnimation)}initLinksAnimation(){for(let t of Object.entries(this.coreElement.forward)){if(!this.instances.renderer.nodes.find(s=>s.id===t[0]))continue;let i=this.instances.linksSet.extendedElementsMap.get(Wt(t[1]));i&&i.initAnimation()}for(let t of Object.entries(this.coreElement.reverse)){if(!this.instances.renderer.nodes.find(s=>s.id===t[0]))continue;let i=this.instances.linksSet.extendedElementsMap.get(Wt(t[1]));i&&i.initAnimation()}}toggleOpenInTab(t){this.coreElement.circle&&(t?(this.coreElement.circle.filters||(this.coreElement.circle.filters=[]),this.coreElement.circle.filters.contains(this.instances.nodesSet.openFilter)||this.coreElement.circle.filters.push(this.instances.nodesSet.openFilter)):this.coreElement.circle.filters&&this.coreElement.circle.filters.remove(this.instances.nodesSet.openFilter))}toggleIsSearchResult(t){this.coreElement.circle&&(t?(this.coreElement.circle.filters||(this.coreElement.circle.filters=[]),this.coreElement.circle.filters.contains(this.instances.nodesSet.searchResultFilter)||this.coreElement.circle.filters.push(this.instances.nodesSet.searchResultFilter)):this.coreElement.circle.filters&&this.coreElement.circle.filters.remove(this.instances.nodesSet.searchResultFilter))}flicker(){let t=this.coreElement.circle;if(!t)return;let i=new We(this.graphicsWrapper?.shape??"circle");i.eventMode="none",i.drawFill(this.instances.cssBridge.getSearchColor()),i.zIndex=100,i.alpha=0,this.coreElement.renderer.hanger.addChild(i);let s=!0,n=3e3,o=Date.now(),a=()=>{if(t.destroyed||i.destroyed)return;let c=i.alpha+(s?.07:-.07);i.position.set(t.position.x,t.position.y),i.scale.set(t.scale.x*i.getDrawingResolution(),t.scale.y*i.getDrawingResolution()),c<0?(s=!0,i.alpha=0):c>1?(s=!1,i.alpha=1):i.alpha=c,this.instances.renderer.changed(),Date.now()-o<n?requestAnimationFrame(a):i.destroy()},l=requestAnimationFrame(a);i.addEventListener("destroyed",()=>{cancelAnimationFrame(l)}),t.addEventListener("destroyed",()=>{cancelAnimationFrame(l)})}};var i1=class extends Oi{needGraphicsWrapper(){return super.needGraphicsWrapper()||this.needImage()}needImage(){return this.instances.settings.enableFeatures[this.instances.type].imagesForAttachments}createGraphicsWrapper(){this.graphicsWrapper||(this.graphicsWrapper=new s1(this)),this.graphicsWrapper.createGraphics(),this.graphicsWrapperScale=We.nodeScaleFactor(this.graphicsWrapper.shape)}};var n1=class extends Oi{needGraphicsWrapper(){return super.needGraphicsWrapper()||this.needBackground()||this.needImage()||this.needArcs()}needImage(){return this.instances.settings.enableFeatures[this.instances.type].imagesFromProperty||this.instances.settings.enableFeatures[this.instances.type].imagesFromEmbeds}needBackground(){return!!(this.icon&&this.instances.settings.backgroundOpacityWithIcon>0&&this.graphicsWrapper?.shape!=="circle"||this.icon&&this.instances.settings.borderWidthWithIcon>0||this.graphicsWrapper?.shape!=="circle")}needArcs(){if(this.coreElement.type!==""&&!(this.instances.type==="localgraph"&&this.coreElement.type==="focused")||this.managers.size===0)return!1;for(let[e,t]of this.managers)if(this.instances.settings.interactiveSettings[e].showOnGraph)return!0;return!1}createGraphicsWrapper(){this.graphicsWrapper||(this.graphicsWrapper=new o1(this)),this.graphicsWrapper.createGraphics(),this.graphicsWrapperScale=We.nodeScaleFactor(this.graphicsWrapper.shape)}needToChangeColor(){return super.needToChangeColor()||this.instances.settings.enableFeatures[this.instances.type]["elements-stats"]&&u.settings.nodesColorFunction!=="default"}needToUpdateGraphicsColor(){return super.needToUpdateGraphicsColor()||!!this.graphicsWrapper.background||!!this.graphicsWrapper?.iconSprite}getFillColor(){let e=super.getFillColor();if(e)return e;if(this.instances.settings.enableFeatures[this.instances.type]["elements-stats"]&&u.settings.nodesColorFunction!=="default"){let t=(this.instances.nodesColorCalculator??u.graphsManager.nodesColorCalculator)?.filesStats.get(this.id);if(t)return{rgb:t.value,a:1}}if(this.instances.type==="localgraph"&&this.instances.settings.colorBasedOnDepth&&this.instances.graphologyGraph?.graphology){let i=this.instances.graphologyGraph.graphology.getNodeAttribute(this.id,"depth");if(i&&i>0){let s=(i-1)/4;return{rgb:zs(s,this.instances.settings.depthColormap,this.instances.settings),a:1}}}}};var a1=class extends Oi{createGraphicsWrapper(){this.graphicsWrapper||(this.graphicsWrapper=new l1(this)),this.graphicsWrapper.createGraphics(),this.graphicsWrapperScale=We.nodeScaleFactor(this.graphicsWrapper.shape)}needToChangeColor(){return super.needToChangeColor()||this.instances.settings.enableFeatures[this.instances.type].tags&&!Xe.excludeType(this.instances.settings,He,this.id.replace("#",""))}getFillColor(){if(this.instances.settings.enableFeatures[this.instances.type].tags&&!Xe.excludeType(this.instances.settings,He,this.id.replace("#",""))){let e=this.managers.get(He)?.getColor(this.id.replace("#",""));if(e)return{rgb:e,a:1}}return super.getFillColor()}};var c1=class extends Oi{constructor(e,t){super(e,t,new Map,[])}needGraphicsWrapper(){return super.needGraphicsWrapper()||this.needInnerCircle()}needInnerCircle(){return typeof this.instances.settings.borderUnresolved=="number"&&this.instances.settings.borderUnresolved>0&&this.instances.settings.borderUnresolved<1}createGraphicsWrapper(){this.graphicsWrapper||(this.graphicsWrapper=new u1(this)),this.graphicsWrapper.createGraphics(),this.graphicsWrapperScale=We.nodeScaleFactor(this.graphicsWrapper.shape)}};var r1=class{constructor(e,t){this.hasChangedText=!1;this.instances=e,this.coreElement=t,this.coreGetTextStyle=this.coreElement.getTextStyle.bind(this.coreElement),this.onMouseEnter=this.onMouseEnter.bind(this),this.onMouseLeave=this.onMouseLeave.bind(this),this.restoreText=this.restoreText.bind(this),this.changeText=this.changeText.bind(this)}init(){this.modifyCoreElement(),this.coreElement.text?.addListener("destroyed",()=>{this.unload()})}modifyCoreElement(){this.updateTextStyle(),this.updateText(),this.createTextPositionCallback()}unload(){this.restoreTextPositionCallback(),this.coreElement.text&&this.hasChangedText&&(this.coreElement.circle?.removeListener("mouseenter",this.onMouseEnter),this.coreElement.circle?.removeListener("mouseleave",this.onMouseLeave),this.restoreText(),this.hasChangedText=!1),this.restoreTextStyle(),this.coreElement.text&&this.coreElement.text.anchor.set(.5,0)}disable(){this.restoreTextPositionCallback()}updateTextStyle(){if(!this.coreElement.text)return;let e=!!this.instances.extendedStyleEl,t=this.instances.settings.enableFeatures[this.instances.type].names&&this.instances.settings.addBackgroundToName;if(!e&&!t)return;let i=this.instances.cssBridge.getNodeTextStyle(this.coreElement.id),s=typeof this.coreElement.text.style.fontFamily=="string"?this.coreElement.text.style.fontFamily:this.coreElement.text.style.fontFamily.join(", ");this.coreElement.getTextStyle=()=>{let n=this.coreGetTextStyle();if(e){if(n.fontFamily=i.fontFamily+", "+s,n.fontStyle=i.fontStyle,n.fontVariant=i.fontVariant,n.fontWeight=i.fontWeight,n.letterSpacing=i.letterSpacing,n.fontSize=i.fontSize+this.coreElement.getSize()/4,i.fill&&(n.fill=i.fill),i.stroke&&this.coreElement.text){$e.applyTextStroke(n,i.stroke);let{height:o}=xt.measureText(this.coreElement.text.text,n);this.coreElement.text.anchor.set(.5,i.stroke.width/o)}else this.coreElement.text&&this.coreElement.text.anchor.set(.5,0);i.dropShadow&&this.coreElement.text&&$e.applyTextShadow(n,i.dropShadow,Ma(n.fill)??this.coreElement.renderer.colors.text.rgb)}return t&&(n.stroke=$e.backgroundColor,n.strokeThickness=8,n.lineJoin="round"),n},this.coreElement.fontDirty=!0}restoreTextStyle(){this.coreElement.getTextStyle=this.coreGetTextStyle,this.coreElement.fontDirty=!0}updateText(){!this.instances.settings.enableFeatures[this.instances.type].names||!this.coreElement.text||(this.coreElement.circle?.addListener("mouseenter",this.onMouseEnter),this.coreElement.circle?.addListener("mouseleave",this.onMouseLeave),this.hasChangedText=!0,this.changeText())}onMouseEnter(){this.coreElement.text&&(this.setText(this.getPropertyName()??this.coreElement.getDisplayText()),this.coreElement.text.zIndex=10)}onMouseLeave(){this.coreElement.text&&(this.changeText(),this.coreElement.text.zIndex=2)}changeText(){if(!this.coreElement.text)return;let e=this.getPropertyName()??this.coreElement.getDisplayText();this.instances.settings.showOnlyFileName&&(e=e.split("/").last()||e),this.instances.settings.noExtension&&(e=e.replace(/\.[^/.]+$/,"")),this.instances.settings.numberOfCharacters&&this.instances.settings.numberOfCharacters>0&&e.length>this.instances.settings.numberOfCharacters&&(e=e.slice(0,this.instances.settings.numberOfCharacters)+this.instances.settings.ellipsis),this.setText(e)}getPropertyName(){if(!this.instances.settings.usePropertiesForName)return;let e=qe(this.coreElement.id);if(e)for(let t of this.instances.settings.usePropertiesForName){let i=ct(t,e,this.instances.settings);for(let s of i)if(s!=null)return s.toString()}}restoreText(){if(!this.coreElement.text)return;let e=this.coreElement.getDisplayText();this.coreElement.text.text!==e&&(this.coreElement.text.text=e)}setText(e){this.coreElement.text&&this.coreElement.text.text!==e&&(this.coreElement.text.text=e)}createTextPositionCallback(){if(!this.instances.settings.enableFeatures[this.instances.type].names||this.instances.settings.nameVerticalOffset===0&&!this.instances.settings.dynamicVerticalOffset||!this.coreElement.text)return;let e=this.coreElement.text.position,t=this.instances.settings.dynamicVerticalOffset?this.applyDynamicOffset.bind(this):this.applyStaticOffset.bind(this);this.coreTextPositionCallback=e.cb;let i=e.cb;e.cb=()=>{t(),i.call(e.scope)},this.coreElement.fontDirty=!0,this.coreElement.moveText=0}restoreTextPositionCallback(){if(!this.coreTextPositionCallback)return;let e=this.coreElement.text?.position;e&&(e.cb=this.coreTextPositionCallback,this.coreTextPositionCallback=void 0)}applyDynamicOffset(){let e=this.coreElement,t=e.text,i=e.circle;if(!t||!i)return;let s=t.position.y;this.instances.renderer.fShowArrow&&(s=Object.values(e.reverse).reduce((o,a)=>{if(a.arrow&&a.arrow.visible){let l=a.arrow.getBounds();s=Math.max(s,t.parent.toLocal({x:l.left,y:l.bottom}).y)}return s},s));let n=i.getBounds();s=Math.max(s,t.parent.toLocal({x:n.left,y:n.bottom}).y),t.position._y=s}applyStaticOffset(){let e=this.coreElement;if(!e.text||!e.circle)return;let t=this.instances.settings.nameVerticalOffset,i=this.instances.renderer,s=e.text.y,n=e.getSize();if(t<-55){let o=e.y+(n+5)*i.nodeScale,a=s-o;s=o-a}if(t<-5&&t>-105){let o=n*i.nodeScale/50+e.text.height/100,a=-5*i.nodeScale+(5+t)*o;s=s+a}else if(t<=-105){let o=n*i.nodeScale/50+e.text.height/100,a=(100+t)*i.nodeScale+-100*o;s=s+a}else s=s+t*i.nodeScale;e.text.position._y=s}makeVisibleIfNeighborHighlighted(){let e=this.coreElement.text;if(!e)return;let t=this.coreElement.renderer;if(t.scale<t.fTextShowMult+.1)return;let i=t.getHighlightNode();i&&(!this.coreElement.forward.hasOwnProperty(i.id)&&!this.coreElement.reverse.hasOwnProperty(i.id)||(e.alpha=1,e.visible||(e.visible=!0,e.position.set(this.coreElement.x,this.coreElement.y+(this.coreElement.getSize()+5)*t.nodeScale),e.scale.set(t.scale<1?1/t.scale:t.nodeScale))))}};var Hd=class{constructor(e,t){this.hasChangedArrowShape=!1;this.instances=e,this.extendedLink=t}init(){this.modifyCoreElement()}modifyCoreElement(){this.proxyArrow(),this.createScalleArrowCallback(),this.createFlatArrow()}unload(){u.proxysManager.unregisterProxy(this.extendedLink.coreElement.arrow),this.restoreArrowScaleCallback(),this.resetArrowShape()}proxyArrow(){let e=Xe.needToChangeArrowColor(this.instances,this.extendedLink),t=Xe.needToChangeArrowAlpha(this.instances);if(!this.instances.settings.invertArrows&&!e&&!t)return;let s=this.extendedLink.coreElement.arrow;if(s){let n=[];this.instances.settings.invertArrows&&n.push(this.invertArrow.bind(this)),e&&n.push(this.colorArrow.bind(this)),t&&n.push(this.makeArrowOpaque.bind(this));let o=((a,l,c)=>n.some(h=>h(a,l,c))).bind(this);u.proxysManager.registerProxy(this.extendedLink.coreElement,"arrow",{set(a,l,c,h){return o(a,l,c)?!0:Reflect.set(a,l,c,h)}}),s.addEventListener("destroyed",()=>{u.proxysManager.unregisterProxy(this.extendedLink.coreElement.arrow)})}}makeArrowOpaque(e,t,i){if(t==="alpha"){let s=this.extendedLink.coreElement.renderer.getHighlightNode();return s&&this.extendedLink.coreElement.source!==s&&this.extendedLink.coreElement.target!==s?Reflect.set(e,t,i):Reflect.set(e,t,1)}return!1}colorArrow(e,t,i){if(t==="tint"){let s=this.getArrowColor();return Reflect.set(e,t,s??i)}return!1}getArrowColor(){if(this.extendedLink.instances.settings.enableFeatures[this.extendedLink.instances.type].arrows&&this.extendedLink.instances.settings.arrowColorBool&&this.extendedLink.instances.settings.arrowColor!=="")return this.extendedLink.instances.settings.arrowColor;if(this.extendedLink.coreElement.line?.worldVisible)return this.extendedLink.coreElement.line.tint;if(this.extendedLink.siblingLink?.coreElement.line?.worldVisible)return this.extendedLink.siblingLink.coreElement.line.tint}invertArrow(e,t,i){if(t==="x"||t==="y"){let l=this.extendedLink.coreElement;var s=l.target.x-l.source.x,n=l.target.y-l.source.y,o=Math.sqrt(s*s+n*n),a=l.source.getSize()*l.renderer.nodeScale;return t==="x"?i=l.source.x+s*a/o:i=l.source.y+n*a/o,Reflect.set(e,t,i)}else if(t==="rotation")return i=i+Math.PI,Reflect.set(e,t,i);return!1}createScalleArrowCallback(){if(this.coreArrowScaleCallback||!Xe.needToChangeArrowScale(this.extendedLink.instances))return;let e=this.extendedLink.coreElement.arrow?.scale;if(e){let t=this.scaleArrow.bind(this);this.coreArrowScaleCallback=e.cb;let i=e.cb;e.cb=()=>{t(),i.call(e.scope)},t()}}restoreArrowScaleCallback(){if(!this.coreArrowScaleCallback)return;let e=this.extendedLink.coreElement.arrow?.scale;e&&(e.cb=this.coreArrowScaleCallback,this.coreArrowScaleCallback=void 0)}scaleArrow(){let e=this.extendedLink.coreElement,t=e.arrow;t&&(t.scale._x=t.scale._y=(this.instances.settings.arrowFixedSize?2*Math.sqrt(e.renderer.fLineSizeMult)*e.renderer.nodeScale:t.scale._y)*this.instances.settings.arrowScale)}createFlatArrow(){if(!this.instances.settings.enableFeatures[this.instances.type].arrows||!this.instances.settings.flatArrows)return;let e=this.extendedLink.coreElement.arrow;e&&(e.clear(),e.beginFill(16777215),e.moveTo(0,0),e.lineTo(-4,-2),e.lineTo(-4,2),e.lineTo(0,0),e.endFill(),this.hasChangedArrowShape=!0)}resetArrowShape(){if(!this.hasChangedArrowShape)return;let e=this.extendedLink.coreElement.arrow;!e||e.destroyed||(e.clear(),e.beginFill(16777215),e.moveTo(0,0),e.lineTo(-4,-2),e.lineTo(-3,0),e.lineTo(-4,2),e.lineTo(0,0),e.endFill())}};var jd=class extends lt{constructor(t){super();this.t=0;this.eventMode="none",this.extendedLink=t,this.init()}init(){this.alpha=0,this.beginFill(this.extendedLink.getStrokeColor(!0)||this.extendedLink.coreElement.renderer.colors.lineHighlight.rgb),this.drawCircle(0,0,3),this.endFill()}updateFrame(t){this.alpha=1;let i=dn(this.t,t.P0,t.P1,t.P2);this.position.set(i.x,i.y),this.scale.set(this.extendedLink.coreElement.renderer.fLineSizeMult/Math.sqrt(this.extendedLink.coreElement.renderer.scale)),this.t+=.01*u.settings.animationSpeedForDots,this.t>1&&(this.t=0)}};var $d=class extends lt{constructor(t){super();this.t=0;this.eventMode="none",this.extendedLink=t,this.init()}init(){this.alpha=0,this.beginFill(this.extendedLink.getStrokeColor(!0)||this.extendedLink.coreElement.renderer.colors.lineHighlight.rgb),this.drawCircle(0,0,3),this.endFill()}updateFrame(t){this.alpha=1,this.position.set(t.P0.x*(1-this.t)+t.P2.x*this.t,t.P0.y*(1-this.t)+t.P2.y*this.t),this.scale.set(this.extendedLink.coreElement.renderer.fLineSizeMult/Math.sqrt(this.extendedLink.coreElement.renderer.scale)),this.t+=.01*u.settings.animationSpeedForDots,this.t>1&&(this.t=0)}};var Wa=class extends lt{constructor(e){super(),this.eventMode="none",this.extendedLink=e,this.init()}init(){this.destroyed||(this.beginFill("white"),this.moveTo(0,0),this.lineTo(-4,-2),(!this.extendedLink.instances.settings.enableFeatures[this.extendedLink.instances.type].arrows||!this.extendedLink.instances.settings.flatArrows)&&this.lineTo(-3,0),this.lineTo(-4,2),this.lineTo(0,0),this.endFill(),this.name="arrow",this.zIndex=1,this.pivot.set(0,0),this.alpha=this.extendedLink.coreElement.renderer.colors.arrow.a,this.extendedLink.coreElement.arrow&&(this.extendedLink.coreElement.arrow.renderable=!1))}update(e,t,i){let s=this.extendedLink.coreElement.arrow?.alpha??1;this.extendedLink.instances.settings.enableFeatures[this.extendedLink.instances.type].arrows&&this.extendedLink.instances.settings.alwaysOpaqueArrows&&(this.extendedLink.isHighlighted()||!this.extendedLink.coreElement.renderer.getHighlightNode())&&(s=1);let n=this.extendedLink.coreElement;this.tint=e,this.alpha=s,this.position.set(t.x,t.y),this.rotation=i,this.scale.set((this.extendedLink.instances.settings.arrowFixedSize?2*Math.sqrt(n.renderer.fLineSizeMult)*n.renderer.nodeScale:2*Math.sqrt(n.renderer.fLineSizeMult)/n.renderer.scale)*this.extendedLink.instances.settings.arrowScale)}};var hn=class extends lt{constructor(e,t,i,s){super(),this.eventMode="none",this.manager=e,this.types=t,this.name="curve:"+i,this.extendedLink=s,this.bezier={P0:{x:0,y:0},P1:{x:0,y:0},P2:{x:0,y:0}},this.hasFaded=!this.extendedLink.instances.settings.fadeInElements,this.additionalConstruct(),this.updateValues()}additionalConstruct(){}updateValues(){if(this.activeType=this.extendedLink.getActiveType(this.manager.name),!this.activeType)return;let e=this.extendedLink.getStrokeColor();e!==void 0?this.color=e:this.extendedLink.instances.settings.interactiveSettings[this.manager.name].showOnGraph?this.color=this.manager.getColor(this.activeType):this.extendedLink.coreElement.line?this.color=Pi(this.extendedLink.coreElement.line.tint):this.color=this.extendedLink.coreElement.renderer.colors.line.rgb,this.redraw()}initArrow(){this.destroyed||(this.arrow=new Wa(this.extendedLink),ze(this,this.arrow))}redraw(){!this.activeType&&this.arrow&&(this.arrow.clear(),this.arrow.destroy(),this.arrow=null),this.updateFrame()}computeMainBezier(){if(this.destroyed)return!1;this.clear();let e=this.extendedLink.coreElement.renderer,t=this.extendedLink.coreElement,i=this.extendedLink.instances.settings.enableFeatures[this.extendedLink.instances.type].arrows&&this.extendedLink.instances.settings.invertArrows,s=i?t.source:t.target,n=i?t.target:t.source;if(!s.circle||!n.circle)return this.destroy(),!1;let o=e.nodeScale,a=s.x-n.x,l=s.y-n.y;this.bezier.P1={x:(n.x+s.x)*.5+l*.2*this.extendedLink.instances.settings.curvedFactor,y:(n.y+s.y)*.5-a*.2*this.extendedLink.instances.settings.curvedFactor};let c=u5(1,n,this.bezier.P1,s);return this.bezier.P0=dn(.9*n.getSize()*o/c,n,this.bezier.P1,s),this.bezier.P2=dn(1-.9*s.getSize()*o/c,n,this.bezier.P1,s),!0}getMiddlePoint(){return dn(.5,this.bezier.P0,this.bezier.P1,this.bezier.P2)}updateFrame(){if(!this.computeMainBezier())return!1;let e=this.extendedLink.coreElement;return e.line&&this.hasFaded&&(this.alpha=e.line.alpha),!0}updateArrow(e,t){this.extendedLink.coreElement.arrow&&this.extendedLink.coreElement.arrow.visible?(this.arrow||this.initArrow(),this.arrow?.update(e,this.bezier.P2,t+(this.bezier.P1.x>this.bezier.P2.x?Math.PI:0))):(this.arrow?.removeFromParent(),this.arrow?.clear(),this.arrow?.destroy(),this.arrow=null)}destroy(e){this.extendedLink.coreElement.arrow&&(this.extendedLink.coreElement.arrow.renderable=!0),!this.destroyed&&super.destroy(e)}clearGraphics(){this.destroyed||(this.arrow?.clear(),this.clear(),this.destroy({children:!0}),this.removeFromParent())}clear(){return this.destroyed?this:super.clear()}toggleType(e,t){this.updateValues()}};var Ua=class extends hn{updateValues(){this.arrowColor=this.extendedLink.instances.settings.enableFeatures[this.extendedLink.instances.type].arrows&&this.extendedLink.instances.settings.arrowColorBool&&this.extendedLink.instances.settings.arrowColor!==""?Vr(this.extendedLink.instances.settings.arrowColor):void 0,super.updateValues()}updateFrame(){if(!super.updateFrame())return!1;let e=this.extendedLink.coreElement.renderer;return this.lineStyle({width:this.extendedLink.getThicknessScale()*e.fLineSizeMult/e.scale,color:"white"}),this.moveTo(this.bezier.P0.x,this.bezier.P0.y).quadraticCurveTo(this.bezier.P1.x,this.bezier.P1.y,this.bezier.P2.x,this.bezier.P2.y),this.extendedLink.isHighlighted()?this.tint=(this.extendedLink.coreElement.line?.worldVisible?this.extendedLink.coreElement.line.tint:this.extendedLink.siblingLink?.coreElement.line?.tint)??Ba(this.tint,this.extendedLink.coreElement.renderer.colors.lineHighlight.rgb):this.tint=this.color,this.updateArrow(this.arrowColor??Pi(this.tint),-Math.atan(-h1(1,this.bezier.P0,this.bezier.P1,this.bezier.P2).m)),!0}destroy(e){this.extendedLink.coreElement.arrow&&(this.extendedLink.coreElement.arrow.renderable=!0),!this.destroyed&&super.destroy(e)}clearGraphics(){this.destroyed||(this.arrow?.clear(),this.clear(),this.destroy({children:!0}),this.removeFromParent())}clear(){return this.destroyed?this:super.clear()}toggleType(e,t){this.updateValues()}};var Va=class extends hn{additionalConstruct(){this.typesPositions={}}updateFrame(){if(this.typesPositions={},!super.updateFrame())return!1;let e=this.extendedLink.coreElement.renderer,t,i=this.extendedLink.getThicknessScale()*e.fLineSizeMult/e.scale,s={x:this.bezier.P0.x,y:this.bezier.P0.y},n={x:this.bezier.P1.x,y:this.bezier.P1.y},o=[...this.types].filter(a=>this.manager.isActive(a));if(this.extendedLink.isHighlighted()){if(this.lineStyle({width:i,color:"white"}),this.moveTo(this.bezier.P0.x,this.bezier.P0.y).quadraticCurveTo(this.bezier.P1.x,this.bezier.P1.y,this.bezier.P2.x,this.bezier.P2.y),this.tint=(this.extendedLink.coreElement.line?.worldVisible?this.extendedLink.coreElement.line.tint:this.extendedLink.siblingLink?.coreElement.line?.tint)??Ba(this.tint,this.extendedLink.coreElement.renderer.colors.lineHighlight.rgb),this.extendedLink.instances.settings.displayLinkTypeLabel){if(o.length===1)this.setTypePosition(o[0],this.bezier.P0,this.bezier.P1,this.bezier.P2);else if(o.length>0){let a=0;for(let l of o){let[c,h]=this.deCasteljau([s,n,this.bezier.P2],1/(o.length-a));s=h[0],n=h[1],this.setTypePosition(l,c[0],c[1],c[2]),++a}}}}else{if(t=this.color,o.length===1)this.lineStyle({width:i,color:"white"}),this.moveTo(this.bezier.P0.x,this.bezier.P0.y).quadraticCurveTo(this.bezier.P1.x,this.bezier.P1.y,this.bezier.P2.x,this.bezier.P2.y),this.setTypePosition(o[0],this.bezier.P0,this.bezier.P1,this.bezier.P2),this.tint=this.color;else if(o.length>0){this.tint="white";let a=0;this.moveTo(this.bezier.P0.x,this.bezier.P0.y);for(let l of o){let[c,h]=this.deCasteljau([s,n,this.bezier.P2],1/(o.length-a));s=h[0],n=h[1];let d=this.extendedLink.instances.settings.interactiveSettings[ne].showOnGraph?this.manager.getColor(l):this.color;this.lineStyle({width:i,color:d}),this.quadraticCurveTo(c[1].x,c[1].y,c[2].x,c[2].y),this.setTypePosition(l,c[0],c[1],c[2]),++a}this.extendedLink.instances.settings.interactiveSettings[ne].showOnGraph&&(t=this.manager.getColor(o[o.length-1]))}this.extendedLink.instances.settings.enableFeatures[this.extendedLink.instances.type].arrows&&this.extendedLink.instances.settings.arrowColorBool&&this.extendedLink.instances.settings.arrowColor!==""&&(t=Vr(this.extendedLink.instances.settings.arrowColor))}return this.updateArrow(t??Pi(this.tint),-Math.atan(-h1(1,s,n,this.bezier.P2).m)),!0}setTypePosition(e,t,i,s){this.typesPositions[e]={position:dn(.5,t,i,s),length:za(1,t,s)}}deCasteljau(e,t){if(t===0||t===1)return[e,e];let i=[],s=[];for(i.push(e[0]),s.push(e[e.length-1]);e.length>1;){let n=[];for(let o=0;o+1<e.length;++o){let a=e[o].x,l=e[o].y,c=e[o+1].x,h=e[o+1].y;n.push({x:a+(c-a)*t,y:l+(h-l)*t})}i.push(n[0]),s.push(n[n.length-1]),e=n}return[i,s.reverse()]}destroy(e){this.extendedLink.coreElement.arrow&&(this.extendedLink.coreElement.arrow.renderable=!0),!this.destroyed&&super.destroy(e)}clearGraphics(){this.destroyed||(this.arrow?.clear(),this.clear(),this.destroy({children:!0}),this.removeFromParent())}clear(){return this.destroyed?this:super.clear()}toggleType(e,t){this.updateValues()}};var qd=class{constructor(e){this.name=e.id,this.extendedElement=e,this.managerGraphicsMap=new Map}createGraphics(){let e=1,t=this.extendedElement.instances;for(let[i,s]of t.linksSet.managers){if(!t.settings.interactiveSettings[i].showOnGraph&&!t.settings.curvedLinks)continue;let n=this.extendedElement.getTypes(i);this.createManagerGraphics(s,n,e),e++}}createManagerGraphics(e,t,i){let s=this.managerGraphicsMap.get(e.name);if(s&&!s.destroyed)this.setManagerGraphics(e,s);else{let n=this.extendedElement.instances.settings.allowMultipleLinkTypes?new Va(e,t,this.name,this.extendedElement):new Ua(e,t,this.name,this.extendedElement);this.setManagerGraphics(e,n)}}setManagerGraphics(e,t){let i=this.managerGraphicsMap.get(e.name);i&&i!==t&&(i.parent&&i.removeFromParent(),i.destroyed||i.destroy({children:!0})),this.managerGraphicsMap.set(e.name,t),this.pixiElement=t}resetManagerGraphics(e){}clearGraphics(){this.pixiElement.clear()}destroyGraphics(){this.pixiElement.destroy({children:!0})}updateGraphics(){this.pixiElement?.updateValues()}connect(){let e=this.extendedElement.coreElement.renderer.hanger;if(!e.getChildByName(this.pixiElement.name)&&this.extendedElement.coreElement.px){this.pixiElement.extendedLink=this.extendedElement,this.extendedElement.coreElement.arrow&&(this.extendedElement.coreElement.arrow.renderable=!1);let t=Rc(this.extendedElement.coreElement.renderer.hanger,this.extendedElement.coreElement.px);Jt(e,this.pixiElement,t),this.extendedElement.instances.settings.fadeInElements&&!this.pixiElement.hasFaded&&Wr(this.pixiElement)}}disconnect(){for(let e of this.managerGraphicsMap.values())e.removeFromParent()}};var po=class extends lt{constructor(t,i,s,n){super();this.typesPositions={};this.eventMode="none",this.manager=t,this.types=i,this.name="line:"+s,this.extendedLink=n,this.hasFaded=!this.extendedLink.instances.settings.fadeInElements,this.updateValues()}updateValues(){if(this.activeType=this.extendedLink.getActiveType(this.manager.name),!this.activeType)return;let t=this.extendedLink.getStrokeColor();t!==void 0?this.color=t:this.extendedLink.instances.settings.interactiveSettings[this.manager.name].showOnGraph?this.color=this.manager.getColor(this.activeType):this.extendedLink.coreElement.line?this.color=Pi(this.extendedLink.coreElement.line.tint):this.color=this.extendedLink.coreElement.renderer.colors.line.rgb,this.extendedLink.isEnabled&&this.redraw()}initArrow(){this.destroyed||(this.arrow=new Wa(this.extendedLink),ze(this,this.arrow))}redraw(){!this.activeType&&this.arrow&&(this.arrow.clear(),this.arrow.destroy(),this.arrow=null),this.updateFrame()}updateFrame(){if(this.typesPositions={},this.destroyed)return;if(this.clear(),!this.activeType){this.arrow?.clear();return}let t=this.extendedLink.coreElement.renderer,i=this.extendedLink.coreElement,s=this.extendedLink.instances.settings.enableFeatures[this.extendedLink.instances.type].arrows&&this.extendedLink.instances.settings.invertArrows,n=s?i.source:i.target,o=s?i.target:i.source;if(!n.circle||!o.circle){this.destroy();return}let a=t.nodeScale,l={x:o.x,y:o.y},c={x:n.x,y:n.y},h={x:c.x-l.x,y:c.y-l.y},d=Math.sqrt(h.x*h.x+h.y*h.y);h.x/=d,h.y/=d;let p={x:l.x+a*o.getSize()*h.x,y:l.y+a*o.getSize()*h.y},g={x:c.x-a*n.getSize()*h.x,y:c.y-a*n.getSize()*h.y},v=[...this.types].filter(k=>this.manager.isActive(k));if(this.extendedLink.siblingLink){let k=[...this.extendedLink.siblingLink.types.get(ne)??[]].filter(B=>this.manager.isActive(B));for(let B of k)v.includes(B)||v.unshift(B)}let C,w=this.extendedLink.getThicknessScale()*t.fLineSizeMult/t.scale;if(this.extendedLink.isHighlighted()){if(this.lineStyle({width:w,color:"white"}),this.moveTo(p.x,p.y).lineTo(g.x,g.y),this.tint=(this.extendedLink.coreElement.line?.worldVisible?this.extendedLink.coreElement.line.tint:this.extendedLink.siblingLink?.coreElement.line?.tint)??Ba(this.tint,this.extendedLink.coreElement.renderer.colors.lineHighlight.rgb),this.extendedLink.instances.settings.displayLinkTypeLabel){if(v.length===1)this.setTypePosition(v[0],p,g);else if(v.length>0){let k=1/v.length,B=0,L=p;for(let T of v){let W=k*(1+B),j={x:(1-W)*p.x+W*g.x,y:(1-W)*p.y+W*g.y};this.setTypePosition(T,L,j),L=j,++B}}}}else if(C=this.color,this.extendedLink.firstSibling||!this.extendedLink.siblingLink?.getActiveType(ne)){if(v.length===1)this.lineStyle({width:w,color:"white"}),this.moveTo(p.x,p.y).lineTo(g.x,g.y),this.tint=this.color,this.setTypePosition(v[0],p,g);else if(v.length>0){this.tint="white";let k=1/v.length,B=0;this.moveTo(p.x,p.y);let L=p;for(let T of v){let W=k*(1+B),j=this.extendedLink.instances.settings.interactiveSettings[ne].showOnGraph?this.manager.getColor(T):this.color;this.lineStyle({width:w,color:j});let I={x:(1-W)*p.x+W*g.x,y:(1-W)*p.y+W*g.y};this.lineTo(I.x,I.y),this.setTypePosition(T,L,I),L=I,++B}this.extendedLink.instances.settings.interactiveSettings[ne].showOnGraph&&(C=this.manager.getColor(v[v.length-1]))}this.extendedLink.instances.settings.enableFeatures[this.extendedLink.instances.type].arrows&&this.extendedLink.instances.settings.arrowColorBool&&this.extendedLink.instances.settings.arrowColor!==""&&(C=Vr(this.extendedLink.instances.settings.arrowColor))}i.line&&this.hasFaded&&(this.alpha=i.line.alpha),i.arrow&&i.arrow.visible?(this.arrow||this.initArrow(),this.arrow&&this.arrow.update(C??this.tint,g,-Math.atan(-(g.y-p.y)/(g.x-p.x))+(l.x>g.x?Math.PI:0))):(this.arrow?.removeFromParent(),this.arrow?.clear(),this.arrow?.destroy(),this.arrow=null)}setTypePosition(t,i,s){this.typesPositions[t]={position:{x:(i.x+s.x)*.5,y:(i.y+s.y)*.5},length:za(1,i,s)}}destroy(t){this.extendedLink.coreElement.arrow&&(this.extendedLink.coreElement.arrow.renderable=!0),!this.destroyed&&super.destroy(t)}clearGraphics(){this.destroyed||(this.arrow?.clear(),this.clear(),this.destroy({children:!0}),this.removeFromParent())}clear(){return this.destroyed?this:super.clear()}toggleType(t,i){this.updateValues()}};var Yd=class{constructor(e){this.name=e.id,this.extendedElement=e,this.managerGraphicsMap=new Map}createGraphics(){let e=1,t=this.extendedElement.instances;for(let[i,s]of t.linksSet.managers){let n=this.extendedElement.getTypes(i);this.createManagerGraphics(s,n,e),e++}}createManagerGraphics(e,t,i){let s=this.managerGraphicsMap.get(e.name);if(s&&!s.destroyed)this.setManagerGraphics(e,s);else{let n=new po(e,t,this.name,this.extendedElement);this.setManagerGraphics(e,n)}}setManagerGraphics(e,t){let i=this.managerGraphicsMap.get(e.name);i&&i!==t&&(i.parent&&i.removeFromParent(),i.destroyed||i.destroy({children:!0})),this.managerGraphicsMap.set(e.name,t),this.pixiElement=t}resetManagerGraphics(e){}clearGraphics(){this.pixiElement.clear()}destroyGraphics(){this.pixiElement.destroy({children:!0})}updateGraphics(){this.pixiElement?.updateValues()}connect(){let e=this.extendedElement.coreElement.renderer.hanger;if(!e.getChildByName(this.pixiElement.name)&&this.extendedElement.coreElement.px){this.pixiElement.extendedLink=this.extendedElement,this.extendedElement.coreElement.arrow&&(this.extendedElement.coreElement.arrow.renderable=!1);let t=Rc(this.extendedElement.coreElement.renderer.hanger,this.extendedElement.coreElement.px);Jt(e,this.pixiElement,t),this.extendedElement.instances.settings.fadeInElements&&!this.pixiElement.hasFaded&&Wr(this.pixiElement)}}disconnect(){for(let e of this.managerGraphicsMap.values())e.removeFromParent()}animate(){}};var Oa=class extends tt{constructor(e,t){super(),this.extendedLink=t,this.hasFaded=!this.extendedLink.instances.settings.fadeInElements,this.zIndex=2,this.text=new di(e),this.text.eventMode="none",this.computeCSSStyle(),this.text.style=this.getTextStyle(),this.text.resolution=2,this.needsGraphicsBackground()?(this.background=new lt,this.background.eventMode="none",ze(this,this.background,this.text)):this.needsSpriteBackground()?(this.background=new Lt(Se.WHITE),this.background.eventMode="none",ze(this,this.background,this.text)):ze(this,this.text),this.applyCSSChanges()}needsGraphicsBackground(){return this.style.borderWidth>0||this.style.radius>0}needsSpriteBackground(){return!this.needsGraphicsBackground()&&this.style.backgroundColor.a>0}connect(){this.destroyed||(ze(this.extendedLink.coreElement.renderer.hanger,this),this.extendedLink.instances.settings.fadeInElements&&!this.hasFaded&&Wr(this))}updateFrame(){return this.destroyed?!1:!this.isRendered||!this.extendedLink.managers.get(ne)?.isActive(this.text.text)||!this.parent?(this.visible=!1,!1):(this.visible=!0,this.extendedLink.coreElement.source.circle&&(this.scale.x=this.scale.y=this.extendedLink.coreElement.renderer.nodeScale,this.pivot.set(.5*this.getWidth()/this.scale.x,.5*this.getHeight()/this.scale.y)),!0)}computeCSSStyle(){this.style=this.extendedLink.instances.cssBridge.getLinkLabelStyle({source:this.extendedLink.coreElement.source.id,target:this.extendedLink.coreElement.target.id})}getTextStyle(){let e=new s0({fontFamily:this.style.textStyle.fontFamily,fontStyle:this.style.textStyle.fontStyle,fontVariant:this.style.textStyle.fontVariant,fontWeight:this.style.textStyle.fontWeight,letterSpacing:this.style.textStyle.letterSpacing,fontSize:this.style.textStyle.fontSize+this.extendedLink.coreElement.source.getSize()/4,fill:this.getTextColor(),lineHeight:1});if(this.style.textStyle.stroke){$e.applyTextStroke(e,this.style.textStyle.stroke);let{height:t}=xt.measureText(this.text.text,e);this.text.anchor.set(0,this.style.textStyle.stroke.width/t)}else this.text.anchor.set(0,0);return this.style.textStyle.dropShadow&&$e.applyTextShadow(e,this.style.textStyle.dropShadow,Ma(e.fill)??this.extendedLink.coreElement.renderer.colors.text.rgb),e}getTextColor(){if(this.extendedLink.instances.settings.colorLinkTypeLabel){let e=this.extendedLink.managers.get(ne)?.getColor(this.text.text);if(e)return e}if(this.textColor===void 0){if(this.style.textStyle.fill)return this.style.textStyle.fill}else if(this.textColor!==null)return this.textColor;return this.extendedLink.coreElement.renderer.colors.text.rgb}setDisplayedText(e){this.destroyed||(this.text.text=e)}updateTextColor(){this.text.style&&(this.text.style.fill=this.getTextColor())}updateTextBackgroundColor(e){this.destroyed||(this.background instanceof Lt?this.background.tint=e:this.drawGraphics(e),this.updateTextColor())}applyCSSChanges(){this.text.style=this.getTextStyle(),this.text.position.set(this.style.padding.left,this.style.padding.top),this.text.anchor.set(0,0),this.needsGraphicsBackground()?this.drawGraphics($e.backgroundColor):this.needsSpriteBackground()?this.drawSprite():this.background&&(this.background.removeFromParent(),this.background.destroy(),this.background=void 0)}getWidth(){return xt.measureText(this.text.text,this.text.style).width+this.style.padding.left+this.style.padding.right}getHeight(){return xt.measureText(this.text.text,this.text.style).fontProperties.fontSize+(this.style.textStyle.stroke?.width??0)+this.style.padding.top+this.style.padding.bottom}drawGraphics(e){this.background instanceof Lt&&(this.background.removeFromParent(),this.background.destroy(),this.background=new lt,this.background.eventMode="none",Jt(this,this.background,0)),this.background||(this.background=new lt,this.background.eventMode="none",Jt(this,this.background,0)),this.background.clear();let t=this.style.borderColor.a>0?this.style.borderColor.rgb:this.extendedLink.managers.get(ne)?.getColor(this.text.text)??this.extendedLink.coreElement.renderer.colors.line.rgb;this.style.backgroundColor.a>0&&(e=$e.colorAttributes2hex(this.style.backgroundColor)),this.background.lineStyle(this.style.borderWidth,t,1,1).beginFill(e).drawRoundedRect(0,0,this.getWidth(),this.getHeight(),this.style.radius)}drawSprite(){this.background instanceof lt&&(this.background.removeFromParent(),this.background.destroy(),this.background=new Lt(Se.WHITE),this.background.eventMode="none",Jt(this,this.background,0)),this.background||(this.background=new Lt(Se.WHITE),this.background.eventMode="none",Jt(this,this.background,0)),this.background.tint=this.style.backgroundColor.rgb,this.background.alpha=this.style.backgroundColor.a,this.background.width=this.getWidth(),this.background.height=this.getHeight()}},d1=class extends Oa{},Xd=class extends d1{updateFrame(){if(!super.updateFrame()||!this.extendedLink.graphicsWrapper)return!1;let e=this.extendedLink.graphicsWrapper.pixiElement;if(this.text.text in e.typesPositions){let t=e.typesPositions[this.text.text].position;return this.position.set(t.x,t.y),!0}return!1}},Kd=class extends d1{updateFrame(){if(!super.updateFrame()||!this.extendedLink.graphicsWrapper)return!1;let e=this.extendedLink.graphicsWrapper.pixiElement.getMiddlePoint();return this.position.set(e.x,e.y),!0}},p1=class extends Oa{updateFrame(){return super.updateFrame()?(this.visible=this.extendedLink.coreElement.line?.visible??!1,this.visible&&(this.position=this.getPosition(),this.hasFaded&&(this.alpha=this.extendedLink.coreElement.line?.alpha??0)),!0):!1}},Zd=class extends p1{getPosition(){if(this.extendedLink.graphicsWrapper&&this.text.text in this.extendedLink.graphicsWrapper.pixiElement.typesPositions)return this.extendedLink.graphicsWrapper.pixiElement.typesPositions[this.text.text].position;if(this.extendedLink.siblingLink?.graphicsWrapper&&this.text.text in this.extendedLink.siblingLink.graphicsWrapper.pixiElement.typesPositions)return this.extendedLink.siblingLink.graphicsWrapper.pixiElement.typesPositions[this.text.text].position;{let e=this.extendedLink.coreElement.line?.getBounds();return!e||!this.parent?{x:0,y:0}:this.parent.toLocal({x:(e.left+e.right)*.5,y:(e.top+e.bottom)*.5})}}},Qd=class extends p1{getPosition(){let e=this.extendedLink.coreElement.line?.getBounds();return!e||!this.parent?{x:0,y:0}:this.parent.toLocal({x:(e.left+e.right)*.5,y:(e.top+e.bottom)*.5})}};var uC=100,hC=100,d8=class extends tt{},Gi=class{constructor(e){this.shape="circle";this.extendedElement=e,this.name=e.id,this.initShape()}initShape(){if(this.extendedElement.isCurrentNode&&this.extendedElement.instances.settings.currentNode.shape!=="circle"){this.shape=this.extendedElement.instances.settings.currentNode.shape;return}if(this.extendedElement.instances.settings.enableFeatures[this.extendedElement.instances.type].shapes){let e=Object.fromEntries(Object.entries(this.extendedElement.instances.settings.shapeQueries).sort((t,i)=>(t[1].index??0)-(i[1].index??0)));for(let t of Object.keys(e)){let i=new Hr(e[t]),s=qe(this.extendedElement.id);if(!s)return;if(i.doesMatch(s,this.extendedElement.instances.settings)){this.shape=t;return}}}}createGraphics(){this.pixiElement&&!this.pixiElement.destroyed||(this.pixiElement&&this.pixiElement.parent&&this.pixiElement.removeFromParent(),this.pixiElement=new d8,this.pixiElement.hasFaded=!this.extendedElement.instances.settings.fadeInElements,this.pixiElement.name=this.name,this.placeNode(),this.extendedElement.needOpacityLayer()&&this.initOpacityLayer())}placeNode(){this.pixiElement.x=uC,this.pixiElement.y=hC}initOpacityLayer(){this.opacityLayer=new We(this.shape),this.opacityLayer.drawFill(16711680),this.opacityLayer.scale.set(this.opacityLayer.getDrawingResolution()),this.opacityLayer.alpha=0,this.opacityLayer.name="opacity-layer",ze(this.pixiElement,this.opacityLayer)}initIcon(){if(this.extendedElement.icon&&!(!this.extendedElement.icon.svg&&!this.extendedElement.icon.emoji)&&!(this.iconSprite?.parent||this.emojiText?.parent))if(this.extendedElement.icon.svg){let e=this.extendedElement.icon.svg,t=this.extendedElement.icon.color||this.getFillColor().rgb,i=new XMLSerializer,s=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(i.serializeToString(e))}`;this.pixiElement.sortableChildren=!0;let n=a=>{this.iconSprite=new Lt(a),this.iconSprite.eventMode="none",this.iconSprite.name="icon",this.iconSprite.anchor.set(.5,.5),this.iconSprite.tint=t,this.extendedElement.instances.settings.backgroundOpacityWithIcon>0||this.extendedElement.instances.settings.borderWidthWithIcon>0?(this.iconSprite.height=160,this.iconSprite.width=160):(this.iconSprite.height=200,this.iconSprite.width=200),ze(this.pixiElement,this.iconSprite)},o=Se.from(s,{resourceOptions:{scale:40/e.width.baseVal.value}});n(o)}else this.extendedElement.icon.emoji&&(this.emojiText=new di(this.extendedElement.icon.emoji,{fontFamily:"Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji, Android Emoji, EmojiSymbols, Symbola, Twemoji Mozilla, Twemoji Mozilla Color Emoji, Twemoji Mozilla Color Emoji 13.1.0",fontSize:this.extendedElement.instances.settings.backgroundOpacityWithIcon>0?130:150,align:"center"}),this.emojiText.eventMode="none",this.emojiText.name="icon",this.emojiText.anchor.set(.5,.5),ze(this.pixiElement,this.emojiText))}updateIconBackgroundLayerColor(e){this.iconBackgroundLayer&&(this.iconBackgroundLayer.tint=e)}clearGraphics(){}destroyGraphics(){this.pixiElement.destroy({children:!0})}updateGraphics(){}updateOpacityLayerColor(e){this.opacityLayer&&(this.opacityLayer.clear(),this.opacityLayer.drawFill(e))}updateFillColor(e,t){return this.lastColor===e?!1:(this.lastColor=e,this.iconSprite&&(this.iconSprite.tint=(t?e??this.extendedElement.icon?.color:this.extendedElement.icon?.color??e)??this.getFillColor().rgb),!0)}connect(){this.extendedElement.coreElement.circle&&!this.extendedElement.coreElement.circle.getChildByName(this.name)&&(ze(this.extendedElement.coreElement.circle,this.pixiElement),this.extendedElement.instances.settings.fadeInElements&&!this.pixiElement.hasFaded&&Wr(this.pixiElement))}disconnect(){this.pixiElement.removeFromParent()}makeOpaque(){this.opacityLayer&&(this.opacityLayer.alpha=0)}makeFaded(){this.opacityLayer&&(this.opacityLayer.alpha=.8)}pin(){!this.extendedElement.instances.settings.showPinIcon||this.pixiElement.getChildByName("pin")||Ds.load(u.pinSVGDataUrl).then(t=>{let i=new Lt(t);i.eventMode="none",i.name="pin",i.anchor.set(1,0),i.height=80,i.width=80,i.position.set(100,-100),ze(this.pixiElement,i),this.pixiElement.parent||this.connect()})}unpin(){let e=this.pixiElement.getChildByName("pin");e&&(e.destroy(),this.pixiElement.removeChild(e))}getFillColor(){return this.extendedElement.coreElement.getFillColor()}};var s1=class extends Gi{createGraphics(){super.createGraphics(),this.texture&&this.initNodeImage(this.texture)}initNodeImage(e){if(this.extendedElement.needImage()&&(this.nodeImage&&(this.nodeImage.destroyed||!this.nodeImage.parent)&&(this.nodeImage.parent&&this.nodeImage.removeFromParent(),this.nodeImage.destroyed||this.nodeImage.destroy({children:!0})),e)){this.texture=e,this.nodeImage=new Ha(e,this.extendedElement.instances.settings.borderFactor,this.shape);let t=this.pixiElement.getChildByName("opacity-layer");if(t){let i=this.pixiElement.getChildIndex(t);Jt(this.pixiElement,this.nodeImage,i)}else ze(this.pixiElement,this.nodeImage);this.extendedElement.instances.settings.fadeInElements&&!this.nodeImage.hasFaded&&Wr(this.nodeImage)}}clearGraphics(){this.nodeImage?.destroy({children:!0}),super.clearGraphics()}};var o1=class extends Gi{createGraphics(){super.createGraphics(),this.extendedElement.needBackground()&&this.initBackground(),this.extendedElement.needArcs()&&this.initArcsWrapper(),this.texture&&this.initNodeImage(this.texture)}initArcsWrapper(){if(this.managerGraphicsMap&&this.managerGraphicsMap.size>0){for(let t of this.managerGraphicsMap.values()||[])t.parent&&t.removeFromParent(),t.destroyed||t.destroy({children:!0});this.managerGraphicsMap.clear()}else this.managerGraphicsMap=new Map;let e=1;for(let[t,i]of this.extendedElement.managers){if(!this.extendedElement.instances.settings.interactiveSettings[t].showOnGraph)continue;let s=this.extendedElement.getTypes(t);this.createManagerGraphics(i,s,e),e++}}initBackground(){this.background&&(this.background.parent&&this.background.removeFromParent(),this.background.destroyed||this.background.destroy({children:!0})),this.background=new We(this.shape),this.extendedElement.instances.settings.enableFeatures[this.extendedElement.instances.type].shapes&&this.updateBackgroundColor(this.getFillColor().rgb,!1),this.background.scale.set(this.background.getDrawingResolution()),Jt(this.pixiElement,this.background,0)}initNodeImage(e){if(this.extendedElement.needImage()&&(this.nodeImage&&(this.nodeImage.destroyed||!this.nodeImage.parent)&&(this.nodeImage.parent&&this.nodeImage.removeFromParent(),this.nodeImage.destroyed||this.nodeImage.destroy({children:!0})),e)){this.texture=e,this.nodeImage=new Ha(e,this.extendedElement.instances.settings.borderFactor,this.shape),this.nodeImage.hasFaded=!this.extendedElement.instances.settings.fadeInElements;let t=this.pixiElement.getChildByName("opacity-layer");if(t){let i=this.pixiElement.getChildIndex(t);Jt(this.pixiElement,this.nodeImage,i)}else ze(this.pixiElement,this.nodeImage);this.pixiElement.parent||this.connect(),this.extendedElement.instances.settings.fadeInElements&&!this.nodeImage.hasFaded&&Wr(this.nodeImage)}}createManagerGraphics(e,t,i){let s=new f1(this.extendedElement,t,e,i,this.shape);this.managerGraphicsMap?.set(e.name,s),ze(this.pixiElement,s)}resetManagerGraphics(e){if(!qe(this.extendedElement.id))return;let i=this.managerGraphicsMap?.get(e.name),s=this.extendedElement.getTypes(e.name);i?(i.clearGraphics(),i.setTypes(s),i.updateValues()):this.createManagerGraphics(e,s,this.managerGraphicsMap?.size??0)}updateFillColor(e,t){return super.updateFillColor(e,t)?(this.updateBackgroundColor(e??this.getFillColor().rgb,t),!0):!1}updateBackgroundColor(e,t){if(this.background){if(this.background.clear(),this.extendedElement.icon){if(this.extendedElement.instances.settings.borderWidthWithIcon>0){let i=t?e:this.extendedElement.icon.color??e;this.background.lineStyle({color:i,width:this.extendedElement.instances.settings.borderWidthWithIcon/this.background.getDrawingResolution()})}e=yh($e.backgroundColor,e,this.extendedElement.instances.settings.backgroundOpacityWithIcon)}this.background.drawFill(e)}}clearGraphics(){if(this.background?.destroy(),this.nodeImage?.destroy({children:!0}),this.managerGraphicsMap)for(let e of this.managerGraphicsMap.values())e.clearGraphics();super.clearGraphics()}};var l1=class extends Gi{};var u1=class extends Gi{createGraphics(){super.createGraphics(),this.extendedElement.needInnerCircle()&&this.initInnerCircle()}initInnerCircle(){typeof this.extendedElement.instances.settings.borderUnresolved=="number"&&(this.innerCircle&&(this.innerCircle.parent&&this.innerCircle.removeFromParent(),this.innerCircle.destroyed||this.innerCircle.destroy({children:!0})),this.innerCircle=new We(this.shape),this.innerCircle.alpha=5,this.innerCircle.scale.set(this.innerCircle.getDrawingResolution()*(1-this.extendedElement.instances.settings.borderUnresolved)),Jt(this.pixiElement,this.innerCircle,0))}updateOpacityLayerColor(e){super.updateOpacityLayerColor(e),this.innerCircle&&(this.innerCircle.clear(),this.innerCircle.drawFill(e))}clearGraphics(){this.innerCircle?.destroy(),super.clearGraphics()}};var p8=class{},er=class er extends lt{constructor(t,i,s,n,o){super();this.graphics=new Map;this.eventMode="none",this.name=s.name,this.extendedNode=t,this.types=i,this.manager=s,this.circleLayer=n,this.shape=o,this.updateValues()}clearGraphics(){for(let t of this.graphics.values())t.graphic.destroy();this.removeChildren(),this.graphics.clear()}updateValues(){let t=this.manager.getTypesWithoutNone(),i=t.length,s=Math.min(2*Math.PI/i,er.maxArcSize);this.radius=(.5+(er.thickness+er.inset)*this.circleLayer)*We.getSizeFactor(this.shape)*We.RADIUS*2,this.thickness=er.thickness*We.getSizeFactor(this.shape)*We.RADIUS*2;for(let n of this.types){if(n===this.manager.instances.settings.interactiveSettings[this.manager.name].noneType)continue;let o=t.findIndex(l=>l===n),a=this.graphics.get(n);if(!a){if(a=new p8,a.type=n,a.index=o,a.size=s,a.graphic=new lt,a.graphic.eventMode="none",a.graphic.name=this.getArcName(n),a.color=this.manager.getColor(n),a.weight=1,this.manager.instances.settings.spreadArcs&&this.manager.instances.settings.weightArcs){let l=qe(this.extendedNode.id);l&&(a.weight=i5(this.manager.name,l,n,this.extendedNode.instances.settings.ignoreInlineLinks))}this.graphics.set(n,a),ze(this,a.graphic)}}for(let n of this.types)this.redrawType(n)}redrawType(t,i){let s=this.graphics.get(t);if(s){if(i&&(s.color=i),this.manager.instances.settings.spreadArcs){let n=[...this.types].filter(c=>this.manager.isActive(c)),o=n.reduce((c,h)=>c+(this.graphics.get(h)?.weight||0),0),a=n.slice(0,n.indexOf(t));s.size=s.weight*2*Math.PI/o,s.index=a.reduce((c,h)=>c+(this.graphics.get(h)?.weight||0),0);let l=[...this.types].some(c=>c!==t&&this.manager.isActive(c));if(s.startAngle=2*Math.PI/o*s.index,s.endAngle=s.startAngle+s.size,l){let c=s.endAngle-s.startAngle;s.startAngle+=Math.min(c*.1,er.gap*.5),s.endAngle-=Math.min(c*.1,er.gap*.5)}}else{s.startAngle=s.size*s.index,s.endAngle=s.size*(s.index+1);let n=s.endAngle-s.startAngle;s.startAngle+=Math.min(n*.1,er.gap*.5),s.endAngle-=Math.min(n*.1,er.gap*.5)}s.graphic.clear(),s.graphic.lineStyle(this.thickness,s.color).arc(0,0,this.radius,s.startAngle,s.endAngle).endFill(),s.graphic.alpha=this.manager.isActive(t)?1:.1}}updateFrame(){}toggleType(t,i){if(this.manager.instances.settings.spreadArcs)this.updateValues();else{let s=this.graphics.get(t);s&&(s.graphic.alpha=i?1:.1)}}setTypes(t){this.types=t}getArcName(t){return"arc-"+t}};er.thickness=.09,er.inset=.03,er.gap=.2,er.maxArcSize=Math.PI/2;var f1=er;var Ha=class extends Lt{constructor(t=Se.EMPTY,i,s){super(t);this.hasFaded=!1;this.textureSize=Math.min(t.width,t.height),this.name="image",this.anchor.set(.5);let n=new We(s).drawMask();this.mask=n,ze(this,n);let o=2*100*We.getSizeFactor(s)/this.textureSize,a=o*(1-i);this.scale.set(a),n.scale.set(n.getDrawingResolution()/o)}changeImage(t){this.texture=t}};var Ts=(g=>(g.CIRCLE="circle",g.SQUARE="square",g.POLY_3="triangle",g.POLY_4="diamond",g.POLY_5="pentagon",g.POLY_6="hexagon",g.POLY_8="octagon",g.POLY_10="decagon",g.STARBURST_4="star4",g.STARBURST_5="star5",g.STARBURST_6="star6",g.STARBURST_8="star8",g.STARBURST_10="star10",g))(Ts||{});var Ge=class Ge extends lt{constructor(e){super(),this.shape=e,this.n=Ge.getN(e),this.type=Ge.getType(e)}drawMask(){return this.clear(),this.drawFill(16777215)}drawFill(e){return this.beginFill(e).drawUniqueShape().endFill()}getDrawingResolution(){switch(this.type){case"circle":case"unknown":return Ge.RESOLUTION_RADIUS;default:return 1}}drawUniqueShape(){switch(this.type){case"polygon":case"starburst":return this.drawPolygon(Ge.getVertices(this.shape));case"square":return this.drawRect(-Ge.RADIUS,-Ge.RADIUS,2*Ge.RADIUS,2*Ge.RADIUS);case"circle":case"unknown":return this.drawCircle(0,0,Ge.RESOLUTION_RADIUS)}}static randomShape(){let e=Object.keys(Ts).filter(i=>typeof i=="string"),t=e[Math.floor(Math.random()*e.length)];return Ts[t]}static nodeScaleFactor(e){let t=Ge.getType(e);if(t==="polygon"){let i=Ge.getPolygonRadius(Ge.getN(e),Ge.RADIUS),s=Ge.RADIUS;return(i+s)/2/i}if(t==="starburst"){let i=Ge.getStarburstRadius(Ge.getN(e),Ge.RADIUS),s=Ge.RADIUS;return(i+s)/2/i}return 1}static getSizeFactor(e){let t=Ge.getType(e);return t==="polygon"?this.getPolygonRadius(Ge.getN(e),Ge.RADIUS)/Ge.RADIUS:t==="starburst"?this.getStarburstRadius(Ge.getN(e),Ge.RADIUS)/Ge.RADIUS:1}static getN(e){switch(e){case"triangle":return 3;case"diamond":case"star4":return 4;case"pentagon":case"star5":return 5;case"hexagon":case"star6":return 6;case"octagon":case"star8":return 8;case"decagon":case"star10":return 10;case"circle":return 10;default:return 0}}static getType(e){switch(e){case"triangle":case"diamond":case"pentagon":case"hexagon":case"octagon":case"decagon":return"polygon";case"star4":case"star5":case"star6":case"star8":case"star10":return"starburst";case"square":return"square";case"circle":return"circle";default:return"unknown"}}static getVertices(e){switch(Ge.getType(e)){case"polygon":return Ge.getPolygonOutside(e,0,Ge.RADIUS);case"starburst":return Ge.getStarburst(e,Ge.RADIUS)}return[]}static getPolygonInside(e,t,i){let s=Ge.getN(e),n=[];for(let o=0;o<s;++o){let a=2*Math.PI*o/s;n.push(i*Math.sin(a+t)),n.push(i*-Math.cos(a+t))}return n}static getPolygonOutside(e,t,i){let s=Ge.getType(e),n=Ge.getN(e),o=i;return s==="polygon"&&(o=Ge.getPolygonRadius(n,i)),s==="starburst"&&(o=Ge.getStarburstRadius(n,i)),this.getPolygonInside(e,t,o)}static getStarburst(e,t){let i=Ge.getN(e),s=Ge.getPolygonInside(e,2*Math.PI/(2*i),t),n=Ge.getPolygonOutside(e,0,t),o=[];for(let a=0;a<i;++a)o.push(n[a*2]),o.push(n[a*2+1]),o.push(s[a*2]),o.push(s[a*2+1]);return o}static getPolygonRadius(e,t){return t/Math.cos(Math.PI/e)}static getStarburstRadius(e,t){return Ge.getPolygonRadius(e,t)+30}static getSVG(e){let t=Ge.getType(e),i=document.createElementNS("http://www.w3.org/2000/svg","svg");switch(i.setAttributeNS(null,"fill","currentColor"),i.setAttributeNS(null,"stroke-width","0"),i.appendChild(Ge.getInnerSVG(e)),t){case"circle":case"unknown":i.setAttributeNS(null,"viewBox","0 0 200 200");break;case"square":i.setAttributeNS(null,"viewBox","0 0 200 200");break;case"polygon":case"starburst":let s=Ge.getVertices(e);for(let a=0;a<s.length;++a)s[a]+=100;let n=Math.max.apply(null,s),o=Math.min.apply(null,s);i.setAttributeNS(null,"viewBox",`${o} ${o} ${n-o} ${n-o}`);default:break}return i}static getInnerSVG(e){switch(Ge.getType(e)){case"square":return Qe("rect",{width:200,height:200});case"polygon":case"starburst":let i=Ge.getVertices(e);for(let n=0;n<i.length;++n)i[n]+=100;let s=`M ${i[0]} ${i[1]} `;for(let n=2;n<i.length;n+=2)s+=`L ${i[n]} ${i[n+1]} `;return Qe("path",{d:s});case"circle":case"unknown":default:return Qe("circle",{cx:100,cy:100,r:100})}}};Ge.RADIUS=100,Ge.RESOLUTION_RADIUS=10;var We=Ge;var yt=class r{constructor(e){this.instances=e}setPinnedNodesFromState(){if(!this.instances.statePinnedNodes)return;let e=Object.fromEntries(Object.entries(this.instances.statePinnedNodes).filter(([i,s])=>!s.handled&&this.instances.nodesSet.extendedElementsMap.has(i))),t=Object.keys(e).length;for(let[i,s]of this.instances.nodesSet.extendedElementsMap)e.hasOwnProperty(i)&&(!s.isPinned||s.coreElement.x!==e[i].x||s.coreElement.y!==e[i].y)?this.pinNode(i,e[i].x,e[i].y,Math.min(.1*t,1)):!this.instances.statePinnedNodes.hasOwnProperty(i)&&s.isPinned&&this.unpinNode(i),this.instances.statePinnedNodes.hasOwnProperty(i)&&(this.instances.statePinnedNodes[i].handled=!0);Object.keys(e).length===0&&(this.instances.statePinnedNodes=null)}pinNode(e,t,i,s=.3){let n=this.instances.nodesSet.extendedElementsMap.get(e);if(!n)return;let o=n.coreElement;t!==void 0&&(o.x=t),i!==void 0&&(o.y=i),o.fx=o.x,o.fy=o.y,this.instances.nodesSet.instances.renderer.worker.postMessage({alpha:s,alphaTarget:0,run:!0,forceNode:{id:o.id,x:o.x,y:o.y}}),n.pin()}unpinNode(e){let t=this.instances.nodesSet.extendedElementsMap.get(e);if(!t)return;let i=t.coreElement;i.fx=null,i.fy=null,this.instances.nodesSet.instances.renderer.worker.postMessage({alpha:.3,alphaTarget:0,run:!0,forceNode:{id:i.id,x:null,y:null}}),r.lastDraggedPinnedNode===e&&(r.lastDraggedPinnedNode=null),t.unpin()}unpinAllNodes(){for(let[e,t]of this.instances.nodesSet.extendedElementsMap)t.isPinned&&this.unpinNode(e);this.instances.renderer.changed()}setLastDraggedPinnedNode(e){r.lastDraggedPinnedNode=e}pinLastDraggedPinnedNode(){r.lastDraggedPinnedNode&&(this.pinNode(r.lastDraggedPinnedNode),r.lastDraggedPinnedNode=null)}pinInShape(e,t){let i;switch(e.type){case"circle":i=new g1(this.instances,e);break;case"grid":i=new m1(this.instances,e);break;default:return}let n=new Hr(t).getMatches(this.instances.settings).map(a=>a.path),o=[...this.instances.nodesSet.extendedElementsMap.values()].filter(a=>n.includes(a.id));i.pinNodes(o)}};var h5={circle:m("features.shapesNames.circle"),grid:m("features.shapesNames.grid")},y1=class{constructor(e,t,i){this.type=t,this.data=i,this.pinner=new yt(e)}pinNodes(e){this.pinShape(e),this.pinner.instances.renderer.changed()}},g1=class extends y1{constructor(e,t){super(e,"circle",t)}pinShape(e){let t=e.length,i=Math.max(200,t*this.data.step/(2*Math.PI));for(let s=0;s<t;++s){let n=s*Math.PI*2/t,o=i*Math.cos(n)+this.data.center.x,a=i*Math.sin(n)+this.data.center.y;this.pinner.pinNode(e[s].id,o,a)}}},m1=class extends y1{constructor(e,t){super(e,"grid",t)}pinShape(e){let t=e.length,i=Math.ceil(Math.sqrt(t)),s=typeof this.data.columns=="string"?this.data.columns==="N"?t:i:this.data.columns??i,n=t/s;for(let o=0;o<t;++o){let a=Math.floor(o/s)-n/2,l=o%s-s/2,c=this.data.step*l+this.data.center.x,h=this.data.step*a+this.data.center.y;this.pinner.pinNode(e[o].id,c,h)}}};var d5=require("obsidian");var Oc,ja=class{constructor(e,t){this.extendedElementsMap=new Map;this.connectedIDs=new Set;this.typesMap={};G6(this,Oc);this.managers=new Map;this.instances=e,U6(this,Oc,t)}load(e){this.initializeManagers(O6(this,Oc)),this.initializeTypesMap();for(let i of this.managers.keys())this.addMissingInteractiveTypes(i);let t=this.addMissingElements(e);return t.size>0&&this.handleMissingElements(t),t}initializeManagers(e){for(let t of e)this.managers.has(t.name)||this.managers.set(t.name,t)}initializeTypesMap(){for(let e of this.managers.keys())this.typesMap.hasOwnProperty(e)||(this.typesMap[e]={})}addMissingInteractiveTypes(e){if(!this.managers.has(e))return;let t=new Set,i=!1;for(let s of this.coreCollection){let n=this.getID(s);if(this.extendedElementsMap.has(n))continue;let o=this.getAbstractFile(s);i=!0;let a=new Set;s.type==="tag"&&e===He?a.add(s.id.replace("#","")):o&&o instanceof d5.TFile?(a=this.getTypesFromFile(e,s,o),a.size===0&&a.add(this.instances.settings.interactiveSettings[e].noneType)):a.add(this.instances.settings.interactiveSettings[e].noneType),this.addTypes(e,a,n,t)}return this.managers.get(e)?.addTypes(t),i}addTypes(e,t,i,s){let n=!1;for(let o of t)this.isTypeValid(e,o)&&(this.managers.get(e)?.interactives.has(o)||s.add(o),this.typesMap[e].hasOwnProperty(o)||(this.typesMap[e][o]=new Set),this.typesMap[e][o].add(i),n=!0);if(!n){let o=this.instances.settings.interactiveSettings[e].noneType;this.typesMap[e].hasOwnProperty(o)||(this.typesMap[e][o]=new Set),this.typesMap[e][o].add(i),this.managers.get(e)?.interactives.has(o)||s.add(o)}}addMissingElements(e){let t=new Set;for(let i of this.coreCollection){let s=this.getID(i);if(e&&e!==s)continue;let n=this.extendedElementsMap.get(s);n?n.setCoreElement(i):(t.add(s),this.createExtendedElement(i))}return t}handleMissingElements(e){for(let t of e){let i=this.extendedElementsMap.get(t);if(!i)return;i.init(),this.handleMissingElement(i)}}unload(){this.clearExtendedElements(),this.clearMaps()}clearExtendedElements(){this.extendedElementsMap.forEach(e=>{e.unload()})}clearMaps(){this.extendedElementsMap.clear(),this.connectedIDs.clear(),this.managers.clear()}getTypes(e,t){let s=[...Object.getOwnPropertyNames(this.typesMap[e])].filter(n=>this.typesMap[e][n]?.has(this.getID(t)));return new Set(s)}getElementsByTypes(e,t){let i=new Set;for(let s of t)this.typesMap[e][s]?.forEach(n=>{i.add(n)});return i}isTypeValid(e,t){return!Xe.excludeType(this.instances.settings,e,t)}disableType(e,t){let i=[];for(let[s,n]of this.extendedElementsMap)n.getTypes(e).has(t)&&n.disableType(e,t),n.isAnyManagerDisabled()?n.isEnabled&&(n.disable(),i.push(s)):n.isEnabled||n.enable();return i}enableType(e,t){let i=[];for(let[s,n]of this.extendedElementsMap)n.getTypes(e).has(t)&&n.enableType(e,t),n.isAnyManagerDisabled()?n.isEnabled&&n.disable():n.isEnabled||(n.enable(),i.push(s));return i}disableElements(e){return new Set(e.filter(t=>this.disableElement(t)))}disableElement(e){let t=this.extendedElementsMap.get(e);return t?(this.connectedIDs.delete(e),t.isEnabled&&t.disable(),t.coreElement.clearGraphics(),this.coreCollection.remove(t.coreElement),!0):!1}enableElements(e){return new Set(e.filter(t=>this.enableElement(t)))}enableElement(e){let t=this.extendedElementsMap.get(e);return!t||(this.connectedIDs.add(e),!t.canBeAddedWithEngineOptions())?!1:(t.getCoreCollection().includes(t.coreElement)||t.getCoreCollection().push(t.coreElement),t.coreElement.initGraphics(),t.isEnabled||t.enable(),!0)}updateTypeColor(e,t,i){let s=this.getElementsByTypes(e,[t]);for(let n of s){let o=this.extendedElementsMap.get(n);if(!o)return;this.updateTypeColorForElement(o,e,t,i)}}updateTypeColorForElement(e,t,i,s){e.types.get(t)?.add(i),e.graphicsWrapper?.managerGraphicsMap?.get(t)?.updateValues()}delete(e){e.graphicsWrapper?.disconnect(),e.graphicsWrapper?.destroyGraphics(),this.extendedElementsMap.delete(e.id)}};Oc=new WeakMap;var p5=require("obsidian");var f8=class{constructor(e,t,i){this.nodes=[];this.path=e,this.folderStyle=t,this.color=i||Cd()}initGraphics(e){this.area=new lt,this.area.eventMode="none",this.initTextStyle(),this.text=new di(e?this.path:fi(this.path).basename,this.textStyle),this.text.eventMode="none",this.text.resolution=2,ze(this.area,this.text)}initTextStyle(){this.textStyle=new s0({fontSize:this.folderStyle.textStyle.textStyle.fontSize,fill:this.color,fontFamily:this.folderStyle.textStyle.textStyle.fontFamily,fontStyle:this.folderStyle.textStyle.textStyle.fontStyle,fontVariant:this.folderStyle.textStyle.textStyle.fontVariant,fontWeight:this.folderStyle.textStyle.textStyle.fontWeight,letterSpacing:this.folderStyle.textStyle.textStyle.letterSpacing,whiteSpace:"pre",wordWrap:!0,wordWrapWidth:300,align:this.folderStyle.textStyle.align}),this.folderStyle.textStyle.textStyle.dropShadow&&this.text&&$e.applyTextShadow(this.textStyle,this.folderStyle.textStyle.textStyle.dropShadow,Ma(this.textStyle.fill)??this.nodes.first()?.renderer.colors.text.rgb??0),this.folderStyle.textStyle.textStyle.stroke&&$e.applyTextStroke(this.textStyle,this.folderStyle.textStyle.textStyle.stroke),this.text&&(this.text.style=this.textStyle)}clearGraphics(){this.area.removeFromParent(),this.area.destroy(),this.text?.destroy()}updateGraphics(e){this.nodes.length>0?(this.draw(),this.placeText(e),this.text.visible=!0):(this.area.clear(),this.text.visible=!1)}addNode(e){this.nodes.includes(e)||this.nodes.push(e)}removeNode(e){this.nodes.remove(e)}draw(){this.computeBox(),this.drawBox()}drawBox(){this.area.clear(),this.area.lineStyle(this.folderStyle.borderWidth,this.color,this.folderStyle.strokeOpacity,1).beginFill(this.color,this.folderStyle.fillOpacity).drawRoundedRect(this.BBox.left,this.BBox.top,this.BBox.right-this.BBox.left,this.BBox.bottom-this.BBox.top,this.folderStyle.radius).endFill()}computeBox(){let e=this.nodes[0].x,t=this.nodes[0].x,i=this.nodes[0].y,s=this.nodes[0].y;for(let n of this.nodes)n.x<e?e=n.x:n.x>t&&(t=n.x),n.y<i?i=n.y:n.y>s&&(s=n.y);this.BBox={left:e-50-this.folderStyle.padding.left,right:t+50+this.folderStyle.padding.right,top:i-50-this.folderStyle.padding.top,bottom:s+50+this.folderStyle.padding.bottom}}placeText(e){let t=Math.min(e,5);switch(this.text.style.fontSize=this.folderStyle.textStyle.textStyle.fontSize*t,this.text.style.letterSpacing=this.folderStyle.textStyle.textStyle.letterSpacing*t,this.folderStyle.textStyle.align){case"center":this.textAnchor=new Ne(.5,0),this.text.x=this.BBox.left+.5*(this.BBox.right-this.BBox.left);break;case"left":this.textAnchor=new Ne(0,0),this.text.x=this.BBox.left+this.folderStyle.padding.left;break;case"right":this.textAnchor=new Ne(1,0),this.text.x=this.BBox.right-this.folderStyle.padding.right;break}this.text.anchor.set(this.textAnchor.x,this.textAnchor.y),this.text.y=this.BBox.top+this.folderStyle.padding.top,this.text.scale.set(1/t)}},_d=class{constructor(e,t){this.foldersMap=new Map;this.instances=e,this.initializeManager(t)}initializeManager(e){this.managers=new Map;for(let t of e)this.managers.set(t.name,t)}load(){this.initGraphics(),this.addMissingFolders()}initGraphics(){if(!(this.container&&!this.container.destroyed)){this.container=new tt,this.container.name="Blobs",Jt(this.instances.renderer.hanger,this.container,0);for(let e of this.foldersMap.values())e.area.destroyed&&this.loadFolder(pe,e.path)}}addMissingFolders(){for(let[e,t]of this.managers){let i=new Set;for(let s of this.instances.renderer.nodes){let n=qe(s.id);if(!n||this.foldersMap.has(n.path))continue;let o=ct(pe,n);this.addInteractivesToSet(e,o,i)}t.addTypes(i)}}addInteractivesToSet(e,t,i){let s=this.managers.get(e);if(!s)return;let n=!1;for(let o of t)s.interactives.has(o)?n=!0:this.isFolderValid(o)&&(i.add(o),n=!0);!n&&!s.interactives.has(this.instances.settings.interactiveSettings[pe].noneType)&&i.add(this.instances.settings.interactiveSettings[pe].noneType)}isFolderValid(e){return!Xe.excludeType(this.instances.settings,pe,e)}unload(){this.container.destroy({children:!0}),this.container.removeFromParent(),this.foldersMap.clear()}loadFolder(e,t){let i=this.managers.get(e),s=u.app.vault.getFolderByPath(t);if(s&&i){let n=this.foldersMap.get(t),o=!0;n?(n.area.destroyed||!n.area.parent)&&(o=!1,n.initGraphics(this.instances.settings.folderShowFullPath)):(o=!1,n=new f8(t,this.instances.stylesData?.folder??$e.DEFAULT_FOLDER_STYLE,i?i.getColor(t):void 0),n.initGraphics(this.instances.settings.folderShowFullPath));let a=this.getNodesInFolder(s);for(let l of a)n.addNode(l);n.nodes.length>0&&(this.foldersMap.set(t,n),n.updateGraphics(this.instances.renderer.scale),o||ze(this.container,n.area))}}getNodesInFolder(e){let t=[];for(let i of e.children)if(i instanceof p5.TFolder)t.push(...this.getNodesInFolder(i));else{let s=this.instances.renderer.nodes.find(n=>n.id===i.path);s&&t.push(s)}return t}removeFolder(e){this.foldersMap.get(e)?.clearGraphics(),this.foldersMap.delete(e)}updateGraphics(){for(let[e,t]of this.foldersMap)t.updateGraphics(this.instances.renderer.scale)}updateColor(e,t){let i=this.managers.get(e),s=this.foldersMap.get(t);!s||!i||(s.color=i.getColor(t),s.updateGraphics(this.instances.renderer.scale))}onCSSChange(){for(let e of this.foldersMap.values())e.folderStyle=this.instances.stylesData?.folder??$e.DEFAULT_FOLDER_STYLE,e.initTextStyle()}hasMoreThanOneNode(e,t){let i=this.foldersMap.get(t);if(i)return i.nodes.length>1;let s=u.app.vault.getFolderByPath(t);return s?this.getNodesInFolder(s).length>1:!1}enableAll(){let e=this.managers.get(pe);e&&(e.enable(e.getTypes()),this.instances.foldersUI?.enableAllUI(pe))}disableAll(){let e=this.managers.get(pe);e&&(e.disable(e.getTypes()),this.instances.foldersUI?.disableAllUI(pe))}enableAllWithAtLeastOneNode(){let e=this.managers.get(pe);if(!e)return;let t=e.getTypes(),i=[];for(let s of t)this.instances?.foldersSet?.hasMoreThanOneNode(pe,s)&&(i.push(s),this.instances.foldersUI?.enableUI(pe,s));e.enable(i)}disableAllWithAtLeastOneNode(){let e=this.managers.get(pe);if(!e)return;let t=e.getTypes(),i=[];for(let s of t)this.instances?.foldersSet?.hasMoreThanOneNode(pe,s)&&(i.push(s),this.instances.foldersUI?.disableUI(pe,s));e.disable(i)}};var Fd=class extends ja{constructor(e,t){super(e,t),this.coreCollection=this.instances.renderer.links}handleMissingElement(e){}createExtendedElement(e){let t=Wt(e),i=new Map;for(let[n,o]of this.managers)i.set(n,this.getTypes(n,e));let s=new Wd(this.instances,e,i,[...this.managers.values()]);return this.extendedElementsMap.set(t,s),this.connectedIDs.add(t),s}getID(e){return Wt(e)}getTypesFromFile(e,t,i){return Lo(this.instances.settings,i).get(t.target.id)??new Set}getAbstractFile(e){return qe(e.source.id)}onCSSChange(){this.extendedElementsMap.forEach(e=>{if(e.texts)for(let t of e.texts)t.computeCSSStyle(),t.applyCSSChanges()})}updateTypeColorForElement(e,t,i,s){if(super.updateTypeColorForElement(e,t,i,s),e.texts)for(let n of e.texts)n.updateTextColor()}delete(e){if(e.texts)for(let t of e.texts)t.destroy();super.delete(e)}};var Gc=require("obsidian");var Ad=class extends ja{constructor(t,i){super(t,i);this.selectedNodes={};this.cachedExternalLinks={};this.coreCollection=this.instances.renderer.nodes,this.selectionFilter=new un(3,this.instances.renderer.colors.fillHighlight.rgb,.1,1,!1),this.searchResultFilter=new un(2,this.instances.cssBridge.getSearchColor(),.1,1,!1),this.openFilter=new un(2,this.instances.renderer.colors.fillHighlight.rgb,.1,1,!1)}load(t){if(this.instances.settings.externalLinks!=="none")if(t)this.cacheExternalLinks(t).then(i=>{i&&this.instances.engine.render()});else{let i=new Gc.Component;i.load(),this.cacheAllExternalLinks(i).then(s=>{i.unload(),s.some(n=>n)&&this.instances.engine.render()})}return super.load(t)}handleMissingElement(t){this.instances.layersManager?.addNode(t.id),this.applyBackgroundColor(t),this.loadAsset(t),this.instances.settings.enableFeatures[this.instances.type].focus&&(this.instances.settings.highlightOpenNodes&&u.graphsManager.openNodes.contains(t.id)&&t.toggleOpenInTab(!0),this.instances.settings.highlightSearchResults&&u.graphsManager.getSearchResults().contains(t.id)&&t.toggleIsSearchResult(!0))}applyBackgroundColor(t){let i=$e.backgroundColor;t.graphicsWrapper&&t.graphicsWrapper.updateOpacityLayerColor(i)}loadAsset(t){!this.instances.settings.enableFeatures[this.instances.type].imagesFromProperty&&!this.instances.settings.enableFeatures[this.instances.type].imagesFromEmbeds&&!this.instances.settings.enableFeatures[this.instances.type].imagesForAttachments&&!this.instances.settings.enableFeatures[this.instances.type].icons||this.getImageURI(t).then(i=>{i&&(i.type==="image"?Ds.load(i.uri).then(s=>{this.initNodeImages(t,s)}):i.type==="icon"&&t.graphicsWrapper?.initIcon())})}async getImageURI(t){if(!t.graphicsWrapper)return null;let i=null;if(this.instances.settings.enableFeatures[this.instances.type].imagesFromProperty||this.instances.settings.enableFeatures[this.instances.type].imagesFromEmbeds||this.instances.settings.enableFeatures[this.instances.type].imagesForAttachments){if(this.instances.settings.enableFeatures[this.instances.type].imagesFromProperty&&(t.coreElement.type===""||t.coreElement.type==="focused")){for(let s of this.instances.settings.imageProperties)if(i=await $a.getImageUriFromProperty(s,t.id),i)break}if(!i&&this.instances.settings.enableFeatures[this.instances.type].imagesFromEmbeds&&(t.coreElement.type===""||t.coreElement.type==="focused")&&(i=await $a.getImageUriFromEmbeds(t.id)),this.instances.settings.enableFeatures[this.instances.type].imagesForAttachments&&t.coreElement.type==="attachment"&&(i=await $a.getImageUriForAttachment(t.id)),i)return{uri:i,type:"image"}}if(this.instances.settings.enableFeatures[this.instances.type].icons){let s=t.icon;if(s?.svg||s?.emoji)return{uri:"",type:"icon"}}return null}initNodeImages(t,i){if(t.graphicsWrapper&&!(t.coreElement.type==="tag"||t.coreElement.type==="unresolved"))try{switch(t.coreElement.type){case"attachment":t.graphicsWrapper.initNodeImage(i);break;case"":case"focused":"initNodeImage"in t.graphicsWrapper&&t.graphicsWrapper.initNodeImage(i);break}}catch{}}createExtendedElement(t){let i=t.id,s=new Map;for(let[o,a]of this.managers)s.set(o,this.getTypes(o,t));let n;return t.type==="tag"?n=new a1(this.instances,t,s,[...this.managers.values()]):t.type==="attachment"?n=new i1(this.instances,t,s,[...this.managers.values()]):t.type==="unresolved"?n=new c1(this.instances,t):n=new n1(this.instances,t,s,[...this.managers.values()]),this.extendedElementsMap.set(i,n),this.connectedIDs.add(i),n}getID(t){return t.id}getTypesFromFile(t,i,s){return ct(t,s,this.instances.settings)}getAbstractFile(t){return qe(t.id)}resetArcs(t){if(this.instances.settings.enableFeatures[this.instances.type].tags)for(let[i,s]of this.extendedElementsMap)try{let n=this.managers.get(t);if(!n)continue;s.graphicsWrapper.resetManagerGraphics(n)}catch{}}updateOpacityLayerColor(){let t=$e.backgroundColor;this.extendedElementsMap.forEach(i=>{i.graphicsWrapper?.updateOpacityLayerColor(t)})}onCSSChange(){let t=$e.backgroundColor;this.extendedElementsMap.forEach(i=>{i.graphicsWrapper?.updateOpacityLayerColor(t),i.graphicsWrapper?.updateIconBackgroundLayerColor(t),i.extendedText.updateTextStyle()})}isNodePinned(t){let i=this.instances.nodesSet.extendedElementsMap.get(t);if(i)return i.isPinned}pinSelectedNodes(){let t=new yt(this.instances);for(let i in this.selectedNodes)t.pinNode(i)}unpinSelectedNodes(){let t=new yt(this.instances);for(let i in this.selectedNodes)t.unpinNode(i)}selectNodesInRectangle(t){let i=this.instances.renderer.nodes.filter(s=>s.circle&&t.contains(s.circle.x,s.circle.y));this.selectNodes(i)}selectNodes(t){let i,s,n=Object.values(this.selectedNodes).map(o=>o.node);switch(this.instances.settings.selectionMode){case"add":s=[],i=t;break;case"replace":i=t.filter(o=>!(o.id in this.selectedNodes)),s=n.filter(o=>!t.contains(o));break;case"intersect":i=[],s=n.filter(o=>!t.contains(o));break;case"subtract":i=[],s=n.filter(o=>t.contains(o));break}for(let o of i)this.extendedElementsMap.get(o.id)?.select()&&(this.selectedNodes[o.id]={node:o,originX:o.circle?.x??0,originY:o.circle?.y??0});for(let o of s)this.extendedElementsMap.get(o.id)?.unselect(),delete this.selectedNodes[o.id];Object.keys(this.selectedNodes).length==0?this.instances.graphEventsDispatcher.inputsManager.stopListeningToUnselectNodes():this.instances.graphEventsDispatcher.inputsManager.startListeningToUnselectNodes(),u.graphsManager.updateStatusBarItem(this.instances.view.leaf)}unselectNodes(){for(let t in this.selectedNodes)this.extendedElementsMap.get(t)?.unselect();this.selectedNodes={},this.instances.renderer.changed(),u.graphsManager.updateStatusBarItem(this.instances.view.leaf),this.instances.graphEventsDispatcher.inputsManager.stopListeningToUnselectNodes()}invertSelection(){let t=this.instances.renderer.nodes.filter(i=>!(i.id in this.selectedNodes));this.unselectNodes(),t.length>0?this.selectNodes(t):this.instances.graphEventsDispatcher.inputsManager.stopListeningToUnselectNodes()}moveSelectedNodes(t){if(!this.instances.renderer.dragNode)return;if(!this.instances.graphEventsDispatcher.inputsManager.isDragging){this.instances.graphEventsDispatcher.inputsManager.isDragging=!0;for(let s in this.selectedNodes){let n=this.selectedNodes[s].node;n.circle&&(this.selectedNodes[s].originX=n.circle.x,this.selectedNodes[s].originY=n.circle.y)}}if(!(this.instances.renderer.dragNode.id in this.selectedNodes))return;let i={x:t.x-this.selectedNodes[this.instances.renderer.dragNode.id].originX,y:t.y-this.selectedNodes[this.instances.renderer.dragNode.id].originY};for(let s in this.selectedNodes){if(s===this.instances.renderer.dragNode.id)continue;let n=this.selectedNodes[s].node;n.circle&&(n.fx=this.selectedNodes[s].originX+i.x,n.fy=this.selectedNodes[s].originY+i.y,this.instances.renderer.worker.postMessage({alpha:.3,alphaTarget:.3,run:!0,forceNode:{id:n.id,x:n.fx,y:n.fy}}))}}stopMovingSelectedNodes(){for(let t in this.selectedNodes){let i=this.selectedNodes[t].node;(i.fx!==null||i.fy!==null)&&!this.isNodePinned(i.id)&&(this.instances.renderer.worker.postMessage({alphaTarget:0,forceNode:{id:i.id,x:null,y:null}}),i.fx=null,i.fy=null)}}async cacheAllExternalLinks(t){let i=[];for(let s in this.instances.renderer.nodeLookup)i.push(this.cacheExternalLinks(s,!1,t));return Promise.all(i)}async cacheExternalLinks(t,i=!1,s){if(!(this.instances.renderer.nodeLookup[t]?.type===""||this.instances.renderer.nodeLookup[t]?.type==="focused"&&t.endsWith(".md"))||!i&&t in this.cachedExternalLinks)return!1;let n=qe(t);if(!n)return this.cachedExternalLinks[t]=[],!1;let o=[],a=await u.app.vault.cachedRead(n),l=!1;s||(s=new Gc.Component,s.load(),l=!0);let c=createDiv();await Gc.MarkdownRenderer.render(u.app,a,c,t,s),l&&s.unload();for(let p of Array.from(c.getElementsByClassName("external-link"))){let g=p.getAttr("href");g&&o.push(new URL(g))}this.cachedExternalLinks[t]=o;let h=p=>{try{let g=new URL(p);if(g.protocol==="http:"||g.protocol==="https:")return o.push(g),!0}catch{return!1}return!1},d=u.app.metadataCache.getFileCache(n)?.frontmatter;for(let p in d)if(typeof d[p]=="string")h(d[p]);else if(Array.isArray(d[p]))for(let g of d[p])h(g);return o.length>0}convertExternalLink(t){switch(this.instances.settings.externalLinks){case"domain":return{domain:t.hostname};case"href":return{href:t.origin+t.pathname};case"domain_and_href":return{domain:t.hostname,href:t.origin+t.pathname};case"none":return{}}}getExternalLinks(t){return t in this.cachedExternalLinks?this.cachedExternalLinks[t].map(i=>this.convertExternalLink(i)).unique():[]}};var x8=St(kd()),$5=St(x5());var x1=St(Vc()),q5=St(Ld()),zr=class r{constructor(e){this.doneListeners=[];this.graphologyConnectedGraphs=new Map;this.buildGraphology=this.buildGraphology.bind(this),this.instances=e,u.app.metadataCache.isCacheClean()?this.buildGraphology():u.app.metadataCache.on("resolved",this.buildGraphology)}buildGraphology(){if(u.app.metadataCache.off("resolved",this.buildGraphology),this.graphology?this.graphology.clear():this.graphology=new x8.default,this.instances){for(let i of this.instances.renderer.nodes)this.graphology.addNode(i.id);let e=u.app.metadataCache.resolvedLinks,t=u.app.metadataCache.unresolvedLinks;for(let i of this.instances.renderer.links){let s=1;if(i.target.id.startsWith("#"))s=u.app.metadataCache.getCache(i.source.id)?.tags?.reduce((n,o)=>n+(o.tag===i.target.id?1:0),0)??1;else{let n=e[i.source.id];n&&(s=n[i.target.id]??s);let o=t[i.source.id];o&&(s+=o[i.target.id]??0)}this.graphology.addEdge(i.source.id,i.target.id,{count:s})}}else{let e=u.app.vault.getFiles();for(let s of e){this.graphology.addNode(s.path);let n=u.app.metadataCache.getFileCache(s)?.tags??[];for(let o of n)this.graphology.hasNode(o.tag)||this.graphology.addNode(o.tag),this.graphology.hasEdge(s.path,o.tag)?this.graphology.updateEdge(s.path,o.tag,a=>(a.count=(a.count??0)+1,a)):this.graphology.addEdge(s.path,o.tag,{count:1})}let t=u.app.metadataCache.resolvedLinks;for(let[s,n]of Object.entries(t))for(let[o,a]of Object.entries(n))this.graphology.addEdge(s,o,{count:a});let i=u.app.metadataCache.unresolvedLinks;for(let[s,n]of Object.entries(i))for(let[o,a]of Object.entries(n))this.graphology.hasNode(o)||this.graphology.addNode(o),this.graphology.addEdge(s,o,{count:a})}this.computeAttributes();for(let e of this.doneListeners)e(this.graphology)}computeAttributes(){if(!(!this.graphology||!this.instances)&&this.instances.type==="localgraph"&&this.instances.settings.depthColormap){let e=this.instances.view.file?.path;if(e&&this.graphology.hasNode(e)){let t=(0,q5.undirectedSingleSourceLength)(this.graphology,e);for(let i in t)this.graphology.setNodeAttribute(i,"depth",t[i])}}}registerListener(e,t=!1){this.doneListeners.push(e),t&&this.graphology&&e(this.graphology)}getGraphology(){return this.graphology}getConnectedGraphology(e,t){let i=this.graphology;if(!i)return;let s=t==="reversed"?(0,x1.reverse)(i):t==="undirected"?r.toUndirected(i):i,n=function(a,l,c){let h=a.neighbors(c);l.hasNode(c)||l.addNode(c);for(let d of h)l.hasNode(d)||l.addNode(d),l.addEdge(c,d)},o=new x8.default;return(0,$5.dfsFromNode)(s,e,function(a,l,c){o&&n(s,o,a)}.bind(this)),o}intersection(e,t){return e?.filter(i=>t.includes(i))??[]}static toUndirected(e){return(0,x1.toUndirected)(e,(t,i)=>({...t,weight:t.count+i.count}))}};var Y5=St(Vc()),rs={default:m("plugin.default"),"Adamic Adar":m("statsFunctions.AdamicAdar"),BoW:m("statsFunctions.BoW"),"Co-Citations":m("statsFunctions.coCitations"),"Clustering Coefficient":m("statsFunctions.clusteringCoefficient"),Jaccard:m("statsFunctions.Jaccard"),Ocurences:m("statsFunctions.Occurences"),"Otsuka-Ochiai":m("statsFunctions.OtsukaOchiai"),Overlap:m("statsFunctions.overlap")},Pn={default:!1,"Adamic Adar":!1,BoW:!0,"Co-Citations":!1,"Clustering Coefficient":!1,Jaccard:!1,Ocurences:!1,"Otsuka-Ochiai":!0,Overlap:!1},D1={default:!1,"Adamic Adar":!0,BoW:!1,"Co-Citations":!0,"Clustering Coefficient":!0,Jaccard:!0,Ocurences:!1,"Otsuka-Ochiai":!1,Overlap:!0},d0=class{constructor(e,t,i){this.stat=e,this.functionKey=t,this.graphologyGraph=i}async computeStats(e){this.graphologyGraph||(u.graphologyGraph||(u.graphologyGraph=new zr),this.graphologyGraph=u.graphologyGraph),this.graphologyGraph.registerListener(async t=>{await this.getStats(e),this.mapStat()},!0)}async getStats(e){if(!this.graphologyGraph?.graphology)return;this.linksStats={};let i=(e==="reversed"?(0,Y5.reverse)(this.graphologyGraph.graphology):e==="undirected"?zr.toUndirected(this.graphologyGraph.graphology):this.graphologyGraph.graphology).edgeEntries();for(let s of i)this.linksStats[s.source]||(this.linksStats[s.source]={}),this.linksStats[s.source][s.target]={measure:await this.getStat(s),value:0}}mapStat(){switch(this.stat){case"size":this.normalizeValues(.3,2),this.cleanNanAndInfiniteValues(1);break;case"color":this.normalizeValues(0,100),this.cleanNanAndInfiniteValues(50),Object.entries(this.linksStats).forEach(([e,t])=>{Object.entries(t).forEach(([i,{measure:s,value:n}])=>{this.linksStats[e][i].value=zs(n/100,u.settings.linksColorColormap,u.settings)})});break;default:break}}normalizeValues(e,t){let i=this.getMeasures(),s=Math.min(...i),n=Math.max(...i);Object.entries(this.linksStats).forEach(([o,a])=>{Object.entries(a).forEach(([l,{measure:c,value:h}])=>{this.linksStats[o][l].value=(t-e)*(c-s)/(n-s)+e})})}getMeasures(){let e=[];return Object.entries(this.linksStats).forEach(([t,i])=>{e=e.concat(Object.values(i).map(({measure:s,value:n})=>s))}),e.filter(t=>isFinite(t)&&!isNaN(t))}cleanNanAndInfiniteValues(e){Object.entries(this.linksStats).forEach(([t,i])=>{Object.entries(i).forEach(([s,{measure:n,value:o}])=>{(!isFinite(o)||isNaN(o))&&(this.linksStats[t][s].value=e)})})}getWarning(){return""}getLink(){return""}};var Ps=class{static getCalculator(e,t){let i=t?.graphologyGraph;switch(e==="size"?(t??u).settings.linksSizeFunction:(t??u).settings.linksColorFunction){case"Adamic Adar":return new b1(e,i);case"BoW":return new E1(e,i);case"Clustering Coefficient":return new S1(e,i);case"Co-Citations":return new C1(e,i);case"Jaccard":return new w1(e,i);case"Ocurences":return new T1(e,i);case"Otsuka-Ochiai":return new _1(e,i);case"Overlap":return new F1(e,i);default:return}}};var b1=class extends d0{constructor(t,i){super(t,"Adamic Adar",i);this.cache={}}async getStat(t){if(t.source in this.cache)return this.cache[t.source][t.target];let i=this.graphologyGraph,s=i?.graphology;if(!s)return NaN;let n=s.neighbors(t.source),o={};return s.forEachNode(a=>{let l=s.neighbors(a),c=i.intersection(n,l),h=1/0;c.length&&(h=c.map(p=>s.outNeighbors(p).length).reduce((p,g)=>p+1/Math.log(g),0)),o[a]=h}),this.cache[t.source]=o,o[t.target]}};var K5=St(D8()),E1=class extends d0{constructor(t,i){super(t,"BoW",i);this.cache={}}async getStat(t){if(t.source in this.cache)return this.cache[t.source][t.target];let i=y0();if(!i)return NaN;let n=this.graphologyGraph?.graphology;if(!n)return NaN;let{Docs:o}=i,a=i.getNoStopBoW(o[t.source]),l={};return n.forEachNode(c=>{o[c]||(l[c]=0);let d=i.getNoStopBoW(o[c]),p=K5.default.bow.cosine(a,d);l[c]=p}),this.cache[t.source]=l,l[t.target]}};var S1=class extends d0{constructor(t,i){super(t,"Clustering Coefficient",i);this.cache={}}async getStat(t){if(t.source in this.cache)return this.cache[t.source][t.target];let s=this.graphologyGraph?.graphology;if(!s)return NaN;let n={};return s.forEachNode(o=>{let a=[];s.neighbors(o).forEach(h=>{s.neighbors(h).forEach(d=>{s.hasEdge(o,h)&&s.hasEdge(o,d)&&s.hasEdge(h,d)&&a.push([h,d])})});let l=s.neighbors(o).length,c=l===0||l===1?0:2*a.length/(l*(l-1));n[o]=c}),this.cache[t.source]=n,n[t.target]}};var Wc=require("obsidian"),sg=St(ig()),C1=class extends d0{constructor(t,i){super(t,"Co-Citations",i);this.cache={}}async getStat(t){if(t.source in this.cache)return this.cache[t.source][t.target];let s=this.graphologyGraph?.graphology;if(!s)return NaN;let n=t.source,o=u.app.metadataCache,a={};return s.forEachInNeighbor(n,async l=>{let c=o.getFirstLinkpathDest(l,"");if(!c)return;let h=o.getFileCache(c);if(!h?.links)return;let d={},p=[...h.links];h.embeds&&p.push(...h.embeds);let g=p.filter(z=>{let U=o.getFirstLinkpathDest((0,Wc.getLinkpath)(z.link),c.path);return U?U.path===n:!1}),C=(await u.app.vault.cachedRead(c)).split(`
|
|
`),w=g.map(z=>{let U=C[z.position.end.line],q=sg.default.sentences(U,{preserve_whitespace:!0}),[re,$,Q]=this.findSentence(q,z);return{sentences:q,link:z,line:z.position.end.line,linkSentence:re,linkSentenceStart:$,linkSentenceEnd:Q}}),k=h.listItems?h.listItems.filter(z=>g.find(U=>U.position.start.line>=z.position.start.line&&U.position.end.line<=z.position.end.line)):[],B=g.map(z=>h.sections?.find(U=>U.position.start.line<=z.position.start.line&&U.position.end.line>=z.position.end.line)),L=7,T=0,W=[],j=h.headings;j&&g.forEach(z=>{h.headings&&h.headings.forEach((U,q)=>{if(L=Math.min(L,U.level),T=Math.max(T,U.level),U.position.start.line<=z.position.start.line){for(let re of Array(j.length-q-1).keys()){let $=j[re+q+1];if($.level>=U.level){if($.position.start.line<=z.position.start.line)return;W.push([U,$.position.start.line]);return}}W.push([U,1e11])}})}),L=h.headings&&h.headings.length>0?L:0,T=h.headings&&h.headings.length>0?T:0;let I=1/Math.pow(2,4+T-L),R=[...p];h.tags&&R.push(...h.tags),R.forEach(z=>{let U=null;if("link"in z){let De=o.getFirstLinkpathDest((0,Wc.getLinkpath)(z?.link??"")??"",c.path);if(!De)U=z.link;else if(U=De.path,U===n)return}else if("tag"in z)U=z.tag;else return;U in d||(d[U]=[0,[]]);let q=C[z.position.start.line],re=!1;if(w.forEach(De=>{if(z.position.start.line===De.line){let[_e,Mt,rt]=this.findSentence(De.sentences,z),et=De.link,gt=Math.min(z.position.start.col,et.position.start.col),Dt=Math.min(z.position.end.col,et.position.end.col),I0=Math.max(z.position.start.col,et.position.start.col),de=Math.max(z.position.end.col,et.position.end.col),oe=[q.slice(Math.min(Mt,De.linkSentenceStart),gt),q.slice(gt,Dt),q.slice(Dt,I0),q.slice(I0,de),q.slice(de,Math.max(rt,De.linkSentenceEnd))],ve=1/2,Yt=Math.abs(_e-De.linkSentence);Yt===0?ve=1:Yt===1?ve=.85:Yt===2?ve=.7:Yt===3&&(ve=.6),d[U][0]=Math.max(ve,d[U][0]),d[U][1].push({sentence:oe,measure:ve,source:l,line:De.line}),re=!0}}),re)return;let $=[q.slice(0,z.position.start.col),q.slice(z.position.start.col,z.position.end.col),q.slice(z.position.end.col,q.length)],Q=h?.listItems?.find(De=>z.position.start.line>=De.position.start.line&&z.position.end.line<=De.position.end.line),Te=!1;if(Q&&k.forEach(De=>{if(De.parent===Q.parent){this.addPreCocitation(d,U,.4,$,l,z.position.start.line),Te=!0;return}let _e=function(Mt,rt){let et=Mt,gt=1;for(;et&&et.parent>0;){if(et.parent===rt.position.start.line){let Dt=.3;return gt===1?Dt=.6:gt===2?Dt=.5:gt===3?Dt=.4:gt===4&&(Dt=.35),this.addPreCocitation(d,U,Dt,$,l,z.position.start.line),!0}gt+=1,et=h.listItems?.find(Dt=>et?.parent===Dt.position.start.line)}return!1};(_e(De,Q)||_e(Q,De))&&(Te=!0)}),Te)return;if(B.find(De=>De&&De.position.start.line<=z.position.start.line&&De.position.end.line>=z.position.end.line)){this.addPreCocitation(d,U,1/4,$,l,z.position.start.line);return}let xe=W.filter(([De,_e])=>De.position.start.line<=z.position.start.line&&_e>z.position.end.line);if(xe.length>0){let De=Math.max(...xe.map(([Mt,rt])=>Mt.level)),_e=1/Math.pow(2,3+T-De);this.addPreCocitation(d,U,_e,$,l,z.position.start.line);return}this.addPreCocitation(d,U,I,$,l,z.position.start.line)}),(0,Wc.getAllTags)(h)?.forEach(z=>{z in d||(d[z]=[I,[{measure:I,sentence:["","",""],source:l,line:0}]])});for(let z in d){let U=o.getFirstLinkpathDest(z,""),q=null,re=!0;U?q=U.path:z[0]==="#"?q=z:(q=z+".md",re=!1);let $=d[z];q in a?a[q]+=$[0]:a[q]=$[0]}}),a[n]=0,this.cache[t.source]=a,a[t.target]}findSentence(t,i){let s=0,n=0;for(let o of t){let a=s+o.length;if(i.position.end.col<=a)return[n,s,a];s=a,n+=1}return[-1,0,s]}addPreCocitation(t,i,s,n,o,a){t[i][0]=Math.max(t[i][0],s),t[i][1].push({sentence:n,measure:s,source:o,line:a})}};var w1=class extends d0{constructor(t,i){super(t,"Jaccard",i);this.cache={}}async getStat(t){if(t.source in this.cache)return this.cache[t.source][t.target];let i=this.graphologyGraph,s=i?.graphology;if(!s)return NaN;let n=s.neighbors(t.source),o={};return s.forEachNode(a=>{let l=s.neighbors(a),c=i.intersection(n,l),h=n.length+l.length-c.length,d=h!==0?c.length/h:1/0;o[a]=d}),this.cache[t.source]=o,o[t.target]}};var T1=class extends d0{constructor(e,t){super(e,"Ocurences",t)}async getStat(e){return this.functionKey==="default"?1:e.attributes.count}};var ng=St(D8()),_1=class extends d0{constructor(t,i){super(t,"Otsuka-Ochiai",i);this.cache={}}async getStat(t){if(t.source in this.cache)return this.cache[t.source][t.target];let i=y0();if(!i)return NaN;let n=this.graphologyGraph?.graphology;if(!n)return NaN;let{Docs:o}=i,a=i.getNoStopSet(o[t.source]),l={};return n.forEachNode(c=>{o[c]||(l[c]=0);let d=i.getNoStopSet(o[c]),p=ng.default.set.oo(a,d);l[c]=p}),this.cache[t.source]=l,l[t.target]}};var F1=class extends d0{constructor(t,i){super(t,"Overlap",i);this.cache={}}async getStat(t){if(t.source in this.cache)return this.cache[t.source][t.target];let i=this.graphologyGraph,s=i?.graphology;if(!s)return NaN;let n=s.neighbors(t.source),o={};return s.forEachNode(a=>{let l=s.neighbors(a),c=i.intersection(n,l),h=n.length!==0&&l.length!==0?c.length**2/Math.min(n.length,l.length):1/0;o[a]=h}),this.cache[t.source]=o,o[t.target]}};var is={default:m("plugin.default"),constant:m("statsFunctions.constant"),backlinksCount:m("statsFunctions.backlinksCount"),backUniquelinksCount:m("statsFunctions.backUniquelinksCount"),forwardlinksCount:m("statsFunctions.forwardlinksCount"),forwardUniquelinksCount:m("statsFunctions.forwardUniquelinksCount"),totallinksCount:m("statsFunctions.totallinksCount"),totalUniquelinksCount:m("statsFunctions.totalUniquelinksCount"),filenameLength:m("statsFunctions.filenameLength"),tagsCount:m("statsFunctions.tagsCount"),creationTime:m("statsFunctions.creationTime"),modifiedTime:m("statsFunctions.modifiedTime"),eccentricity:m("statsFunctions.eccentricity"),betweenness:m("statsFunctions.betweenness"),closeness:m("statsFunctions.closeness"),degree:m("statsFunctions.degree"),eigenvector:m("statsFunctions.eigenvector"),hub:m("statsFunctions.hub"),authority:m("statsFunctions.authority"),topological:m("statsFunctions.topological"),sentiment:m("statsFunctions.sentiment")},Hc={default:!1,constant:!1,backlinksCount:!1,backUniquelinksCount:!1,forwardlinksCount:!1,forwardUniquelinksCount:!1,totallinksCount:!1,totalUniquelinksCount:!1,filenameLength:!1,tagsCount:!1,creationTime:!1,modifiedTime:!1,eccentricity:!1,betweenness:!1,closeness:!1,degree:!1,eigenvector:!1,hub:!1,authority:!1,topological:!1,sentiment:!0},A1={default:!1,constant:!1,backlinksCount:!0,backUniquelinksCount:!0,forwardlinksCount:!0,forwardUniquelinksCount:!0,totallinksCount:!0,totalUniquelinksCount:!0,filenameLength:!1,tagsCount:!1,creationTime:!1,modifiedTime:!1,eccentricity:!0,betweenness:!0,closeness:!0,degree:!0,eigenvector:!0,hub:!0,authority:!0,topological:!0,sentiment:!1},Tt=class{constructor(e,t,i){this.stat=e,this.functionKey=t,this.graphologyGraph=i}async computeStats(e){this.graphologyGraph||(u.graphologyGraph||(u.graphologyGraph=new zr),this.graphologyGraph=u.graphologyGraph),this.graphologyGraph.registerListener(async t=>{await this.getStats(e),this.mapStat()},!0)}async getStats(e){if(!this.graphologyGraph)return;this.filesStats=new Map;let t=this.graphologyGraph.graphology?.nodes();if(t)for(let i of t)this.getStat(i,e).then(s=>this.filesStats.set(i,{measure:s,value:0}))}mapStat(){switch(this.stat){case"size":this.normalizeValues(u.settings.nodesSizeRange.min,u.settings.nodesSizeRange.max),this.cleanNanAndInfiniteValues(1);break;case"color":this.normalizeValues(0,100),this.cleanNanAndInfiniteValues(50),this.filesStats.forEach(({measure:e,value:t},i)=>{this.filesStats.set(i,{measure:e,value:zs(t/100,u.settings.nodesColorColormap,u.settings)})});break;default:break}}normalizeValues(e,t){let i=this.getMeasures(),s=Math.min(...i),n=Math.max(...i);this.filesStats.forEach(({measure:o,value:a},l)=>{this.filesStats.set(l,{measure:o,value:(t-e)*(o-s)/(n-s)+e})})}getMeasures(){return[...this.filesStats.values()].map(({measure:e,value:t})=>e).filter(e=>isFinite(e)&&!isNaN(e))}cleanNanAndInfiniteValues(e){this.filesStats.forEach(({measure:t,value:i},s)=>{(!isFinite(i)||isNaN(i))&&this.filesStats.set(s,{measure:t,value:e})})}static getWarning(){return""}static getLink(){return""}};var Qg=St(cg()),Jg=St(yg()),em=St(Fg()),tm=St($g()),B8=St(Zg());var rm=St(Vc()),mn=class extends Tt{constructor(e,t,i){super(e,t,i)}async computeStats(e){this.graphologyGraph||(u.graphologyGraph||(u.graphologyGraph=new zr),this.graphologyGraph=u.graphologyGraph);let t=this.graphologyGraph.graphology;if(t)return this.computeCentralityMap(e==="reversed"?(0,rm.reverse)(t):e==="undirected"?zr.toUndirected(t):t),super.computeStats(e)}async getStat(e){return this.cm[e]}},Zc=class extends mn{constructor(e,t){super(e,"degree",t)}computeCentralityMap(e){this.cm=(0,Qg.degreeCentrality)(e)}static getLink(){return"https://en.wikipedia.org/wiki/Degree_(graph_theory)"}},Qc=class extends mn{constructor(e,t){super(e,"eigenvector",t)}computeCentralityMap(e){this.cm=(0,Jg.default)(e)}static getLink(){return"https://en.wikipedia.org/wiki/Eigenvector_centrality"}},Jc=class extends mn{constructor(e,t){super(e,"closeness",t)}computeCentralityMap(e){this.cm=(0,em.default)(e)}static getLink(){return"https://en.wikipedia.org/wiki/Closeness_centrality"}},eu=class extends mn{constructor(e,t){super(e,"betweenness",t)}computeCentralityMap(e){this.cm=(0,tm.default)(e)}static getLink(){return"https://en.wikipedia.org/wiki/Betweenness_centrality"}},tu=class extends mn{constructor(e,t){super(e,"hub",t)}computeCentralityMap(e){let{hubs:t,authorities:i}=(0,B8.default)(e);this.cm=t}static getLink(){return"https://en.wikipedia.org/wiki/HITS_algorithm"}},ru=class extends mn{constructor(e,t){super(e,"authority",t)}computeCentralityMap(e){let{hubs:t,authorities:i}=(0,B8.default)(e);this.cm=i}static getLink(){return"https://en.wikipedia.org/wiki/HITS_algorithm"}};var cr=class{static getCalculator(e,t){let i=(t??u).settings,s=t?.graphologyGraph;switch(e==="size"?i.nodesSizeFunction:i.nodesColorFunction){case"constant":return new iu(e,s);case"backlinksCount":return i.graphStatsDirection==="reversed"?new yn(e,!0,s):new vn(e,!0,s);case"backUniquelinksCount":return i.graphStatsDirection==="reversed"?new yn(e,!1,s):new vn(e,!1,s);case"forwardlinksCount":return i.graphStatsDirection==="reversed"?new vn(e,!0,s):new yn(e,!0,s);case"forwardUniquelinksCount":return i.graphStatsDirection==="reversed"?new vn(e,!1,s):new yn(e,!1,s);case"totallinksCount":return new Xa(e,!0,s);case"totalUniquelinksCount":return new Xa(e,!1,s);case"filenameLength":return new ou(e,s);case"tagsCount":return new cu(e,s);case"creationTime":return new su(e,s);case"modifiedTime":return new au(e,s);case"eccentricity":return new nu(e,s);case"closeness":return new Jc(e,s);case"betweenness":return new eu(e,s);case"degree":return new Zc(e,s);case"eigenvector":return new Qc(e,s);case"hub":return new tu(e,s);case"authority":return new ru(e,s);case"topological":return new uu(e,s);case"sentiment":return new lu(e,s);default:return}}static getWarning(e){switch(e){case"constant":return iu.getWarning();case"backlinksCount":case"backUniquelinksCount":return yn.getWarning();case"forwardlinksCount":case"forwardUniquelinksCount":return vn.getWarning();case"totallinksCount":case"totalUniquelinksCount":return Xa.getWarning();case"filenameLength":return ou.getWarning();case"tagsCount":return cu.getWarning();case"creationTime":return su.getWarning();case"modifiedTime":return au.getWarning();case"eccentricity":return nu.getWarning();case"closeness":return Jc.getWarning();case"betweenness":return eu.getWarning();case"degree":return Zc.getWarning();case"eigenvector":return Qc.getWarning();case"hub":return tu.getWarning();case"authority":return ru.getWarning();case"topological":return uu.getWarning();case"sentiment":return lu.getWarning();default:return""}}};var yn=class extends Tt{constructor(e,t,i){super(e,"backlinksCount",i),this.countDuplicates=t}async getStat(e,t){if(this.graphologyGraph?.graphology)return this.countDuplicates?this.graphologyGraph.graphology.reduceInEdges(e,(o,a,l)=>o+(l.count??0),0):this.graphologyGraph.graphology.inDegree(e);let i=Object.values(u.app.metadataCache.resolvedLinks).reduce((o,a)=>(e in a&&o.push(a[e]),o),[]),s=Object.values(u.app.metadataCache.unresolvedLinks).reduce((o,a)=>(e in a&&o.push(a[e]),o),[]),n=i.concat(s);return n?this.countDuplicates?n.reduce((o,a)=>o+a,0):n.length:0}},vn=class extends Tt{constructor(e,t,i){super(e,t?"forwardlinksCount":"forwardUniquelinksCount",i),this.countDuplicates=t}async getStat(e){if(this.graphologyGraph?.graphology)return this.countDuplicates?this.graphologyGraph.graphology.reduceOutEdges(e,(i,s,n)=>i+(n.count??0),0):this.graphologyGraph.graphology.outDegree(e);let t=Object.fromEntries((e in u.app.metadataCache.resolvedLinks?Object.entries(u.app.metadataCache.resolvedLinks[e]):[]).concat(e in u.app.metadataCache.unresolvedLinks?Object.entries(u.app.metadataCache.unresolvedLinks[e]):[]));return t?this.countDuplicates?Object.values(t).reduce((i,s,n,o)=>i+s,0):Object.keys(t).length:0}},Xa=class extends Tt{constructor(e,t,i){super(e,t?"totallinksCount":"totalUniquelinksCount",i),this.countDuplicates=t}async getStat(e){if(this.graphologyGraph?.graphology)return this.countDuplicates?this.graphologyGraph.graphology.reduceEdges(e,(n,o,a)=>n+(a.count??0),0):this.graphologyGraph.graphology.degree(e);let t=Object.entries(u.app.metadataCache.resolvedLinks).reduce((n,o)=>(e===o[0]?n=n.concat(Object.values(o[1])):e in o[1]&&n.push(o[1][e]),n),[]),i=Object.entries(u.app.metadataCache.unresolvedLinks).reduce((n,o)=>(e===o[0]?n=n.concat(Object.values(o[1])):e in o[1]&&n.push(o[1][e]),n),[]),s=t.concat(i);return s?this.countDuplicates?s.reduce((n,o)=>n+o,0):s.length:0}};var iu=class extends Tt{constructor(e,t){super(e,"constant",t)}async getStat(e,t){return 1}};var su=class extends Tt{constructor(e,t){super(e,"creationTime",t)}async getStat(e,t){return qe(e)?.stat.ctime||NaN}static getWarning(){return m("statsFunctions.warningUnreliableOS")}};var nm=St(sm());var nu=class extends Tt{constructor(e,t){super(e,"eccentricity",t)}async getStat(e,t){if(!this.graphologyGraph)return NaN;let i=this.graphologyGraph.getConnectedGraphology(e,t);return i?(0,nm.default)(i,e):NaN}static getLink(){return"https://reference.wolfram.com/language/ref/EccentricityCentrality.html"}};var ou=class extends Tt{constructor(e,t){super(e,"filenameLength",t)}async getStat(e,t){return qe(e)?.basename.length||e.length}};var au=class extends Tt{constructor(e,t){super(e,"modifiedTime",t)}async getStat(e,t){return qe(e)?.stat.mtime||NaN}static getWarning(){return m("statsFunctions.warningUnreliableOS")}};var lu=class extends Tt{constructor(t,i){super(t,"sentiment",i);this.cache={}}async getStat(t,i){let s=y0();if(!s)return NaN;let n=s.Docs[t];return n?s.getAvgSentimentFromDoc(n):0}};var cu=class extends Tt{constructor(e,t){super(e,"tagsCount",t)}async getStat(e,t){let i=qe(e);return i?ct(He,i).size:0}};var ym=St(lm()),vm=St(kd()),xm=St(mm()),Dm=St(Vc()),uu=class extends Tt{constructor(t,i){super(t,"topological",i);this.topologicalWeights=new Map}async getStats(t){if(!this.graphologyGraph)return;let i=this.graphologyGraph.graphology;if(!i)return;let s=t==="reversed"?(0,Dm.reverse)(i):i,n=(0,ym.stronglyConnectedComponents)(s),o=new vm.DirectedGraph;for(let[l,c]of n.entries()){let h=[];for(let d of c){let g=s.outNeighbors(d).map(v=>n.findIndex(C=>C.includes(v))).filter(v=>v!==-1&&v!==l);h.push(...g)}o.addNode(l.toString());for(let d of new Set(h))o.addEdge(l.toString(),d.toString())}let a=(0,xm.topologicalSort)(o);for(let l of a){let c=n[parseInt(l)],h=0;for(let d of c){let p=s.inNeighbors(d);for(let g of p)g!==d&&(h+=this.topologicalWeights.get(g)||0)}h+=1;for(let d of c)this.topologicalWeights.set(d,h)}return super.getStats(t)}async getStat(t,i){return this.topologicalWeights.get(t)||1}static getLink(){return"https://en.wikipedia.org/wiki/Topological_sorting"}};var Hr=class{constructor(e){this.queryData=e}getMatches(e){return u.app.vault.getMarkdownFiles().filter(t=>this.doesMatch(t,e))}doesMatch(e,t){let i=this.queryData.rules.filter(s=>new Fs(s).isValid());if(i.length===0)return!1;switch(this.queryData.combinationLogic){case"AND":return i.every(s=>new Fs(s).doesMatch(e,t)??!1);case"OR":return i.some(s=>new Fs(s).doesMatch(e,t)??!1);default:break}return!1}toString(){let e="";for(let t=0;t<this.queryData.rules.length;++t){let i=new Fs(this.queryData.rules[t]).toString();i&&(e+=i,t!==this.queryData.rules.length-1&&(e+=" "+m(`query.${this.queryData.combinationLogic}`)+" "))}return e}};var G8={all:m("query.source.all"),tag:m("query.source.tag"),link:m("query.source.link"),property:m("query.source.property"),file:m("query.source.file"),folder:m("query.source.folder"),folderRec:m("query.source.folderRec"),path:m("query.source.path")},U8={contains:m("query.logicKey.contains"),containsNot:m("query.logicKey.containsNot"),is:m("query.logicKey.is"),isNot:m("query.logicKey.isNot"),containsRegex:m("query.logicKey.containsRegex"),containsRegexNot:m("query.logicKey.containsRegexNot"),matchesRegex:m("query.logicKey.matchesRegex"),matchesRegexNot:m("query.logicKey.matchesRegexNot"),isEmpty:m("query.logicKey.isEmpty"),isEmptyNot:m("query.logicKey.isEmptyNot")},Fs=class{constructor(e){this.source=e.source??"",this.property=e.property??"",this.value=e.value??"",this.logic=e.logic??""}getRecord(){return{source:this.source,property:this.property,value:this.value,logic:this.logic}}getMatches(){return u.app.vault.getMarkdownFiles().filter(e=>this.doesMatch(e))}doesMatch(e,t){if(!this.isValid())return null;let i=e.path;switch(this.source){case"all":return!0;case"tag":let s=ct(He,e);return this.checkLogic([...s]);case"link":let n=ct(ne,e,t);return this.checkLogic([...n]);case"property":if(!this.property)break;let o=ct(this.property,e,t);return this.checkLogic([...o]);case"file":return this.checkLogic(e.basename);case"folder":return this.checkLogic(i);case"folderRec":let a=[],l=e.parent;for(;l;)a.push(l.path),l=l.parent;return this.checkLogic(a);case"path":return this.checkLogic(e.path);default:break}return!1}checkLogic(e){let t=Array.isArray(e),i=typeof e=="string",s=this.value;if(s.startsWith("\\b")||(s="\\b"+s),s.endsWith("\\b")||(s=s+"\\b"),t){let n=e;switch(this.logic){case"is":return n.length===1&&e[0]===this.value;case"isNot":return n.length===1&&e[0]!==this.value||n.length!==1;case"contains":return n.contains(this.value);case"containsNot":return!n.contains(this.value);case"matchesRegex":return n.length===1&&new RegExp(s).test(n[0]);case"matchesRegexNot":return n.length===1&&!new RegExp(s).test(n[0])||n.length!==1;case"containsRegex":return n.some(o=>new RegExp(this.value).test(o));case"containsRegexNot":return n.every(o=>!new RegExp(this.value).test(o));case"isEmpty":return n.length===0;case"isEmptyNot":return n.length>0;default:break}}else if(i){let n=e;switch(this.logic){case"is":return n===this.value;case"isNot":return n!==this.value;case"contains":return n.contains(this.value);case"containsNot":return!n.contains(this.value);case"matchesRegex":return new RegExp(s).test(n);case"matchesRegexNot":return!new RegExp(s).test(n);case"containsRegex":return new RegExp(this.value).test(n);case"containsRegexNot":return!new RegExp(this.value).test(n);case"isEmpty":return n==="";case"isEmptyNot":return n!=="";default:break}}return!1}isValid(){return this.source===""?!1:this.source==="all"?!0:!(this.source==="property"&&this.property===""||this.logic===""||this.value===""&&this.logic!=="isEmpty"&&this.logic!=="isEmptyNot")}toString(){if(!this.isValid())return null;let e=G8[this.source];return this.source==="all"||(this.source==="property"&&(e+=":"+this.property),e+=" "+U8[this.logic],e+=" "+this.value),e}};var V8={id:Jr,name:m("states.defaultState"),engineOptions:new ti,toggleTypes:{},logicTypes:{},enableLayers:!1,currentLayerLevel:0},Dr=0,gi={enableFeatures:{graph:{"auto-enabled":!1,tags:!1,properties:!1,"property-key":!1,links:!1,linksSameColorAsNode:!1,folders:!1,imagesFromProperty:!1,imagesFromEmbeds:!1,imagesForAttachments:!1,focus:!1,shapes:!1,"elements-stats":!1,names:!1,icons:!1,arrows:!1,layers:!1},localgraph:{"auto-enabled":!1,tags:!1,properties:!1,"property-key":!1,links:!1,linksSameColorAsNode:!1,folders:!1,imagesFromProperty:!1,imagesFromEmbeds:!1,imagesForAttachments:!1,focus:!1,shapes:!1,"elements-stats":!1,names:!1,icons:!1,arrows:!1,layers:!1}},interactiveSettings:{},additionalProperties:{},backupGraphOptions:new ti,openInNewTab:!1,canonicalizePropertiesWithDataview:!0,states:[V8],startingStateID:Jr,syncDefaultState:!1,saveConfigsWithState:!1,customColorMaps:{},imageProperties:["image"],borderFactor:.06,allowExternalImages:!1,allowExternalLocalImages:!1,nodesSizeProperties:[""],nodesSizeFunction:"default",nodesSizeRange:{min:.5,max:1.5},nodesColorColormap:"YlOrRd",nodesColorFunction:"default",graphStatsDirection:"normal",linksSizeFunction:"default",linksColorColormap:"YlOrRd",linksColorFunction:"default",recomputeStatsOnGraphChange:!1,zoomFactor:2,focusScaleFactor:1.8,highlightOpenNodes:!1,highlightSearchResults:!1,maxNodes:20,delay:500,revertAction:!1,enableCSS:!1,cssSnippetFilename:"",shapeQueries:{circle:{combinationLogic:"AND",index:Dr++,rules:[]},square:{combinationLogic:"AND",index:Dr++,rules:[]},triangle:{combinationLogic:"AND",index:Dr++,rules:[]},diamond:{combinationLogic:"AND",index:Dr++,rules:[]},pentagon:{combinationLogic:"AND",index:Dr++,rules:[]},hexagon:{combinationLogic:"AND",index:Dr++,rules:[]},octagon:{combinationLogic:"AND",index:Dr++,rules:[]},decagon:{combinationLogic:"AND",index:Dr++,rules:[]},star4:{combinationLogic:"AND",index:Dr++,rules:[]},star5:{combinationLogic:"AND",index:Dr++,rules:[]},star6:{combinationLogic:"AND",index:Dr++,rules:[]},star8:{combinationLogic:"AND",index:Dr++,rules:[]},star10:{combinationLogic:"AND",index:Dr++,rules:[]}},colorBasedOnDepth:!1,depthColormap:"rainbow",currentNode:{useColor:!1,color:"#000000",size:100,shape:"circle"},fadeOnDisable:!1,borderUnresolved:"",spreadArcs:!1,weightArcs:!1,animateDotsOnLinks:!1,animationSpeedForDots:1,interactivesBrightness:{light:1,dark:1},fadeInElements:!1,externalLinks:"none",externalLinksProperties:["url"],externalLinkOpenMode:"note",showPinIcon:!0,allowMultipleLinkTypes:!1,disableSource:!1,disableTarget:!1,excludedSourcesFolder:[],excludedTargetsFolder:[],curvedLinks:!1,curvedFactor:1,outlineLinks:!1,displayLinkTypeLabel:!1,colorLinkTypeLabel:!1,noLineHighlight:!1,folderShowFullPath:!0,invertArrows:!1,flatArrows:!1,opaqueArrowsButKeepFading:!1,alwaysOpaqueArrows:!1,arrowScale:1,arrowFixedSize:!1,arrowColorBool:!1,arrowColor:"",numberOfCharacters:null,ellipsis:"\u2026",showOnlyFileName:!1,noExtension:!1,usePropertiesForName:[],addBackgroundToName:!1,nameVerticalOffset:0,dynamicVerticalOffset:!1,showNamesWhenNeighborHighlighted:!1,iconProperties:[""],usePluginForIcon:!0,usePluginForIconColor:!0,useParentIcon:!1,backgroundOpacityWithIcon:0,useIconColorForBackgroud:!0,borderWidthWithIcon:0,layerProperties:["layer"],numberOfActiveLayers:4,layersOrder:"ASC",displayLabelsInUI:!0,nodesWithoutLayerOpacity:0,useLayerCustomOpacity:!0,layersCustomOpacity:{},layersLevels:{},defaultLevelForLayers:0,horizontalLegend:!1,useRadialMenu:!1,radialMenuModifier:"Shift",pinNodeModifier:"Alt",useLeftClickToSelect:!0,selectNodeModifier:"Shift",filterAbstractFiles:[],ignoreInlineLinks:!1,collapseState:!0,collapseLegend:!0,resetAfterChanges:!1,collapsedSettings:{},selectionMode:"replace",exportSVGOptions:{asImage:!0,onlyVisibleArea:!1,showNodeNames:!0,useCurvedLinks:!1,useModifiedArrows:!0,useNodesShapes:!1,showArcs:!1,showFolders:!0,useModifiedNames:!0,showIcons:!1},multipleNodesData:{}},Xe=class r{static excludeType(e,t,i){if(ei.hasOwnProperty(t)&&ei[t].includes(i))return!0;if(!e.interactiveSettings.hasOwnProperty(t))return!1;if(!e.interactiveSettings[t].unselected||e.interactiveSettings[t].unselected.includes(i))return!0;if("excludeRegex"in e.interactiveSettings[t]){for(let s of e.interactiveSettings[t].excludeRegex.regex.split(`
|
|
`))if(s!==""&&new RegExp(s,e.interactiveSettings[t].excludeRegex.flags).test(i))return!0}return!1}static needToChangeLinkColor(e){return!!(e.settings.enableFeatures[e.type].links&&e.settings.interactiveSettings[ne].showOnGraph||e.settings.enableFeatures[e.type]["elements-stats"]&&e.settings.linksColorFunction!=="default"||e.settings.enableFeatures[e.type].linksSameColorAsNode)}static needToChangeArrowColor(e,t){return!!(e.settings.enableFeatures[e.type].arrows&&e.settings.arrowColorBool&&e.settings.arrowColor!=""||e.settings.enableFeatures[e.type].links&&e.settings.interactiveSettings[ne].showOnGraph&&!t.hasType(ne,e.settings.interactiveSettings[ne].noneType)||e.settings.enableFeatures[e.type]["elements-stats"]&&e.settings.linksColorFunction!=="default"||e.settings.enableFeatures[e.type].linksSameColorAsNode)}static needToChangeArrowScale(e){return!!(e.settings.enableFeatures[e.type].arrows&&(e.settings.arrowScale!==1||e.settings.arrowFixedSize))}static needToChangeArrowAlpha(e){return!!(e.settings.enableFeatures[e.type].arrows&&e.settings.alwaysOpaqueArrows)}static needToChangeArrowRotation(e){return!!(e.settings.enableFeatures[e.type].arrows&&e.settings.invertArrows)}static needToChangeArrowShape(e){return!!(e.settings.enableFeatures[e.type].arrows&&e.settings.flatArrows)}static needToChangeArrow(e){return e.settings.enableFeatures[e.type].arrows&&(e.settings.invertArrows||e.settings.arrowScale!==1||e.settings.arrowFixedSize||e.settings.arrowColorBool&&e.settings.arrowColor!=""||e.settings.alwaysOpaqueArrows||e.settings.flatArrows)||r.needToChangeLinkColor(e)}static needDynamicGraphology(e,t){if(t){if(!e.settings.enableFeatures[e.type]["elements-stats"]||!e.settings.recomputeStatsOnGraphChange)return!1;switch(t.element){case"node":return A1[t.stat==="size"?e.settings.nodesSizeFunction:e.settings.nodesColorFunction];case"link":return D1[t.stat==="size"?e.settings.linksSizeFunction:e.settings.linksColorFunction]}}else return e.type==="localgraph"&&e.settings.colorBasedOnDepth||e.settings.enableFeatures[e.type]["elements-stats"]&&e.settings.recomputeStatsOnGraphChange&&(D1[e.settings.linksSizeFunction]||D1[e.settings.linksColorFunction]||A1[e.settings.nodesSizeFunction]||A1[e.settings.nodesColorFunction])}static needReload(e,t,i){let s=e.enableFeatures[i],n=t.enableFeatures[i],o=p=>JSON.stringify(e[p])===JSON.stringify(t[p]);if(s.tags!==n.tags||n.tags&&!Ka(e.interactiveSettings[He],t.interactiveSettings[He])||s.links!==n.links||n.links&&!Ka(e.interactiveSettings[ne],t.interactiveSettings[ne])||s.folders!==n.folders||n.folders&&!Ka(e.interactiveSettings[pe],t.interactiveSettings[pe])||s.properties!==n.properties)return!0;let a=Object.keys(Object.fromEntries(Object.entries(e.additionalProperties).filter(p=>p[1][i]))),l=Object.keys(Object.fromEntries(Object.entries(t.additionalProperties).filter(p=>p[1][i])));if(!Ka(a,l))return!0;let c=a.map(p=>e.interactiveSettings[p]),h=l.map(p=>t.interactiveSettings[p]);if(!Ka(c,h)||n.links&&["excludedSourcesFolder","excludedTargetsFolder","curvedLinks","curvedFactor","disableSource","disableTarget","outlineLinks","displayLinkTypeLabel","colorLinkTypeLabel"].some(p=>!o(p)))return!0;let d=["imagesForAttachments","imagesFromEmbeds","imagesFromProperty"];return!!(d.some(p=>s[p]!==n[p])||n.imagesFromProperty&&!o("imageProperties")||d.some(p=>n[p])&&["borderFactor","allowExternalImages","allowExternalLocalImages"].some(p=>!o(p))||n["elements-stats"]!==s["elements-stats"]||n["elements-stats"]&&(["nodesSizeProperties","nodesSizeFunction","linksSizeFunction","nodesSizeRange"].some(p=>!o(p))||e.nodesColorFunction==="default"&&t.nodesColorFunction!=="default"||e.linksColorFunction==="default"&&t.linksColorFunction!=="default"||!o("graphStatsDirection")&&["nodesSizeFunction","nodesColorFunction","linksSizeFunction","linksColorFunction","recomputeStatsOnGraphChange"].some(p=>t[p]!=="default"))||n.shapes!==s.shapes||n.shapes&&["shapeQueries"].some(p=>!o(p))||n.arrows!==s.arrows||n.arrows&&["invertArrows","flatArrows","opaqueArrowsButKeepFading","alwaysOpaqueArrows","arrowScale","arrowColorBool","arrowColor","arrowFixedSize"].some(p=>!o(p))||n.names!==s.names||n.names&&(["numberOfCharacters","ellipsis","showOnlyFileName","noExtension","usePropertiesForName","addBackgroundToName","dynamicVerticalOffset","showNamesWhenNeighborHighlighted"].some(p=>!o(p))||!e.dynamicVerticalOffset&&!t.dynamicVerticalOffset&&!o("nameVerticalOffset"))||n.icons!==s.icons||n.icons&&(["iconProperties","usePluginForIcon","backgroundOpacityWithIcon","useIconColorForBackgroud","borderWidthWithIcon"].some(p=>!o(p))||e.usePluginForIcon&&t.usePluginForIcon&&["usePluginForIconColor","useParentIcon"].some(p=>!o(p)))||n.layers!==s.layers||n.layers&&["layerProperties","numberOfActiveLayers","layersOrder","displayLabelsInUI","nodesWithoutLayerOpacity","useLayerCustomOpacity","layersCustomOpacity","layersLevels","defaultLevelForLayers"].some(p=>!o(p))||["colorBasedOnDepth","currentNode"].some(p=>!o(p))&&t.colorBasedOnDepth&&!o("depthColormap")||s.linksSameColorAsNode!==n.linksSameColorAsNode||["fadeOnDisable","borderUnresolved","spreadArcs","weightArcs","animateDotsOnLinks","animationSpeedForDots","interactivesBrightness","fadeInElements","externalLinks","showPinIcon"].some(p=>!o(p))||s.focus!==n.focus||n.focus&&["focusScaleFactor","highlightOpenNodes","highlightSearchResults"].some(p=>!o(p))||["openInNewTab"].some(p=>!o(p))||["customColorMaps"].some(p=>!o(p))||["filterAbstractFiles","ignoreInlineLinks"].some(p=>!o(p))||["enableCSS","useRadialMenu","noLineHighlight","canonicalizePropertiesWithDataview"].some(p=>!o(p)))}};function Ka(r,e){let t=Object.keys,i=typeof r;return r&&e&&i==="object"&&i===typeof e?t(r).length===t(e).length&&t(r).every(n=>Ka(r[n],e[n])):r===e}async function Mo(){let r=u.configurationDirectory;return await u.app.vault.adapter.exists(r)?(await u.app.vault.adapter.list(r)).files:[]}var xn=require("obsidian");var W1=class extends xn.PluginSettingTab{constructor(t){super(u.app,t);this.sections=[];this.settingsWithPalettes=[];let i=new Za(this),s=new o9(this),n=new Qa(this),o=new a9(this),a=new Y1(this),l=new t9(this);this.settingsWithPalettes.push(i,s,n,o,a,l),this.sections.push(new j1(this)),this.sections.push(i),this.sections.push(s),this.sections.push(n),this.sections.push(new H1(this)),this.sections.push(o),this.sections.push(new Q1(this)),this.sections.push(new Z1(this)),this.sections.push(new K1(this)),this.sections.push(new s9(this)),this.sections.push(new e9(this)),this.sections.push(a),this.sections.push(new r9(this)),this.sections.push(new n9(this)),this.sections.push(l),this.sections.push(new q1(this)),this.sections.push(new X1(this)),this.sections.push(new J1(this)),this.sections.push(new i9(this)),this.sections.push(new $1(this))}display(){this.originalSettings=structuredClone(u.settings),this.containerEl.empty(),this.containerEl.addClass("extended-graph-settings"),this.addImportExport(),this.addNav(),this.addDisableNodes(),this.addCanonicalPropertiesWithDataview();for(let t of this.sections)t.display()}addImportExport(){new xn.Setting(this.containerEl).addExtraButton(t=>{t.extraSettingsEl.insertAdjacentText("beforebegin",m("controls.export")),t.setIcon("upload"),t.setTooltip(m("controls.exportSettings")),t.onClick(()=>{new l9((s,n)=>{let o=n?s:u.configurationDirectory+"/"+s+".json";return!n&&!Ku(s)?!1:(u.plugin.exportSettings(o,u.settings),!0)}).open()})}).addExtraButton(t=>{t.extraSettingsEl.insertAdjacentText("beforebegin",m("controls.import")),t.setIcon("download"),t.setTooltip(m("controls.importSettings")),t.onClick(()=>{new Ja(s=>{if(s.trim()===""){new xn.Notice("Configuration name cannot be empty");return}u.plugin.importSettings(s).then(()=>{this.display()})}).open()})})}addNav(){let i=this.containerEl.createDiv({cls:"extended-graph-nav-settings"}).createDiv({cls:"nav-label"});i.innerText=m("controls.goTo")}addDisableNodes(){new xn.Setting(this.containerEl).setName(m("features.disableNodes")).setDesc(m("features.disableNodesDesc")).addToggle(t=>{t.setValue(!u.settings.fadeOnDisable),t.onChange(i=>{u.settings.fadeOnDisable=!i,u.plugin.saveSettings()})})}addCanonicalPropertiesWithDataview(){N0(!1)&&new xn.Setting(this.containerEl).setName(m("features.canonicalizePropertiesWithDataview")).setDesc(m("features.canonicalizePropertiesWithDataviewDesc")).addToggle(t=>{t.setValue(u.settings.canonicalizePropertiesWithDataview),t.onChange(i=>{u.settings.canonicalizePropertiesWithDataview=i,u.plugin.saveSettings()})})}hide(){u.graphsManager&&u.settings.resetAfterChanges&&(Xe.needReload(this.originalSettings,u.settings,"graph")&&u.graphsManager.resetAllPlugins("graph"),Xe.needReload(this.originalSettings,u.settings,"localgraph")&&u.graphsManager.resetAllPlugins("localgraph")),super.hide()}onCustomPaletteModified(t,i){for(let s of this.settingsWithPalettes)s.onCustomPaletteModified(t,i);u.plugin.saveSettings()}};var mo=require("obsidian");var Bt=class{constructor(e,t,i,s,n,o){this.elementsBody=[];this.itemClasses=[];this.isCollapsed=!1;this.settingTab=e,this.containerEl=e.containerEl,this.id=t,this.keyword=i,this.title=s,this.icon=n,this.description=o,this.itemClasses.push(`setting-${this.id}`)}display(){this.elementsBody=[],this.addHeader(),this.addBody(),this.addToNav(),this.id!="property-key"&&(!(this.id in u.settings.collapsedSettings)||u.settings.collapsedSettings[this.id])&&this.collapse(),this.elementsBody.forEach(e=>{e.addClasses(this.itemClasses)})}addHeader(){this.settingHeader=new mo.Setting(this.containerEl).setName(this.title).setHeading(),this.icon&&this.icon!==""&&this.settingHeader.then(e=>{let t=createDiv();e.settingEl.prepend(t),this.icon&&(0,mo.setIcon)(t,this.icon)}),this.foldIcon=new mo.ExtraButtonComponent(this.settingHeader.nameEl).setIcon("chevron-right").onClick(()=>{this.isCollapsed?this.expand():this.collapse()}).then(e=>{e.extraSettingsEl.addClass("setting-header-fold-icon")}),this.settingHeader.setDesc(this.description),this.settingHeader.settingEl.addClasses(this.itemClasses)}addToNav(){if(this.icon==="")return;let e=this.settingTab.containerEl.querySelector(".extended-graph-nav-settings");if(!e)return;let t=e.createDiv();new mo.ExtraButtonComponent(t).setIcon(this.icon).onClick(()=>{this.settingHeader.settingEl.scrollIntoView()}).setTooltip(this.title),t.appendText(this.keyword)}collapse(){this.isCollapsed=!0,this.settingHeader.settingEl.addClass("is-collapsed"),u.settings.collapsedSettings[this.id]=!0,u.plugin.saveSettings(),this.onCollapse()}expand(){this.isCollapsed=!1,this.settingHeader.settingEl.removeClass("is-collapsed"),u.settings.collapsedSettings[this.id]=!1,u.plugin.saveSettings(),this.onExpand()}onCollapse(){}onExpand(){}};var bm=require("obsidian");var e0=class extends Bt{constructor(t,i,s,n,o,a,l){super(t,i,n,o,a,l);this.toggles={};this.feature=i,this.interactiveKey=s,s!==""&&this.itemClasses.push(`setting-${this.feature}-${c9(s)}`)}addHeader(){super.addHeader(),this.toggles={},this.addToggle("graph"),this.addToggle("localgraph")}addToggle(t){let i=u.settings.enableFeatures[t][this.feature];this.feature==="property-key"&&(i=u.settings.additionalProperties[this.interactiveKey][t]);let s=this.settingHeader.controlEl.createDiv();s.addClass("toggle-labelled"),s.insertAdjacentText("afterbegin",pu[t]),new bm.ToggleComponent(s).setValue(i).onChange(n=>{this.toggle(t,n)}),this.toggles[t]=s,this.toggle(t,i)}toggle(t,i){this.feature==="property-key"?u.settings.additionalProperties[this.interactiveKey][t]=i:u.settings.enableFeatures[t][this.feature]=i,u.plugin.saveSettings()}};var yo=require("obsidian");var H1=class extends e0{constructor(e){super(e,"arrows","",m("features.ids.arrows"),m("features.arrows"),"mouse-pointer-2",m("features.arrowsDesc"))}addBody(){this.addInvertArrows(),this.addFlatArrows(),this.addOpaqueArrows(),this.addScaleArrow(),this.addColorArrow()}addInvertArrows(){this.elementsBody.push(new yo.Setting(this.settingTab.containerEl).setName(m("features.arrowsInvert")).setDesc(m("features.arrowsInvertDesc")).addToggle(e=>{e.setValue(u.settings.invertArrows),e.onChange(t=>{u.settings.invertArrows=t,u.plugin.saveSettings()})}).settingEl)}addFlatArrows(){this.elementsBody.push(new yo.Setting(this.settingTab.containerEl).setName(m("features.arrowsFlat")).setDesc(m("features.arrowsFlatDesc")).addToggle(e=>{e.setValue(u.settings.flatArrows),e.onChange(t=>{u.settings.flatArrows=t,u.plugin.saveSettings()})}).settingEl)}addOpaqueArrows(){this.elementsBody.push(new yo.Setting(this.settingTab.containerEl).setName(m("features.arrowsOpaque")).setDesc(m("features.arrowsOpaqueDesc")).addToggle(e=>{e.toggleEl.insertAdjacentText("beforebegin",m("features.arrowsOpaqueKeepFading")),e.setValue(u.settings.opaqueArrowsButKeepFading),e.onChange(t=>{u.settings.opaqueArrowsButKeepFading=t,u.plugin.saveSettings()})}).addToggle(e=>{e.toggleEl.insertAdjacentText("beforebegin",m("features.arrowsOpaqueAlways")),e.setValue(u.settings.alwaysOpaqueArrows),e.onChange(t=>{u.settings.alwaysOpaqueArrows=t,u.plugin.saveSettings()})}).settingEl)}addScaleArrow(){this.elementsBody.push(new yo.Setting(this.settingTab.containerEl).setName(m("features.arrowsScale")).setDesc(m("features.arrowsScaleDesc")).addText(e=>{e.inputEl.addClass("number"),e.setValue(u.settings.arrowScale.toString()).onChange(async t=>{t===""&&(u.settings.arrowScale=1,await u.plugin.saveSettings());let i=parseFloat(t);isNaN(i)||(u.settings.arrowScale=Math.max(.1,i),await u.plugin.saveSettings())})}).settingEl),this.elementsBody.push(new yo.Setting(this.settingTab.containerEl).setName(m("features.arrowsFixedSize")).setDesc(m("features.arrowsFixedSizeDesc")).addToggle(e=>{e.setValue(u.settings.arrowFixedSize),e.onChange(t=>{u.settings.arrowFixedSize=t,u.plugin.saveSettings()})}).settingEl)}addColorArrow(){this.elementsBody.push(new yo.Setting(this.settingTab.containerEl).setName(m("features.arrowsColor")).setDesc(m("features.arrowsColorDesc")).addToggle(e=>{e.setValue(u.settings.arrowColorBool),e.onChange(t=>{u.settings.arrowColorBool=t,u.plugin.saveSettings()})}).addColorPicker(e=>{e.setValue(u.settings.arrowColor),e.onChange(t=>{u.settings.arrowColor=t,u.plugin.saveSettings()})}).settingEl)}};var el=require("obsidian");var j1=class extends Bt{constructor(e){super(e,"automation",m("features.ids.automation"),m("features.automation"),"workflow","")}addBody(){this.addAutoEnable(),this.addStartingState(),this.addSyncDefaultState(),this.addSaveConfigWithState(),this.addOpenInNewTab(),this.addResetAfterChanges()}addAutoEnable(){this.elementsBody.push(new Hi(this.containerEl,m("features.autoEnable"),m("features.autoEnableDesc"),"auto-enabled").settingEl)}addStartingState(){this.elementsBody.push(new el.Setting(this.containerEl).setName(m("states.startingState")).setDesc(m("states.startingStateDesc")).addDropdown(e=>{e.addOptions(Object.fromEntries(Object.values(u.settings.states).map(t=>[t.id,t.name]))),e.setValue(u.settings.startingStateID),e.onChange(t=>{u.settings.startingStateID=t,u.plugin.saveSettings()})}).settingEl)}addSyncDefaultState(){this.elementsBody.push(new el.Setting(this.containerEl).setName(m("states.syncDefaultState")).setDesc(m("states.syncDefaultStateDesc")).addToggle(e=>{e.setValue(u.settings.syncDefaultState),e.onChange(t=>{u.settings.syncDefaultState=t,u.plugin.saveSettings()})}).settingEl)}addSaveConfigWithState(){this.elementsBody.push(new el.Setting(this.containerEl).setName(m("states.saveConfigsWithState")).setDesc(m("states.saveConfigsWithStateDesc")).addToggle(e=>{e.setValue(u.settings.saveConfigsWithState),e.onChange(t=>{u.settings.saveConfigsWithState=t,u.plugin.saveSettings()})}).settingEl)}addOpenInNewTab(){this.elementsBody.push(new el.Setting(this.containerEl).setName(m("features.openInNewTab")).setDesc(m("features.openInNewTabDesc")).addToggle(e=>{e.setValue(u.settings.openInNewTab),e.onChange(t=>{u.settings.openInNewTab=t,u.plugin.saveSettings()})}).settingEl)}addResetAfterChanges(){this.elementsBody.push(new el.Setting(this.containerEl).setName(m("features.autoReset")).setDesc(m("features.autoResetDesc")).addToggle(e=>{e.setValue(u.settings.resetAfterChanges),e.onChange(t=>{u.settings.resetAfterChanges=t,u.plugin.saveSettings()})}).settingEl)}};var fu=require("obsidian");var $1=class extends Bt{constructor(e){super(e,"beta",m("features.ids.beta"),m("beta.betaFeatures"),"hourglass","")}addBody(){this.addRevertAction(),this.addExternalLinks()}addRevertAction(){let e=new fu.Setting(this.settingTab.containerEl).setName(m("beta.revertAction")).setDesc(m("beta.revertActionDesc")).addToggle(t=>t.setValue(u.settings.revertAction).onChange(async i=>{u.settings.revertAction=i,await u.plugin.saveSettings()}));this.elementsBody.push(e.settingEl)}addExternalLinks(){this.elementsBody.push(new fu.Setting(this.containerEl).setName(m("features.externalLinks")).setDesc(m("features.externalLinksDesc")).addDropdown(e=>{let t={none:m("features.externalLinksOptions.none"),domain:m("features.externalLinksOptions.domain"),href:m("features.externalLinksOptions.href"),domain_and_href:m("features.externalLinksOptions.domain_and_href")};e.addOptions(t),e.setValue(u.settings.externalLinks),e.onChange(async i=>{u.settings.externalLinks=i,await u.plugin.saveSettings()})}).settingEl),this.elementsBody.push(new fu.Setting(this.settingTab.containerEl).setName(m("features.externalLinksProperties")).setDesc(m("features.externalLinksPropertiesDesc")).addExtraButton(e=>{e.setIcon("mouse-pointer-click"),e.onClick(()=>{new rr(m("features.externalLinksProperties"),m("features.externalLinksPropertiesAdd"),u.settings.externalLinksProperties).open()})}).settingEl),this.elementsBody.push(new fu.Setting(this.containerEl).setName(m("features.externalLinksOpenMode")).setDesc(m("features.externalLinksOpenModeDesc")).addDropdown(e=>{let t={web:m("features.externalLinksModes.web"),note:m("features.externalLinksModes.note"),choice:m("features.externalLinksModes.choice")};e.addOptions(t),e.setValue(u.settings.externalLinkOpenMode),e.onChange(async i=>{u.settings.externalLinkOpenMode=i,await u.plugin.saveSettings()})}).settingEl)}};var mi=require("obsidian");var q1=class extends Bt{constructor(e){super(e,"display",m("features.ids.display"),m("features.otherDisplay"),"monitor","")}addBody(){this.addBorderUnresolved(),this.addLinkSameColorAsNodes(),this.addNoLineHighlight(),this.addSpreadArcs(),this.addWeightArcs(),this.addBrightness(),this.addFadeInElements(),this.addAnimateDotsOnLinks(),this.addAnimationSpeedForDot(),this.addHorizontalLegend(),this.addShowPinIcon()}addBorderUnresolved(){this.elementsBody.push(new mi.Setting(this.containerEl).setName(m("features.borderUnresolved")).setDesc(m("features.borderUnresolvedDesc")).addText(e=>{e.inputEl.addClass("number"),e.setValue(u.settings.borderUnresolved.toString()).onChange(async t=>{t===""&&(u.settings.borderUnresolved="",await u.plugin.saveSettings());let i=parseFloat(t);isNaN(i)||(u.settings.borderUnresolved=Math.clamp(i,0,1),await u.plugin.saveSettings())})}).settingEl)}addLinkSameColorAsNodes(){this.elementsBody.push(new Hi(this.containerEl,m("features.linksSameColorAsNode"),m("features.linksSameColorAsNodeDesc"),"linksSameColorAsNode").settingEl)}addNoLineHighlight(){this.elementsBody.push(new mi.Setting(this.containerEl).setName(m("features.noLineHighlight")).setDesc(m("features.noLineHighlightDesc")).addToggle(e=>{e.setValue(u.settings.noLineHighlight||!1),e.onChange(t=>{u.settings.noLineHighlight=t,u.plugin.saveSettings()})}).settingEl)}addSpreadArcs(){this.elementsBody.push(new mi.Setting(this.containerEl).setName(m("features.interactives.arcsSpread")).setDesc(m("features.interactives.arcsSpreadDesc")).addToggle(e=>{e.setValue(u.settings.spreadArcs||!1),e.onChange(t=>{u.settings.spreadArcs=t,u.plugin.saveSettings()})}).settingEl)}addWeightArcs(){this.elementsBody.push(new mi.Setting(this.containerEl).setName(m("features.interactives.arcWeight")).setDesc(m("features.interactives.arcWeightDesc")).addToggle(e=>{e.setValue(u.settings.weightArcs||!1),e.onChange(t=>{u.settings.weightArcs=t,u.plugin.saveSettings()})}).settingEl)}addBrightness(){this.elementsBody.push(new mi.Setting(this.containerEl).setName(m("features.brightness")).setDesc(m("features.brightnessDesc")).addText(e=>{e.inputEl.addClass("number"),e.inputEl.insertAdjacentText("beforebegin",m("plugin.light")),e.setValue(u.settings.interactivesBrightness.light.toString()),e.onChange(t=>{t===""&&(u.settings.interactivesBrightness.light=1,u.plugin.saveSettings());let i=parseFloat(t);isNaN(i)||(u.settings.interactivesBrightness.light=Math.max(i,0),u.plugin.saveSettings())})}).addText(e=>{e.inputEl.addClass("number"),e.inputEl.insertAdjacentText("beforebegin",m("plugin.dark")),e.setValue(u.settings.interactivesBrightness.dark.toString()),e.onChange(t=>{t===""&&(u.settings.interactivesBrightness.dark=1,u.plugin.saveSettings());let i=parseFloat(t);isNaN(i)||(u.settings.interactivesBrightness.dark=Math.max(i,0),u.plugin.saveSettings())})}).settingEl)}addFadeInElements(){this.elementsBody.push(new mi.Setting(this.containerEl).setName(m("features.fadeInElements")).setDesc(m("features.fadeInElementsDesc")).addToggle(e=>{e.setValue(u.settings.fadeInElements),e.onChange(t=>{u.settings.fadeInElements=t,u.plugin.saveSettings()})}).settingEl)}addAnimateDotsOnLinks(){this.elementsBody.push(new mi.Setting(this.containerEl).setName(m("features.animateDotsOnLinks")).setDesc(m("features.animateDotsOnLinksDesc")).addToggle(e=>{e.setValue(u.settings.animateDotsOnLinks||!1),e.onChange(t=>{u.settings.animateDotsOnLinks=t,u.plugin.saveSettings()})}).settingEl)}addAnimationSpeedForDot(){this.elementsBody.push(new mi.Setting(this.containerEl).setName(m("features.animateDotsOnLinksSpeed")).setDesc(m("features.animateDotsOnLinksSpeedDesc")).addText(e=>{e.inputEl.addClass("number"),e.setValue(u.settings.animationSpeedForDots.toString()).onChange(async t=>{let i=parseFloat(t);!isNaN(i)&&i>0&&(u.settings.animationSpeedForDots=i,await u.plugin.saveSettings())})}).settingEl)}addHorizontalLegend(){this.elementsBody.push(new mi.Setting(this.containerEl).setName(m("UI.horizontalLegend")).setDesc(m("UI.horizontalLegendDesc")).addToggle(e=>{e.setValue(u.settings.horizontalLegend),e.onChange(t=>{u.settings.horizontalLegend=t,u.plugin.saveSettings()})}).settingEl)}addShowPinIcon(){this.elementsBody.push(new mi.Setting(this.containerEl).setName(m("UI.showPinIcon")).setDesc(m("UI.showPinIconDesc")).addToggle(e=>{e.setValue(u.settings.showPinIcon),e.onChange(t=>{u.settings.showPinIcon=t,u.plugin.saveSettings()})}).settingEl)}};var o0=require("obsidian");var Dn=require("obsidian");var rr=class extends Dn.Modal{constructor(t,i,s){super(u.app);this.inputs=[];this.properties=s,this.addText=i,this.setTitle(t),this.modalEl.addClass("graph-modal-setting-properties")}onOpen(){this.addAddButton(),this.loadProperties()}addAddButton(){this.contentEl.createSpan().textContent=this.addText;let t=new Dn.ButtonComponent(this.contentEl).onClick(()=>{this.addProperty("")});Je.setupButton(t,"add")}loadProperties(){this.propertiesDiv=this.contentEl.createDiv("properties-list");for(let t of this.properties)this.addProperty(t)}addProperty(t){let i=this.propertiesDiv.createDiv("property-value"),s=t,n=new Dn.SearchComponent(i).setValue(t).onChange(a=>{this.renameProperty(s,a)&&(s=a)});new tl(n.inputEl,a=>{this.renameProperty(s,a)&&(s=a)}),this.inputs.push(n);let o=new Dn.ExtraButtonComponent(i).onClick(()=>{this.deleteProperty(i,n)});Je.setupExtraButton(o,"delete")}deleteProperty(t,i){this.inputs.remove(i),this.properties.remove(i.getValue()),t.remove(),u.plugin.saveSettings()}renameProperty(t,i){return rl(i)&&!this.properties.contains(i)&&i!==t?(this.properties.remove(t),this.properties.push(i),u.plugin.saveSettings(),!0):!1}onClose(){this.contentEl.empty()}};var Y1=class extends e0{constructor(e){super(e,"elements-stats","",m("features.ids.elementsStats"),m("features.elementsStats"),"chart-pie",m("features.elementsStatsDesc"))}addBody(){this.nodesSizeFunctionDropdown=void 0,this.nodesColorFunctionDropdown=void 0,this.linksSizeFunctionDropdown=void 0,this.linksColorFunctionDropdown=void 0,this.addNodeSizeProperties(),this.addNodeSizeFunction(),this.addNodeSizeWarning(),this.addNodeSizeRange(),this.addNodeColorFunction(),this.addNodeColorWarning(),this.addColorPaletteSettingForNodes(),this.addStatsDirection(),this.addLinkSizeFunction(),this.addLinkColorFunction(),this.addColorPaletteSettingForLinks(),this.addRecomputeStatsOnGraphChange()}addNodeSizeProperties(){let e=new o0.Setting(this.settingTab.containerEl).setName(m("features.nodeSizeProperties")).setDesc(m("features.nodeSizePropertiesDesc")).addExtraButton(t=>{t.setIcon("mouse-pointer-click"),t.onClick(()=>{new rr(m("features.nodeSizeProperties"),m("features.nodeSizePropertiesAdd"),u.settings.nodesSizeProperties).open()})});this.elementsBody.push(e.settingEl)}addNodeSizeFunction(){let e=new o0.Setting(this.settingTab.containerEl).setName(m("features.nodeSizesFunction")).setDesc(m("features.nodeSizesFunctionDesc")).addDropdown(t=>{this.nodesSizeFunctionDropdown=t,t.addOptions(Object.fromEntries(Object.entries(is).filter(i=>{let s=i[0];return!(Hc[s]&&!y0())}))),t.setValue(u.settings.nodesSizeFunction),t.onChange(i=>{let s=i;!y0()&&Hc[s]&&(new o0.Notice(`${m("notices.nlpPluginRequired")} (${s})`),s="default",this.nodesSizeFunctionDropdown?.setValue(s)),u.settings.nodesSizeFunction=s,u.plugin.saveSettings(),this.setWarning(this.warningNodeSizeSetting,cr.getWarning(s))})});this.elementsBody.push(e.settingEl)}addNodeSizeWarning(){let e=new o0.Setting(this.settingTab.containerEl).setClass("setting-warning").then(t=>{(0,o0.setIcon)(t.nameEl,"triangle-alert")});this.elementsBody.push(e.settingEl),this.warningNodeSizeSetting=e,this.setWarning(e,cr.getWarning(u.settings.nodesSizeFunction))}addNodeSizeRange(){let e=new o0.Setting(this.containerEl).setName(m("features.nodeSizesRange")).setDesc(m("features.nodeSizesRangeDesc")).addText(t=>{t.inputEl.addClass("number"),t.setValue(u.settings.nodesSizeRange.min.toString()),t.onChange(async i=>{let s=parseFloat(i);isNaN(s)||(u.settings.nodesSizeRange.min=Math.clamp(s,.1,5),await u.plugin.saveSettings())})}).addText(t=>{t.inputEl.addClass("number"),t.setValue(u.settings.nodesSizeRange.max.toString()),t.onChange(async i=>{let s=parseFloat(i);isNaN(s)||(u.settings.nodesSizeRange.max=Math.clamp(s,.1,5),await u.plugin.saveSettings())})});this.elementsBody.push(e.settingEl)}addNodeColorFunction(){let e=new o0.Setting(this.settingTab.containerEl).setName(m("features.nodeColorsFunction")).setDesc(m("features.nodeColorsFunctionDesc")).addDropdown(t=>{this.nodesColorFunctionDropdown=t,t.addOptions(Object.fromEntries(Object.entries(is).filter(i=>{let s=i[0];return!(Hc[s]&&!y0())}))),t.setValue(u.settings.nodesColorFunction),t.onChange(i=>{let s=i;!y0()&&Hc[s]&&(new o0.Notice(`${m("notices.nlpPluginRequired")} (${s})`),s="default",this.nodesColorFunctionDropdown?.setValue(s)),u.settings.nodesColorFunction=s,this.setWarning(this.warningNodeColorSetting,cr.getWarning(s)),u.plugin.saveSettings()})});this.elementsBody.push(e.settingEl)}addNodeColorWarning(){let e=new o0.Setting(this.settingTab.containerEl).setClass("setting-warning").then(t=>{(0,o0.setIcon)(t.nameEl,"triangle-alert")});this.elementsBody.push(e.settingEl),this.warningNodeColorSetting=e,this.setWarning(e,cr.getWarning(u.settings.nodesColorFunction))}addStatsDirection(){let e=new o0.Setting(this.settingTab.containerEl).setName(m("features.nodeStatsDirection")).setDesc(m("features.nodeStatsDirectionDesc")).addDropdown(t=>{let i={normal:m("features.nodeStatsDirectionNormal"),reversed:m("features.nodeStatsDirectionReversed"),undirected:m("features.nodeStatsDirectionUndirected")};t.addOptions(i),t.setValue(u.settings.graphStatsDirection),t.onChange(async s=>{u.settings.graphStatsDirection=s,await u.plugin.saveSettings()})});this.elementsBody.push(e.settingEl)}addColorPaletteSettingForNodes(){this.nodesPaletteSetting=new As(this.containerEl,this.settingTab,"stats-colors-nodes").setDesc(m("features.nodeColorsPaletteDesc")),this.nodesPaletteSetting.setValue(u.settings.nodesColorColormap),this.nodesPaletteSetting.onPaletteChange(e=>{u.settings.nodesColorColormap=e,u.plugin.saveSettings(),u.graphsManager.nodesColorCalculator?.mapStat(),u.graphsManager.updatePaletteForNodesStat()}),this.elementsBody.push(this.nodesPaletteSetting.settingEl)}addLinkSizeFunction(){let e=new o0.Setting(this.settingTab.containerEl).setName(m("features.linkSizesFunction")).setDesc(m("features.linkSizesFunctionDesc")).addDropdown(t=>{this.linksSizeFunctionDropdown=t,t.addOptions(Object.fromEntries(Object.entries(rs).filter(i=>{let s=i[0];return!(Pn[s]&&!y0())}))),t.setValue(u.settings.linksSizeFunction),t.onChange(i=>{this.recomputeLinksSizes(i)})});this.elementsBody.push(e.settingEl)}addLinkColorFunction(){let e=new o0.Setting(this.settingTab.containerEl).setName(m("features.linkColorsFunction")).setDesc(m("features.linkColorsFunctionDesc")+" \u26A0\uFE0F "+m("features.linksFeatureRequired")).addDropdown(t=>{this.linksColorFunctionDropdown=t,t.addOptions(Object.fromEntries(Object.entries(rs).filter(i=>{let s=i[0];return!(Pn[s]&&!y0())}))),t.setValue(u.settings.linksColorFunction),t.onChange(i=>{this.recomputeLinksColors(i)})});this.elementsBody.push(e.settingEl)}addColorPaletteSettingForLinks(){this.linksPaletteSetting=new As(this.containerEl,this.settingTab,"stats-colors-links").setDesc(m("features.linkColorsPaletteDesc")),this.linksPaletteSetting.setValue(u.settings.linksColorColormap),this.linksPaletteSetting.onPaletteChange(e=>{u.settings.linksColorColormap=e,u.plugin.saveSettings(),u.graphsManager.linksColorCalculator?.mapStat(),u.graphsManager.updatePaletteForLinksStat()}),this.elementsBody.push(this.linksPaletteSetting.settingEl)}addRecomputeStatsOnGraphChange(){let e=new o0.Setting(this.settingTab.containerEl).setName(m("features.nodeStatsRecomputeOnGraphChange")).setDesc(m("features.nodeStatsRecomputeOnGraphChangeDesc")).addToggle(t=>{t.setValue(u.settings.recomputeStatsOnGraphChange),t.onChange(i=>{u.settings.recomputeStatsOnGraphChange=i,u.plugin.saveSettings()})});this.elementsBody.push(e.settingEl)}onCustomPaletteModified(e,t){X0(u.settings.nodesColorColormap,u.settings)||(u.settings.nodesColorColormap===e&&X0(t,u.settings)?u.settings.nodesColorColormap=t:u.settings.nodesColorColormap="rainbow"),this.nodesPaletteSetting.populateCustomOptions(),this.nodesPaletteSetting.setValue(u.settings.nodesColorColormap),X0(u.settings.linksColorColormap,u.settings)||(u.settings.linksColorColormap===e&&X0(t,u.settings)?u.settings.linksColorColormap=t:u.settings.linksColorColormap="rainbow"),this.linksPaletteSetting.populateCustomOptions(),this.linksPaletteSetting.setValue(u.settings.linksColorColormap)}setWarning(e,t){t&&t!==""?(e.setDesc(t),e.settingEl.removeClass("is-hidden")):(e.setDesc(""),e.settingEl.addClass("is-hidden"))}recomputeLinksSizes(e){!y0()&&Pn[e]&&(new o0.Notice(`${m("notices.nlpPluginRequired")} (${e})`),e="default",this.linksSizeFunctionDropdown?.setValue(e)),u.settings.linksSizeFunction=e,u.plugin.saveSettings()}recomputeLinksColors(e){!y0()&&Pn[e]&&(new o0.Notice(`${m("notices.nlpPluginRequired")} (${e})`),e="default",this.linksColorFunctionDropdown?.setValue(e)),u.settings.linksColorFunction=e,u.plugin.saveSettings()}};var u9=require("obsidian");var X1=class extends Bt{constructor(e){super(e,"filter",m("features.ids.filter"),m("features.filters"),"file-x",m("features.filtersDesc"))}addBody(){this.addIgnoreInlineLinks(),this.addNewFilterSetting();for(let e of u.settings.filterAbstractFiles)this.addRegex(e)}addIgnoreInlineLinks(){this.elementsBody.push(new u9.Setting(this.containerEl).setName(m("features.ignoreInlineLinks")).setDesc(m("features.ignoreInlineLinksDesc")).addToggle(e=>{e.setValue(u.settings.ignoreInlineLinks),e.onChange(async t=>{u.settings.ignoreInlineLinks=t,await u.plugin.saveSettings()})}).settingEl)}addNewFilterSetting(){let e=new u9.Setting(this.settingTab.containerEl).setName(m("query.excludeRegex"));e.addExtraButton(t=>{Je.setupExtraButton(t,"add"),t.onClick(async()=>{let i=this.elementsBody.last()??e.settingEl,s={regex:"",flag:""};u.settings.filterAbstractFiles.push(s);let n=this.addRegex(s);i.insertAdjacentElement("afterend",n.settingEl),await u.plugin.saveSettings()})}),this.elementsBody.push(e.settingEl)}addRegex(e){let t=new u9.Setting(this.settingTab.containerEl).addSearch(i=>{new h9(i.inputEl,s=>{e.regex=s,u.plugin.saveSettings()}),i.setValue(e.regex),i.onChange(s=>{e.regex=s,u.plugin.saveSettings()})}).addText(i=>{i.setPlaceholder("flag").setValue(e.flag).onChange(s=>{e.flag=s,u.plugin.saveSettings()})});return t.addExtraButton(i=>{Je.setupExtraButton(i,"delete"),i.onClick(()=>{u.settings.filterAbstractFiles.remove(e),u.plugin.saveSettings(),t.settingEl.remove(),this.elementsBody.remove(t.settingEl)})}),this.elementsBody.push(t.settingEl),t.settingEl.addClasses(this.itemClasses),t}};var d9=require("obsidian");var K1=class extends e0{constructor(e){super(e,"focus","",m("features.ids.focus"),m("features.focus"),"telescope",m("features.focusDesc"))}addHeader(){super.addHeader()}addBody(){this.addFocusScale(),this.addHighlightOpenNodes(),this.addHighlightSearchResults()}addFocusScale(){this.elementsBody.push(new d9.Setting(this.settingTab.containerEl).setName(m("features.focusScale")).setDesc(m("features.focusScaleDesc")).addText(e=>{e.inputEl.addClass("number"),e.setValue(u.settings.focusScaleFactor.toString()).onChange(async t=>{let i=parseFloat(t);i&&(u.settings.focusScaleFactor=i,await u.plugin.saveSettings())})}).settingEl)}addHighlightOpenNodes(){this.elementsBody.push(new d9.Setting(this.settingTab.containerEl).setName(m("features.focusOpenNodes")).setDesc(m("features.focusOpenNodesDesc")).addToggle(e=>{e.setValue(u.settings.highlightOpenNodes).onChange(async t=>{u.settings.highlightOpenNodes=t,await u.plugin.saveSettings()})}).settingEl)}addHighlightSearchResults(){this.elementsBody.push(new d9.Setting(this.settingTab.containerEl).setName(m("features.focusSearchResults")).setDesc(m("features.focusSearchResultsDesc")).addToggle(e=>{e.setValue(u.settings.highlightSearchResults).onChange(async t=>{u.settings.highlightSearchResults=t,await u.plugin.saveSettings()})}).settingEl)}};var bn=require("obsidian");var Z1=class extends e0{constructor(e){super(e,"icons","",m("features.ids.icons"),m("features.icons"),"origami",m("features.iconsDesc"))}addBody(){this.colorSetting=void 0,this.parentSetting=void 0,this.addProperty(),this.addSupportForPlugins(),this.addBackgroundOpacity(),this.addBorderWidth()}addProperty(){this.elementsBody.push(new bn.Setting(this.settingTab.containerEl).setName(m("features.iconProperties")).setDesc(m("features.iconPropertiesDesc")).addExtraButton(e=>{e.setIcon("mouse-pointer-click"),e.onClick(()=>{new rr(m("features.iconProperties"),m("features.iconPropertiesAdd"),u.settings.iconProperties).open()})}).settingEl)}addSupportForPlugins(){this.elementsBody.push(new bn.Setting(this.settingTab.containerEl).setName(m("features.iconUsePlugin")).setDesc(m("features.iconUsePluginDesc")).addToggle(e=>{e.setValue(u.settings.usePluginForIcon),e.onChange(t=>{u.settings.usePluginForIcon=t,u.plugin.saveSettings(),this.colorSetting?.setVisibility(t),this.parentSetting?.setVisibility(t)})}).settingEl),this.colorSetting=new bn.Setting(this.settingTab.containerEl).setName(m("features.iconUsePluginColor")).setDesc(m("features.iconUsePluginColorDesc")).addToggle(e=>{e.setValue(u.settings.usePluginForIconColor),e.onChange(t=>{u.settings.usePluginForIconColor=t,u.plugin.saveSettings()})}),this.colorSetting?.setVisibility(u.settings.usePluginForIcon),this.elementsBody.push(this.colorSetting.settingEl),this.parentSetting=new bn.Setting(this.settingTab.containerEl).setName(m("features.iconUseParentIcon")).setDesc(m("features.iconUseParentIconDesc")).addToggle(e=>{e.setValue(u.settings.useParentIcon),e.onChange(t=>{u.settings.useParentIcon=t,u.plugin.saveSettings()})}),this.parentSetting?.setVisibility(u.settings.usePluginForIcon),this.elementsBody.push(this.parentSetting.settingEl)}addBackgroundOpacity(){this.elementsBody.push(new bn.Setting(this.settingTab.containerEl).setName(m("features.iconBackgroundOpacity")).setDesc(m("features.iconBackgroundOpacityDesc")).addText(e=>{e.inputEl.addClass("number"),e.setValue(u.settings.backgroundOpacityWithIcon.toString()),e.onChange(async t=>{let i=t===""?0:parseFloat(t);isNaN(i)||(u.settings.backgroundOpacityWithIcon=Math.clamp(i,0,1),await u.plugin.saveSettings())})}).settingEl),this.elementsBody.push(new bn.Setting(this.settingTab.containerEl).setName(m("features.iconBackgroundColor")).setDesc(m("features.iconBackgroundColorDesc")).addToggle(e=>{e.setValue(u.settings.useIconColorForBackgroud),e.onChange(async t=>{u.settings.useIconColorForBackgroud=t,await u.plugin.saveSettings()})}).settingEl)}addBorderWidth(){this.elementsBody.push(new bn.Setting(this.settingTab.containerEl).setName(m("features.iconBorderWidth")).setDesc(m("features.iconBorderWidthDesc")).addText(e=>{e.inputEl.addClass("number"),e.setValue(u.settings.borderWidthWithIcon.toString()),e.onChange(async t=>{let i=t===""?0:parseFloat(t);isNaN(i)||(u.settings.borderWidthWithIcon=Math.max(i,0),await u.plugin.saveSettings())})}).settingEl)}};var gu=require("obsidian");var Q1=class extends Bt{constructor(e){super(e,"images",m("features.ids.images"),m("features.image"),"image",m("features.imageDesc"))}addBody(){this.addImagesFromProperties(),this.addImagesFromEmbeds(),this.addImagesForAttachments(),this.addBorderFactor(),this.addAllowExternal()}addImagesFromProperties(){this.elementsBody.push(new Hi(this.settingTab.containerEl,m("features.imagesFromProperty"),m("features.imagesFromPropertyDesc"),"imagesFromProperty").settingEl),this.elementsBody.push(new gu.Setting(this.settingTab.containerEl).setName(m("features.imageProperties")).setDesc(m("features.imagePropertiesDesc")).addExtraButton(e=>{e.setIcon("mouse-pointer-click"),e.onClick(()=>{new rr(m("features.imageProperties"),m("features.imagePropertiesAdd"),u.settings.imageProperties).open()})}).settingEl)}addImagesFromEmbeds(){this.elementsBody.push(new Hi(this.settingTab.containerEl,m("features.imagesFromEmbeds"),m("features.imagesFromEmbedsDesc"),"imagesFromEmbeds").settingEl)}addImagesForAttachments(){this.elementsBody.push(new Hi(this.settingTab.containerEl,m("features.imagesForAttachments"),m("features.imagesForAttachmentsDesc"),"imagesForAttachments").settingEl)}addBorderFactor(){let e=new gu.Setting(this.settingTab.containerEl).setName(m("features.imageBorderWidth")).setDesc(m("features.imageBorderWidthDesc")).addSlider(t=>{let i=document.createTextNode(u.settings.borderFactor.toString()+"%");i&&t.sliderEl.parentElement?.insertBefore(i,t.sliderEl),t.setLimits(0,50,1).setValue(u.settings.borderFactor*100).onChange(s=>{u.settings.borderFactor=s/100,i&&(i.textContent=u.settings.borderFactor.toString()+"%"),u.plugin.saveSettings()})});e.controlEl.addClass("setting-item-description"),this.elementsBody.push(e.settingEl)}addAllowExternal(){this.elementsBody.push(new gu.Setting(this.settingTab.containerEl).setName(m("features.imagesAllowExternal")).setDesc(m("features.imagesAllowExternalDesc")).addToggle(e=>{e.setValue(u.settings.allowExternalImages),e.onChange(t=>{u.settings.allowExternalImages=t,u.plugin.saveSettings()})}).settingEl),this.elementsBody.push(new gu.Setting(this.settingTab.containerEl).setName(m("features.imagesAllowExternalLocal")).setDesc(m("features.imagesAllowExternalLocalDesc")).addToggle(e=>{e.setValue(u.settings.allowExternalLocalImages),e.onChange(t=>{u.settings.allowExternalLocalImages=t,u.plugin.saveSettings()})}).settingEl)}};var yi=require("obsidian");var J1=class extends Bt{constructor(e){super(e,"inputs",m("features.ids.inputs"),m("inputs.inputs"),"mouse","")}addBody(){this.addRadialMenu(),this.addPinHotkey(),this.addSelectHotkey(),this.checkCompatibility()}addRadialMenu(){let e=new yi.Setting(this.settingTab.containerEl).setName(m("inputs.radialMenu")).setDesc(m("inputs.radialMenuDesc")).addDropdown(t=>{t.addOptions({"":"",Mod:yi.Platform.isMacOS?"Cmd (Mod)":"Ctrl (Mod)",Ctrl:"Ctrl",Meta:yi.Platform.isMacOS?"Cmd (Meta)":"Win",Shift:"Shift",Alt:"Alt"}),t.setValue(u.settings.useRadialMenu?u.settings.radialMenuModifier:""),t.onChange(async i=>{i===""?u.settings.useRadialMenu=!1:(u.settings.useRadialMenu=!0,u.settings.radialMenuModifier=i),await u.plugin.saveSettings(),this.checkCompatibility()})});this.elementsBody.push(e.settingEl)}addPinHotkey(){let e=new yi.Setting(this.settingTab.containerEl).setName(m("inputs.pinHotkey")).setDesc(m("inputs.pinHotkeyDesc")).addDropdown(t=>{t.addOptions({"":"",Mod:yi.Platform.isMacOS?"Cmd (Mod)":"Ctrl (Mod)",Ctrl:"Ctrl",Meta:yi.Platform.isMacOS?"Cmd (Meta)":"Win",Shift:"Shift",Alt:"Alt"}),t.setValue(u.settings.pinNodeModifier?u.settings.pinNodeModifier:""),t.onChange(async i=>{i===""?u.settings.pinNodeModifier=void 0:u.settings.pinNodeModifier=i,await u.plugin.saveSettings(),this.checkCompatibility()})});this.elementsBody.push(e.settingEl)}addSelectHotkey(){let e=new yi.Setting(this.settingTab.containerEl).setName(m("inputs.selectHotkey")).setDesc(m("inputs.selectHotkeyDesc")).addDropdown(t=>{t.addOptions({Mod:yi.Platform.isMacOS?"Cmd (Mod)":"Ctrl (Mod)",Ctrl:"Ctrl",Meta:yi.Platform.isMacOS?"Cmd (Meta)":"Win",Shift:"Shift",Alt:"Alt"}),t.setValue(u.settings.selectNodeModifier),t.onChange(async i=>{u.settings.selectNodeModifier=i,await u.plugin.saveSettings(),this.checkCompatibility()})});this.elementsBody.push(e.settingEl)}checkCompatibility(){let e=[u.settings.radialMenuModifier,u.settings.pinNodeModifier],t=[u.settings.selectNodeModifier],i=e.unique().length===e.length,s=t.unique().length===t.length,n=[];i||n.push(m("inputs.rightClickIncompatibility")),s||n.push(m("inputs.leftClickIncompatibility")),this.settingHeader.setDesc(n.join(`
|
|
`)),this.settingHeader.descEl.toggleClass("error",!i&&!s)}};var ir=require("obsidian");var e9=class extends e0{constructor(t){super(t,"layers","",m("features.ids.layers"),`${m("features.layers")} (${m("beta.beta")})`,"layers",m("features.layersDesc"));this.layerInfoSettings=[]}addBody(){this.layerInfoSettings=[],this.addProperties(),this.addNumberOfActiveLayers(),this.addLayerOrder(),this.addRemoveNodesWithoutLayer(),this.addUseCustomOpacity(),this.addLayersInfo(),this.addDisplayLabelsInUI()}addProperties(){this.elementsBody.push(new ir.Setting(this.settingTab.containerEl).setName(m("features.layerProperties")).setDesc(m("features.layerPropertiesDesc")).addExtraButton(t=>{t.setIcon("mouse-pointer-click"),t.onClick(()=>{new rr(m("features.layerProperties"),m("features.layerPropertiesAdd"),u.settings.layerProperties).open()})}).settingEl)}addNumberOfActiveLayers(){this.elementsBody.push(new ir.Setting(this.containerEl).setName(m("features.layersNumber")).setDesc(m("features.layersNumberDesc")).addText(t=>{t.inputEl.addClass("number"),t.setValue(u.settings.numberOfActiveLayers.toString()).onChange(async i=>{let s=parseInt(i);!isNaN(s)&&s>0&&(u.settings.numberOfActiveLayers=s,await u.plugin.saveSettings())})}).settingEl)}addLayerOrder(){this.elementsBody.push(new ir.Setting(this.containerEl).setName(m("features.layersOrder")).setDesc(m("features.layersOrderDesc")).addDropdown(t=>{t.addOptions({ASC:"0-9",DESC:"9-0"}).setValue(u.settings.layersOrder).onChange(async i=>{(i==="ASC"||i==="DESC")&&(u.settings.layersOrder=i,await u.plugin.saveSettings())})}).settingEl)}addRemoveNodesWithoutLayer(){this.elementsBody.push(new ir.Setting(this.containerEl).setName(m("features.layersOpacityIfNoLayer")).setDesc(m("features.layersOpacityIfNoLayerDesc")).addText(t=>{t.inputEl.addClass("number"),t.setValue(u.settings.nodesWithoutLayerOpacity.toString()).onChange(async i=>{let s=parseFloat(i);isNaN(s)||(u.settings.nodesWithoutLayerOpacity=Math.clamp(s,0,1),await u.plugin.saveSettings())})}).settingEl)}addUseCustomOpacity(){let t=new ir.Setting(this.containerEl).setName(m("features.layersUseCustomOpacity")).setDesc(m("features.layersUseCustomOpacityDesc")).addToggle(i=>{i.setValue(u.settings.useLayerCustomOpacity).onChange(async s=>{u.settings.useLayerCustomOpacity=s,await u.plugin.saveSettings()})});this.elementsBody.push(t.settingEl),this.lastSettingBeforeLayerInfos=t}addLayersInfo(){let t=co.getAllLayers(u.settings);if(this.addLayersInfoFromData(t),N0(!1)){let i=new ir.Setting(this.containerEl).setClass("setting-warning").setDesc(m("features.layersInfoDataview")).then(s=>{(0,ir.setIcon)(s.nameEl,"triangle-alert")});this.elementsBody.push(i.settingEl)}if(t.some(i=>!i.levelFromID)){let i=new ir.Setting(this.containerEl).setClass("setting-additional-info").setDesc(m("features.layersInfoLevelNotFromID")).then(s=>{(0,ir.setIcon)(s.nameEl,"asterisk")});this.elementsBody.push(i.settingEl)}}addLayersInfoFromData(t){for(let i of this.layerInfoSettings)i.settingEl.detach();this.layerInfoSettings=[];for(let i of t.reverse()){let s=new z8(this.settingTab.containerEl,this,i);this.lastSettingBeforeLayerInfos.settingEl.insertAdjacentElement("afterend",s.settingEl),this.layerInfoSettings.push(s),this.elementsBody.push(s.settingEl)}this.layerInfoSettings.reverse()}addDisplayLabelsInUI(){this.elementsBody.push(new ir.Setting(this.containerEl).setName(m("features.layersDisplayLabels")).setDesc(m("features.layersDisplayLabelsDesc")).addToggle(t=>{t.setValue(u.settings.displayLabelsInUI).onChange(async i=>{u.settings.displayLabelsInUI=i,await u.plugin.saveSettings()})}).settingEl)}async updateLayerID(t){let i=t.layer.level,s=parseInt(t.levelInput.getValue());isNaN(s)&&(s=i);let n=t.layer.label,o=t.labelInput?.getValue()??n;o===""&&(o=n);let a=t.layer.id,l=t.layer.levelFromID?s.toString()+(o!==""?"_"+o:""):o,c=()=>{t.layer.id=l,t.layer.level=s,t.layer.label=o,t.levelInput.setValue(s.toString()),t.labelInput?.setValue(o)};if(i===s&&n===o){c();return}i!==s&&!t.layer.levelFromID&&(u.settings.layersLevels[l]=s),i in u.settings.layersCustomOpacity&&!(s in u.settings.layersCustomOpacity)&&(u.settings.layersCustomOpacity[s]=u.settings.layersCustomOpacity[i],await u.plugin.saveSettings());let h=u.app.vault.getMarkdownFiles();for(let p of h)await u.app.fileManager.processFrontMatter(p,g=>{for(let v of u.settings.layerProperties)v in g&&g[v]===a&&(g[v]=l)});c();let d=this.layerInfoSettings.map(p=>p.layer);co.sortData(u.settings,d),this.addLayersInfoFromData(d)}},z8=class extends ir.Setting{constructor(e,t,i){super(e),this.mainSettings=t,this.layer=i,this.settingEl.addClass("setting-layer-info"),this.addSaveButton().addLevelInput().addLabelInput().addLevelOriginIcon().addOpacityInput()}addSaveButton(){return this.addButton(e=>{this.saveButton=e,Je.setupButton(e,"save"),e.onClick(()=>{this.mainSettings.updateLayerID(this)})}),this}addLevelInput(){return this.addText(e=>{this.levelInput=e,e.inputEl.addClass("number"),this.layer.levelFromDefault?e.setPlaceholder(this.layer.level.toString()):e.setValue(this.layer.level.toString())}),this}addLabelInput(){return this.layer.label===""?this:this.addText(e=>{this.labelInput=e,this.labelInput.setValue(this.layer.label)})}addLevelOriginIcon(){if(this.layer.levelFromID)return this;let e=this.controlEl.createDiv("level-origin-icon");return(0,ir.setIcon)(e,"asterisk"),this}addOpacityInput(){return this.addText(e=>{e.inputEl.addClass("number"),e.setPlaceholder(m("features.layersOpacityPlaceholder")),e.setValue(u.settings.layersCustomOpacity[this.layer.level]?.toString()??""),e.onChange(async t=>{let i=parseFloat(t);isNaN(i)?(delete u.settings.layersCustomOpacity[this.layer.level],await u.plugin.saveSettings()):(u.settings.layersCustomOpacity[this.layer.level]=Math.clamp(i,0,1),await u.plugin.saveSettings())})}),this}};var vo=require("obsidian");var t9=class extends Bt{constructor(e){super(e,"local-graph",m("features.ids.localGraph"),m("features.localGraph"),"map-pin",m("features.localGraphDesc"))}addBody(){this.addColorBasedOnDepth(),this.addCurrentNodeColor(),this.addCurrentNodeSize(),this.addCurrentNodeShape()}addColorBasedOnDepth(){this.elementsBody.push(new vo.Setting(this.containerEl).setName(m("features.colorBasedOnDepth")).setDesc(m("features.colorBasedOnDepthDesc")).addToggle(e=>{e.setValue(u.settings.colorBasedOnDepth).onChange(async t=>{u.settings.colorBasedOnDepth=t,u.plugin.saveSettings(),this.depthColormapSetting.setVisibility(t)})}).settingEl),this.depthColormapSetting=new As(this.containerEl,this.settingTab,"depth-color").setName(m("features.depthPalette")).setDesc(m("features.depthPaletteDesc")),this.depthColormapSetting.setValue(u.settings.depthColormap),this.depthColormapSetting.onPaletteChange(e=>{u.settings.depthColormap=e,u.plugin.saveSettings()}),this.depthColormapSetting.setVisibility(u.settings.colorBasedOnDepth),this.elementsBody.push(this.depthColormapSetting.settingEl)}addCurrentNodeColor(){this.elementsBody.push(new vo.Setting(this.containerEl).setName(m("features.localGraphCurrentNodeColor")).setDesc(m("features.localGraphCurrentNodeColorDesc")).addToggle(e=>{e.setValue(u.settings.currentNode.useColor),e.onChange(async t=>{u.settings.currentNode.useColor=t,await u.plugin.saveSettings()})}).addColorPicker(e=>{e.setValue(u.settings.currentNode.color),e.onChange(async t=>{u.settings.currentNode.color=t,await u.plugin.saveSettings()})}).settingEl)}addCurrentNodeSize(){this.elementsBody.push(new vo.Setting(this.containerEl).setName(m("features.localGraphCurrentNodeSize")).setDesc(m("features.localGraphCurrentNodeSizeDesc")).addText(e=>{e.inputEl.addClass("number"),e.setValue(u.settings.currentNode.size.toString()),e.onChange(async t=>{let i=parseInt(t);isNaN(i)||(u.settings.currentNode.size=Math.max(10,i),await u.plugin.saveSettings())})}).settingEl)}addCurrentNodeShape(){let e=new vo.Setting(this.containerEl).setName(m("features.localGraphCurrentNodeShape")).setDesc(m("features.localGraphCurrentNodeShapeDesc"));this.elementsBody.push(e.settingEl),this.shapesSVGContainer=e.controlEl;let t=Object.values(Ts);for(let i of t){let s=We.getSVG(i);s.addClass("shape-svg");let n=new vo.ExtraButtonComponent(this.shapesSVGContainer);n.setTooltip(i),n.extraSettingsEl.addClasses(["shape-icon",i]),n.extraSettingsEl.replaceChildren(s),n.onClick(async()=>{u.settings.currentNode.shape=i,await u.plugin.saveSettings(),this.highlightSelectedShape()})}this.highlightSelectedShape()}highlightSelectedShape(){for(let e of Array.from(this.shapesSVGContainer.querySelectorAll(".shape-icon")))e.toggleClass("is-active",e.hasClass(u.settings.currentNode.shape))}onCustomPaletteModified(e,t){X0(u.settings.depthColormap,u.settings)||(u.settings.depthColormap===e&&X0(t,u.settings)?u.settings.depthColormap=t:u.settings.depthColormap="rainbow"),this.depthColormapSetting.populateCustomOptions(),this.depthColormapSetting.setValue(u.settings.depthColormap)}};var ks=require("obsidian");var r9=class extends e0{constructor(e){super(e,"names","",m("features.ids.names"),m("features.names"),"case-sensitive",m("features.namesDesc"))}addBody(){this.addShowWhenNeighborHighlighted(),this.addNumberOfCharacters(),this.addOnlyFilename(),this.addNoExtension(),this.addUseProperty(),this.addBackground(),this.addDynamicVerticalOffset(),this.addVerticalOffset()}addNumberOfCharacters(){this.elementsBody.push(new ks.Setting(this.settingTab.containerEl).setName(m("features.namesNumberOfCharacters")).setDesc(m("features.namesNumberOfCharactersDesc")).addText(e=>{e.inputEl.addClass("number"),e.setValue(u.settings.numberOfCharacters?.toString()||"").onChange(async t=>{let i=parseInt(t);isNaN(i)?u.settings.numberOfCharacters=null:u.settings.numberOfCharacters=i,await u.plugin.saveSettings()})}).addText(e=>{e.inputEl.addClass("number"),e.setPlaceholder(m("features.namesEllipsisPlaceholder")),e.setValue(u.settings.ellipsis.toString()).onChange(async t=>{u.settings.ellipsis=t,await u.plugin.saveSettings()})}).settingEl)}addOnlyFilename(){this.elementsBody.push(new ks.Setting(this.settingTab.containerEl).setName(m("features.namesShowOnlyFileName")).setDesc(m("features.namesShowOnlyFileNameDesc")).addToggle(e=>{e.setValue(u.settings.showOnlyFileName),e.onChange(t=>{u.settings.showOnlyFileName=t,u.plugin.saveSettings()})}).settingEl)}addNoExtension(){this.elementsBody.push(new ks.Setting(this.settingTab.containerEl).setName(m("features.namesNoExtension")).setDesc(m("features.namesNoExtensionDesc")).addToggle(e=>{e.setValue(u.settings.noExtension),e.onChange(t=>{u.settings.noExtension=t,u.plugin.saveSettings()})}).settingEl)}addUseProperty(){this.elementsBody.push(new ks.Setting(this.settingTab.containerEl).setName(m("features.namesUseProperties")).setDesc(m("features.namesUsePropertiesDesc")).addExtraButton(e=>{e.setIcon("mouse-pointer-click"),e.onClick(()=>{new rr(m("features.namesUseProperties"),m("features.namesUsePropertiesAdd"),u.settings.usePropertiesForName).open()})}).settingEl)}addBackground(){this.elementsBody.push(new ks.Setting(this.settingTab.containerEl).setName(m("features.namesBackground")).setDesc(m("features.namesBackgroundDesc")).addToggle(e=>{e.setValue(u.settings.addBackgroundToName),e.onChange(t=>{u.settings.addBackgroundToName=t,u.plugin.saveSettings()})}).settingEl)}addDynamicVerticalOffset(){this.elementsBody.push(new ks.Setting(this.settingTab.containerEl).setName(m("features.namesDynamicVerticalOffset")).setDesc(m("features.namesDynamicVerticalOffsetDesc")).addToggle(e=>{e.setValue(u.settings.dynamicVerticalOffset),e.onChange(t=>{this.verticalOffset.setDisabled(t),u.settings.dynamicVerticalOffset=t,u.plugin.saveSettings()})}).settingEl)}addVerticalOffset(){this.verticalOffset=new ks.Setting(this.settingTab.containerEl).setName(m("features.namesVerticalOffset")).setDesc(m("features.namesVerticalOffsetDesc")).addText(e=>{e.inputEl.addClass("number"),e.setValue(u.settings.nameVerticalOffset.toString()),e.onChange(t=>{let i=parseInt(t);u.settings.nameVerticalOffset=isNaN(i)?0:i,u.plugin.saveSettings()})}),this.verticalOffset.setDisabled(u.settings.dynamicVerticalOffset),this.elementsBody.push(this.verticalOffset.settingEl)}addShowWhenNeighborHighlighted(){this.elementsBody.push(new ks.Setting(this.settingTab.containerEl).setName(m("features.namesShowWhenNeighborHighlighted")).setDesc(m("features.namesShowWhenNeighborHighlightedDesc")).addToggle(e=>{e.setValue(u.settings.showNamesWhenNeighborHighlighted),e.onChange(t=>{u.settings.showNamesWhenNeighborHighlighted=t,u.plugin.saveSettings()})}).settingEl)}};var p9=require("obsidian");var i9=class extends Bt{constructor(e){super(e,"performances",m("features.ids.performances"),m("features.performance"),"cpu","")}addBody(){this.addDelay(),this.addNumberOfNodes(),this.addEnableCSS()}addDelay(){let e=new p9.Setting(this.settingTab.containerEl).setName(m("features.performanceDelay")).setDesc(m("features.performanceDelayDesc")).addText(t=>{t.inputEl.addClass("number"),t.setValue(u.settings.delay.toString()).onChange(async i=>{let s=parseInt(i);isNaN(s)||(u.settings.delay=s,await u.plugin.saveSettings())})});this.elementsBody.push(e.settingEl)}addNumberOfNodes(){let e=new p9.Setting(this.settingTab.containerEl).setName(m("features.performanceMaxNodes")).setDesc(m("features.performanceMaxNodesDesc")).addText(t=>{t.inputEl.addClass("number"),t.setValue(u.settings.maxNodes.toString()).onChange(async i=>{let s=parseInt(i);isNaN(s)||(u.settings.maxNodes=s,await u.plugin.saveSettings())})});this.elementsBody.push(e.settingEl)}addEnableCSS(){let e=new p9.Setting(this.settingTab.containerEl).setName(m("beta.enableCSS")).setDesc(m("beta.enableCSSDesc")).addToggle(t=>t.setValue(u.settings.enableCSS).onChange(i=>{u.settings.enableCSS=i,u.plugin.saveSettings()})).addSearch(t=>{t.setValue(u.settings.cssSnippetFilename),new f9(t.inputEl,i=>{u.settings.cssSnippetFilename=i,u.plugin.saveSettings()}),t.onChange(i=>{u.settings.cssSnippetFilename=i,u.plugin.saveSettings()})});this.elementsBody.push(e.settingEl)}};var mu=require("obsidian");var s9=class extends e0{constructor(t){super(t,"shapes","",m("features.ids.shapes"),m("features.shapes"),"shapes",m("features.shapesDesc"));this.settingsShape=[]}addBody(){this.settingsShape=[];let t=Object.fromEntries(Object.entries(u.settings.shapeQueries).sort((s,n)=>(s[1].index??0)-(n[1].index??0))),i=Object.keys(t);for(let s of i){let n=this.addShape(s);this.elementsBody.push(n.settingEl),this.settingsShape.push(n)}}addShape(t){return new W8(this.settingTab.containerEl,t,this.moveDown.bind(this),this.moveUp.bind(this))}moveDown(t){let i=this.settingsShape.indexOf(t);if(i>=this.settingsShape.length-1)return;[this.settingsShape[i],this.settingsShape[i+1]]=[this.settingsShape[i+1],this.settingsShape[i]];let s=t.settingEl.nextSibling;this.settingTab.containerEl?.insertAfter(t.settingEl,s),u.settings.shapeQueries[t.shape].index=i+1,u.settings.shapeQueries[this.settingsShape[i].shape].index=i,u.plugin.saveSettings()}moveUp(t){let i=this.settingsShape.indexOf(t);if(i===0)return;[this.settingsShape[i],this.settingsShape[i-1]]=[this.settingsShape[i-1],this.settingsShape[i]];let s=t.settingEl.previousSibling;this.settingTab.containerEl?.insertBefore(t.settingEl,s),u.settings.shapeQueries[t.shape].index=i-1,u.settings.shapeQueries[this.settingsShape[i].shape].index=i,u.plugin.saveSettings()}},W8=class extends mu.Setting{constructor(e,t,i,s){super(e),this.shape=t,this.moveDown=i,this.moveUp=s,this.setName(m(`features.shapesNames.${t}`)).addMoveButtons().addQueryStringDiv().addSVG().addEditButton()}addQueryStringDiv(){return this.queryStringDiv=this.controlEl.createDiv({cls:"query-string"}),this.setQueryText(this.shape,u.settings.shapeQueries[this.shape]),this}addSVG(){let e=We.getSVG(this.shape);return e.addClass("shape-svg"),this.controlEl.appendChild(e),this}addEditButton(){return this.addExtraButton(e=>{e.setTooltip(m("query.editShapeQuery")),e.onClick(()=>{new g9(this.shape,u.settings.shapeQueries[this.shape],this.saveShapeQuery.bind(this)).open()})}),this}addMoveButtons(){let e=this.settingEl.createDiv({cls:"move-buttons"});return new mu.ExtraButtonComponent(e).setIcon("chevron-up").setTooltip(m("controls.moveUp")).onClick(()=>{this.moveUp(this)}),new mu.ExtraButtonComponent(e).setIcon("chevron-down").setTooltip(m("controls.moveDown")).onClick(()=>{this.moveDown(this)}),this.settingEl.insertAdjacentElement("afterbegin",e),this}setQueryText(e,t){this.queryStringDiv.setText(new Hr(t).toString())}saveShapeQuery(e,t){this.setQueryText(e,t),u.settings.shapeQueries[e].combinationLogic=t.combinationLogic,u.settings.shapeQueries[e].rules=t.rules,u.plugin.saveSettings()}};var Em=require("obsidian");var n9=class extends Bt{constructor(e){super(e,"zoom",m("features.ids.zoom"),m("features.zoomOnNode"),"scan-search","")}addBody(){let e=this.settingTab.containerEl,t=new Em.Setting(e).setName(m("features.zoomScale")).setDesc(m("features.zoomScaleDesc")).addSlider(i=>{let s=document.createTextNode(u.settings.zoomFactor.toString());s&&i.sliderEl.parentElement?.insertBefore(s,i.sliderEl),i.setLimits(0,8,.5).setValue(u.settings.zoomFactor).onChange(n=>{u.settings.zoomFactor=n,s&&(s.textContent=u.settings.zoomFactor.toString()),u.plugin.saveSettings()})});t.controlEl.addClass("setting-item-description"),this.elementsBody.push(t.settingEl)}};var En=require("obsidian");var ji=class extends e0{constructor(t,i,s,n,o,a,l,c){super(t,i,s,n,o,a,l);this.noneType="";this.colors=[];this.canBeRecursive=c}addBody(){this.colors=[],this.addNoneTypeSetting(),this.addColorPaletteSetting(),this.addSpecificColorHeaderSetting();for(let t of u.settings.interactiveSettings[this.interactiveKey].colors)this.canBeRecursive&&t.recursive===void 0&&(t.recursive=!1),this.addColor(t);this.addFilterTypeSetting()}addNoneTypeSetting(){this.noneType=u.settings.interactiveSettings[this.interactiveKey].noneType;let t=new En.Setting(this.containerEl).setName(m("features.interactives.noneTypeID")).setDesc(m("features.interactives.noneTypeIDDesc")+this.interactiveKey).addText(i=>i.setValue(u.settings.interactiveSettings[this.interactiveKey].noneType).onChange(async s=>{s=s.trim(),s!=this.noneType&&(u.settings.interactiveSettings[this.interactiveKey].noneType=s,this.noneType=s,await u.plugin.saveSettings())}));this.elementsBody.push(t.settingEl)}addColorPaletteSetting(){this.settingColorPalette=new As(this.containerEl,this.settingTab,this.interactiveKey).setDesc(m("features.interactives.paletteDesc")+this.interactiveKey),this.settingColorPalette.setValue(u.settings.interactiveSettings[this.interactiveKey].colormap),this.settingColorPalette.onPaletteChange(t=>{let i=u.settings.interactiveSettings[this.interactiveKey].colormap;u.settings.interactiveSettings[this.interactiveKey].colormap=t,u.plugin.app.workspace.trigger("extended-graph:settings-colorpalette-changed",this.interactiveKey),u.plugin.saveSettings(),this.settingTab.onCustomPaletteModified(i,t)}),this.elementsBody.push(this.settingColorPalette.settingEl)}addSpecificColorHeaderSetting(){this.settingInteractiveColor=new En.Setting(this.containerEl).setName(m("features.interactives.specificColors")).setDesc(m("features.interactives.specificColorsDesc")).addButton(t=>{Je.setupButton(t,"add"),t.onClick(i=>{let s={type:"",color:h0(Cd()),recursive:this.canBeRecursive?!1:void 0};u.settings.interactiveSettings[this.interactiveKey].colors.push(s),this.addColor(s)})}),this.elementsBody.push(this.settingInteractiveColor.settingEl)}addFilterTypeSetting(){this.settingInteractiveFilter=new En.Setting(this.containerEl).setName(m("features.interactives.selection")).setDesc(m("features.interactives.selectionDesc")).addExtraButton(t=>{t.setIcon("mouse-pointer-click"),t.onClick(()=>{new y9(this.interactiveKey,this.getAllTypes()).open()})}),this.elementsBody.push(this.settingInteractiveFilter.settingEl)}getAllTypes(){let t=new Set,i=u.app.vault.getFiles();for(let s of i)t=new Set([...t,...ct(this.interactiveKey,s)]);return[...t].sort()}addColor(t){let i=new H8(this.containerEl,u.plugin,this.interactiveKey,t,this.isValueValid.bind(this));this.elementsBody.push(i.settingEl),this.colors=this.colors.filter(n=>n.settingEl.parentElement);let s=this.colors.last()??this.settingInteractiveColor;return this.containerEl.insertAfter(i.settingEl,s.settingEl),this.colors.push(i),i}onCustomPaletteModified(t,i){X0(u.settings.interactiveSettings[this.interactiveKey].colormap,u.settings)||(u.settings.interactiveSettings[this.interactiveKey].colormap===t&&X0(i,u.settings)?u.settings.interactiveSettings[this.interactiveKey].colormap=i:u.settings.interactiveSettings[this.interactiveKey].colormap="rainbow"),this.settingColorPalette.populateCustomOptions(),this.settingColorPalette.setValue(u.settings.interactiveSettings[this.interactiveKey].colormap)}},H8=class extends En.Setting{constructor(e,t,i,s,n){super(e),this.plugin=t,this.isValid=n,this.key=i,this.data=s,this.addSearch(a=>{this.textComponent=a;let l=new m9(a.inputEl,u.settings,c=>{this.toggleWarning(),this.save(),l.typeToInclude=this.data.type});switch(l.typeToInclude=this.data.type,i){case ne:l.setKey("link");break;case He:l.setKey("tag");break;case pe:l.setKey("folder");break;default:l.setKey("property",i);break}a.setPlaceholder(i),a.setValue(s.type),a.onChange(c=>{this.toggleWarning(),this.save(),l.typeToInclude=this.data.type})}),this.addColorPicker(a=>{this.colorComponent=a,a.setValue(s.color),a.onChange(l=>{this.updateCSS(),this.save()})}),this.addButton(a=>{(0,En.setIcon)(a.buttonEl,"x"),a.onClick(()=>{this.remove()})});let o=s.recursive;o!==void 0&&this.addToggle(a=>{this.recursiveComponent=a,a.toggleEl.insertAdjacentText("afterend",m("features.recursive")),a.setValue(o),a.onChange(l=>{this.save()})}),this.warningDiv=this.controlEl.createDiv("control-warning"),(0,En.setIcon)(this.warningDiv.createDiv(),"triangle-alert"),this.warningDiv.appendText(m("features.interactives.alreadyExists")),this.warningDiv.addClass("is-hidden"),this.updateCSS(),this.settingEl.addClass("setting-color")}toggleWarning(){let e=this.textComponent.getValue().trim();this.warningDiv.toggleClass("is-hidden",!u.settings.interactiveSettings[this.key].colors.find(t=>t.type===e&&t!==this.data))}save(){let e=this.textComponent.getValue().trim(),t=this.colorComponent.getValue(),i=this.recursiveComponent?.getValue();if(!this.isValid(e))return;let s=this.data.type;this.data.type=e,this.data.color=t,this.data.recursive=i,this.plugin.saveSettings().then(()=>{s!==e&&this.plugin.app.workspace.trigger("extended-graph:settings-interactive-color-changed",this.key,s),this.plugin.app.workspace.trigger("extended-graph:settings-interactive-color-changed",this.key,e)})}updateCSS(){this.settingEl.style.setProperty("--interactive-color",this.colorComponent.getValue())}remove(){u.settings.interactiveSettings[this.key].colors.remove(this.data),u.plugin.saveSettings().then(()=>{u.app.workspace.trigger("extended-graph:settings-interactive-color-changed",this.key,this.data.type)}),this.settingEl.remove()}};var Sm=require("obsidian");var Za=class r extends ji{constructor(e){super(e,"tags",He,m("features.ids.tags"),m("features.interactives.tags"),"tags",m("features.interactives.tagsDesc"),!0)}addBody(){super.addBody(),this.elementsBody.push(new Sm.Setting(this.settingTab.containerEl).setName(m("features.interactives.arcsAdd")).setDesc(m("features.interactives.arcsAddTagDesc")).addToggle(e=>{e.setValue(u.settings.interactiveSettings[this.interactiveKey].showOnGraph),e.onChange(t=>{u.settings.interactiveSettings[this.interactiveKey].showOnGraph=t,u.plugin.saveSettings()})}).settingEl)}isValueValid(e){return/^[^\u2000-\u206F\u2E00-\u2E7F'!"#$%&()*+,.:;<=>?@^`{|}~\[\]\\\s]+/.test(e)}getPlaceholder(){return"tag"}getAllTypes(){return r.getAllTypes()}static getAllTypes(){return Object.keys(u.app.metadataCache.getTags()).map(e=>e.replace("#",""))}};var xo=require("obsidian");var o9=class extends e0{constructor(t){super(t,"properties","",m("features.ids.properties"),m("features.interactives.properties"),"archive",m("features.interactives.propertiesDesc"));this.settingInteractives=[];for(let i of Object.keys(u.settings.additionalProperties))this.settingInteractives.push(new il(i,t,this))}addHeader(){super.addHeader(),this.settingHeader.addButton(t=>{this.addButton=t,Je.setupButton(t,"add"),this.elementsBody.push(t.buttonEl),t.onClick(i=>{t.buttonEl.blur(),this.openModalToAddInteractive()}),this.settingHeader.controlEl.insertAdjacentElement("afterbegin",t.buttonEl)})}addBody(){this.propertiesContainer=this.settingTab.containerEl.createDiv("setting-item settings-properties-container"),this.elementsBody.push(this.propertiesContainer);for(let t of this.settingInteractives)t.containerEl=this.propertiesContainer,t.display()}openModalToAddInteractive(){new v9("Property key",this.addProperty.bind(this)).open()}isKeyValid(t){return u.settings.additionalProperties.hasOwnProperty(t)?(new xo.Notice(m("features.interactives.propertyAlreadyExists")),!1):t===ne?(new xo.Notice(m("features.interactives.propertyReservedLinks")),!1):t===pe?(new xo.Notice(m("features.interactives.propertyReservedFolders")),!1):t===He?(new xo.Notice(m("features.interactives.propertyReservedTags")),!1):rl(t)}addProperty(t){return this.isKeyValid(t)?(u.settings.additionalProperties[t]={graph:!0,localgraph:!0},u.settings.interactiveSettings[t]={colormap:"rainbow",colors:[],unselected:[],excludeRegex:{regex:"",flags:""},noneType:"none",showOnGraph:!0,enableByDefault:!0},u.plugin.saveSettings().then(()=>{let i=new il(t,this.settingTab,this);this.settingInteractives.push(i),i.containerEl=this.propertiesContainer,i.display()}),!0):!1}onCollapse(){this.addButton?.buttonEl.hide()}onExpand(){this.addButton?.buttonEl.show()}onCustomPaletteModified(t,i){for(let s of this.settingInteractives)s.onCustomPaletteModified(t,i)}},il=class r extends ji{constructor(e,t,i){super(t,"property-key",e,"",m("features.interactives.property")+": "+e,"",m("features.interactives.propertyDesc")+e,!1),this.array=i}addHeader(){super.addHeader(),this.settingHeader.addExtraButton(e=>{Je.setupExtraButton(e,"delete"),e.onClick(()=>{this.remove()}),this.settingHeader.controlEl.insertAdjacentElement("afterbegin",e.extraSettingsEl)}),this.settingHeader.settingEl.addClass("setting-property-header"),this.foldIcon.extraSettingsEl.remove()}addBody(){super.addBody(),this.elementsBody.push(new xo.Setting(this.array.propertiesContainer).setName(m("features.interactives.arcsAdd")).setDesc(m("features.interactives.arcsAddPropertyDesc")).addToggle(e=>{e.setValue(u.settings.interactiveSettings[this.interactiveKey].showOnGraph),e.onChange(t=>{u.settings.interactiveSettings[this.interactiveKey].showOnGraph=t,u.plugin.saveSettings()})}).settingEl)}remove(){delete u.settings.additionalProperties[this.interactiveKey],delete u.settings.interactiveSettings[this.interactiveKey],this.array.settingInteractives.remove(this),u.plugin.saveSettings().then(()=>{this.settingHeader.settingEl.remove(),this.elementsBody.forEach(e=>e.remove())})}isValueValid(e){return e.length>0}getPlaceholder(){return"property-key"}getAllTypes(){return r.getAllTypes(this.interactiveKey)??super.getAllTypes()}static getAllTypes(e){if(!N0(!1))return u.app.metadataCache.getFrontmatterPropertyValuesForKey(e)}};var jr=require("obsidian");var Qa=class r extends ji{constructor(e){super(e,"links",ne,m("features.ids.linkTypes"),m("features.interactives.linkTypes"),"link",m("features.interactives.linkTypesDesc"),!1)}addBody(){super.addBody(),this.addExcludeFolders(),this.addDisableSources(),this.addDisableTargets(),this.addShowOnGraph(),this.addMultipleTypes(),this.addCurvedLinks(),this.addOutlineLinks()}addExcludeFolders(){this.elementsBody.push(new jr.Setting(this.settingTab.containerEl).setName(m("features.excludeSourceFolders")).setDesc(m("features.excludeSourceFoldersDesc")).addButton(e=>{this.setManageNumber(e,u.settings.excludedSourcesFolder.length),e.onClick(()=>{let t=new yu(u.settings.excludedSourcesFolder);t.open(),t.onClose=()=>this.setManageNumber(e,u.settings.excludedSourcesFolder.length)})}).settingEl),this.elementsBody.push(new jr.Setting(this.settingTab.containerEl).setName(m("features.excludeTargetFolders")).setDesc(m("features.excludeTargetFoldersDesc")).addButton(e=>{this.setManageNumber(e,u.settings.excludedTargetsFolder.length),e.onClick(()=>{let t=new yu(u.settings.excludedTargetsFolder);t.open(),t.onClose=()=>this.setManageNumber(e,u.settings.excludedTargetsFolder.length)})}).settingEl)}setManageNumber(e,t){e.setButtonText(`${m("controls.manage")} (${t})`)}addMultipleTypes(){this.elementsBody.push(new jr.Setting(this.settingTab.containerEl).setName(m("features.linksAllowMultipleTypes")).setDesc(m("features.linksAllowMultipleTypesDesc")).addToggle(e=>{e.setValue(u.settings.allowMultipleLinkTypes),e.onChange(t=>{u.settings.allowMultipleLinkTypes=t,u.plugin.saveSettings()})}).settingEl)}addDisableSources(){this.elementsBody.push(new jr.Setting(this.settingTab.containerEl).setName(m("features.removeSources")).setDesc(m("features.removeSourcesDesc")).addToggle(e=>{e.setValue(u.settings.disableSource),e.onChange(t=>{u.settings.disableSource=t,u.plugin.saveSettings()})}).settingEl)}addDisableTargets(){this.elementsBody.push(new jr.Setting(this.settingTab.containerEl).setName(m("features.removeTargets")).setDesc(m("features.removeTargetsDesc")).addToggle(e=>{e.setValue(u.settings.disableTarget),e.onChange(t=>{u.settings.disableTarget=t,u.plugin.saveSettings()})}).settingEl)}addShowOnGraph(){this.elementsBody.push(new jr.Setting(this.settingTab.containerEl).setName(m("features.interactives.colorLinks")).setDesc(m("features.interactives.colorLinksDesc")).addToggle(e=>{e.setValue(u.settings.interactiveSettings[this.interactiveKey].showOnGraph),e.onChange(t=>{u.settings.interactiveSettings[this.interactiveKey].showOnGraph=t,u.plugin.saveSettings()})}).settingEl),this.elementsBody.push(new jr.Setting(this.settingTab.containerEl).setName(m("features.interactives.displayLinkTypeLabel")).setDesc(m("features.interactives.displayLinkTypeLabelDesc")).addToggle(e=>{e.setValue(u.settings.displayLinkTypeLabel),e.onChange(t=>{u.settings.displayLinkTypeLabel=t,u.plugin.saveSettings()})}).settingEl),this.elementsBody.push(new jr.Setting(this.settingTab.containerEl).setName(m("features.interactives.colorLinkTypeLabel")).setDesc(m("features.interactives.colorLinkTypeLabelDesc")).addToggle(e=>{e.setValue(u.settings.colorLinkTypeLabel),e.onChange(t=>{u.settings.colorLinkTypeLabel=t,u.plugin.saveSettings()})}).settingEl)}addCurvedLinks(){this.elementsBody.push(new jr.Setting(this.settingTab.containerEl).setName(m("features.interactives.curvedLinks")).setDesc(m("features.interactives.curvedLinksDesc")).addToggle(e=>{e.setValue(u.settings.curvedLinks),e.onChange(t=>{u.settings.curvedLinks=t,u.plugin.saveSettings()})}).settingEl),this.elementsBody.push(new jr.Setting(this.settingTab.containerEl).setName(m("features.interactives.curvedFactor")).setDesc(m("features.interactives.curvedFactorDesc")).addSlider(e=>{let t=document.createTextNode(u.settings.curvedFactor.toString());t&&e.sliderEl.parentElement?.insertBefore(t,e.sliderEl),e.setLimits(-2,2,.2).setValue(u.settings.curvedFactor).onChange(i=>{u.settings.curvedFactor=i,u.plugin.saveSettings(),t&&(t.textContent=u.settings.curvedFactor.toString())})}).settingEl)}addOutlineLinks(){this.elementsBody.push(new jr.Setting(this.settingTab.containerEl).setName(m("features.linksOutline")).setDesc(m("features.linksOutlineDesc")).addToggle(e=>{e.setValue(u.settings.outlineLinks),e.onChange(t=>{u.settings.outlineLinks=t,u.plugin.saveSettings()})}).settingEl)}isValueValid(e){return rl(e)}getPlaceholder(){return"property-key"}getAllTypes(){return r.getAllTypes()}static getAllTypes(){let e=new Set,t=N0(!1);if(t){for(let i of t.pages())for(let[s,n]of Object.entries(i))if(!(s==="file"||u.settings.imageProperties.contains(s)||ei[ne].includes(s))&&!(n==null||n==="")&&!(!u.settings.canonicalizePropertiesWithDataview&&s===zt(s)&&Object.keys(i).some(o=>zt(o)===zt(s)&&o!==s))&&(typeof n=="object"&&"path"in n&&e.add(u.settings.canonicalizePropertiesWithDataview?zt(s):s),Array.isArray(n)))for(let o of n)o&&typeof o=="object"&&"path"in o&&e.add(u.settings.canonicalizePropertiesWithDataview?zt(s):s)}else for(let i of u.app.vault.getFiles()){let s=u.app.metadataCache.getCache(i.path)?.frontmatterLinks;if(!s)continue;let n=s.map(o=>o.key.split(".")[0]).filter(o=>!u.settings.imageProperties.contains(o)&&!ei[ne].includes(o));e=new Set([...e,...n])}return[...e].sort()}};var x9=require("obsidian");var a9=class extends ji{constructor(e){super(e,"folders",pe,m("features.ids.folders"),m("features.folders"),"folder",m("features.foldersDesc"),!0)}addBody(){super.addBody(),this.addShowFullPath()}addShowFullPath(){this.elementsBody.push(new x9.Setting(this.settingTab.containerEl).setName(m("features.folderShowFullPath")).setDesc(m("features.folderShowFullPathDesc")).addToggle(e=>{e.setValue(u.settings.folderShowFullPath).onChange(async t=>{u.settings.folderShowFullPath=t,await u.plugin.saveSettings()})}).settingEl)}isValueValid(e){return!!this.settingTab.app.vault.getFolderByPath(e)}getPlaceholder(){return"folder/path"}getAllTypes(){let e=new Set,t=this.settingTab.app.vault.getAllFolders(!0);for(let i of t)i.children.filter(n=>n instanceof x9.TFile).length>0&&e.add(i.path);return[...e].sort()}};var Cm=require("obsidian");var As=class extends Cm.Setting{constructor(e,t,i){super(e),this.settingTab=t,this.setName(m("features.interactives.palette")),this.controlEl.addClass("color-palette"),this.canvasPalette=this.controlEl.createEl("canvas"),this.canvasPalette.id=`canvas-palette-${i}`,this.canvasPalette.width=100,this.canvasPalette.height=20,this.addExtraButton(s=>{s.setIcon("pipette"),s.onClick(()=>{let n=new D9;n.onSelected(this.onSelectedFromModal.bind(this)),n.open()})}),this.addDropdown(s=>{this.dropdown=s;for(let[n,o]of Object.entries(vh)){let a=s.selectEl.createEl("optgroup");a.label=n;for(let l of o){let c=a.createEl("option");c.value=l,c.text=l;let h=a.createEl("option");h.value=l+"_r",h.text=l+"_r"}}this.populateCustomOptions(),s.onChange(async n=>{n!==""&&(Na(this.canvasPalette,n,u.settings),this.onPaletteChanged&&this.onPaletteChanged(n))})})}populateCustomOptions(){let e=this.dropdown.selectEl.querySelector(".custom-optgroup")??this.dropdown.selectEl.createEl("optgroup",{cls:"custom-optgroup"});e.label=m("plugin.custom"),e.replaceChildren();for(let t in u.settings.customColorMaps){let i=e.createEl("option");i.value="custom:"+t,i.text=t}}onSelectedFromModal(e){e!==""&&(Na(this.canvasPalette,e,u.settings),this.onPaletteChanged&&this.onPaletteChanged(e),this.dropdown.setValue(e))}setValue(e){Na(this.canvasPalette,e,u.settings),this.dropdown.setValue(e)}onPaletteChange(e){this.onPaletteChanged=e}};var wm=require("obsidian");var Hi=class extends wm.Setting{constructor(e,t,i,s){super(e),t!==""&&this.setName(t),i!==""&&this.setDesc(i),this.addToggle(n=>{n.toggleEl.insertAdjacentText("beforebegin",pu.graph),n.setValue(u.settings.enableFeatures.graph[s]),n.onChange(o=>{u.settings.enableFeatures.graph[s]=o,u.plugin.saveSettings()})}).addToggle(n=>{n.toggleEl.insertAdjacentText("beforebegin",pu.localgraph),n.setValue(u.settings.enableFeatures.localgraph[s]),n.onChange(o=>{u.settings.enableFeatures.localgraph[s]=o,u.plugin.saveSettings()})})}};var Tm=require("obsidian");var $r=class extends Tm.AbstractInputSuggest{constructor(e){super(u.app,e)}getSuggestions(e){return this.getStringSuggestions(e).sort((t,i)=>Ri(t,i)).map(t=>{let i=new RegExp(e,"i").exec(t),s=createDiv();return i&&i[0].length>0?(i.index>0&&s.appendText(t.substring(0,i.index)),s.createEl("strong",{cls:"suggestion-highlight"},n=>n.setText(i[0])),i.index+i[0].length<t.length&&s.appendText(t.substring(i.index+i[0].length))):s.setText(t),s})}renderSuggestion(e,t){for(let i of Array.from(e.childNodes))t.appendChild(i.cloneNode(!0))}};var f9=class extends $r{constructor(e,t){super(e),this.callback=t}getStringSuggestions(e){let i=[...u.app.customCss.enabledSnippets].filter(s=>new RegExp(e,"i").exec(s));return[...new Set(i)]}selectSuggestion(e,t){this.setValue(e.innerText),this.callback(e.innerText),this.close()}};var _m=require("obsidian");var b9=class extends _m.AbstractInputSuggest{constructor(e,t,i,s){super(u.app,e),this.instances=t,this.set=i,this.callback=s}getSuggestions(e){switch(this.set){case"nodes":return[...this.instances.nodesSet.extendedElementsMap.keys()].filter(i=>new RegExp(e,"i").exec(i));case"pinned":return[...this.instances.nodesSet.extendedElementsMap.values()].reduce((i,s)=>(s.isPinned&&new RegExp(e,"i").exec(s.id)&&i.push(s.id),i),[]);case"folders":if(!this.instances.foldersSet)return[];let t=this.instances.foldersSet.managers.get(pe);return t?t.getTypesWithoutNone().filter(i=>new RegExp(e,"i").exec(i)):[]}}renderSuggestion(e,t){t.textContent=e}selectSuggestion(e,t){this.setValue(e),this.callback(e),this.close()}};var h9=class extends $r{constructor(t,i){super(t);this.files=[];this.callback=i,this.files=u.app.vault.getAllLoadedFiles()}getStringSuggestions(t){return this.files.reduce((i,s)=>(new RegExp(t,"i").exec(s.path)&&i.push(s.path),i),[])}selectSuggestion(t,i){this.setValue(t.innerText),this.callback(t.innerText),this.close()}};var E9=class extends $r{constructor(t,i){super(t);this.folders=[];this.callback=i,this.folders=u.app.vault.getAllFolders()}getStringSuggestions(t){return this.folders.reduce((i,s)=>(new RegExp(t,"i").exec(s.path)&&i.push(s.path),i),[])}selectSuggestion(t,i){this.setValue(t.innerText),this.callback(t.innerText),this.close()}};var sl=class extends $r{constructor(e,t,i){super(e),this.settings=t,this.callback=i}getStringSuggestions(e){if(!this.key)return[];let t=[];switch(this.key){case"tag":t=Za.getAllTypes();break;case"property":if(!this.propertyKey)return[];let s=il.getAllTypes(this.propertyKey);if(s)t=s;else{let n=u.app.vault.getMarkdownFiles();for(let o of n)t=t.concat([...ct(this.propertyKey,o,this.settings)])}break;case"link":t=Qa.getAllTypes();break;case"folder":case"folderRec":t=u.app.vault.getAllFolders().map(n=>n.path);break;case"file":t=u.app.vault.getFiles().map(n=>n.basename);break;case"path":t=u.app.vault.getFiles().map(n=>n.path);break;default:break}let i=t.filter(s=>new RegExp(e,"i").exec(s));return[...new Set(i)]}setKey(e,t){this.key=e,this.propertyKey=t}selectSuggestion(e,t){this.setValue(e.innerText),this.callback(e.innerText),this.close()}};var m9=class extends sl{renderSuggestion(e,t){super.renderSuggestion(e,t);let i=t.textContent??"",s=[];this.key&&this.key!=="property"?s=u.settings.interactiveSettings[this.key].colors.map(n=>n.type):this.key==="property"&&this.propertyKey&&(s=u.settings.interactiveSettings[this.propertyKey].colors.map(n=>n.type)),i!==this.typeToInclude&&s.contains(i)&&t.addClass("extended-graph-duplicate")}};var Fm=require("obsidian");var S9=class extends Fm.AbstractInputSuggest{constructor(e,t,i){super(u.app,e),this.renderer=t,this.callback=i}getSuggestions(e){return this.renderer.nodes.filter(t=>new RegExp(e,"i").exec(t.id)).map(t=>t.id)}renderSuggestion(e,t){t.textContent=e}selectSuggestion(e,t){this.setValue(e),this.callback(e),this.close()}};var tl=class extends $r{constructor(e,t){super(e),this.callback=t}getStringSuggestions(e){let i=t1(u.settings).filter(s=>new RegExp(e,"i").exec(s));return[...new Set(i)]}selectSuggestion(e,t){this.setValue(e.innerText),this.callback(e.innerText),this.close()}};var C9=class extends tl{getStringSuggestions(e){return super.getStringSuggestions(e).filter(i=>!(i in u.settings.additionalProperties))}};var Am=require("obsidian"),w9=class{constructor(e){this.fontSize=20;this.renderer=e,this.backgroundColor=$e.backgroundColor,this.backgroundColorHex=h0(this.backgroundColor)}createSVG(){this.svg=document.createElementNS("http://www.w3.org/2000/svg","svg"),this.options.showFolders&&(this.groupFolders=Qe("g",{id:"folders"}),this.addFolders(),this.svg.appendChild(this.groupFolders)),this.groupLinks=Qe("g",{id:"links"}),this.addLinks(),this.svg.appendChild(this.groupLinks),this.groupNodes=Qe("g",{id:"nodes"}),this.addNodes(),this.svg.appendChild(this.groupNodes),this.options.showNodeNames&&(this.groupText=Qe("g",{id:"texts"}),this.addNodeNames(),this.svg.appendChild(this.groupText));let{xMin:e,xMax:t,yMin:i,yMax:s}=this.getViewBox();this.svg.setAttribute("viewBox",`${e} ${i} ${t-e} ${s-i}`);let n=t-e,o=s-i;this.svg.prepend(Qe("rect",{width:n*1.1,height:o*1.1,x:e-n*.05,y:i-o*.05,fill:this.backgroundColorHex}));let a=this.getDefs();a&&this.svg.prepend(a)}getDefs(){}addNodes(){let e=this.getVisibleNodes();for(let t of e){let i=this.getSVGForNode(t);i&&this.groupNodes.appendChild(i)}}addLinks(){let e=this.getVisibleLinks();for(let t of e){let i=this.getSVGForLink(t);i&&this.groupLinks.appendChild(i)}}addNodeNames(){if(!this.groupText)return;let e=this.getVisibleNodes();for(let t of e){let i=this.getSVGForText(t);i&&this.groupText.appendChild(i)}}addFolders(){}isNodeInVisibleArea(e){if(!this.options.onlyVisibleArea)return!0;let t=structuredClone(this.renderer.viewport),i=e.getSize();return e.x+i>=t.left&&e.x-i<=t.right&&e.y+i>=t.top&&e.y-i<=t.bottom}isLinkInVisibleArea(e){return this.options.onlyVisibleArea?this.isNodeInVisibleArea(e.source)&&this.isNodeInVisibleArea(e.target):!0}getSVGForText(e){if(!this.options.showNodeNames)return null;let t=this.getCoreNode(e),i=Qe("text",{class:"node-name",id:"text:"+e.id,x:t.x,y:t.y+t.getSize()+this.fontSize+4,style:`font-size: ${this.fontSize}px; fill: ${t.text?.style.fill??cn(this.backgroundColor)};`,"text-anchor":"middle"});return i.textContent=this.getText(t),i}getText(e){return e.getDisplayText()}getViewBox(){document.body.appendChild(this.svg);let{xMin:e,xMax:t,yMin:i,yMax:s}=Array.from(this.svg.children).reduce((n,o)=>{let{x:a,y:l,width:c,height:h}=o.getBBox();return(!n.xMin||a<n.xMin)&&(n.xMin=a),(!n.xMax||a+c>n.xMax)&&(n.xMax=a+c),(!n.yMin||l<n.yMin)&&(n.yMin=l),(!n.yMax||l+h>n.yMax)&&(n.yMax=l+h),n},{});return document.body.removeChild(this.svg),{xMin:e,xMax:t,yMin:i,yMax:s}}getCoreNode(e){return"coreElement"in e?e.coreElement:e}async toClipboard(){try{let e=this.getModal();e.onClose=async function(){if(e.isCanceled)return;this.options=u.settings.exportSVGOptions,this.createSVG();let t=this.toString();if(this.options.asImage){let i=new Blob([t],{type:"image/svg+xml"});await navigator.clipboard.write([new ClipboardItem({"image/svg+xml":i})])}else await navigator.clipboard.writeText(t);new Am.Notice(m("notices.svgCopied"))}.bind(this),e.open()}catch(e){console.error(e.name,e.message)}}toString(){return new XMLSerializer().serializeToString(this.svg)}},Hu=class extends w9{constructor(e){super(e.renderer),this.instances=e}getDefs(){if(this.options.useModifiedNames&&this.instances.settings.addBackgroundToName){let e=Qe("defs"),t=Qe("filter",{x:"0",y:"0",width:"1",height:"1",id:"textBackground"}),i=Qe("feFlood",{"flood-color":this.backgroundColorHex,result:"bg"}),s=Qe("feMerge"),n=Qe("feMergeNode",{in:"bg"}),o=Qe("feMergeNode",{in:"SourceGraphic"});return s.appendChild(n),s.appendChild(o),t.appendChild(i),t.appendChild(s),e.appendChild(t),e}}getText(e){return this.options.useModifiedNames&&e.text?e.text.text:super.getText(e)}getSVGForText(e){let t=super.getSVGForText(e),i=e.coreElement.text,s=e.coreElement.getSize();if(t&&this.options.useModifiedNames){if(this.instances.settings.addBackgroundToName&&t.setAttribute("filter","url(#textBackground)"),i){let n=typeof i.style.fontFamily=="string"?i.style.fontFamily.split(",")[0].trim():i.style.fontFamily[0].split(",")[0].trim();t.style.setProperty("font-family",n)}if(this.instances.settings.nameVerticalOffset!==0&&i){let n=this.instances.settings.nameVerticalOffset,o=parseInt(t.getAttribute("y")??e.coreElement.y.toString());if(n<-5&&n>-105){let a=-5+(5+n)*s/50;o=o+a}else if(n<=-105){let a=100+n+-2*s;o=o+a}else o=o+n;t.setAttribute("y",(o-this.fontSize*1.5).toString())}}return t}addFolders(){if(!this.groupFolders||!this.instances.foldersSet?.managers.get(pe))return;let i=this.getVisibleFolders();for(let s of i){let n=this.getSVGForFolder(s);this.groupFolders.appendChild(n)}}getSVGForNode(e){let t=Qe("g",{class:"node-group",id:"node:"+e.id}),i=this.getSVGForNodeShape(e);if(t.appendChild(i),this.options.showArcs){let s=this.getSVGForArcs(e);s&&t.appendChild(s)}return t}getSVGForNodeShape(e){let t=e.coreElement,i=t.getSize();if(e.icon?.svg&&this.options.showIcons){let s=e.icon.svg;s.style.stroke=h0(t.getFillColor().rgb),s.style.fill=this.backgroundColorHex;let n=Qe("g",{class:"node-shape",transform:`translate(${t.x-i} ${t.y-i}) scale(${i/s.width.baseVal.value*2})`});return n.appendChild(s),n}else if(e.icon?.emoji&&this.options.showIcons){let s=i*2,n=Qe("text",{class:"node-name",id:"text:"+t.id,x:e.coreElement.x,y:e.coreElement.y+s*.5,style:`font-size: ${s}px;`,"text-anchor":"middle"});return n.textContent=e.icon.emoji,n}else if(this.options.useNodesShapes&&e.graphicsWrapper){let s=Qe("g",{class:"node-shape",transform:`translate(${t.x-i} ${t.y-i}) scale(${i/We.RADIUS})`,fill:h0(t.getFillColor().rgb)}),n=We.getInnerSVG(e.graphicsWrapper?.shape);return s.appendChild(n),s}else return Qe("circle",{class:"node-shape",cx:t.x,cy:t.y,r:i,fill:h0(t.getFillColor().rgb)})}getSVGForArcs(e){let t=e.coreElement;if(t.type==="tag")return null;let i=t.getSize(),s=t.x,n=t.y,o=Qe("g",{class:"arcs"});for(let[a,l]of e.managers){let c=e.graphicsWrapper?.managerGraphicsMap?.get(a);if(!c)continue;let h=Qe("g",{class:"arcs-circle"});for(let[d,p]of c.graphics){let g=p.graphic.alpha,v=c.radius/We.RADIUS*i,C=c.thickness/We.RADIUS*i,w=j8(s,n,v,p.endAngle),k=j8(s,n,v,p.startAngle);if(w.x===k.x&&w.y===k.y){let B=Qe("circle",{class:"arc arc-"+d,cx:t.x,cy:t.y,r:v,opacity:g,"stroke-width":C,stroke:h0(p.color),fill:"none"});h.appendChild(B)}else{let B=p.endAngle-p.startAngle<=Math.PI?"0":"1",L=`M ${w.x} ${w.y} A ${v} ${v} 0 ${B} 0 ${k.x} ${k.y}`,T=Qe("path",{class:"arc arc-"+d,d:L,opacity:g,"stroke-width":C,stroke:h0(p.color),fill:"none"});h.appendChild(T)}}o.appendChild(h)}return o}getSVGForFolder(e){let t=e.BBox,i=Qe("g",{class:"folder-group",id:"folder:"+e.path}),s=Qe("rect",{class:"folder-box",x:t.left,y:t.top,height:t.bottom-t.top,width:t.right-t.left,rx:e.folderStyle.radius,fill:h0(e.color),stroke:h0(e.color),"stroke-width":e.folderStyle.borderWidth,"fill-opacity":e.folderStyle.fillOpacity,"stroke-opacity":e.folderStyle.strokeOpacity}),n=14,o=Qe("text",{class:"folder-name",x:(t.left+t.right)/2,y:t.top+n+2,fill:h0(e.color),"text-anchor":"middle",style:`font-size: ${n}px;`});return o.textContent=e.path,i.appendChild(s),i.appendChild(o),i}getSVGForLink(e){let t=e.coreElement,i;if(this.options.useCurvedLinks){let c={x:t.source.x,y:t.source.y},h={x:t.target.x,y:t.target.y},d={x:-(h.y-c.y),y:h.x-c.x},p={x:(h.x+c.x)*.5,y:(h.y+c.y)*.5},g={x:p.x+.25*d.x,y:p.y+.25*d.y};i=`M ${c.x} ${c.y} C ${g.x} ${g.y}, ${h.x} ${h.y}, ${h.x} ${h.y}`}else i=`M ${t.source.x} ${t.source.y} L ${t.target.x} ${t.target.y}`;let s=e.graphicsWrapper?e.graphicsWrapper.pixiElement.color:t.line?Pi(t.line.tint):0,n=this.instances.renderer.fLineSizeMult*2,o=e.graphicsWrapper?e.graphicsWrapper.pixiElement.alpha:t.line?t.line.alpha:.6,a=Qe("path",{class:"link",id:"link:"+Wt(t),d:i,stroke:h0(s),"stroke-width":n,opacity:o,fill:"none"}),l;if(this.instances.renderer.fShowArrow){let h=this.options.useModifiedArrows&&this.instances.settings.flatArrows?"M 1 0 L -3 -2 L -3 2 Z":"M 1 0 L -3 -2 L -2 0 L -3 2 Z",d=this.options.useCurvedLinks?e.graphicsWrapper?.pixiElement.arrow:e.coreElement.arrow;d&&(l=Qe("path",{id:`arrow:${e.id}`,d:h,fill:h0(s),transform:`translate(${d.x}, ${d.y}) rotate(${d.rotation*180/Math.PI}) scale(${this.instances.engine.renderer.fLineSizeMult*2})`}))}if(l){let c=Qe("g");return c.appendChild(a),c.appendChild(l),c}return a}getVisibleNodes(){return this.instances.renderer.nodes.reduce((e,t)=>{if(t.rendered&&this.isNodeInVisibleArea(t)){let i=this.instances.nodesSet.extendedElementsMap.get(t.id);i&&e.push(i)}return e},[])}getVisibleLinks(){return this.instances.renderer.links.reduce((e,t)=>{if(t.rendered&&this.isLinkInVisibleArea(t)){let i=this.instances.linksSet.extendedElementsMap.get(Wt(t));i&&e.push(i)}return e},[])}getVisibleFolders(){let e=this.getVisibleNodes();return this.instances.foldersSet?[...this.instances.foldersSet.foldersMap.values()].filter(t=>e.some(i=>t.nodes.includes(i.coreElement))):[]}getModal(){return new vu(this.instances)}},ju=class extends w9{constructor(e){super(e.renderer),this.engine=e}getSVGForNode(e){return Qe("circle",{class:"node-shape",id:"node:"+e.id,cx:e.x,cy:e.y,r:e.getSize(),fill:h0(e.getFillColor().rgb)})}getSVGForLink(e){return Qe("path",{class:"link",id:"link:"+Wt(e),d:`M ${e.source.x} ${e.source.y} L ${e.target.x} ${e.target.y}`,stroke:Pf(e.line?.tint??0),"stroke-width":(this.engine.options.lineSizeMultiplier??1)*4,opacity:e.line?.alpha??.6})}getVisibleNodes(){return this.renderer.nodes.filter(e=>e.rendered&&this.isNodeInVisibleArea(e))}getVisibleLinks(){return this.renderer.links.filter(e=>e.rendered&&e.line?.visible&&this.isLinkInVisibleArea(e))}getModal(){return new vu}};var pu={graph:"Global",localgraph:"Local"};var km="extended-graph-delete-button",Im="extended-graph-add-button",Je=class{static setupButton(e,t){switch(t){case"add":e.setClass(Im),e.setIcon("plus"),e.setTooltip(m("controls.add"));break;case"delete":e.setClass(km),e.setIcon("trash-2"),e.setTooltip(m("controls.delete"));break;case"edit":e.setIcon("pencil"),e.setTooltip(m("controls.edit"));break;case"save":e.setIcon("save"),e.setTooltip(m("controls.save"));break;default:break}}static setupExtraButton(e,t){switch(t){case"add":e.extraSettingsEl.addClass(Im),e.setIcon("plus"),e.setTooltip(m("controls.add"));break;case"delete":e.extraSettingsEl.addClass(km),e.setIcon("trash-2"),e.setTooltip(m("controls.delete"));break;case"edit":e.setIcon("pencil"),e.setTooltip(m("controls.edit"));break;case"save":e.setIcon("save"),e.setTooltip(m("controls.save"));break;default:break}}};var T9=require("obsidian"),Bd=class extends T9.Component{constructor(e){super(),this.instances=e,this.root=this.instances.view.contentEl.createDiv(),this.root.addClass("extended-graph-layers"),this.instances.settings.displayLabelsInUI&&this.root.addClass("show-labels"),this.computePosition(),this.onLevelClicked=this.onLevelClicked.bind(this),this.onMouseWheel=this.onMouseWheel.bind(this),this.addToggleButton(),this.addLevels(),this.instances.layersManager?.isEnabled?this.open():this.close()}addToggleButton(){this.toggleButton=new T9.ExtraButtonComponent(this.root),this.toggleButton.setIcon("layers"),this.toggleButton.onClick(()=>{this.instances.layersManager?.isEnabled?this.instances.layersManager.disable():this.instances.layersManager?.enable()})}addLevels(){this.levelsArea=this.root.createDiv("layers"),this.levelsArea.addEventListener("wheel",this.onMouseWheel,{passive:!0})}updateLevels(e){this.levelsArea.innerHTML="";for(let t of e){let i=this.levelsArea.createDiv("layer"),s=i.createDiv("layer-level");if(s.innerText=t.level.toString(),s.addEventListener("click",this.onLevelClicked),this.instances.settings.displayLabelsInUI){let n=i.createDiv("layer-labels");for(let o of t.layers)o.label&&n.createDiv({text:o.label})}}}updateCurrentLevelUI(e){this.activeLayersBorder||(this.activeLayersBorder=this.root.createDiv("active-layers-border"));for(let o of Array.from(this.levelsArea.children))o.removeClass("current");let t=this.levelsArea.children[e],i=this.levelsArea.children[Math.min(this.levelsArea.children.length-1,e+this.instances.settings.numberOfActiveLayers-1)],s=t.getBoundingClientRect().top-this.root.getBoundingClientRect().top,n=this.root.getBoundingClientRect().bottom-i.getBoundingClientRect().bottom;this.activeLayersBorder.style.setProperty("top",s.toString()+"px"),this.activeLayersBorder.style.setProperty("bottom",n.toString()+"px"),t.addClass("current")}onMouseWheel(e){e.deltaY<0?this.instances.layersManager?.decreaseCurrentLevel():this.instances.layersManager?.increaseCurrentLevel()}onLevelClicked(e){e.targetNode?.textContent&&this.instances.layersManager?.setCurrentLevel(parseInt(e.targetNode.textContent))}computePosition(){this.setHeight=this.setHeight.bind(this);let e=this.root.doc.querySelector(".status-bar");e&&(this.statusBarResizeObserver=new ResizeObserver(t=>{for(let i of t)this.setHeight()}),this.statusBarResizeObserver.observe(e)),this.instances.renderer.iframeEl.addEventListener("load",this.setHeight),this.setHeight()}setHeight(){let t=this.root.doc.querySelector(".status-bar")?.getBoundingClientRect().top,i=this.instances.view.containerEl.getBoundingClientRect().bottom,s=t?Math.max(0,i-t)+12:12;this.root.style.setProperty("bottom",s+"px")}open(){this.root.removeClass("is-closed"),this.toggleButton.extraSettingsEl.addClass("is-active"),this.levelsArea.show(),this.activeLayersBorder?.show()}close(){this.root.addClass("is-closed"),this.toggleButton.extraSettingsEl.removeClass("is-active"),this.levelsArea.hide(),this.activeLayersBorder?.hide()}onunload(){this.root.detach(),this.statusBarResizeObserver?.disconnect(),this.instances.renderer.iframeEl.removeEventListener("load",this.setHeight)}};var k0=require("obsidian");var $8=class extends k0.Setting{constructor(t,i,s){super(s);this.isVisible=!0;this.isCollapsed=!1;this.name=t,this.manager=i,this.cssBGColorVariable="--legend-color-rgb",this.cssTextColorVariable="--legend-text-color",this.setName(this.name).setTooltip(this.name).addExtraButton(o=>{this.disableAllButton=o,o.setIcon("x").setTooltip(m("controls.disableAll")+": "+this.name).onClick(()=>{this.disableAll()})}).addExtraButton(o=>{this.enableAllButton=o,o.setIcon("check-check").setTooltip(m("controls.enableAll")+": "+this.name).onClick(()=>{this.enableAll()}).then(a=>{this.enableAllButton.extraSettingsEl.remove()})}).then(o=>{let a=createDiv("and-or-group");this.andButton=new k0.ButtonComponent(a).setButtonText(m("query.AND")).setTooltip(m("query.ANDFilterDesc")).onClick(()=>this.changeCombinationLogic("AND")),this.orButton=new k0.ButtonComponent(a).setButtonText(m("query.OR")).setTooltip(m("query.ORFilterDesc")).onClick(()=>this.changeCombinationLogic("OR")),Bn.getLogicType(this.manager.instances,this.name)==="AND"?this.andButton.setCta():this.orButton.setCta(),this.controlEl.insertAdjacentElement("afterbegin",a)}).setClass(`${this.getClassName(t)}s-row`),this.nameEl.addClass("mod-clickable"),this.nameEl.onclick=()=>{this.toggleCollapse()};let n=this.nameEl.createSpan();(0,k0.setIcon)(n,"chevron-down")}getClassName(t){return"graph-legend-"+c9(t)}changeCombinationLogic(t){if(this.logic===t)return;let i=this.manager.instances.stateData;i&&(i.logicTypes||(i.logicTypes={}),i.logicTypes[this.name]=t,this.manager.instances.engine.render(),this.manager.instances.interactiveEventsDispatcher.onInteractivesLogicChanged(this.name),u.statesManager.onStateNeedsSaving(i,!1)),this.changeCombinationLogicUI(t)}changeCombinationLogicUI(t){this.logic=t,t==="AND"?(this.andButton.setCta(),this.orButton.removeCta()):(this.orButton.setCta(),this.andButton.removeCta())}addLegend(t,i){if(this.controlEl.getElementsByClassName(this.getClassName(t))[0])return;this.addButton(a=>{a.setClass(this.getClassName(t)).setTooltip(t).setClass("graph-legend").setButtonText(t).onClick(()=>{this.toggle(t)}).then(l=>{l.buttonEl.style.setProperty(this.cssBGColorVariable,$e.getCSSSplitRGB(i)),l.buttonEl.style.setProperty(this.cssTextColorVariable,cn(i)),t===this.manager.instances.settings.interactiveSettings[this.name].noneType&&l.buttonEl.addClass("graph-legend-none")})});let n=function(a,l){return Ri(l.className.replace("graph-legend",""),a.className.replace("graph-legend",""))},o=Array.from(this.controlEl.getElementsByClassName("graph-legend")).sort(n);for(let a=o.length-1;a>=0;a--)this.controlEl.appendChild(o[a])}updateLegend(t,i){let s=this.controlEl.getElementsByClassName(this.getClassName(t))[0];s?(s.style.setProperty(this.cssBGColorVariable,$e.getCSSSplitRGB(i)),s.style.setProperty(this.cssTextColorVariable,cn(i))):this.addLegend(t,i)}removeLegend(t){t.forEach(i=>{let s=this.controlEl.getElementsByClassName(this.getClassName(i))[0];s?.parentNode?.removeChild(s)})}toggle(t){let i=this.manager.interactives.get(t);i&&(i.isActive?(this.disableUI(t),this.manager.disable([t]),!this.manager.getTypes().some(n=>this.manager.isActive(n))&&(this.disableAllButton.extraSettingsEl.insertAdjacentElement("afterend",this.enableAllButton.extraSettingsEl),this.disableAllButton.extraSettingsEl.remove())):(this.enableUI(t),this.manager.enable([t]),!this.manager.getTypes().some(n=>!this.manager.isActive(n))&&(this.enableAllButton.extraSettingsEl.insertAdjacentElement("afterend",this.disableAllButton.extraSettingsEl),this.enableAllButton.extraSettingsEl.remove())))}disableUI(t){let i=this.controlEl.getElementsByClassName(this.getClassName(t))[0];i&&i.addClass("is-hidden")}enableUI(t){let i=this.controlEl.getElementsByClassName(this.getClassName(t))[0];i&&i.removeClass("is-hidden")}disableAll(){for(let t of this.manager.getTypes())this.disableUI(t);this.manager.disable(this.manager.getTypes()),this.disableAllButton.extraSettingsEl.insertAdjacentElement("afterend",this.enableAllButton.extraSettingsEl),this.disableAllButton.extraSettingsEl.remove()}enableAll(){for(let t of this.manager.getTypes())this.enableUI(t);this.manager.enable(this.manager.getTypes()),this.enableAllButton.extraSettingsEl.insertAdjacentElement("afterend",this.disableAllButton.extraSettingsEl),this.enableAllButton.extraSettingsEl.remove()}toggleVisibility(){this.isVisible?this.hide():this.show()}show(){this.settingEl.removeClass("is-hidden"),this.isVisible=!0}hide(){this.settingEl.addClass("is-hidden"),this.isVisible=!1}toggleCollapse(){this.isCollapsed?this.expend():this.collapse();let t=u.statesManager.getStateDataById(this.manager.instances.settings.startingStateID);t&&(this.isCollapsed?(t.collapsedLegendRows||(t.collapsedLegendRows=[]),t.collapsedLegendRows?.push(this.name)):t.collapsedLegendRows?.remove(this.name)),t&&u.statesManager.onStateNeedsSaving(t,!1)}collapse(){this.settingEl.addClass("is-collapsed"),this.isCollapsed=!0}expend(){this.settingEl.removeClass("is-collapsed"),this.isCollapsed=!1}},Rd=class extends k0.Component{constructor(e){super(),this.instances=e,this.createToggleButton(),this.createRootPanel()}createToggleButton(){let e=this.instances.view.contentEl.querySelector(".graph-controls");this.toggleButton=new k0.ExtraButtonComponent(e).setTooltip(m("controls.openLegend")).setIcon("tags").onClick(()=>{this.isOpen?this.close():this.open()}).then(t=>{t.extraSettingsEl.addClasses(["graph-controls-button","mod-legend"])})}createRootPanel(){this.legendRows=new Map,this.root=this.instances.view.contentEl.createDiv("graph-legend-container"),this.instances.settings.horizontalLegend&&this.root.addClass("horizontal-layout"),this.rowsDiv=this.root.createDiv("graph-legend-rows");let e=createDiv("graph-legend-hide-rows-container"),t=u.statesManager.getStateDataById(this.instances.settings.startingStateID);for(let[i,s]of this.instances.interactiveManagers){if(i===pe)continue;let n=new $8(i,s,this.rowsDiv),o=createSpan();(0,k0.setIcon)(o,"eye");let a=new k0.ButtonComponent(e),l={row:n,visibilityButton:{cb:a,eyeIcon:o}};this.legendRows.set(i,l),a.setButtonText(i).setTooltip(m("controls.hideRow")+": "+i,{placement:"top"}).onClick(()=>{this.toggleVisibility(l,t)}).then(c=>{l.visibilityButton={cb:c,eyeIcon:o},c.buttonEl.prepend(o)}),t?.hiddenLegendRows?.contains(i)&&l.row.hide(),t?.collapsedLegendRows?.contains(i)&&l.row.collapse()}this.root.appendChild(e),u.settings.collapseLegend?this.close():this.open()}toggleVisibility(e,t){e.row.toggleVisibility(),e.visibilityButton.cb.buttonEl.toggleClass("is-inactive",!e.row.isVisible),(0,k0.setIcon)(e.visibilityButton.eyeIcon,e.row.isVisible?"eye":"eye-off"),t&&(e.row.isVisible?t.hiddenLegendRows?.remove(e.row.name):(t.hiddenLegendRows||(t.hiddenLegendRows=[]),t.hiddenLegendRows?.push(e.row.name)),u.statesManager.onStateNeedsSaving(t,!1))}onunload(){this.root.remove(),this.toggleButton.extraSettingsEl.remove()}update(e,t,i){this.legendRows.get(e)?.row.updateLegend(t,i)}add(e,t,i){this.legendRows.get(e)?.row.addLegend(t,i)}remove(e,t){this.legendRows.get(e)?.row.removeLegend(t)}toggle(e,t){this.legendRows.get(e)?.row.toggle(t)}disableUI(e,t){this.legendRows.get(e)?.row.disableUI(t)}enableUI(e,t){this.legendRows.get(e)?.row.enableUI(t)}enableAllUI(e){this.legendRows.get(e)?.row.manager.getTypes().forEach(t=>{this.legendRows.get(e)?.row.enableUI(t)})}disableAllUI(e){this.legendRows.get(e)?.row.manager.getTypes().forEach(t=>{this.legendRows.get(e)?.row.disableUI(t)})}updateUIFromState(){if(this.instances.stateData){if(this.instances.stateData.hiddenLegendRows)for(let[e,t]of this.legendRows)this.instances.stateData.hiddenLegendRows.includes(e)?(t.row.hide(),t.visibilityButton.cb.buttonEl.addClass("is-inactive"),(0,k0.setIcon)(t.visibilityButton.eyeIcon,"eye-off")):(t.row.show(),t.visibilityButton.cb.buttonEl.removeClass("is-inactive"),(0,k0.setIcon)(t.visibilityButton.eyeIcon,"eye"));if(this.instances.stateData.collapsedLegendRows)for(let[e,t]of this.legendRows)this.instances.stateData.collapsedLegendRows.includes(e)?t.row.collapse():t.row.expend();for(let[e,t]of this.legendRows)t.row.changeCombinationLogicUI(Bn.getLogicType(this.instances,e))}}open(){this.root.removeClass("is-closed"),this.toggleButton.extraSettingsEl.addClass("is-active"),this.isOpen=!0,u.settings.collapseLegend=!1,u.plugin.saveSettings()}close(){this.root.addClass("is-closed"),this.toggleButton.extraSettingsEl.removeClass("is-active"),this.isOpen=!1,u.settings.collapseLegend=!0,u.plugin.saveSettings()}};var Do=require("obsidian");var $u=class extends Do.Component{constructor(e){super(),this.view=e,this.graphControlsEl=this.view.contentEl.querySelector(".graph-controls"),this.graphControlsEl.addClass("graph-controls-extended-graph"),this.graphControlsEl.createEl("hr").addClass("separator-exended-graph"),this.createEnableButton(),this.createResetButton()}createEnableButton(){this.buttonEnable=new Do.ExtraButtonComponent(this.graphControlsEl).setTooltip(`${m("controls.enable")} ${m("plugin.name")}`,{placement:"top"}).onClick(()=>{this.enabled?u.graphsManager.disablePlugin(this.view):u.graphsManager.enablePlugin(this.view)}).then(e=>{(0,Do.setIcon)(e.extraSettingsEl,"git-fork-sparkles"),e.extraSettingsEl.addClasses(["graph-controls-button","mod-extended-graph-toggle"])})}createResetButton(){this.buttonReset=new Do.ExtraButtonComponent(this.graphControlsEl).setTooltip(m("controls.resetGraph")).setIcon("rotate-ccw").onClick(()=>{this.enabled&&u.graphsManager.resetPlugin(this.view)}).then(e=>{e.extraSettingsEl.addClasses(["graph-controls-button","mod-extended-graph-reset"]),e.extraSettingsEl.remove()})}setEnableUIState(){this.enabled=!0,this.buttonEnable.extraSettingsEl.addClass("is-active"),this.buttonEnable.setTooltip(`${m("controls.disable")} ${m("plugin.name")}`,{placement:"top"}),this.graphControlsEl.insertAfter(this.buttonReset.extraSettingsEl,this.buttonEnable.extraSettingsEl)}setDisableUIState(){this.enabled=!1,this.buttonEnable.extraSettingsEl.removeClass("is-active"),this.buttonEnable.setTooltip(`${m("controls.enable")} ${m("plugin.name")}`,{placement:"top"}),this.buttonReset.extraSettingsEl.remove()}enableUI(){this.buttonEnable.setDisabled(!1),this.buttonReset.setDisabled(!1)}disableUI(){this.buttonEnable.setDisabled(!0),this.buttonReset.setDisabled(!0)}};var Lm=require("obsidian");var q8=class r extends Lm.Menu{constructor(t,i,s,n){super();this.radialSubmenus=new Map;this.menuManager=t,this.level=s,this.parentMenu=n??null,this.dom.addClass("extended-graph-radial-menu"),s>0&&(this.dom.addClass("mod-submenu"),this.dom.style.setProperty("--submenu-level",s.toString())),this.setItems(i),this.setCentralItem()}showAtMouseEvent(t){return this.position={x:t.clientX,y:t.clientY},super.showAtMouseEvent(t)}showAtPosition(t,i){this.position=t;let s=super.showAtPosition(t,i);return s.dom.style.left=t.x+"px",s.dom.style.top=t.y+"px",s}onClick(t){t.items&&t.items.length>0?this.showNestedMenu(t):t.onClick&&t.onClick()}onMouseEnter(t,i){let s=t.targetNode,n=createDiv("tooltip extended-graph-tooltip");n.setText(i.title),this.dom.doc.body.appendChild(n);let o=s.getBoundingClientRect();n.style.left=`${o.left+o.width*.5+10}px`,n.style.top=`${t.clientY+10}px`,i.onMouseEnter&&i.onMouseEnter()}onMouseLeave(t,i){this.dom.doc.body.querySelectorAll(".tooltip.extended-graph-tooltip").forEach(s=>s.detach()),i.onMouseLeave&&i.onMouseLeave()}onClickCenter(){this.parentMenu?this.switchWhithMenu(this.parentMenu):this.hide()}setItems(t){let i=this.onClick.bind(this),s=this.onMouseEnter.bind(this),n=this.onMouseLeave.bind(this);for(let o=0;o<t.length;++o){let a=t[o];this.addItem(l=>{let c=cn(this.menuManager.instances.cssBridge.getThemeColor(a.color),"dark","light")==="dark"?"100%":"0%";l.dom.style.setProperty("--dark-text-interp",c),l.dom.style.setProperty("--color-rgb",`var(--color-${a.color}-rgb)`),l.dom.style.setProperty("--rotation",`${-22.5+(o-1)*45}deg`),l.setTitle(a.title.slice(0,Math.min(3,a.title.length)).toUpperCase()).setIcon(a.icon).onClick(()=>{i(a)}),l.dom.addEventListener("mouseenter",d=>s(d,a)),l.dom.addEventListener("mouseleave",d=>n(d,a));let h=a.items;h&&h.length>0&&this.radialSubmenus.set(a.id,new r(this.menuManager,h,this.level+1,this))})}this.onMenuClick=function(o){var a=o.targetNode;a&&a.instanceOf(Element)&&(a.matchParent(".menu-item")||a.hasClass(".menu-item"))||this.hide()}}setCentralItem(){let t=this.onClickCenter.bind(this);this.addItem(i=>{i.dom.addClass("back"),this.level>0?i.setIcon("undo-2"):i.setIcon("x"),i.onClick(t)})}showNestedMenu(t){let i=this.radialSubmenus.get(t.id);i&&this.switchWhithMenu(i)}switchWhithMenu(t){this.position||(this.position=this.dom.getBoundingClientRect());let i=this.parentMenu;this.close(),this.parentMenu=i,this.menuManager.setCurrentMenu(t),t.showAtPosition({x:this.position.x,y:this.position.y})}close(){this.dom.doc.body.querySelectorAll(".tooltip.extended-graph-tooltip").forEach(t=>t.detach()),super.close()}},Ud=class{constructor(e,t,i){this.instances=e,this.nodeID=t,this.nodeType=i,this.populateItems(),this.menu=new q8(this,this.allItems,0)}open(e){let t=this.instances.renderer.nodes.find(i=>i.id===this.nodeID);if(t?.circle){let i=this.instances.renderer.interactiveEl.getBoundingClientRect(),s=t.circle.getGlobalPosition();this.menu.showAtPosition({x:s.x/window.devicePixelRatio+i.left,y:s.y/window.devicePixelRatio+i.top});return}else e&&this.menu.showAtPosition({x:e.clientX,y:e.clientY})}populateItems(){if(this.allItems=[{id:"info",title:"Info",icon:"info",color:"blue",onClick:this.onShowInfo.bind(this)},{id:"pin",title:"Pin",icon:this.instances.nodesSet.isNodePinned(this.nodeID)?"pin-off":"pin",color:"red",onClick:this.onPin.bind(this)}],this.instances.settings.enableFeatures[this.instances.type].links&&(this.getInteractivesTypes(ne)?.size??0)>0&&this.allItems.push({id:"links",title:"Links",icon:"link",color:"orange",onMouseEnter:()=>this.onShowInteractive(ne),onMouseLeave:this.clearInteractivesList.bind(this)}),this.instances.settings.enableFeatures[this.instances.type].folders&&(this.getInteractivesTypes(pe)?.size??0)>0&&this.allItems.push({id:"folders",title:"Folders",icon:"folder",color:"green",onMouseEnter:()=>this.onShowInteractive(pe),onMouseLeave:this.clearInteractivesList.bind(this)}),(this.nodeType===""||this.nodeType==="focused")&&(this.instances.settings.enableFeatures[this.instances.type].tags&&(this.getInteractivesTypes(He)?.size??0)>0&&this.allItems.push({id:"tags",title:"Tags",icon:"tags",color:"pink",onMouseEnter:()=>this.onShowInteractive(He),onMouseLeave:this.clearInteractivesList.bind(this)}),this.instances.settings.enableFeatures[this.instances.type].properties)){let e={id:"properties",title:"Properties",icon:"archive",color:"purple",items:[]},t=["red","orange","yellow","green","cyan","blue","purple","pink"],i=0;for(let[s,n]of Object.entries(this.instances.settings.additionalProperties))if(n[this.instances.type]&&(this.getInteractivesTypes(s)?.size??0)>0){let o={id:s,title:s,icon:"",color:t[i%t.length],items:[],onMouseEnter:()=>this.onShowInteractive(s),onMouseLeave:this.clearInteractivesList.bind(this)};e.items?.push(o),++i}e.items&&e.items.length>0&&this.allItems.push(e)}}setCurrentMenu(e){this.clearInteractivesList(),this.menu=e}onShowInfo(){let e=new Bs(this.instances);e.setTarget("nodes",this.nodeID),e.open()}onPin(){this.instances.nodesSet.isNodePinned(this.nodeID)?this.instances.graphEventsDispatcher.inputsManager.unpinNodeFromId(this.nodeID):this.instances.graphEventsDispatcher.inputsManager.pinNodeFromId(this.nodeID),this.menu.close()}onShowInteractive(e){let t=this.instances.interactiveManagers.get(e);if(!t)return;let i=this.getInteractivesTypes(e);if(!i||i.size===0)return;this.clearInteractivesList();let s=this.menu.dom.createDiv("interactives-list");for(let n of i){let o=t.getColor(n.id??n.text),a=s.createDiv("interactive-item");a.textContent=n.text,a.style.setProperty("--bg-color",$e.getCSSSplitRGB(o)),a.style.setProperty("--text-color",cn(o)),a.toggleClass("is-hidden",!!n.id&&!t.isActive(n.id))}}getInteractivesTypes(e){return e===pe?this.getFoldersInteractivesTypes():e===ne?this.getLinksInteractivesTypes():this.getNodesInteractivesTypes(e)}getNodesInteractivesTypes(e){let t=this.instances.nodesSet.extendedElementsMap.get(this.nodeID);if(!t||!this.instances.nodesSet.managers.get(e))return;let s=[...t.getTypes(e)].reduce((n,o)=>(o!==this.instances.settings.interactiveSettings[e].noneType&&n.push({text:o}),n),[]);return new Set(s)}getFoldersInteractivesTypes(){if(!this.instances.foldersSet||!this.instances.foldersSet.managers.get(pe))return;let i=[...this.instances.foldersSet.foldersMap.values()].filter(s=>s.nodes.find(n=>n.id===this.nodeID)).reduce((s,n)=>(n.path!==this.instances.settings.interactiveSettings[pe].noneType&&s.push({text:n.path}),s),[]);return new Set(i)}getLinksInteractivesTypes(){if(!this.instances.linksSet.managers.get(ne))return;let t=[...this.instances.linksSet.extendedElementsMap.values()].filter(n=>n.coreElement.source.id===this.nodeID||n.coreElement.target.id===this.nodeID),i={};for(let n of t){let o=n.getTypes(ne);for(let a of o)a in i||(i[a]={forward:0,reverse:0}),this.nodeID===n.coreElement.source.id&&i[a].forward++,this.nodeID===n.coreElement.target.id&&i[a].reverse++}let s=Object.entries(i).map(([n,o])=>({text:`${n} (${o.forward} \u2192, ${o.reverse} \u2190)`,id:n}));return new Set(s)}clearInteractivesList(){this.menu.dom.querySelector(".interactives-list")?.detach()}};var nl=require("obsidian");var Od=class extends nl.Component{constructor(e){super(),this.instances=e,this.root=this.instances.view.contentEl.createDiv(),this.root.addClass("graph-states-container");let t=this.instances.view.contentEl.querySelector(".graph-controls");this.toggleButton=new nl.ExtraButtonComponent(t).setTooltip(m("states.openSettings")).setIcon("eye").onClick(()=>{this.isOpen?this.close():this.open()}).then(i=>{i.extraSettingsEl.addClasses(["graph-controls-button","mod-states"])}),this.addStateSetting(),this.currentStateID=this.selectState.getValue(),this.instances.stateData=u.statesManager.getStateDataById(this.currentStateID),u.settings.collapseState?this.close():this.open()}addStateSetting(){this.stateSetting=new nl.Setting(this.root).setName(m("states.states")).addDropdown(e=>{this.selectState=e,e.onChange(t=>{this.currentStateID=t,this.instances.stateData=u.statesManager.getStateDataById(this.currentStateID),this.displaySaveDeleteButton(),this.instances.graphEventsDispatcher.changeState(t)})}).addExtraButton(e=>{this.editButton=e,Je.setupExtraButton(e,"edit"),e.onClick(()=>{this.editButton.extraSettingsEl.blur(),this.openModalToRenameState()})}).addExtraButton(e=>{this.addButton=e,Je.setupExtraButton(e,"add"),e.onClick(()=>{this.addButton.extraSettingsEl.blur(),this.openModalToAddState()})}).addExtraButton(e=>{this.saveButton=e,Je.setupExtraButton(e,"save"),e.onClick(()=>{u.statesManager.saveState(this.instances,this.selectState.getValue())})}).addExtraButton(e=>{this.deleteButton=e,Je.setupExtraButton(e,"delete"),e.onClick(()=>{u.statesManager.deleteState(this.selectState.getValue())})})}onunload(){this.root.remove(),this.toggleButton.extraSettingsEl.remove()}openModalToAddState(){new xu(m("states.newStateName"),this.newState.bind(this)).open()}openModalToRenameState(){let e=this.instances.stateData;e&&new xu(m("states.editStateName"),this.renameState.bind(this),e.name).open()}addOption(e,t){for(let i=0;i<this.selectState.selectEl.length;++i)if(this.selectState.selectEl.options[i].value==e){this.selectState.selectEl.options[i].innerText=t;return}this.selectState.addOption(e,t)}addState(e,t){this.addOption(e,t),this.selectState.setValue(e)}newState(e){if(e.length===0)return!1;let t=u.statesManager.newState(this.instances,e);return this.currentStateID=t,this.instances.stateData=u.statesManager.getStateDataById(this.currentStateID),!0}renameState(e){return e.length===0?!1:(u.statesManager.renameState(this.currentStateID,e),!0)}updateStatesList(){this.clear(),u.settings.states.forEach(e=>{this.addOption(e.id,e.name)}),u.settings.states.find(e=>e.id===this.currentStateID)?this.setValue(this.currentStateID):(this.currentStateID=this.selectState.getValue(),this.instances.stateData=u.statesManager.getStateDataById(this.currentStateID),this.displaySaveDeleteButton())}setValue(e){this.currentStateID=e,this.instances.stateData=u.statesManager.getStateDataById(this.currentStateID),this.selectState.setValue(e),this.displaySaveDeleteButton()}clear(){for(let e=this.selectState.selectEl.length;e>=0;e--)this.selectState.selectEl.remove(e)}displaySaveDeleteButton(){this.selectState.getValue()!==Jr?(this.stateSetting.settingEl.append(this.editButton.extraSettingsEl),this.stateSetting.settingEl.append(this.saveButton.extraSettingsEl),this.stateSetting.settingEl.append(this.deleteButton.extraSettingsEl)):(this.editButton.extraSettingsEl.remove(),this.saveButton.extraSettingsEl.remove(),this.deleteButton.extraSettingsEl.remove())}open(){this.root.removeClass("is-closed"),this.toggleButton.extraSettingsEl.addClass("is-active"),this.isOpen=!0,u.settings.collapseState=!1,u.plugin.saveSettings()}close(){this.root.addClass("is-closed"),this.toggleButton.extraSettingsEl.removeClass("is-active"),this.isOpen=!1,u.settings.collapseState=!0,u.plugin.saveSettings()}};var Mm=require("obsidian");var qu=class extends Mm.Component{constructor(e){super(),this.view=e,this.graphControls=e.contentEl.querySelector(".graph-controls"),this.sectionSettings=new _9(e)}onPluginEnabled(e){this.instances=e,this.sectionSettings.onPluginEnabled(e)}onPluginDisabled(){this.sectionSettings.onPluginDisabled()}};var Du=require("obsidian"),ol=class extends Du.Component{constructor(e,t,i){super(),this.view=e,this.graphControls=e.contentEl.querySelector(".graph-controls"),this.root=this.graphControls.createDiv(`tree-item graph-control-section mod-extended-graph-${t}`);let s=this.root.createDiv("tree-item-self mod-collapsible");this.collapseIcon=s.createDiv("tree-item-icon collapse-icon is-collapsed"),(0,Du.setIcon)(this.collapseIcon,"right-triangle");let n=s.createDiv("tree-item-header-icon");(0,Du.setIcon)(n,"git-fork-sparkles");let a=s.createDiv("tree-item-inner").createEl("header",{cls:"graph-control-section-header",text:i});s.onClickEvent(()=>{this.isCollapsed?this.openGraphControlSection():this.collapseGraphControlSection()})}onPluginEnabled(e){this.instances=e,this.display(!0)}onPluginDisabled(){this.instances=void 0,this.display(!1)}onunload(){this.root.parentNode?.removeChild(this.root)}openGraphControlSection(){this.root.removeClass("is-collapsed"),this.root.appendChild(this.treeItemChildren),this.collapseIcon.removeClass("is-collapsed"),this.isCollapsed=!1}collapseGraphControlSection(){this.root.addClass("is-collapsed"),this.treeItemChildren&&this.root.removeChild(this.treeItemChildren),this.collapseIcon.addClass("is-collapsed"),this.isCollapsed=!0}};var sr=require("obsidian");var _9=class extends ol{constructor(t){super(t,"options",m("plugin.options"));this.selectionModeButtons={};this.treeItemChildren=this.root.createDiv("tree-item-children"),this.display(!0),this.collapseGraphControlSection()}display(t){this.treeItemChildren.replaceChildren(),t&&this.createImportConfig(),this.createSaveForDefaultState(),t&&this.createSaveForNormalState(),this.createZoomOnNode(),this.createScreenshot(),t&&this.createButtonViewState(),t&&this.createPinMultipleNodes(),t&&this.createUnpinAllNodes(),t&&this.createSelectionModes()}createImportConfig(){return new sr.Setting(this.treeItemChildren).setName(m("controls.importSettingsAndReload")).addExtraButton(t=>{t.setIcon("settings"),t.setTooltip(m("controls.importSettings")),t.onClick(()=>{new Ja(s=>{s.trim()!==""&&u.plugin.importSettings(s).then(()=>{u.graphsManager.resetPlugin(this.view,!1)})}).open()})})}createSaveForDefaultState(){return new sr.Setting(this.treeItemChildren).setName(m("states.saveForDefaultState")).setTooltip(m("states.saveForDefaultStateDesc")).addExtraButton(t=>{t.extraSettingsEl.addClass("save-button"),(0,sr.setIcon)(t.extraSettingsEl,"arrow-up-to-line"),t.onClick(()=>{u.statesManager.saveForDefaultState(this.view)})})}createSaveForNormalState(){return new sr.Setting(this.treeItemChildren).setName(m("states.saveForNormalState")).setDesc(m("states.saveForNormalStateDesc")).setTooltip(m("states.saveForNormalStateTooltip")).addExtraButton(t=>{t.extraSettingsEl.addClass("save-button"),(0,sr.setIcon)(t.extraSettingsEl,"arrow-down-to-line"),t.onClick(()=>{u.statesManager.saveForNormalState(this.view)})})}createScreenshot(){return new sr.Setting(this.treeItemChildren).setName(m("features.svgScreenshotCopy")).addExtraButton(t=>{t.extraSettingsEl.addClass("screenshot-button"),(0,sr.setIcon)(t.extraSettingsEl,"image"),t.onClick(()=>{u.graphsManager.getSVGScreenshot(this.view)})})}createZoomOnNode(){return new sr.Setting(this.treeItemChildren).setName(m("features.zoomOnNode")).addSearch(t=>{let i=s=>{u.graphsManager.zoomOnNode(this.view,s)};this.suggester=new S9(t.inputEl,this.view.renderer,i)})}createButtonViewState(){return new sr.Setting(this.treeItemChildren).setName(m("states.showGraphState")).addExtraButton(t=>{t.setIcon("info"),t.onClick(()=>{u.statesManager.showGraphState(this.view)})})}createPinMultipleNodes(){return new sr.Setting(this.treeItemChildren).setName(m("features.pinMultipleNodes")).addExtraButton(t=>{t.extraSettingsEl.addClass("extended-graph-pin"),t.setIcon("pin"),t.onClick(()=>{let i=u.graphsManager.allInstances.get(this.view.leaf.id);if(!i)return;let s=new yt(i);new F9(this.instances?.settings??u.settings,(o,a)=>{s.pinInShape(o,a)}).open()})})}createUnpinAllNodes(){return new sr.Setting(this.treeItemChildren).setName(m("features.unpinAllNodes")).addExtraButton(t=>{t.extraSettingsEl.addClass("extended-graph-pin-off"),t.setIcon("pin-off"),t.onClick(()=>{let i=u.graphsManager.allInstances.get(this.view.leaf.id);if(!i)return;new yt(i).unpinAllNodes()})})}createSelectionModes(){if(!this.instances)return;let t=[{mode:"replace",tooltip:m("inputs.selectionModeReplaceTooltip"),icon:"square"},{mode:"add",tooltip:m("inputs.selectionModeAddTooltip"),icon:"squares-unite"},{mode:"subtract",tooltip:m("inputs.selectionModeSubtractTooltip"),icon:"squares-subtract"},{mode:"intersect",tooltip:m("inputs.selectionModeIntersectTooltip"),icon:"squares-intersect"}],i=new sr.Setting(this.treeItemChildren).setName(m("inputs.selectionMode"));for(let s of t)i.addExtraButton(n=>{this.selectionModeButtons[s.mode]=n,n.setIcon(s.icon),n.setTooltip(s.tooltip),n.onClick(()=>{this.instances&&(this.instances.settings.selectionMode=s.mode,Object.entries(this.selectionModeButtons).forEach(o=>{o[0]===s.mode?o[1].extraSettingsEl.addClass("is-active"):o[1].extraSettingsEl.removeClass("is-active")}))})});return this.selectionModeButtons[this.instances.settings.selectionMode]?.extraSettingsEl.addClass("is-active"),i}};var A9=require("obsidian");var Gd=class extends ol{constructor(t,i){super(t.view,"folders",m("features.folders"));this.settingsMap=new Map;this.foldersManager=i,this.instances=t,this.treeItemChildren=this.root.createDiv("tree-item-children"),this.collapseGraphControlSection()}destroy(){this.root.remove()}display(){this.treeItemChildren.replaceChildren(),this.addToggleAllButton(),this.addToggleAllWithAtLeastOneNodeButton(),this.createFolders()}addToggleAllButton(){new A9.Setting(this.treeItemChildren).setName(m("controls.toggleAll")).addExtraButton(t=>{t.setIcon("x").setTooltip(m("controls.disableAll")+": "+m("plugin.folder")).onClick(()=>{this.instances?.foldersSet?.disableAll()})}).addExtraButton(t=>{t.setIcon("check-check").setTooltip(m("controls.enableAll")+": "+m("plugin.folder")).onClick(()=>{this.instances?.foldersSet?.enableAll()})})}addToggleAllWithAtLeastOneNodeButton(){new A9.Setting(this.treeItemChildren).setName(m("controls.toggleAll")).setDesc(m("controls.toggleAllWithMoreThanOneNode")).addExtraButton(t=>{t.setIcon("x").setTooltip(m("controls.disableAll")+": "+m("plugin.folder")).onClick(()=>{this.instances?.foldersSet?.disableAllWithAtLeastOneNode()})}).addExtraButton(t=>{t.setIcon("check-check").setTooltip(m("controls.enableAll")+": "+m("plugin.folder")).onClick(()=>{this.instances?.foldersSet?.enableAllWithAtLeastOneNode()})})}createFolders(){let t=this.foldersManager?.getTypesWithoutNone();if(t)for(let i of t)this.add(pe,i,this.foldersManager.getColor(i))}update(t,i,s){this.settingsMap.get(i)?.setting.settingEl.style.setProperty("--folder-color-rgb",$e.getCSSSplitRGB(s))}add(t,i,s){let n=new A9.Setting(this.treeItemChildren);n.setName(i).addToggle(o=>{o.setValue(this.foldersManager.isActive(i)),o.onChange(a=>{a!==this.foldersManager.isActive(i)&&this.toggle(t,i)}),this.settingsMap.set(i,{setting:n,toggle:o})}),this.update(t,i,s)}remove(t,i){for(let s of i){let n=this.settingsMap.get(s);s&&(n?.setting.settingEl.remove(),this.settingsMap.delete(s))}}toggle(t,i){this.foldersManager.isActive(i)?this.foldersManager.disable([i]):this.foldersManager.enable([i])}enableUI(t,i){this.settingsMap.get(i)?.toggle.setValue(!0)}disableUI(t,i){this.settingsMap.get(i)?.toggle.setValue(!1)}enableAllUI(t){for(let[i,s]of this.settingsMap)s.toggle.setValue(!0)}disableAllUI(t){for(let[i,s]of this.settingsMap)s.toggle.setValue(!1)}};var k9=require("obsidian");var v9=class extends k9.Modal{constructor(e,t){super(u.app),this.setTitle(e),this.modalEl.addClass("graph-modal-new"),this.callback=t,this.scope.register(null,"Enter",i=>{this.callback(this.input.getValue())&&this.close()})}onOpen(){new k9.Setting(this.contentEl).addSearch(e=>{this.input=e,new C9(e.inputEl,t=>{})}).addButton(e=>{Je.setupButton(e,"add"),e.buttonEl.addEventListener("click",t=>{this.callback(this.input.getValue())&&this.close()})})}onClose(){this.contentEl.empty()}};var Is=require("obsidian");var yu=class extends Is.Modal{constructor(e){super(u.app),this.initialFolders=e,this.folders=structuredClone(e),this.setTitle(m("features.excludedFolders")),this.modalEl.addClass("graph-modal-exclude-folders")}onOpen(){this.messageP=this.contentEl.createEl("p"),this.filtersDiv=this.contentEl.createDiv(),this.addNewFilterSetting(),this.addButtonContainer(),this.updateMessage(),this.addFilters()}updateMessage(){this.messageP.textContent=this.folders.length===0?m("features.noExclusionFilter"):m("features.withExclusionFilter")}addFilters(){this.filtersDiv.replaceChildren();for(let e of this.folders)this.addFilter(e)}addFilter(e){this.filtersDiv.createDiv("mobile-option-setting-item",t=>{t.createSpan({cls:"mobile-option-setting-item-name",text:e},s=>{Nm(e)&&s.createSpan({text:"Regex",cls:"flair mod-flat"})});let i=new Is.ExtraButtonComponent(t);i.extraSettingsEl.addClass("mobile-option-setting-item-option-icon"),i.setIcon("lucide-x"),i.setTooltip(m("controls.delete")),i.onClick(()=>{this.folders.remove(e),this.addFilters(),this.updateMessage()})})}addNewFilterSetting(){new Is.Setting(this.contentEl).then(e=>{e.setDesc(m("plugin.filter")).addSearch(t=>{t.setPlaceholder(m("controls.pathRegexPlaceholder")),new E9(t.inputEl,i=>{this.add(t)}),e.addButton(i=>{Je.setupButton(i,"add"),i.onClick(()=>{this.add(t)})})})})}add(e){e.getValue()!==""&&(this.folders.push(e.getValue()),this.addFilter(e.getValue()),this.updateMessage(),e.setValue(""))}addButtonContainer(){this.contentEl.createDiv("modal-button-container",e=>{new Is.ButtonComponent(e).setCta().setButtonText(m("controls.save")).onClick(async()=>{this.initialFolders.length=0;for(let t of this.folders)this.initialFolders.push(t);await u.plugin.saveSettings(),this.close()}),new Is.ButtonComponent(e).setClass("mod-cancel").setButtonText(m("controls.cancel")).onClick(()=>{this.close()})})}onClose(){this.contentEl.empty()}};var bu=require("obsidian");var l9=class extends bu.Modal{constructor(e){super(u.app),this.setTitle(m("controls.setConfigName")),this.modalEl.addClass("graph-modal-export-config"),this.callback=e,this.scope.register(null,"Enter",t=>{this.validate(this.input.getValue())})}onOpen(){new bu.Setting(this.contentEl).setName(m("controls.overrideConfig")).addDropdown(async e=>{this.dropdown=e,e.addOption("","");let t=await Mo();e.addOptions(Object.fromEntries(t.map(i=>[i,fi(i,".json").basename+(u.statesManager.getStateFromConfig(i)?" (\u{1F517} state)":"")])))}).addButton(e=>{e.setIcon("upload"),e.setCta(),e.buttonEl.addEventListener("click",t=>{this.callback(this.dropdown.getValue(),!0)&&this.close()})}),new bu.Setting(this.contentEl).setName(m("controls.orCreateConfig")).addText(e=>{this.input=e}).addButton(e=>{e.setIcon("upload"),e.setCta(),e.buttonEl.addEventListener("click",t=>{this.validate(this.input.getValue())})})}onClose(){this.contentEl.empty()}validate(e){this.callback(e,!1)&&this.close()}};var br=require("obsidian");var vu=class extends br.Modal{constructor(t){super(u.app);this.isCanceled=!0;this.instances=t,this.setTitle(m("features.svgScreenshotOptions"))}onOpen(){this.addCoreOptions(),this.addExtendedOptions(),this.addApply()}addCoreOptions(){this.addOnlyVisibleArea(),this.addShowNodeNames()}addOnlyVisibleArea(){new br.Setting(this.contentEl).setName(m("features.svgScreenshotVisibleArea")).addToggle(t=>{t.setValue(u.settings.exportSVGOptions.onlyVisibleArea),t.onChange(i=>{u.settings.exportSVGOptions.onlyVisibleArea=i,this.saveSettings()})})}addShowNodeNames(){new br.Setting(this.contentEl).setName(m("features.svgScreenshotNodeNames")).addToggle(t=>{t.setValue(u.settings.exportSVGOptions.showNodeNames),t.onChange(i=>{u.settings.exportSVGOptions.showNodeNames=i,this.saveSettings()})})}addExtendedOptions(){this.instances&&(this.addUseCurvedLinks(),this.addUseModifiedArrows(),this.addUseNodeShapes(),this.addShowArcs(),this.addShowFolders(),this.addShowModifiedNames(),this.addShowIcons())}addUseCurvedLinks(){let t=this.canUseCurvedLinks();u.settings.exportSVGOptions.useCurvedLinks=t,t&&new br.Setting(this.contentEl).setName(m("features.svgScreenshotCurvedLinks")).addToggle(i=>{i.setValue(u.settings.exportSVGOptions.useCurvedLinks),i.onChange(s=>{u.settings.exportSVGOptions.useCurvedLinks=s,this.saveSettings()})})}canUseCurvedLinks(){return!this.instances||!this.instances?!1:this.instances.settings.enableFeatures[this.instances.type].links&&this.instances.settings.curvedLinks}addUseModifiedArrows(){let t=this.canUseModifiedArrows();u.settings.exportSVGOptions.useModifiedArrows=t,t&&new br.Setting(this.contentEl).setName("Show modified arrows").addToggle(i=>{i.setValue(u.settings.exportSVGOptions.useModifiedArrows),i.onChange(s=>{u.settings.exportSVGOptions.useModifiedArrows=s,this.saveSettings()})})}canUseModifiedArrows(){return!this.instances||!this.instances?!1:this.instances.settings.enableFeatures[this.instances.type].arrows}addUseNodeShapes(){let t=this.canUseNodeShapes();u.settings.exportSVGOptions.useNodesShapes=t,t&&new br.Setting(this.contentEl).setName(m("features.svgScreenshotNodeShapes")).addToggle(i=>{i.setValue(u.settings.exportSVGOptions.useNodesShapes),i.onChange(s=>{u.settings.exportSVGOptions.useNodesShapes=s,this.saveSettings()})})}canUseNodeShapes(){return!this.instances||!this.instances?!1:this.instances.settings.enableFeatures[this.instances.type].shapes??!1}addShowArcs(){let t=this.canShowArcs();u.settings.exportSVGOptions.showArcs=t,t&&new br.Setting(this.contentEl).setName(m("features.svgScreenshotArcs")).addToggle(i=>{i.setValue(u.settings.exportSVGOptions.showArcs),i.onChange(s=>{u.settings.exportSVGOptions.showArcs=s,this.saveSettings()})})}canShowArcs(){if(!this.instances||!this.instances)return!1;let t=this.instances.type;return this.instances.settings.enableFeatures[t].tags?!0:this.instances.settings.enableFeatures[t].properties?Object.values(this.instances.settings.additionalProperties).some(i=>i[t]):!1}addShowFolders(){let t=this.canShowFolders();u.settings.exportSVGOptions.showFolders=t,t&&new br.Setting(this.contentEl).setName("Show folder boxes").addToggle(i=>{i.setValue(u.settings.exportSVGOptions.showFolders),i.onChange(s=>{u.settings.exportSVGOptions.showFolders=s,this.saveSettings()})})}canShowFolders(){return!this.instances||!this.instances?!1:this.instances.settings.enableFeatures[this.instances.type].folders}addShowModifiedNames(){let t=this.canShowModifiedNames();u.settings.exportSVGOptions.useModifiedNames=t,t&&new br.Setting(this.contentEl).setName("Show modified names").addToggle(i=>{i.setValue(u.settings.exportSVGOptions.useModifiedNames),i.onChange(s=>{u.settings.exportSVGOptions.useModifiedNames=s,this.saveSettings()})})}canShowModifiedNames(){return!this.instances||!this.instances?!1:this.instances.settings.enableFeatures[this.instances.type].names}addShowIcons(){let t=this.canShowIcons();u.settings.exportSVGOptions.showIcons=t,t&&new br.Setting(this.contentEl).setName("Show icons").addToggle(i=>{i.setValue(u.settings.exportSVGOptions.showIcons),i.onChange(s=>{u.settings.exportSVGOptions.showIcons=s,this.saveSettings()})})}canShowIcons(){return!this.instances||!this.instances?!1:this.instances.settings.enableFeatures[this.instances.type].icons}addApply(){let t=new br.Setting(this.contentEl).addButton(i=>{i.setButtonText(m("features.svgScreenshotCopyCode")),i.onClick(()=>{this.isCanceled=!1,u.settings.exportSVGOptions.asImage=!1,this.applyAndClose()})});ClipboardItem.supports("image/svg+xml")&&t.addButton(i=>{i.setButtonText(m("features.svgScreenshotCopyImage")),i.setCta(),i.onClick(()=>{this.isCanceled=!1,u.settings.exportSVGOptions.asImage=!0,this.applyAndClose()})})}async saveSettings(){this.instances&&(this.instances.settings.exportSVGOptions=u.settings.exportSVGOptions),await u.plugin.saveSettings()}applyAndClose(){this.saveSettings().then(()=>{this.close()})}};var qr=require("obsidian");var Eu=class extends qr.Modal{constructor(t){super(u.app);this.cmapData=[];this.interpolate=!0;this.reverse=!1;this.name=t??"",this.modalEl.addClass("graph-modal-palette-maker")}onOpen(){this.addCanvas(),this.addHandles(),this.addControls(),this.addInfo(),this.addListeners(),this.updateCanvas()}addCanvas(){this.canvasContainer=this.contentEl.createDiv("canvas-gradient-maker-container"),this.canvasGradient=this.canvasContainer.createEl("canvas"),this.canvasGradient.id="canvas-gradient-maker"}addHandles(){if(this.name in u.settings.customColorMaps){let t=u.settings.customColorMaps[this.name];this.reverse=t.reverse,this.interpolate=t.interpolate;let i=t.colors.map((s,n)=>({col:Ti(s).rgb,stop:t.stops[n]}));for(let{col:s,stop:n}of i)this.addHandle(s,n)}else this.addHandle(16711680,0),this.addHandle(65280,.5),this.addHandle(255,1)}addHandle(t,i){let s=new qr.ColorComponent(this.canvasContainer);this.cmapData.push({handle:s,color:t,stop:i}),s.setValue(as(t)),s.onChange(n=>{let o=this.cmapData.find(a=>a.handle===s);o&&(o.color=Ti(n).rgb,this.updateCanvas())}),s.colorPickerEl.style.left=100*i+"%",s.colorPickerEl.addEventListener("mousedown",n=>this.onDragStart(n,s)),s.colorPickerEl.addEventListener("mouseenter",()=>this.targetHandle=s),s.colorPickerEl.addEventListener("mouseleave",()=>this.targetHandle=void 0)}addListeners(){this.canvasContainer.addEventListener("dblclick",this.onAddHandle.bind(this)),this.scope.register(null,"Backspace",this.onDeleteHandle.bind(this)),this.scope.register(null,"Clear",this.onDeleteHandle.bind(this)),this.scope.register(null,"Delete",this.onDeleteHandle.bind(this))}onAddHandle(t){if(t.button!==0||t.targetNode?.nodeName!=="CANVAS")return;let i=this.canvasContainer.getBoundingClientRect(),s=Math.clamp((t.clientX-i.left)/i.width,0,1),n=this.canvasGradient.getContext("2d",{willReadFrequently:!0})?.getImageData(s*this.canvasGradient.width,.5,1,1);if(!n)return;let o=n.data;this.addHandle(Vn([o[0],o[1],o[2]]),s)}onDeleteHandle(t,i){if(!this.targetHandle||this.cmapData.length<=2)return;let s=this.cmapData.find(n=>n.handle===this.targetHandle);s&&(this.cmapData.remove(s),s.handle.colorPickerEl.detach(),this.targetHandle=void 0,this.updateCanvas())}onDragStart(t,i){if(t.button!==0)return;let s=this.cmapData.findIndex(c=>c.handle===i);if(s===-1)return;let n=i.colorPickerEl;t.preventDefault(),t.stopPropagation();let o=this.canvasContainer.getBoundingClientRect(),a=c=>{c.preventDefault();let h=c.clientX,d=Math.clamp((h-o.left)/o.width,0,1);n.style.left=100*d+"%",this.cmapData[s].stop=d,this.updateCanvas()},l=c=>{c.preventDefault(),n.win.removeEventListener("mousemove",a),n.win.removeEventListener("mouseup",l)};n.win.addEventListener("mousemove",a),n.win.addEventListener("mouseup",l)}addControls(){new qr.Setting(this.contentEl).setName(m("controls.interpolate")).addToggle(t=>{t.setValue(this.interpolate),t.onChange(i=>{this.interpolate=i,this.updateCanvas()})}),new qr.Setting(this.contentEl).setName(m("controls.reverse")).addToggle(t=>{t.setValue(this.reverse),t.onChange(i=>{this.reverse=i})}),this.nameSetting=new qr.Setting(this.contentEl).setName(m("UI.name")).addText(t=>{t.setValue(this.name),t.onChange(i=>{this.name=i,this.onNameChanged()})}),new qr.Setting(this.contentEl).addButton(t=>{this.saveButton=t,t.setButtonText(m("controls.save")),t.setCta(),t.onClick(this.save.bind(this))}),this.onNameChanged()}addInfo(){let t=new qr.Setting(this.contentEl).setName(m("UI.howToUse")).setHeading();t.descEl.innerHTML=m("UI.howToUseGradientMaker");let i=createDiv();t.nameEl.prepend(i),(0,qr.setIcon)(i,"info")}onNameChanged(){this.name===""?(this.nameSetting.setDesc(m("errors.paletteNameRequired")),this.nameSetting.descEl.toggleClass("error",!0)):(this.nameSetting.setDesc(""),this.nameSetting.descEl.toggleClass("error",!0)),this.name in u.settings.customColorMaps?this.saveButton.setButtonText(m("controls.override")):this.saveButton.setButtonText(m("controls.save"))}updateCanvas(){Pa(this.canvasGradient,!1,this.interpolate,this.cmapData.map(t=>t.color),this.cmapData.map(t=>t.stop))}save(){this.name!==""&&(u.settings.customColorMaps[this.name]={colors:this.cmapData.map(t=>as(t.color)),stops:this.cmapData.map(t=>t.stop),interpolate:this.interpolate,reverse:this.reverse},u.plugin.saveSettings().then(()=>{this.saveCallback&&this.saveCallback(this.name),this.close()}))}onSave(t){this.saveCallback=t}};var H0=require("obsidian");var D9=class extends H0.Modal{constructor(){super(u.app);this.selectedPalette="";this.customPalettes={};this.setTitle(m("features.interactives.palettePickGradient")),this.modalEl.addClass("graph-modal-palette-picker")}onOpen(){for(let[t,i]of Object.entries(vh))this.addPalettesGroup(t,i);this.addCustomPalettesGroup(),this.addInfo()}addPalettesGroup(t,i){let s=new H0.Setting(this.contentEl).setName(t).setHeading();s.controlEl.addClass("palette-group");for(let n of i)this.addPalette(n,s.controlEl),this.addPalette(n+"_r",s.controlEl)}addPalette(t,i){let n=new H0.Setting(i).setName(t).controlEl.createEl("canvas");n.id=`picker-canvas-palette-${t}`,n.width=100,n.height=20,Na(n,t,u.settings),n.onclick=()=>{this.selectedPalette=t,this.close()}}addCustomPalettesGroup(){let t=new H0.Setting(this.contentEl).setName(m("plugin.custom")).setHeading();new H0.ButtonComponent(t.infoEl).then(i=>{Je.setupButton(i,"add"),i.onClick(()=>{let s=new Eu;s.onSave(n=>{this.addCustomPalette(n,t.controlEl),this.selectedPalette="custom:"+n,this.callback(this.selectedPalette)}),s.open()})}),t.controlEl.addClass("palette-group");for(let i in u.settings.customColorMaps)this.addCustomPalette(i,t.controlEl)}addCustomPalette(t,i){let s=u.settings.customColorMaps[t];if(!s)return;let n=Object.entries(this.customPalettes).find(([a,l])=>l.name===t),o;if(n)o=n[0];else{o=crypto.randomUUID();let a=new H0.Setting(i).setName(t);a.settingEl.addClass("custom-palette");let l=a.controlEl.createEl("canvas");l.id=`picker-canvas-custom-palette-${o}`,l.width=100,l.height=20,new H0.ExtraButtonComponent(a.infoEl).then(c=>{Je.setupExtraButton(c,"edit"),c.onClick(()=>this.editCustomPalette(o))}),new H0.ExtraButtonComponent(a.infoEl).then(c=>{Je.setupExtraButton(c,"delete"),c.onClick(()=>this.deleteCustomPalette(o))}),l.onclick=()=>this.selectCustomPalette(o),this.customPalettes[o]={name:t,setting:a,canvas:l}}Pa(this.customPalettes[o].canvas,s.reverse,s.interpolate,s.colors.map(a=>Ti(a).rgb),s.stops)}editCustomPalette(t){let i=this.customPalettes[t].name,s=new Eu(i);s.onSave(n=>{this.onCustomPaletteEdited(t,i,n),i=n}),s.open()}async onCustomPaletteEdited(t,i,s){let n="custom:"+s,o=u.settings.customColorMaps[n];if(o){if(i!==n){delete u.settings.customColorMaps[i];for(let a in u.settings.interactiveSettings)u.settings.interactiveSettings[a].colormap===i&&(u.settings.interactiveSettings[a].colormap=n);u.settings.nodesColorColormap===i&&(u.settings.nodesColorColormap=n),u.settings.linksColorColormap===i&&(u.settings.linksColorColormap=n),await u.plugin.saveSettings()}this.selectedPalette=n,this.callback(this.selectedPalette),this.customPalettes[t].name=s,this.customPalettes[t].setting.setName(s),Pa(this.customPalettes[t].canvas,o.reverse,o.interpolate,o.colors.map(a=>Ti(a).rgb),o.stops)}}deleteCustomPalette(t){let i=this.customPalettes[t].name;delete u.settings.customColorMaps[i];for(let s in u.settings.interactiveSettings)u.settings.interactiveSettings[s].colormap===i&&(u.settings.interactiveSettings[s].colormap="rainbow");u.settings.nodesColorColormap===i&&(u.settings.nodesColorColormap="rainbow"),u.settings.linksColorColormap===i&&(u.settings.linksColorColormap="rainbow"),u.plugin.saveSettings(),this.selectedPalette="rainbow",this.callback(this.selectedPalette),this.customPalettes[t].setting.settingEl.detach(),delete this.customPalettes[t]}selectCustomPalette(t){this.selectedPalette="custom:"+this.customPalettes[t].name,this.close()}addInfo(){new H0.Setting(this.contentEl).setName(m("plugin.info")).setHeading().setDesc(m("features.interactives.paletteMatplotlibDesc")).then(t=>{let i=createDiv();t.nameEl.prepend(i),(0,H0.setIcon)(i,"info");let s=t.descEl.createEl("a");s.href="https://matplotlib.org/stable/users/explain/colors/colormaps.html",s.setText("https://matplotlib.org/stable/users/explain/colors/colormaps.html")})}onClose(){this.contentEl.empty(),this.selectedPalette!==""&&this.callback(this.selectedPalette)}onSelected(t){this.callback=t}};var I9=require("obsidian");var Ja=class extends I9.Modal{constructor(e){super(u.app),this.setTitle(m("controls.selectConfigToImport")),this.modalEl.addClass("graph-modal-import-config"),this.callback=e}onOpen(){new I9.Setting(this.contentEl).addDropdown(async e=>{this.dropdown=e,e.addOption("","");let t=await Mo();e.addOptions(Object.fromEntries(t.map(i=>[i,fi(i,".json").basename+(u.statesManager.getStateFromConfig(i)?" (\u{1F517} state)":"")])))}).addButton(e=>{e.setIcon("download"),e.setCta(),e.buttonEl.addEventListener("click",t=>{let i=this.dropdown.getValue();i!==""&&this.callback(i),this.close()})})}onClose(){this.contentEl.empty()}};var L9=require("obsidian");var y9=class extends L9.Modal{constructor(t,i){super(u.app);this.labels={};this.key=t,this.types=i,this.setTitle(m("features.interactives.selectionFor")+": "+this.key),this.modalEl.addClass("graph-modal-interactives-selection")}onOpen(){this.addRegexArea(),this.addLabels(),this.filterOutLabels()}addRegexArea(){"excludeRegex"in u.settings.interactiveSettings[this.key]||(u.settings.interactiveSettings[this.key].excludeRegex={regex:"",flags:""}),this.regexSetting=new L9.Setting(this.contentEl).setName(m("query.excludeRegex")).addTextArea(t=>{t.setValue(u.settings.interactiveSettings[this.key].excludeRegex.regex),t.onChange(i=>this.changeExcludeRegex(i,u.settings.interactiveSettings[this.key].excludeRegex.flags))}).addText(t=>{t.setPlaceholder("flags").setValue(u.settings.interactiveSettings[this.key].excludeRegex.flags).onChange(i=>this.changeExcludeRegex(u.settings.interactiveSettings[this.key].excludeRegex.regex,i))}),this.updateRegexDesc()}addLabels(){let t=this.contentEl.createDiv("items-container");for(let i of this.types){let s=!u.settings.interactiveSettings[this.key].unselected.includes(i),n=t.createEl("label"),o=n.createSpan({text:i}),a=n.createEl("input",{type:"checkbox"});s?this.selectInteractive(n,a):this.deselectInteractive(n,a),a.addEventListener("change",l=>{a.checked?this.selectInteractive(n,a):this.deselectInteractive(n,a)}),this.labels[i]=n}}filterOutLabels(){let t=u.settings.interactiveSettings[this.key].excludeRegex,i=0;for(let[s,n]of Object.entries(this.labels)){let o=!1;for(let a of t.regex.split(`
|
|
`))if(a!==""&&new RegExp(a,t.flags).test(s)){n.hide(),o=!0,i++;break}o||n.show()}this.regexSetting.setName(`${m("query.excludeRegex")} (${i} ${i>1?m("query.matches"):m("query.match")})`)}changeExcludeRegex(t,i){t===u.settings.interactiveSettings[this.key].excludeRegex.regex&&i===u.settings.interactiveSettings[this.key].excludeRegex.flags||(u.settings.interactiveSettings[this.key].excludeRegex={regex:t,flags:i},u.plugin.saveSettings(),this.filterOutLabels(),this.updateRegexDesc())}updateRegexDesc(){let t=u.settings.interactiveSettings[this.key].excludeRegex.regex,i=u.settings.interactiveSettings[this.key].excludeRegex.flags;this.regexSetting.descEl.innerHTML=m("query.excludeRegexDesc")+"<ul>"+t.split(`
|
|
`).map(s=>`<li>/${s}/${i}</li>`).join("")+"</ul>"}selectInteractive(t,i){t.addClass("is-active"),i.checked=!0,u.settings.interactiveSettings[this.key].unselected.includes(t.innerText)&&(u.settings.interactiveSettings[this.key].unselected.remove(t.innerText),u.plugin.saveSettings())}deselectInteractive(t,i){t.removeClass("is-active"),i.checked=!1,u.settings.interactiveSettings[this.key].unselected.includes(t.innerText)||(u.settings.interactiveSettings[this.key].unselected.push(t.innerText),u.plugin.saveSettings())}onClose(){this.contentEl.empty()}};var M9=require("obsidian");var xu=class extends M9.Modal{constructor(e,t,i){super(u.app),this.setTitle(e),this.modalEl.addClass("graph-modal-new"),this.callback=t,this.name=i,this.scope.register(null,"Enter",s=>{this.callback(this.input.getValue())&&this.close()})}onOpen(){new M9.Setting(this.contentEl).addText(e=>{this.input=e,this.name&&this.input.setValue(this.name)}).addButton(e=>{Je.setupButton(e,this.name?"edit":"add"),e.buttonEl.addEventListener("click",t=>{this.callback(this.input.getValue())&&this.close()})})}onClose(){this.contentEl.empty()}};var $i=require("obsidian");var al=class extends $i.Modal{constructor(t,i,s,n){super(u.app);this.rulesSettings=[];this.combinationLogicButtons={AND:null,OR:null};this.setTitle(t),this.modalEl.addClass("graph-modal-nodes-query"),this.callback=s,this.queryData=i,this.settings=n}onOpen(){this.addCombinationLogic(),this.addRulesHeader(),this.addButtons();for(let t of this.queryData.rules)this.addRule(t);this.onChange()}addCombinationLogic(){new $i.Setting(this.contentEl).setName(m("query.combinationLogic")).addButton(t=>{this.combinationLogicButtons.AND=t,t.setButtonText(m("query.AND")),t.onClick(i=>{this.queryData.combinationLogic="AND",this.combinationLogicButtons.AND?.setCta(),this.combinationLogicButtons.OR?.removeCta()})}).addButton(t=>{this.combinationLogicButtons.OR=t,t.setButtonText(m("query.OR")),t.onClick(i=>{this.queryData.combinationLogic="OR",this.combinationLogicButtons.AND?.removeCta(),this.combinationLogicButtons.OR?.setCta()})}).then(t=>{this.combinationLogicButtons[this.queryData.combinationLogic]?.setCta()})}addRulesHeader(){this.ruleHeader=new $i.Setting(this.contentEl).setName(m("query.rules")).setHeading().addButton(t=>{Je.setupButton(t,"add"),t.onClick(i=>{this.addRule()})})}addRule(t){let i=new Y8(this.contentEl,this.settings??u.settings,this.removeRule.bind(this),this.onChange.bind(this),t);(this.rulesSettings.last()?.settingEl??this.ruleHeader.settingEl).insertAdjacentElement("afterend",i.settingEl),this.rulesSettings.push(i)}removeRule(t){this.rulesSettings.remove(t),t.settingEl.remove()}addButtons(){let t=this.modalEl.createDiv({cls:"buttons-container"});new $i.ButtonComponent(t).setButtonText(m("controls.cancel")).onClick(()=>this.close()),this.viewMatchesButton=new $i.ButtonComponent(t).setButtonText(m("query.viewMatches")).onClick(()=>this.viewMatches()),this.applyButton=new $i.ButtonComponent(t).setButtonText(m("controls.save")).setIcon("save").onClick(()=>this.save()).setCta()}onChange(t){let s=this.getMatcher().getMatches(this.settings);this.viewMatchesButton.setButtonText(`${m("query.viewMatches")} (${s.length})`),this.viewMatchesButton.setDisabled(s.length===0)}viewMatches(){new N9(this.queryData).open()}onClose(){this.contentEl.empty()}save(){this.setQueryData(),this.callback(this.queryData),this.close()}setQueryData(){let t=[];for(let i of this.rulesSettings)t.push(i.getRuleQuery());this.queryData.rules=t.map(i=>i.getRecord())}getMatcher(){return this.setQueryData(),new Hr(this.queryData)}},Y8=class extends $i.Setting{constructor(e,t,i,s,n){super(e),this.settings=t,this.onRemoveCallback=i,this.setClass("rule-setting"),this.addRemoveButton(),this.addSourceDropdown(),n&&n.source&&this.sourceDropdown.setValue(n.source),this.sourceDropdown.getValue()!=="all"&&(this.addLogicDropdown(),n&&n.logic&&this.logicDropdown?.setValue(n.logic),this.sourceDropdown.getValue()==="property"&&(this.addPropertyDropdown(),n&&n.property&&this.propertyDropdown?.setValue(n.property)),this.addValueText(),n&&n.value&&this.valueText?.setValue(n.value)),this.onChangeCallback=s,this.onChange()}addRemoveButton(){return this.addExtraButton(e=>{Je.setupExtraButton(e,"delete"),e.onClick(()=>{this.onRemoveCallback(this)})})}addSourceDropdown(){return this.addDropdown(e=>{this.sourceDropdown=e,e.addOptions(G8),e.setValue("tag"),e.onChange(t=>{t==="all"?(this.logicDropdown?.selectEl.parentNode?.removeChild(this.logicDropdown.selectEl),this.logicDropdown=null,this.propertyDropdown?.selectEl.parentNode?.removeChild(this.propertyDropdown.selectEl),this.propertyDropdown=null,this.valueText?.containerEl.parentNode?.removeChild(this.valueText.containerEl),this.valueText=null):(!this.propertyDropdown&&t==="property"?this.addPropertyDropdown():t!=="property"&&(this.propertyDropdown?.selectEl.parentNode?.removeChild(this.propertyDropdown.selectEl),this.propertyDropdown=null),this.logicDropdown||this.addLogicDropdown(),this.valueText||this.addValueText()),this.onChange()})})}addPropertyDropdown(){return this.addDropdown(e=>{this.propertyDropdown=e,this.controlEl.insertAfter(e.selectEl,this.sourceDropdown.selectEl);let t=t1(this.settings);e.addOptions(t.sort((i,s)=>Ri(i,s)).reduce((i,s)=>(i[s]=s,i),{})),e.onChange(i=>{this.onChange()})})}addLogicDropdown(){return this.addDropdown(e=>{this.logicDropdown=e,e.addOptions(U8),e.onChange(t=>{t!=="isEmpty"&&t!=="isEmptyNot"?this.valueText||this.addValueText():this.valueText&&(this.valueText.containerEl.parentNode?.removeChild(this.valueText.containerEl),this.valueText=null),this.onChange()})})}addValueText(){return this.addSearch(e=>{this.valueText=e,e.setPlaceholder(m("plugin.valuePlaceholder")),e.inputEl.setAttr("required",!0),this.suggester=new sl(this.valueText.inputEl,this.settings,t=>{this.onChange()}),e.onChange(t=>{this.onChange()})})}onChange(){switch(this.logicDropdown?.getValue()){case"containsRegex":case"containsRegexNot":case"matchesRegex":case"matchesRegexNot":this.suggester?.setKey();break;default:this.suggester?.setKey(this.sourceDropdown.getValue(),this.propertyDropdown?.getValue());break}let t=this.getRuleQuery();this.setValidity(t),this.onChangeCallback(t)}setValidity(e){e.isValid()?this.settingEl.removeClass("query-invalid"):this.settingEl.addClass("query-invalid")}getRuleQuery(){return new Fs({source:this.sourceDropdown.getValue(),property:this.propertyDropdown?.getValue()??"",value:this.valueText?.getValue()??"",logic:this.logicDropdown?.getValue()??""})}};var Su=require("obsidian");var Vd=class extends Su.Modal{constructor(t,i){super(u.app);this.items=[];this.setTitle(m("features.externalLinkOpen")),this.modalEl.addClass("graph-modal-open-external-link");let s={};t.forEach(o=>s[o.basename]=s[o.basename]?s[o.basename]+1:1),this.items=t.map(o=>({file:o,display:s[o.basename]>1?o.path:o.basename}));for(let o of this.items){let a=new Su.ButtonComponent(this.contentEl);a.setButtonText(o.display),a.onClick(()=>{i(o.file)})}let n=new Su.ButtonComponent(this.contentEl);n.setButtonText("Open on web"),n.setCta(),n.onClick(()=>{i(null)})}};var Cu=require("obsidian");var F9=class extends al{constructor(e,t){super(m("features.pinMultipleNodes"),u.settings.multipleNodesData.queryData??{combinationLogic:"AND",rules:[]},i=>{this.pinCallback(this.shapeData,i)},e),this.pinCallback=t,this.shapeData=u.settings.multipleNodesData.shapeData??{type:"grid",center:{x:0,y:0},step:100}}onOpen(){super.onOpen(),this.addShapeType(),this.addStep(),this.addCenter(),this.changeType(this.shapeData.type),this.applyButton.setButtonText(m("controls.apply")).setIcon("check"),this.rulesSettings.length===0&&(this.addRule({source:"all"}),this.onChange())}addShapeType(){new Cu.Setting(this.contentEl).setName(m("features.pinMultipleShape")).addDropdown(e=>{e.addOptions(h5),e.setValue(this.shapeData.type),e.onChange(t=>{this.changeType(t),this.saveSettings()})})}addStep(){new Cu.Setting(this.contentEl).setName(m("features.pinMultipleGap")).addText(e=>{e.setValue(this.shapeData.step.toString()),e.onChange(t=>{let i=parseInt(t);isNaN(i)||(this.shapeData.step=i,this.saveSettings())})})}addCenter(){new Cu.Setting(this.contentEl).setName(m("features.pinMultipleCenter")).addText(e=>{e.inputEl.insertAdjacentText("beforebegin","X"),e.setValue(this.shapeData.center.x.toString()),e.onChange(t=>{let i=parseInt(t);isNaN(i)||(this.shapeData.center.x=i,this.saveSettings())})}).addText(e=>{e.inputEl.insertAdjacentText("beforebegin","Y"),e.setValue(this.shapeData.center.y.toString()),e.onChange(t=>{let i=parseInt(t);isNaN(i)||(this.shapeData.center.y=i,this.saveSettings())})})}addGridSettings(){this.gridSetting||(this.gridSetting=new Cu.Setting(this.contentEl).setName(m("features.pinMultipleGridSize")).setDesc(m("features.pinMultipleGridSizeDesc")).addText(e=>{e.setValue(this.shapeData.columns?.toString()??""),e.onChange(t=>{if(t==="")this.shapeData.columns=void 0,this.saveSettings();else if(t==="N"||t==="auto")this.shapeData.columns=t,this.saveSettings();else{let i=parseInt(t);!isNaN(i)&&i>=1&&(this.shapeData.columns=i,this.saveSettings())}})}))}removeGridSettings(){this.gridSetting&&(this.gridSetting.settingEl.parentNode?.removeChild(this.gridSetting.settingEl),this.gridSetting=null)}changeType(e){this.shapeData.type=e,this.shapeData.type==="grid"?this.addGridSettings():this.removeGridSettings(),this.saveSettings()}onChange(e){super.onChange(e),this.saveSettings()}saveSettings(){u.settings.multipleNodesData={shapeData:this.shapeData,queryData:this.queryData},u.plugin.saveSettings()}};var bo=require("obsidian");var N9=class extends bo.Modal{constructor(e){super(u.app),this.matcher=new Hr(e);let t=this.matcher.getMatches();this.setTitle(m("query.matchingFiles")),this.addQueryStringHeader(),this.addQueryString(),this.addFilesHeader(t.length);for(let i of t)this.addFile(i)}addQueryStringHeader(){new bo.Setting(this.contentEl).setName(m("query.query")).setHeading()}addQueryString(){new bo.Setting(this.contentEl).setName(this.matcher.toString())}addFilesHeader(e){new bo.Setting(this.contentEl).setName(`${m("query.files")} (${e})`).setHeading()}addFile(e){new bo.Setting(this.contentEl).setName(e.path)}};var g9=class extends al{constructor(e,t,i){super(m("query.setShapeQueryFor")+": "+m(`features.shapesNames.${e}`),t,s=>{this.saveShapeQueryCallback(this.shape,s)}),this.saveShapeQueryCallback=i,this.shape=e}onOpen(){this.addShapeIcon(),super.onOpen()}addShapeIcon(){let e=We.getSVG(this.shape);e.addClass("shape-svg"),this.titleEl.insertAdjacentElement("afterbegin",e)}};var nr=require("obsidian");var Bs=class extends nr.Modal{constructor(t){super(u.app);this.sortableTables={};this.defaultMaxRows=10;this.instances=t,this.state=new Rs(""),this.state.saveGraph(t),this.setTitle(m("states.graphState")),this.modalEl.addClass("graph-modal-graph-state")}setTarget(t,i){this.target={tableID:t,elementID:i}}open(){super.open(),this.modalEl.querySelectorAll("input").forEach(t=>t.blur())}onOpen(){this.addNodes(),this.addLinks(),this.addPinnedNodes(),this.focusOnTarget()}addNodes(){let t=this.instances.nodesSet.extendedElementsMap.size>0,i=Object.keys(this.instances.nodesSet.selectedNodes).length>0;this.createHeading(m("plugin.nodes"),"nodes",t);let s=this.contentEl.createEl("table"),n=s.createEl("colgroup"),a=s.createTHead().insertRow(),l;l=a.insertCell(),l.setText(m("plugin.folder")),n.createEl("col").addClass("col-folder"),l=a.insertCell(),l.setText(m("plugin.nodeName")),n.createEl("col").addClass("col-filename"),l=a.insertCell(),l.setText(m("controls.enabled")),n.createEl("col").addClass("col-enabled"),i&&(l=a.insertCell(),l.setText(m("inputs.selected")),n.createEl("col").addClass("col-selected"));for(let[d,p]of this.instances.nodesSet.managers)l=a.insertCell(),l.setText(d),n.createEl("col").addClass("col-key-"+d);if(this.instances.settings.enableFeatures[this.instances.type].shapes&&(l=a.insertCell(),l.setText(m("features.shape")),n.createEl("col").addClass("col-shape")),this.instances.settings.enableFeatures[this.instances.type]["elements-stats"]&&(l=a.insertCell(),l.setText(m("features.size")),n.createEl("col").addClass("col-size")),!t)return;let c=s.createTBody(),h=[];for(let[d,p]of this.instances.nodesSet.extendedElementsMap){let g=this.getNodeData(d),v=c.insertRow();h.push(d);let C;C=v.insertCell(),C.setText(g.path),C=v.insertCell(),g.link?C.appendChild(g.link):C.setText(d),C=v.insertCell(),p.isAnyManagerDisabled()||C.setText("\u2713"),i&&(C=v.insertCell(),d in this.instances.nodesSet.selectedNodes&&C.setText("\u2713"));for(let[w,k]of this.instances.nodesSet.managers){C=v.insertCell(),C.addClass("column-interactives");let B=p.types.get(w);if(B)for(let L of B){let T=C.createEl("span");T.addClass("tag"),k.isActive(L)||T.addClass("is-disabled"),T.style.setProperty("--interactive-color",$e.getCSSSplitRGB(k.getColor(L))),T.setText(L)}}this.instances.settings.enableFeatures[this.instances.type].shapes&&p.graphicsWrapper&&(C=v.insertCell(),C.createDiv().appendChild(We.getSVG(p.graphicsWrapper.shape)).addClass("shape-svg")),this.instances.settings.enableFeatures[this.instances.type]["elements-stats"]&&(C=v.insertCell(),C.setText(p.getSizeWithoutScaling().toFixed(2)))}this.prepareTable("nodes",s,h)}addLinks(){let t=this.instances.linksSet.extendedElementsMap.size>0;this.createHeading("Links","links",t);let i=this.contentEl.createEl("table"),s=i.createEl("colgroup"),o=i.createTHead().insertRow(),a;a=o.insertCell(),a.setText(`${m("plugin.folder")} (${m("plugin.source")})`),s.createEl("col").addClasses(["col-folder","col-folder-source"]),a=o.insertCell(),a.setText(`${m("plugin.nodeName")} (${m("plugin.source")})`),s.createEl("col").addClasses(["col-filename","col-filename-source"]),a=o.insertCell(),a.setText(`${m("plugin.folder")} (${m("plugin.target")})`),s.createEl("col").addClasses(["col-folder","col-folder-target"]),a=o.insertCell(),a.setText(`${m("plugin.nodeName")} (${m("plugin.target")})`),s.createEl("col").addClasses(["col-filename","col-filename-target"]),a=o.insertCell(),a.setText(m("controls.enabled")),s.createEl("col").addClass("col-enabled");for(let[h,d]of this.instances.linksSet.managers)a=o.insertCell(),a.setText(h),s.createEl("col").addClass("col-key-"+h);if(this.instances.settings.enableFeatures[this.instances.type]["elements-stats"]&&(a=o.insertCell(),a.setText(m("features.size")),s.createEl("col").addClass("col-size")),!t)return;let l=i.createTBody(),c=[];for(let[h,d]of this.instances.linksSet.extendedElementsMap){let p=this.getNodeData(d.coreElement.source.id),g=this.getNodeData(d.coreElement.target.id),v=l.insertRow();c.push(h);let C;C=v.insertCell(),C.setText(p.path),C=v.insertCell(),p.link?C.appendChild(p.link):C.setText(d.coreElement.source.id),C=v.insertCell(),C.setText(g.path),C=v.insertCell(),g.link?C.appendChild(g.link):C.setText(d.coreElement.target.id),C=v.insertCell(),d.isAnyManagerDisabled()||C.setText("\u2713");for(let[w,k]of this.instances.linksSet.managers){C=v.insertCell(),C.addClass("column-interactives");let B=d.types.get(w);if(B)for(let L of B){let T=C.createEl("span");T.addClass("tag"),k.isActive(L)||T.addClass("is-disabled"),T.style.setProperty("--interactive-color",$e.getCSSSplitRGB(k.getColor(L))),T.setText(L)}}this.instances.settings.enableFeatures[this.instances.type]["elements-stats"]&&(C=v.insertCell(),C.setText(d.getThicknessScale().toFixed(2)))}this.prepareTable("links",i,c)}addPinnedNodes(){let t=this.state.data.pinNodes&&Object.entries(this.state.data.pinNodes).length>0;this.createHeading(m("features.pinnedNodes"),"pinned",t);let i=this.contentEl.createEl("table"),s=i.createEl("colgroup"),o=i.createTHead().insertRow(),a;if(a=o.insertCell(),a.setText(m("plugin.folder")),s.createEl("col").addClass("col-folder"),a=o.insertCell(),a.setText(m("plugin.nodeName")),s.createEl("col").addClass("col-filename"),a=o.insertCell(),a.setText("X"),s.createEl("col").addClass("col-pos-x"),a=o.insertCell(),a.setText("Y"),s.createEl("col").addClass("col-pos-y"),!this.state.data.pinNodes||!t)return;let l=i.createTBody(),c=[];for(let[h,d]of Object.entries(this.state.data.pinNodes)){let p=this.getNodeData(h),g=l.insertRow();c.push(h);let v;v=g.insertCell(),v.setText(p.path),v=g.insertCell(),p.link?v.appendChild(p.link):v.setText(h),v=g.insertCell(),v.setText(d.x.toFixed(2)),v=g.insertCell(),v.setText(d.y.toFixed(2))}this.prepareTable("pinned",i,c)}createHeading(t,i,s){let n=new nr.Setting(this.contentEl).setName(t).setHeading();if(s){if(n.addText(o=>{o.inputEl.insertAdjacentText("beforebegin",m("controls.show")),o.setValue(this.defaultMaxRows.toString()).onChange(a=>{let l=this.sortableTables[i];if(!l)return;let c=parseInt(a);if(!isNaN(c)&&c>0){let h=l.maxRows/c;l.maxRows=c,l.page=Math.round(l.page*h),l.page=Math.clamp(l.page,0,this.numberOfPages(i)),this.mountPagination(i),this.showPageRows(i)}}),o.inputEl.insertAdjacentText("afterend",m("controls.rows"))}),i==="nodes"||i==="pinned"){let o=new nr.SearchComponent(n.settingEl).then(a=>{let l=c=>{this.setTarget(i,c),this.focusOnTarget()};new b9(a.inputEl,this.instances,i,l),a.onChange(l)});n.infoEl.insertAdjacentElement("afterend",o.containerEl)}n.controlEl.addClass("number-of-rows")}}getNodeData(t){let i=qe(t),s=this.getPath(i),n=this.getLink(i);return{file:i??void 0,path:s,link:n}}getPath(t){let i="";return t&&(i=t.parent?.path??""),i}getLink(t){if(t){let i=createEl("a");i.setText(t.basename),i.onclick=o=>{this.close(),this.app.workspace.getLeaf(!0).openFile(t)};let s=createEl("code");s.setText(t.extension);let n=createEl("span");return n.appendChild(i),n.insertAdjacentText("beforeend"," "),n.appendChild(s),n}}prepareTable(t,i,s,n=1){i.tHead&&(this.sortableTables[t]={table:i,rows:Array.from(i.tBodies[0].rows).map((o,a)=>({id:s[a],el:o})),sortIndex:n,asc:Array.from(i.tHead.rows[0].cells).map(o=>{}),page:0,pagination:createDiv(),maxRows:this.defaultMaxRows},i.insertAdjacentElement("afterend",this.sortableTables[t].pagination),this.sortableTables[t].pagination.addClass("pagination"),this.mountPagination(t),this.makeSortable(t))}mountPagination(t){let i=this.sortableTables[t];if(!i)return;let s=i.pagination;if(s.replaceChildren(),i.rows.length<i.maxRows)return;let n=3;i.page!==0&&new nr.ButtonComponent(s).setIcon("chevrons-left").setTooltip(m("controls.pageFirst")).setClass("first-page").onClick(()=>{this.showFirstPage(t)});let o=s.createDiv("pagination-inner");i.page>n&&o.createSpan().setText("...");for(let a=Math.max(0,i.page-n);a<i.page;++a)new nr.ButtonComponent(o).setButtonText(a.toString()).setTooltip(m("controls.page")+" "+a.toString()).onClick(()=>{this.showPreviousPage(t,i.page-a)});new nr.ButtonComponent(o).setButtonText(i.page.toString()).setCta().setTooltip(m("controls.pageCurrent"));for(let a=i.page+1;a<Math.min(i.page+n+1,this.numberOfPages(t));++a)new nr.ButtonComponent(o).setButtonText(a.toString()).setTooltip(m("controls.page")+" "+a.toString()).onClick(()=>{this.showNextPage(t,a-i.page)});i.page<this.numberOfPages(t)-n-1&&o.createSpan().setText("..."),i.page!==this.numberOfPages(t)-1&&new nr.ButtonComponent(s).setIcon("chevrons-right").setTooltip(m("controls.pageLast")).setClass("last-page").onClick(()=>{this.showLastPage(t)})}makeSortable(t){let i=this.sortableTables[t],s=this.sortableTables[t]?.table;if(!i||!s?.tHead)return;let n=0;Array.from(s.tHead.rows[0].cells).forEach(o=>{new nr.ExtraButtonComponent(o).setIcon("chevron-down").onClick(()=>{s.tHead&&(i.sortIndex=Array.from(s.tHead.rows[0].cells).indexOf(o),this.sortTable(t))}),n++}),this.sortTable(t)}sortTable(t){let i=this.sortableTables[t];if(!i)return;let s=!i.asc[i.sortIndex];i.asc[i.sortIndex]=s,i.rows.sort((n,o)=>{let a=n.el.cells[i.sortIndex].textContent??"",l=o.el.cells[i.sortIndex].textContent??"";return Ri(a,l)}),s||i.rows.reverse(),this.showPageRows(t);for(let n=0,o=i.asc.length;n<o;++n)n===i.sortIndex?(i.asc[n]=s,i.table.tHead?.rows[0].cells[n].addClass(s?"sorted-asc":"sorted-desc"),i.table.tHead?.rows[0].cells[n].removeClass(s?"sorted-desc":"sorted-asc")):(i.asc[n]=void 0,i.table.tHead?.rows[0].cells[n].removeClasses(["sorted-asc","sorted-desc"]))}showPageRows(t){let i=this.sortableTables[t];if(!i)return;i.table.tBodies[0].replaceChildren();let s=i.page;for(let n=0,o=i.rows.length;n<i.maxRows&&s*i.maxRows+n<o;++n)i.table.tBodies[0].appendChild(i.rows[s*i.maxRows+n].el);this.mountPagination(t)}showFirstPage(t){let i=this.sortableTables[t];i&&(i.page=0,this.showPageRows(t))}showPreviousPage(t,i){let s=this.sortableTables[t];s&&(s.page-=i,s.page<0?this.showFirstPage(t):this.showPageRows(t))}showNextPage(t,i){let s=this.sortableTables[t];s&&(s.page+=i,s.page>=this.numberOfPages(t)?this.showLastPage(t):this.showPageRows(t))}showLastPage(t){let i=this.sortableTables[t];i&&(i.page=this.numberOfPages(t)-1,this.showPageRows(t))}numberOfPages(t){let i=this.sortableTables[t];return i?Math.ceil(i.rows.length/i.maxRows):0}focusOnTarget(){if(!this.target)return;let t=this.sortableTables[this.target.tableID];if(!t)return;let i=t.rows.findIndex(n=>n.id===this.target?.elementID);if(i===-1)return;t.page=Math.floor(i/t.maxRows),this.showPageRows(this.target.tableID);let s=t.rows[i].el;s.addClass("is-flashing"),s.win.setTimeout(function(){return s.removeClass("is-flashing")},1500)}onClose(){this.contentEl.empty()}};function r5(r,e){let t=0;for(let i=1;i<r.length;i++)Math.abs(r[i]-e)<=Math.abs(r[t]-e)&&(t=i);return t}function j6(r){return r.view.getViewType()==="graph"||r.view.getViewType()==="localgraph"?r.view:void 0}function ts(r){return r.getViewType()==="graph"?r.dataEngine:r.engine}function Wr(r,e){let t=()=>{r.alpha<(r.maxAlpha??1)?(r.alpha+=.04,requestAnimationFrame(t)):(r.hasFaded=!0,e&&e())};r.alpha=0,r.hasFaded=!1,requestAnimationFrame(t)}function Rc(r,e){return r.children.contains(e)?r.getChildIndex(e):e.parent?Rc(r,e.parent):0}function ze(r,...e){return(u.proxysManager.getTargetForProxy(r)??r).addChild(...e.map(t=>u.proxysManager.getTargetForProxy(t)??t))}function Jt(r,e,t){return(u.proxysManager.getTargetForProxy(r)??r).addChildAt(u.proxysManager.getTargetForProxy(e)??e,t)}function Qe(r,e){let t=document.createElementNS("http://www.w3.org/2000/svg",r);for(let i in e)t.setAttributeNS(null,i.replace(/[A-Z]/g,function(s,n,o,a){return"-"+s.toLowerCase()}),e[i]);return t}function j8(r,e,t,i){return{x:r+t*Math.cos(i),y:e+t*Math.sin(i)}}function dn(r,e,t,i){let s=(1-r)*((1-r)*e.x+r*t.x),n=(1-r)*((1-r)*e.y+r*t.y),o=r*((1-r)*t.x+r*i.x),a=r*((1-r)*t.y+r*i.y),l=s+o,c=n+a;return{x:l,y:c}}function h1(r,e,t,i){let s={x:(1-r)*e.x+r*t.x,y:(1-r)*e.y+r*t.y},n={x:(1-r)*t.x+r*i.x,y:(1-r)*t.y+r*i.y},o=(n.y-s.y)/(n.x-s.x);return{m:o,c:s.y-o*s.x}}function u5(r,e,t,i){let s=e.x-t.x-t.x+i.x,n=e.y-t.y-t.y+i.y,o=t.x+t.x-e.x-e.x,a=t.y+t.y-e.y-e.y,l=4*(s*s+n*n),c=4*(s*o+n*a),h=o*o+a*a,d=c/(2*l),p=h/l,g=r+d,v=p-d*d,C=Math.sqrt(d*d+v),w=Math.sqrt(g*g+v);return .5*Math.sqrt(l)*(g*w-d*C+v*Math.log(Math.abs((g+w)/(d+C))))}function za(r,e,t){let i=t.x-e.x,s=t.y-e.y;return Math.sqrt(i*i+s*s)*r}var Sn=require("obsidian");var $a=class r{static async getImageUriFromProperty(e,t){let i=u.app.metadataCache.getCache(t);if(!i)return null;let s=i.frontmatter;if(!s)return null;let n=s[e];if(typeof n=="string"){let o=await r.getImageUriFromLink(X8(n));if(o)return o}else if(Array.isArray(n)){for(let o of n)if(typeof o=="string"){let a=await r.getImageUriFromLink(X8(o));if(a)return a}}return null}static async getImageUriFromEmbeds(e){let t=u.app.metadataCache.getCache(e);if(!t)return null;let i=t.embeds?.map(s=>s.link)??[];if(i.length===0){let s=qe(e);if(!s)return null;let n=await u.app.vault.cachedRead(s),o=createDiv();await Sn.MarkdownRenderer.render(u.app,n,o,e,u.plugin);let a=Array.from(o.querySelectorAll("img")).map(c=>c.src),l=Array.from(o.querySelectorAll("video")).map(c=>c.src);i=i.concat(a.concat(l))}for(let s of i){let n=await r.getImageUriFromLink(s);if(n)return n}return null}static async getImageUriForAttachment(e){let t=qe(e);return t?r.getStaticImageUri(u.app.vault.getResourcePath(t)):null}static async getImageUriFromLink(e){let t=u.app.metadataCache.getFirstLinkpathDest(e,".");if(t){let i=u.app.vault.getResourcePath(t);return r.getStaticImageUri(i)}if(u.settings.allowExternalImages)try{let i=new URL(e);if(i.protocol==="http:"||i.protocol==="https:"){let s=await(0,Sn.requestUrl)(e),n=s.headers["content-type"];return["image/avif","image/webp","image/png","image/svg+xml","image/jpeg"].includes(n)?"data:"+n+";base64,"+(0,Sn.arrayBufferToBase64)(s.arrayBuffer):null}}catch{return null}if(u.settings.allowExternalLocalImages)try{let i=new URL(e);if(i.protocol==="file:")return e.startsWith("file:///")&&(e=e.replace("file:///","")),e=Sn.Platform.resourcePathPrefix+e,r.getStaticImageUri(e);if(i.protocol==="app:")return r.getStaticImageUri(e)}catch{return null}return null}static async getStaticImageUri(e){let t=await r.getMediaType(e);return t?["image/avif","image/webp","image/png","image/svg+xml","image/jpeg"].includes(t)?e:["image/gif"].includes(t)?r.getUriForGif(e):["video/mp4","video/webm","video/ogg","video/quicktime","video/x-matroska"].includes(t)?r.getUriForVideo(e):null:null}static async getUriForGif(e){let t=createEl("canvas"),i=t.getContext("2d");if(i){let s,n=new Image;n.onload=()=>{t.width=n.width,t.height=n.height,i.drawImage(n,0,0),s=t.toDataURL()},n.src=e;let o=0;return await(async()=>{for(;s===void 0&&o<5;)o+=1,await new Promise(a=>setTimeout(a,100))})(),s??null}return null}static async getUriForVideo(e){let t=createEl("canvas"),i=t.getContext("2d");if(i){let s,n=createEl("video");n.src=e,n.addEventListener("seeked",function(){i.drawImage(n,0,0,t.width,t.height),s=t.toDataURL()}),n.onloadedmetadata=function(){n.duration&&(n.currentTime=n.duration/2)};let o=0;return await(async()=>{for(;s===void 0&&o<5;)o+=1,await new Promise(a=>setTimeout(a,100))})(),s??null}return null}static async getMediaType(e){let t,i=new XMLHttpRequest;i.open("HEAD",e,!1),i.onload=function(){t=i.getResponseHeader("Content-Type")},i.onerror=function(n){console.warn(n),t=null},i.onreadystatechange=function(){i.status===401&&console.warn(m("errors.uri401"))};try{i.send()}catch(n){console.warn(n),t=null}let s=0;return await(async()=>{for(;t===void 0&&s<5;)s+=1,await new Promise(n=>setTimeout(n,100))})(),t??null}};function fi(r,e){if(!r)return{path:r,basename:"",ext:""};r=r.replace(/\/+$/,"");let t=Math.max(r.lastIndexOf("/"),r.lastIndexOf("\\")),i=t===-1?r:r.substring(t+1);if(e){if(!i.contains(e))throw new Error(`The path "${r}" is not of extension "${e}".`)}else{let n=i.lastIndexOf(".");e=n===-1?"":i.substring(n)}!e.startsWith(".")&&e&&(e="."+e);let s;if(e.length>1){let n=i.lastIndexOf(e);s=n===-1?i:i.substring(0,n)}else s=i;return{path:r,basename:s,ext:e}}var pv=require("obsidian"),fv=St(dv());function $_(){return u.app.plugins.getPlugin("iconic")}function o5(r){let e=$_();if(!e||!e.hasOwnProperty("ruleManager")||typeof e.ruleManager.checkRuling!="function"||typeof e.getFileItem!="function")return null;let t=u.app.vault.getFolderByPath(r)?"folder":"file",i=e.ruleManager.checkRuling(t,r)??e.getFileItem(r);if(i.icon?.startsWith("lucide-")){let s=(0,pv.getIcon)(i.icon);if(s){let n=getComputedStyle(document.body),o=null;return i.hasOwnProperty("color")&&(o=n.getPropertyValue(`--color-${i.color}`)||null),{svg:s,color:o,emoji:null}}}else if(i.icon&&Bc(i.icon))return{svg:null,color:null,emoji:i.icon};return null}function a5(r){let e=u.app.plugins.getPlugin("obsidian-icon-folder");if(!e||!e.hasOwnProperty("api")||!e.api.hasOwnProperty("getIconByName")||!e.hasOwnProperty("data")||!(r in e.data))return null;let t=e.data[r],i,s=null;if(typeof t=="string"?i=t:(i=t.iconName,s=t.iconColor),!i)return null;let n=e.api.getIconByName(i);if(n){let o=n.svgElement;return{svg:new DOMParser().parseFromString(o,"text/html").querySelector("svg"),color:s,emoji:null}}return typeof i=="string"&&i!==""&&Bc(i)?{svg:null,color:null,emoji:i}:null}function gv(){return this.app.plugins.getPlugin("graph-banner")?._loaded}function Cl(){return"graph-banner-content"}function ap(r){return r.contentEl.classList.contains(Cl())}function Sl(){return u.app.plugins.getPlugin("graph-banner")}function N0(r){return r?void 0:(0,fv.getAPI)(u.app)}function s5(r,e){let t=[];for(let[i,s]of Object.entries(e))i!=="file"&&(s==null||s===""||!r&&i===zt(i)&&Object.keys(e).some(n=>zt(n)===zt(i)&&n!==i)||t.push(r?zt(i):i));return t}function y0(){let r=u.app.plugins.getPlugin("nlp");if(r)return r?.settings?.refreshDocsOnLoad?r:void 0}var vl=St(mv());var M6=()=>/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26D3\uFE0F?(?:\u200D\uD83D\uDCA5)?|\u26F9(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF43\uDF45-\uDF4A\uDF4C-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDF44(?:\u200D\uD83D\uDFEB)?|\uDF4B(?:\u200D\uD83D\uDFE9)?|\uDFC3(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4\uDEB5](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE41\uDE43\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC08(?:\u200D\u2B1B)?|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC26(?:\u200D(?:\u2B1B|\uD83D\uDD25))?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uD83C[\uDFFB-\uDFFF]|\uFE0F)?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?|\uDE42(?:\u200D[\u2194\u2195]\uFE0F?)?|\uDEB6(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE89\uDE8F-\uDEC2\uDEC6\uDECE-\uDEDC\uDEDF-\uDEE9]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDCE(?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D(?:[\u2640\u2642]\uFE0F?(?:\u200D\u27A1\uFE0F?)?|\u27A1\uFE0F?))?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1|\uDDD1\u200D\uD83E\uDDD2(?:\u200D\uD83E\uDDD2)?|\uDDD2(?:\u200D\uD83E\uDDD2)?))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF\uDDBC\uDDBD](?:\u200D\u27A1\uFE0F?)?|[\uDDB0-\uDDB3]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g;var Ki=require("obsidian");function l5(r){return/^\d+(\.\d+)?$/.test(r)}function rl(r){return r.contains(":")?(new Ki.Notice(m("notices.invalidCharacter")+" ':'"),!1):r.length>0}function X8(r){return r.replace("[[","").replace("]]","")}function c9(r){return r.replaceAll(" ","-").replaceAll(/[~!@$%^&*()+=,.\\\/';:"?><[\]{}|`#]/g,"")}function c5(r){return r.split("/").reduce((e,t,i)=>{if(t==="")return e;let s=e.last();return s&&s!==""?e.push(s+"/"+t):e.push(t),e},[])}function Bc(r){return M6().test(r)}function yv(){return/(\/)(.+)\1([a-z]*)/i}function Nm(r){return yv().test(r)}function Jf(r){let e=r.match(yv());return e===null?null:new RegExp(e[2],e[3])}function Ri(r,e){return r.localeCompare(e,(0,Ki.getLanguage)(),{sensitivity:"base"})}function vv(){return Ki.Platform.isWin?'*"\\/<>:|?':"\\/:"+(Ki.Platform.isAndroidApp?'*?<>"':"")}function xv(){return new RegExp("["+vv().replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")+"]")}function Ku(r,e=!0){return r.trim()===""?(e&&new Ki.Notice(Gu("plugins.file-explorer.msg-empty-file-name")),!1):r.startsWith(".")?(e&&new Ki.Notice(Gu("plugins.file-explorer.msg-bad-dotfile")),!1):xv().test(r)?(e&&new Ki.Notice(Gu("plugins.file-explorer.msg-invalid-characters")+vv().split("").join("\xA0")),!1):!0}function $6(r){return r=r.replace(xv(),""),r.startsWith(".")&&(r=r.slice(1)),r===""&&(r="_"),r}var q_=vl.default.alt(vl.default.regex(new RegExp(M6(),"")),vl.default.regex(/[0-9\p{Letter}_-]+/u).map(r=>r.toLocaleLowerCase()),vl.default.whitespace.map(r=>"-"),vl.default.any.map(r=>"")).many().map(r=>r.join(""));function zt(r){return q_.tryParse(r)}function h8(r,e){r.getAttr("fill")&&r.getAttr("fill")!=="none"&&r.setAttr("fill",e),r.getAttr("stroke")&&r.getAttr("stroke")!=="none"&&r.setAttr("stroke",e);for(let t of Array.from(r.children))t instanceof SVGElement&&h8(t,e)}var ip=class extends _t.Plugin{async onload(){await this.checkDataValidity(),u.plugin=this,u.app=this.app,u.configurationDirectory=(0,_t.normalizePath)(this.manifest.dir+"/configs/"),u.proxysManager=new Vu,await this.loadSettings(),this.addIcons(),this.initializeInvalidKeys(),this.addSettingTab(new W1(this)),u.graphsManager=new zu,u.statesManager=new Xu,this.app.workspace.onLayoutReady(()=>{this.loadGraphsManager(),this.onLayoutChange()}),this.registerEvent(this.app.workspace.on("file-open",async e=>{if(!gv()||!e||e.extension!=="md")return;let t=this.app.workspace.getActiveViewOfType(_t.MarkdownView);!t||t.file!==e||this.onMarkdownViewOpen(t)})),W6(this)}addIcons(){let e=4.166666666666667;(0,_t.addIcon)("git-fork-sparkles",'<g fill="none" stroke="currentColor" stroke-width="8" stroke-linecap="round" stroke-linejoin="round" class="git-fork-sparkles"><circle cx="50" cy="76" r="12"/><circle cx="25" cy="25" r="12"/><circle cx="76" cy="25" r="12"/><path d="M76 36v8c0 2.4-1.6 4-4 4H28c-2.4 0-4-1.6-4-4V36"/><path d="M50 50v12"/><path d="m 82.03746,54.745552 v 16"/><path d="m 90.03746,62.745552 h -16"/><path d="m 72.5023,80.767008 v 8"/><path d="m 76.5023,84.767008 h -8"/><path d="m 14.7461264,54.15018 v 8"/><path d="m 18.7461264,58.15018 h -8"/></g>'),(0,_t.getIcon)("squares-unite")||(0,_t.addIcon)("squares-unite",`<g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svg-icon lucide-squares-unite" transform="scale(${e})"><path d="M4 16a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v3a1 1 0 0 0 1 1h3a2 2 0 0 1 2 2v10a2 2 0 0 1-2 2H10a2 2 0 0 1-2-2v-3a1 1 0 0 0-1-1z"/></g>`),(0,_t.getIcon)("squares-subtract")||(0,_t.addIcon)("squares-subtract",`<g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svg-icon lucide-squares-subtract" transform="scale(${e})"><path d="M10 22a2 2 0 0 1-2-2"/><path d="M16 22h-2"/><path d="M16 4a2 2 0 0 0-2-2H4a2 2 0 0 0-2 2v10a2 2 0 0 0 2 2h3a1 1 0 0 0 1-1v-5a2 2 0 0 1 2-2h5a1 1 0 0 0 1-1z"/><path d="M20 8a2 2 0 0 1 2 2"/><path d="M22 14v2"/><path d="M22 20a2 2 0 0 1-2 2"/></g>`),(0,_t.getIcon)("squares-intersect")||(0,_t.addIcon)("squares-intersect",`<g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="svg-icon lucide-squares-intersect" transform="scale(${e})"><path d="M10 22a2 2 0 0 1-2-2"/><path d="M14 2a2 2 0 0 1 2 2"/><path d="M16 22h-2"/><path d="M2 10V8"/><path d="M2 4a2 2 0 0 1 2-2"/><path d="M20 8a2 2 0 0 1 2 2"/><path d="M22 14v2"/><path d="M22 20a2 2 0 0 1-2 2"/><path d="M4 16a2 2 0 0 1-2-2"/><path d="M8 10a2 2 0 0 1 2-2h5a1 1 0 0 1 1 1v5a2 2 0 0 1-2 2H9a1 1 0 0 1-1-1z"/><path d="M8 2h2"/></g>`),this.createPinIconUrl()}initializeInvalidKeys(){for(let e of Object.keys(u.settings.additionalProperties))ei[e]=[]}loadGraphsManager(){this.addChild(u.graphsManager),u.graphsManager.load()}createPinIconUrl(){let t=getComputedStyle(document.body).getPropertyValue("--color-base-00"),i=u.app.getAccentColor(),s=this.app.vault.getConfig("cssTheme")==="Velocity";s&&((0,_t.getIcon)("pin-safety")||(0,_t.addIcon)("pin-safety",`<g fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide-pin-safety" transform="scale(${4.166666666666667})"><path d="M20.8 3.2c-1.6-1.6-4.1-1.6-5.7 0L12.3 6S15 9 18 6c-3 3 0 5.7 0 5.7l2.8-2.8c1.6-1.6 1.6-4.2 0-5.7"/><path d="m7.1 21.1 10.3-10.2"/><circle cx="5" cy="19" r="3"/><path d="M2.9 16.9 13.1 6.6"/></g>`));let n=s?(0,_t.getIcon)("pin-safety"):(0,_t.getIcon)("pin");if(n){if(s)n.getElementsByTagName("g")[0].setAttribute("stroke",i);else{let a=n.getElementsByTagName("path")[0],l=n.getElementsByTagName("path")[1];l.setAttribute("fill",i),l.setAttribute("stroke",t),a.setAttribute("stroke",i)}let o=new XMLSerializer;u.pinSVGDataUrl=`data:image/svg+xml;charset=utf-8,${encodeURIComponent(o.serializeToString(n))}`}}onunload(){}async checkDataValidity(){let e=(0,_t.normalizePath)((this.manifest.dir??"")+"/data.json");try{await this.app.vault.adapter.exists(e)&&JSON.parse(await this.app.vault.adapter.read(e))}catch(t){let i=`There is an error in the settings file ${e}, the json file can not be parsed. Please, make a copy of your file and report it on the GitHub repo, with the copy attached. Then, you can try to fix the file by hand, or fully delete the content of ${e} and start using the plugin again (but you will lose your settings). I apologize for the inconvenience.`;throw new _t.Notice(i,0),console.warn(i),t}}async loadSettings(){let e=await this.loadData();this.completeDefaultSettings(),e?e=this.migrateSettings(e):e=gi,this.loadSettingsRec(gi,e),u.settings=e}migrateSettings(e){if(!e)return gi;if(typeof e!="object")return gi;for(let t in e)gi.hasOwnProperty(t)||delete e[t];if("additionalProperties"in e&&typeof e.additionalProperties=="object"){for(let t of Object.keys(e.additionalProperties))if(typeof e.additionalProperties[t]=="boolean"){let i=e.additionalProperties[t];e.additionalProperties[t]={graph:i,localgraph:i}}}if("enableFeatures"in e||(e.enableFeatures={graph:{},localgraph:{}}),"linksSameColorAsNode"in e&&(e.enableFeatures.graph.linksSameColorAsNode=e.linksSameColorAsNode,e.enableFeatures.localgraph.linksSameColorAsNode=e.linksSameColorAsNode,delete e.linksSameColorAsNode),"enableFeatures"in e&&("curvedLinks"in e.enableFeatures.graph&&(e.curvedLinks=e.enableFeatures.graph.curvedLinks),delete e.enableFeatures.graph.curvedLinks,delete e.enableFeatures.localgraph.curvedLinks),"source"in e.enableFeatures.graph&&(e.disableSource=e.enableFeatures.graph.source,delete e.enableFeatures.graph.source,delete e.enableFeatures.localgraph.source),"target"in e.enableFeatures.graph&&(e.disableTarget=e.enableFeatures.graph.target,delete e.enableFeatures.graph.target,delete e.enableFeatures.localgraph.target),"collapsedSettings"in e&&"property-key"in e.collapsedSettings&&delete e.collapsedSettings["property-key"],"iconProperty"in e&&("iconProperties"in e||(e.iconProperties=[]),e.iconProperties.contains(e.iconProperty)||e.iconProperties.push(e.iconProperty),delete e.iconProperty),"nodesSizeProperty"in e&&("nodesSizeProperties"in e||(e.nodesSizeProperties=[]),e.nodesSizeProperties.contains(e.nodesSizeProperty)||e.nodesSizeProperties.push(e.nodesSizeProperty),delete e.nodesSizeProperty),"imageProperty"in e&&("imageProperties"in e||(e.imageProperties=[]),e.imageProperties.contains(e.imageProperty)||e.imageProperties.push(e.imageProperty),delete e.imageProperty),"usePropertyForName"in e&&("usePropertiesForName"in e||(e.usePropertiesForName=[]),e.usePropertyForName&&!e.usePropertiesForName.contains(e.usePropertyForName)&&e.usePropertiesForName.push(e.usePropertyForName),delete e.usePropertyForName),"interactiveSettings"in e)if(typeof e.interactiveSettings=="object")for(let t of Object.keys(e.interactiveSettings))(!("excludeRegex"in e.interactiveSettings[t])||typeof e.interactiveSettings[t].excludeRegex!="object")&&(e.interactiveSettings[t].excludeRegex={regex:"",flags:""});else e.interactiveSettings={};if(typeof e.customColorMaps=="object"){for(let t in e.customColorMaps)if(Array.isArray(e.customColorMaps[t].colors))for(let i in e.customColorMaps[t].colors){let s=e.customColorMaps[t].colors[i];Array.isArray(s)&&(s.every(n=>typeof n=="number")?e.customColorMaps[t].colors[i]=Nf(s.map(n=>Math.round(n*255))):e.customColorMaps[t].colors[i]="#000000")}}if("removeNodesWithoutLayers"in e&&(typeof e.removeNodesWithoutLayers=="boolean"&&(e.nodesWithoutLayerOpacity=e.removeNodesWithoutLayers?0:1),delete e.removeNodesWithoutLayers),"states"in e&&Array.isArray(e.states)){let t=e.states.find(i=>i.id===Jr);t.name==="Vault (default)"&&(t.name=V8.name)}return"invertNodeStats"in e&&typeof e.invertNodeStats=="boolean"&&(e.graphStatsDirection=e.invertNodeStats?"reversed":"normal",delete e.invertNodeStats),e}completeDefaultSettings(){gi.interactiveSettings[He]={colormap:"hsv",colors:[],unselected:[],excludeRegex:{regex:"",flags:""},noneType:"none",showOnGraph:!0,enableByDefault:!0},gi.interactiveSettings[ne]={colormap:"rainbow",colors:[],unselected:[],excludeRegex:{regex:"",flags:""},noneType:"none",showOnGraph:!0,enableByDefault:!0},gi.interactiveSettings[pe]={colormap:"winter",colors:[],unselected:[],excludeRegex:{regex:"",flags:""},noneType:"/",showOnGraph:!0,enableByDefault:!1}}loadSettingsRec(e,t){if(!(!e||typeof e!="object"||Array.isArray(e))&&!(!t||typeof t!="object"||Array.isArray(t)))for(let i in e)t.hasOwnProperty(i)?this.loadSettingsRec(e[i],t[i]):t[i]=e[i]}async saveSettings(){await this.saveData(u.settings)}async loadConfigFile(e){e=(0,_t.normalizePath)(e);let t=await this.app.vault.adapter.read(e),i=JSON.parse(t),s=i.stateID;return i=this.migrateSettings(i),delete i.states,delete i.backupGraphOptions,delete i.customColorMaps,delete i.collapseState,delete i.collapseLegend,delete i.resetAfterChanges,delete i.collapsedSettings,delete i.multipleNodesData,this.loadSettingsRec(u.settings,i),s&&(i.stateID=s),i}async importSettings(e){let t=await this.loadConfigFile(e);delete t.stateID,u.settings=t,await this.saveSettings(),this.exportSettings(e,u.settings)}async exportSettings(e,t,i){this.app.vault.adapter.mkdir(u.configurationDirectory),e=(0,_t.normalizePath)(e);let s=structuredClone(t);if(delete s.states,delete s.backupGraphOptions,delete s.customColorMaps,delete s.collapseState,delete s.collapseLegend,delete s.resetAfterChanges,delete s.collapsedSettings,delete s.multipleNodesData,i)s.stateID=i.data.id;else{let o=u.statesManager.getStateFromConfig(e);o&&(s.stateID=o)}let n=JSON.stringify(s,null,2);await this.app.vault.adapter.write(e,n),s.stateID&&u.statesManager.cacheConfig(e)}async onLayoutChange(){if(!this.app.internalPlugins.getPluginById("graph")?._loaded)return;let e=this.getGraphLeaves();u.graphsManager.syncWithLeaves(e),e.forEach(t=>{u.graphsManager.initLeaf(t)})}getGraphLeaves(){let e=[];return e=e.concat(this.app.workspace.getLeavesOfType("graph")),e=e.concat(this.app.workspace.getLeavesOfType("localgraph")),e=e.concat(Sl()?.graphViews.map(t=>t.leaf)||[]),[...new Set(e)]}onMarkdownViewOpen(e){let t=e.contentEl,i={attributes:!0,childList:!0,subtree:!0},s=(o,a)=>{for(let l of o)l.type==="childList"&&l.addedNodes.length>0&&l.addedNodes[0].classList?.contains(Cl())&&this.onLayoutChange()},n=new MutationObserver(s);n.observe(t,i),setTimeout(()=>{n.disconnect()},2e3)}};
|
|
/*! Bundled license information:
|
|
|
|
chroma-js/src/utils/contrastAPCA.js:
|
|
(**
|
|
* @license
|
|
*
|
|
* The APCA contrast prediction algorithm is based of the formulas published
|
|
* in the APCA-1.0.98G specification by Myndex. The specification is available at:
|
|
* https://raw.githubusercontent.com/Myndex/apca-w3/master/images/APCAw3_0.1.17_APCA0.0.98G.svg
|
|
*
|
|
* Note that the APCA implementation is still beta, so please update to
|
|
* future versions of chroma.js when they become available.
|
|
*
|
|
* You can read more about the APCA Readability Criterion at
|
|
* https://readtech.org/ARC/
|
|
*)
|
|
|
|
@pixi/filter-outline/dist/filter-outline.mjs:
|
|
(*!
|
|
* @pixi/filter-outline - v5.2.0
|
|
* Compiled Tue, 28 Feb 2023 14:24:35 UTC
|
|
*
|
|
* @pixi/filter-outline is licensed under the MIT License.
|
|
* http://www.opensource.org/licenses/mit-license
|
|
*)
|
|
*/
|
|
|
|
/* nosourcemap */ |