Snapshot of main at 9f39a6e1e (2026-11-02)

This commit is contained in:
Ronald Huynen committed 2026-11-02 10:41:47 +01:00
commit 6ccf1792d7
2580 files changed
+1040202

No files matched your search

@@ -0,0 +1,331 @@
(function(){"use strict";function hi(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,a=Array(e);r<e;r++)a[r]=t[r];return a}function oh(t){if(Array.isArray(t))return t}function sh(t){if(Array.isArray(t))return hi(t)}function ir(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function uh(t,e){for(var r=0;r<e.length;r++){var a=e[r];a.enumerable=a.enumerable||!1,a.configurable=!0,"value"in a&&(a.writable=!0),Object.defineProperty(t,Bs(a.key),a)}}function or(t,e,r){return e&&uh(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t}function Ot(t,e){var r=typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(!r){if(Array.isArray(t)||(r=ci(t))||e){r&&(t=r);var a=0,n=function(){};return{s:n,n:function(){return a>=t.length?{done:!0}:{done:!1,value:t[a++]}},e:function(u){throw u},f:n}}throw new TypeError(`Invalid attempt to iterate non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var i,o=!0,s=!1;return{s:function(){r=r.call(t)},n:function(){var u=r.next();return o=u.done,u},e:function(u){s=!0,i=u},f:function(){try{o||r.return==null||r.return()}finally{if(s)throw i}}}}function Is(t,e,r){return(e=Bs(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function lh(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function fh(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var a,n,i,o,s=[],u=!0,l=!1;try{if(i=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;u=!1}else for(;!(u=(a=i.call(r)).done)&&(s.push(a.value),s.length!==e);u=!0);}catch(f){l=!0,n=f}finally{try{if(!u&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(l)throw n}}return s}}function vh(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function hh(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function vt(t,e){return oh(t)||fh(t,e)||ci(t,e)||vh()}function an(t){return sh(t)||lh(t)||ci(t)||hh()}function ch(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var a=r.call(t,e);if(typeof a!="object")return a;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}function Bs(t){var e=ch(t,"string");return typeof e=="symbol"?e:e+""}function ct(t){"@babel/helpers - typeof";return ct=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},ct(t)}function ci(t,e){if(t){if(typeof t=="string")return hi(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?hi(t,e):void 0}}var dt=typeof window>"u"?null:window,Fs=dt?dt.navigator:null;dt&&dt.document;var dh=ct(""),ks=ct({}),gh=ct(function(){}),ph=typeof HTMLElement>"u"?"undefined":ct(HTMLElement),ba=function(e){return e&&e.instanceString&&it(e.instanceString)?e.instanceString():null},Ne=function(e){return e!=null&&ct(e)==dh},it=function(e){return e!=null&&ct(e)===gh},Je=function(e){return!Ft(e)&&(Array.isArray?Array.isArray(e):e!=null&&e instanceof Array)},Ue=function(e){return e!=null&&ct(e)===ks&&!Je(e)&&e.constructor===Object},yh=function(e){return e!=null&&ct(e)===ks},be=function(e){return e!=null&&ct(e)===ct(1)&&!isNaN(e)},zs=function(e){return be(e)&&Math.floor(e)===e},nn=function(e){if(ph!=="undefined")return e!=null&&e instanceof HTMLElement},Ft=function(e){return wa(e)||Vs(e)},wa=function(e){return ba(e)==="collection"&&e._private.single},Vs=function(e){return ba(e)==="collection"&&!e._private.single},di=function(e){return ba(e)==="core"},Gs=function(e){return ba(e)==="stylesheet"},mh=function(e){return ba(e)==="event"},sr=function(e){return e==null?!0:!!(e===""||e.match(/^\s+$/))},bh=function(e){return typeof HTMLElement>"u"?!1:e instanceof HTMLElement},wh=function(e){return Ue(e)&&be(e.x1)&&be(e.x2)&&be(e.y1)&&be(e.y2)},Eh=function(e){return yh(e)&&it(e.then)},xh=function(){return Fs&&Fs.userAgent.match(/msie|trident|edge/i)},Yr=function(e,r){r||(r=function(){if(arguments.length===1)return arguments[0];if(arguments.length===0)return"undefined";for(var i=[],o=0;o<arguments.length;o++)i.push(arguments[o]);return i.join("$")});var a=function(){var i=this,o=arguments,s,u=r.apply(i,o),l=a.cache;return(s=l[u])||(s=l[u]=e.apply(i,o)),s};return a.cache={},a},gi=Yr(function(t){return t.replace(/([A-Z])/g,function(e){return"-"+e.toLowerCase()})}),on=Yr(function(t){return t.replace(/(-\w)/g,function(e){return e[1].toUpperCase()})}),Us=Yr(function(t,e){return t+e[0].toUpperCase()+e.substring(1)},function(t,e){return t+"$"+e}),Hs=function(e){return sr(e)?e:e.charAt(0).toUpperCase()+e.substring(1)},ur=function(e,r){return e.slice(-1*r.length)===r},gt="(?:[-+]?(?:(?:\\d+|\\d*\\.\\d+)(?:[Ee][+-]?\\d+)?))",Th="rgb[a]?\\(("+gt+"[%]?)\\s*,\\s*("+gt+"[%]?)\\s*,\\s*("+gt+"[%]?)(?:\\s*,\\s*("+gt+"))?\\)",Ch="rgb[a]?\\((?:"+gt+"[%]?)\\s*,\\s*(?:"+gt+"[%]?)\\s*,\\s*(?:"+gt+"[%]?)(?:\\s*,\\s*(?:"+gt+"))?\\)",Sh="hsl[a]?\\(("+gt+")\\s*,\\s*("+gt+"[%])\\s*,\\s*("+gt+"[%])(?:\\s*,\\s*("+gt+"))?\\)",Ah="hsl[a]?\\((?:"+gt+")\\s*,\\s*(?:"+gt+"[%])\\s*,\\s*(?:"+gt+"[%])(?:\\s*,\\s*(?:"+gt+"))?\\)",Dh="\\#[0-9a-fA-F]{3}",Lh="\\#[0-9a-fA-F]{6}",qs=function(e,r){return e<r?-1:e>r?1:0},Mh=function(e,r){return-1*qs(e,r)},Oe=Object.assign!=null?Object.assign.bind(Object):function(t){for(var e=arguments,r=1;r<e.length;r++){var a=e[r];if(a!=null)for(var n=Object.keys(a),i=0;i<n.length;i++){var o=n[i];t[o]=a[o]}}return t},Rh=function(e){if(!(!(e.length===4||e.length===7)||e[0]!=="#")){var r=e.length===4,a,n,i,o=16;return r?(a=parseInt(e[1]+e[1],o),n=parseInt(e[2]+e[2],o),i=parseInt(e[3]+e[3],o)):(a=parseInt(e[1]+e[2],o),n=parseInt(e[3]+e[4],o),i=parseInt(e[5]+e[6],o)),[a,n,i]}},Nh=function(e){var r,a,n,i,o,s,u,l;function f(d,p,y){return y<0&&(y+=1),y>1&&(y-=1),y<1/6?d+(p-d)*6*y:y<1/2?p:y<2/3?d+(p-d)*(2/3-y)*6:d}var v=new RegExp("^"+Sh+"$").exec(e);if(v){if(a=parseInt(v[1]),a<0?a=(360- -1*a%360)%360:a>360&&(a=a%360),a/=360,n=parseFloat(v[2]),n<0||n>100||(n=n/100,i=parseFloat(v[3]),i<0||i>100)||(i=i/100,o=v[4],o!==void 0&&(o=parseFloat(o),o<0||o>1)))return;if(n===0)s=u=l=Math.round(i*255);else{var c=i<.5?i*(1+n):i+n-i*n,h=2*i-c;s=Math.round(255*f(h,c,a+1/3)),u=Math.round(255*f(h,c,a)),l=Math.round(255*f(h,c,a-1/3))}r=[s,u,l,o]}return r},Ph=function(e){var r,a=new RegExp("^"+Th+"$").exec(e);if(a){r=[];for(var n=[],i=1;i<=3;i++){var o=a[i];if(o[o.length-1]==="%"&&(n[i]=!0),o=parseFloat(o),n[i]&&(o=o/100*255),o<0||o>255)return;r.push(Math.floor(o))}var s=n[1]||n[2]||n[3],u=n[1]&&n[2]&&n[3];if(s&&!u)return;var l=a[4];if(l!==void 0){if(l=parseFloat(l),l<0||l>1)re Line truncated
Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable
Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com)
Licensed under The MIT License (http://opensource.org/licenses/MIT)
*/var Ku=0,_u=1,Zu=2,Ut=function(e){if(!(this instanceof Ut))return new Ut(e);this.id="Thenable/1.0.7",this.state=Ku,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},typeof e=="function"&&e.call(this,this.fulfill.bind(this),this.reject.bind(this))};Ut.prototype={fulfill:function(e){return Qu(this,_u,"fulfillValue",e)},reject:function(e){return Qu(this,Zu,"rejectReason",e)},then:function(e,r){var a=this,n=new Ut;return a.onFulfilled.push(el(e,n,"fulfill")),a.onRejected.push(el(r,n,"reject")),Ju(a),n.proxy}};var Qu=function(e,r,a,n){return e.state===Ku&&(e.state=r,e[a]=n,Ju(e)),e},Ju=function(e){e.state===_u?ju(e,"onFulfilled",e.fulfillValue):e.state===Zu&&ju(e,"onRejected",e.rejectReason)},ju=function(e,r,a){if(e[r].length!==0){var n=e[r];e[r]=[];var i=function(){for(var s=0;s<n.length;s++)n[s](a)};typeof setImmediate=="function"?setImmediate(i):setTimeout(i,0)}},el=function(e,r,a){return function(n){if(typeof e!="function")r[a].call(r,n);else{var i;try{i=e(n)}catch(o){r.reject(o);return}tl(r,i)}}},tl=function(e,r){if(e===r||e.proxy===r){e.reject(new TypeError("cannot resolve promise with itself"));return}var a;if(ct(r)==="object"&&r!==null||typeof r=="function")try{a=r.then}catch(i){e.reject(i);return}if(typeof a=="function"){var n=!1;try{a.call(r,function(i){n||(n=!0,i===r?e.reject(new TypeError("circular thenable chain")):tl(e,i))},function(i){n||(n=!0,e.reject(i))})}catch(i){n||e.reject(i)}return}e.fulfill(r)};Ut.all=function(t){return new Ut(function(e,r){for(var a=new Array(t.length),n=0,i=function(u,l){a[u]=l,n++,n===t.length&&e(a)},o=0;o<t.length;o++)(function(s){var u=t[s],l=u!=null&&u.then!=null;if(l)u.then(function(v){i(s,v)},function(v){r(v)});else{var f=u;i(s,f)}})(o)})},Ut.resolve=function(t){return new Ut(function(e,r){e(t)})},Ut.reject=function(t){return new Ut(function(e,r){r(t)})};var jr=typeof Promise<"u"?Promise:Ut,Qi=function(e,r,a){var n=di(e),i=!n,o=this._private=Oe({duration:1e3},r,a);if(o.target=e,o.style=o.style||o.css,o.started=!1,o.playing=!1,o.hooked=!1,o.applying=!1,o.progress=0,o.completes=[],o.frames=[],o.complete&&it(o.complete)&&o.completes.push(o.complete),i){var s=e.position();o.startPosition=o.startPosition||{x:s.x,y:s.y},o.startStyle=o.startStyle||e.cy().style().getAnimationStartStyle(e,o.style)}if(n){var u=e.pan();o.startPan={x:u.x,y:u.y},o.startZoom=e.zoom()}this.length=1,this[0]=this},Pr=Qi.prototype;Oe(Pr,{instanceString:function(){return"animation"},hook:function(){var e=this._private;if(!e.hooked){var r,a=e.target._private.animation;e.queue?r=a.queue:r=a.current,r.push(this),Ft(e.target)&&e.target.cy().addToAnimationPool(e.target),e.hooked=!0}return this},play:function(){var e=this._private;return e.progress===1&&(e.progress=0),e.playing=!0,e.started=!1,e.stopped=!1,this.hook(),this},playing:function(){return this._private.playing},apply:function(){var e=this._private;return e.applying=!0,e.started=!1,e.stopped=!1,this.hook(),this},applying:function(){return this._private.applying},pause:function(){var e=this._private;return e.playing=!1,e.started=!1,this},stop:function(){var e=this._private;return e.playing=!1,e.started=!1,e.stopped=!0,this},rewind:function(){return this.progress(0)},fastforward:function(){return this.progress(1)},time:function(e){var r=this._private;return e===void 0?r.progress*r.duration:this.progress(e/r.duration)},progress:function(e){var r=this._private,a=r.playing;return e===void 0?r.progress:(a&&this.pause(),r.progress=e,r.started=!1,a&&this.play(),this)},completed:function(){return this._private.progress===1},reverse:function(){var e=this._private,r=e.playing;r&&this.pause(),e.progress=1-e.progress,e.started=!1;var a=function(l,f){var v=e[l];v!=null&&(e[l]=e[f],e[f]=v)};if(a("zoom","startZoom"),a("pan","startPan"),a("position","startPosition"),e.style)for(var n=0;n<e.style.length;n++){var i=e.style[n],o=i.name,s=e.startStyle[o];e.startStyle[o]=i,e.style[n]=s}return r&&this.play(),this},promise:function(e){var r=this._private,a;switch(e){case"frame":a=r.frames;break;default:case"complete":case"completed":a=r.completes}return new jr(function(n,i){a.push(function(){n()})})}}),Pr.complete=Pr.completed,Pr.run=Pr.play,Pr.running=Pr.playing;var kd={animated:function(){return function(){var r=this,a=r.length!==void 0,n=a?r:[r],i=this._private.cy||this;if(!i.styleEnabled())return!1;var o=n[0];if(o)return o._private.animation.current.length>0}},clearQueue:function(){return function(){var r=this,a=r.length!==void 0,n=a?r:[r],i=this._private.cy||this;if(!i.styleEnabled())return this;for(var o=0;o<n.length;o++){var s=n[o];s._private.animation.queue=[]}return this}},delay:function(){return function(r,a){var n=this._private.cy||this;return n.styleEnabled()?this.animate({delay:r,duration:r,complete:a}):this}},delayAnimation:function(){return function(r,a){var n=this._private.cy||this;return n.styleEnabled()?this.animation({delay:r,duration:r,complete:a}):this}},animation:functLine truncated
Event object based on jQuery events, MIT license
https://jquery.org/license/
https://tldrlegal.com/license/mit-license
https://github.com/jquery/jquery/blob/master/src/event.js
*/var Ef=function(e,r){this.recycle(e,r)};function za(){return!1}function Pn(){return!0}Ef.prototype={instanceString:function(){return"event"},recycle:function(e,r){if(this.isImmediatePropagationStopped=this.isPropagationStopped=this.isDefaultPrevented=za,e!=null&&e.preventDefault?(this.type=e.type,this.isDefaultPrevented=e.defaultPrevented?Pn:za):e!=null&&e.type?r=e:this.type=e,r!=null&&(this.originalEvent=r.originalEvent,this.type=r.type!=null?r.type:this.type,this.cy=r.cy,this.target=r.target,this.position=r.position,this.renderedPosition=r.renderedPosition,this.namespace=r.namespace,this.layout=r.layout),this.cy!=null&&this.position!=null&&this.renderedPosition==null){var a=this.position,n=this.cy.zoom(),i=this.cy.pan();this.renderedPosition={x:a.x*n+i.x,y:a.y*n+i.y}}this.timeStamp=e&&e.timeStamp||Date.now()},preventDefault:function(){this.isDefaultPrevented=Pn;var e=this.originalEvent;e&&e.preventDefault&&e.preventDefault()},stopPropagation:function(){this.isPropagationStopped=Pn;var e=this.originalEvent;e&&e.stopPropagation&&e.stopPropagation()},stopImmediatePropagation:function(){this.isImmediatePropagationStopped=Pn,this.stopPropagation()},isDefaultPrevented:za,isPropagationStopped:za,isImmediatePropagationStopped:za};var xf=/^([^.]+)(\.(?:[^.]+))?$/,hp=".*",Tf={qualifierCompare:function(e,r){return e===r},eventMatches:function(){return!0},addEventFields:function(){},callbackContext:function(e){return e},beforeEmit:function(){},afterEmit:function(){},bubble:function(){return!1},parent:function(){return null},context:null},Cf=Object.keys(Tf),cp={};function On(){for(var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:cp,e=arguments.length>1?arguments[1]:void 0,r=0;r<Cf.length;r++){var a=Cf[r];this[a]=t[a]||Tf[a]}this.context=e||this.context,this.listeners=[],this.emitting=0}var wr=On.prototype,Sf=function(e,r,a,n,i,o,s){it(n)&&(i=n,n=null),s&&(o==null?o=s:o=Oe({},o,s));for(var u=Je(a)?a:a.split(/\s+/),l=0;l<u.length;l++){var f=u[l];if(!sr(f)){var v=f.match(xf);if(v){var c=v[1],h=v[2]?v[2]:null,d=r(e,f,c,h,n,i,o);if(d===!1)break}}}},Af=function(e,r){return e.addEventFields(e.context,r),new Ef(r.type,r)},dp=function(e,r,a){if(mh(a)){r(e,a);return}else if(Ue(a)){r(e,Af(e,a));return}for(var n=Je(a)?a:a.split(/\s+/),i=0;i<n.length;i++){var o=n[i];if(!sr(o)){var s=o.match(xf);if(s){var u=s[1],l=s[2]?s[2]:null,f=Af(e,{type:u,namespace:l,target:e.context});r(e,f)}}}};wr.on=wr.addListener=function(t,e,r,a,n){return Sf(this,function(i,o,s,u,l,f,v){it(f)&&i.listeners.push({event:o,callback:f,type:s,namespace:u,qualifier:l,conf:v})},t,e,r,a,n),this},wr.one=function(t,e,r,a){return this.on(t,e,r,a,{one:!0})},wr.removeListener=wr.off=function(t,e,r,a){var n=this;this.emitting!==0&&(this.listeners=ec(this.listeners));for(var i=this.listeners,o=function(l){var f=i[l];Sf(n,function(v,c,h,d,p,y){if((f.type===h||t==="*")&&(!d&&f.namespace!==".*"||f.namespace===d)&&(!p||v.qualifierCompare(f.qualifier,p))&&(!y||f.callback===y))return i.splice(l,1),!1},t,e,r,a)},s=i.length-1;s>=0;s--)o(s);return this},wr.removeAllListeners=function(){return this.removeListener("*")},wr.emit=wr.trigger=function(t,e,r){var a=this.listeners,n=a.length;return this.emitting++,Je(e)||(e=[e]),dp(this,function(i,o){r!=null&&(a=[{event:o.event,type:o.type,namespace:o.namespace,callback:r}],n=a.length);for(var s=function(){var f=a[u];if(f.type===o.type&&(!f.namespace||f.namespace===o.namespace||f.namespace===hp)&&i.eventMatches(i.context,f,o)){var v=[o];e!=null&&rc(v,e),i.beforeEmit(i.context,f,o),f.conf&&f.conf.one&&(i.listeners=i.listeners.filter(function(d){return d!==f}));var c=i.callbackContext(i.context,f,o),h=f.callback.apply(c,v);i.afterEmit(i.context,f,o),h===!1&&(o.stopPropagation(),o.preventDefault())}},u=0;u<n;u++)s();i.bubble(i.context)&&!o.isPropagationStopped()&&i.parent(i.context).emit(o,e)},t),this.emitting--,this};var gp={qualifierCompare:function(e,r){return e==null||r==null?e==null&&r==null:e.sameText(r)},eventMatches:function(e,r,a){var n=r.qualifier;return n!=null?e!==a.target&&wa(a.target)&&n.matches(a.target):!0},addEventFields:function(e,r){r.cy=e.cy(),r.target=e},callbackContext:function(e,r,a){return r.qualifier!=null?a.target:e},beforeEmit:function(e,r){r.conf&&r.conf.once&&r.conf.onceCollection.removeListener(r.event,r.qualifier,r.callback)},bubble:function(){return!0},parent:function(e){return e.isChild()?e.parent():e.cy()}},In=function(e){return Ne(e)?new gr(e):e},Df={createEmitter:function(){for(var e=0;e<this.length;e++){var r=this[e],a=r._private;a.emitter||(a.emitter=new On(gp,r))}return this},emitter:function(){return this._private.emitter},on:function(e,r,a){for(var n=In(r),i=0;i<this.length;i++){var o=this[i];o.emitter().on(e,n,a)}return this},removeListener:function(e,r,a){for(var n=In(r),i=0;i<this.length;i++){var o=this[i];o.emitter().removeListener(e,n,a)}return this},removeAllListeners:function(){for(var e=0;e<this.length;e++){var r=this[e];r.emitter().removeAllListeners()}return this},one:functLine truncated
`),v=t.pstyle("text-max-width").pfValue,c=t.pstyle("text-overflow-wrap").value,h=c==="anywhere",d=[],p=/[\s\u200b]+|$/g,y=0;y<f.length;y++){var g=f[y],b=this.calculateLabelDimensions(t,g),m=b.width;if(h){var w=g.split("").join(l);g=w}if(m>v){var T=g.matchAll(p),D="",x=0,M=Ot(T),P;try{for(M.s();!(P=M.n()).done;){var N=P.value,O=N[0],R=g.substring(x,N.index);x=N.index+O.length;var I=D.length===0?R:D+R+O,E=this.calculateLabelDimensions(t,I),A=E.width;A<=v?D+=R+O:(D&&d.push(D),D=R+O)}}catch(H){M.e(H)}finally{M.f()}D.match(/^[\s\u200b]+$/)||d.push(D)}else d.push(g)}o("labelWrapCachedLines",d),n=o("labelWrapCachedText",d.join(`
`)),o("labelWrapKey",u)}else if(s==="ellipsis"){var S=t.pstyle("text-max-width").pfValue,C="",L="…",z=!1;if(this.calculateLabelDimensions(t,n).width<S)return n;for(var k=0;k<n.length;k++){var F=this.calculateLabelDimensions(t,C+n[k]+L).width;if(F>S)break;C+=n[k],k===n.length-1&&(z=!0)}return z||(C+=L),C}return n},_t.getLabelJustification=function(t){var e=t.pstyle("text-justification").strValue,r=t.pstyle("text-halign").strValue;return e==="auto"?t.isNode()?Zg(r):"center":e},_t.calculateLabelDimensions=function(t,e){var r=this,a=r.cy.window(),n=a.document,i=0,o=t.pstyle("font-style").strValue,s=t.pstyle("font-size").pfValue,u=t.pstyle("font-family").strValue,l=t.pstyle("font-weight").strValue,f=t.pstyle("text-metrics").strValue||"font",v=this.labelCalcCanvas,c=this.labelCalcCanvasContext;if(!v){v=this.labelCalcCanvas=n.createElement("canvas"),c=this.labelCalcCanvasContext=v.getContext("2d");var h=v.style;h.position="absolute",h.left="-9999px",h.top="-9999px",h.zIndex="-1",h.visibility="hidden",h.pointerEvents="none"}c.font="".concat(o," ").concat(l," ").concat(s,"px ").concat(u);for(var d=0,p=0,y=e.split(`
`),g=y.length,b=0,m=0,w=0;w<g;w++){var T=y[w],D=c.measureText(T),x=Math.ceil(D.width),M=s;f==="glyph"&&(w===0&&(m=D.actualBoundingBoxAscent),w===g-1&&(b=D.actualBoundingBoxDescent)),d=Math.max(x,d),p+=M}return f==="glyph"&&(p-=s-m-b),d+=i,p+=i,{width:d,height:p,labelActualAscent:m,labelActualDescent:b}},_t.calculateLabelAngle=function(t,e){var r=t._private,a=r.rscratch,n=t.isEdge(),i=e?e+"-":"",o=t.pstyle(i+"text-rotation"),s=o.strValue;return s==="none"?0:n&&s==="autorotate"?a.labelAutoAngle:s==="autorotate"?0:o.pfValue},_t.calculateLabelAngles=function(t){var e=this,r=t.isEdge(),a=t._private,n=a.rscratch;n.labelAngle=e.calculateLabelAngle(t),r&&(n.sourceLabelAngle=e.calculateLabelAngle(t,"source"),n.targetLabelAngle=e.calculateLabelAngle(t,"target"))};var cv={},dv=28,gv=!1;cv.getNodeShape=function(t){var e=this,r=t.pstyle("shape").value;if(r==="cutrectangle"&&(t.width()<dv||t.height()<dv))return gv||(Xe("The `cutrectangle` node shape can not be used at small sizes so `rectangle` is used instead"),gv=!0),"rectangle";if(t.isParent())return r==="rectangle"||r==="roundrectangle"||r==="round-rectangle"||r==="cutrectangle"||r==="cut-rectangle"||r==="barrel"?r:"rectangle";if(r==="polygon"){var a=t.pstyle("shape-polygon-points").value;return e.nodeShapes.makePolygon(a).name}return r};var Qn={};Qn.registerCalculationListeners=function(){var t=this.cy,e=t.collection(),r=this,a=function(o){var s=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;if(e.merge(o),s)for(var u=0;u<o.length;u++){var l=o[u],f=l._private,v=f.rstyle;v.clean=!1,v.cleanConnected=!1}};r.binder(t).on("bounds.* dirty.*",function(o){var s=o.target;a(s)}).on("style.* background.*",function(o){var s=o.target;a(s,!1)});var n=function(o){if(o){var s=r.onUpdateEleCalcsFns;e.cleanStyle();for(var u=0;u<e.length;u++){var l=e[u],f=l._private.rstyle;l.isNode()&&!f.cleanConnected&&(a(l.connectedEdges()),f.cleanConnected=!0)}if(s)for(var v=0;v<s.length;v++){var c=s[v];c(o,e)}r.recalculateRenderedStyle(e),e=t.collection()}};r.flushRenderedStyleQueue=function(){n(!0)},r.beforeRender(n,r.beforeRenderPriorities.eleCalcs)},Qn.onUpdateEleCalcs=function(t){var e=this.onUpdateEleCalcsFns=this.onUpdateEleCalcsFns||[];e.push(t)},Qn.recalculateRenderedStyle=function(t,e){var r=function(w){return w._private.rstyle.cleanConnected};if(t.length!==0){var a=[],n=[];if(!this.destroyed){e===void 0&&(e=!0);for(var i=0;i<t.length;i++){var o=t[i],s=o._private,u=s.rstyle;o.isEdge()&&(!r(o.source())||!r(o.target()))&&(u.clean=!1),o.isEdge()&&o.isBundledBezier()&&o.parallelEdges().some(function(m){return!m._private.rstyle.clean&&m.isBundledBezier()})&&(u.clean=!1),!(e&&u.clean||o.removed())&&o.pstyle("display").value!=="none"&&(s.group==="nodes"?n.push(o):a.push(o),u.clean=!0)}for(var l=0;l<n.length;l++){var f=n[l],v=f._private,c=v.rstyle,h=f.position();this.recalculateNodeLabelProjection(f),c.nodeX=h.x,c.nodeY=h.y,c.nodeW=f.pstyle("width").pfValue,c.nodeH=f.pstyle("height").pfValue}this.recalculateEdgeProjections(a);for(var d=0;d<a.length;d++){var p=a[d],y=p._private,g=y.rstyle,b=y.rscratch;g.srcX=b.arrowStartX,g.srcY=b.arrowStartY,g.tgtX=b.arrowEndX,g.tgtY=b.arrowEndY,g.midX=b.midX,g.midY=b.midY,g.labelAngle=b.labelAngle,g.sourceLabelAngle=b.sourceLabelAngle,g.targetLabelAngle=b.targetLabelAngle}}}};var Jn={};Jn.updateCachedGrabbedEles=function(){var t=this.cachedZSortedEles;if(t){t.drag=[],t.nondrag=[];for(var e=[],r=0;r<t.length;r++){var a=t[r],n=a._private.rscratch;a.grabbed()&&!a.isParent()?e.push(a):n.inDragLayer?t.drag.push(a):t.nondrag.push(a)}for(var r=0;r<e.length;r++){var a=e[r];t.drag.push(a)}}},Jn.invalidateCachedZSortedEles=function(){this.cachedZSortedEles=null},Jn.getCachedZSortedEles=function(t){if(t||!this.cachedZSortedEles){var e=this.cy.mutableElements().toArray();e.sort(Mf),e.interactive=e.filter(function(r){return r.interactive()}),this.cachedZSortedEles=e,this.updateCachedGrabbedEles()}else e=this.cachedZSortedEles;return e};var pv={};[Ir,Kn,Lt,Wa,ms,_t,cv,Qn,Jn].forEach(function(t){Oe(pv,t)});var yv={};yv.getCachedImage=function(t,e,r){var a=this,n=a.imageCache=a.imageCache||{},i=n[t];if(i)return i.image.complete||i.image.addEventListener("load",r),i.image;i=n[t]=n[t]||{};var o=i.image=new Image;o.addEventListener("load",r),o.addEventListener("error",function(){o.error=!0});var s="data:",u=t.substring(0,s.length).toLowerCase()===s;return u||(e=e==="null"?null:e,o.crossOrigin=e),o.src=t,o};var mv=function(e,r){var a=e[0];!a||a._private.grabbed===r||(a._private.grabbed=r,e.updateStyle(!1))},fy=function(e){mv(e,!0)},vy=function(e){mv(e,!1)},va={};va.registerBinding=function(t,e,r,a){var n=Array.prototype.slice.apply(arguments,[1]);if(Array.isArray(t)){for(var i=[],o=0;o<t.length;o++){var s=t[o];if(s!==void 0){var u=this.binder(s);i.push(u.on.apply(u,n))}}return i}var u=this.binder(t);return u.on.apply(u,n)},va.binder=function(t){var e=this,r=e.cy.window(),a=t===r||t===r.document||t===r.document.body||bh(t);if(e.supportsPassiveEvents==null){var n=!1;try{va Line truncated
float circleSD(vec2 p, float r) {
return distance(vec2(0), p) - r; // signed distance
}
`,ym=`
float rectangleSD(vec2 p, vec2 b) {
vec2 d = abs(p)-b;
return distance(vec2(0),max(d,0.0)) + min(max(d.x,d.y),0.0);
}
`,mm=`
float roundRectangleSD(vec2 p, vec2 b, vec4 cr) {
cr.xy = (p.x > 0.0) ? cr.xy : cr.zw;
cr.x = (p.y > 0.0) ? cr.x : cr.y;
vec2 q = abs(p) - b + cr.x;
return min(max(q.x, q.y), 0.0) + distance(vec2(0), max(q, 0.0)) - cr.x;
}
`,bm=`
float ellipseSD(vec2 p, vec2 ab) {
p = abs( p ); // symmetry
// find root with Newton solver
vec2 q = ab*(p-ab);
float w = (q.x<q.y)? 1.570796327 : 0.0;
for( int i=0; i<5; i++ ) {
vec2 cs = vec2(cos(w),sin(w));
vec2 u = ab*vec2( cs.x,cs.y);
vec2 v = ab*vec2(-cs.y,cs.x);
w = w + dot(p-u,v)/(dot(p-u,u)+dot(v,v));
}
// compute final point and distance
float d = length(p-ab*vec2(cos(w),sin(w)));
// return signed distance
return (dot(p/ab,p/ab)>1.0) ? d : -d;
}
`,Za={SCREEN:{name:"screen",screen:!0},PICKING:{name:"picking",picking:!0}},ai={IGNORE:1,USE_BB:2},As=0,Gv=1,Uv=2,Ds=3,ga=4,ni=5,Qa=6,Ja=7,wm=function(){function t(e,r,a){ir(this,t),this.r=e,this.gl=r,this.maxInstances=a.webglBatchSize,this.atlasSize=a.webglTexSize,this.bgColor=a.bgColor,this.debug=a.webglDebug,this.batchDebugInfo=[],a.enableWrapping=!0,a.createTextureCanvas=Jy,this.atlasManager=new dm(e,a),this.batchManager=new gm(a),this.simpleShapeOptions=new Map,this.program=this._createShaderProgram(Za.SCREEN),this.pickingProgram=this._createShaderProgram(Za.PICKING),this.vao=this._createVAO()}return or(t,[{key:"addAtlasCollection",value:function(r,a){this.atlasManager.addAtlasCollection(r,a)}},{key:"addTextureAtlasRenderType",value:function(r,a){this.atlasManager.addRenderType(r,a)}},{key:"addSimpleShapeRenderType",value:function(r,a){this.simpleShapeOptions.set(r,a)}},{key:"invalidate",value:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},n=a.type,i=this.atlasManager;return n?i.invalidate(r,{filterType:function(s){return s===n},forceRedraw:!0}):i.invalidate(r)}},{key:"gc",value:function(){this.atlasManager.gc()}},{key:"_createShaderProgram",value:function(r){var a=this.gl,n=`#version 300 es
precision highp float;
uniform mat3 uPanZoomMatrix;
uniform int uAtlasSize;
// instanced
in vec2 aPosition; // a vertex from the unit square
in mat3 aTransform; // used to transform verticies, eg into a bounding box
in int aVertType; // the type of thing we are rendering
// the z-index that is output when using picking mode
in vec4 aIndex;
// For textures
in int aAtlasId; // which shader unit/atlas to use
in vec4 aTex; // x/y/w/h of texture in atlas
// for edges
in vec4 aPointAPointB;
in vec4 aPointCPointD;
in vec2 aLineWidth; // also used for node border width
// simple shapes
in vec4 aCornerRadius; // for round-rectangle [top-right, bottom-right, top-left, bottom-left]
in vec4 aColor; // also used for edges
in vec4 aBorderColor; // aLineWidth is used for border width
// output values passed to the fragment shader
out vec2 vTexCoord;
out vec4 vColor;
out vec2 vPosition;
// flat values are not interpolated
flat out int vAtlasId;
flat out int vVertType;
flat out vec2 vTopRight;
flat out vec2 vBotLeft;
flat out vec4 vCornerRadius;
flat out vec4 vBorderColor;
flat out vec2 vBorderWidth;
flat out vec4 vIndex;
void main(void) {
int vid = gl_VertexID;
vec2 position = aPosition; // TODO make this a vec3, simplifies some code below
if(aVertType == `.concat(As,`) {
float texX = aTex.x; // texture coordinates
float texY = aTex.y;
float texW = aTex.z;
float texH = aTex.w;
if(vid == 1 || vid == 2 || vid == 4) {
texX += texW;
}
if(vid == 2 || vid == 4 || vid == 5) {
texY += texH;
}
float d = float(uAtlasSize);
vTexCoord = vec2(texX / d, texY / d); // tex coords must be between 0 and 1
gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);
}
else if(aVertType == `).concat(ga," || aVertType == ").concat(Ja,`
|| aVertType == `).concat(ni," || aVertType == ").concat(Qa,`) { // simple shapes
// the bounding box is needed by the fragment shader
vBotLeft = (aTransform * vec3(0, 0, 1)).xy; // flat
vTopRight = (aTransform * vec3(1, 1, 1)).xy; // flat
vPosition = (aTransform * vec3(position, 1)).xy; // will be interpolated
// calculations are done in the fragment shader, just pass these along
vColor = aColor;
vCornerRadius = aCornerRadius;
vBorderColor = aBorderColor;
vBorderWidth = aLineWidth;
gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);
}
else if(aVertType == `).concat(Gv,`) {
vec2 source = aPointAPointB.xy;
vec2 target = aPointAPointB.zw;
// adjust the geometry so that the line is centered on the edge
position.y = position.y - 0.5;
// stretch the unit square into a long skinny rectangle
vec2 xBasis = target - source;
vec2 yBasis = normalize(vec2(-xBasis.y, xBasis.x));
vec2 point = source + xBasis * position.x + yBasis * aLineWidth[0] * position.y;
gl_Position = vec4(uPanZoomMatrix * vec3(point, 1.0), 1.0);
vColor = aColor;
}
else if(aVertType == `).concat(Uv,`) {
vec2 pointA = aPointAPointB.xy;
vec2 pointB = aPointAPointB.zw;
vec2 pointC = aPointCPointD.xy;
vec2 pointD = aPointCPointD.zw;
// adjust the geometry so that the line is centered on the edge
position.y = position.y - 0.5;
vec2 p0, p1, p2, pos;
if(position.x == 0.0) { // The left side of the unit square
p0 = pointA;
p1 = pointB;
p2 = pointC;
pos = position;
} else { // The right side of the unit square, use same approach but flip the geometry upside down
p0 = pointD;
p1 = pointC;
p2 = pointB;
pos = vec2(0.0, -position.y);
}
vec2 p01 = p1 - p0;
vec2 p12 = p2 - p1;
vec2 p21 = p1 - p2;
// Find the normal vector.
vec2 tangent = normalize(normalize(p12) + normalize(p01));
vec2 normal = vec2(-tangent.y, tangent.x);
// Find the vector perpendicular to p0 -> p1.
vec2 p01Norm = normalize(vec2(-p01.y, p01.x));
// Determine the bend direction.
float sigma = sign(dot(p01 + p21, normal));
float width = aLineWidth[0];
if(sign(pos.y) == -sigma) {
// This is an intersecting vertex. Adjust the position so that there's no overlap.
vec2 point = 0.5 * width * normal * -sigma / dot(normal, p01Norm);
gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);
} else {
// This is a non-intersecting vertex. Treat it like a mitre join.
vec2 point = 0.5 * width * normal * sigma * dot(normal, p01Norm);
gl_Position = vec4(uPanZoomMatrix * vec3(p1 + point, 1.0), 1.0);
}
vColor = aColor;
}
else if(aVertType == `).concat(Ds,` && vid < 3) {
// massage the first triangle into an edge arrow
if(vid == 0)
position = vec2(-0.15, -0.3);
if(vid == 1)
position = vec2( 0.0, 0.0);
if(vid == 2)
position = vec2( 0.15, -0.3);
gl_Position = vec4(uPanZoomMatrix * aTransform * vec3(position, 1.0), 1.0);
vColor = aColor;
}
else {
gl_Position = vec4(2.0, 0.0, 0.0, 1.0); // discard vertex by putting it outside webgl clip space
}
vAtlasId = aAtlasId;
vVertType = aVertType;
vIndex = aIndex;
}
`),i=this.batchManager.getIndexArray(),o=`#version 300 es
precision highp float;
// declare texture unit for each texture atlas in the batch
`.concat(i.map(function(l){return"uniform sampler2D uTexture".concat(l,";")}).join(`
`),`
uniform vec4 uBGColor;
uniform float uZoom;
in vec2 vTexCoord;
in vec4 vColor;
in vec2 vPosition; // model coordinates
flat in int vAtlasId;
flat in vec4 vIndex;
flat in int vVertType;
flat in vec2 vTopRight;
flat in vec2 vBotLeft;
flat in vec4 vCornerRadius;
flat in vec4 vBorderColor;
flat in vec2 vBorderWidth;
out vec4 outColor;
`).concat(pm,`
`).concat(ym,`
`).concat(mm,`
`).concat(bm,`
vec4 blend(vec4 top, vec4 bot) { // blend colors with premultiplied alpha
return vec4(
top.rgb + (bot.rgb * (1.0 - top.a)),
top.a + (bot.a * (1.0 - top.a))
);
}
vec4 distInterp(vec4 cA, vec4 cB, float d) { // interpolate color using Signed Distance
// scale to the zoom level so that borders don't look blurry when zoomed in
// note 1.5 is an aribitrary value chosen because it looks good
return mix(cA, cB, 1.0 - smoothstep(0.0, 1.5 / uZoom, abs(d)));
}
void main(void) {
if(vVertType == `).concat(As,`) {
// look up the texel from the texture unit
`).concat(i.map(function(l){return"if(vAtlasId == ".concat(l,") outColor = texture(uTexture").concat(l,", vTexCoord);")}).join(`
else `),`
}
else if(vVertType == `).concat(Ds,`) {
// mimics how canvas renderer uses context.globalCompositeOperation = 'destination-out';
outColor = blend(vColor, uBGColor);
outColor.a = 1.0; // make opaque, masks out line under arrow
}
else if(vVertType == `).concat(ga,` && vBorderWidth == vec2(0.0)) { // simple rectangle with no border
outColor = vColor; // unit square is already transformed to the rectangle, nothing else needs to be done
}
else if(vVertType == `).concat(ga," || vVertType == ").concat(Ja,`
|| vVertType == `).concat(ni," || vVertType == ").concat(Qa,`) { // use SDF
float outerBorder = vBorderWidth[0];
float innerBorder = vBorderWidth[1];
float borderPadding = outerBorder * 2.0;
float w = vTopRight.x - vBotLeft.x - borderPadding;
float h = vTopRight.y - vBotLeft.y - borderPadding;
vec2 b = vec2(w/2.0, h/2.0); // half width, half height
vec2 p = vPosition - vec2(vTopRight.x - b[0] - outerBorder, vTopRight.y - b[1] - outerBorder); // translate to center
float d; // signed distance
if(vVertType == `).concat(ga,`) {
d = rectangleSD(p, b);
} else if(vVertType == `).concat(Ja,` && w == h) {
d = circleSD(p, b.x); // faster than ellipse
} else if(vVertType == `).concat(Ja,`) {
d = ellipseSD(p, b);
} else {
d = roundRectangleSD(p, b, vCornerRadius.wzyx);
}
// use the distance to interpolate a color to smooth the edges of the shape, doesn't need multisampling
// we must smooth colors inwards, because we can't change pixels outside the shape's bounding box
if(d > 0.0) {
if(d > outerBorder) {
discard;
} else {
outColor = distInterp(vBorderColor, vec4(0), d - outerBorder);
}
} else {
if(d > innerBorder) {
vec4 outerColor = outerBorder == 0.0 ? vec4(0) : vBorderColor;
vec4 innerBorderColor = blend(vBorderColor, vColor);
outColor = distInterp(innerBorderColor, outerColor, d);
}
else {
vec4 outerColor;
if(innerBorder == 0.0 && outerBorder == 0.0) {
outerColor = vec4(0);
} else if(innerBorder == 0.0) {
outerColor = vBorderColor;
} else {
outerColor = blend(vBorderColor, vColor);
}
outColor = distInterp(vColor, outerColor, d - innerBorder);
}
}
}
else {
outColor = vColor;
}
`).concat(r.picking?`if(outColor.a == 0.0) discard;
else outColor = vIndex;`:"",`
}
`),s=Qy(a,n,o);s.aPosition=a.getAttribLocation(s,"aPosition"),s.aIndex=a.getAttribLocation(s,"aIndex"),s.aVertType=a.getAttribLocation(s,"aVertType"),s.aTransform=a.getAttribLocation(s,"aTransform"),s.aAtlasId=a.getAttribLocation(s,"aAtlasId"),s.aTex=a.getAttribLocation(s,"aTex"),s.aPointAPointB=a.getAttribLocation(s,"aPointAPointB"),s.aPointCPointD=a.getAttribLocation(s,"aPointCPointD"),s.aLineWidth=a.getAttribLocation(s,"aLineWidth"),s.aColor=a.getAttribLocation(s,"aColor"),s.aCornerRadius=a.getAttribLocation(s,"aCornerRadius"),s.aBorderColor=a.getAttribLocation(s,"aBorderColor"),s.uPanZoomMatrix=a.getUniformLocation(s,"uPanZoomMatrix"),s.uAtlasSize=a.getUniformLocation(s,"uAtlasSize"),s.uBGColor=a.getUniformLocation(s,"uBGColor"),s.uZoom=a.getUniformLocation(s,"uZoom"),s.uTextures=[];for(var u=0;u<this.batchManager.getMaxAtlasesPerBatch();u++)s.uTextures.push(a.getUniformLocation(s,"uTexture".concat(u)));return s}},{key:"_createVAO",value:function(){var r=[0,0,1,0,1,1,0,0,1,1,0,1];this.vertexCount=r.length/2;var a=this.maxInstances,n=this.gl,i=this.program,o=n.createVertexArray();return n.bindVertexArray(o),om(n,"vec2",i.aPosition,r),this.transformBuffer=sm(n,a,i.aTransform),this.indexBuffer=Qt(n,a,"vec4",i.aIndex),this.vertTypeBuffer=Qt(n,a,"int",i.aVertType),this.atlasIdBuffer=Qt(n,a,"int",i.aAtlasId),this.texBuffer=Qt(n,a,"vec4",i.aTex),this.pointAPointBBuffer=Qt(n,a,"vec4",i.aPointAPointB),this.pointCPointDBuffer=Qt(n,a,"vec4",i.aPointCPointD),this.lineWidthBuffer=Qt(n,a,"vec2",i.aLineWidth),this.colorBuffer=Qt(n,a,"vec4",i.aColor),this.cornerRadiusBuffer=Qt(n,a,"vec4",i.aCornerRadius),this.borderColorBuffer=Qt(n,a,"vec4",i.aBorderColor),n.bindVertexArray(null),o}},{key:"buffers",get:function(){var r=this;return this._buffers||(this._buffers=Object.keys(this).filter(function(a){return ur(a,"Buffer")}).map(function(a){return r[a]})),this._buffers}},{key:"startFrame",value:function(r){var a=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Za.SCREEN;this.panZoomMatrix=r,this.renderTarget=a,this.batchDebugInfo=[],this.wrappedCount=0,this.simpleCount=0,this.startBatch()}},{key:"startBatch",value:function(){this.instanceCount=0,this.batchManager.startBatch()}},{key:"endFrame",value:function(){this.endBatch()}},{key:"_isVisible",value:function(r,a){return r.visible()?a&&a.isVisible?a.isVisible(r):!0:!1}},{key:"drawTexture",value:function(r,a,n){var i=this.atlasManager,o=this.batchManager,s=i.getRenderTypeOpts(n);if(this._isVisible(r,s)&&!(r.isEdge()&&!this._isValidEdge(r))){if(this.renderTarget.picking&&s.getTexPickingMode){var u=s.getTexPickingMode(r);if(u===ai.IGNORE)return;if(u==ai.USE_BB){this.drawPickingRectangle(r,a,n);return}}var l=i.getAtlasInfo(r,n),f=Ot(l),v;try{for(f.s();!(v=f.n()).done;){var c=v.value,h=c.atlas,d=c.tex1,p=c.tex2;o.canAddToCurrentBatch(h)||this.endBatch();for(var y=o.getAtlasIndexForBatch(h),g=0,b=[[d,!0],[p,!1]];g<b.length;g++){var m=vt(b[g],2),w=m[0],T=m[1];if(w.w!=0){var D=this.instanceCount;this.vertTypeBuffer.getView(D)[0]=As;var x=this.indexBuffer.getView(D);da(a,x);var M=this.atlasIdBuffer.getView(D);M[0]=y;var P=this.texBuffer.getView(D);P[0]=w.x,P[1]=w.y,P[2]=w.w,P[3]=w.h;var N=this.transformBuffer.getMatrixView(D);this.setTransformMatrix(r,N,s,c,T),this.instanceCount++,T||this.wrappedCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}}}}catch(O){f.e(O)}finally{f.f()}}}},{key:"setTransformMatrix",value:function(r,a,n,i){var o=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,s=0;if(n.shapeProps&&n.shapeProps.padding&&(s=r.pstyle(n.shapeProps.padding).pfValue),i){var u=i.bb,l=i.tex1,f=i.tex2,v=l.w/(l.w+f.w);o||(v=1-v);var c=this._getAdjustedBB(u,s,o,v);this._applyTransformMatrix(a,c,n,r)}else{var h=n.getBoundingBox(r),d=this._getAdjustedBB(h,s,!0,1);this._applyTransformMatrix(a,d,n,r)}}},{key:"_applyTransformMatrix",value:function(r,a,n,i){var o,s;zv(r);var u=n.getRotation?n.getRotation(i):0;if(u!==0){var l=n.getRotationPoint(i),f=l.x,v=l.y;ri(r,r,[f,v]),Vv(r,r,u);var c=n.getRotationOffset(i);o=c.x+(a.xOffset||0),s=c.y+(a.yOffset||0)}else o=a.x1,s=a.y1;ri(r,r,[o,s]),Ss(r,r,[a.w,a.h])}},{key:"_getAdjustedBB",value:function(r,a,n,i){var o=r.x1,s=r.y1,u=r.w,l=r.h,f=r.yOffset;a&&(o-=a,s-=a,u+=2*a,l+=2*a);var v=0,c=u*i;return n&&i<1?u=c:!n&&i<1&&(v=u-c,o+=v,u=c),{x1:o,y1:s,w:u,h:l,xOffset:v,yOffset:f}}},{key:"drawPickingRectangle",value:function(r,a,n){var i=this.atlasManager.getRenderTypeOpts(n),o=this.instanceCount;this.vertTypeBuffer.getView(o)[0]=ga;var s=this.indexBuffer.getView(o);da(a,s);var u=this.colorBuffer.getView(o);Vr([0,0,0],1,u);var l=this.transformBuffer.getMatrixView(o);this.setTransformMatrix(r,l,i),this.simpleCount++,this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch()}},{key:"drawNode",value:function(r,a,n){var i=this.simpleShapeOptions.get(n);if(this._isVisible(r,i)){var o=i.shapeProps,s=this._getVertTypeForShape(r,o.shape);if(s===void 0||i.isSimple&&!i.isSimple(r,this.renderTarget)){this.drawTexture(r, Line truncated