@rnacanvas/code.web-server 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/main.js ADDED
@@ -0,0 +1 @@
1
+ (()=>{var t={443:function(t){var e;e=()=>(()=>{var t={298:function(t){var e;e=()=>(()=>{var t={726:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{CoordinateSystem:()=>c,HorizontalClientScaling:()=>l,Scaling:()=>h,VerticalClientScaling:()=>d,assignUUID:()=>u,bringToFront:()=>f,sendToBack:()=>p});const n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let r;const i=new Uint8Array(16);function s(){if(!r&&(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!r))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}const o=[];for(let t=0;t<256;++t)o.push((t+256).toString(16).slice(1));const a=function(t,e,r){if(n.randomUUID&&!e&&!t)return n.randomUUID();const i=(t=t||{}).random||(t.rng||s)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){r=r||0;for(let t=0;t<16;++t)e[r+t]=i[t];return e}return function(t,e=0){return o[t[e+0]]+o[t[e+1]]+o[t[e+2]]+o[t[e+3]]+"-"+o[t[e+4]]+o[t[e+5]]+"-"+o[t[e+6]]+o[t[e+7]]+"-"+o[t[e+8]]+o[t[e+9]]+"-"+o[t[e+10]]+o[t[e+11]]+o[t[e+12]]+o[t[e+13]]+o[t[e+14]]+o[t[e+15]]}(i)};function u(t){t.id="uuid-"+a()}var c=function(){function t(t){this.targetSVGDoc=t}return Object.defineProperty(t.prototype,"width",{get:function(){return this.targetSVGDoc.viewBox.baseVal.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.targetSVGDoc.viewBox.baseVal.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minX",{get:function(){return this.targetSVGDoc.viewBox.baseVal.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxX",{get:function(){return this.minX+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minY",{get:function(){return this.targetSVGDoc.viewBox.baseVal.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxY",{get:function(){return this.minY+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"horizontalScaling",{get:function(){return this.targetSVGDoc.width.baseVal.value/this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"verticalScaling",{get:function(){return this.targetSVGDoc.height.baseVal.value/this.height},enumerable:!1,configurable:!0}),t.prototype.setScaling=function(t){this.targetSVGDoc.setAttribute("width","".concat(t*this.width)),this.targetSVGDoc.setAttribute("height","".concat(t*this.height))},Object.defineProperty(t.prototype,"clientWidth",{get:function(){return this.targetSVGDoc.getBoundingClientRect().width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clientHeight",{get:function(){return this.targetSVGDoc.getBoundingClientRect().height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"horizontalClientScaling",{get:function(){return this.clientWidth/this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"verticalClientScaling",{get:function(){return this.clientHeight/this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minClientX",{get:function(){return this.targetSVGDoc.getBoundingClientRect().x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minClientY",{get:function(){return this.targetSVGDoc.getBoundingClientRect().y},enumerable:!1,configurable:!0}),t.prototype.fromClientX=function(t){return this.minX+(t-this.minClientX)/this.horizontalClientScaling},t.prototype.fromClientY=function(t){return this.minY+(t-this.minClientY)/this.verticalClientScaling},t.prototype.fromClientCoordinates=function(t,e){return[this.fromClientX(t),this.fromClientY(e)]},t.prototype.fromClientPoint=function(t){return{x:this.fromClientX(t.x),y:this.fromClientY(t.y)}},t.prototype.toClientX=function(t){return this.minClientX+this.horizontalClientScaling*(t-this.minX)},t.prototype.toClientY=function(t){return this.minClientY+this.verticalClientScaling*(t-this.minY)},t.prototype.toClientCoordinates=function(t,e){return[this.toClientX(t),this.toClientY(e)]},t.prototype.toClientPoint=function(t){return{x:this.toClientX(t.x),y:this.toClientY(t.y)}},t}(),h=function(){function t(t){this.targetSVGDoc=t}return t.prototype.set=function(t){var e=this.targetSVGDoc.viewBox.baseVal;this.targetSVGDoc.setAttribute("width",t*e.width+"px"),this.targetSVGDoc.setAttribute("height",t*e.height+"px")},t}(),l=function(){function t(t){this.targetSVGDoc=t}return t.prototype.get=function(){var t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.width/e.width},t}(),d=function(){function t(t){this.targetSVGDoc=t}return t.prototype.get=function(){var t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.height/e.height},t}();function f(t){var e=t.parentNode;e&&e.appendChild(t)}function p(t){var e=t.parentNode;e&&e.prepend(t)}return e})(),t.exports=e()},725:function(t){t.exports=(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>d,average:()=>r,degrees:()=>m,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,radians:()=>g,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>f,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>p,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return Math.abs(t-e)<=n}function f(t){i(t),t.reverse()}function p(t){var e=o(t);return e.reverse(),e}function m(t){return t*(180/Math.PI)}function g(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function c(t){return"object"==typeof t&&null!==t}function h(t){return Array.isArray(t)}return t.r(e),t.d(e,{isArray:()=>h,isFiniteNumber:()=>r,isNonFiniteNumber:()=>i,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>c,isNullish:()=>u,isNumber:()=>n,isPositiveFiniteNumber:()=>s,isString:()=>a}),e})()},30:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.pow(Math.pow(t.x,2)+Math.pow(t.y,2),.5)}function r(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>r,magnitude:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{areWithin:()=>a,centroid:()=>f,deepCopy:()=>s,direction:()=>l,displaced:()=>c,displacement:()=>u,distance:()=>o,isFinitePoint:()=>i,isPoint:()=>e,midpoint:()=>p});var t=n(854);function e(e){return(0,t.isNonNullObject)(e)&&(0,t.isNumber)(e.x)&&(0,t.isNumber)(e.y)}function i(n){return e(n)&&(0,t.isFiniteNumber)(n.x)&&(0,t.isFiniteNumber)(n.y)}function s(t){return{x:t.x,y:t.y}}function o(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.pow(Math.pow(n,2)+Math.pow(r,2),.5)}function a(t,e,n){return o(t,e)<=n}function u(t,e){return{x:e.x-t.x,y:e.y-t.y}}function c(t,e){return{x:t.x+e.x,y:t.y+e.y}}var h=n(30);function l(t,e){return(0,h.direction)(u(t,e))}var d=n(986);function f(t){return{x:(0,d.mean)(t.map((function(t){return t.x}))),y:(0,d.mean)(t.map((function(t){return t.y})))}}function p(t,e){return f([t,e])}})(),r})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function c(t){return"object"==typeof t&&null!==t}function h(t){return Array.isArray(t)}return t.r(e),t.d(e,{isArray:()=>h,isFiniteNumber:()=>r,isNonFiniteNumber:()=>i,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>c,isNullish:()=>u,isNumber:()=>n,isPositiveFiniteNumber:()=>s,isString:()=>a}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{InvertedStraightBondsHider:()=>nr,SavableStraightBond:()=>Fn,SavedStraightBond:()=>er,StraightBond:()=>Ln});var t={};n.r(t),n.d(t,{cx:()=>Bt,cy:()=>It,height:()=>Rt,rx:()=>jt,ry:()=>kt,width:()=>Ft,x:()=>Dt,y:()=>Lt});var e={};n.r(e),n.d(e,{from:()=>Xt,to:()=>Gt});var i={};n.r(i),n.d(i,{MorphArray:()=>Kt,height:()=>te,width:()=>Zt,x:()=>Qt,y:()=>Jt});var s={};n.r(s),n.d(s,{array:()=>Ce,clear:()=>Ee,move:()=>Te,plot:()=>Ae,size:()=>je});var o={};n.r(o),n.d(o,{amove:()=>an,ax:()=>sn,ay:()=>on,build:()=>un,center:()=>rn,cx:()=>en,cy:()=>nn,length:()=>Qe,move:()=>tn,plain:()=>Ke,x:()=>Je,y:()=>Ze});var a={};n.r(a),n.d(a,{dmove:()=>pn,dx:()=>mn,dy:()=>gn,height:()=>yn,move:()=>bn,size:()=>vn,width:()=>wn,x:()=>xn,y:()=>Sn});const u={},c=[];function h(t,e){if(Array.isArray(t))for(const n of t)h(n,e);else if("object"!=typeof t)d(Object.getOwnPropertyNames(e)),u[t]=Object.assign(u[t]||{},e);else for(const e in t)h(e,t[e])}function l(t){return u[t]||{}}function d(t){c.push(...t)}function f(t,e){let n;const r=t.length,i=[];for(n=0;n<r;n++)i.push(e(t[n]));return i}function p(t){return t%360*Math.PI/180}function m(t){return t.charAt(0).toUpperCase()+t.slice(1)}function g(t,e,n,r){return null!=e&&null!=n||(r=r||t.bbox(),null==e?e=r.width/r.height*n:null==n&&(n=r.height/r.width*e)),{width:e,height:n}}function y(t,e){const n=t.origin;let r=null!=t.ox?t.ox:null!=t.originX?t.originX:"center",i=null!=t.oy?t.oy:null!=t.originY?t.originY:"center";null!=n&&([r,i]=Array.isArray(n)?n:"object"==typeof n?[n.x,n.y]:[n,n]);const s="string"==typeof r,o="string"==typeof i;if(s||o){const{height:t,width:n,x:a,y:u}=e.bbox();s&&(r=r.includes("left")?a:r.includes("right")?a+n:a+n/2),o&&(i=i.includes("top")?u:i.includes("bottom")?u+t:u+t/2)}return[r,i]}const b=new Set(["desc","metadata","title"]),v=t=>b.has(t.nodeName),w=(t,e,n={})=>{const r={...e};for(const t in r)r[t].valueOf()===n[t]&&delete r[t];Object.keys(r).length?t.node.setAttribute("data-svgjs",JSON.stringify(r)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},x="http://www.w3.org/2000/svg",S="http://www.w3.org/2000/xmlns/",_="http://www.w3.org/1999/xlink",P={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};class M{}const N={},O="___SYMBOL___ROOT___";function C(t,e=x){return P.document.createElementNS(e,t)}function E(t,e=!1){if(t instanceof M)return t;if("object"==typeof t)return j(t);if(null==t)return new N[O];if("string"==typeof t&&"<"!==t.charAt(0))return j(P.document.querySelector(t));const n=e?P.document.createElement("div"):C("svg");return n.innerHTML=t,t=j(n.firstChild),n.removeChild(n.firstChild),t}function T(t,e){return e&&(e instanceof P.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:C(t)}function A(t){if(!t)return null;if(t.instance instanceof M)return t.instance;if("#document-fragment"===t.nodeName)return new N.Fragment(t);let e=m(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":N[e]||(e="Dom"),new N[e](t)}let j=A;function k(t,e=t.name,n=!1){return N[e]=t,n&&(N[O]=t),d(Object.getOwnPropertyNames(t.prototype)),t}let D=1e3;function L(t){return"Svgjs"+m(t)+D++}function B(t){for(let e=t.children.length-1;e>=0;e--)B(t.children[e]);return t.id?(t.id=L(t.nodeName),t):t}function I(t,e){let n,r;for(r=(t=Array.isArray(t)?t:[t]).length-1;r>=0;r--)for(n in e)t[r].prototype[n]=e[n]}function F(t){return function(...e){const n=e[e.length-1];return!n||n.constructor!==Object||n instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(n)}}h("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=E(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=E(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=E(t)).before(this),this},insertAfter:function(t){return(t=E(t)).after(this),this}});const R=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,V=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,q=/rgb\((\d+),(\d+),(\d+)\)/,z=/(#[a-z_][a-z0-9\-_]*)/i,X=/\)\s*,?\s*/,G=/\s/g,Y=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,H=/^rgb\(/,U=/^(\s+)?$/,W=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,$=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,K=/[\s,]+/,Q=/[MLHVCSQTAZ]/i;function J(t){const e=Math.round(t),n=Math.max(0,Math.min(255,e)).toString(16);return 1===n.length?"0"+n:n}function Z(t,e){for(let n=e.length;n--;)if(null==t[e[n]])return!1;return!0}function tt(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}h("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(K)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),h("Dom",{css:function(t,e){const n={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const e=t.split(/\s*:\s*/);n[e[0]]=e[1]})),n;if(arguments.length<2){if(Array.isArray(t)){for(const e of t){const t=e;n[e]=this.node.style.getPropertyValue(t)}return n}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const e in t)this.node.style.setProperty(e,null==t[e]||U.test(t[e])?"":t[e])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||U.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),h("Dom",{data:function(t,e,n){if(null==t)return this.data(f(function(t){let e;const n=t.length,r=[];for(e=0;e<n;e++)0===t[e].nodeName.indexOf("data-")&&r.push(t[e]);return r}(this.node.attributes),(t=>t.nodeName.slice(5))));if(t instanceof Array){const e={};for(const n of t)e[n]=this.data(n);return e}if("object"==typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===n||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),h("Dom",{remember:function(t,e){if("object"==typeof arguments[0])for(const e in t)this.remember(e,t[e]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class et{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof et||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(t="vibrant",e){const{random:n,round:r,sin:i,PI:s}=Math;if("vibrant"===t){const t=24*n()+57,e=38*n()+45,r=360*n();return new et(t,e,r,"lch")}if("sine"===t){const t=r(80*i(2*s*(e=null==e?n():e)/.5+.01)+150),o=r(50*i(2*s*e/.5+4.6)+200),a=r(100*i(2*s*e/.5+2.3)+150);return new et(t,o,a)}if("pastel"===t){const t=8*n()+86,e=17*n()+9,r=360*n();return new et(t,e,r,"lch")}if("dark"===t){const t=10+10*n(),e=50*n()+86,r=360*n();return new et(t,e,r,"lch")}if("rgb"===t){const t=255*n(),e=255*n(),r=255*n();return new et(t,e,r)}if("lab"===t){const t=100*n(),e=256*n()-128,r=256*n()-128;return new et(t,e,r,"lab")}if("grey"===t){const t=255*n();return new et(t,t,t)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(Y.test(t)||H.test(t))}cmyk(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.min(1-r,1-i,1-s);return 1===o?new et(0,0,0,1,"cmyk"):new et((1-r-o)/(1-o),(1-i-o)/(1-o),(1-s-o)/(1-o),o,"cmyk")}hsl(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.max(r,i,s),a=Math.min(r,i,s),u=(o+a)/2,c=o===a,h=o-a;return new et(360*(c?0:o===r?((i-s)/h+(i<s?6:0))/6:o===i?((s-r)/h+2)/6:o===s?((r-i)/h+4)/6:0),100*(c?0:u>.5?h/(2-o-a):h/(o+a)),100*u,"hsl")}init(t=0,e=0,n=0,r=0,i="rgb"){if(t=t||0,this.space)for(const t in this.space)delete this[this.space[t]];if("number"==typeof t)i="string"==typeof r?r:i,r="string"==typeof r?0:r,Object.assign(this,{_a:t,_b:e,_c:n,_d:r,space:i});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const n=function(t,e){const n=Z(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:Z(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:Z(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:Z(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:Z(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:Z(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return n.space=e||n.space,n}(t,e);Object.assign(this,n)}else if("string"==typeof t)if(H.test(t)){const e=t.replace(G,""),[n,r,i]=q.exec(e).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}else{if(!Y.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,n,r,i]=V.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map(e);Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}}const{_a:s,_b:o,_c:a,_d:u}=this,c="rgb"===this.space?{r:s,g:o,b:a}:"xyz"===this.space?{x:s,y:o,z:a}:"hsl"===this.space?{h:s,s:o,l:a}:"lab"===this.space?{l:s,a:o,b:a}:"lch"===this.space?{l:s,c:o,h:a}:"cmyk"===this.space?{c:s,m:o,y:a,k:u}:{};Object.assign(this,c)}lab(){const{x:t,y:e,z:n}=this.xyz();return new et(116*e-16,500*(t-e),200*(e-n),"lab")}lch(){const{l:t,a:e,b:n}=this.lab(),r=Math.sqrt(e**2+n**2);let i=180*Math.atan2(n,e)/Math.PI;return i<0&&(i*=-1,i=360-i),new et(t,r,i,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(t=this.space)||"xyz"===t||"lch"===t){let{x:t,y:e,z:n}=this;if("lab"===this.space||"lch"===this.space){let{l:r,a:i,b:s}=this;if("lch"===this.space){const{c:t,h:e}=this,n=Math.PI/180;i=t*Math.cos(n*e),s=t*Math.sin(n*e)}const o=(r+16)/116,a=i/500+o,u=o-s/200,c=16/116,h=.008856,l=7.787;t=.95047*(a**3>h?a**3:(a-c)/l),e=1*(o**3>h?o**3:(o-c)/l),n=1.08883*(u**3>h?u**3:(u-c)/l)}const r=3.2406*t+-1.5372*e+-.4986*n,i=-.9689*t+1.8758*e+.0415*n,s=.0557*t+-.204*e+1.057*n,o=Math.pow,a=.0031308,u=r>a?1.055*o(r,1/2.4)-.055:12.92*r,c=i>a?1.055*o(i,1/2.4)-.055:12.92*i,h=s>a?1.055*o(s,1/2.4)-.055:12.92*s;return new et(255*u,255*c,255*h)}if("hsl"===this.space){let{h:t,s:e,l:n}=this;if(t/=360,e/=100,n/=100,0===e)return n*=255,new et(n,n,n);const r=n<.5?n*(1+e):n+e-n*e,i=2*n-r,s=255*tt(i,r,t+1/3),o=255*tt(i,r,t),a=255*tt(i,r,t-1/3);return new et(s,o,a)}if("cmyk"===this.space){const{c:t,m:e,y:n,k:r}=this,i=255*(1-Math.min(1,t*(1-r)+r)),s=255*(1-Math.min(1,e*(1-r)+r)),o=255*(1-Math.min(1,n*(1-r)+r));return new et(i,s,o)}return this;var t}toArray(){const{_a:t,_b:e,_c:n,_d:r,space:i}=this;return[t,e,n,r,i]}toHex(){const[t,e,n]=this._clamped().map(J);return`#${t}${e}${n}`}toRgb(){const[t,e,n]=this._clamped();return`rgb(${t},${e},${n})`}toString(){return this.toHex()}xyz(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,a=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,u=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,c=(.4124*o+.3576*a+.1805*u)/.95047,h=(.2126*o+.7152*a+.0722*u)/1,l=(.0193*o+.1192*a+.9505*u)/1.08883,d=c>.008856?Math.pow(c,1/3):7.787*c+16/116,f=h>.008856?Math.pow(h,1/3):7.787*h+16/116,p=l>.008856?Math.pow(l,1/3):7.787*l+16/116;return new et(d,f,p,"xyz")}_clamped(){const{_a:t,_b:e,_c:n}=this.rgb(),{max:r,min:i,round:s}=Math;return[t,e,n].map((t=>r(0,i(s(t),255))))}}class nt{constructor(...t){this.init(...t)}clone(){return new nt(this)}init(t,e){const n=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==n.x?0:n.x,this.y=null==n.y?0:n.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){it.isMatrixLike(t)||(t=new it(t));const{x:e,y:n}=this;return this.x=t.a*e+t.c*n+t.e,this.y=t.b*e+t.d*n+t.f,this}}function rt(t,e,n){return Math.abs(e-t)<(n||1e-6)}class it{constructor(...t){this.init(...t)}static formatTransforms(t){const e="both"===t.flip||!0===t.flip,n=t.flip&&(e||"x"===t.flip)?-1:1,r=t.flip&&(e||"y"===t.flip)?-1:1,i=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,s=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,o=t.scale&&t.scale.length?t.scale[0]*n:isFinite(t.scale)?t.scale*n:isFinite(t.scaleX)?t.scaleX*n:n,a=t.scale&&t.scale.length?t.scale[1]*r:isFinite(t.scale)?t.scale*r:isFinite(t.scaleY)?t.scaleY*r:r,u=t.shear||0,c=t.rotate||t.theta||0,h=new nt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),l=h.x,d=h.y,f=new nt(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=f.x,m=f.y,g=new nt(t.translate||t.tx||t.translateX,t.ty||t.translateY),y=g.x,b=g.y,v=new nt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:o,scaleY:a,skewX:i,skewY:s,shear:u,theta:c,rx:v.x,ry:v.y,tx:y,ty:b,ox:l,oy:d,px:p,py:m}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,e,n){const r=t.a*e.a+t.c*e.b,i=t.b*e.a+t.d*e.b,s=t.a*e.c+t.c*e.d,o=t.b*e.c+t.d*e.d,a=t.e+t.a*e.e+t.c*e.f,u=t.f+t.b*e.e+t.d*e.f;return n.a=r,n.b=i,n.c=s,n.d=o,n.e=a,n.f=u,n}around(t,e,n){return this.clone().aroundO(t,e,n)}aroundO(t,e,n){const r=t||0,i=e||0;return this.translateO(-r,-i).lmultiplyO(n).translateO(r,i)}clone(){return new it(this)}decompose(t=0,e=0){const n=this.a,r=this.b,i=this.c,s=this.d,o=this.e,a=this.f,u=n*s-r*i,c=u>0?1:-1,h=c*Math.sqrt(n*n+r*r),l=Math.atan2(c*r,c*n),d=180/Math.PI*l,f=Math.cos(l),p=Math.sin(l),m=(n*i+r*s)/u,g=i*h/(m*n-r)||s*h/(m*r+n);return{scaleX:h,scaleY:g,shear:m,rotate:d,translateX:o-t+t*f*h+e*(m*f*h-p*g),translateY:a-e+t*p*h+e*(m*p*h+f*g),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;const e=new it(t);return rt(this.a,e.a)&&rt(this.b,e.b)&&rt(this.c,e.c)&&rt(this.d,e.d)&&rt(this.e,e.e)&&rt(this.f,e.f)}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}init(t){const e=it.fromArray([1,0,0,1,0,0]);return t=t instanceof Ot?t.matrixify():"string"==typeof t?it.fromArray(t.split(K).map(parseFloat)):Array.isArray(t)?it.fromArray(t):"object"==typeof t&&it.isMatrixLike(t)?t:"object"==typeof t?(new it).transform(t):6===arguments.length?it.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,e=this.b,n=this.c,r=this.d,i=this.e,s=this.f,o=t*r-e*n;if(!o)throw new Error("Cannot invert "+this);const a=r/o,u=-e/o,c=-n/o,h=t/o,l=-(a*i+c*s),d=-(u*i+h*s);return this.a=a,this.b=u,this.c=c,this.d=h,this.e=l,this.f=d,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const e=t instanceof it?t:new it(t);return it.matrixMultiply(e,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const e=t instanceof it?t:new it(t);return it.matrixMultiply(this,e,this)}rotate(t,e,n){return this.clone().rotateO(t,e,n)}rotateO(t,e=0,n=0){t=p(t);const r=Math.cos(t),i=Math.sin(t),{a:s,b:o,c:a,d:u,e:c,f:h}=this;return this.a=s*r-o*i,this.b=o*r+s*i,this.c=a*r-u*i,this.d=u*r+a*i,this.e=c*r-h*i+n*i-e*r+e,this.f=h*r+c*i-e*i-n*r+n,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t);const{a:i,b:s,c:o,d:a,e:u,f:c}=this;return this.a=i*t,this.b=s*e,this.c=o*t,this.d=a*e,this.e=u*t-n*t+n,this.f=c*e-r*e+r,this}shear(t,e,n){return this.clone().shearO(t,e,n)}shearO(t,e=0,n=0){const{a:r,b:i,c:s,d:o,e:a,f:u}=this;return this.a=r+i*t,this.c=s+o*t,this.e=a+u*t-n*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t),t=p(t),e=p(e);const i=Math.tan(t),s=Math.tan(e),{a:o,b:a,c:u,d:c,e:h,f:l}=this;return this.a=o+a*i,this.b=a+o*s,this.c=u+c*i,this.d=c+u*s,this.e=h+l*i-r*i,this.f=l+h*s-n*s,this}skewX(t,e,n){return this.skew(t,0,e,n)}skewY(t,e,n){return this.skew(0,t,e,n)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(it.isMatrixLike(t))return new it(t).multiplyO(this);const e=it.formatTransforms(t),{x:n,y:r}=new nt(e.ox,e.oy).transform(this),i=(new it).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-n,-r).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(n,r);if(isFinite(e.px)||isFinite(e.py)){const t=new nt(n,r).transform(i),s=isFinite(e.px)?e.px-t.x:0,o=isFinite(e.py)?e.py-t.y:0;i.translateO(s,o)}return i.translateO(e.tx,e.ty),i}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function st(){if(!st.nodes){const t=E().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;st.nodes={svg:t,path:e}}if(!st.nodes.svg.node.parentNode){const t=P.document.body||P.document.documentElement;st.nodes.svg.addTo(t)}return st.nodes}function ot(t){return!(t.width||t.height||t.x||t.y)}k(it,"Matrix");class at{constructor(...t){this.init(...t)}addOffset(){return this.x+=P.window.pageXOffset,this.y+=P.window.pageYOffset,new at(this)}init(t){return t="string"==typeof t?t.split(K).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return ot(this)}merge(t){const e=Math.min(this.x,t.x),n=Math.min(this.y,t.y),r=Math.max(this.x+this.width,t.x+t.width)-e,i=Math.max(this.y+this.height,t.y+t.height)-n;return new at(e,n,r,i)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof it||(t=new it(t));let e=1/0,n=-1/0,r=1/0,i=-1/0;return[new nt(this.x,this.y),new nt(this.x2,this.y),new nt(this.x,this.y2),new nt(this.x2,this.y2)].forEach((function(s){s=s.transform(t),e=Math.min(e,s.x),n=Math.max(n,s.x),r=Math.min(r,s.y),i=Math.max(i,s.y)})),new at(e,r,n-e,i-r)}}function ut(t,e,n){let r;try{if(r=e(t.node),ot(r)&&(i=t.node)!==P.document&&!(P.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===P.document}).call(P.document.documentElement,i))throw new Error("Element not in the dom")}catch(e){r=n(t)}var i;return r}h({viewbox:{viewbox(t,e,n,r){return null==t?new at(this.attr("viewBox")):this.attr("viewBox",new at(t,e,n,r))},zoom(t,e){let{width:n,height:r}=this.attr(["width","height"]);if((n||r)&&"string"!=typeof n&&"string"!=typeof r||(n=this.node.clientWidth,r=this.node.clientHeight),!n||!r)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const i=this.viewbox(),s=n/i.width,o=r/i.height,a=Math.min(s,o);if(null==t)return a;let u=a/t;u===1/0&&(u=Number.MAX_SAFE_INTEGER/100),e=e||new nt(n/2/s+i.x,r/2/o+i.y);const c=new at(i).transform(new it({scale:u,origin:e}));return this.viewbox(c)}}}),k(at,"Box");class ct extends Array{constructor(t=[],...e){if(super(t,...e),"number"==typeof t)return this;this.length=0,this.push(...t)}}const ht=ct;I([ct],{each(t,...e){return"function"==typeof t?this.map(((e,n,r)=>t.call(e,e,n,r))):this.map((n=>n[t](...e)))},toArray(){return Array.prototype.concat.apply([],this)}});const lt=["toArray","constructor","each"];function dt(t,e){return new ht(f((e||P.document).querySelectorAll(t),(function(t){return A(t)})))}ct.extend=function(t){t=t.reduce(((t,e)=>(lt.includes(e)||"_"===e[0]||(e in Array.prototype&&(t["$"+e]=Array.prototype[e]),t[e]=function(...t){return this.each(e,...t)}),t)),{}),I([ct],t)};let ft=0;const pt={};function mt(t){let e=t.getEventHolder();return e===P.window&&(e=pt),e.events||(e.events={}),e.events}function gt(t){return t.getEventTarget()}function yt(t,e,n,r,i){const s=n.bind(r||t),o=E(t),a=mt(o),u=gt(o);e=Array.isArray(e)?e:e.split(K),n._svgjsListenerId||(n._svgjsListenerId=++ft),e.forEach((function(t){const e=t.split(".")[0],r=t.split(".")[1]||"*";a[e]=a[e]||{},a[e][r]=a[e][r]||{},a[e][r][n._svgjsListenerId]=s,u.addEventListener(e,s,i||!1)}))}function bt(t,e,n,r){const i=E(t),s=mt(i),o=gt(i);("function"!=typeof n||(n=n._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(K)).forEach((function(t){const e=t&&t.split(".")[0],a=t&&t.split(".")[1];let u,c;if(n)s[e]&&s[e][a||"*"]&&(o.removeEventListener(e,s[e][a||"*"][n],r||!1),delete s[e][a||"*"][n]);else if(e&&a){if(s[e]&&s[e][a]){for(c in s[e][a])bt(o,[e,a].join("."),c);delete s[e][a]}}else if(a)for(t in s)for(u in s[t])a===u&&bt(o,[t,a].join("."));else if(e){if(s[e]){for(u in s[e])bt(o,[e,u].join("."));delete s[e]}}else{for(t in s)bt(o,t);!function(t){let e=t.getEventHolder();e===P.window&&(e=pt),e.events&&(e.events={})}(i)}}))}class vt extends M{addEventListener(){}dispatch(t,e,n){return function(t,e,n,r){const i=gt(t);return e instanceof P.window.Event||(e=new P.window.CustomEvent(e,{detail:n,cancelable:!0,...r})),i.dispatchEvent(e),e}(this,t,e,n)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const n=e[t.type];for(const e in n)for(const r in n[e])n[e][r](t);return!t.defaultPrevented}fire(t,e,n){return this.dispatch(t,e,n),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e,n){return bt(this,t,e,n),this}on(t,e,n,r){return yt(this,t,e,n,r),this}removeEventListener(){}}function wt(){}k(vt,"EventTarget");const xt={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class St extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(K).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}}class _t{constructor(...t){this.init(...t)}convert(t){return new _t(this.value,t)}divide(t){return t=new _t(t),new _t(this/t,this.unit||t.unit)}init(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(R))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof _t&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new _t(t),new _t(this-t,this.unit||t.unit)}plus(t){return t=new _t(t),new _t(this+t,this.unit||t.unit)}times(t){return t=new _t(t),new _t(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const Pt=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),Mt=[];class Nt extends vt{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return(t=E(t)).removeNamespace&&this.node instanceof P.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t,e){return E(t).put(this,e)}children(){return new ht(f(this.node.children,(function(t){return A(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,e=!0){this.writeDataToDom();let n=this.node.cloneNode(t);return e&&(n=B(n)),new this.constructor(n)}each(t,e){const n=this.children();let r,i;for(r=0,i=n.length;r<i;r++)t.apply(n[r],[r,n]),e&&n[r].each(t,e);return this}element(t,e){return this.put(new Nt(C(t),e))}first(){return A(this.node.firstChild)}get(t){return A(this.node.childNodes[t])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(t){return this.index(t)>=0}html(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=L(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return A(this.node.lastChild)}matches(t){const e=this.node,n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return n&&n.call(e,t)}parent(t){let e=this;if(!e.node.parentNode)return null;if(e=A(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=A(e.node.parentNode));return e}put(t,e){return t=E(t),this.add(t,e),t}putIn(t,e){return E(t).add(this,e)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=E(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e=null){const n=10**t,r=this.attr(e);for(const t in r)"number"==typeof r[t]&&(r[t]=Math.round(r[t]*n)/n);return this.attr(r),this}svg(t,e){return this.xml(t,e,x)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const e=this.parent();if(!e)return this.addTo(t);const n=e.index(this);return e.put(t,n).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();let n=this;if(null!=t){if(n=A(n.node.cloneNode(!0)),e){const e=t(n);if(n=e||n,!1===e)return""}n.each((function(){const e=t(this),n=e||this;!1===e?this.remove():e&&this!==n&&this.replace(n)}),!0)}return e?n.node.outerHTML:n.node.innerHTML}e=null!=e&&e;const r=C("wrapper",n),i=P.document.createDocumentFragment();r.innerHTML=t;for(let t=r.children.length;t--;)i.appendChild(r.firstElementChild);const s=this.parent();return e?this.replace(i)&&s:this.add(i)}}I(Nt,{attr:function(t,e,n){if(null==t){t={},e=this.node.attributes;for(const n of e)t[n.nodeName]=W.test(n.nodeValue)?parseFloat(n.nodeValue):n.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,e)=>(t[e]=this.attr(e),t)),{});if("object"==typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?xt[t]:W.test(e)?parseFloat(e):e;"number"==typeof(e=Mt.reduce(((e,n)=>n(t,e,this)),e))?e=new _t(e):Pt.has(t)&&et.isColor(e)?e=new et(e):e.constructor===Array&&(e=new St(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof n?this.node.setAttributeNS(n,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return dt(t,this.node)},findOne:function(t){return A(this.node.querySelector(t))}}),k(Nt,"Dom");class Ot extends Nt{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new _t(t).plus(this.x()))}dy(t=0){return this.y(new _t(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e="string"==typeof t;e||(t=E(t));const n=new ht;let r=this;for(;(r=r.parent())&&r.node!==P.document&&"#document-fragment"!==r.nodeName&&(n.push(r),e||r.node!==t.node)&&(!e||!r.matches(t));)if(r.node===this.root().node)return null;return n}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(z);return e?E(e[1]):null}root(){const t=this.parent(N[O]);return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const n=g(this,t,e);return this.width(new _t(n.width)).height(new _t(n.height))}width(t){return this.attr("width",t)}writeDataToDom(){return w(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}I(Ot,{bbox:function(){const t=ut(this,(t=>t.getBBox()),(t=>{try{const e=t.clone().addTo(st().svg).show(),n=e.node.getBBox();return e.remove(),n}catch(e){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${e.toString()}`)}}));return new at(t)},rbox:function(t){const e=ut(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),n=new at(e);return t?n.transform(t.screenCTM().inverseO()):n.addOffset()},inside:function(t,e){const n=this.bbox();return t>n.x&&e>n.y&&t<n.x+n.width&&e<n.y+n.height},point:function(t,e){return new nt(t,e).transformO(this.screenCTM().inverseO())},ctm:function(){return new it(this.node.getCTM())},screenCTM:function(){try{if("function"==typeof this.isRoot&&!this.isRoot()){const t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new it(e)}return new it(this.node.getScreenCTM())}catch(t){return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new it}}}),k(Ot,"Element");const Ct={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return"color"===e?t:t+"-"+e}};["fill","stroke"].forEach((function(t){const e={};let n;e[t]=function(e){if(void 0===e)return this.attr(t);if("string"==typeof e||e instanceof et||et.isRgb(e)||e instanceof Ot)this.attr(t,e);else for(n=Ct[t].length-1;n>=0;n--)null!=e[Ct[t][n]]&&this.attr(Ct.prefix(t,Ct[t][n]),e[Ct[t][n]]);return this},h(["Element","Runner"],e)})),h(["Element","Runner"],{matrix:function(t,e,n,r,i,s){return null==t?new it(this):this.attr("transform",new it(t,e,n,r,i,s))},rotate:function(t,e,n){return this.transform({rotate:t,ox:e,oy:n},!0)},skew:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:n},!0):this.transform({skew:[t,e],ox:n,oy:r},!0)},shear:function(t,e,n){return this.transform({shear:t,ox:e,oy:n},!0)},scale:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:n},!0):this.transform({scale:[t,e],ox:n,oy:r},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),h("radius",{radius:function(t,e=t){return"radialGradient"===(this._element||this).type?this.attr("r",new _t(t)):this.rx(t).ry(e)}}),h("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new nt(this.node.getPointAtLength(t))}}),h(["Element","Runner"],{font:function(t,e){if("object"==typeof t){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}}),h("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),h("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(X).slice(0,-1).map((function(t){const e=t.trim().split("(");return[e[0],e[1].split(K).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(it.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new it)},toParent:function(t,e){if(this===t)return this;if(v(this.node))return this.addTo(t,e);const n=this.screenCTM(),r=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(r.multiply(n)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){const e=new it(this).decompose();return null==t?e:e[t]}it.isMatrixLike(t)||(t={...t,origin:y(t,this)});const n=new it(!0===e?this:e||!1).transform(t);return this.attr("transform",n)}});class Et extends Ot{flatten(){return this.each((function(){if(this instanceof Et)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),e=t.index(this)){return e=-1===e?t.children().length:e,this.each((function(n,r){return r[r.length-n-1].toParent(t,e)})),this.remove()}}k(Et,"Container");class Tt extends Et{constructor(t,e=t){super(T("defs",t),e)}flatten(){return this}ungroup(){return this}}k(Tt,"Defs");class At extends Ot{}function jt(t){return this.attr("rx",t)}function kt(t){return this.attr("ry",t)}function Dt(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Lt(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Bt(t){return this.attr("cx",t)}function It(t){return this.attr("cy",t)}function Ft(t){return null==t?2*this.rx():this.rx(new _t(t).divide(2))}function Rt(t){return null==t?2*this.ry():this.ry(new _t(t).divide(2))}k(At,"Shape");class Vt extends At{constructor(t,e=t){super(T("ellipse",t),e)}size(t,e){const n=g(this,t,e);return this.rx(new _t(n.width).divide(2)).ry(new _t(n.height).divide(2))}}I(Vt,t),h("Container",{ellipse:F((function(t=0,e=t){return this.put(new Vt).size(t,e).move(0,0)}))}),k(Vt,"Ellipse");class qt extends Nt{constructor(t=P.document.createDocumentFragment()){super(t)}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){const t=new Nt(C("wrapper",n));return t.add(this.node.cloneNode(!0)),t.xml(!1,n)}return super.xml(t,!1,n)}}k(qt,"Fragment");const zt=qt;function Xt(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new _t(t),fy:new _t(e)}):this.attr({x1:new _t(t),y1:new _t(e)})}function Gt(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new _t(t),cy:new _t(e)}):this.attr({x2:new _t(t),y2:new _t(e)})}class Yt extends Et{constructor(t,e){super(T(t+"Gradient","string"==typeof t?null:t),e)}attr(t,e,n){return"transform"===t&&(t="gradientTransform"),super.attr(t,e,n)}bbox(){return new at}targets(){return dt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}I(Yt,e),h({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:F((function(t,e){return this.put(new Yt(t)).update(e)}))}}),k(Yt,"Gradient");class Ht extends Et{constructor(t,e=t){super(T("pattern",t),e)}attr(t,e,n){return"transform"===t&&(t="patternTransform"),super.attr(t,e,n)}bbox(){return new at}targets(){return dt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}h({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:F((function(t,e,n){return this.put(new Ht).update(n).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),k(Ht,"Pattern");class Ut extends At{constructor(t,e=t){super(T("image",t),e)}load(t,e){if(!t)return this;const n=new P.window.Image;return yt(n,"load",(function(t){const r=this.parent(Ht);0===this.width()&&0===this.height()&&this.size(n.width,n.height),r instanceof Ht&&0===r.width()&&0===r.height()&&r.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),yt(n,"load error",(function(){bt(n)})),this.attr("href",n.src=t,_)}}var Wt;Wt=function(t,e,n){return"fill"!==t&&"stroke"!==t||$.test(e)&&(e=n.root().defs().image(e)),e instanceof Ut&&(e=n.root().defs().pattern(0,0,(t=>{t.add(e)}))),e},Mt.push(Wt),h({Container:{image:F((function(t,e){return this.put(new Ut).size(0,0).load(t,e)}))}}),k(Ut,"Image");class $t extends St{bbox(){let t=-1/0,e=-1/0,n=1/0,r=1/0;return this.forEach((function(i){t=Math.max(i[0],t),e=Math.max(i[1],e),n=Math.min(i[0],n),r=Math.min(i[1],r)})),new at(n,r,t-n,e-r)}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let n=this.length-1;n>=0;n--)this[n]=[this[n][0]+t,this[n][1]+e];return this}parse(t=[0,0]){const e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(K).map(parseFloat)).length%2!=0&&t.pop();for(let n=0,r=t.length;n<r;n+=2)e.push([t[n],t[n+1]]);return e}size(t,e){let n;const r=this.bbox();for(n=this.length-1;n>=0;n--)r.width&&(this[n][0]=(this[n][0]-r.x)*t/r.width+r.x),r.height&&(this[n][1]=(this[n][1]-r.y)*e/r.height+r.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let e=0,n=this.length;e<n;e++)t.push(this[e].join(","));return t.join(" ")}transform(t){return this.clone().transformO(t)}transformO(t){it.isMatrixLike(t)||(t=new it(t));for(let e=this.length;e--;){const[n,r]=this[e];this[e][0]=t.a*n+t.c*r+t.e,this[e][1]=t.b*n+t.d*r+t.f}return this}}const Kt=$t;function Qt(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}function Jt(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}function Zt(t){const e=this.bbox();return null==t?e.width:this.size(t,e.height)}function te(t){const e=this.bbox();return null==t?e.height:this.size(e.width,t)}class ee extends At{constructor(t,e=t){super(T("line",t),e)}array(){return new $t([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(t,e){return this.attr(this.array().move(t,e).toLine())}plot(t,e,n,r){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:n,y2:r}:new $t(t).toLine(),this.attr(t))}size(t,e){const n=g(this,t,e);return this.attr(this.array().size(n.width,n.height).toLine())}}I(ee,i),h({Container:{line:F((function(...t){return ee.prototype.plot.apply(this.put(new ee),null!=t[0]?t:[0,0,0,0])}))}}),k(ee,"Line");class ne extends Et{constructor(t,e=t){super(T("marker",t),e)}height(t){return this.attr("markerHeight",t)}orient(t){return this.attr("orient",t)}ref(t,e){return this.attr("refX",t).attr("refY",e)}toString(){return"url(#"+this.id()+")"}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}width(t){return this.attr("markerWidth",t)}}function re(t,e){return function(n){return null==n?this[t]:(this[t]=n,e&&e.call(this),this)}}h({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:F((function(t,e,n){return this.put(new ne).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(n)}))},marker:{marker(t,e,n,r){let i=["marker"];return"all"!==t&&i.push(t),i=i.join("-"),t=arguments[1]instanceof ne?arguments[1]:this.defs().marker(e,n,r),this.attr(i,t)}}}),k(ne,"Marker");const ie={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,n,r){return function(i){return i<0?t>0?e/t*i:n>0?r/n*i:0:i>1?n<1?(1-r)/(1-n)*i+(r-n)/(1-n):t<1?(1-e)/(1-t)*i+(e-t)/(1-t):1:3*i*(1-i)**2*e+3*i**2*(1-i)*r+i**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let n=t;return"none"===e?--n:"both"===e&&++n,(r,i=!1)=>{let s=Math.floor(r*t);const o=r*s%1==0;return"start"!==e&&"both"!==e||++s,i&&o&&--s,r>=0&&s<0&&(s=0),r<=1&&s>n&&(s=n),s/n}}};class se{done(){return!1}}class oe extends se{constructor(t=">"){super(),this.ease=ie[t]||t}step(t,e,n){return"number"!=typeof t?n<1?t:e:t+(e-t)*this.ease(n)}}class ae extends se{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,n,r){return this.stepper(t,e,n,r)}}function ue(){const t=(this._duration||500)/1e3,e=this._overshoot||0,n=Math.PI,r=Math.log(e/100+1e-10),i=-r/Math.sqrt(n*n+r*r),s=3.9/(i*t);this.d=2*i*s,this.k=s*s}I(class extends ae{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;n>100&&(n=16),n/=1e3;const i=r.velocity||0,s=-this.d*i-this.k*(t-e),o=t+i*n+s*n*n/2;return r.velocity=i+s*n,r.done=Math.abs(e-o)+Math.abs(i)<.002,r.done?e:o}},{duration:re("_duration",ue),overshoot:re("_overshoot",ue)}),I(class extends ae{constructor(t=.1,e=.01,n=0,r=1e3){super(),this.p(t).i(e).d(n).windup(r)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;const i=e-t;let s=(r.integral||0)+i*n;const o=(i-(r.error||0))/n,a=this._windup;return!1!==a&&(s=Math.max(-a,Math.min(s,a))),r.error=i,r.integral=s,r.done=Math.abs(i)<.001,r.done?e:t+(this.P*i+this.I*s+this.D*o)}},{windup:re("_windup"),p:re("P"),i:re("I"),d:re("D")});const ce={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},he={M:function(t,e,n){return e.x=n.x=t[0],e.y=n.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,n){return e.x=n.x,e.y=n.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},le="mlhvqtcsaz".split("");for(let t=0,e=le.length;t<e;++t)he[le[t]]=function(t){return function(e,n,r){if("H"===t)e[0]=e[0]+n.x;else if("V"===t)e[0]=e[0]+n.y;else if("A"===t)e[5]=e[5]+n.x,e[6]=e[6]+n.y;else for(let t=0,r=e.length;t<r;++t)e[t]=e[t]+(t%2?n.y:n.x);return he[t](e,n,r)}}(le[t].toUpperCase());function de(t){return t.segment.length&&t.segment.length-1===ce[t.segment[0].toUpperCase()]}function fe(t,e){t.inNumber&&pe(t,!1);const n=Q.test(e);if(n)t.segment=[e];else{const e=t.lastCommand,n=e.toLowerCase(),r=e===n;t.segment=["m"===n?r?"l":"L":e]}return t.inSegment=!0,t.lastCommand=t.segment[0],n}function pe(t,e){if(!t.inNumber)throw new Error("Parser Error");t.number&&t.segment.push(parseFloat(t.number)),t.inNumber=e,t.number="",t.pointSeen=!1,t.hasExponent=!1,de(t)&&me(t)}function me(t){t.inSegment=!1,t.absolute&&(t.segment=function(t){const e=t.segment[0];return he[e](t.segment.slice(1),t.p,t.p0)}(t)),t.segments.push(t.segment)}function ge(t){if(!t.segment.length)return!1;const e="A"===t.segment[0].toUpperCase(),n=t.segment.length;return e&&(4===n||5===n)}function ye(t){return"E"===t.lastToken.toUpperCase()}const be=new Set([" ",",","\t","\n","\r","\f"]);class ve extends St{bbox(){return st().path.setAttribute("d",this.toString()),new at(st.nodes.path.getBBox())}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let n,r=this.length-1;r>=0;r--)n=this[r][0],"M"===n||"L"===n||"T"===n?(this[r][1]+=t,this[r][2]+=e):"H"===n?this[r][1]+=t:"V"===n?this[r][1]+=e:"C"===n||"S"===n||"Q"===n?(this[r][1]+=t,this[r][2]+=e,this[r][3]+=t,this[r][4]+=e,"C"===n&&(this[r][5]+=t,this[r][6]+=e)):"A"===n&&(this[r][6]+=t,this[r][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,e=!0){let n=0,r="";const i={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new nt,p:new nt};for(;i.lastToken=r,r=t.charAt(n++);)if(i.inSegment||!fe(i,r))if("."!==r)if(isNaN(parseInt(r)))if(be.has(r))i.inNumber&&pe(i,!1);else if("-"!==r&&"+"!==r)if("E"!==r.toUpperCase()){if(Q.test(r)){if(i.inNumber)pe(i,!1);else{if(!de(i))throw new Error("parser Error");me(i)}--n}}else i.number+=r,i.hasExponent=!0;else{if(i.inNumber&&!ye(i)){pe(i,!1),--n;continue}i.number+=r,i.inNumber=!0}else{if("0"===i.number||ge(i)){i.inNumber=!0,i.number=r,pe(i,!0);continue}i.inNumber=!0,i.number+=r}else{if(i.pointSeen||i.hasExponent){pe(i,!1),--n;continue}i.inNumber=!0,i.pointSeen=!0,i.number+=r}return i.inNumber&&pe(i,!1),i.inSegment&&de(i)&&me(i),i.segments}(t)}size(t,e){const n=this.bbox();let r,i;for(n.width=0===n.width?1:n.width,n.height=0===n.height?1:n.height,r=this.length-1;r>=0;r--)i=this[r][0],"M"===i||"L"===i||"T"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y):"H"===i?this[r][1]=(this[r][1]-n.x)*t/n.width+n.x:"V"===i?this[r][1]=(this[r][1]-n.y)*e/n.height+n.y:"C"===i||"S"===i||"Q"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y,this[r][3]=(this[r][3]-n.x)*t/n.width+n.x,this[r][4]=(this[r][4]-n.y)*e/n.height+n.y,"C"===i&&(this[r][5]=(this[r][5]-n.x)*t/n.width+n.x,this[r][6]=(this[r][6]-n.y)*e/n.height+n.y)):"A"===i&&(this[r][1]=this[r][1]*t/n.width,this[r][2]=this[r][2]*e/n.height,this[r][6]=(this[r][6]-n.x)*t/n.width+n.x,this[r][7]=(this[r][7]-n.y)*e/n.height+n.y);return this}toString(){return function(t){let e="";for(let n=0,r=t.length;n<r;n++)e+=t[n][0],null!=t[n][1]&&(e+=t[n][1],null!=t[n][2]&&(e+=" ",e+=t[n][2],null!=t[n][3]&&(e+=" ",e+=t[n][3],e+=" ",e+=t[n][4],null!=t[n][5]&&(e+=" ",e+=t[n][5],e+=" ",e+=t[n][6],null!=t[n][7]&&(e+=" ",e+=t[n][7])))));return e+" "}(this)}}const we=t=>{const e=typeof t;return"number"===e?_t:"string"===e?et.isColor(t)?et:K.test(t)?Q.test(t)?ve:St:R.test(t)?_t:Se:Ne.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?St:"object"===e?Me:Se};class xe{constructor(t){this._stepper=t||new oe("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(we(t));let e=new this._type(t);return this._type===et&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===Me&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}class Se{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}}class _e{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,_e.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}_e.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const Pe=(t,e)=>t[0]<e[0]?-1:t[0]>e[0]?1:0;class Me{constructor(...t){this.init(...t)}align(t){const e=this.values;for(let n=0,r=e.length;n<r;++n){if(e[n+1]===t[n+1]){if(e[n+1]===et&&t[n+7]!==e[n+7]){const e=t[n+7],r=new et(this.values.splice(n+3,5))[e]().toArray();this.values.splice(n+3,0,...r)}n+=e[n+2]+2;continue}if(!t[n+1])return this;const r=(new t[n+1]).toArray(),i=e[n+2]+3;e.splice(n,i,t[n],t[n+1],t[n+2],...r),n+=e[n+2]+2}return this}init(t){if(this.values=[],Array.isArray(t))return void(this.values=t.slice());t=t||{};const e=[];for(const n in t){const r=we(t[n]),i=new r(t[n]).toArray();e.push([n,r,i.length,...i])}return e.sort(Pe),this.values=e.reduce(((t,e)=>t.concat(e)),[]),this}toArray(){return this.values}valueOf(){const t={},e=this.values;for(;e.length;){const n=e.shift(),r=e.shift(),i=e.shift(),s=e.splice(0,i);t[n]=new r(s)}return t}}const Ne=[Se,_e,Me];class Oe extends At{constructor(t,e=t){super(T("path",t),e)}array(){return this._array||(this._array=new ve(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,e){return this.attr("d",this.array().move(t,e))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new ve(t))}size(t,e){const n=g(this,t,e);return this.attr("d",this.array().size(n.width,n.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}function Ce(){return this._array||(this._array=new $t(this.attr("points")))}function Ee(){return delete this._array,this}function Te(t,e){return this.attr("points",this.array().move(t,e))}function Ae(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new $t(t))}function je(t,e){const n=g(this,t,e);return this.attr("points",this.array().size(n.width,n.height))}Oe.prototype.MorphArray=ve,h({Container:{path:F((function(t){return this.put(new Oe).plot(t||new ve)}))}}),k(Oe,"Path");class ke extends At{constructor(t,e=t){super(T("polygon",t),e)}}h({Container:{polygon:F((function(t){return this.put(new ke).plot(t||new $t)}))}}),I(ke,i),I(ke,s),k(ke,"Polygon");class De extends At{constructor(t,e=t){super(T("polyline",t),e)}}h({Container:{polyline:F((function(t){return this.put(new De).plot(t||new $t)}))}}),I(De,i),I(De,s),k(De,"Polyline");class Le extends At{constructor(t,e=t){super(T("rect",t),e)}}I(Le,{rx:jt,ry:kt}),h({Container:{rect:F((function(t,e){return this.put(new Le).size(t,e)}))}}),k(Le,"Rect");class Be{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const e=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}const Ie={nextDraw:null,frames:new Be,timeouts:new Be,immediates:new Be,timer:()=>P.window.performance||P.window.Date,transforms:[],frame(t){const e=Ie.frames.push({run:t});return null===Ie.nextDraw&&(Ie.nextDraw=P.window.requestAnimationFrame(Ie._draw)),e},timeout(t,e){e=e||0;const n=Ie.timer().now()+e,r=Ie.timeouts.push({run:t,time:n});return null===Ie.nextDraw&&(Ie.nextDraw=P.window.requestAnimationFrame(Ie._draw)),r},immediate(t){const e=Ie.immediates.push(t);return null===Ie.nextDraw&&(Ie.nextDraw=P.window.requestAnimationFrame(Ie._draw)),e},cancelFrame(t){null!=t&&Ie.frames.remove(t)},clearTimeout(t){null!=t&&Ie.timeouts.remove(t)},cancelImmediate(t){null!=t&&Ie.immediates.remove(t)},_draw(t){let e=null;const n=Ie.timeouts.last();for(;(e=Ie.timeouts.shift())&&(t>=e.time?e.run():Ie.timeouts.push(e),e!==n););let r=null;const i=Ie.frames.last();for(;r!==i&&(r=Ie.frames.shift());)r.run(t);let s=null;for(;s=Ie.immediates.shift();)s();Ie.nextDraw=Ie.timeouts.first()||Ie.frames.first()?P.window.requestAnimationFrame(Ie._draw):null}},Fe=Ie,Re=function(t){const e=t.start,n=t.runner.duration();return{start:e,duration:n,end:e+n,runner:t.runner}},Ve=function(){const t=P.window;return(t.performance||t.Date).now()};class qe extends vt{constructor(t=Ve){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const e=this.speed();if(null==t)return this.speed(-e);const n=Math.abs(e);return this.speed(t?-n:n)}schedule(t,e,n){if(null==t)return this._runners.map(Re);let r=0;const i=this.getEndTime();if(e=e||0,null==n||"last"===n||"after"===n)r=i;else if("absolute"===n||"start"===n)r=e,e=0;else if("now"===n)r=this._time;else if("relative"===n){const n=this.getRunnerInfoById(t.id);n&&(r=n.start+e,e=0)}else{if("with-last"!==n)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();r=t?t.start:this._time}}t.unschedule(),t.timeline(this);const s=t.persist(),o={persist:null===s?this._persist:s,start:r+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(o),this._runners.sort(((t,e)=>t.start-e.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return Fe.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=Fe.frame(this._step)),this)}_stepFn(t=!1){const e=this._timeSource();let n=e-this._lastSourceTime;t&&(n=0);const r=this._speed*n+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=r,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let t=this._runners.length;t--;){const e=this._runners[t],n=e.runner;this._time-e.start<=0&&n.reset()}let i=!1;for(let t=0,e=this._runners.length;t<e;t++){const n=this._runners[t],s=n.runner;let o=r;const a=this._time-n.start;a<=0?i=!0:(a<o&&(o=a),s.active()&&(s.step(o).done?!0!==n.persist&&s.duration()-s.time()+this._time+n.persist<this._time&&(s.unschedule(),--t,--e):i=!0))}return i&&!(this._speed<0&&0===this._time)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}h({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new qe,this._timeline):(this._timeline=t,this)}}});class ze extends vt{constructor(t){super(),this.id=ze.id++,t="function"==typeof(t=null==t?400:t)?new ae(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof ae,this._stepper=this._isDeclarative?t:new oe,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new it,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,e,n){let r=1,i=!1,s=0;return e=e??0,n=n||"last","object"!=typeof(t=t??400)||t instanceof se||(e=t.delay??e,n=t.when??n,i=t.swing||i,r=t.times??r,s=t.wait??s,t=t.duration??400),{duration:t,delay:e,swing:i,times:r,wait:s,when:n}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(t,e,n){const r=ze.sanitise(t,e,n),i=new ze(r.duration);return this._timeline&&i.timeline(this._timeline),this._element&&i.element(this._element),i.loop(r).schedule(r.delay,r.when)}clearTransform(){return this.transforms=new it,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new oe(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,e,n){return"object"==typeof t&&(e=t.swing,n=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=n||0,!0===this._times&&(this._times=1/0),this}loops(t){const e=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/e),n=(this._time-t*e)/this._duration;return Math.min(t+n,this._times)}const n=t%1,r=e*Math.floor(t)+this._duration*n;return this.time(r)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,n=this._duration,r=this._wait,i=this._times,s=this._swing,o=this._reverse;let a;if(null==t){const t=function(t){const e=s*Math.floor(t%(2*(r+n))/(r+n)),i=e&&!o||!e&&o,a=Math.pow(-1,i)*(t%(r+n))/n+i;return Math.max(Math.min(a,1),0)},u=i*(r+n)-r;return a=e<=0?Math.round(t(1e-5)):e<u?t(e):Math.round(t(u-1e-5)),a}const u=Math.floor(this.loops()),c=s&&u%2==0;return a=u+(c&&!o||o&&c?t:1-t),this.loops(a)}progress(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}queue(t,e,n,r){return this._queue.push({initialiser:t||wt,runner:e||wt,retarget:n,isTransform:r,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted||(this.time(0),this._reseted=!0),this}reverse(t){return this._reverse=null==t?!this._reverse:t,this}schedule(t,e,n){if(t instanceof qe||(n=e,e=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,e,n),this}step(t){if(!this.enabled)return this;t=null==t?16:t,this._time+=t;const e=this.position(),n=this._lastPosition!==e&&this._time>=0;this._lastPosition=e;const r=this.duration(),i=this._lastTime<=0&&this._time>0,s=this._lastTime<r&&this._time>=r;this._lastTime=this._time,i&&this.fire("start",this);const o=this._isDeclarative;this.done=!o&&!s&&this._time>=r,this._reseted=!1;let a=!1;return(n||o)&&(this._initialise(n),this.transforms=new it,a=this._run(o?t:e),this.fire("step",this)),this.done=this.done||a&&o,s&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const e=t-this._time;return this.step(e),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let e=0,n=this._queue.length;e<n;++e){const n=this._queue[e],r=this._isDeclarative||!n.initialised&&t;t=!n.finished,r&&t&&(n.initialiser.call(this),n.initialised=!0)}}_rememberMorpher(t,e){if(this._history[t]={morpher:e,caller:this._queue[this._queue.length-1]},this._isDeclarative){const t=this.timeline();t&&t.play()}}_run(t){let e=!0;for(let n=0,r=this._queue.length;n<r;++n){const r=this._queue[n],i=r.runner.call(this,t);r.finished=r.finished||!0===i,e=e&&r.finished}return e}_tryRetarget(t,e,n){if(this._history[t]){if(!this._history[t].caller.initialised){const e=this._queue.indexOf(this._history[t].caller);return this._queue.splice(e,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget.call(this,e,n):this._history[t].morpher.to(e),this._history[t].caller.finished=!1;const r=this.timeline();return r&&r.play(),!0}return!1}}ze.id=0;class Xe{constructor(t=new it,e=-1,n=!0){this.transforms=t,this.id=e,this.done=n}clearTransformsFromQueue(){}}I([ze,Xe],{mergeWith(t){return new Xe(t.transforms.lmultiply(this.transforms),t.id)}});const Ge=(t,e)=>t.lmultiplyO(e),Ye=t=>t.transforms;function He(){const t=this._transformationRunners.runners.map(Ye).reduce(Ge,new it);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class Ue{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new Xe).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,e){const n=this.ids.indexOf(t+1);return this.ids.splice(n,1,t+1),this.runners.splice(n,1,e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let e=0;e<this.runners.length;++e){const n=this.runners[e];if(!(t&&n.done&&t.done)||n._timeline&&n._timeline._runnerIds.includes(n.id)||t._timeline&&t._timeline._runnerIds.includes(t.id))t=n;else{this.remove(n.id);const r=n.mergeWith(t);this.edit(t.id,r),t=r,--e}}return this}remove(t){const e=this.ids.indexOf(t+1);return this.ids.splice(e,1),this.runners.splice(e,1),this}}h({Element:{animate(t,e,n){const r=ze.sanitise(t,e,n),i=this.timeline();return new ze(r.duration).loop(r).element(this).timeline(i.play()).schedule(r.delay,r.when)},delay(t,e){return this.animate(0,t,e)},_clearTransformRunnersBefore(t){this._transformationRunners.clearBefore(t.id)},_currentTransform(t){return this._transformationRunners.runners.filter((e=>e.id<=t.id)).map(Ye).reduce(Ge,new it)},_addRunner(t){this._transformationRunners.add(t),Fe.cancelImmediate(this._frameId),this._frameId=Fe.immediate(He.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new Ue).add(new Xe(new it(this))))}}}),I(ze,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,n){if("string"==typeof e)return this.styleAttr(t,{[e]:n});let r=e;if(this._tryRetarget(t,r))return this;let i=new xe(this._stepper).to(r),s=Object.keys(r);return this.queue((function(){i=i.from(this.element()[t](s))}),(function(e){return this.element()[t](i.at(e).valueOf()),i.done()}),(function(e){const n=Object.keys(e),o=(a=s,n.filter((t=>!a.includes(t))));var a;if(o.length){const e=this.element()[t](o),n=new Me(i.from()).valueOf();Object.assign(n,e),i.from(n)}const u=new Me(i.to()).valueOf();Object.assign(u,e),i.to(u),s=n,r=e})),this._rememberMorpher(t,i),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let n=new xe(this._stepper).to(new _t(t));return this.queue((function(){n=n.from(this.element().zoom())}),(function(t){return this.element().zoom(n.at(t),e),n.done()}),(function(t,r){e=r,n.to(t)})),this._rememberMorpher("zoom",n),this},transform(t,e,n){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const r=it.isMatrixLike(t);n=null!=t.affine?t.affine:null!=n?n:!r;const i=new xe(this._stepper).type(n?_e:it);let s,o,a,u,c;return this.queue((function(){o=o||this.element(),s=s||y(t,o),c=new it(e?void 0:o),o._addRunner(this),e||o._clearTransformRunnersBefore(this)}),(function(h){e||this.clearTransform();const{x:l,y:d}=new nt(s).transform(o._currentTransform(this));let f=new it({...t,origin:[l,d]}),p=this._isDeclarative&&a?a:c;if(n){f=f.decompose(l,d),p=p.decompose(l,d);const t=f.rotate,e=p.rotate,n=[t-360,t,t+360],r=n.map((t=>Math.abs(t-e))),i=Math.min(...r),s=r.indexOf(i);f.rotate=n[s]}e&&(r||(f.rotate=t.rotate||0),this._isDeclarative&&u&&(p.rotate=u)),i.from(p),i.to(f);const m=i.at(h);return u=m.rotate,a=new it(m),this.addTransform(a),o._addRunner(this),i.done()}),(function(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(s=y(e,o)),t={...e,origin:s}}),!0),this._isDeclarative&&this._rememberMorpher("transform",i),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new _t(e),this._tryRetarget(t,e))return this;const n=new xe(this._stepper).to(e);let r=null;return this.queue((function(){r=this.element()[t](),n.from(r),n.to(r+e)}),(function(e){return this.element()[t](n.at(e)),n.done()}),(function(t){n.to(r+new _t(t))})),this._rememberMorpher(t,n),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const n=new xe(this._stepper).to(e);return this.queue((function(){n.from(this.element()[t]())}),(function(e){return this.element()[t](n.at(e)),n.done()})),this._rememberMorpher(t,n),this},_queueNumber(t,e){return this._queueObject(t,new _t(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let n;return t&&e||(n=this._element.bbox()),t||(t=n.width/n.height*e),e||(e=n.height/n.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,n,r){if(4===arguments.length)return this.plot([t,e,n,r]);if(this._tryRetarget("plot",t))return this;const i=new xe(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){i.from(this._element.array())}),(function(t){return this._element.plot(i.at(t)),i.done()})),this._rememberMorpher("plot",i),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,n,r){return this._queueObject("viewbox",new at(t,e,n,r))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),I(ze,{rx:jt,ry:kt,from:Xt,to:Gt}),k(ze,"Runner");class We extends Et{constructor(t,e=t){super(T("svg",t),e),this.namespace()}defs(){return this.isRoot()?A(this.node.querySelector("defs"))||this.put(new Tt):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof P.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:x,version:"1.1"}).attr("xmlns:xlink",_,S):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,S).attr("xmlns:svgjs",null,S)}root(){return this.isRoot()?this:super.root()}}h({Container:{nested:F((function(){return this.put(new We)}))}}),k(We,"Svg",!0);class $e extends Et{constructor(t,e=t){super(T("symbol",t),e)}}function Ke(t){return!1===this._build&&this.clear(),this.node.appendChild(P.document.createTextNode(t)),this}function Qe(){return this.node.getComputedTextLength()}function Je(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)}function Ze(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}function tn(t,e,n=this.bbox()){return this.x(t,n).y(e,n)}function en(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)}function nn(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)}function rn(t,e,n=this.bbox()){return this.cx(t,n).cy(e,n)}function sn(t){return this.attr("x",t)}function on(t){return this.attr("y",t)}function an(t,e){return this.ax(t).ay(e)}function un(t){return this._build=!!t,this}h({Container:{symbol:F((function(){return this.put(new $e)}))}}),k($e,"Symbol");class cn extends At{constructor(t,e=t){super(T("text",t),e),this.dom.leading=this.dom.leading??new _t(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new _t(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let e=0;const n=this.dom.leading;this.each((function(r){if(v(this.node))return;const i=P.window.getComputedStyle(this.node).getPropertyValue("font-size"),s=n*new _t(i);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?e+=s:(this.attr("dy",r?s+e:0),e=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new _t(t.leading||1.3),this}writeDataToDom(){return w(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const e=this.node.childNodes;let n=0;t="";for(let r=0,i=e.length;r<i;++r)"textPath"===e[r].nodeName||v(e[r])?0===r&&(n=r+1):(r!==n&&3!==e[r].nodeType&&!0===A(e[r]).dom.newLined&&(t+="\n"),t+=e[r].textContent);return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else for(let e=0,n=(t=(t+"").split("\n")).length;e<n;e++)this.newLine(t[e]);return this.build(!1).rebuild()}}I(cn,o),h({Container:{text:F((function(t=""){return this.put(new cn).text(t)})),plain:F((function(t=""){return this.put(new cn).plain(t)}))}}),k(cn,"Text");class hn extends At{constructor(t,e=t){super(T("tspan",t),e),this._build=!1}dx(t){return this.attr("dx",t)}dy(t){return this.attr("dy",t)}newLine(){this.dom.newLined=!0;const t=this.parent();if(!(t instanceof cn))return this;const e=t.index(this),n=P.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=t.dom.leading*new _t(n);return this.dy(e?r:0).attr("x",t.x())}text(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?(this.clear().build(!0),t.call(this,this),this.build(!1)):this.plain(t),this)}}I(hn,o),h({Tspan:{tspan:F((function(t=""){const e=new hn;return this._build||this.clear(),this.put(e).text(t)}))},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),k(hn,"Tspan");class ln extends At{constructor(t,e=t){super(T("circle",t),e)}radius(t){return this.attr("r",t)}rx(t){return this.attr("r",t)}ry(t){return this.rx(t)}size(t){return this.radius(new _t(t).divide(2))}}I(ln,{x:Dt,y:Lt,cx:Bt,cy:It,width:Ft,height:Rt}),h({Container:{circle:F((function(t=0){return this.put(new ln).size(t).move(0,0)}))}}),k(ln,"Circle");class dn extends Et{constructor(t,e=t){super(T("clipPath",t),e)}remove(){return this.targets().forEach((function(t){t.unclip()})),super.remove()}targets(){return dt("svg [clip-path*="+this.id()+"]")}}h({Container:{clip:F((function(){return this.defs().put(new dn)}))},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const e=t instanceof dn?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}}),k(dn,"ClipPath");class fn extends Ot{constructor(t,e=t){super(T("foreignObject",t),e)}}function pn(t,e){return this.children().forEach((n=>{let r;try{r=n.node instanceof P.window.SVGSVGElement?new at(n.attr(["x","y","width","height"])):n.bbox()}catch(t){return}const i=new it(n),s=i.translate(t,e).transform(i.inverse()),o=new nt(r.x,r.y).transform(s);n.move(o.x,o.y)})),this}function mn(t){return this.dmove(t,0)}function gn(t){return this.dmove(0,t)}function yn(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)}function bn(t=0,e=0,n=this.bbox()){const r=t-n.x,i=e-n.y;return this.dmove(r,i)}function vn(t,e,n=this.bbox()){const r=g(this,t,e,n),i=r.width/n.width,s=r.height/n.height;return this.children().forEach((t=>{const e=new nt(n).transform(new it(t).inverse());t.scale(i,s,e.x,e.y)})),this}function wn(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)}function xn(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)}function Sn(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}h({Container:{foreignObject:F((function(t,e){return this.put(new fn).size(t,e)}))}}),k(fn,"ForeignObject");class _n extends Et{constructor(t,e=t){super(T("g",t),e)}}I(_n,a),h({Container:{group:F((function(){return this.put(new _n)}))}}),k(_n,"G");class Pn extends Et{constructor(t,e=t){super(T("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,_)}}I(Pn,a),h({Container:{link:F((function(t){return this.put(new Pn).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const n=e.index(t);return e.add(this,n),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new Pn,this.wrap(e)),"function"==typeof t?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),k(Pn,"A");class Mn extends Et{constructor(t,e=t){super(T("mask",t),e)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return dt("svg [mask*="+this.id()+"]")}}h({Container:{mask:F((function(){return this.defs().put(new Mn)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof Mn?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),k(Mn,"Mask");class Nn extends Ot{constructor(t,e=t){super(T("stop",t),e)}update(t){return("number"==typeof t||t instanceof _t)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new _t(t.offset)),this}}h({Gradient:{stop:function(t,e,n){return this.put(new Nn).update(t,e,n)}}}),k(Nn,"Stop");class On extends Ot{constructor(t,e=t){super(T("style",t),e)}addText(t=""){return this.node.textContent+=t,this}font(t,e,n={}){return this.rule("@font-face",{fontFamily:t,src:e,...n})}rule(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;let n=t+"{";for(const t in e)n+=t.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))+":"+e[t]+";";return n+="}",n}(t,e))}}h("Dom",{style(t,e){return this.put(new On).rule(t,e)},fontface(t,e,n){return this.put(new On).font(t,e,n)}}),k(On,"Style");class Cn extends cn{constructor(t,e=t){super(T("textPath",t),e)}array(){const t=this.track();return t?t.array():null}plot(t){const e=this.track();let n=null;return e&&(n=e.plot(t)),null==t?n:this}track(){return this.reference("href")}}h({Container:{textPath:F((function(t,e){return t instanceof cn||(t=this.text(t)),t.path(e)}))},Text:{path:F((function(t,e=!0){const n=new Cn;let r;if(t instanceof Oe||(t=this.defs().path(t)),n.attr("href","#"+t,_),e)for(;r=this.node.firstChild;)n.node.appendChild(r);return this.put(n)})),textPath(){return this.findOne("textPath")}},Path:{text:F((function(t){return t instanceof cn||(t=(new cn).addTo(this.parent()).text(t)),t.path(this)})),targets(){return dt("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),Cn.prototype.MorphArray=ve,k(Cn,"TextPath");class En extends At{constructor(t,e=t){super(T("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,_)}}h({Container:{use:F((function(t,e){return this.put(new En).use(t,e)}))}}),k(En,"Use"),I([We,$e,Ut,Ht,ne],l("viewbox")),I([ee,De,ke,Oe],l("marker")),I(cn,l("Text")),I(Oe,l("Path")),I(Tt,l("Defs")),I([cn,hn],l("Tspan")),I([Le,Vt,Yt,ze],l("radius")),I(vt,l("EventTarget")),I(Nt,l("Dom")),I(Ot,l("Element")),I(At,l("Shape")),I([Et,zt],l("Container")),I(Yt,l("Gradient")),I(ze,l("Runner")),ht.extend([...new Set(c)]),function(t=[]){Ne.push(...[].concat(t))}([_t,et,at,it,St,$t,ve,nt]),I(Ne,{to(t){return(new xe).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,n,r,i){return this.fromArray(t.map((function(t,s){return r.step(t,e[s],n,i[s],i)})))}});var Tn=n(726),An=n(725),jn=n(854);const kn=["basePadding1","basePadding2"],Dn={basePadding1:"setBasePadding1",basePadding2:"setBasePadding2"};class Ln{static between(t,e){let n=(new ee).node,r=new Ln(n,t,e);return r.assignUUID(),r.set(Ln.defaultValues),r.reposition(),r}constructor(t,e,n){this.line=t,this.base1=e,this.base2=n,this.cachedBasePadding1=(0,An.distance)(this.point1,this.base1.centerPoint),this.cachedBasePadding2=(0,An.distance)(this.point2,this.base2.centerPoint),e.addEventListener("move",(()=>this.reposition())),n.addEventListener("move",(()=>this.reposition()))}get basePair(){return[this.base1,this.base2]}get domNode(){return this.line}getAttribute(t){return this.domNode.getAttribute(t)}setAttribute(t,e){this.domNode.setAttribute(t,e)}setAttributes(t){if((0,jn.isNonNullObject)(t))try{new ee(this.domNode).attr(t)}catch(t){}}get id(){return this.domNode.id}assignUUID(){(0,Tn.assignUUID)(this.domNode)}appendTo(t){t.appendChild(this.domNode)}remove(){this.domNode.remove()}isIn(t){return t.contains(this.domNode)&&t!==this.domNode}hasParent(){return!!this.domNode.parentNode}getTotalLength(){return this.domNode.getTotalLength()}getPointAtLength(t){return this.domNode.getPointAtLength(t)}get point1(){return{x:this.domNode.x1.baseVal.value,y:this.domNode.y1.baseVal.value}}get point2(){return{x:this.domNode.x2.baseVal.value,y:this.domNode.y2.baseVal.value}}get basePadding1(){return this.cachedBasePadding1}set basePadding1(t){this.cachedBasePadding1=t,this.reposition()}setBasePadding1(t){(0,jn.isFiniteNumber)(t)&&(this.basePadding1=Math.max(0,t))}get basePadding2(){return this.cachedBasePadding2}set basePadding2(t){this.cachedBasePadding2=t,this.reposition()}setBasePadding2(t){(0,jn.isFiniteNumber)(t)&&(this.basePadding2=Math.max(0,t))}isInverted(){return this.basePadding1+this.basePadding2>(0,An.distance)(this.base1.centerPoint,this.base2.centerPoint)}set(t){try{this.setAttributes(t.attributes)}catch(t){}kn.forEach((e=>{try{this[Dn[e]](t[e])}catch(t){}}))}reposition(){let t=this.base1.centerPoint,e=this.base2.centerPoint,n=(0,An.direction)(t,e);this.setAttribute("x1",`${t.x+this.basePadding1*Math.cos(n)}`),this.setAttribute("y1",`${t.y+this.basePadding1*Math.sin(n)}`),this.setAttribute("x2",""+(e.x-this.basePadding2*Math.cos(n))),this.setAttribute("y2",""+(e.y-this.basePadding2*Math.sin(n)))}}Ln.defaultValues={attributes:{stroke:"#000000","stroke-width":"2"},basePadding1:6,basePadding2:6};var Bn,In=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class Fn{constructor(t){Bn.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,Bn,t)}toJSONSerializable(){let t=In(this,Bn,"f").id,e=In(this,Bn,"f").base1.id,n=In(this,Bn,"f").base2.id;if(!t)throw new Error("Straight bond ID is falsy.");if(!e)throw new Error("Base ID 1 is falsy.");if(!n)throw new Error("Base ID 2 is falsy.");return{id:t,baseID1:e,baseID2:n,basePadding1:In(this,Bn,"f").basePadding1,basePadding2:In(this,Bn,"f").basePadding2}}}Bn=new WeakMap;var Rn,Vn,qn,zn,Xn,Gn,Yn,Hn,Un,Wn,$n,Kn,Qn,Jn,Zn=function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n},tr=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class er{constructor(t,e){Rn.add(this),Vn.set(this,void 0),qn.set(this,void 0),Zn(this,Vn,t,"f"),Zn(this,qn,e,"f")}recreate(){let t=new Ln(tr(this,Rn,"a",Gn),tr(this,Rn,"a",Wn),tr(this,Rn,"a",$n));try{t.basePadding1=tr(this,Rn,"a",Qn)}catch(t){}try{t.basePadding2=tr(this,Rn,"a",Jn)}catch(t){}return t}}Vn=new WeakMap,qn=new WeakMap,Rn=new WeakSet,zn=function(t){let e=tr(this,Vn,"f")[t];if(!e)throw new Error(`No ID with name "${t}" was saved.`);if("string"!=typeof e)throw new Error(`The ID with name "${t}" is not a string: ${e}.`);return e},Xn=function(){try{return tr(this,Rn,"m",zn).call(this,"id")}catch(t){return tr(this,Rn,"m",zn).call(this,"lineId")}},Gn=function(){let t=tr(this,Rn,"a",Xn),e=tr(this,qn,"f").domNode.querySelector(`#${t}`);if(!e)throw new Error(`No DOM node in the drawing has the ID "${t}".`);if(!(e instanceof SVGLineElement))throw new Error(`The DOM node with ID "${t}" is not an SVG line element.`);return e},Yn=function(){try{return tr(this,Rn,"m",zn).call(this,"baseID1")}catch(t){return tr(this,Rn,"m",zn).call(this,"baseId1")}},Hn=function(){try{return tr(this,Rn,"m",zn).call(this,"baseID2")}catch(t){return tr(this,Rn,"m",zn).call(this,"baseId2")}},Un=function(t){let e={1:tr(this,Rn,"a",Yn),2:tr(this,Rn,"a",Hn)}[t],n=[...tr(this,qn,"f").bases].find((t=>t.id===e));if(!n)throw new Error(`No base in the drawing has the ID "${e}".`);return n},Wn=function(){return tr(this,Rn,"m",Un).call(this,1)},$n=function(){return tr(this,Rn,"m",Un).call(this,2)},Kn=function(t){let e=tr(this,Vn,"f")[`basePadding${t}`];if("number"!=typeof e)throw new Error(`Saved base padding ${t} is not a number: ${e}.`);return e},Qn=function(){return tr(this,Rn,"m",Kn).call(this,1)},Jn=function(){return tr(this,Rn,"m",Kn).call(this,2)};class nr{constructor(t,e){this.targetStraightBonds=t,new MutationObserver((t=>{let e=new Set([...this.targetStraightBonds].map((t=>t.domNode)));!t.some((t=>e.has(t.target)))||this.updateOpacities()})).observe(e,{attributes:!0,attributeFilter:["x1","y1","x2","y2"],subtree:!0})}updateOpacities(){[...this.targetStraightBonds].forEach((t=>{let e=t.isInverted()?"0":"1";t.setAttribute("opacity",e)}))}}})(),r})(),t.exports=e()},124:function(t){var e;e=()=>(()=>{var t={661:function(t){var e;e=()=>(()=>{var t={127:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>h,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},369:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>h,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function c(t){return"object"==typeof t&&null!==t}function h(t){return Array.isArray(t)}function l(t){return h(t)&&t.every(n)}function d(t){return h(t)&&t.every(r)}function f(t){return h(t)&&t.every(i)}function p(t){return h(t)&&t.every(a)}return t.r(e),t.d(e,{isArray:()=>h,isFiniteNumber:()=>r,isFiniteNumbersArray:()=>d,isNonFiniteNumber:()=>i,isNonFiniteNumbersArray:()=>f,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>c,isNullish:()=>u,isNumber:()=>n,isNumbersArray:()=>l,isPositiveFiniteNumber:()=>s,isString:()=>a,isStringsArray:()=>p}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Linkers:()=>g,Stems:()=>m,areConflicting:()=>c,areCrossing:()=>d,areEqual:()=>a,areKnotless:()=>l,areStacked:()=>u,deepCopy:()=>i,knotless:()=>p,mountainPlotTraversal:()=>y,parseDotBracket:()=>b,sorted:()=>o});var t=n(854),e=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function i(n){return(0,t.isNumbersArray)(n)?e([],n,!0):n.map((function(t){return e([],t,!0)}))}var s=n(986);function o(t){var e=i(t);return e.forEach(s.sortNumbers),e.sort((function(t,e){return t[0]-e[0]})),e}function a(t,e){var n=i(t),r=i(e);return(0,s.sortNumbers)(n),(0,s.sortNumbers)(r),[0,1].every((function(t){return n[t]==r[t]}))}function u(t,e){var n=o([t,e]);return n[0][0]==n[1][0]-1&&n[0][1]==n[1][1]+1}function c(t,e){return(0,s.min)(t)==(0,s.min)(e)&&(0,s.max)(t)!=(0,s.max)(e)||(0,s.min)(t)!=(0,s.min)(e)&&(0,s.max)(t)==(0,s.max)(e)}function h(t){if(0==t.length)return[];for(var e=[],n=0;n<(0,s.max)(t.flat());n++)e.push(void 0);return t.forEach((function(t){e[t[0]-1]=t[1],e[t[1]-1]=t[0]})),e}function l(t){var e=h(t),n=[],r=!1;return e.forEach((function(t,e){var i=e+1;null==t||(i<t?n.push(i):i==t||n.pop()!=t&&(r=!0))})),!r}function d(t,e){return!l([t,e])}var f=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function p(t){var e=[],n=i(t);return n.sort((function(t,e){return Math.abs(t[0]-t[1])-Math.abs(e[0]-e[1])})),n.forEach((function(t){l(f(f([],e,!0),[t],!1))&&e.push(t)})),e}var m=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=this.targetStructure[1];if(0==t.length)return[];var e=o(t),n=[],r=[];return e.forEach((function(t){var e=0==r.length?null:r[r.length-1];!e||u(e,t)?r.push(t):(n.push(r),r=[t])})),n.push(r),n},t}(),g=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=(new(m.bind.apply(m,function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}([void 0],this.targetStructure,!1)))).get().flatMap((function(t){return[t.map(s.min),t.map(s.max)]}));t.forEach(s.sortNumbers),t.sort((function(t,e){return(0,s.min)(t)-(0,s.min)(e)}));for(var e=[],n=t.shift(),r=t.shift();n&&r;){for(var i=[],o=(0,s.max)(n),a=(0,s.min)(r),u=o;u<=a;u++)i.push(u);e.push(i),n=r,r=t.shift()}return e},t}();function y(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[0],r=t[1],i=h(r);if(!l(r))throw new Error("Pseudoknot(s) encountered.");var s=[],o=0;return n.forEach((function(t,e){var n=e+1,r=i[e];null==r?s.push(o):n<r?(s.push(o),o++):(n==r||o--,s.push(o))})),s}function b(t){var e=t.split(""),n=[".","(",")"];e.forEach((function(t){if(!n.includes(t))throw new Error('Unrecognized character in dot-bracket notation: "'.concat(t,'".'))}));var r=[],i=[];if(e.forEach((function(t,e){var n=e+1;if("("==t)i.push(n);else if(")"==t){var s=i.pop();if("number"!=typeof s)throw new Error("Unmatched downstream partner(s) in dot-bracket notation.");r.push([s,n])}})),i.length>0)throw new Error("Unmatched upstream partner(s) in dot-bracket notation.");return o(r)}})(),r})(),t.exports=e()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{FirstPairedBase:()=>e,LastPairedBase:()=>s,LeadingDanglingBases:()=>o,Linkers:()=>h,PositionPairs:()=>t,Stems:()=>c,TrailingDanglingBases:()=>a,consecutivePairs:()=>f,knotless:()=>l,parseDotBracket:()=>d});class t{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];return this.targetStructure[1].map((e=>[t.indexOf(e[0])+1,t.indexOf(e[1])+1]))}}class e{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0],e=this.targetStructure[1];if(0==e.length)throw new Error("There are no paired bases.");let n=e.flat(),r=t.findIndex((t=>n.includes(t)));if(r<0)throw new Error("No paired bases present in sequence.");return t[r]}}var i=n(986);class s{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0],e=this.targetStructure[1];if(0==e.length)throw new Error("There are no paired bases.");let n=e.flat().map((e=>t.indexOf(e)));if((0,i.max)(n)<0)throw new Error("No paired bases present in sequence.");return t[(0,i.max)(n)]}}class o{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];if(0==this.targetStructure[1].length)throw new Error("There are no paired bases.");let n=new e(...this.targetStructure).get(),r=t.indexOf(n);if(r<0)throw new Error("No paired bases present in sequence.");return t.slice(0,r)}}class a{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];if(0==this.targetStructure[1].length)throw new Error("There are no paired bases.");let e=new s(...this.targetStructure).get(),n=t.indexOf(e);if(n<0)throw new Error("No paired bases present in sequence.");return t.slice(n+1)}}var u=n(369);class c{constructor(...t){this.targetStructure=t}get(){let e=this.targetStructure[0],n=new t(...this.targetStructure).get();return new u.Stems(e,n).get().map((t=>t.map((t=>[e[t[0]-1],e[t[1]-1]]))))}}class h{constructor(...t){this.targetStructure=t}get(){let e=this.targetStructure[0],n=new t(...this.targetStructure).get();return new u.Linkers(e,n).get().map((t=>t.map((t=>e[t-1]))))}}function l(...e){let[n,r]=e,i=new t(...e).get();(0,u.areKnotless)(i)||(i=(0,u.knotless)(i));let s=i.map((t=>[n[t[0]-1],n[t[1]-1]]));return[[...n],s]}function d(t,e){if(e.length>t.length)throw new Error("Dot-bracket notation is longer than the sequence.");return[...(0,u.parseDotBracket)(e)].map((e=>{let n=e[0],r=e[1];return[t[n-1],t[r-1]]}))}function f(t){return t.length<2?[]:t.slice(0,-1).map(((e,n)=>[t[n],t[n+1]]))}})(),r})(),t.exports=e()},173:function(t){var e;e=()=>(()=>{var t={422:function(t){t.exports=(()=>{var t={138:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}return t.r(e),t.d(e,{average:()=>r,mean:()=>r,sum:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";function t(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.pow(Math.pow(n,2)+Math.pow(r,2),.5)}function e(t,e){return{x:e.x-t.x,y:e.y-t.y}}n.r(r),n.d(r,{centroid:()=>s,displacement:()=>e,distance:()=>t,midpoint:()=>o});var i=n(138);function s(t){return{x:(0,i.mean)(t.map((function(t){return t.x}))),y:(0,i.mean)(t.map((function(t){return t.y})))}}function o(t,e){return s([t,e])}})(),r})()},872:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{CircularSegment:()=>a,Semicircle:()=>e});var t=n(422),e=function(){function e(t){this.chord=t}return Object.defineProperty(e.prototype,"chordLength",{get:function(){return(0,t.distance)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcLength",{get:function(){return Math.PI*this.chordLength/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcAngle",{get:function(){return Math.PI},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleRadius",{get:function(){return this.chordLength/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleDiameter",{get:function(){return 2*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCircumference",{get:function(){return 2*Math.PI*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCenterPoint",{get:function(){return(0,t.midpoint)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),e}(),i=n(872),s=function(){function e(e,n){this.chord=e,this.moreProps=n;var r=n.arcLength,i=(0,t.distance)(e[0],e[1]);if(r<=i)throw new Error("Arc length is too small.");if(r>=Math.PI*i/2)throw new Error("Arc length is too big.");for(var s=Math.PI/2,o=0;o<20;o++)s-=(r/i*Math.sin(s)-s)/(r/i*Math.cos(s)-1);this.arcAngle=2*s}return Object.defineProperty(e.prototype,"chordLength",{get:function(){return(0,t.distance)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcLength",{get:function(){return this.moreProps.arcLength},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleRadius",{get:function(){return this.arcLength/this.arcAngle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleDiameter",{get:function(){return 2*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCircumference",{get:function(){return 2*Math.PI*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCenterPoint",{get:function(){var e=(0,i.direction)((0,t.displacement)(this.chord[0],this.chord[1]));e+=(Math.PI-this.arcAngle)/2;var n=this.parentCircleRadius;return{x:this.chord[0].x+n*Math.cos(e),y:this.chord[0].y+n*Math.sin(e)}},enumerable:!1,configurable:!0}),e}(),o=function(){function e(e,n){this.chord=e,this.moreProps=n;var r=n.arcLength,i=(0,t.distance)(e[0],e[1]);if(0==i)throw new Error("Chord length cannot be zero.");if(r<=Math.PI*i/2)throw new Error("Arc length is too small.");for(var s=Math.PI,o=0;o<20;o++)s-=(r/i*Math.sin(Math.PI-s)-s)/(-r/i*Math.cos(Math.PI-s)-1);this.arcAngle=2*s}return Object.defineProperty(e.prototype,"chordLength",{get:function(){return(0,t.distance)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcLength",{get:function(){return this.moreProps.arcLength},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleRadius",{get:function(){return this.arcLength/this.arcAngle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleDiameter",{get:function(){return 2*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCircumference",{get:function(){return 2*Math.PI*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCenterPoint",{get:function(){var e=(0,i.direction)((0,t.displacement)(this.chord[0],this.chord[1]));e-=(this.arcAngle-Math.PI)/2;var n=this.parentCircleRadius;return{x:this.chord[0].x+n*Math.cos(e),y:this.chord[0].y+n*Math.sin(e)}},enumerable:!1,configurable:!0}),e}(),a=function(){function n(n,r){this.chord=n,this.moreProps=r;var i=r.arcLength,a=(0,t.distance)(n[0],n[1]);if(a>0&&i<=a)throw new Error("Arc length is too small.");var u=a<.001&&i<.001,c=Math.PI*a/2,h=Math.abs(i-c)<.001;this.wrappedCircularSegment=u||h?new e(n):i<c?new s(n,{arcLength:i}):new o(n,{arcLength:i})}return Object.defineProperty(n.prototype,"chordLength",{get:function(){return this.wrappedCircularSegment.chordLength},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"arcLength",{get:function(){return this.moreProps.arcLength},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"arcAngle",{get:function(){return this.wrappedCircularSegment.arcAngle},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleRadius",{get:function(){return this.wrappedCircularSegment.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleDiameter",{get:function(){return this.wrappedCircularSegment.parentCircleDiameter},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleCircumference",{get:function(){return this.wrappedCircularSegment.parentCircleCircumference},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleCenterPoint",{get:function(){return this.wrappedCircularSegment.parentCircleCenterPoint},enumerable:!1,configurable:!0}),n}()})(),r})(),t.exports=e()},986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>h,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},725:function(t){t.exports=(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>d,average:()=>r,degrees:()=>m,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,radians:()=>g,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>f,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>p,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return Math.abs(t-e)<=n}function f(t){i(t),t.reverse()}function p(t){var e=o(t);return e.reverse(),e}function m(t){return t*(180/Math.PI)}function g(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function c(t){return"object"==typeof t&&null!==t}function h(t){return Array.isArray(t)}return t.r(e),t.d(e,{isArray:()=>h,isFiniteNumber:()=>r,isNonFiniteNumber:()=>i,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>c,isNullish:()=>u,isNumber:()=>n,isPositiveFiniteNumber:()=>s,isString:()=>a}),e})()},30:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.pow(Math.pow(t.x,2)+Math.pow(t.y,2),.5)}function r(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>r,magnitude:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{areWithin:()=>a,centroid:()=>f,deepCopy:()=>s,direction:()=>l,displaced:()=>c,displacement:()=>u,distance:()=>o,isFinitePoint:()=>i,isPoint:()=>e,midpoint:()=>p});var t=n(854);function e(e){return(0,t.isNonNullObject)(e)&&(0,t.isNumber)(e.x)&&(0,t.isNumber)(e.y)}function i(n){return e(n)&&(0,t.isFiniteNumber)(n.x)&&(0,t.isFiniteNumber)(n.y)}function s(t){return{x:t.x,y:t.y}}function o(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.pow(Math.pow(n,2)+Math.pow(r,2),.5)}function a(t,e,n){return o(t,e)<=n}function u(t,e){return{x:e.x-t.x,y:e.y-t.y}}function c(t,e){return{x:t.x+e.x,y:t.y+e.y}}var h=n(30);function l(t,e){return(0,h.direction)(u(t,e))}var d=n(986);function f(t){return{x:(0,d.mean)(t.map((function(t){return t.x}))),y:(0,d.mean)(t.map((function(t){return t.y})))}}function p(t,e){return f([t,e])}})(),r})()},369:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>h,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function c(t){return"object"==typeof t&&null!==t}function h(t){return Array.isArray(t)}function l(t){return h(t)&&t.every(n)}function d(t){return h(t)&&t.every(r)}function f(t){return h(t)&&t.every(i)}function p(t){return h(t)&&t.every(a)}return t.r(e),t.d(e,{isArray:()=>h,isFiniteNumber:()=>r,isFiniteNumbersArray:()=>d,isNonFiniteNumber:()=>i,isNonFiniteNumbersArray:()=>f,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>c,isNullish:()=>u,isNumber:()=>n,isNumbersArray:()=>l,isPositiveFiniteNumber:()=>s,isString:()=>a,isStringsArray:()=>p}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Linkers:()=>g,Stems:()=>m,areConflicting:()=>c,areCrossing:()=>d,areEqual:()=>a,areKnotless:()=>l,areStacked:()=>u,deepCopy:()=>i,knotless:()=>p,mountainPlotTraversal:()=>y,parseDotBracket:()=>b,sorted:()=>o});var t=n(854),e=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function i(n){return(0,t.isNumbersArray)(n)?e([],n,!0):n.map((function(t){return e([],t,!0)}))}var s=n(986);function o(t){var e=i(t);return e.forEach(s.sortNumbers),e.sort((function(t,e){return t[0]-e[0]})),e}function a(t,e){var n=i(t),r=i(e);return(0,s.sortNumbers)(n),(0,s.sortNumbers)(r),[0,1].every((function(t){return n[t]==r[t]}))}function u(t,e){var n=o([t,e]);return n[0][0]==n[1][0]-1&&n[0][1]==n[1][1]+1}function c(t,e){return(0,s.min)(t)==(0,s.min)(e)&&(0,s.max)(t)!=(0,s.max)(e)||(0,s.min)(t)!=(0,s.min)(e)&&(0,s.max)(t)==(0,s.max)(e)}function h(t){if(0==t.length)return[];for(var e=[],n=0;n<(0,s.max)(t.flat());n++)e.push(void 0);return t.forEach((function(t){e[t[0]-1]=t[1],e[t[1]-1]=t[0]})),e}function l(t){var e=h(t),n=[],r=!1;return e.forEach((function(t,e){var i=e+1;null==t||(i<t?n.push(i):i==t||n.pop()!=t&&(r=!0))})),!r}function d(t,e){return!l([t,e])}var f=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function p(t){var e=[],n=i(t);return n.sort((function(t,e){return Math.abs(t[0]-t[1])-Math.abs(e[0]-e[1])})),n.forEach((function(t){l(f(f([],e,!0),[t],!1))&&e.push(t)})),e}var m=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=this.targetStructure[1];if(0==t.length)return[];var e=o(t),n=[],r=[];return e.forEach((function(t){var e=0==r.length?null:r[r.length-1];!e||u(e,t)?r.push(t):(n.push(r),r=[t])})),n.push(r),n},t}(),g=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=(new(m.bind.apply(m,function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}([void 0],this.targetStructure,!1)))).get().flatMap((function(t){return[t.map(s.min),t.map(s.max)]}));t.forEach(s.sortNumbers),t.sort((function(t,e){return(0,s.min)(t)-(0,s.min)(e)}));for(var e=[],n=t.shift(),r=t.shift();n&&r;){for(var i=[],o=(0,s.max)(n),a=(0,s.min)(r),u=o;u<=a;u++)i.push(u);e.push(i),n=r,r=t.shift()}return e},t}();function y(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[0],r=t[1],i=h(r);if(!l(r))throw new Error("Pseudoknot(s) encountered.");var s=[],o=0;return n.forEach((function(t,e){var n=e+1,r=i[e];null==r?s.push(o):n<r?(s.push(o),o++):(n==r||o--,s.push(o))})),s}function b(t){var e=t.split(""),n=[".","(",")"];e.forEach((function(t){if(!n.includes(t))throw new Error('Unrecognized character in dot-bracket notation: "'.concat(t,'".'))}));var r=[],i=[];if(e.forEach((function(t,e){var n=e+1;if("("==t)i.push(n);else if(")"==t){var s=i.pop();if("number"!=typeof s)throw new Error("Unmatched downstream partner(s) in dot-bracket notation.");r.push([s,n])}})),i.length>0)throw new Error("Unmatched upstream partner(s) in dot-bracket notation.");return o(r)}})(),r})(),t.exports=e()},30:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.pow(Math.pow(t.x,2)+Math.pow(t.y,2),.5)}function r(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>r,magnitude:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Centroid:()=>s,Direction:()=>f,MaxCenterX:()=>u,MaxCenterY:()=>h,MinCenterX:()=>a,MinCenterY:()=>c,NucleobaseMock:()=>t,arrange:()=>N,circularize:()=>x,flipSelfX:()=>g,flipSelfY:()=>y,flipX:()=>p,flipY:()=>m,linearize:()=>b,radialize:()=>I,rotate:()=>d,round:()=>_,shift:()=>e,stemmify:()=>w,straighten:()=>v});class t{constructor(t){this.props=t}getCenterPoint(){return this.props.centerPoint}setCenterPoint(t){this.props.centerPoint=t}}function e(t,e){t.forEach((t=>{let n=t.getCenterPoint();t.setCenterPoint({x:n.x+e.x,y:n.y+e.y})}))}var i=n(725);class s{constructor(t){this.targetBases=t}get(){let t=this.targetBases.map((t=>t.getCenterPoint()));return(0,i.centroid)(t)}set(t){let n=this.get(),r=(0,i.displacement)(n,t);e(this.targetBases,r)}}var o=n(986);class a{constructor(t){this.targetBases=t}get(){return(0,o.min)(this.targetBases.map((t=>t.getCenterPoint().x)))}set(t){let n=this.get();e(this.targetBases,{x:t-n,y:0})}}class u{constructor(t){this.targetBases=t}get(){return(0,o.max)(this.targetBases.map((t=>t.getCenterPoint().x)))}set(t){let n=this.get();e(this.targetBases,{x:t-n,y:0})}}class c{constructor(t){this.targetBases=t}get(){return(0,o.min)(this.targetBases.map((t=>t.getCenterPoint().y)))}set(t){let n=this.get();e(this.targetBases,{x:0,y:t-n})}}class h{constructor(t){this.targetBases=t}get(){return(0,o.max)(this.targetBases.map((t=>t.getCenterPoint().y)))}set(t){let n=this.get();e(this.targetBases,{x:0,y:t-n})}}var l=n(30);function d(t,e){if(0==t.length)return;let n=new s(t).get();t.forEach((t=>{let r=t.getCenterPoint(),s=(0,i.distance)(n,r),o=(0,l.direction)((0,i.displacement)(n,r));o+=e,t.setCenterPoint({x:n.x+s*Math.cos(o),y:n.y+s*Math.sin(o)})}))}class f{constructor(t){this.targetBases=t}get(){if(this.targetBases.length<2)return 0;let t=this.targetBases[0],e=this.targetBases[this.targetBases.length-1];return(0,l.direction)((0,i.displacement)(t.getCenterPoint(),e.getCenterPoint()))}set(t){let e=t-this.get();d(this.targetBases,e)}}function p(t){let e=new s(t).get().y;t.forEach((t=>{let n=t.getCenterPoint(),r=n.y-e;t.setCenterPoint({x:n.x,y:e-r})}))}function m(t){let e=new s(t).get().x;t.forEach((t=>{let n=t.getCenterPoint(),r=n.x-e;t.setCenterPoint({x:e-r,y:n.y})}))}function g(t){if(0==t.length)return;let n=t[0],{x:r,y:s}=n.getCenterPoint(),o={x:r,y:s},a=new f(t).get();d(t,-a),p(t),d(t,a),e(t,(0,i.displacement)(n.getCenterPoint(),o))}function y(t){let e=new s(t),{x:n,y:r}=e.get(),i=n,o=r,a=new f(t).get();d(t,-a),m(t),d(t,a),e.set({x:i,y:o})}function b(t,e){let{spacing:n}=e;if(t.length<2)return;let r=new f(t),i=r.get(),o=new s(t),{x:a,y:u}=o.get(),c={x:a,y:u};t.forEach(((t,e)=>{t.setCenterPoint({x:e*n,y:0})})),r.set(i),o.set(c)}function v(t){if(t.length<3)return;let e=t[0],n=t[t.length-1],r=[e.getCenterPoint(),n.getCenterPoint()],s=(0,i.distance)(r[0],r[1]),o=(0,l.direction)((0,i.displacement)(r[0],r[1])),a=s/(t.length-1),u=a*Math.cos(o),c=a*Math.sin(o),{x:h,y:d}=r[0];t.forEach((t=>{t.setCenterPoint({x:h,y:d}),h+=u,d+=c}))}function w(t,n){let{basePairLength:r,basePairSpacing:o}=n;if(t.length<2)return;let a=Math.ceil(t.length/2),u=t.slice(0,a),c=t.slice(a),h=new s(t),{x:l,y:p}=h.get(),m={x:l,y:p},g=new f(t).get();b(u,{spacing:o}),b(c,{spacing:o}),new f(u).set(-Math.PI/2),new f(c).set(Math.PI/2);let y=t[0],v=t[t.length-1];e(u,(0,i.displacement)(y.getCenterPoint(),{x:0,y:0})),e(c,(0,i.displacement)(v.getCenterPoint(),{x:r,y:0})),d(t,g),h.set(m)}function x(t,e){let{spacing:n,terminiGap:r}=e;if(t.length<2)return;let i=new s(t),{x:o,y:a}=i.get(),u=o,c=a,h=new f(t).get(),l=n*(t.length-1);l+=r,Math.abs(l)<1e-5&&(l=1e-5);let p=l/(2*Math.PI),m=Math.PI/2+2*Math.PI*(.5*r/l);t.forEach(((t,e)=>{let r=m+2*Math.PI*(e*n)/l;t.setCenterPoint({x:p*Math.cos(r),y:p*Math.sin(r)})})),d(t,h),i.set({x:u,y:c})}var S=n(173);function _(t,n){let{spacing:r}=n;if(t.length<3)return;let s=t[0],o=t[t.length-1],a=[s.getCenterPoint(),o.getCenterPoint()],u=(0,i.distance)(a[0],a[1]),c=r*(t.length-1);if(c-u<.001)return void v(t);if(u<.001){let{x:n,y:o}=s.getCenterPoint();return x(t,{spacing:r,terminiGap:u}),void e(t,(0,i.displacement)(s.getCenterPoint(),{x:n,y:o}))}let h=new S.CircularSegment(a,{arcLength:c}),d=h.parentCircleCenterPoint,f=h.parentCircleRadius,p=(0,l.direction)((0,i.displacement)(d,s.getCenterPoint())),m=h.arcAngle/(t.length-1);t.forEach((t=>{t.setCenterPoint({x:d.x+f*Math.cos(p),y:d.y+f*Math.sin(p)}),p+=m}))}var P=n(127),M=n(369);function N(t,n,r){var a,u,c;let{spacing:h}=r,l=null!==(a=r.basePairSpacing)&&void 0!==a?a:h,d=null!==(u=r.hairpinLoopSpacing)&&void 0!==u?u:h,p=null!==(c=r.terminiGap)&&void 0!==c?c:h,{x:m,y:g}=new s(t).get(),y={x:m,y:g},b=new f(t).get();[,n]=(0,P.knotless)(t,n);let v=new P.PositionPairs(t,n).get(),S=(0,M.mountainPlotTraversal)(t,v),N=t.filter(((t,e)=>0==S[e]));x(N,{spacing:h,terminiGap:p});let O=new P.Stems(t,n).get(),C=new Set(N),E=O.filter((t=>C.has(t[0][0]))),T=n=>{let r=n[0],{x:a,y:u}=new s(r).get(),c={x:a,y:u},p=new f(n[0]).get(),m=[...n.map((t=>t[0])),...n.map((t=>t[1])).reverse()];w(m,{basePairLength:h,basePairSpacing:l}),new f(m).set(p),e(m,(0,i.displacement)(new s(r).get(),c));let g=n[n.length-1],y=g.map((e=>t.indexOf(e))),b=t.filter(((t,e)=>(0,o.isBetweenExclusive)(e,(0,o.min)(y),(0,o.max)(y))&&S[e]==S[(0,o.min)(y)]+1)),v=new Set(b),x=O.filter((t=>v.has(t[0][0])));_([g[0],...b,g[1]],{spacing:x.length>0?h:d}),x.forEach((t=>T(t)))};E.forEach((t=>T(t))),new f(t).set(b),new s(t).set(y)}class O{static from(t){return{to:e=>({inclusive:()=>{let n=e-t+1;return Array.from({length:n},((e,n)=>t+n))}})}}}class C{static of(...t){let[e,n]=t,r=new P.PositionPairs(...t).get();r=(0,M.sorted)(r);let i=r.map((t=>t.map((t=>t-1)))),s=[],a=0;return e.forEach(((t,e)=>{let n=i.find((t=>t.includes(e)));n&&e==(0,o.min)(n)?(s.push(a),a+=1):n&&e==(0,o.max)(n)?(a-=1,s.push(a)):s.push(a)})),s}}class E{constructor(...t){let[e,n]=t;this.rawForm=t,this.mountainPlotTraversal=C.of(...t),this.positionPairs=new P.PositionPairs(...t).get(),this.indexPairs=this.positionPairs.map((t=>[t[0]-1,t[1]-1])),this.pairedBases=new Set(n.flat()),this.pairedIndices=new Set(e.map(((t,e)=>({b:t,i:e}))).filter((t=>this.pairedBases.has(t.b))).map((t=>t.i)))}[Symbol.iterator](){return this.rawForm.values()}get sequence(){return this.rawForm[0]}get basePairs(){return this.rawForm[1]}}class T{static correspondingTo(t){return{in:e=>t.map((t=>e.sequence.indexOf(t)))}}}class A{static composedOf(t){if(0==t.length)throw new Error("All stems must have at least one base-pair.");let n=t[0],r=t[t.length-1],s=t.map((t=>t[0])),o=t.map((t=>t[1])).reverse(),a=n[0],u=n[1],c=[...s,...o];return{[Symbol.iterator]:()=>t.values(),bottomBasePair:n,topBasePair:r,side5:s,side3:o,flat:()=>c,firstBase:a,lastBase:u,stemmify:()=>({with:t=>{let{basePairLength:n,basePairSpacing:r}=t,s=Object.assign({},a.getCenterPoint());w(c,{basePairLength:n,basePairSpacing:r}),e(c,(0,i.displacement)(a.getCenterPoint(),s))}})}}}class j{static in(t){return{[Symbol.iterator]:()=>new P.Stems(t.sequence,t.basePairs).get().map((t=>A.composedOf(t))).values()}}}class k{static composedOf(t){if(t.length<2)throw new Error("Linkers must have at least two bases.");let n=t[0],r=t[t.length-1],s=t.slice(1,-1);return{in:o=>{let a=o.sequence.indexOf(n),u=o.sequence.indexOf(r),c=O.from(a).to(u).inclusive(),h=!!o.indexPairs.find((t=>t.includes(a)&&t.includes(u))),l=c.every((t=>0==o.mountainPlotTraversal[t])),d=1==new Set(c.map((t=>o.mountainPlotTraversal[t]))).size&&!h;return{[Symbol.iterator]:()=>t.values(),indices:c,firstBase:n,lastBase:r,firstIndex:a,lastIndex:u,unpairedBases:{[Symbol.iterator]:()=>s.values(),stemmify:()=>({with:t=>{let{spacing:n}=t;if(s.length<3)return;let r=s[0],o=s[s.length-1],a=Object.assign({},r.getCenterPoint());w(s,{basePairLength:(0,i.distance)(r.getCenterPoint(),o.getCenterPoint()),basePairSpacing:n}),e(s,(0,i.displacement)(r.getCenterPoint(),a))}})},get middleThreeUnpairedBases(){if(s.length<3)throw new Error("This linker has less than three unpaired bases.");if(s.length%2==0)throw new Error("This linker has an even number of unpaired bases.");let t=Math.floor(s.length/2);return[s[t-1],s[t],s[t+1]]},isHairpinLoop:()=>h,isInOutermostLoop:()=>l,isBetweenSiblingStems:()=>d,round:()=>({with:e=>{let{spacing:n}=e;_(t,{spacing:n})}})}}}}}class D{static in(t){let e=new P.Linkers(t.sequence,t.basePairs).get().map((e=>k.composedOf(e).in(t)));return{[Symbol.iterator]:()=>e.values(),thatAreHairpinLoops:{[Symbol.iterator]:()=>e.filter((t=>t.isHairpinLoop())).values()},inOutermostLoop:{[Symbol.iterator]:()=>e.filter((t=>t.isInOutermostLoop())).values()},notInOutermostLoop:{[Symbol.iterator]:()=>e.filter((t=>!t.isInOutermostLoop())).values(),betweenSiblingStems:{[Symbol.iterator]:()=>e.filter((t=>!t.isInOutermostLoop())).filter((t=>t.isBetweenSiblingStems())).values()}},notBetweenSiblingStems:{[Symbol.iterator]:()=>e.filter((t=>!t.isBetweenSiblingStems())).values()}}}}class L{static closedBy(n){return{in:r=>{let s=n.topBasePair,a=T.correspondingTo(s).in(r),u=(0,o.min)(a),c=r.sequence.filter(((t,e)=>e>(0,o.min)(a)&&e<(0,o.max)(a)&&r.mountainPlotTraversal[e]==r.mountainPlotTraversal[u]+1)),h=c.map((t=>r.sequence.indexOf(t))),l=c.filter((t=>r.pairedBases.has(t))),d=h.filter((t=>r.pairedIndices.has(t))),f=[s[0],...c,s[1]];return{[Symbol.iterator]:()=>f.values(),parentStructure:r,closingStem:n,closingBasePair:s,closingIndexPair:a,enclosedBases:c,enclosedIndices:h,enclosedPairedBases:l,enclosedPairedIndices:d,get platform(){if(0==d.length)throw new Error("This loop does not have a platform.");let n=(0,o.min)(d),u=(0,o.max)(d),c=r.sequence.filter(((t,e)=>e>=n&&e<=u&&h.includes(e)&&[e-1,e,e+1].some((t=>d.includes(t)))));return{[Symbol.iterator]:()=>c.values(),firstIndex:n,lastIndex:u,arch:()=>({with:r=>{let{spacing:h}=r,l=(0,o.max)([c.length-2,n-(0,o.min)(a)-1,(0,o.max)(a)-u-1,0]),d=O.from(1).to(l).inclusive().map((()=>new t({centerPoint:{x:0,y:0}}))),f=d.map((()=>new t({centerPoint:{x:0,y:0}}))),p=Object.assign({},s[0].getCenterPoint());x([s[0],...d,...c,...f,s[1]],{spacing:h,terminiGap:h}),e([...s,...c],(0,i.displacement)(s[0].getCenterPoint(),p))}})}}}}}}}class B{static of(t){let e=t.sequence.filter(((e,n)=>0==t.mountainPlotTraversal[n]));return{[Symbol.iterator]:()=>e.values()}}}function I(t,e,n){var r;let{spacing:i,basePairSpacing:o}=n,a=null!==(r=n.hairpinLoopSpacing)&&void 0!==r?r:i,u=new E(t,e);if(t.length<2)return;if(0==e.length)return void x(t,{spacing:i,terminiGap:2*i});let c=Object.assign({},new s(t).get()),h=new f(t).get(),l=j.in(u),d=D.in(u);x([...B.of(u)],{spacing:i,terminiGap:2*i});let p=[...l].map((t=>L.closedBy(t).in(u)));p.filter((t=>t.enclosedPairedBases.length>0)).forEach((t=>{t.closingStem.stemmify().with({basePairLength:i,basePairSpacing:o}),t.platform.arch().with({spacing:i}),t.closingStem.stemmify().with({basePairLength:i,basePairSpacing:o})})),p.filter((t=>0==t.enclosedPairedBases.length)).forEach((t=>t.closingStem.stemmify().with({basePairLength:i,basePairSpacing:o}))),[...d.notBetweenSiblingStems].forEach((t=>t.round().with({spacing:i}))),[...d.thatAreHairpinLoops].forEach((t=>t.round().with({spacing:a}))),[...d.notInOutermostLoop.betweenSiblingStems].filter((t=>[...t.unpairedBases].length>=3)).forEach((t=>{t.unpairedBases.stemmify().with({spacing:i}),[...t.unpairedBases].length%2!=0&&_(t.middleThreeUnpairedBases,{spacing:i})})),new f(t).set(h),new s(t).set(c)}})(),r})(),t.exports=e()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{ConsecutiveBasesSelectingTool:()=>t,DraggingTool:()=>l,SelectedBases:()=>c});class t{constructor(t,e){this.target=t,this.selectedBases=e,this.mouseIsDown=!1,window.addEventListener("mousedown",(t=>this.handleMouseDown(t))),window.addEventListener("mouseup",(t=>this.handleMouseUp(t))),window.addEventListener("mouseover",(t=>this.handleMouseOver(t)))}handleMouseDown(t){this.lastMouseDown=t,this.mouseIsDown=!0}handleMouseUp(t){this.mouseIsDown=!1}handleMouseOver(t){if(!this.mouseIsDown)return;let e=this.lastMouseDown;if(!e)return;if(!e.shiftKey)return;if(!(t.target instanceof Node))return;if(!this.target.domNode.contains(t.target))return;let n=[...this.target.bases],r=n.findIndex((e=>e.domNode===t.target));if(r<0)return;let i=n.findIndex((t=>t.domNode===e.target));if(i<0)return;try{let t=n[i];if(!this.selectedBases.include(t))return}catch(t){console.error(t)}let s=Math.min(i,r),o=Math.max(i,r);this.selectedBases.addAll(n.slice(s,o+1))}}var e,i,s,o,a=function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n},u=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class c{constructor(t,n){e.add(this),this.selectedSVGElements=n,i.set(this,void 0),s.set(this,{change:[]}),a(this,i,t,"f"),n.addEventListener("change",(()=>u(this,e,"m",o).call(this,"change")))}get target(){return u(this,i,"f")}set target(t){a(this,i,t,"f"),u(this,e,"m",o).call(this,"change")}[(i=new WeakMap,s=new WeakMap,e=new WeakSet,Symbol.iterator)](){return[...this.target.bases].filter((t=>this.selectedSVGElements.include(t.domNode))).values()}include(t){return this.selectedSVGElements.include(t.domNode)}addAll(t){this.selectedSVGElements.addAll([...t].map((t=>t.domNode)))}addEventListener(t,e){u(this,s,"f")[t].push(e)}}o=function(t){u(this,s,"f")[t].forEach((t=>t()))};var h=n(661);class l{constructor(t,e,n){this.target=t,this.selectedElements=e,this.options=n,this.mouseIsDown=!1,this.dragged=!1,window.addEventListener("mousedown",(t=>this.handleMouseDown(t))),window.addEventListener("mousemove",(t=>this.handleMouseMove(t))),window.addEventListener("mouseup",(t=>this.handleMouseUp(t)))}handleMouseDown(t){this.lastMouseDown=t,this.mouseIsDown=!0,this.dragged=!1}handleMouseMove(t){var e;if(!this.mouseIsDown)return;if(!this.lastMouseDown)return;if(this.lastMouseDown.shiftKey)return;if(!(this.lastMouseDown.target instanceof SVGGraphicsElement))return;if(!this.selectedElements.svgElements.include(this.lastMouseDown.target))return;let n=t.movementX/this.target.horizontalClientScaling,r=t.movementY/this.target.verticalClientScaling;this.dragged||!(null===(e=this.options)||void 0===e?void 0:e.beforeDragging)||this.options.beforeDragging();let i=[...this.selectedElements.bases],s=new Set(i);(0,h.shift)(i,{x:n,y:r}),[...this.selectedElements.baseNumberings].filter((t=>!s.has(t.owner))).forEach((t=>{t.displacement.x+=n,t.displacement.y+=r})),this.dragged=!0}handleMouseUp(t){var e;this.mouseIsDown=!1,!this.dragged||!(null===(e=this.options)||void 0===e?void 0:e.afterDragging)||this.options.afterDragging(),this.dragged=!1}}})(),r})(),t.exports=e()},524:function(t){var e;e=()=>(()=>{var t={645:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,flipAway:()=>v,isBetween:()=>h,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,normalizeAngle:()=>b,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}function b(t,e){void 0===e&&(e=-Math.PI);var n=t-e;return e+((n%=2*Math.PI)>=0?n:n+2*Math.PI)}function v(t,e){var n=(e=b(e,t))-t;return(n<Math.PI/2||n>3*Math.PI/2)&&(t+=Math.PI),t}return e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Box:()=>e});var t=n(986);class e{static bounding(n){let r=n.map((t=>e.matching(t))),i=(0,t.min)(r.map((t=>t.left))),s=(0,t.min)(r.map((t=>t.top))),o=(0,t.max)(r.map((t=>t.right)))-i,a=(0,t.max)(r.map((t=>t.bottom)))-s;return new e(i,s,o,a)}static matching(t){let{x:n,y:r,width:i,height:s}=t;return new e(n,r,i,s)}constructor(t,e,n,r){this.x=t,this.y=e,this.width=n,this.height=r}get centerX(){return this.minX+this.width/2}get centerY(){return this.minY+this.height/2}get minX(){return this.x}get minY(){return this.y}get maxX(){return this.minX+this.width}get maxY(){return this.minY+this.height}get top(){return this.minY}get right(){return this.maxX}get bottom(){return this.maxY}get left(){return this.minX}isBoundedBy(t){let n=e.matching(t);return this.minX>=n.minX&&this.minY>=n.minY&&this.maxX<=n.maxX&&this.maxY<=n.maxY}padded(t,n){return"number"!=typeof n&&(n=t),new e(this.x-t,this.y-n,this.width+2*t,this.height+2*n)}peripheralPoint(t){let e=this.width/2,n=this.height/2,r=Math.pow(Math.pow(e,2)+Math.pow(n,2),.5),i=this.centerX+r*Math.cos(t),s=this.centerY+r*Math.sin(t),o=r;return Math.abs(this.centerX-i)>e&&(o=Math.abs(e/Math.cos(t)),o=Number.isFinite(o)?o:n),Math.abs(this.centerY-s)>n&&(o=Math.abs(n/Math.sin(t)),o=Number.isFinite(o)?o:e),{x:this.centerX+o*Math.cos(t),y:this.centerY+o*Math.sin(t)}}}})(),r})(),t.exports=e()},726:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{CoordinateSystem:()=>c,HorizontalClientScaling:()=>l,Scaling:()=>h,VerticalClientScaling:()=>d,assignUUID:()=>u,bringToFront:()=>f,sendToBack:()=>p});const n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let r;const i=new Uint8Array(16);function s(){if(!r&&(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!r))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}const o=[];for(let t=0;t<256;++t)o.push((t+256).toString(16).slice(1));const a=function(t,e,r){if(n.randomUUID&&!e&&!t)return n.randomUUID();const i=(t=t||{}).random||(t.rng||s)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){r=r||0;for(let t=0;t<16;++t)e[r+t]=i[t];return e}return function(t,e=0){return o[t[e+0]]+o[t[e+1]]+o[t[e+2]]+o[t[e+3]]+"-"+o[t[e+4]]+o[t[e+5]]+"-"+o[t[e+6]]+o[t[e+7]]+"-"+o[t[e+8]]+o[t[e+9]]+"-"+o[t[e+10]]+o[t[e+11]]+o[t[e+12]]+o[t[e+13]]+o[t[e+14]]+o[t[e+15]]}(i)};function u(t){t.id="uuid-"+a()}var c=function(){function t(t){this.targetSVGDoc=t}return Object.defineProperty(t.prototype,"width",{get:function(){return this.targetSVGDoc.viewBox.baseVal.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.targetSVGDoc.viewBox.baseVal.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minX",{get:function(){return this.targetSVGDoc.viewBox.baseVal.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxX",{get:function(){return this.minX+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minY",{get:function(){return this.targetSVGDoc.viewBox.baseVal.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxY",{get:function(){return this.minY+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"horizontalScaling",{get:function(){return this.targetSVGDoc.width.baseVal.value/this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"verticalScaling",{get:function(){return this.targetSVGDoc.height.baseVal.value/this.height},enumerable:!1,configurable:!0}),t.prototype.setScaling=function(t){this.targetSVGDoc.setAttribute("width","".concat(t*this.width)),this.targetSVGDoc.setAttribute("height","".concat(t*this.height))},Object.defineProperty(t.prototype,"clientWidth",{get:function(){return this.targetSVGDoc.getBoundingClientRect().width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clientHeight",{get:function(){return this.targetSVGDoc.getBoundingClientRect().height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"horizontalClientScaling",{get:function(){return this.clientWidth/this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"verticalClientScaling",{get:function(){return this.clientHeight/this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minClientX",{get:function(){return this.targetSVGDoc.getBoundingClientRect().x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minClientY",{get:function(){return this.targetSVGDoc.getBoundingClientRect().y},enumerable:!1,configurable:!0}),t.prototype.fromClientX=function(t){return this.minX+(t-this.minClientX)/this.horizontalClientScaling},t.prototype.fromClientY=function(t){return this.minY+(t-this.minClientY)/this.verticalClientScaling},t.prototype.fromClientCoordinates=function(t,e){return[this.fromClientX(t),this.fromClientY(e)]},t.prototype.fromClientPoint=function(t){return{x:this.fromClientX(t.x),y:this.fromClientY(t.y)}},t.prototype.toClientX=function(t){return this.minClientX+this.horizontalClientScaling*(t-this.minX)},t.prototype.toClientY=function(t){return this.minClientY+this.verticalClientScaling*(t-this.minY)},t.prototype.toClientCoordinates=function(t,e){return[this.toClientX(t),this.toClientY(e)]},t.prototype.toClientPoint=function(t){return{x:this.toClientX(t.x),y:this.toClientY(t.y)}},t}(),h=function(){function t(t){this.targetSVGDoc=t}return t.prototype.set=function(t){var e=this.targetSVGDoc.viewBox.baseVal;this.targetSVGDoc.setAttribute("width",t*e.width+"px"),this.targetSVGDoc.setAttribute("height",t*e.height+"px")},t}(),l=function(){function t(t){this.targetSVGDoc=t}return t.prototype.get=function(){var t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.width/e.width},t}(),d=function(){function t(t){this.targetSVGDoc=t}return t.prototype.get=function(){var t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.height/e.height},t}();function f(t){var e=t.parentNode;e&&e.appendChild(t)}function p(t){var e=t.parentNode;e&&e.prepend(t)}return e})(),t.exports=e()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{BoxHighlighting:()=>s,LiveSVGElementHighlightings:()=>a});var t,e=n(645),i=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class s{constructor(){t.set(this,.5),this.domNode=document.createElementNS("http://www.w3.org/2000/svg","g"),this.boxTrace=document.createElementNS("http://www.w3.org/2000/svg","path"),this.topLeftCornerBox=document.createElementNS("http://www.w3.org/2000/svg","path"),this.topRightCornerBox=document.createElementNS("http://www.w3.org/2000/svg","path"),this.bottomRightCornerBox=document.createElementNS("http://www.w3.org/2000/svg","path"),this.bottomLeftCornerBox=document.createElementNS("http://www.w3.org/2000/svg","path"),this.domNode.append(this.boxTrace,...this.cornerBoxes),this.domNode.style.pointerEvents="auto",this.boxTrace.setAttribute("stroke","blue"),this.boxTrace.setAttribute("stroke-width",`${i(this,t,"f")}`),this.boxTrace.setAttribute("fill","none"),this.cornerBoxes.forEach((e=>{e.setAttribute("stroke","blue"),e.setAttribute("stroke-width",`${i(this,t,"f")}`),e.setAttribute("fill","white")}))}get cornerBoxes(){return[this.topLeftCornerBox,this.topRightCornerBox,this.bottomRightCornerBox,this.bottomLeftCornerBox]}appendTo(t){t.appendChild(this.domNode)}remove(){this.domNode.remove()}cornerBoxD({centerPoint:e}){return`M ${e.x-2.5*i(this,t,"f")} ${e.y-2.5*i(this,t,"f")} h `+5*i(this,t,"f")+" v "+5*i(this,t,"f")+" h "+-5*i(this,t,"f")+" z"}highlight(t){let n=e.Box.matching(t);this.boxTrace.setAttribute("d",`M ${n.x} ${n.y} h ${n.width} v ${n.height} h ${-n.width} z`),this.topLeftCornerBox.setAttribute("d",this.cornerBoxD({centerPoint:{x:n.minX,y:n.minY}})),this.topRightCornerBox.setAttribute("d",this.cornerBoxD({centerPoint:{x:n.maxX,y:n.minY}})),this.bottomRightCornerBox.setAttribute("d",this.cornerBoxD({centerPoint:{x:n.maxX,y:n.maxY}})),this.bottomLeftCornerBox.setAttribute("d",this.cornerBoxD({centerPoint:{x:n.minX,y:n.maxY}})),this.highlightedBox=n}get lineThickness(){return i(this,t,"f")}set lineThickness(e){(function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)})(this,t,e),[this.boxTrace,...this.cornerBoxes].forEach((t=>{t.setAttribute("stroke-width",`${e}`)})),!this.highlightedBox||this.highlight(this.highlightedBox)}setOpacity(t){this.domNode.setAttribute("opacity",`${t}`)}hide(){this.setOpacity(0),this.domNode.style.pointerEvents="none"}unhide(){this.setOpacity(1),this.domNode.style.pointerEvents="auto"}}t=new WeakMap;var o=n(726);class a{constructor(t,e){this.targetSVGElements=t,this.domNode=document.createElementNS("http://www.w3.org/2000/svg","g"),this.boxHighlightings=[],this.parentSVGDocCoordinateSystem=new o.CoordinateSystem(e),t.addEventListener("change",(()=>this.refresh())),new MutationObserver((()=>this.refresh())).observe(e,{attributes:!0,childList:!0,characterData:!0,subtree:!0})}appendTo(t){t.appendChild(this.domNode)}remove(){this.domNode.remove()}refresh(){let t=[...this.targetSVGElements];t.slice(this.boxHighlightings.length).forEach((()=>{let t=new s;t.appendTo(this.domNode),this.boxHighlightings.push(t)}));let e=1/this.parentSVGDocCoordinateSystem.horizontalScaling;t.forEach(((t,n)=>{try{let r=this.boxHighlightings[n];r.highlight(t.getBBox()),r.lineThickness=e,r.unhide()}catch(t){console.error(t)}})),this.boxHighlightings.slice(t.length).forEach((t=>t.hide()))}}})(),r})(),t.exports=e()},460:function(t){var e;e=()=>(()=>{var t={645:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Box:()=>e});var t=n(986);class e{static bounding(n){let r=n.map((t=>e.matching(t))),i=(0,t.min)(r.map((t=>t.left))),s=(0,t.min)(r.map((t=>t.top))),o=(0,t.max)(r.map((t=>t.right)))-i,a=(0,t.max)(r.map((t=>t.bottom)))-s;return new e(i,s,o,a)}static matching(t){let{x:n,y:r,width:i,height:s}=t;return new e(n,r,i,s)}constructor(t,e,n,r){this.x=t,this.y=e,this.width=n,this.height=r}get minX(){return this.x}get minY(){return this.y}get maxX(){return this.minX+this.width}get maxY(){return this.minY+this.height}get top(){return this.minY}get right(){return this.maxX}get bottom(){return this.maxY}get left(){return this.minX}isBoundedBy(t){let n=e.matching(t);return this.minX>=n.minX&&this.minY>=n.minY&&this.maxX<=n.maxX&&this.maxY<=n.maxY}padded(t,n){return"number"!=typeof n&&(n=t),new e(this.x-t,this.y-n,this.width+2*t,this.height+2*n)}}})(),r})(),t.exports=e()},726:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{CoordinateSystem:()=>c,HorizontalClientScaling:()=>l,Scaling:()=>h,VerticalClientScaling:()=>d,assignUUID:()=>u,bringToFront:()=>f,sendToBack:()=>p});const n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let r;const i=new Uint8Array(16);function s(){if(!r&&(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!r))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}const o=[];for(let t=0;t<256;++t)o.push((t+256).toString(16).slice(1));const a=function(t,e,r){if(n.randomUUID&&!e&&!t)return n.randomUUID();const i=(t=t||{}).random||(t.rng||s)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){r=r||0;for(let t=0;t<16;++t)e[r+t]=i[t];return e}return function(t,e=0){return o[t[e+0]]+o[t[e+1]]+o[t[e+2]]+o[t[e+3]]+"-"+o[t[e+4]]+o[t[e+5]]+"-"+o[t[e+6]]+o[t[e+7]]+"-"+o[t[e+8]]+o[t[e+9]]+"-"+o[t[e+10]]+o[t[e+11]]+o[t[e+12]]+o[t[e+13]]+o[t[e+14]]+o[t[e+15]]}(i)};function u(t){t.id="uuid-"+a()}var c=function(){function t(t){this.targetSVGDoc=t}return Object.defineProperty(t.prototype,"width",{get:function(){return this.targetSVGDoc.viewBox.baseVal.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.targetSVGDoc.viewBox.baseVal.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minX",{get:function(){return this.targetSVGDoc.viewBox.baseVal.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxX",{get:function(){return this.minX+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minY",{get:function(){return this.targetSVGDoc.viewBox.baseVal.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxY",{get:function(){return this.minY+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"horizontalScaling",{get:function(){return this.targetSVGDoc.width.baseVal.value/this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"verticalScaling",{get:function(){return this.targetSVGDoc.height.baseVal.value/this.height},enumerable:!1,configurable:!0}),t.prototype.setScaling=function(t){this.targetSVGDoc.setAttribute("width","".concat(t*this.width)),this.targetSVGDoc.setAttribute("height","".concat(t*this.height))},Object.defineProperty(t.prototype,"clientWidth",{get:function(){return this.targetSVGDoc.getBoundingClientRect().width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clientHeight",{get:function(){return this.targetSVGDoc.getBoundingClientRect().height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"horizontalClientScaling",{get:function(){return this.clientWidth/this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"verticalClientScaling",{get:function(){return this.clientHeight/this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minClientX",{get:function(){return this.targetSVGDoc.getBoundingClientRect().x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minClientY",{get:function(){return this.targetSVGDoc.getBoundingClientRect().y},enumerable:!1,configurable:!0}),t.prototype.fromClientX=function(t){return this.minX+(t-this.minClientX)/this.horizontalClientScaling},t.prototype.fromClientY=function(t){return this.minY+(t-this.minClientY)/this.verticalClientScaling},t.prototype.fromClientCoordinates=function(t,e){return[this.fromClientX(t),this.fromClientY(e)]},t.prototype.fromClientPoint=function(t){return{x:this.fromClientX(t.x),y:this.fromClientY(t.y)}},t.prototype.toClientX=function(t){return this.minClientX+this.horizontalClientScaling*(t-this.minX)},t.prototype.toClientY=function(t){return this.minClientY+this.verticalClientScaling*(t-this.minY)},t.prototype.toClientCoordinates=function(t,e){return[this.toClientX(t),this.toClientY(e)]},t.prototype.toClientPoint=function(t){return{x:this.toClientX(t.x),y:this.toClientY(t.y)}},t}(),h=function(){function t(t){this.targetSVGDoc=t}return t.prototype.set=function(t){var e=this.targetSVGDoc.viewBox.baseVal;this.targetSVGDoc.setAttribute("width",t*e.width+"px"),this.targetSVGDoc.setAttribute("height",t*e.height+"px")},t}(),l=function(){function t(t){this.targetSVGDoc=t}return t.prototype.get=function(){var t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.width/e.width},t}(),d=function(){function t(t){this.targetSVGDoc=t}return t.prototype.get=function(){var t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.height/e.height},t}();function f(t){var e=t.parentNode;e&&e.appendChild(t)}function p(t){var e=t.parentNode;e&&e.prepend(t)}return e})(),t.exports=e()},986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>h,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{ClickSelectTool:()=>t,PinchToScaleFeature:()=>f,SelectingRect:()=>o});class t{constructor(t,e){this.targetSVGDoc=t,this.selectedSVGElements=e,t.addEventListener("mousedown",(t=>this.handleMouseDown(t)))}handleMouseDown(t){t.target!==this.targetSVGDoc?t.target instanceof SVGGraphicsElement&&this.targetSVGDoc.contains(t.target)&&(this.selectedSVGElements.include(t.target)?!t.shiftKey||this.selectedSVGElements.removeAll([t.target]):(t.shiftKey||this.selectedSVGElements.clear(),this.selectedSVGElements.addAll([t.target]))):t.shiftKey||this.selectedSVGElements.clear()}}var e=n(726),i=n(645);function s(t){return t instanceof SVGGraphicsElement}class o{constructor(t,n){this.targetSVGDoc=t,this.selectedSVGElements=n,this.defaultLineThickness=.5,this.lastMouseDownX=0,this.lastMouseDownY=0,this.mouseIsDown=!1,this.isDrawn=!1,this.targetSVGDocCoordinateSystem=new e.CoordinateSystem(t),this.domNode=document.createElementNS("http://www.w3.org/2000/svg","path"),this.domNode.setAttribute("stroke","blue"),this.refreshLineThickness(),this.domNode.setAttribute("fill","blue"),this.domNode.setAttribute("fill-opacity","0.1"),new MutationObserver((()=>this.refreshLineThickness())).observe(t,{attributes:!0,attributeFilter:["viewBox","width","height"]}),this.domNode.style.pointerEvents="none",this.domNode.style.visibility="hidden",window.addEventListener("mousedown",(t=>this.handleMouseDown(t))),window.addEventListener("mousemove",(t=>this.handleMouseMove(t))),window.addEventListener("mouseup",(t=>this.handleMouseUp(t)))}refreshLineThickness(){this.domNode.setAttribute("stroke-width",""+this.defaultLineThickness/this.targetSVGDocCoordinateSystem.horizontalScaling)}appendTo(t){t.appendChild(this.domNode)}remove(){this.domNode.remove()}handleMouseDown(t){this.lastMouseDown=t,this.lastMouseDownX=this.targetSVGDocCoordinateSystem.fromClientX(t.clientX),this.lastMouseDownY=this.targetSVGDocCoordinateSystem.fromClientY(t.clientY),this.mouseIsDown=!0}handleMouseMove(t){if(!this.mouseIsDown)return;if(!this.lastMouseDown)return;if(this.lastMouseDown.target!==this.targetSVGDoc)return;let e=this.targetSVGDocCoordinateSystem.fromClientX(t.clientX),n=this.targetSVGDocCoordinateSystem.fromClientY(t.clientY),r=`M ${this.lastMouseDownX} ${this.lastMouseDownY} H ${e} V ${n} H ${this.lastMouseDownX} z`;this.domNode.setAttribute("d",r),this.domNode.style.visibility="visible",this.isDrawn=!0}handleMouseUp(t){var e;this.mouseIsDown=!1,this.domNode.style.visibility="hidden";let n=this.isDrawn;if(this.isDrawn=!1,!n)return;let r=this.targetSVGDocCoordinateSystem.fromClientX(t.clientX),o=this.targetSVGDocCoordinateSystem.fromClientY(t.clientY),a=i.Box.bounding([{x:this.lastMouseDownX,y:this.lastMouseDownY,width:0,height:0},{x:r,y:o,width:0,height:0}]),u=[...this.targetSVGDoc.children].filter(s).filter((t=>i.Box.matching(t.getBBox()).isBoundedBy(a)));(null===(e=this.lastMouseDown)||void 0===e?void 0:e.shiftKey)||this.selectedSVGElements.clear(),this.selectedSVGElements.addAll(u)}}var a,u,c,h=n(986),l=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)},d=function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n};class f{constructor(t){this.target=t,a.set(this,void 0),u.set(this,0),c.set(this,void 0),window.addEventListener("wheel",(t=>this.handleWheel(t)),{passive:!1})}get interactionScope(){var t;return null!==(t=l(this,a,"f"))&&void 0!==t?t:this.target}set interactionScope(t){d(this,a,t,"f")}handleWheel(t){var n,r,i,s;if(!t.ctrlKey)return;if(!(t.target instanceof Node))return;if(!this.interactionScope.contains(t.target))return;t.preventDefault(),l(this,c,"f")||!this.beforeScaling||this.beforeScaling();let o=1-(0,h.clamp)(t.deltaY,-25,25)/150,a=new e.CoordinateSystem(this.target),f=a.horizontalScaling,p=o*f;p=Number.isFinite(p)?p:1,p=(0,h.clamp)(p,.01,500),o=p/f;let m=o*(null!==(r=null===(n=this.horizontalScrollbar)||void 0===n?void 0:n.thumb.centerX)&&void 0!==r?r:0),g=o*(null!==(s=null===(i=this.verticalScrollbar)||void 0===i?void 0:i.thumb.centerY)&&void 0!==s?s:0);a.setScaling(p),!this.horizontalScrollbar||(this.horizontalScrollbar.thumb.centerX=m),!this.verticalScrollbar||(this.verticalScrollbar.thumb.centerY=g),d(this,u,Date.now(),"f"),l(this,c,"f")||d(this,c,setInterval((()=>{Date.now()-l(this,u,"f")>=500&&(!this.afterScaling||this.afterScaling(),clearInterval(l(this,c,"f")),d(this,c,void 0,"f"))}),50),"f")}}a=new WeakMap,u=new WeakMap,c=new WeakMap})(),r})(),t.exports=e()},726:function(t){var e;e=()=>(()=>{var t={854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function c(t){return"object"==typeof t&&null!==t}function h(t){return Array.isArray(t)}function l(t){return h(t)&&0==t.length}function d(t){return h(t)&&t.length>0}function f(t){return h(t)&&t.every(n)}function p(t){return f(t)&&t.length>0}function m(t){return h(t)&&t.every(r)}function g(t){return h(t)&&t.every(i)}function y(t){return h(t)&&t.every(a)}function b(t){return y(t)&&t.length>0}return t.r(e),t.d(e,{isArray:()=>h,isEmptyArray:()=>l,isFiniteNumber:()=>r,isFiniteNumbersArray:()=>m,isNonEmptyArray:()=>d,isNonEmptyNumbersArray:()=>p,isNonEmptyStringsArray:()=>b,isNonFiniteNumber:()=>i,isNonFiniteNumbersArray:()=>g,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>c,isNullish:()=>u,isNumber:()=>n,isNumbersArray:()=>f,isPositiveFiniteNumber:()=>s,isString:()=>a,isStringsArray:()=>y}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";function t(t,e){for(let[n,r]of Object.entries(e))t.setAttribute(n,r)}n.r(r),n.d(r,{CoordinateSystem:()=>l,HorizontalClientScaling:()=>f,InnerXML:()=>v,OuterXML:()=>S,Scaling:()=>d,VerticalClientScaling:()=>p,assignUUID:()=>h,bringToFront:()=>m,isSVGGraphicsElement:()=>_,isSVGGraphicsElementsArray:()=>M,sendToBack:()=>g,setAttributes:()=>t});const e={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};var i,s=new Uint8Array(16);function o(){if(!i&&!(i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(s)}for(var a=[],u=0;u<256;++u)a.push((u+256).toString(16).slice(1));const c=function(t,n,r){if(e.randomUUID&&!n&&!t)return e.randomUUID();var i=(t=t||{}).random||(t.rng||o)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,n){r=r||0;for(var s=0;s<16;++s)n[r+s]=i[s];return n}return function(t,e=0){return(a[t[e+0]]+a[t[e+1]]+a[t[e+2]]+a[t[e+3]]+"-"+a[t[e+4]]+a[t[e+5]]+"-"+a[t[e+6]]+a[t[e+7]]+"-"+a[t[e+8]]+a[t[e+9]]+"-"+a[t[e+10]]+a[t[e+11]]+a[t[e+12]]+a[t[e+13]]+a[t[e+14]]+a[t[e+15]]).toLowerCase()}(i)};function h(t){t.id="uuid-"+c()}class l{constructor(t){this.targetSVGDoc=t}get width(){return this.targetSVGDoc.viewBox.baseVal.width}get height(){return this.targetSVGDoc.viewBox.baseVal.height}get minX(){return this.targetSVGDoc.viewBox.baseVal.x}get maxX(){return this.minX+this.width}get minY(){return this.targetSVGDoc.viewBox.baseVal.y}get maxY(){return this.minY+this.height}get horizontalScaling(){return this.targetSVGDoc.width.baseVal.value/this.width}get verticalScaling(){return this.targetSVGDoc.height.baseVal.value/this.height}setScaling(t){this.targetSVGDoc.setAttribute("width",""+t*this.width),this.targetSVGDoc.setAttribute("height",""+t*this.height)}get clientWidth(){return this.targetSVGDoc.getBoundingClientRect().width}get clientHeight(){return this.targetSVGDoc.getBoundingClientRect().height}get horizontalClientScaling(){return this.clientWidth/this.width}get verticalClientScaling(){return this.clientHeight/this.height}get minClientX(){return this.targetSVGDoc.getBoundingClientRect().x}get minClientY(){return this.targetSVGDoc.getBoundingClientRect().y}fromClientX(t){return this.minX+(t-this.minClientX)/this.horizontalClientScaling}fromClientY(t){return this.minY+(t-this.minClientY)/this.verticalClientScaling}fromClientCoordinates(t,e){return[this.fromClientX(t),this.fromClientY(e)]}fromClientPoint(t){return{x:this.fromClientX(t.x),y:this.fromClientY(t.y)}}toClientX(t){return this.minClientX+this.horizontalClientScaling*(t-this.minX)}toClientY(t){return this.minClientY+this.verticalClientScaling*(t-this.minY)}toClientCoordinates(t,e){return[this.toClientX(t),this.toClientY(e)]}toClientPoint(t){return{x:this.toClientX(t.x),y:this.toClientY(t.y)}}}class d{constructor(t){this.targetSVGDoc=t}set(t){let e=this.targetSVGDoc.viewBox.baseVal;this.targetSVGDoc.setAttribute("width",t*e.width+"px"),this.targetSVGDoc.setAttribute("height",t*e.height+"px")}}class f{constructor(t){this.targetSVGDoc=t}get(){let t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.width/e.width}}class p{constructor(t){this.targetSVGDoc=t}get(){let t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.height/e.height}}function m(t){let e=t.parentNode;e&&e.appendChild(t)}function g(t){let e=t.parentNode;e&&e.prepend(t)}var y,b=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class v{constructor(t){y.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,y,t)}toString(){return b(this,y,"f").innerHTML}set(t){b(this,y,"f").innerHTML=t}}y=new WeakMap;var w,x=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class S{constructor(t){w.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,w,t)}toString(){return x(this,w,"f").outerHTML}set(t){let e=document.createElementNS("http://www.w3.org/2000/svg","svg");if(e.style.height="0px",document.body.append(e),e.innerHTML=t,!e.firstElementChild)throw new Error("Outer XML must encode an SVG element.");if(e.childNodes.length>1)throw new Error("Outer XML cannot encode multiple DOM nodes.");if(e.firstElementChild.tagName.toLowerCase()!=x(this,w,"f").tagName.toLowerCase())throw new Error("Outer XML must specify an SVG element with the same tag name as the target SVG element.");[...x(this,w,"f").attributes].forEach((t=>x(this,w,"f").removeAttribute(t.name))),[...e.firstElementChild.attributes].forEach((t=>x(this,w,"f").setAttribute(t.name,t.value))),x(this,w,"f").innerHTML=e.firstElementChild.innerHTML,e.remove()}}function _(t){return t instanceof SVGGraphicsElement}w=new WeakMap;var P=n(854);function M(t){return(0,P.isArray)(t)&&t.every(_)}})(),r})(),t.exports=e()},662:function(t){var e;e=()=>(()=>{var t={127:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>h,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,normalizeAngle:()=>b,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}function b(t,e){void 0===e&&(e=-Math.PI);var n=t-e;return e+((n%=2*Math.PI)>=0?n:n+2*Math.PI)}return e})()},369:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>h,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function c(t){return"object"==typeof t&&null!==t}function h(t){return Array.isArray(t)}function l(t){return h(t)&&t.every(n)}function d(t){return h(t)&&t.every(r)}function f(t){return h(t)&&t.every(i)}function p(t){return h(t)&&t.every(a)}return t.r(e),t.d(e,{isArray:()=>h,isFiniteNumber:()=>r,isFiniteNumbersArray:()=>d,isNonFiniteNumber:()=>i,isNonFiniteNumbersArray:()=>f,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>c,isNullish:()=>u,isNumber:()=>n,isNumbersArray:()=>l,isPositiveFiniteNumber:()=>s,isString:()=>a,isStringsArray:()=>p}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Linkers:()=>g,Stems:()=>m,areConflicting:()=>c,areCrossing:()=>d,areEqual:()=>a,areKnotless:()=>l,areStacked:()=>u,deepCopy:()=>i,knotless:()=>p,mountainPlotTraversal:()=>y,parseDotBracket:()=>b,sorted:()=>o});var t=n(854),e=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function i(n){return(0,t.isNumbersArray)(n)?e([],n,!0):n.map((function(t){return e([],t,!0)}))}var s=n(986);function o(t){var e=i(t);return e.forEach(s.sortNumbers),e.sort((function(t,e){return t[0]-e[0]})),e}function a(t,e){var n=i(t),r=i(e);return(0,s.sortNumbers)(n),(0,s.sortNumbers)(r),[0,1].every((function(t){return n[t]==r[t]}))}function u(t,e){var n=o([t,e]);return n[0][0]==n[1][0]-1&&n[0][1]==n[1][1]+1}function c(t,e){return(0,s.min)(t)==(0,s.min)(e)&&(0,s.max)(t)!=(0,s.max)(e)||(0,s.min)(t)!=(0,s.min)(e)&&(0,s.max)(t)==(0,s.max)(e)}function h(t){if(0==t.length)return[];for(var e=[],n=0;n<(0,s.max)(t.flat());n++)e.push(void 0);return t.forEach((function(t){e[t[0]-1]=t[1],e[t[1]-1]=t[0]})),e}function l(t){var e=h(t),n=[],r=!1;return e.forEach((function(t,e){var i=e+1;null==t||(i<t?n.push(i):i==t||n.pop()!=t&&(r=!0))})),!r}function d(t,e){return!l([t,e])}var f=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function p(t){var e=[],n=i(t);return n.sort((function(t,e){return Math.abs(t[0]-t[1])-Math.abs(e[0]-e[1])})),n.forEach((function(t){l(f(f([],e,!0),[t],!1))&&e.push(t)})),e}var m=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=this.targetStructure[1];if(0==t.length)return[];var e=o(t),n=[],r=[];return e.forEach((function(t){var e=0==r.length?null:r[r.length-1];!e||u(e,t)?r.push(t):(n.push(r),r=[t])})),n.push(r),n},t}(),g=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=(new(m.bind.apply(m,function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}([void 0],this.targetStructure,!1)))).get().flatMap((function(t){return[t.map(s.min),t.map(s.max)]}));t.forEach(s.sortNumbers),t.sort((function(t,e){return(0,s.min)(t)-(0,s.min)(e)}));for(var e=[],n=t.shift(),r=t.shift();n&&r;){for(var i=[],o=(0,s.max)(n),a=(0,s.min)(r),u=o;u<=a;u++)i.push(u);e.push(i),n=r,r=t.shift()}return e},t}();function y(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[0],r=t[1],i=h(r);if(!l(r))throw new Error("Pseudoknot(s) encountered.");var s=[],o=0;return n.forEach((function(t,e){var n=e+1,r=i[e];null==r?s.push(o):n<r?(s.push(o),o++):(n==r||o--,s.push(o))})),s}function b(t){var e=t.split(""),n=[".","(",")"];e.forEach((function(t){if(!n.includes(t))throw new Error('Unrecognized character in dot-bracket notation: "'.concat(t,'".'))}));var r=[],i=[];if(e.forEach((function(t,e){var n=e+1;if("("==t)i.push(n);else if(")"==t){var s=i.pop();if("number"!=typeof s)throw new Error("Unmatched downstream partner(s) in dot-bracket notation.");r.push([s,n])}})),i.length>0)throw new Error("Unmatched upstream partner(s) in dot-bracket notation.");return o(r)}})(),r})(),t.exports=e()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";function t(t,e){if(!e.includes(t))throw new Error("The given base is not present in the provided base-pair.");return t===e[0]?e[1]:e[0]}n.r(r),n.d(r,{FirstPairedBase:()=>i,LastPairedBase:()=>o,LeadingDanglingBases:()=>a,Linkers:()=>l,PositionPairs:()=>e,Stems:()=>h,TrailingDanglingBases:()=>u,consecutivePairs:()=>p,knotless:()=>d,other:()=>t,parseDotBracket:()=>f});class e{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];return this.targetStructure[1].map((e=>[t.indexOf(e[0])+1,t.indexOf(e[1])+1]))}}class i{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0],e=this.targetStructure[1];if(0==e.length)throw new Error("There are no paired bases.");let n=e.flat(),r=t.findIndex((t=>n.includes(t)));if(r<0)throw new Error("No paired bases present in sequence.");return t[r]}}var s=n(986);class o{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0],e=this.targetStructure[1];if(0==e.length)throw new Error("There are no paired bases.");let n=e.flat().map((e=>t.indexOf(e)));if((0,s.max)(n)<0)throw new Error("No paired bases present in sequence.");return t[(0,s.max)(n)]}}class a{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];if(0==this.targetStructure[1].length)throw new Error("There are no paired bases.");let e=new i(...this.targetStructure).get(),n=t.indexOf(e);if(n<0)throw new Error("No paired bases present in sequence.");return t.slice(0,n)}}class u{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];if(0==this.targetStructure[1].length)throw new Error("There are no paired bases.");let e=new o(...this.targetStructure).get(),n=t.indexOf(e);if(n<0)throw new Error("No paired bases present in sequence.");return t.slice(n+1)}}var c=n(369);class h{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0],n=new e(...this.targetStructure).get();return new c.Stems(t,n).get().map((e=>e.map((e=>[t[e[0]-1],t[e[1]-1]]))))}}class l{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0],n=new e(...this.targetStructure).get();return new c.Linkers(t,n).get().map((e=>e.map((e=>t[e-1]))))}}function d(...t){let[n,r]=t,i=new e(...t).get();(0,c.areKnotless)(i)||(i=(0,c.knotless)(i));let s=i.map((t=>[n[t[0]-1],n[t[1]-1]]));return[[...n],s]}function f(t,e){if(e.length>t.length)throw new Error("Dot-bracket notation is longer than the sequence.");return[...(0,c.parseDotBracket)(e)].map((e=>{let n=e[0],r=e[1];return[t[n-1],t[r-1]]}))}function p(t){return t.length<2?[]:t.slice(0,-1).map(((e,n)=>[t[n],t[n+1]]))}})(),r})(),t.exports=e()},661:function(t){var e;e=()=>(()=>{var t={127:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>h,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,normalizeAngle:()=>b,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}function b(t,e){void 0===e&&(e=-Math.PI);var n=t-e;return e+((n%=2*Math.PI)>=0?n:n+2*Math.PI)}return e})()},369:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>h,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function c(t){return"object"==typeof t&&null!==t}function h(t){return Array.isArray(t)}function l(t){return h(t)&&t.every(n)}function d(t){return h(t)&&t.every(r)}function f(t){return h(t)&&t.every(i)}function p(t){return h(t)&&t.every(a)}return t.r(e),t.d(e,{isArray:()=>h,isFiniteNumber:()=>r,isFiniteNumbersArray:()=>d,isNonFiniteNumber:()=>i,isNonFiniteNumbersArray:()=>f,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>c,isNullish:()=>u,isNumber:()=>n,isNumbersArray:()=>l,isPositiveFiniteNumber:()=>s,isString:()=>a,isStringsArray:()=>p}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Linkers:()=>g,Stems:()=>m,areConflicting:()=>c,areCrossing:()=>d,areEqual:()=>a,areKnotless:()=>l,areStacked:()=>u,deepCopy:()=>i,knotless:()=>p,mountainPlotTraversal:()=>y,parseDotBracket:()=>b,sorted:()=>o});var t=n(854),e=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function i(n){return(0,t.isNumbersArray)(n)?e([],n,!0):n.map((function(t){return e([],t,!0)}))}var s=n(986);function o(t){var e=i(t);return e.forEach(s.sortNumbers),e.sort((function(t,e){return t[0]-e[0]})),e}function a(t,e){var n=i(t),r=i(e);return(0,s.sortNumbers)(n),(0,s.sortNumbers)(r),[0,1].every((function(t){return n[t]==r[t]}))}function u(t,e){var n=o([t,e]);return n[0][0]==n[1][0]-1&&n[0][1]==n[1][1]+1}function c(t,e){return(0,s.min)(t)==(0,s.min)(e)&&(0,s.max)(t)!=(0,s.max)(e)||(0,s.min)(t)!=(0,s.min)(e)&&(0,s.max)(t)==(0,s.max)(e)}function h(t){if(0==t.length)return[];for(var e=[],n=0;n<(0,s.max)(t.flat());n++)e.push(void 0);return t.forEach((function(t){e[t[0]-1]=t[1],e[t[1]-1]=t[0]})),e}function l(t){var e=h(t),n=[],r=!1;return e.forEach((function(t,e){var i=e+1;null==t||(i<t?n.push(i):i==t||n.pop()!=t&&(r=!0))})),!r}function d(t,e){return!l([t,e])}var f=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function p(t){var e=[],n=i(t);return n.sort((function(t,e){return Math.abs(t[0]-t[1])-Math.abs(e[0]-e[1])})),n.forEach((function(t){l(f(f([],e,!0),[t],!1))&&e.push(t)})),e}var m=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=this.targetStructure[1];if(0==t.length)return[];var e=o(t),n=[],r=[];return e.forEach((function(t){var e=0==r.length?null:r[r.length-1];!e||u(e,t)?r.push(t):(n.push(r),r=[t])})),n.push(r),n},t}(),g=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=(new(m.bind.apply(m,function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}([void 0],this.targetStructure,!1)))).get().flatMap((function(t){return[t.map(s.min),t.map(s.max)]}));t.forEach(s.sortNumbers),t.sort((function(t,e){return(0,s.min)(t)-(0,s.min)(e)}));for(var e=[],n=t.shift(),r=t.shift();n&&r;){for(var i=[],o=(0,s.max)(n),a=(0,s.min)(r),u=o;u<=a;u++)i.push(u);e.push(i),n=r,r=t.shift()}return e},t}();function y(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[0],r=t[1],i=h(r);if(!l(r))throw new Error("Pseudoknot(s) encountered.");var s=[],o=0;return n.forEach((function(t,e){var n=e+1,r=i[e];null==r?s.push(o):n<r?(s.push(o),o++):(n==r||o--,s.push(o))})),s}function b(t){var e=t.split(""),n=[".","(",")"];e.forEach((function(t){if(!n.includes(t))throw new Error('Unrecognized character in dot-bracket notation: "'.concat(t,'".'))}));var r=[],i=[];if(e.forEach((function(t,e){var n=e+1;if("("==t)i.push(n);else if(")"==t){var s=i.pop();if("number"!=typeof s)throw new Error("Unmatched downstream partner(s) in dot-bracket notation.");r.push([s,n])}})),i.length>0)throw new Error("Unmatched upstream partner(s) in dot-bracket notation.");return o(r)}})(),r})(),t.exports=e()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";function t(t,e){if(!e.includes(t))throw new Error("The given base is not present in the provided base-pair.");return t===e[0]?e[1]:e[0]}n.r(r),n.d(r,{FirstPairedBase:()=>i,LastPairedBase:()=>o,LeadingDanglingBases:()=>a,Linkers:()=>l,PositionPairs:()=>e,Stems:()=>h,TrailingDanglingBases:()=>u,consecutivePairs:()=>p,knotless:()=>d,other:()=>t,parseDotBracket:()=>f});class e{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];return this.targetStructure[1].map((e=>[t.indexOf(e[0])+1,t.indexOf(e[1])+1]))}}class i{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0],e=this.targetStructure[1];if(0==e.length)throw new Error("There are no paired bases.");let n=e.flat(),r=t.findIndex((t=>n.includes(t)));if(r<0)throw new Error("No paired bases present in sequence.");return t[r]}}var s=n(986);class o{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0],e=this.targetStructure[1];if(0==e.length)throw new Error("There are no paired bases.");let n=e.flat().map((e=>t.indexOf(e)));if((0,s.max)(n)<0)throw new Error("No paired bases present in sequence.");return t[(0,s.max)(n)]}}class a{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];if(0==this.targetStructure[1].length)throw new Error("There are no paired bases.");let e=new i(...this.targetStructure).get(),n=t.indexOf(e);if(n<0)throw new Error("No paired bases present in sequence.");return t.slice(0,n)}}class u{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];if(0==this.targetStructure[1].length)throw new Error("There are no paired bases.");let e=new o(...this.targetStructure).get(),n=t.indexOf(e);if(n<0)throw new Error("No paired bases present in sequence.");return t.slice(n+1)}}var c=n(369);class h{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0],n=new e(...this.targetStructure).get();return new c.Stems(t,n).get().map((e=>e.map((e=>[t[e[0]-1],t[e[1]-1]]))))}}class l{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0],n=new e(...this.targetStructure).get();return new c.Linkers(t,n).get().map((e=>e.map((e=>t[e-1]))))}}function d(...t){let[n,r]=t,i=new e(...t).get();(0,c.areKnotless)(i)||(i=(0,c.knotless)(i));let s=i.map((t=>[n[t[0]-1],n[t[1]-1]]));return[[...n],s]}function f(t,e){if(e.length>t.length)throw new Error("Dot-bracket notation is longer than the sequence.");return[...(0,c.parseDotBracket)(e)].map((e=>{let n=e[0],r=e[1];return[t[n-1],t[r-1]]}))}function p(t){return t.length<2?[]:t.slice(0,-1).map(((e,n)=>[t[n],t[n+1]]))}})(),r})(),t.exports=e()},173:function(t){var e;e=()=>(()=>{var t={422:function(t){t.exports=(()=>{var t={138:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}return t.r(e),t.d(e,{average:()=>r,mean:()=>r,sum:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";function t(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.pow(Math.pow(n,2)+Math.pow(r,2),.5)}function e(t,e){return{x:e.x-t.x,y:e.y-t.y}}n.r(r),n.d(r,{centroid:()=>s,displacement:()=>e,distance:()=>t,midpoint:()=>o});var i=n(138);function s(t){return{x:(0,i.mean)(t.map((function(t){return t.x}))),y:(0,i.mean)(t.map((function(t){return t.y})))}}function o(t,e){return s([t,e])}})(),r})()},872:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{CircularSegment:()=>a,Semicircle:()=>e});var t=n(422),e=function(){function e(t){this.chord=t}return Object.defineProperty(e.prototype,"chordLength",{get:function(){return(0,t.distance)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcLength",{get:function(){return Math.PI*this.chordLength/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcAngle",{get:function(){return Math.PI},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleRadius",{get:function(){return this.chordLength/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleDiameter",{get:function(){return 2*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCircumference",{get:function(){return 2*Math.PI*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCenterPoint",{get:function(){return(0,t.midpoint)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),e}(),i=n(872),s=function(){function e(e,n){this.chord=e,this.moreProps=n;var r=n.arcLength,i=(0,t.distance)(e[0],e[1]);if(r<=i)throw new Error("Arc length is too small.");if(r>=Math.PI*i/2)throw new Error("Arc length is too big.");for(var s=Math.PI/2,o=0;o<20;o++)s-=(r/i*Math.sin(s)-s)/(r/i*Math.cos(s)-1);this.arcAngle=2*s}return Object.defineProperty(e.prototype,"chordLength",{get:function(){return(0,t.distance)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcLength",{get:function(){return this.moreProps.arcLength},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleRadius",{get:function(){return this.arcLength/this.arcAngle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleDiameter",{get:function(){return 2*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCircumference",{get:function(){return 2*Math.PI*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCenterPoint",{get:function(){var e=(0,i.direction)((0,t.displacement)(this.chord[0],this.chord[1]));e+=(Math.PI-this.arcAngle)/2;var n=this.parentCircleRadius;return{x:this.chord[0].x+n*Math.cos(e),y:this.chord[0].y+n*Math.sin(e)}},enumerable:!1,configurable:!0}),e}(),o=function(){function e(e,n){this.chord=e,this.moreProps=n;var r=n.arcLength,i=(0,t.distance)(e[0],e[1]);if(0==i)throw new Error("Chord length cannot be zero.");if(r<=Math.PI*i/2)throw new Error("Arc length is too small.");for(var s=Math.PI,o=0;o<20;o++)s-=(r/i*Math.sin(Math.PI-s)-s)/(-r/i*Math.cos(Math.PI-s)-1);this.arcAngle=2*s}return Object.defineProperty(e.prototype,"chordLength",{get:function(){return(0,t.distance)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcLength",{get:function(){return this.moreProps.arcLength},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleRadius",{get:function(){return this.arcLength/this.arcAngle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleDiameter",{get:function(){return 2*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCircumference",{get:function(){return 2*Math.PI*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCenterPoint",{get:function(){var e=(0,i.direction)((0,t.displacement)(this.chord[0],this.chord[1]));e-=(this.arcAngle-Math.PI)/2;var n=this.parentCircleRadius;return{x:this.chord[0].x+n*Math.cos(e),y:this.chord[0].y+n*Math.sin(e)}},enumerable:!1,configurable:!0}),e}(),a=function(){function n(n,r){this.chord=n,this.moreProps=r;var i=r.arcLength,a=(0,t.distance)(n[0],n[1]);if(a>0&&i<=a)throw new Error("Arc length is too small.");var u=a<.001&&i<.001,c=Math.PI*a/2,h=Math.abs(i-c)<.001;this.wrappedCircularSegment=u||h?new e(n):i<c?new s(n,{arcLength:i}):new o(n,{arcLength:i})}return Object.defineProperty(n.prototype,"chordLength",{get:function(){return this.wrappedCircularSegment.chordLength},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"arcLength",{get:function(){return this.moreProps.arcLength},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"arcAngle",{get:function(){return this.wrappedCircularSegment.arcAngle},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleRadius",{get:function(){return this.wrappedCircularSegment.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleDiameter",{get:function(){return this.wrappedCircularSegment.parentCircleDiameter},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleCircumference",{get:function(){return this.wrappedCircularSegment.parentCircleCircumference},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleCenterPoint",{get:function(){return this.wrappedCircularSegment.parentCircleCenterPoint},enumerable:!1,configurable:!0}),n}()})(),r})(),t.exports=e()},986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,flipAway:()=>v,isBetween:()=>h,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,normalizeAngle:()=>b,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}function b(t,e){void 0===e&&(e=-Math.PI);var n=t-e;return e+((n%=2*Math.PI)>=0?n:n+2*Math.PI)}function v(t,e){var n=(e=b(e,t))-t;return(n<Math.PI/2||n>3*Math.PI/2)&&(t+=Math.PI),t}return e})()},456:function(t){var e;e=()=>(()=>{var t={277:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{Vector:()=>n});class n{static matching(t){return new n(t.x,t.y)}constructor(t,e){this.x=t,this.y=e}[Symbol.iterator](){return[this.x,this.y].values()}get magnitude(){return Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2))}get direction(){return Math.atan2(this.y,this.x)}}return e})(),t.exports=e()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Point:()=>e,RelativePoint:()=>h});var t=n(277);class e{static matching(t){return new e(t.x,t.y)}constructor(t,e){this.x=t,this.y=e}[Symbol.iterator](){return[this.x,this.y].values()}displacementTo(e){return new t.Vector(e.x-this.x,e.y-this.y)}displacementFrom(e){return new t.Vector(this.x-e.x,this.y-e.y)}distanceTo(t){return this.displacementTo(t).magnitude}distanceFrom(t){return this.distanceTo(t)}directionTo(t){return this.displacementTo(t).direction}directionFrom(t){return this.displacementFrom(t).direction}}var i,s,o,a,u,c=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class h{constructor(e){i.add(this),s.set(this,void 0),o.set(this,new t.Vector(0,0)),a.set(this,{move:[]}),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,s,e),e.addEventListener("move",(()=>c(this,i,"m",u).call(this,"move")))}get x(){return c(this,s,"f").x+c(this,o,"f").x}set x(t){c(this,o,"f").x=t-c(this,s,"f").x,c(this,i,"m",u).call(this,"move")}get y(){return c(this,s,"f").y+c(this,o,"f").y}set y(t){c(this,o,"f").y=t-c(this,s,"f").y,c(this,i,"m",u).call(this,"move")}addEventListener(t,e){c(this,a,"f")[t].push(e)}removeEventListener(t,e){c(this,a,"f")[t]=c(this,a,"f")[t].filter((t=>t!==e))}}s=new WeakMap,o=new WeakMap,a=new WeakMap,i=new WeakSet,u=function(t){c(this,a,"f")[t].forEach((t=>t()))}})(),r})(),t.exports=e()},725:function(t){t.exports=(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>d,average:()=>r,degrees:()=>m,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,radians:()=>g,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>f,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>p,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return Math.abs(t-e)<=n}function f(t){i(t),t.reverse()}function p(t){var e=o(t);return e.reverse(),e}function m(t){return t*(180/Math.PI)}function g(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function c(t){return"object"==typeof t&&null!==t}function h(t){return Array.isArray(t)}return t.r(e),t.d(e,{isArray:()=>h,isFiniteNumber:()=>r,isNonFiniteNumber:()=>i,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>c,isNullish:()=>u,isNumber:()=>n,isPositiveFiniteNumber:()=>s,isString:()=>a}),e})()},30:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.pow(Math.pow(t.x,2)+Math.pow(t.y,2),.5)}function r(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>r,magnitude:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{areWithin:()=>a,centroid:()=>f,deepCopy:()=>s,direction:()=>l,displaced:()=>c,displacement:()=>u,distance:()=>o,isFinitePoint:()=>i,isPoint:()=>e,midpoint:()=>p});var t=n(854);function e(e){return(0,t.isNonNullObject)(e)&&(0,t.isNumber)(e.x)&&(0,t.isNumber)(e.y)}function i(n){return e(n)&&(0,t.isFiniteNumber)(n.x)&&(0,t.isFiniteNumber)(n.y)}function s(t){return{x:t.x,y:t.y}}function o(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.pow(Math.pow(n,2)+Math.pow(r,2),.5)}function a(t,e,n){return o(t,e)<=n}function u(t,e){return{x:e.x-t.x,y:e.y-t.y}}function c(t,e){return{x:t.x+e.x,y:t.y+e.y}}var h=n(30);function l(t,e){return(0,h.direction)(u(t,e))}var d=n(986);function f(t){return{x:(0,d.mean)(t.map((function(t){return t.x}))),y:(0,d.mean)(t.map((function(t){return t.y})))}}function p(t,e){return f([t,e])}})(),r})()},369:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>h,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function c(t){return"object"==typeof t&&null!==t}function h(t){return Array.isArray(t)}function l(t){return h(t)&&t.every(n)}function d(t){return h(t)&&t.every(r)}function f(t){return h(t)&&t.every(i)}function p(t){return h(t)&&t.every(a)}return t.r(e),t.d(e,{isArray:()=>h,isFiniteNumber:()=>r,isFiniteNumbersArray:()=>d,isNonFiniteNumber:()=>i,isNonFiniteNumbersArray:()=>f,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>c,isNullish:()=>u,isNumber:()=>n,isNumbersArray:()=>l,isPositiveFiniteNumber:()=>s,isString:()=>a,isStringsArray:()=>p}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Linkers:()=>g,Stems:()=>m,areConflicting:()=>c,areCrossing:()=>d,areEqual:()=>a,areKnotless:()=>l,areStacked:()=>u,deepCopy:()=>i,knotless:()=>p,mountainPlotTraversal:()=>y,parseDotBracket:()=>b,sorted:()=>o});var t=n(854),e=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function i(n){return(0,t.isNumbersArray)(n)?e([],n,!0):n.map((function(t){return e([],t,!0)}))}var s=n(986);function o(t){var e=i(t);return e.forEach(s.sortNumbers),e.sort((function(t,e){return t[0]-e[0]})),e}function a(t,e){var n=i(t),r=i(e);return(0,s.sortNumbers)(n),(0,s.sortNumbers)(r),[0,1].every((function(t){return n[t]==r[t]}))}function u(t,e){var n=o([t,e]);return n[0][0]==n[1][0]-1&&n[0][1]==n[1][1]+1}function c(t,e){return(0,s.min)(t)==(0,s.min)(e)&&(0,s.max)(t)!=(0,s.max)(e)||(0,s.min)(t)!=(0,s.min)(e)&&(0,s.max)(t)==(0,s.max)(e)}function h(t){if(0==t.length)return[];for(var e=[],n=0;n<(0,s.max)(t.flat());n++)e.push(void 0);return t.forEach((function(t){e[t[0]-1]=t[1],e[t[1]-1]=t[0]})),e}function l(t){var e=h(t),n=[],r=!1;return e.forEach((function(t,e){var i=e+1;null==t||(i<t?n.push(i):i==t||n.pop()!=t&&(r=!0))})),!r}function d(t,e){return!l([t,e])}var f=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function p(t){var e=[],n=i(t);return n.sort((function(t,e){return Math.abs(t[0]-t[1])-Math.abs(e[0]-e[1])})),n.forEach((function(t){l(f(f([],e,!0),[t],!1))&&e.push(t)})),e}var m=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=this.targetStructure[1];if(0==t.length)return[];var e=o(t),n=[],r=[];return e.forEach((function(t){var e=0==r.length?null:r[r.length-1];!e||u(e,t)?r.push(t):(n.push(r),r=[t])})),n.push(r),n},t}(),g=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=(new(m.bind.apply(m,function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}([void 0],this.targetStructure,!1)))).get().flatMap((function(t){return[t.map(s.min),t.map(s.max)]}));t.forEach(s.sortNumbers),t.sort((function(t,e){return(0,s.min)(t)-(0,s.min)(e)}));for(var e=[],n=t.shift(),r=t.shift();n&&r;){for(var i=[],o=(0,s.max)(n),a=(0,s.min)(r),u=o;u<=a;u++)i.push(u);e.push(i),n=r,r=t.shift()}return e},t}();function y(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[0],r=t[1],i=h(r);if(!l(r))throw new Error("Pseudoknot(s) encountered.");var s=[],o=0;return n.forEach((function(t,e){var n=e+1,r=i[e];null==r?s.push(o):n<r?(s.push(o),o++):(n==r||o--,s.push(o))})),s}function b(t){var e=t.split(""),n=[".","(",")"];e.forEach((function(t){if(!n.includes(t))throw new Error('Unrecognized character in dot-bracket notation: "'.concat(t,'".'))}));var r=[],i=[];if(e.forEach((function(t,e){var n=e+1;if("("==t)i.push(n);else if(")"==t){var s=i.pop();if("number"!=typeof s)throw new Error("Unmatched downstream partner(s) in dot-bracket notation.");r.push([s,n])}})),i.length>0)throw new Error("Unmatched upstream partner(s) in dot-bracket notation.");return o(r)}})(),r})(),t.exports=e()},30:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.pow(Math.pow(t.x,2)+Math.pow(t.y,2),.5)}function r(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>r,magnitude:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Centroid:()=>s,Direction:()=>f,MaxCenterX:()=>u,MaxCenterY:()=>h,MinCenterX:()=>a,MinCenterY:()=>c,NucleobaseMock:()=>t,arrange:()=>C,circularize:()=>P,flipSelfX:()=>g,flipSelfY:()=>y,flipX:()=>p,flipY:()=>m,linearize:()=>x,outwardNormal:()=>w,rotate:()=>d,round:()=>N,shift:()=>e,stemmify:()=>_,straighten:()=>S,tangent:()=>b,untangle:()=>I});class t{constructor(t){this.props=t}getCenterPoint(){return this.props.centerPoint}setCenterPoint(t){this.props.centerPoint=t}}function e(t,e){t.forEach((t=>{let n=t.getCenterPoint();t.setCenterPoint({x:n.x+e.x,y:n.y+e.y})}))}var i=n(725);class s{constructor(t){this.targetBases=t}get(){let t=this.targetBases.map((t=>t.getCenterPoint()));return(0,i.centroid)(t)}set(t){let n=this.get(),r=(0,i.displacement)(n,t);e(this.targetBases,r)}}var o=n(986);class a{constructor(t){this.targetBases=t}get(){return(0,o.min)(this.targetBases.map((t=>t.getCenterPoint().x)))}set(t){let n=this.get();e(this.targetBases,{x:t-n,y:0})}}class u{constructor(t){this.targetBases=t}get(){return(0,o.max)(this.targetBases.map((t=>t.getCenterPoint().x)))}set(t){let n=this.get();e(this.targetBases,{x:t-n,y:0})}}class c{constructor(t){this.targetBases=t}get(){return(0,o.min)(this.targetBases.map((t=>t.getCenterPoint().y)))}set(t){let n=this.get();e(this.targetBases,{x:0,y:t-n})}}class h{constructor(t){this.targetBases=t}get(){return(0,o.max)(this.targetBases.map((t=>t.getCenterPoint().y)))}set(t){let n=this.get();e(this.targetBases,{x:0,y:t-n})}}var l=n(30);function d(t,e){if(t.length<2)return;let n=t[0],r=t[t.length-1],s=(0,i.midpoint)(n.getCenterPoint(),r.getCenterPoint());t.forEach((t=>{let n=t.getCenterPoint(),r=(0,i.distance)(s,n),o=(0,l.direction)((0,i.displacement)(s,n));o+=e,t.setCenterPoint({x:s.x+r*Math.cos(o),y:s.y+r*Math.sin(o)})}))}class f{constructor(t){this.targetBases=t}get(){if(this.targetBases.length<2)return 0;let t=this.targetBases[0],e=this.targetBases[this.targetBases.length-1];return(0,l.direction)((0,i.displacement)(t.getCenterPoint(),e.getCenterPoint()))}set(t){let e=t-this.get();d(this.targetBases,e)}}function p(t){let e=new s(t).get().y;t.forEach((t=>{let n=t.getCenterPoint(),r=n.y-e;t.setCenterPoint({x:n.x,y:e-r})}))}function m(t){let e=new s(t).get().x;t.forEach((t=>{let n=t.getCenterPoint(),r=n.x-e;t.setCenterPoint({x:e-r,y:n.y})}))}function g(t){if(0==t.length)return;let n=t[0],{x:r,y:s}=n.getCenterPoint(),o={x:r,y:s},a=new f(t).get();d(t,-a),p(t),d(t,a),e(t,(0,i.displacement)(n.getCenterPoint(),o))}function y(t){let e=new s(t),{x:n,y:r}=e.get(),i=n,o=r,a=new f(t).get();d(t,-a),m(t),d(t,a),e.set({x:i,y:o})}function b(t,e){let n=e.indexOf(t);if(-1==n)throw new Error("The target base is not present in the parent sequence.");let r=n-1,i=n+2;return r=Math.max(r,0),new f(e.slice(r,i)).get()}var v=n(127);function w(t,...e){var n;let r=e[0],s=null!==(n=e[1])&&void 0!==n?n:[],a=b(t,r)+Math.PI/2,u=r.indexOf(t);if(u<0)throw new Error("The target base is not present in the provided structure.");if(r.length>1&&u<r.length-1){let e=r[u+1];a=(0,o.flipAway)(a,(0,i.direction)(t.getCenterPoint(),e.getCenterPoint()))}let c=s.find((e=>e.includes(t)));return c&&(a=(0,o.flipAway)(a,(0,i.direction)(t.getCenterPoint(),(0,v.other)(t,c).getCenterPoint()))),a}function x(t,e){let{spacing:n}=e;if(t.length<2)return;let r=new f(t),i=r.get(),o=new s(t),{x:a,y:u}=o.get(),c={x:a,y:u};t.forEach(((t,e)=>{t.setCenterPoint({x:e*n,y:0})})),r.set(i),o.set(c)}function S(t){if(t.length<3)return;let e=t[0],n=t[t.length-1],r=[e.getCenterPoint(),n.getCenterPoint()],s=(0,i.distance)(r[0],r[1]),o=(0,l.direction)((0,i.displacement)(r[0],r[1])),a=s/(t.length-1),u=a*Math.cos(o),c=a*Math.sin(o),{x:h,y:d}=r[0];t.forEach((t=>{t.setCenterPoint({x:h,y:d}),h+=u,d+=c}))}function _(t,n){let{basePairLength:r,basePairSpacing:o}=n;if(t.length<2)return;let a=Math.ceil(t.length/2),u=t.slice(0,a),c=t.slice(a),h=new s(t),{x:l,y:p}=h.get(),m={x:l,y:p},g=new f(t).get();x(u,{spacing:o}),x(c,{spacing:o}),new f(u).set(-Math.PI/2),new f(c).set(Math.PI/2);let y=t[0],b=t[t.length-1];e(u,(0,i.displacement)(y.getCenterPoint(),{x:0,y:0})),e(c,(0,i.displacement)(b.getCenterPoint(),{x:r,y:0})),d(t,g),h.set(m)}function P(t,e){let{spacing:n,terminiGap:r}=e;if(t.length<2)return;let i=new s(t),{x:o,y:a}=i.get(),u=o,c=a,h=new f(t).get(),l=n*(t.length-1);l+=r,Math.abs(l)<1e-5&&(l=1e-5);let p=l/(2*Math.PI),m=Math.PI/2+2*Math.PI*(.5*r/l);t.forEach(((t,e)=>{let r=m+2*Math.PI*(e*n)/l;t.setCenterPoint({x:p*Math.cos(r),y:p*Math.sin(r)})})),d(t,h),i.set({x:u,y:c})}var M=n(173);function N(t,n){let{spacing:r}=n;if(t.length<3)return;let s=t[0],o=t[t.length-1],a=[s.getCenterPoint(),o.getCenterPoint()],u=(0,i.distance)(a[0],a[1]),c=r*(t.length-1);if(c-u<.001)return void S(t);if(u<.001){let{x:n,y:o}=s.getCenterPoint();return P(t,{spacing:r,terminiGap:u}),void e(t,(0,i.displacement)(s.getCenterPoint(),{x:n,y:o}))}let h=new M.CircularSegment(a,{arcLength:c}),d=h.parentCircleCenterPoint,f=h.parentCircleRadius,p=(0,l.direction)((0,i.displacement)(d,s.getCenterPoint())),m=h.arcAngle/(t.length-1);t.forEach((t=>{t.setCenterPoint({x:d.x+f*Math.cos(p),y:d.y+f*Math.sin(p)}),p+=m}))}var O=n(369);function C(t,n,r){var a,u,c;let{spacing:h}=r,l=null!==(a=r.basePairSpacing)&&void 0!==a?a:h,d=null!==(u=r.hairpinLoopSpacing)&&void 0!==u?u:h,p=null!==(c=r.terminiGap)&&void 0!==c?c:h,{x:m,y:g}=new s(t).get(),y={x:m,y:g},b=new f(t).get();[,n]=(0,v.knotless)(t,n);let w=new v.PositionPairs(t,n).get(),x=(0,O.mountainPlotTraversal)(t,w),S=t.filter(((t,e)=>0==x[e]));P(S,{spacing:h,terminiGap:p});let M=new v.Stems(t,n).get(),C=new Set(S),E=M.filter((t=>C.has(t[0][0]))),T=n=>{let r=n[0],{x:a,y:u}=new s(r).get(),c={x:a,y:u},p=new f(n[0]).get(),m=[...n.map((t=>t[0])),...n.map((t=>t[1])).reverse()];_(m,{basePairLength:h,basePairSpacing:l}),new f(m).set(p),e(m,(0,i.displacement)(new s(r).get(),c));let g=n[n.length-1],y=g.map((e=>t.indexOf(e))),b=t.filter(((t,e)=>(0,o.isBetweenExclusive)(e,(0,o.min)(y),(0,o.max)(y))&&x[e]==x[(0,o.min)(y)]+1)),v=new Set(b),w=M.filter((t=>v.has(t[0][0])));N([g[0],...b,g[1]],{spacing:w.length>0?h:d}),w.forEach((t=>T(t)))};E.forEach((t=>T(t))),new f(t).set(b),new s(t).set(y)}var E,T,A,j,k,D=n(456),L=function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n},B=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};function I(e,n,r){let i,{spacing:a}=r;if(0==e.length)return;if(0==n.length)return void function(t,e){let{spacing:n}=e,r=D.Point.matching(new s(t).get());P(t,{spacing:n,terminiGap:2*n}),new f(t).set(Math.PI/2),new s(t).set(r)}(e,r);[i,n]=(0,v.knotless)(e,n);let u=[...e],c=D.Point.matching(new s(u).get());e=[...e,new t({centerPoint:{x:0,y:0}})];let h=new R(e,n),l=h.loops;l.sort(((t,e)=>q(t,h)-q(e,h)));let p=l[0],m=(0,o.max)(p.linkers.map((t=>t.length))),g=p.linkers.flatMap((e=>[z(e),...Array.from({length:m-2}).map((()=>new t({centerPoint:{x:0,y:0}}))),X(e)]));if(P(g,{spacing:a,terminiGap:a}),d(g,-new f(g).get()),new s(g).set(c),p.linkers.forEach((t=>N(t,{spacing:a}))),p.emanatingStems.forEach((t=>F(t.bottomBasePair,h,r))),"outerStem"in p){let t=[p.outerStem.topBasePair[1],p.outerStem.topBasePair[0]],i=[...e.slice(h.indexOf(t[0])),...e.slice(0,h.indexOf(t[1])+1)],s=new Set(i);F(t,new R(i,n.filter((t=>t.every((t=>s.has(t)))))),r)}}function F(n,r,s){var a,u;let{spacing:c}=s,h=null!==(a=s.basePairSpacing)&&void 0!==a?a:c,l=null!==(u=s.hairpinLoopSpacing)&&void 0!==u?u:c,d=r.stems.find((t=>t.bottomBasePair[0]===n[0]));if(!d)throw new Error("Closing stem not found.");let f=D.Point.matching(n[0].getCenterPoint());_(d.bases,{basePairSpacing:h,basePairLength:c}),e(d.bases,(0,i.displacement)(n[0].getCenterPoint(),f));let p=r.loop(d.topBasePair);p.innerStems.length>0?function(n,r,s){let{spacing:a}=s,u=[r.indexOf(n[0]),r.indexOf(n[1])],c=r.loop(n).innerStems.flatMap((t=>t.bottomBasePair.map((t=>r.indexOf(t))))),h=(0,o.min)(c),l=(0,o.max)(c),d=r.sequence.filter(((t,e)=>e>=h&&e<=l&&r.mountainPlotTraversal[e]==r.mountainPlotTraversal[h]&&[e-1,e,e+1].some((t=>c.includes(t))))),f=(0,o.max)([d.length-2,h-(0,o.min)(u)-1,(0,o.max)(u)-l-1]);f=(0,o.max)([f,0]);let p=Array.from({length:f}).map((()=>new t({centerPoint:{x:0,y:0}}))),m=p.map((()=>new t({centerPoint:{x:0,y:0}}))),g=D.Point.matching(n[0].getCenterPoint());P([n[0],...p,...d,...m,n[1]],{spacing:a,terminiGap:a}),e([...n,...d],(0,i.displacement)(n[0].getCenterPoint(),g)),N(r.sequence.slice(u[0],h+1),{spacing:a}),N(r.sequence.slice(l,u[1]+1),{spacing:a})}(d.topBasePair,r,s):N(p.bases,{spacing:l}),p.innerStems.forEach((t=>F(t.bottomBasePair,r,s))),(0,v.consecutivePairs)(p.innerStems).map((([t,e])=>[t.bottomBasePair[1],...r.interveningBases(t.bottomBasePair[1],e.bottomBasePair[0]),e.bottomBasePair[0]])).filter((t=>t.length>=5)).forEach((t=>{let n=t.slice(1,-1),r=D.Point.matching(n[0].getCenterPoint());_(n,{basePairLength:(0,i.distance)(z(n).getCenterPoint(),X(n).getCenterPoint()),basePairSpacing:h}),n.length%2==0||N(function(t){if(t.length<3)throw new Error("The array has less than three items.");if(t.length%2==0)throw new Error("The array has an even number of items.");let e=Math.floor(t.length/2);return t.slice(e-1,e+2)}(n),{spacing:c}),e(n,(0,i.displacement)(n[0].getCenterPoint(),r))}))}class R{constructor(t,e){this.sequence=t,this.basePairs=e,E.set(this,void 0),T.set(this,void 0),A.set(this,void 0),j.set(this,void 0),L(this,E,new Map,"f"),this.sequence.forEach(((t,e)=>B(this,E,"f").set(t,e))),L(this,T,new Map,"f"),this.sequence.forEach(((t,e)=>B(this,T,"f").set(t,e+1))),L(this,A,new Map,"f"),this.basePairs.forEach((t=>B(this,A,"f").set(t[0],t[1]))),this.basePairs.forEach((t=>B(this,A,"f").set(t[1],t[0]))),L(this,j,this.basePairs.map((t=>[this.positionOf(t[0]),this.positionOf(t[1])])),"f"),this.mountainPlotTraversal=(0,O.mountainPlotTraversal)(this.sequence,B(this,j,"f")),this.stems=new v.Stems(this.sequence,this.basePairs).get().map((t=>new V(t)))}indexOf(t){let e=B(this,E,"f").get(t);if("number"!=typeof e)throw new Error("Base not found.");return e}positionOf(t){let e=B(this,T,"f").get(t);if("number"!=typeof e)throw new Error("Base not found.");return e}spannedBases(t){let e=this.indexOf(t[0]),n=this.indexOf(t[1]);return this.sequence.slice((0,o.min)([e,n])+1,(0,o.max)([e,n]))}numSpannedBases(t){return this.spannedBases(t).length}joinedBases(t){let e=this.indexOf(t[0]),n=this.indexOf(t[1]);return[...this.sequence.slice(0,(0,o.min)([e,n])+1),...this.sequence.slice((0,o.max)([e,n]))]}numJoinedBases(t){return this.joinedBases(t).length}interveningBases(t,e){let n=this.indexOf(t),r=this.indexOf(e);return this.sequence.slice((0,o.min)([n,r])+1,(0,o.max)([n,r]))}get loops(){return[this.outermostLoop,...this.stems.map((t=>this.loop(t.topBasePair)))]}loop(t){let e=[this.indexOf(t[0]),this.indexOf(t[1])],n=this.mountainPlotTraversal[e[0]]+1,r=this.spannedBases(t).filter((t=>this.mountainPlotTraversal[this.indexOf(t)]==n)),i=new Set(r),s=[t[0],...r,t[1]],o=this.stems.filter((t=>i.has(t.bottomBasePair[0]))),a=o,u=this.stems.find((e=>t.includes(e.topBasePair[0])));if(!u)throw new Error("Outer stem not found.");let c=(0,v.consecutivePairs)(o).map((([t,e])=>[t.bottomBasePair[1],...this.interveningBases(t.bottomBasePair[1],e.bottomBasePair[0]),e.bottomBasePair[0]]));return o.length>0&&(c.unshift([t[0],...this.interveningBases(t[0],z(o).bottomBasePair[0]),z(o).bottomBasePair[0]]),c.push([X(o).bottomBasePair[1],...this.interveningBases(X(o).bottomBasePair[1],t[1]),t[1]])),{bases:s,closingBasePair:t,outerStem:u,innerStems:o,emanatingStems:a,linkers:c}}get outermostLoop(){let t=this.stems.filter((t=>0==this.mountainPlotTraversal[this.indexOf(t.bottomBasePair[0])])),e=t,n=(0,v.consecutivePairs)(e).map((([t,e])=>[t.bottomBasePair[1],...this.interveningBases(t.bottomBasePair[1],e.bottomBasePair[0]),e.bottomBasePair[0]]));return e.length>0&&n.push([...this.sequence.slice(this.indexOf(X(e).bottomBasePair[1])),...this.sequence.slice(0,this.indexOf(z(e).bottomBasePair[0])+1)]),{stems:e,emanatingStems:t,linkers:n}}}E=new WeakMap,T=new WeakMap,A=new WeakMap,j=new WeakMap;class V{constructor(t){if(k.set(this,void 0),0==t.length)throw new Error("A stem must have at least one base-pair.");L(this,k,t,"f")}get bottomBasePair(){return z(B(this,k,"f"))}get topBasePair(){return X(B(this,k,"f"))}get side5(){return B(this,k,"f").map((t=>t[0]))}get side3(){let t=B(this,k,"f").map((t=>t[1]));return t.reverse(),t}get bases(){return[...this.side5,...this.side3]}}function q(t,e){let n=(0,o.max)(t.emanatingStems.map((t=>e.numSpannedBases(t.bottomBasePair))));return"closingBasePair"in t&&(n=(0,o.max)([n,e.numJoinedBases(t.closingBasePair)-2])),n}function z(t){if(0==t.length)throw new Error("The array is empty.");return t[0]}function X(t){if(0==t.length)throw new Error("The array is empty.");return t[t.length-1]}k=new WeakMap})(),r})(),t.exports=e()},282:function(t){var e;e=()=>(()=>{var t={726:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t,e){for(let[n,r]of Object.entries(e))t.setAttribute(n,r)}t.r(e),t.d(e,{CoordinateSystem:()=>l,HorizontalClientScaling:()=>f,InnerXML:()=>v,OuterXML:()=>S,Scaling:()=>d,VerticalClientScaling:()=>p,assignUUID:()=>h,bringToFront:()=>m,sendToBack:()=>g,setAttributes:()=>n});const r={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};var i,s=new Uint8Array(16);function o(){if(!i&&!(i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(s)}for(var a=[],u=0;u<256;++u)a.push((u+256).toString(16).slice(1));const c=function(t,e,n){if(r.randomUUID&&!e&&!t)return r.randomUUID();var i=(t=t||{}).random||(t.rng||o)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){n=n||0;for(var s=0;s<16;++s)e[n+s]=i[s];return e}return function(t,e=0){return(a[t[e+0]]+a[t[e+1]]+a[t[e+2]]+a[t[e+3]]+"-"+a[t[e+4]]+a[t[e+5]]+"-"+a[t[e+6]]+a[t[e+7]]+"-"+a[t[e+8]]+a[t[e+9]]+"-"+a[t[e+10]]+a[t[e+11]]+a[t[e+12]]+a[t[e+13]]+a[t[e+14]]+a[t[e+15]]).toLowerCase()}(i)};function h(t){t.id="uuid-"+c()}class l{constructor(t){this.targetSVGDoc=t}get width(){return this.targetSVGDoc.viewBox.baseVal.width}get height(){return this.targetSVGDoc.viewBox.baseVal.height}get minX(){return this.targetSVGDoc.viewBox.baseVal.x}get maxX(){return this.minX+this.width}get minY(){return this.targetSVGDoc.viewBox.baseVal.y}get maxY(){return this.minY+this.height}get horizontalScaling(){return this.targetSVGDoc.width.baseVal.value/this.width}get verticalScaling(){return this.targetSVGDoc.height.baseVal.value/this.height}setScaling(t){this.targetSVGDoc.setAttribute("width",""+t*this.width),this.targetSVGDoc.setAttribute("height",""+t*this.height)}get clientWidth(){return this.targetSVGDoc.getBoundingClientRect().width}get clientHeight(){return this.targetSVGDoc.getBoundingClientRect().height}get horizontalClientScaling(){return this.clientWidth/this.width}get verticalClientScaling(){return this.clientHeight/this.height}get minClientX(){return this.targetSVGDoc.getBoundingClientRect().x}get minClientY(){return this.targetSVGDoc.getBoundingClientRect().y}fromClientX(t){return this.minX+(t-this.minClientX)/this.horizontalClientScaling}fromClientY(t){return this.minY+(t-this.minClientY)/this.verticalClientScaling}fromClientCoordinates(t,e){return[this.fromClientX(t),this.fromClientY(e)]}fromClientPoint(t){return{x:this.fromClientX(t.x),y:this.fromClientY(t.y)}}toClientX(t){return this.minClientX+this.horizontalClientScaling*(t-this.minX)}toClientY(t){return this.minClientY+this.verticalClientScaling*(t-this.minY)}toClientCoordinates(t,e){return[this.toClientX(t),this.toClientY(e)]}toClientPoint(t){return{x:this.toClientX(t.x),y:this.toClientY(t.y)}}}class d{constructor(t){this.targetSVGDoc=t}set(t){let e=this.targetSVGDoc.viewBox.baseVal;this.targetSVGDoc.setAttribute("width",t*e.width+"px"),this.targetSVGDoc.setAttribute("height",t*e.height+"px")}}class f{constructor(t){this.targetSVGDoc=t}get(){let t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.width/e.width}}class p{constructor(t){this.targetSVGDoc=t}get(){let t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.height/e.height}}function m(t){let e=t.parentNode;e&&e.appendChild(t)}function g(t){let e=t.parentNode;e&&e.prepend(t)}var y,b=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class v{constructor(t){y.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,y,t)}toString(){return b(this,y,"f").innerHTML}set(t){b(this,y,"f").innerHTML=t}}y=new WeakMap;var w,x=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class S{constructor(t){w.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,w,t)}toString(){return x(this,w,"f").outerHTML}set(t){let e=document.createElementNS("http://www.w3.org/2000/svg","svg");if(e.style.height="0px",document.body.append(e),e.innerHTML=t,!e.firstElementChild)throw new Error("Outer XML must encode an SVG element.");if(e.childNodes.length>1)throw new Error("Outer XML cannot encode multiple DOM nodes.");if(e.firstElementChild.tagName.toLowerCase()!=x(this,w,"f").tagName.toLowerCase())throw new Error("Outer XML must specify an SVG element with the same tag name as the target SVG element.");[...x(this,w,"f").attributes].forEach((t=>x(this,w,"f").removeAttribute(t.name))),[...e.firstElementChild.attributes].forEach((t=>x(this,w,"f").setAttribute(t.name,t.value))),x(this,w,"f").innerHTML=e.firstElementChild.innerHTML,e.remove()}}return w=new WeakMap,e})(),t.exports=e()},725:function(t){t.exports=(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>d,average:()=>r,degrees:()=>m,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,radians:()=>g,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>f,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>p,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return Math.abs(t-e)<=n}function f(t){i(t),t.reverse()}function p(t){var e=o(t);return e.reverse(),e}function m(t){return t*(180/Math.PI)}function g(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function c(t){return"object"==typeof t&&null!==t}function h(t){return Array.isArray(t)}return t.r(e),t.d(e,{isArray:()=>h,isFiniteNumber:()=>r,isNonFiniteNumber:()=>i,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>c,isNullish:()=>u,isNumber:()=>n,isPositiveFiniteNumber:()=>s,isString:()=>a}),e})()},30:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.pow(Math.pow(t.x,2)+Math.pow(t.y,2),.5)}function r(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>r,magnitude:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{areWithin:()=>a,centroid:()=>f,deepCopy:()=>s,direction:()=>l,displaced:()=>c,displacement:()=>u,distance:()=>o,isFinitePoint:()=>i,isPoint:()=>e,midpoint:()=>p});var t=n(854);function e(e){return(0,t.isNonNullObject)(e)&&(0,t.isNumber)(e.x)&&(0,t.isNumber)(e.y)}function i(n){return e(n)&&(0,t.isFiniteNumber)(n.x)&&(0,t.isFiniteNumber)(n.y)}function s(t){return{x:t.x,y:t.y}}function o(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.pow(Math.pow(n,2)+Math.pow(r,2),.5)}function a(t,e,n){return o(t,e)<=n}function u(t,e){return{x:e.x-t.x,y:e.y-t.y}}function c(t,e){return{x:t.x+e.x,y:t.y+e.y}}var h=n(30);function l(t,e){return(0,h.direction)(u(t,e))}var d=n(986);function f(t){return{x:(0,d.mean)(t.map((function(t){return t.x}))),y:(0,d.mean)(t.map((function(t){return t.y})))}}function p(t,e){return f([t,e])}})(),r})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function c(t){return"object"==typeof t&&null!==t}function h(t){return Array.isArray(t)}function l(t){return h(t)&&0==t.length}function d(t){return h(t)&&t.length>0}function f(t){return h(t)&&t.every(n)}function p(t){return f(t)&&t.length>0}function m(t){return h(t)&&t.every(r)}function g(t){return h(t)&&t.every(i)}function y(t){return h(t)&&t.every(a)}function b(t){return y(t)&&t.length>0}return t.r(e),t.d(e,{isArray:()=>h,isEmptyArray:()=>l,isFiniteNumber:()=>r,isFiniteNumbersArray:()=>m,isNonEmptyArray:()=>d,isNonEmptyNumbersArray:()=>p,isNonEmptyStringsArray:()=>b,isNonFiniteNumber:()=>i,isNonFiniteNumbersArray:()=>g,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>c,isNullish:()=>u,isNumber:()=>n,isNumbersArray:()=>f,isPositiveFiniteNumber:()=>s,isString:()=>a,isStringsArray:()=>y}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{InvertedStraightBondsHider:()=>Bn,StraightBond:()=>Ln});var t={};n.r(t),n.d(t,{cx:()=>Bt,cy:()=>It,height:()=>Rt,rx:()=>jt,ry:()=>kt,width:()=>Ft,x:()=>Dt,y:()=>Lt});var e={};n.r(e),n.d(e,{from:()=>Xt,to:()=>Gt});var i={};n.r(i),n.d(i,{MorphArray:()=>Kt,height:()=>te,width:()=>Zt,x:()=>Qt,y:()=>Jt});var s={};n.r(s),n.d(s,{array:()=>Ce,clear:()=>Ee,move:()=>Te,plot:()=>Ae,size:()=>je});var o={};n.r(o),n.d(o,{amove:()=>an,ax:()=>sn,ay:()=>on,build:()=>un,center:()=>rn,cx:()=>en,cy:()=>nn,length:()=>Qe,move:()=>tn,plain:()=>Ke,x:()=>Je,y:()=>Ze});var a={};n.r(a),n.d(a,{dmove:()=>pn,dx:()=>mn,dy:()=>gn,height:()=>yn,move:()=>bn,size:()=>vn,width:()=>wn,x:()=>xn,y:()=>Sn});const u={},c=[];function h(t,e){if(Array.isArray(t))for(const n of t)h(n,e);else if("object"!=typeof t)d(Object.getOwnPropertyNames(e)),u[t]=Object.assign(u[t]||{},e);else for(const e in t)h(e,t[e])}function l(t){return u[t]||{}}function d(t){c.push(...t)}function f(t,e){let n;const r=t.length,i=[];for(n=0;n<r;n++)i.push(e(t[n]));return i}function p(t){return t%360*Math.PI/180}function m(t){return t.charAt(0).toUpperCase()+t.slice(1)}function g(t,e,n,r){return null!=e&&null!=n||(r=r||t.bbox(),null==e?e=r.width/r.height*n:null==n&&(n=r.height/r.width*e)),{width:e,height:n}}function y(t,e){const n=t.origin;let r=null!=t.ox?t.ox:null!=t.originX?t.originX:"center",i=null!=t.oy?t.oy:null!=t.originY?t.originY:"center";null!=n&&([r,i]=Array.isArray(n)?n:"object"==typeof n?[n.x,n.y]:[n,n]);const s="string"==typeof r,o="string"==typeof i;if(s||o){const{height:t,width:n,x:a,y:u}=e.bbox();s&&(r=r.includes("left")?a:r.includes("right")?a+n:a+n/2),o&&(i=i.includes("top")?u:i.includes("bottom")?u+t:u+t/2)}return[r,i]}const b=new Set(["desc","metadata","title"]),v=t=>b.has(t.nodeName),w=(t,e,n={})=>{const r={...e};for(const t in r)r[t].valueOf()===n[t]&&delete r[t];Object.keys(r).length?t.node.setAttribute("data-svgjs",JSON.stringify(r)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},x="http://www.w3.org/2000/svg",S="http://www.w3.org/2000/xmlns/",_="http://www.w3.org/1999/xlink",P={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};class M{}const N={},O="___SYMBOL___ROOT___";function C(t,e=x){return P.document.createElementNS(e,t)}function E(t,e=!1){if(t instanceof M)return t;if("object"==typeof t)return j(t);if(null==t)return new N[O];if("string"==typeof t&&"<"!==t.charAt(0))return j(P.document.querySelector(t));const n=e?P.document.createElement("div"):C("svg");return n.innerHTML=t,t=j(n.firstChild),n.removeChild(n.firstChild),t}function T(t,e){return e&&(e instanceof P.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:C(t)}function A(t){if(!t)return null;if(t.instance instanceof M)return t.instance;if("#document-fragment"===t.nodeName)return new N.Fragment(t);let e=m(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":N[e]||(e="Dom"),new N[e](t)}let j=A;function k(t,e=t.name,n=!1){return N[e]=t,n&&(N[O]=t),d(Object.getOwnPropertyNames(t.prototype)),t}let D=1e3;function L(t){return"Svgjs"+m(t)+D++}function B(t){for(let e=t.children.length-1;e>=0;e--)B(t.children[e]);return t.id?(t.id=L(t.nodeName),t):t}function I(t,e){let n,r;for(r=(t=Array.isArray(t)?t:[t]).length-1;r>=0;r--)for(n in e)t[r].prototype[n]=e[n]}function F(t){return function(...e){const n=e[e.length-1];return!n||n.constructor!==Object||n instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(n)}}h("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=E(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=E(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=E(t)).before(this),this},insertAfter:function(t){return(t=E(t)).after(this),this}});const R=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,V=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,q=/rgb\((\d+),(\d+),(\d+)\)/,z=/(#[a-z_][a-z0-9\-_]*)/i,X=/\)\s*,?\s*/,G=/\s/g,Y=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,H=/^rgb\(/,U=/^(\s+)?$/,W=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,$=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,K=/[\s,]+/,Q=/[MLHVCSQTAZ]/i;function J(t){const e=Math.round(t),n=Math.max(0,Math.min(255,e)).toString(16);return 1===n.length?"0"+n:n}function Z(t,e){for(let n=e.length;n--;)if(null==t[e[n]])return!1;return!0}function tt(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}h("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(K)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),h("Dom",{css:function(t,e){const n={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const e=t.split(/\s*:\s*/);n[e[0]]=e[1]})),n;if(arguments.length<2){if(Array.isArray(t)){for(const e of t){const t=e;n[e]=this.node.style.getPropertyValue(t)}return n}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const e in t)this.node.style.setProperty(e,null==t[e]||U.test(t[e])?"":t[e])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||U.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),h("Dom",{data:function(t,e,n){if(null==t)return this.data(f(function(t){let e;const n=t.length,r=[];for(e=0;e<n;e++)0===t[e].nodeName.indexOf("data-")&&r.push(t[e]);return r}(this.node.attributes),(t=>t.nodeName.slice(5))));if(t instanceof Array){const e={};for(const n of t)e[n]=this.data(n);return e}if("object"==typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===n||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),h("Dom",{remember:function(t,e){if("object"==typeof arguments[0])for(const e in t)this.remember(e,t[e]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class et{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof et||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(t="vibrant",e){const{random:n,round:r,sin:i,PI:s}=Math;if("vibrant"===t){const t=24*n()+57,e=38*n()+45,r=360*n();return new et(t,e,r,"lch")}if("sine"===t){const t=r(80*i(2*s*(e=null==e?n():e)/.5+.01)+150),o=r(50*i(2*s*e/.5+4.6)+200),a=r(100*i(2*s*e/.5+2.3)+150);return new et(t,o,a)}if("pastel"===t){const t=8*n()+86,e=17*n()+9,r=360*n();return new et(t,e,r,"lch")}if("dark"===t){const t=10+10*n(),e=50*n()+86,r=360*n();return new et(t,e,r,"lch")}if("rgb"===t){const t=255*n(),e=255*n(),r=255*n();return new et(t,e,r)}if("lab"===t){const t=100*n(),e=256*n()-128,r=256*n()-128;return new et(t,e,r,"lab")}if("grey"===t){const t=255*n();return new et(t,t,t)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(Y.test(t)||H.test(t))}cmyk(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.min(1-r,1-i,1-s);return 1===o?new et(0,0,0,1,"cmyk"):new et((1-r-o)/(1-o),(1-i-o)/(1-o),(1-s-o)/(1-o),o,"cmyk")}hsl(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.max(r,i,s),a=Math.min(r,i,s),u=(o+a)/2,c=o===a,h=o-a;return new et(360*(c?0:o===r?((i-s)/h+(i<s?6:0))/6:o===i?((s-r)/h+2)/6:o===s?((r-i)/h+4)/6:0),100*(c?0:u>.5?h/(2-o-a):h/(o+a)),100*u,"hsl")}init(t=0,e=0,n=0,r=0,i="rgb"){if(t=t||0,this.space)for(const t in this.space)delete this[this.space[t]];if("number"==typeof t)i="string"==typeof r?r:i,r="string"==typeof r?0:r,Object.assign(this,{_a:t,_b:e,_c:n,_d:r,space:i});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const n=function(t,e){const n=Z(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:Z(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:Z(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:Z(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:Z(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:Z(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return n.space=e||n.space,n}(t,e);Object.assign(this,n)}else if("string"==typeof t)if(H.test(t)){const e=t.replace(G,""),[n,r,i]=q.exec(e).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}else{if(!Y.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,n,r,i]=V.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map(e);Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}}const{_a:s,_b:o,_c:a,_d:u}=this,c="rgb"===this.space?{r:s,g:o,b:a}:"xyz"===this.space?{x:s,y:o,z:a}:"hsl"===this.space?{h:s,s:o,l:a}:"lab"===this.space?{l:s,a:o,b:a}:"lch"===this.space?{l:s,c:o,h:a}:"cmyk"===this.space?{c:s,m:o,y:a,k:u}:{};Object.assign(this,c)}lab(){const{x:t,y:e,z:n}=this.xyz();return new et(116*e-16,500*(t-e),200*(e-n),"lab")}lch(){const{l:t,a:e,b:n}=this.lab(),r=Math.sqrt(e**2+n**2);let i=180*Math.atan2(n,e)/Math.PI;return i<0&&(i*=-1,i=360-i),new et(t,r,i,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(t=this.space)||"xyz"===t||"lch"===t){let{x:t,y:e,z:n}=this;if("lab"===this.space||"lch"===this.space){let{l:r,a:i,b:s}=this;if("lch"===this.space){const{c:t,h:e}=this,n=Math.PI/180;i=t*Math.cos(n*e),s=t*Math.sin(n*e)}const o=(r+16)/116,a=i/500+o,u=o-s/200,c=16/116,h=.008856,l=7.787;t=.95047*(a**3>h?a**3:(a-c)/l),e=1*(o**3>h?o**3:(o-c)/l),n=1.08883*(u**3>h?u**3:(u-c)/l)}const r=3.2406*t+-1.5372*e+-.4986*n,i=-.9689*t+1.8758*e+.0415*n,s=.0557*t+-.204*e+1.057*n,o=Math.pow,a=.0031308,u=r>a?1.055*o(r,1/2.4)-.055:12.92*r,c=i>a?1.055*o(i,1/2.4)-.055:12.92*i,h=s>a?1.055*o(s,1/2.4)-.055:12.92*s;return new et(255*u,255*c,255*h)}if("hsl"===this.space){let{h:t,s:e,l:n}=this;if(t/=360,e/=100,n/=100,0===e)return n*=255,new et(n,n,n);const r=n<.5?n*(1+e):n+e-n*e,i=2*n-r,s=255*tt(i,r,t+1/3),o=255*tt(i,r,t),a=255*tt(i,r,t-1/3);return new et(s,o,a)}if("cmyk"===this.space){const{c:t,m:e,y:n,k:r}=this,i=255*(1-Math.min(1,t*(1-r)+r)),s=255*(1-Math.min(1,e*(1-r)+r)),o=255*(1-Math.min(1,n*(1-r)+r));return new et(i,s,o)}return this;var t}toArray(){const{_a:t,_b:e,_c:n,_d:r,space:i}=this;return[t,e,n,r,i]}toHex(){const[t,e,n]=this._clamped().map(J);return`#${t}${e}${n}`}toRgb(){const[t,e,n]=this._clamped();return`rgb(${t},${e},${n})`}toString(){return this.toHex()}xyz(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,a=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,u=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,c=(.4124*o+.3576*a+.1805*u)/.95047,h=(.2126*o+.7152*a+.0722*u)/1,l=(.0193*o+.1192*a+.9505*u)/1.08883,d=c>.008856?Math.pow(c,1/3):7.787*c+16/116,f=h>.008856?Math.pow(h,1/3):7.787*h+16/116,p=l>.008856?Math.pow(l,1/3):7.787*l+16/116;return new et(d,f,p,"xyz")}_clamped(){const{_a:t,_b:e,_c:n}=this.rgb(),{max:r,min:i,round:s}=Math;return[t,e,n].map((t=>r(0,i(s(t),255))))}}class nt{constructor(...t){this.init(...t)}clone(){return new nt(this)}init(t,e){const n=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==n.x?0:n.x,this.y=null==n.y?0:n.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){it.isMatrixLike(t)||(t=new it(t));const{x:e,y:n}=this;return this.x=t.a*e+t.c*n+t.e,this.y=t.b*e+t.d*n+t.f,this}}function rt(t,e,n){return Math.abs(e-t)<(n||1e-6)}class it{constructor(...t){this.init(...t)}static formatTransforms(t){const e="both"===t.flip||!0===t.flip,n=t.flip&&(e||"x"===t.flip)?-1:1,r=t.flip&&(e||"y"===t.flip)?-1:1,i=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,s=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,o=t.scale&&t.scale.length?t.scale[0]*n:isFinite(t.scale)?t.scale*n:isFinite(t.scaleX)?t.scaleX*n:n,a=t.scale&&t.scale.length?t.scale[1]*r:isFinite(t.scale)?t.scale*r:isFinite(t.scaleY)?t.scaleY*r:r,u=t.shear||0,c=t.rotate||t.theta||0,h=new nt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),l=h.x,d=h.y,f=new nt(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=f.x,m=f.y,g=new nt(t.translate||t.tx||t.translateX,t.ty||t.translateY),y=g.x,b=g.y,v=new nt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:o,scaleY:a,skewX:i,skewY:s,shear:u,theta:c,rx:v.x,ry:v.y,tx:y,ty:b,ox:l,oy:d,px:p,py:m}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,e,n){const r=t.a*e.a+t.c*e.b,i=t.b*e.a+t.d*e.b,s=t.a*e.c+t.c*e.d,o=t.b*e.c+t.d*e.d,a=t.e+t.a*e.e+t.c*e.f,u=t.f+t.b*e.e+t.d*e.f;return n.a=r,n.b=i,n.c=s,n.d=o,n.e=a,n.f=u,n}around(t,e,n){return this.clone().aroundO(t,e,n)}aroundO(t,e,n){const r=t||0,i=e||0;return this.translateO(-r,-i).lmultiplyO(n).translateO(r,i)}clone(){return new it(this)}decompose(t=0,e=0){const n=this.a,r=this.b,i=this.c,s=this.d,o=this.e,a=this.f,u=n*s-r*i,c=u>0?1:-1,h=c*Math.sqrt(n*n+r*r),l=Math.atan2(c*r,c*n),d=180/Math.PI*l,f=Math.cos(l),p=Math.sin(l),m=(n*i+r*s)/u,g=i*h/(m*n-r)||s*h/(m*r+n);return{scaleX:h,scaleY:g,shear:m,rotate:d,translateX:o-t+t*f*h+e*(m*f*h-p*g),translateY:a-e+t*p*h+e*(m*p*h+f*g),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;const e=new it(t);return rt(this.a,e.a)&&rt(this.b,e.b)&&rt(this.c,e.c)&&rt(this.d,e.d)&&rt(this.e,e.e)&&rt(this.f,e.f)}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}init(t){const e=it.fromArray([1,0,0,1,0,0]);return t=t instanceof Ot?t.matrixify():"string"==typeof t?it.fromArray(t.split(K).map(parseFloat)):Array.isArray(t)?it.fromArray(t):"object"==typeof t&&it.isMatrixLike(t)?t:"object"==typeof t?(new it).transform(t):6===arguments.length?it.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,e=this.b,n=this.c,r=this.d,i=this.e,s=this.f,o=t*r-e*n;if(!o)throw new Error("Cannot invert "+this);const a=r/o,u=-e/o,c=-n/o,h=t/o,l=-(a*i+c*s),d=-(u*i+h*s);return this.a=a,this.b=u,this.c=c,this.d=h,this.e=l,this.f=d,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const e=t instanceof it?t:new it(t);return it.matrixMultiply(e,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const e=t instanceof it?t:new it(t);return it.matrixMultiply(this,e,this)}rotate(t,e,n){return this.clone().rotateO(t,e,n)}rotateO(t,e=0,n=0){t=p(t);const r=Math.cos(t),i=Math.sin(t),{a:s,b:o,c:a,d:u,e:c,f:h}=this;return this.a=s*r-o*i,this.b=o*r+s*i,this.c=a*r-u*i,this.d=u*r+a*i,this.e=c*r-h*i+n*i-e*r+e,this.f=h*r+c*i-e*i-n*r+n,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t);const{a:i,b:s,c:o,d:a,e:u,f:c}=this;return this.a=i*t,this.b=s*e,this.c=o*t,this.d=a*e,this.e=u*t-n*t+n,this.f=c*e-r*e+r,this}shear(t,e,n){return this.clone().shearO(t,e,n)}shearO(t,e=0,n=0){const{a:r,b:i,c:s,d:o,e:a,f:u}=this;return this.a=r+i*t,this.c=s+o*t,this.e=a+u*t-n*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t),t=p(t),e=p(e);const i=Math.tan(t),s=Math.tan(e),{a:o,b:a,c:u,d:c,e:h,f:l}=this;return this.a=o+a*i,this.b=a+o*s,this.c=u+c*i,this.d=c+u*s,this.e=h+l*i-r*i,this.f=l+h*s-n*s,this}skewX(t,e,n){return this.skew(t,0,e,n)}skewY(t,e,n){return this.skew(0,t,e,n)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(it.isMatrixLike(t))return new it(t).multiplyO(this);const e=it.formatTransforms(t),{x:n,y:r}=new nt(e.ox,e.oy).transform(this),i=(new it).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-n,-r).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(n,r);if(isFinite(e.px)||isFinite(e.py)){const t=new nt(n,r).transform(i),s=isFinite(e.px)?e.px-t.x:0,o=isFinite(e.py)?e.py-t.y:0;i.translateO(s,o)}return i.translateO(e.tx,e.ty),i}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function st(){if(!st.nodes){const t=E().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;st.nodes={svg:t,path:e}}if(!st.nodes.svg.node.parentNode){const t=P.document.body||P.document.documentElement;st.nodes.svg.addTo(t)}return st.nodes}function ot(t){return!(t.width||t.height||t.x||t.y)}k(it,"Matrix");class at{constructor(...t){this.init(...t)}addOffset(){return this.x+=P.window.pageXOffset,this.y+=P.window.pageYOffset,new at(this)}init(t){return t="string"==typeof t?t.split(K).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return ot(this)}merge(t){const e=Math.min(this.x,t.x),n=Math.min(this.y,t.y),r=Math.max(this.x+this.width,t.x+t.width)-e,i=Math.max(this.y+this.height,t.y+t.height)-n;return new at(e,n,r,i)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof it||(t=new it(t));let e=1/0,n=-1/0,r=1/0,i=-1/0;return[new nt(this.x,this.y),new nt(this.x2,this.y),new nt(this.x,this.y2),new nt(this.x2,this.y2)].forEach((function(s){s=s.transform(t),e=Math.min(e,s.x),n=Math.max(n,s.x),r=Math.min(r,s.y),i=Math.max(i,s.y)})),new at(e,r,n-e,i-r)}}function ut(t,e,n){let r;try{if(r=e(t.node),ot(r)&&(i=t.node)!==P.document&&!(P.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===P.document}).call(P.document.documentElement,i))throw new Error("Element not in the dom")}catch(e){r=n(t)}var i;return r}h({viewbox:{viewbox(t,e,n,r){return null==t?new at(this.attr("viewBox")):this.attr("viewBox",new at(t,e,n,r))},zoom(t,e){let{width:n,height:r}=this.attr(["width","height"]);if((n||r)&&"string"!=typeof n&&"string"!=typeof r||(n=this.node.clientWidth,r=this.node.clientHeight),!n||!r)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const i=this.viewbox(),s=n/i.width,o=r/i.height,a=Math.min(s,o);if(null==t)return a;let u=a/t;u===1/0&&(u=Number.MAX_SAFE_INTEGER/100),e=e||new nt(n/2/s+i.x,r/2/o+i.y);const c=new at(i).transform(new it({scale:u,origin:e}));return this.viewbox(c)}}}),k(at,"Box");class ct extends Array{constructor(t=[],...e){if(super(t,...e),"number"==typeof t)return this;this.length=0,this.push(...t)}}const ht=ct;I([ct],{each(t,...e){return"function"==typeof t?this.map(((e,n,r)=>t.call(e,e,n,r))):this.map((n=>n[t](...e)))},toArray(){return Array.prototype.concat.apply([],this)}});const lt=["toArray","constructor","each"];function dt(t,e){return new ht(f((e||P.document).querySelectorAll(t),(function(t){return A(t)})))}ct.extend=function(t){t=t.reduce(((t,e)=>(lt.includes(e)||"_"===e[0]||(e in Array.prototype&&(t["$"+e]=Array.prototype[e]),t[e]=function(...t){return this.each(e,...t)}),t)),{}),I([ct],t)};let ft=0;const pt={};function mt(t){let e=t.getEventHolder();return e===P.window&&(e=pt),e.events||(e.events={}),e.events}function gt(t){return t.getEventTarget()}function yt(t,e,n,r,i){const s=n.bind(r||t),o=E(t),a=mt(o),u=gt(o);e=Array.isArray(e)?e:e.split(K),n._svgjsListenerId||(n._svgjsListenerId=++ft),e.forEach((function(t){const e=t.split(".")[0],r=t.split(".")[1]||"*";a[e]=a[e]||{},a[e][r]=a[e][r]||{},a[e][r][n._svgjsListenerId]=s,u.addEventListener(e,s,i||!1)}))}function bt(t,e,n,r){const i=E(t),s=mt(i),o=gt(i);("function"!=typeof n||(n=n._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(K)).forEach((function(t){const e=t&&t.split(".")[0],a=t&&t.split(".")[1];let u,c;if(n)s[e]&&s[e][a||"*"]&&(o.removeEventListener(e,s[e][a||"*"][n],r||!1),delete s[e][a||"*"][n]);else if(e&&a){if(s[e]&&s[e][a]){for(c in s[e][a])bt(o,[e,a].join("."),c);delete s[e][a]}}else if(a)for(t in s)for(u in s[t])a===u&&bt(o,[t,a].join("."));else if(e){if(s[e]){for(u in s[e])bt(o,[e,u].join("."));delete s[e]}}else{for(t in s)bt(o,t);!function(t){let e=t.getEventHolder();e===P.window&&(e=pt),e.events&&(e.events={})}(i)}}))}class vt extends M{addEventListener(){}dispatch(t,e,n){return function(t,e,n,r){const i=gt(t);return e instanceof P.window.Event||(e=new P.window.CustomEvent(e,{detail:n,cancelable:!0,...r})),i.dispatchEvent(e),e}(this,t,e,n)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const n=e[t.type];for(const e in n)for(const r in n[e])n[e][r](t);return!t.defaultPrevented}fire(t,e,n){return this.dispatch(t,e,n),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e,n){return bt(this,t,e,n),this}on(t,e,n,r){return yt(this,t,e,n,r),this}removeEventListener(){}}function wt(){}k(vt,"EventTarget");const xt={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class St extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(K).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}}class _t{constructor(...t){this.init(...t)}convert(t){return new _t(this.value,t)}divide(t){return t=new _t(t),new _t(this/t,this.unit||t.unit)}init(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(R))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof _t&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new _t(t),new _t(this-t,this.unit||t.unit)}plus(t){return t=new _t(t),new _t(this+t,this.unit||t.unit)}times(t){return t=new _t(t),new _t(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const Pt=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),Mt=[];class Nt extends vt{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return(t=E(t)).removeNamespace&&this.node instanceof P.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t,e){return E(t).put(this,e)}children(){return new ht(f(this.node.children,(function(t){return A(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,e=!0){this.writeDataToDom();let n=this.node.cloneNode(t);return e&&(n=B(n)),new this.constructor(n)}each(t,e){const n=this.children();let r,i;for(r=0,i=n.length;r<i;r++)t.apply(n[r],[r,n]),e&&n[r].each(t,e);return this}element(t,e){return this.put(new Nt(C(t),e))}first(){return A(this.node.firstChild)}get(t){return A(this.node.childNodes[t])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(t){return this.index(t)>=0}html(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=L(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return A(this.node.lastChild)}matches(t){const e=this.node,n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return n&&n.call(e,t)}parent(t){let e=this;if(!e.node.parentNode)return null;if(e=A(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=A(e.node.parentNode));return e}put(t,e){return t=E(t),this.add(t,e),t}putIn(t,e){return E(t).add(this,e)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=E(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e=null){const n=10**t,r=this.attr(e);for(const t in r)"number"==typeof r[t]&&(r[t]=Math.round(r[t]*n)/n);return this.attr(r),this}svg(t,e){return this.xml(t,e,x)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const e=this.parent();if(!e)return this.addTo(t);const n=e.index(this);return e.put(t,n).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();let n=this;if(null!=t){if(n=A(n.node.cloneNode(!0)),e){const e=t(n);if(n=e||n,!1===e)return""}n.each((function(){const e=t(this),n=e||this;!1===e?this.remove():e&&this!==n&&this.replace(n)}),!0)}return e?n.node.outerHTML:n.node.innerHTML}e=null!=e&&e;const r=C("wrapper",n),i=P.document.createDocumentFragment();r.innerHTML=t;for(let t=r.children.length;t--;)i.appendChild(r.firstElementChild);const s=this.parent();return e?this.replace(i)&&s:this.add(i)}}I(Nt,{attr:function(t,e,n){if(null==t){t={},e=this.node.attributes;for(const n of e)t[n.nodeName]=W.test(n.nodeValue)?parseFloat(n.nodeValue):n.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,e)=>(t[e]=this.attr(e),t)),{});if("object"==typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?xt[t]:W.test(e)?parseFloat(e):e;"number"==typeof(e=Mt.reduce(((e,n)=>n(t,e,this)),e))?e=new _t(e):Pt.has(t)&&et.isColor(e)?e=new et(e):e.constructor===Array&&(e=new St(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof n?this.node.setAttributeNS(n,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return dt(t,this.node)},findOne:function(t){return A(this.node.querySelector(t))}}),k(Nt,"Dom");class Ot extends Nt{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new _t(t).plus(this.x()))}dy(t=0){return this.y(new _t(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e="string"==typeof t;e||(t=E(t));const n=new ht;let r=this;for(;(r=r.parent())&&r.node!==P.document&&"#document-fragment"!==r.nodeName&&(n.push(r),e||r.node!==t.node)&&(!e||!r.matches(t));)if(r.node===this.root().node)return null;return n}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(z);return e?E(e[1]):null}root(){const t=this.parent(N[O]);return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const n=g(this,t,e);return this.width(new _t(n.width)).height(new _t(n.height))}width(t){return this.attr("width",t)}writeDataToDom(){return w(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}I(Ot,{bbox:function(){const t=ut(this,(t=>t.getBBox()),(t=>{try{const e=t.clone().addTo(st().svg).show(),n=e.node.getBBox();return e.remove(),n}catch(e){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${e.toString()}`)}}));return new at(t)},rbox:function(t){const e=ut(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),n=new at(e);return t?n.transform(t.screenCTM().inverseO()):n.addOffset()},inside:function(t,e){const n=this.bbox();return t>n.x&&e>n.y&&t<n.x+n.width&&e<n.y+n.height},point:function(t,e){return new nt(t,e).transformO(this.screenCTM().inverseO())},ctm:function(){return new it(this.node.getCTM())},screenCTM:function(){try{if("function"==typeof this.isRoot&&!this.isRoot()){const t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new it(e)}return new it(this.node.getScreenCTM())}catch(t){return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new it}}}),k(Ot,"Element");const Ct={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return"color"===e?t:t+"-"+e}};["fill","stroke"].forEach((function(t){const e={};let n;e[t]=function(e){if(void 0===e)return this.attr(t);if("string"==typeof e||e instanceof et||et.isRgb(e)||e instanceof Ot)this.attr(t,e);else for(n=Ct[t].length-1;n>=0;n--)null!=e[Ct[t][n]]&&this.attr(Ct.prefix(t,Ct[t][n]),e[Ct[t][n]]);return this},h(["Element","Runner"],e)})),h(["Element","Runner"],{matrix:function(t,e,n,r,i,s){return null==t?new it(this):this.attr("transform",new it(t,e,n,r,i,s))},rotate:function(t,e,n){return this.transform({rotate:t,ox:e,oy:n},!0)},skew:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:n},!0):this.transform({skew:[t,e],ox:n,oy:r},!0)},shear:function(t,e,n){return this.transform({shear:t,ox:e,oy:n},!0)},scale:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:n},!0):this.transform({scale:[t,e],ox:n,oy:r},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),h("radius",{radius:function(t,e=t){return"radialGradient"===(this._element||this).type?this.attr("r",new _t(t)):this.rx(t).ry(e)}}),h("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new nt(this.node.getPointAtLength(t))}}),h(["Element","Runner"],{font:function(t,e){if("object"==typeof t){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}}),h("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),h("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(X).slice(0,-1).map((function(t){const e=t.trim().split("(");return[e[0],e[1].split(K).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(it.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new it)},toParent:function(t,e){if(this===t)return this;if(v(this.node))return this.addTo(t,e);const n=this.screenCTM(),r=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(r.multiply(n)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){const e=new it(this).decompose();return null==t?e:e[t]}it.isMatrixLike(t)||(t={...t,origin:y(t,this)});const n=new it(!0===e?this:e||!1).transform(t);return this.attr("transform",n)}});class Et extends Ot{flatten(){return this.each((function(){if(this instanceof Et)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),e=t.index(this)){return e=-1===e?t.children().length:e,this.each((function(n,r){return r[r.length-n-1].toParent(t,e)})),this.remove()}}k(Et,"Container");class Tt extends Et{constructor(t,e=t){super(T("defs",t),e)}flatten(){return this}ungroup(){return this}}k(Tt,"Defs");class At extends Ot{}function jt(t){return this.attr("rx",t)}function kt(t){return this.attr("ry",t)}function Dt(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Lt(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Bt(t){return this.attr("cx",t)}function It(t){return this.attr("cy",t)}function Ft(t){return null==t?2*this.rx():this.rx(new _t(t).divide(2))}function Rt(t){return null==t?2*this.ry():this.ry(new _t(t).divide(2))}k(At,"Shape");class Vt extends At{constructor(t,e=t){super(T("ellipse",t),e)}size(t,e){const n=g(this,t,e);return this.rx(new _t(n.width).divide(2)).ry(new _t(n.height).divide(2))}}I(Vt,t),h("Container",{ellipse:F((function(t=0,e=t){return this.put(new Vt).size(t,e).move(0,0)}))}),k(Vt,"Ellipse");class qt extends Nt{constructor(t=P.document.createDocumentFragment()){super(t)}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){const t=new Nt(C("wrapper",n));return t.add(this.node.cloneNode(!0)),t.xml(!1,n)}return super.xml(t,!1,n)}}k(qt,"Fragment");const zt=qt;function Xt(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new _t(t),fy:new _t(e)}):this.attr({x1:new _t(t),y1:new _t(e)})}function Gt(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new _t(t),cy:new _t(e)}):this.attr({x2:new _t(t),y2:new _t(e)})}class Yt extends Et{constructor(t,e){super(T(t+"Gradient","string"==typeof t?null:t),e)}attr(t,e,n){return"transform"===t&&(t="gradientTransform"),super.attr(t,e,n)}bbox(){return new at}targets(){return dt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}I(Yt,e),h({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:F((function(t,e){return this.put(new Yt(t)).update(e)}))}}),k(Yt,"Gradient");class Ht extends Et{constructor(t,e=t){super(T("pattern",t),e)}attr(t,e,n){return"transform"===t&&(t="patternTransform"),super.attr(t,e,n)}bbox(){return new at}targets(){return dt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}h({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:F((function(t,e,n){return this.put(new Ht).update(n).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),k(Ht,"Pattern");class Ut extends At{constructor(t,e=t){super(T("image",t),e)}load(t,e){if(!t)return this;const n=new P.window.Image;return yt(n,"load",(function(t){const r=this.parent(Ht);0===this.width()&&0===this.height()&&this.size(n.width,n.height),r instanceof Ht&&0===r.width()&&0===r.height()&&r.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),yt(n,"load error",(function(){bt(n)})),this.attr("href",n.src=t,_)}}var Wt;Wt=function(t,e,n){return"fill"!==t&&"stroke"!==t||$.test(e)&&(e=n.root().defs().image(e)),e instanceof Ut&&(e=n.root().defs().pattern(0,0,(t=>{t.add(e)}))),e},Mt.push(Wt),h({Container:{image:F((function(t,e){return this.put(new Ut).size(0,0).load(t,e)}))}}),k(Ut,"Image");class $t extends St{bbox(){let t=-1/0,e=-1/0,n=1/0,r=1/0;return this.forEach((function(i){t=Math.max(i[0],t),e=Math.max(i[1],e),n=Math.min(i[0],n),r=Math.min(i[1],r)})),new at(n,r,t-n,e-r)}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let n=this.length-1;n>=0;n--)this[n]=[this[n][0]+t,this[n][1]+e];return this}parse(t=[0,0]){const e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(K).map(parseFloat)).length%2!=0&&t.pop();for(let n=0,r=t.length;n<r;n+=2)e.push([t[n],t[n+1]]);return e}size(t,e){let n;const r=this.bbox();for(n=this.length-1;n>=0;n--)r.width&&(this[n][0]=(this[n][0]-r.x)*t/r.width+r.x),r.height&&(this[n][1]=(this[n][1]-r.y)*e/r.height+r.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let e=0,n=this.length;e<n;e++)t.push(this[e].join(","));return t.join(" ")}transform(t){return this.clone().transformO(t)}transformO(t){it.isMatrixLike(t)||(t=new it(t));for(let e=this.length;e--;){const[n,r]=this[e];this[e][0]=t.a*n+t.c*r+t.e,this[e][1]=t.b*n+t.d*r+t.f}return this}}const Kt=$t;function Qt(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}function Jt(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}function Zt(t){const e=this.bbox();return null==t?e.width:this.size(t,e.height)}function te(t){const e=this.bbox();return null==t?e.height:this.size(e.width,t)}class ee extends At{constructor(t,e=t){super(T("line",t),e)}array(){return new $t([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(t,e){return this.attr(this.array().move(t,e).toLine())}plot(t,e,n,r){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:n,y2:r}:new $t(t).toLine(),this.attr(t))}size(t,e){const n=g(this,t,e);return this.attr(this.array().size(n.width,n.height).toLine())}}I(ee,i),h({Container:{line:F((function(...t){return ee.prototype.plot.apply(this.put(new ee),null!=t[0]?t:[0,0,0,0])}))}}),k(ee,"Line");class ne extends Et{constructor(t,e=t){super(T("marker",t),e)}height(t){return this.attr("markerHeight",t)}orient(t){return this.attr("orient",t)}ref(t,e){return this.attr("refX",t).attr("refY",e)}toString(){return"url(#"+this.id()+")"}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}width(t){return this.attr("markerWidth",t)}}function re(t,e){return function(n){return null==n?this[t]:(this[t]=n,e&&e.call(this),this)}}h({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:F((function(t,e,n){return this.put(new ne).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(n)}))},marker:{marker(t,e,n,r){let i=["marker"];return"all"!==t&&i.push(t),i=i.join("-"),t=arguments[1]instanceof ne?arguments[1]:this.defs().marker(e,n,r),this.attr(i,t)}}}),k(ne,"Marker");const ie={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,n,r){return function(i){return i<0?t>0?e/t*i:n>0?r/n*i:0:i>1?n<1?(1-r)/(1-n)*i+(r-n)/(1-n):t<1?(1-e)/(1-t)*i+(e-t)/(1-t):1:3*i*(1-i)**2*e+3*i**2*(1-i)*r+i**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let n=t;return"none"===e?--n:"both"===e&&++n,(r,i=!1)=>{let s=Math.floor(r*t);const o=r*s%1==0;return"start"!==e&&"both"!==e||++s,i&&o&&--s,r>=0&&s<0&&(s=0),r<=1&&s>n&&(s=n),s/n}}};class se{done(){return!1}}class oe extends se{constructor(t=">"){super(),this.ease=ie[t]||t}step(t,e,n){return"number"!=typeof t?n<1?t:e:t+(e-t)*this.ease(n)}}class ae extends se{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,n,r){return this.stepper(t,e,n,r)}}function ue(){const t=(this._duration||500)/1e3,e=this._overshoot||0,n=Math.PI,r=Math.log(e/100+1e-10),i=-r/Math.sqrt(n*n+r*r),s=3.9/(i*t);this.d=2*i*s,this.k=s*s}I(class extends ae{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;n>100&&(n=16),n/=1e3;const i=r.velocity||0,s=-this.d*i-this.k*(t-e),o=t+i*n+s*n*n/2;return r.velocity=i+s*n,r.done=Math.abs(e-o)+Math.abs(i)<.002,r.done?e:o}},{duration:re("_duration",ue),overshoot:re("_overshoot",ue)}),I(class extends ae{constructor(t=.1,e=.01,n=0,r=1e3){super(),this.p(t).i(e).d(n).windup(r)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;const i=e-t;let s=(r.integral||0)+i*n;const o=(i-(r.error||0))/n,a=this._windup;return!1!==a&&(s=Math.max(-a,Math.min(s,a))),r.error=i,r.integral=s,r.done=Math.abs(i)<.001,r.done?e:t+(this.P*i+this.I*s+this.D*o)}},{windup:re("_windup"),p:re("P"),i:re("I"),d:re("D")});const ce={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},he={M:function(t,e,n){return e.x=n.x=t[0],e.y=n.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,n){return e.x=n.x,e.y=n.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},le="mlhvqtcsaz".split("");for(let t=0,e=le.length;t<e;++t)he[le[t]]=function(t){return function(e,n,r){if("H"===t)e[0]=e[0]+n.x;else if("V"===t)e[0]=e[0]+n.y;else if("A"===t)e[5]=e[5]+n.x,e[6]=e[6]+n.y;else for(let t=0,r=e.length;t<r;++t)e[t]=e[t]+(t%2?n.y:n.x);return he[t](e,n,r)}}(le[t].toUpperCase());function de(t){return t.segment.length&&t.segment.length-1===ce[t.segment[0].toUpperCase()]}function fe(t,e){t.inNumber&&pe(t,!1);const n=Q.test(e);if(n)t.segment=[e];else{const e=t.lastCommand,n=e.toLowerCase(),r=e===n;t.segment=["m"===n?r?"l":"L":e]}return t.inSegment=!0,t.lastCommand=t.segment[0],n}function pe(t,e){if(!t.inNumber)throw new Error("Parser Error");t.number&&t.segment.push(parseFloat(t.number)),t.inNumber=e,t.number="",t.pointSeen=!1,t.hasExponent=!1,de(t)&&me(t)}function me(t){t.inSegment=!1,t.absolute&&(t.segment=function(t){const e=t.segment[0];return he[e](t.segment.slice(1),t.p,t.p0)}(t)),t.segments.push(t.segment)}function ge(t){if(!t.segment.length)return!1;const e="A"===t.segment[0].toUpperCase(),n=t.segment.length;return e&&(4===n||5===n)}function ye(t){return"E"===t.lastToken.toUpperCase()}const be=new Set([" ",",","\t","\n","\r","\f"]);class ve extends St{bbox(){return st().path.setAttribute("d",this.toString()),new at(st.nodes.path.getBBox())}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let n,r=this.length-1;r>=0;r--)n=this[r][0],"M"===n||"L"===n||"T"===n?(this[r][1]+=t,this[r][2]+=e):"H"===n?this[r][1]+=t:"V"===n?this[r][1]+=e:"C"===n||"S"===n||"Q"===n?(this[r][1]+=t,this[r][2]+=e,this[r][3]+=t,this[r][4]+=e,"C"===n&&(this[r][5]+=t,this[r][6]+=e)):"A"===n&&(this[r][6]+=t,this[r][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,e=!0){let n=0,r="";const i={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new nt,p:new nt};for(;i.lastToken=r,r=t.charAt(n++);)if(i.inSegment||!fe(i,r))if("."!==r)if(isNaN(parseInt(r)))if(be.has(r))i.inNumber&&pe(i,!1);else if("-"!==r&&"+"!==r)if("E"!==r.toUpperCase()){if(Q.test(r)){if(i.inNumber)pe(i,!1);else{if(!de(i))throw new Error("parser Error");me(i)}--n}}else i.number+=r,i.hasExponent=!0;else{if(i.inNumber&&!ye(i)){pe(i,!1),--n;continue}i.number+=r,i.inNumber=!0}else{if("0"===i.number||ge(i)){i.inNumber=!0,i.number=r,pe(i,!0);continue}i.inNumber=!0,i.number+=r}else{if(i.pointSeen||i.hasExponent){pe(i,!1),--n;continue}i.inNumber=!0,i.pointSeen=!0,i.number+=r}return i.inNumber&&pe(i,!1),i.inSegment&&de(i)&&me(i),i.segments}(t)}size(t,e){const n=this.bbox();let r,i;for(n.width=0===n.width?1:n.width,n.height=0===n.height?1:n.height,r=this.length-1;r>=0;r--)i=this[r][0],"M"===i||"L"===i||"T"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y):"H"===i?this[r][1]=(this[r][1]-n.x)*t/n.width+n.x:"V"===i?this[r][1]=(this[r][1]-n.y)*e/n.height+n.y:"C"===i||"S"===i||"Q"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y,this[r][3]=(this[r][3]-n.x)*t/n.width+n.x,this[r][4]=(this[r][4]-n.y)*e/n.height+n.y,"C"===i&&(this[r][5]=(this[r][5]-n.x)*t/n.width+n.x,this[r][6]=(this[r][6]-n.y)*e/n.height+n.y)):"A"===i&&(this[r][1]=this[r][1]*t/n.width,this[r][2]=this[r][2]*e/n.height,this[r][6]=(this[r][6]-n.x)*t/n.width+n.x,this[r][7]=(this[r][7]-n.y)*e/n.height+n.y);return this}toString(){return function(t){let e="";for(let n=0,r=t.length;n<r;n++)e+=t[n][0],null!=t[n][1]&&(e+=t[n][1],null!=t[n][2]&&(e+=" ",e+=t[n][2],null!=t[n][3]&&(e+=" ",e+=t[n][3],e+=" ",e+=t[n][4],null!=t[n][5]&&(e+=" ",e+=t[n][5],e+=" ",e+=t[n][6],null!=t[n][7]&&(e+=" ",e+=t[n][7])))));return e+" "}(this)}}const we=t=>{const e=typeof t;return"number"===e?_t:"string"===e?et.isColor(t)?et:K.test(t)?Q.test(t)?ve:St:R.test(t)?_t:Se:Ne.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?St:"object"===e?Me:Se};class xe{constructor(t){this._stepper=t||new oe("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(we(t));let e=new this._type(t);return this._type===et&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===Me&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}class Se{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}}class _e{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,_e.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}_e.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const Pe=(t,e)=>t[0]<e[0]?-1:t[0]>e[0]?1:0;class Me{constructor(...t){this.init(...t)}align(t){const e=this.values;for(let n=0,r=e.length;n<r;++n){if(e[n+1]===t[n+1]){if(e[n+1]===et&&t[n+7]!==e[n+7]){const e=t[n+7],r=new et(this.values.splice(n+3,5))[e]().toArray();this.values.splice(n+3,0,...r)}n+=e[n+2]+2;continue}if(!t[n+1])return this;const r=(new t[n+1]).toArray(),i=e[n+2]+3;e.splice(n,i,t[n],t[n+1],t[n+2],...r),n+=e[n+2]+2}return this}init(t){if(this.values=[],Array.isArray(t))return void(this.values=t.slice());t=t||{};const e=[];for(const n in t){const r=we(t[n]),i=new r(t[n]).toArray();e.push([n,r,i.length,...i])}return e.sort(Pe),this.values=e.reduce(((t,e)=>t.concat(e)),[]),this}toArray(){return this.values}valueOf(){const t={},e=this.values;for(;e.length;){const n=e.shift(),r=e.shift(),i=e.shift(),s=e.splice(0,i);t[n]=new r(s)}return t}}const Ne=[Se,_e,Me];class Oe extends At{constructor(t,e=t){super(T("path",t),e)}array(){return this._array||(this._array=new ve(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,e){return this.attr("d",this.array().move(t,e))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new ve(t))}size(t,e){const n=g(this,t,e);return this.attr("d",this.array().size(n.width,n.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}function Ce(){return this._array||(this._array=new $t(this.attr("points")))}function Ee(){return delete this._array,this}function Te(t,e){return this.attr("points",this.array().move(t,e))}function Ae(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new $t(t))}function je(t,e){const n=g(this,t,e);return this.attr("points",this.array().size(n.width,n.height))}Oe.prototype.MorphArray=ve,h({Container:{path:F((function(t){return this.put(new Oe).plot(t||new ve)}))}}),k(Oe,"Path");class ke extends At{constructor(t,e=t){super(T("polygon",t),e)}}h({Container:{polygon:F((function(t){return this.put(new ke).plot(t||new $t)}))}}),I(ke,i),I(ke,s),k(ke,"Polygon");class De extends At{constructor(t,e=t){super(T("polyline",t),e)}}h({Container:{polyline:F((function(t){return this.put(new De).plot(t||new $t)}))}}),I(De,i),I(De,s),k(De,"Polyline");class Le extends At{constructor(t,e=t){super(T("rect",t),e)}}I(Le,{rx:jt,ry:kt}),h({Container:{rect:F((function(t,e){return this.put(new Le).size(t,e)}))}}),k(Le,"Rect");class Be{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const e=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}const Ie={nextDraw:null,frames:new Be,timeouts:new Be,immediates:new Be,timer:()=>P.window.performance||P.window.Date,transforms:[],frame(t){const e=Ie.frames.push({run:t});return null===Ie.nextDraw&&(Ie.nextDraw=P.window.requestAnimationFrame(Ie._draw)),e},timeout(t,e){e=e||0;const n=Ie.timer().now()+e,r=Ie.timeouts.push({run:t,time:n});return null===Ie.nextDraw&&(Ie.nextDraw=P.window.requestAnimationFrame(Ie._draw)),r},immediate(t){const e=Ie.immediates.push(t);return null===Ie.nextDraw&&(Ie.nextDraw=P.window.requestAnimationFrame(Ie._draw)),e},cancelFrame(t){null!=t&&Ie.frames.remove(t)},clearTimeout(t){null!=t&&Ie.timeouts.remove(t)},cancelImmediate(t){null!=t&&Ie.immediates.remove(t)},_draw(t){let e=null;const n=Ie.timeouts.last();for(;(e=Ie.timeouts.shift())&&(t>=e.time?e.run():Ie.timeouts.push(e),e!==n););let r=null;const i=Ie.frames.last();for(;r!==i&&(r=Ie.frames.shift());)r.run(t);let s=null;for(;s=Ie.immediates.shift();)s();Ie.nextDraw=Ie.timeouts.first()||Ie.frames.first()?P.window.requestAnimationFrame(Ie._draw):null}},Fe=Ie,Re=function(t){const e=t.start,n=t.runner.duration();return{start:e,duration:n,end:e+n,runner:t.runner}},Ve=function(){const t=P.window;return(t.performance||t.Date).now()};class qe extends vt{constructor(t=Ve){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const e=this.speed();if(null==t)return this.speed(-e);const n=Math.abs(e);return this.speed(t?-n:n)}schedule(t,e,n){if(null==t)return this._runners.map(Re);let r=0;const i=this.getEndTime();if(e=e||0,null==n||"last"===n||"after"===n)r=i;else if("absolute"===n||"start"===n)r=e,e=0;else if("now"===n)r=this._time;else if("relative"===n){const n=this.getRunnerInfoById(t.id);n&&(r=n.start+e,e=0)}else{if("with-last"!==n)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();r=t?t.start:this._time}}t.unschedule(),t.timeline(this);const s=t.persist(),o={persist:null===s?this._persist:s,start:r+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(o),this._runners.sort(((t,e)=>t.start-e.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return Fe.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=Fe.frame(this._step)),this)}_stepFn(t=!1){const e=this._timeSource();let n=e-this._lastSourceTime;t&&(n=0);const r=this._speed*n+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=r,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let t=this._runners.length;t--;){const e=this._runners[t],n=e.runner;this._time-e.start<=0&&n.reset()}let i=!1;for(let t=0,e=this._runners.length;t<e;t++){const n=this._runners[t],s=n.runner;let o=r;const a=this._time-n.start;a<=0?i=!0:(a<o&&(o=a),s.active()&&(s.step(o).done?!0!==n.persist&&s.duration()-s.time()+this._time+n.persist<this._time&&(s.unschedule(),--t,--e):i=!0))}return i&&!(this._speed<0&&0===this._time)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}h({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new qe,this._timeline):(this._timeline=t,this)}}});class ze extends vt{constructor(t){super(),this.id=ze.id++,t="function"==typeof(t=null==t?400:t)?new ae(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof ae,this._stepper=this._isDeclarative?t:new oe,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new it,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,e,n){let r=1,i=!1,s=0;return e=e??0,n=n||"last","object"!=typeof(t=t??400)||t instanceof se||(e=t.delay??e,n=t.when??n,i=t.swing||i,r=t.times??r,s=t.wait??s,t=t.duration??400),{duration:t,delay:e,swing:i,times:r,wait:s,when:n}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(t,e,n){const r=ze.sanitise(t,e,n),i=new ze(r.duration);return this._timeline&&i.timeline(this._timeline),this._element&&i.element(this._element),i.loop(r).schedule(r.delay,r.when)}clearTransform(){return this.transforms=new it,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new oe(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,e,n){return"object"==typeof t&&(e=t.swing,n=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=n||0,!0===this._times&&(this._times=1/0),this}loops(t){const e=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/e),n=(this._time-t*e)/this._duration;return Math.min(t+n,this._times)}const n=t%1,r=e*Math.floor(t)+this._duration*n;return this.time(r)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,n=this._duration,r=this._wait,i=this._times,s=this._swing,o=this._reverse;let a;if(null==t){const t=function(t){const e=s*Math.floor(t%(2*(r+n))/(r+n)),i=e&&!o||!e&&o,a=Math.pow(-1,i)*(t%(r+n))/n+i;return Math.max(Math.min(a,1),0)},u=i*(r+n)-r;return a=e<=0?Math.round(t(1e-5)):e<u?t(e):Math.round(t(u-1e-5)),a}const u=Math.floor(this.loops()),c=s&&u%2==0;return a=u+(c&&!o||o&&c?t:1-t),this.loops(a)}progress(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}queue(t,e,n,r){return this._queue.push({initialiser:t||wt,runner:e||wt,retarget:n,isTransform:r,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted||(this.time(0),this._reseted=!0),this}reverse(t){return this._reverse=null==t?!this._reverse:t,this}schedule(t,e,n){if(t instanceof qe||(n=e,e=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,e,n),this}step(t){if(!this.enabled)return this;t=null==t?16:t,this._time+=t;const e=this.position(),n=this._lastPosition!==e&&this._time>=0;this._lastPosition=e;const r=this.duration(),i=this._lastTime<=0&&this._time>0,s=this._lastTime<r&&this._time>=r;this._lastTime=this._time,i&&this.fire("start",this);const o=this._isDeclarative;this.done=!o&&!s&&this._time>=r,this._reseted=!1;let a=!1;return(n||o)&&(this._initialise(n),this.transforms=new it,a=this._run(o?t:e),this.fire("step",this)),this.done=this.done||a&&o,s&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const e=t-this._time;return this.step(e),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let e=0,n=this._queue.length;e<n;++e){const n=this._queue[e],r=this._isDeclarative||!n.initialised&&t;t=!n.finished,r&&t&&(n.initialiser.call(this),n.initialised=!0)}}_rememberMorpher(t,e){if(this._history[t]={morpher:e,caller:this._queue[this._queue.length-1]},this._isDeclarative){const t=this.timeline();t&&t.play()}}_run(t){let e=!0;for(let n=0,r=this._queue.length;n<r;++n){const r=this._queue[n],i=r.runner.call(this,t);r.finished=r.finished||!0===i,e=e&&r.finished}return e}_tryRetarget(t,e,n){if(this._history[t]){if(!this._history[t].caller.initialised){const e=this._queue.indexOf(this._history[t].caller);return this._queue.splice(e,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget.call(this,e,n):this._history[t].morpher.to(e),this._history[t].caller.finished=!1;const r=this.timeline();return r&&r.play(),!0}return!1}}ze.id=0;class Xe{constructor(t=new it,e=-1,n=!0){this.transforms=t,this.id=e,this.done=n}clearTransformsFromQueue(){}}I([ze,Xe],{mergeWith(t){return new Xe(t.transforms.lmultiply(this.transforms),t.id)}});const Ge=(t,e)=>t.lmultiplyO(e),Ye=t=>t.transforms;function He(){const t=this._transformationRunners.runners.map(Ye).reduce(Ge,new it);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class Ue{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new Xe).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,e){const n=this.ids.indexOf(t+1);return this.ids.splice(n,1,t+1),this.runners.splice(n,1,e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let e=0;e<this.runners.length;++e){const n=this.runners[e];if(!(t&&n.done&&t.done)||n._timeline&&n._timeline._runnerIds.includes(n.id)||t._timeline&&t._timeline._runnerIds.includes(t.id))t=n;else{this.remove(n.id);const r=n.mergeWith(t);this.edit(t.id,r),t=r,--e}}return this}remove(t){const e=this.ids.indexOf(t+1);return this.ids.splice(e,1),this.runners.splice(e,1),this}}h({Element:{animate(t,e,n){const r=ze.sanitise(t,e,n),i=this.timeline();return new ze(r.duration).loop(r).element(this).timeline(i.play()).schedule(r.delay,r.when)},delay(t,e){return this.animate(0,t,e)},_clearTransformRunnersBefore(t){this._transformationRunners.clearBefore(t.id)},_currentTransform(t){return this._transformationRunners.runners.filter((e=>e.id<=t.id)).map(Ye).reduce(Ge,new it)},_addRunner(t){this._transformationRunners.add(t),Fe.cancelImmediate(this._frameId),this._frameId=Fe.immediate(He.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new Ue).add(new Xe(new it(this))))}}}),I(ze,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,n){if("string"==typeof e)return this.styleAttr(t,{[e]:n});let r=e;if(this._tryRetarget(t,r))return this;let i=new xe(this._stepper).to(r),s=Object.keys(r);return this.queue((function(){i=i.from(this.element()[t](s))}),(function(e){return this.element()[t](i.at(e).valueOf()),i.done()}),(function(e){const n=Object.keys(e),o=(a=s,n.filter((t=>!a.includes(t))));var a;if(o.length){const e=this.element()[t](o),n=new Me(i.from()).valueOf();Object.assign(n,e),i.from(n)}const u=new Me(i.to()).valueOf();Object.assign(u,e),i.to(u),s=n,r=e})),this._rememberMorpher(t,i),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let n=new xe(this._stepper).to(new _t(t));return this.queue((function(){n=n.from(this.element().zoom())}),(function(t){return this.element().zoom(n.at(t),e),n.done()}),(function(t,r){e=r,n.to(t)})),this._rememberMorpher("zoom",n),this},transform(t,e,n){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const r=it.isMatrixLike(t);n=null!=t.affine?t.affine:null!=n?n:!r;const i=new xe(this._stepper).type(n?_e:it);let s,o,a,u,c;return this.queue((function(){o=o||this.element(),s=s||y(t,o),c=new it(e?void 0:o),o._addRunner(this),e||o._clearTransformRunnersBefore(this)}),(function(h){e||this.clearTransform();const{x:l,y:d}=new nt(s).transform(o._currentTransform(this));let f=new it({...t,origin:[l,d]}),p=this._isDeclarative&&a?a:c;if(n){f=f.decompose(l,d),p=p.decompose(l,d);const t=f.rotate,e=p.rotate,n=[t-360,t,t+360],r=n.map((t=>Math.abs(t-e))),i=Math.min(...r),s=r.indexOf(i);f.rotate=n[s]}e&&(r||(f.rotate=t.rotate||0),this._isDeclarative&&u&&(p.rotate=u)),i.from(p),i.to(f);const m=i.at(h);return u=m.rotate,a=new it(m),this.addTransform(a),o._addRunner(this),i.done()}),(function(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(s=y(e,o)),t={...e,origin:s}}),!0),this._isDeclarative&&this._rememberMorpher("transform",i),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new _t(e),this._tryRetarget(t,e))return this;const n=new xe(this._stepper).to(e);let r=null;return this.queue((function(){r=this.element()[t](),n.from(r),n.to(r+e)}),(function(e){return this.element()[t](n.at(e)),n.done()}),(function(t){n.to(r+new _t(t))})),this._rememberMorpher(t,n),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const n=new xe(this._stepper).to(e);return this.queue((function(){n.from(this.element()[t]())}),(function(e){return this.element()[t](n.at(e)),n.done()})),this._rememberMorpher(t,n),this},_queueNumber(t,e){return this._queueObject(t,new _t(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let n;return t&&e||(n=this._element.bbox()),t||(t=n.width/n.height*e),e||(e=n.height/n.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,n,r){if(4===arguments.length)return this.plot([t,e,n,r]);if(this._tryRetarget("plot",t))return this;const i=new xe(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){i.from(this._element.array())}),(function(t){return this._element.plot(i.at(t)),i.done()})),this._rememberMorpher("plot",i),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,n,r){return this._queueObject("viewbox",new at(t,e,n,r))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),I(ze,{rx:jt,ry:kt,from:Xt,to:Gt}),k(ze,"Runner");class We extends Et{constructor(t,e=t){super(T("svg",t),e),this.namespace()}defs(){return this.isRoot()?A(this.node.querySelector("defs"))||this.put(new Tt):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof P.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:x,version:"1.1"}).attr("xmlns:xlink",_,S):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,S).attr("xmlns:svgjs",null,S)}root(){return this.isRoot()?this:super.root()}}h({Container:{nested:F((function(){return this.put(new We)}))}}),k(We,"Svg",!0);class $e extends Et{constructor(t,e=t){super(T("symbol",t),e)}}function Ke(t){return!1===this._build&&this.clear(),this.node.appendChild(P.document.createTextNode(t)),this}function Qe(){return this.node.getComputedTextLength()}function Je(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)}function Ze(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}function tn(t,e,n=this.bbox()){return this.x(t,n).y(e,n)}function en(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)}function nn(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)}function rn(t,e,n=this.bbox()){return this.cx(t,n).cy(e,n)}function sn(t){return this.attr("x",t)}function on(t){return this.attr("y",t)}function an(t,e){return this.ax(t).ay(e)}function un(t){return this._build=!!t,this}h({Container:{symbol:F((function(){return this.put(new $e)}))}}),k($e,"Symbol");class cn extends At{constructor(t,e=t){super(T("text",t),e),this.dom.leading=this.dom.leading??new _t(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new _t(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let e=0;const n=this.dom.leading;this.each((function(r){if(v(this.node))return;const i=P.window.getComputedStyle(this.node).getPropertyValue("font-size"),s=n*new _t(i);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?e+=s:(this.attr("dy",r?s+e:0),e=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new _t(t.leading||1.3),this}writeDataToDom(){return w(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const e=this.node.childNodes;let n=0;t="";for(let r=0,i=e.length;r<i;++r)"textPath"===e[r].nodeName||v(e[r])?0===r&&(n=r+1):(r!==n&&3!==e[r].nodeType&&!0===A(e[r]).dom.newLined&&(t+="\n"),t+=e[r].textContent);return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else for(let e=0,n=(t=(t+"").split("\n")).length;e<n;e++)this.newLine(t[e]);return this.build(!1).rebuild()}}I(cn,o),h({Container:{text:F((function(t=""){return this.put(new cn).text(t)})),plain:F((function(t=""){return this.put(new cn).plain(t)}))}}),k(cn,"Text");class hn extends At{constructor(t,e=t){super(T("tspan",t),e),this._build=!1}dx(t){return this.attr("dx",t)}dy(t){return this.attr("dy",t)}newLine(){this.dom.newLined=!0;const t=this.parent();if(!(t instanceof cn))return this;const e=t.index(this),n=P.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=t.dom.leading*new _t(n);return this.dy(e?r:0).attr("x",t.x())}text(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?(this.clear().build(!0),t.call(this,this),this.build(!1)):this.plain(t),this)}}I(hn,o),h({Tspan:{tspan:F((function(t=""){const e=new hn;return this._build||this.clear(),this.put(e).text(t)}))},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),k(hn,"Tspan");class ln extends At{constructor(t,e=t){super(T("circle",t),e)}radius(t){return this.attr("r",t)}rx(t){return this.attr("r",t)}ry(t){return this.rx(t)}size(t){return this.radius(new _t(t).divide(2))}}I(ln,{x:Dt,y:Lt,cx:Bt,cy:It,width:Ft,height:Rt}),h({Container:{circle:F((function(t=0){return this.put(new ln).size(t).move(0,0)}))}}),k(ln,"Circle");class dn extends Et{constructor(t,e=t){super(T("clipPath",t),e)}remove(){return this.targets().forEach((function(t){t.unclip()})),super.remove()}targets(){return dt("svg [clip-path*="+this.id()+"]")}}h({Container:{clip:F((function(){return this.defs().put(new dn)}))},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const e=t instanceof dn?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}}),k(dn,"ClipPath");class fn extends Ot{constructor(t,e=t){super(T("foreignObject",t),e)}}function pn(t,e){return this.children().forEach((n=>{let r;try{r=n.node instanceof P.window.SVGSVGElement?new at(n.attr(["x","y","width","height"])):n.bbox()}catch(t){return}const i=new it(n),s=i.translate(t,e).transform(i.inverse()),o=new nt(r.x,r.y).transform(s);n.move(o.x,o.y)})),this}function mn(t){return this.dmove(t,0)}function gn(t){return this.dmove(0,t)}function yn(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)}function bn(t=0,e=0,n=this.bbox()){const r=t-n.x,i=e-n.y;return this.dmove(r,i)}function vn(t,e,n=this.bbox()){const r=g(this,t,e,n),i=r.width/n.width,s=r.height/n.height;return this.children().forEach((t=>{const e=new nt(n).transform(new it(t).inverse());t.scale(i,s,e.x,e.y)})),this}function wn(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)}function xn(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)}function Sn(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}h({Container:{foreignObject:F((function(t,e){return this.put(new fn).size(t,e)}))}}),k(fn,"ForeignObject");class _n extends Et{constructor(t,e=t){super(T("g",t),e)}}I(_n,a),h({Container:{group:F((function(){return this.put(new _n)}))}}),k(_n,"G");class Pn extends Et{constructor(t,e=t){super(T("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,_)}}I(Pn,a),h({Container:{link:F((function(t){return this.put(new Pn).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const n=e.index(t);return e.add(this,n),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new Pn,this.wrap(e)),"function"==typeof t?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),k(Pn,"A");class Mn extends Et{constructor(t,e=t){super(T("mask",t),e)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return dt("svg [mask*="+this.id()+"]")}}h({Container:{mask:F((function(){return this.defs().put(new Mn)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof Mn?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),k(Mn,"Mask");class Nn extends Ot{constructor(t,e=t){super(T("stop",t),e)}update(t){return("number"==typeof t||t instanceof _t)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new _t(t.offset)),this}}h({Gradient:{stop:function(t,e,n){return this.put(new Nn).update(t,e,n)}}}),k(Nn,"Stop");class On extends Ot{constructor(t,e=t){super(T("style",t),e)}addText(t=""){return this.node.textContent+=t,this}font(t,e,n={}){return this.rule("@font-face",{fontFamily:t,src:e,...n})}rule(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;let n=t+"{";for(const t in e)n+=t.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))+":"+e[t]+";";return n+="}",n}(t,e))}}h("Dom",{style(t,e){return this.put(new On).rule(t,e)},fontface(t,e,n){return this.put(new On).font(t,e,n)}}),k(On,"Style");class Cn extends cn{constructor(t,e=t){super(T("textPath",t),e)}array(){const t=this.track();return t?t.array():null}plot(t){const e=this.track();let n=null;return e&&(n=e.plot(t)),null==t?n:this}track(){return this.reference("href")}}h({Container:{textPath:F((function(t,e){return t instanceof cn||(t=this.text(t)),t.path(e)}))},Text:{path:F((function(t,e=!0){const n=new Cn;let r;if(t instanceof Oe||(t=this.defs().path(t)),n.attr("href","#"+t,_),e)for(;r=this.node.firstChild;)n.node.appendChild(r);return this.put(n)})),textPath(){return this.findOne("textPath")}},Path:{text:F((function(t){return t instanceof cn||(t=(new cn).addTo(this.parent()).text(t)),t.path(this)})),targets(){return dt("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),Cn.prototype.MorphArray=ve,k(Cn,"TextPath");class En extends At{constructor(t,e=t){super(T("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,_)}}h({Container:{use:F((function(t,e){return this.put(new En).use(t,e)}))}}),k(En,"Use"),I([We,$e,Ut,Ht,ne],l("viewbox")),I([ee,De,ke,Oe],l("marker")),I(cn,l("Text")),I(Oe,l("Path")),I(Tt,l("Defs")),I([cn,hn],l("Tspan")),I([Le,Vt,Yt,ze],l("radius")),I(vt,l("EventTarget")),I(Nt,l("Dom")),I(Ot,l("Element")),I(At,l("Shape")),I([Et,zt],l("Container")),I(Yt,l("Gradient")),I(ze,l("Runner")),ht.extend([...new Set(c)]),function(t=[]){Ne.push(...[].concat(t))}([_t,et,at,it,St,$t,ve,nt]),I(Ne,{to(t){return(new xe).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,n,r,i){return this.fromArray(t.map((function(t,s){return r.step(t,e[s],n,i[s],i)})))}});var Tn=n(726),An=n(725),jn=n(854);const kn=["basePadding1","basePadding2"],Dn={basePadding1:"setBasePadding1",basePadding2:"setBasePadding2"};class Ln{static between(t,e){let n=(new ee).node,r=new Ln(n,t,e);return r.assignUUID(),r.set(Ln.defaultValues),r.reposition(),r}constructor(t,e,n){this.line=t,this.base1=e,this.base2=n,this.cachedBasePadding1=(0,An.distance)(this.point1,this.base1.centerPoint),this.cachedBasePadding2=(0,An.distance)(this.point2,this.base2.centerPoint),e.centerPoint.addEventListener("move",(()=>this.reposition())),n.centerPoint.addEventListener("move",(()=>this.reposition()))}get basePair(){return[this.base1,this.base2]}get domNode(){return this.line}getAttribute(t){return this.domNode.getAttribute(t)}setAttribute(t,e){this.domNode.setAttribute(t,e)}setAttributes(t){if((0,jn.isNonNullObject)(t))try{new ee(this.domNode).attr(t)}catch(t){}}get id(){return this.domNode.id}assignUUID(){(0,Tn.assignUUID)(this.domNode)}appendTo(t){t.appendChild(this.domNode)}remove(){this.domNode.remove()}isIn(t){return t.contains(this.domNode)&&t!==this.domNode}hasParent(){return!!this.domNode.parentNode}getTotalLength(){return this.domNode.getTotalLength()}getPointAtLength(t){return this.domNode.getPointAtLength(t)}get point1(){return{x:this.domNode.x1.baseVal.value,y:this.domNode.y1.baseVal.value}}get point2(){return{x:this.domNode.x2.baseVal.value,y:this.domNode.y2.baseVal.value}}get basePadding1(){return this.cachedBasePadding1}set basePadding1(t){this.cachedBasePadding1=t,this.reposition()}setBasePadding1(t){(0,jn.isFiniteNumber)(t)&&(this.basePadding1=Math.max(0,t))}get basePadding2(){return this.cachedBasePadding2}set basePadding2(t){this.cachedBasePadding2=t,this.reposition()}setBasePadding2(t){(0,jn.isFiniteNumber)(t)&&(this.basePadding2=Math.max(0,t))}isInverted(){return this.basePadding1+this.basePadding2>(0,An.distance)(this.base1.centerPoint,this.base2.centerPoint)}set(t){try{this.setAttributes(t.attributes)}catch(t){}kn.forEach((e=>{try{this[Dn[e]](t[e])}catch(t){}}))}reposition(){let t=this.base1.centerPoint,e=this.base2.centerPoint,n=(0,An.direction)(t,e);this.setAttribute("x1",`${t.x+this.basePadding1*Math.cos(n)}`),this.setAttribute("y1",`${t.y+this.basePadding1*Math.sin(n)}`),this.setAttribute("x2",""+(e.x-this.basePadding2*Math.cos(n))),this.setAttribute("y2",""+(e.y-this.basePadding2*Math.sin(n)))}serialized(){let t=this.id;if(!t)throw new Error("Straight bond ID is falsy.");let e=this.base1.id;if(!e)throw new Error("Base 1 ID is falsy.");let n=this.base2.id;if(!n)throw new Error("Base 2 ID is falsy.");return{id:t,baseID1:e,baseID2:n,basePadding1:this.basePadding1,basePadding2:this.basePadding2}}static deserialized(t,e){var n,r,i;if(!(0,jn.isNonNullObject)(t))throw new Error("Saved straight bond must be an object.");let s=null!==(n=t.id)&&void 0!==n?n:t.lineId;if(!s)throw new Error("Straight bond ID is missing.");let o=e.domNode.querySelector("#"+s);if(!o)throw new Error("Unable to find straight bond DOM node.");if(!(o instanceof SVGLineElement))throw new Error("Straight bond DOM node must be an SVG line element.");let a=null!==(r=t.baseID1)&&void 0!==r?r:t.baseId1,u=null!==(i=t.baseID2)&&void 0!==i?i:t.baseId2;if(!a)throw new Error("Missing base 1 ID.");if(!u)throw new Error("Missing base 2 ID.");let c=[...e.bases].find((t=>t.id===a)),h=[...e.bases].find((t=>t.id===u));if(!c)throw new Error("Unable to find base 1.");if(!h)throw new Error("Unable to find base 2.");let l=new Ln(o,c,h);return(0,jn.isNumber)(t.basePadding1)&&(l.basePadding1=t.basePadding1),(0,jn.isNumber)(t.basePadding2)&&(l.basePadding2=t.basePadding2),l}}Ln.defaultValues={attributes:{stroke:"#000000","stroke-width":"2"},basePadding1:6,basePadding2:6};class Bn{constructor(t,e){this.targetStraightBonds=t,new MutationObserver((t=>{let e=new Set([...this.targetStraightBonds].map((t=>t.domNode)));!t.some((t=>e.has(t.target)))||this.updateOpacities()})).observe(e,{attributes:!0,attributeFilter:["x1","y1","x2","y2"],subtree:!0})}updateOpacities(){[...this.targetStraightBonds].forEach((t=>{let e=t.isInverted()?"0":"1";t.setAttribute("opacity",e)}))}}})(),r})(),t.exports=e()},742:function(t){var e;e=()=>(()=>{var t={645:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,flipAway:()=>v,isBetween:()=>h,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,normalizeAngle:()=>b,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}function b(t,e){void 0===e&&(e=-Math.PI);var n=t-e;return e+((n%=2*Math.PI)>=0?n:n+2*Math.PI)}function v(t,e){var n=(e=b(e,t))-t;return(n<Math.PI/2||n>3*Math.PI/2)&&(t+=Math.PI),t}return e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Box:()=>e});var t=n(986);class e{static bounding(n){let r=n.map((t=>e.matching(t))),i=(0,t.min)(r.map((t=>t.left))),s=(0,t.min)(r.map((t=>t.top))),o=(0,t.max)(r.map((t=>t.right)))-i,a=(0,t.max)(r.map((t=>t.bottom)))-s;return new e(i,s,o,a)}static matching(t){let{x:n,y:r,width:i,height:s}=t;return new e(n,r,i,s)}constructor(t,e,n,r){this.x=t,this.y=e,this.width=n,this.height=r}get centerX(){return this.minX+this.width/2}get centerY(){return this.minY+this.height/2}get minX(){return this.x}get minY(){return this.y}get maxX(){return this.minX+this.width}get maxY(){return this.minY+this.height}get top(){return this.minY}get right(){return this.maxX}get bottom(){return this.maxY}get left(){return this.minX}isBoundedBy(t){let n=e.matching(t);return this.minX>=n.minX&&this.minY>=n.minY&&this.maxX<=n.maxX&&this.maxY<=n.maxY}padded(t,n){return"number"!=typeof n&&(n=t),new e(this.x-t,this.y-n,this.width+2*t,this.height+2*n)}peripheralPoint(t){let e=this.width/2,n=this.height/2,r=Math.pow(Math.pow(e,2)+Math.pow(n,2),.5),i=this.centerX+r*Math.cos(t),s=this.centerY+r*Math.sin(t),o=r;return Math.abs(this.centerX-i)>e&&(o=Math.abs(e/Math.cos(t)),o=Number.isFinite(o)?o:n),Math.abs(this.centerY-s)>n&&(o=Math.abs(n/Math.sin(t)),o=Number.isFinite(o)?o:e),{x:this.centerX+o*Math.cos(t),y:this.centerY+o*Math.sin(t)}}}})(),r})(),t.exports=e()},731:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{CenterPoint:()=>c});var n,r,i,s,o,a=function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n},u=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class c{constructor(t){n.add(this),r.set(this,void 0),i.set(this,{move:[]}),s.set(this,void 0),a(this,r,t,"f"),a(this,s,new MutationObserver((()=>u(this,n,"m",o).call(this,"move"))),"f"),u(this,s,"f").observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0})}get x(){let t=u(this,r,"f").getBBox();return t.x+t.width/2}set x(t){let e=this.x,n=[...u(this,r,"f").x.baseVal].map((t=>t.value));0!=n.length||n.push(0),n=n.map((n=>n+(t-e))),u(this,r,"f").setAttribute("x",n.join(", "))}get y(){let t=u(this,r,"f").getBBox();return t.y+t.height/2}set y(t){let e=this.y,n=[...u(this,r,"f").y.baseVal].map((t=>t.value));0!=n.length||n.push(0),n=n.map((n=>n+(t-e))),u(this,r,"f").setAttribute("y",n.join(", "))}addEventListener(t,e){u(this,i,"f")[t].push(e)}removeEventListener(t,e){u(this,i,"f")[t]=u(this,i,"f")[t].filter((t=>t!==e))}}return r=new WeakMap,i=new WeakMap,s=new WeakMap,n=new WeakSet,o=function(t){u(this,i,"f")[t].forEach((t=>t()))},e})(),t.exports=e()},726:function(t){var e;e=()=>(()=>{var t={854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function c(t){return"object"==typeof t&&null!==t}function h(t){return Array.isArray(t)}function l(t){return h(t)&&0==t.length}function d(t){return h(t)&&t.length>0}function f(t){return h(t)&&t.every(n)}function p(t){return f(t)&&t.length>0}function m(t){return h(t)&&t.every(r)}function g(t){return h(t)&&t.every(i)}function y(t){return h(t)&&t.every(a)}function b(t){return y(t)&&t.length>0}return t.r(e),t.d(e,{isArray:()=>h,isEmptyArray:()=>l,isFiniteNumber:()=>r,isFiniteNumbersArray:()=>m,isNonEmptyArray:()=>d,isNonEmptyNumbersArray:()=>p,isNonEmptyStringsArray:()=>b,isNonFiniteNumber:()=>i,isNonFiniteNumbersArray:()=>g,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>c,isNullish:()=>u,isNumber:()=>n,isNumbersArray:()=>f,isPositiveFiniteNumber:()=>s,isString:()=>a,isStringsArray:()=>y}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";function t(t,e){for(let[n,r]of Object.entries(e))t.setAttribute(n,r)}n.r(r),n.d(r,{CoordinateSystem:()=>l,HorizontalClientScaling:()=>f,InnerXML:()=>v,OuterXML:()=>S,Scaling:()=>d,VerticalClientScaling:()=>p,assignUUID:()=>h,bringToFront:()=>m,isSVGGraphicsElement:()=>_,isSVGGraphicsElementsArray:()=>M,sendToBack:()=>g,setAttributes:()=>t});const e={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};var i,s=new Uint8Array(16);function o(){if(!i&&!(i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(s)}for(var a=[],u=0;u<256;++u)a.push((u+256).toString(16).slice(1));const c=function(t,n,r){if(e.randomUUID&&!n&&!t)return e.randomUUID();var i=(t=t||{}).random||(t.rng||o)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,n){r=r||0;for(var s=0;s<16;++s)n[r+s]=i[s];return n}return function(t,e=0){return(a[t[e+0]]+a[t[e+1]]+a[t[e+2]]+a[t[e+3]]+"-"+a[t[e+4]]+a[t[e+5]]+"-"+a[t[e+6]]+a[t[e+7]]+"-"+a[t[e+8]]+a[t[e+9]]+"-"+a[t[e+10]]+a[t[e+11]]+a[t[e+12]]+a[t[e+13]]+a[t[e+14]]+a[t[e+15]]).toLowerCase()}(i)};function h(t){t.id="uuid-"+c()}class l{constructor(t){this.targetSVGDoc=t}get width(){return this.targetSVGDoc.viewBox.baseVal.width}get height(){return this.targetSVGDoc.viewBox.baseVal.height}get minX(){return this.targetSVGDoc.viewBox.baseVal.x}get maxX(){return this.minX+this.width}get minY(){return this.targetSVGDoc.viewBox.baseVal.y}get maxY(){return this.minY+this.height}get horizontalScaling(){return this.targetSVGDoc.width.baseVal.value/this.width}get verticalScaling(){return this.targetSVGDoc.height.baseVal.value/this.height}setScaling(t){this.targetSVGDoc.setAttribute("width",""+t*this.width),this.targetSVGDoc.setAttribute("height",""+t*this.height)}get clientWidth(){return this.targetSVGDoc.getBoundingClientRect().width}get clientHeight(){return this.targetSVGDoc.getBoundingClientRect().height}get horizontalClientScaling(){return this.clientWidth/this.width}get verticalClientScaling(){return this.clientHeight/this.height}get minClientX(){return this.targetSVGDoc.getBoundingClientRect().x}get minClientY(){return this.targetSVGDoc.getBoundingClientRect().y}fromClientX(t){return this.minX+(t-this.minClientX)/this.horizontalClientScaling}fromClientY(t){return this.minY+(t-this.minClientY)/this.verticalClientScaling}fromClientCoordinates(t,e){return[this.fromClientX(t),this.fromClientY(e)]}fromClientPoint(t){return{x:this.fromClientX(t.x),y:this.fromClientY(t.y)}}toClientX(t){return this.minClientX+this.horizontalClientScaling*(t-this.minX)}toClientY(t){return this.minClientY+this.verticalClientScaling*(t-this.minY)}toClientCoordinates(t,e){return[this.toClientX(t),this.toClientY(e)]}toClientPoint(t){return{x:this.toClientX(t.x),y:this.toClientY(t.y)}}}class d{constructor(t){this.targetSVGDoc=t}set(t){let e=this.targetSVGDoc.viewBox.baseVal;this.targetSVGDoc.setAttribute("width",t*e.width+"px"),this.targetSVGDoc.setAttribute("height",t*e.height+"px")}}class f{constructor(t){this.targetSVGDoc=t}get(){let t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.width/e.width}}class p{constructor(t){this.targetSVGDoc=t}get(){let t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.height/e.height}}function m(t){let e=t.parentNode;e&&e.appendChild(t)}function g(t){let e=t.parentNode;e&&e.prepend(t)}var y,b=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class v{constructor(t){y.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,y,t)}toString(){return b(this,y,"f").innerHTML}set(t){b(this,y,"f").innerHTML=t}}y=new WeakMap;var w,x=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class S{constructor(t){w.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,w,t)}toString(){return x(this,w,"f").outerHTML}set(t){let e=document.createElementNS("http://www.w3.org/2000/svg","svg");if(e.style.height="0px",document.body.append(e),e.innerHTML=t,!e.firstElementChild)throw new Error("Outer XML must encode an SVG element.");if(e.childNodes.length>1)throw new Error("Outer XML cannot encode multiple DOM nodes.");if(e.firstElementChild.tagName.toLowerCase()!=x(this,w,"f").tagName.toLowerCase())throw new Error("Outer XML must specify an SVG element with the same tag name as the target SVG element.");[...x(this,w,"f").attributes].forEach((t=>x(this,w,"f").removeAttribute(t.name))),[...e.firstElementChild.attributes].forEach((t=>x(this,w,"f").setAttribute(t.name,t.value))),x(this,w,"f").innerHTML=e.firstElementChild.innerHTML,e.remove()}}function _(t){return t instanceof SVGGraphicsElement}w=new WeakMap;var P=n(854);function M(t){return(0,P.isArray)(t)&&t.every(_)}})(),r})(),t.exports=e()},725:function(t){t.exports=(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>d,average:()=>r,degrees:()=>m,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,radians:()=>g,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>f,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>p,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return Math.abs(t-e)<=n}function f(t){i(t),t.reverse()}function p(t){var e=o(t);return e.reverse(),e}function m(t){return t*(180/Math.PI)}function g(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function c(t){return"object"==typeof t&&null!==t}function h(t){return Array.isArray(t)}return t.r(e),t.d(e,{isArray:()=>h,isFiniteNumber:()=>r,isNonFiniteNumber:()=>i,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>c,isNullish:()=>u,isNumber:()=>n,isPositiveFiniteNumber:()=>s,isString:()=>a}),e})()},30:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.pow(Math.pow(t.x,2)+Math.pow(t.y,2),.5)}function r(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>r,magnitude:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{areWithin:()=>a,centroid:()=>f,deepCopy:()=>s,direction:()=>l,displaced:()=>c,displacement:()=>u,distance:()=>o,isFinitePoint:()=>i,isPoint:()=>e,midpoint:()=>p});var t=n(854);function e(e){return(0,t.isNonNullObject)(e)&&(0,t.isNumber)(e.x)&&(0,t.isNumber)(e.y)}function i(n){return e(n)&&(0,t.isFiniteNumber)(n.x)&&(0,t.isFiniteNumber)(n.y)}function s(t){return{x:t.x,y:t.y}}function o(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.pow(Math.pow(n,2)+Math.pow(r,2),.5)}function a(t,e,n){return o(t,e)<=n}function u(t,e){return{x:e.x-t.x,y:e.y-t.y}}function c(t,e){return{x:t.x+e.x,y:t.y+e.y}}var h=n(30);function l(t,e){return(0,h.direction)(u(t,e))}var d=n(986);function f(t){return{x:(0,d.mean)(t.map((function(t){return t.x}))),y:(0,d.mean)(t.map((function(t){return t.y})))}}function p(t,e){return f([t,e])}})(),r})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function c(t){return"object"==typeof t&&null!==t}function h(t){return Array.isArray(t)}function l(t){return h(t)&&0==t.length}function d(t){return h(t)&&t.length>0}function f(t){return h(t)&&t.every(n)}function p(t){return f(t)&&t.length>0}function m(t){return h(t)&&t.every(r)}function g(t){return h(t)&&t.every(i)}function y(t){return h(t)&&t.every(a)}function b(t){return y(t)&&t.length>0}return t.r(e),t.d(e,{isArray:()=>h,isEmptyArray:()=>l,isFiniteNumber:()=>r,isFiniteNumbersArray:()=>m,isNonEmptyArray:()=>d,isNonEmptyNumbersArray:()=>p,isNonEmptyStringsArray:()=>b,isNonFiniteNumber:()=>i,isNonFiniteNumbersArray:()=>g,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>c,isNullish:()=>u,isNumber:()=>n,isNumbersArray:()=>f,isPositiveFiniteNumber:()=>s,isString:()=>a,isStringsArray:()=>y}),e})()},277:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{Vector:()=>n});class n{static matching(t){return new n(t.x,t.y)}constructor(t,e){this.x=t,this.y=e}[Symbol.iterator](){return[this.x,this.y].values()}get magnitude(){return Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2))}set magnitude(t){let e=this.direction;this.x=t*Math.cos(e),this.y=t*Math.sin(e)}get direction(){return Math.atan2(this.y,this.x)}set direction(t){let e=this.magnitude;this.x=e*Math.cos(t),this.y=e*Math.sin(t)}}return e})(),t.exports=e()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{BaseNumbering:()=>l,BaseNumberingLine:()=>v});var t,e,i,s=n(726),o=n(731),a=n(277),u=n(725),c=n(854),h=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class l{static numbering(t,e){let n=document.createElementNS("http://www.w3.org/2000/svg","text");(0,s.assignUUID)(n),n.textContent=`${e}`;let r=new l(n,t);return r.setAttributes(l.defaultValues.attributes),r.displacement.magnitude=0,r}constructor(n,r){t.add(this),this.domNode=n,this.owner=r,e.set(this,void 0),this.centerPoint=new o.CenterPoint(n),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,e,a.Vector.matching((0,u.displacement)(r.centerPoint,this.centerPoint))),r.centerPoint.addEventListener("move",(()=>h(this,t,"m",i).call(this)))}get id(){return this.domNode.id}get textContent(){return this.domNode.textContent}hasAttribute(t){return this.domNode.hasAttribute(t)}getAttribute(t){return this.domNode.getAttribute(t)}setAttribute(t,e){this.domNode.setAttribute(t,e)}setAttributes(t){Object.entries(t).forEach((([t,e])=>this.setAttribute(t,e)))}removeAttribute(t){this.domNode.removeAttribute(t)}get displacement(){const n=()=>h(this,e,"f").x,r=n=>{h(this,e,"f").x=n,h(this,t,"m",i).call(this)},s=()=>h(this,e,"f").y,o=n=>{h(this,e,"f").y=n,h(this,t,"m",i).call(this)},a=()=>h(this,e,"f").magnitude,u=n=>{h(this,e,"f").magnitude=n,h(this,t,"m",i).call(this)},c=()=>h(this,e,"f").direction,l=n=>{h(this,e,"f").direction=n,h(this,t,"m",i).call(this)};return{get x(){return n()},set x(t){r(t)},get y(){return s()},set y(t){o(t)},get magnitude(){return a()},set magnitude(t){u(t)},get direction(){return c()},set direction(t){l(t)}}}serialized(){return{id:this.id,ownerID:this.owner.id,displacement:{x:this.displacement.x,y:this.displacement.y}}}static deserialized(t,e){if(!(0,c.isNonNullObject)(t))throw new Error("Saved base numbering must be a non-null object.");if(!t.id)throw new Error("Missing base numbering ID.");if(!(0,c.isString)(t.id))throw new Error("Base numbering ID must be a string.");let n=e.domNode.querySelector("#"+t.id);if(!n)throw new Error("Base numbering DOM node not found.");if(!(n instanceof SVGTextElement))throw new Error("Base numbering DOM node must be an SVG text element.");if(!t.ownerID)throw new Error("Missing base numbering owner ID.");if(!(0,c.isString)(t.ownerID))throw new Error("Base numbering owner ID must be a string.");let r=e.bases.find((e=>e.id===t.ownerID));if(!r)throw new Error("Unable to find base numbering owner.");let i=new l(n,r);return(0,u.isPoint)(t.displacement)&&(i.displacement.x=t.displacement.x,i.displacement.y=t.displacement.y),i}}e=new WeakMap,t=new WeakSet,i=function(){this.centerPoint.x=this.owner.centerPoint.x+h(this,e,"f").x,this.centerPoint.y=this.owner.centerPoint.y+h(this,e,"f").y},l.defaultValues={attributes:{"font-family":"Arial","font-size":"8","font-weight":"400",fill:"#808080"}};var d,f,p,m,g=n(645),y=function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n},b=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class v{static connecting(t){let e=document.createElementNS("http://www.w3.org/2000/svg","line");(0,s.assignUUID)(e),e.setAttribute("x1",`${t.owner.centerPoint.x}`),e.setAttribute("y1",`${t.owner.centerPoint.y}`),e.setAttribute("x2",`${t.centerPoint.x}`),e.setAttribute("y2",`${t.centerPoint.y}`);let n=new v(e,t);return n.set(v.defaultValues),n}static unpadded(t){let e=v.connecting(t);return e.basePadding=0,e.numberingPadding=0,e}constructor(t,e){d.add(this),this.domNode=t,this.owner=e,f.set(this,void 0),p.set(this,void 0),y(this,f,(0,u.distance)(e.owner.centerPoint,this.point1),"f");let n=g.Box.matching(e.domNode.getBBox());y(this,p,(0,u.distance)(this.point2,n.peripheralPoint(e.displacement.direction+Math.PI)),"f"),e.centerPoint.addEventListener("move",(()=>b(this,d,"m",m).call(this))),e.owner.centerPoint.addEventListener("move",(()=>b(this,d,"m",m).call(this)))}get id(){return this.domNode.id}hasAttribute(t){return this.domNode.hasAttribute(t)}getAttribute(t){return this.domNode.getAttribute(t)}setAttribute(t,e){this.domNode.setAttribute(t,e)}setAttributes(t){Object.entries(t).forEach((([t,e])=>this.setAttribute(t,e)))}removeAttribute(t){this.domNode.removeAttribute(t)}get x1(){return this.domNode.x1.baseVal.value}get y1(){return this.domNode.y1.baseVal.value}get point1(){return{x:this.x1,y:this.y1}}get x2(){return this.domNode.x2.baseVal.value}get y2(){return this.domNode.y2.baseVal.value}get point2(){return{x:this.x2,y:this.y2}}get length(){return(0,u.distance)(this.point1,this.point2)}set length(t){let e=g.Box.matching(this.owner.domNode.getBBox());this.owner.displacement.magnitude=this.basePadding+t+this.numberingPadding+(0,u.distance)(this.owner.centerPoint,e.peripheralPoint(this.owner.displacement.direction+Math.PI))}get direction(){return(0,u.direction)(this.point1,this.point2)}set direction(t){let e=this.length;this.owner.displacement.direction=t,this.length=e}get basePadding(){return b(this,f,"f")}set basePadding(t){y(this,f,t,"f"),b(this,d,"m",m).call(this)}get numberingPadding(){return b(this,p,"f")}set numberingPadding(t){y(this,p,t,"f"),b(this,d,"m",m).call(this)}set(t){!t.attributes||this.setAttributes(t.attributes),!(0,c.isNumber)(t.basePadding)||(this.basePadding=t.basePadding),!(0,c.isNumber)(t.numberingPadding)||(this.numberingPadding=t.numberingPadding)}serialized(){return{id:this.id,ownerID:this.owner.id,basePadding:this.basePadding,numberingPadding:this.numberingPadding}}static deserialized(t,e){if(!(0,c.isNonNullObject)(t))throw new Error("Saved base numbering line must be a non-null object.");if(!t.id)throw new Error("Missing base numbering line ID.");if(!(0,c.isString)(t.id))throw new Error("Base numbering line ID must be a string.");let n=e.domNode.querySelector("#"+t.id);if(!n)throw new Error("Base numbering line DOM node not found.");if(!(n instanceof SVGLineElement))throw new Error("Base numbering line DOM node must be an SVG line element.");if(!t.ownerID)throw new Error("Missing base numbering line owner ID.");if(!(0,c.isString)(t.ownerID))throw new Error("Base numbering line owner ID must be a string.");let r=e.baseNumberings.find((e=>e.id===t.ownerID));if(!r)throw new Error("Base numbering line owner not found.");let i=new v(n,r);return(0,c.isNumber)(t.basePadding)&&(i.basePadding=t.basePadding),(0,c.isNumber)(t.numberingPadding)&&(i.numberingPadding=t.numberingPadding),i}}f=new WeakMap,p=new WeakMap,d=new WeakSet,m=function(){let t=this.owner.displacement.direction;this.domNode.setAttribute("x1",`${this.owner.owner.centerPoint.x+b(this,f,"f")*Math.cos(t)}`),this.domNode.setAttribute("y1",`${this.owner.owner.centerPoint.y+b(this,f,"f")*Math.sin(t)}`);let e=g.Box.matching(this.owner.domNode.getBBox()).peripheralPoint(t+Math.PI);this.domNode.setAttribute("x2",`${e.x+b(this,p,"f")*Math.cos(t+Math.PI)}`),this.domNode.setAttribute("y2",`${e.y+b(this,p,"f")*Math.sin(t+Math.PI)}`)},v.defaultValues={attributes:{stroke:"#808080","stroke-width":"1","stroke-opacity":"1"},basePadding:7,numberingPadding:2}})(),r})(),t.exports=e()},775:function(t){var e;e=()=>(()=>{var t={726:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t,e){for(let[n,r]of Object.entries(e))t.setAttribute(n,r)}t.r(e),t.d(e,{CoordinateSystem:()=>l,HorizontalClientScaling:()=>f,InnerXML:()=>v,OuterXML:()=>S,Scaling:()=>d,VerticalClientScaling:()=>p,assignUUID:()=>h,bringToFront:()=>m,sendToBack:()=>g,setAttributes:()=>n});const r={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};var i,s=new Uint8Array(16);function o(){if(!i&&!(i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(s)}for(var a=[],u=0;u<256;++u)a.push((u+256).toString(16).slice(1));const c=function(t,e,n){if(r.randomUUID&&!e&&!t)return r.randomUUID();var i=(t=t||{}).random||(t.rng||o)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){n=n||0;for(var s=0;s<16;++s)e[n+s]=i[s];return e}return function(t,e=0){return(a[t[e+0]]+a[t[e+1]]+a[t[e+2]]+a[t[e+3]]+"-"+a[t[e+4]]+a[t[e+5]]+"-"+a[t[e+6]]+a[t[e+7]]+"-"+a[t[e+8]]+a[t[e+9]]+"-"+a[t[e+10]]+a[t[e+11]]+a[t[e+12]]+a[t[e+13]]+a[t[e+14]]+a[t[e+15]]).toLowerCase()}(i)};function h(t){t.id="uuid-"+c()}class l{constructor(t){this.targetSVGDoc=t}get width(){return this.targetSVGDoc.viewBox.baseVal.width}get height(){return this.targetSVGDoc.viewBox.baseVal.height}get minX(){return this.targetSVGDoc.viewBox.baseVal.x}get maxX(){return this.minX+this.width}get minY(){return this.targetSVGDoc.viewBox.baseVal.y}get maxY(){return this.minY+this.height}get horizontalScaling(){return this.targetSVGDoc.width.baseVal.value/this.width}get verticalScaling(){return this.targetSVGDoc.height.baseVal.value/this.height}setScaling(t){this.targetSVGDoc.setAttribute("width",""+t*this.width),this.targetSVGDoc.setAttribute("height",""+t*this.height)}get clientWidth(){return this.targetSVGDoc.getBoundingClientRect().width}get clientHeight(){return this.targetSVGDoc.getBoundingClientRect().height}get horizontalClientScaling(){return this.clientWidth/this.width}get verticalClientScaling(){return this.clientHeight/this.height}get minClientX(){return this.targetSVGDoc.getBoundingClientRect().x}get minClientY(){return this.targetSVGDoc.getBoundingClientRect().y}fromClientX(t){return this.minX+(t-this.minClientX)/this.horizontalClientScaling}fromClientY(t){return this.minY+(t-this.minClientY)/this.verticalClientScaling}fromClientCoordinates(t,e){return[this.fromClientX(t),this.fromClientY(e)]}fromClientPoint(t){return{x:this.fromClientX(t.x),y:this.fromClientY(t.y)}}toClientX(t){return this.minClientX+this.horizontalClientScaling*(t-this.minX)}toClientY(t){return this.minClientY+this.verticalClientScaling*(t-this.minY)}toClientCoordinates(t,e){return[this.toClientX(t),this.toClientY(e)]}toClientPoint(t){return{x:this.toClientX(t.x),y:this.toClientY(t.y)}}}class d{constructor(t){this.targetSVGDoc=t}set(t){let e=this.targetSVGDoc.viewBox.baseVal;this.targetSVGDoc.setAttribute("width",t*e.width+"px"),this.targetSVGDoc.setAttribute("height",t*e.height+"px")}}class f{constructor(t){this.targetSVGDoc=t}get(){let t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.width/e.width}}class p{constructor(t){this.targetSVGDoc=t}get(){let t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.height/e.height}}function m(t){let e=t.parentNode;e&&e.appendChild(t)}function g(t){let e=t.parentNode;e&&e.prepend(t)}var y,b=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class v{constructor(t){y.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,y,t)}toString(){return b(this,y,"f").innerHTML}set(t){b(this,y,"f").innerHTML=t}}y=new WeakMap;var w,x=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class S{constructor(t){w.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,w,t)}toString(){return x(this,w,"f").outerHTML}set(t){let e=document.createElementNS("http://www.w3.org/2000/svg","svg");if(e.style.height="0px",document.body.append(e),e.innerHTML=t,!e.firstElementChild)throw new Error("Outer XML must encode an SVG element.");if(e.childNodes.length>1)throw new Error("Outer XML cannot encode multiple DOM nodes.");if(e.firstElementChild.tagName.toLowerCase()!=x(this,w,"f").tagName.toLowerCase())throw new Error("Outer XML must specify an SVG element with the same tag name as the target SVG element.");[...x(this,w,"f").attributes].forEach((t=>x(this,w,"f").removeAttribute(t.name))),[...e.firstElementChild.attributes].forEach((t=>x(this,w,"f").setAttribute(t.name,t.value))),x(this,w,"f").innerHTML=e.firstElementChild.innerHTML,e.remove()}}return w=new WeakMap,e})(),t.exports=e()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function c(t){return"object"==typeof t&&null!==t}function h(t){return Array.isArray(t)}function l(t){return h(t)&&0==t.length}function d(t){return h(t)&&t.length>0}function f(t){return h(t)&&t.every(n)}function p(t){return f(t)&&t.length>0}function m(t){return h(t)&&t.every(r)}function g(t){return h(t)&&t.every(i)}function y(t){return h(t)&&t.every(a)}function b(t){return y(t)&&t.length>0}return t.r(e),t.d(e,{isArray:()=>h,isEmptyArray:()=>l,isFiniteNumber:()=>r,isFiniteNumbersArray:()=>m,isNonEmptyArray:()=>d,isNonEmptyNumbersArray:()=>p,isNonEmptyStringsArray:()=>b,isNonFiniteNumber:()=>i,isNonFiniteNumbersArray:()=>g,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>c,isNullish:()=>u,isNumber:()=>n,isNumbersArray:()=>f,isPositiveFiniteNumber:()=>s,isString:()=>a,isStringsArray:()=>y}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{BaseOutline:()=>i});var t=n(726),e=n(854);class i{static outlining(e){let n=document.createElementNS("http://www.w3.org/2000/svg","circle");(0,t.assignUUID)(n),n.setAttribute("cx",`${e.centerPoint.x}`),n.setAttribute("cy",`${e.centerPoint.y}`);let r=new i(n,e);return r.set(i.defaultValues.circle),r}static deserialized(t,n){var r;if(!(0,e.isNonNullObject)(t))throw new Error("Saved base outline must be an object.");let s=null!==(r=t.id)&&void 0!==r?r:t.circleId;if(!s)throw new Error("Base outline ID is missing.");if(!(0,e.isString)(s))throw new Error("Base outline ID must be a string.");let o=n.domNode.querySelector("#"+s);if(!o)throw new Error("Unable to find base outline DOM node.");if(!(o instanceof SVGCircleElement))throw new Error("Base outline DOM node must be an SVG circle element.");let a=t.ownerID;if(!a)throw new Error("Missing base outline owner ID.");if(!(0,e.isString)(a))throw new Error("Base outline owner ID must be a string.");let u=[...n.bases].find((t=>t.id===a));if(!u)throw new Error("Unable to find base outline owner.");return new i(o,u)}constructor(t,e){this.domNode=t,this.owner=e,e.centerPoint.addEventListener("move",(()=>{t.setAttribute("cx",`${e.centerPoint.x}`),t.setAttribute("cy",`${e.centerPoint.y}`)}))}serialized(){let t=this.id;if(!t)throw new Error("Base outline ID is falsy.");let e=this.owner.id;if(!e)throw new Error("Base outline owner ID is falsy.");return{id:t,ownerID:e}}get id(){return this.domNode.id}getAttribute(t){return this.domNode.getAttribute(t)}setAttribute(t,e){this.domNode.setAttribute(t,e)}setAttributes(e){(0,t.setAttributes)(this.domNode,e)}set(t){t.attributes&&this.setAttributes(t.attributes)}}i.defaultValues={circle:{attributes:{r:"5.5",stroke:"#000000","stroke-width":"0","stroke-opacity":"1",fill:"#00ffff","fill-opacity":"1"}}}})(),r})(),t.exports=e()},358:function(t){var e;e=()=>(()=>{var t={731:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{CenterPoint:()=>c});var n,r,i,s,o,a=function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n},u=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class c{constructor(t){n.add(this),r.set(this,void 0),i.set(this,{move:[]}),s.set(this,void 0),a(this,r,t,"f"),a(this,s,new MutationObserver((()=>u(this,n,"m",o).call(this,"move"))),"f"),u(this,s,"f").observe(t,{attributes:!0,childList:!0,characterData:!0,subtree:!0})}get x(){let t=u(this,r,"f").getBBox();return t.x+t.width/2}set x(t){let e=this.x,n=[...u(this,r,"f").x.baseVal].map((t=>t.value));0!=n.length||n.push(0),n=n.map((n=>n+(t-e))),u(this,r,"f").setAttribute("x",n.join(", "))}get y(){let t=u(this,r,"f").getBBox();return t.y+t.height/2}set y(t){let e=this.y,n=[...u(this,r,"f").y.baseVal].map((t=>t.value));0!=n.length||n.push(0),n=n.map((n=>n+(t-e))),u(this,r,"f").setAttribute("y",n.join(", "))}addEventListener(t,e){u(this,i,"f")[t].push(e)}removeEventListener(t,e){u(this,i,"f")[t]=u(this,i,"f")[t].filter((t=>t!==e))}}return r=new WeakMap,i=new WeakMap,s=new WeakMap,n=new WeakSet,o=function(t){u(this,i,"f")[t].forEach((t=>t()))},e})(),t.exports=e()},726:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t,e){for(let[n,r]of Object.entries(e))t.setAttribute(n,r)}t.r(e),t.d(e,{CoordinateSystem:()=>l,HorizontalClientScaling:()=>f,InnerXML:()=>v,OuterXML:()=>S,Scaling:()=>d,VerticalClientScaling:()=>p,assignUUID:()=>h,bringToFront:()=>m,sendToBack:()=>g,setAttributes:()=>n});const r={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};var i,s=new Uint8Array(16);function o(){if(!i&&!(i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(s)}for(var a=[],u=0;u<256;++u)a.push((u+256).toString(16).slice(1));const c=function(t,e,n){if(r.randomUUID&&!e&&!t)return r.randomUUID();var i=(t=t||{}).random||(t.rng||o)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){n=n||0;for(var s=0;s<16;++s)e[n+s]=i[s];return e}return function(t,e=0){return(a[t[e+0]]+a[t[e+1]]+a[t[e+2]]+a[t[e+3]]+"-"+a[t[e+4]]+a[t[e+5]]+"-"+a[t[e+6]]+a[t[e+7]]+"-"+a[t[e+8]]+a[t[e+9]]+"-"+a[t[e+10]]+a[t[e+11]]+a[t[e+12]]+a[t[e+13]]+a[t[e+14]]+a[t[e+15]]).toLowerCase()}(i)};function h(t){t.id="uuid-"+c()}class l{constructor(t){this.targetSVGDoc=t}get width(){return this.targetSVGDoc.viewBox.baseVal.width}get height(){return this.targetSVGDoc.viewBox.baseVal.height}get minX(){return this.targetSVGDoc.viewBox.baseVal.x}get maxX(){return this.minX+this.width}get minY(){return this.targetSVGDoc.viewBox.baseVal.y}get maxY(){return this.minY+this.height}get horizontalScaling(){return this.targetSVGDoc.width.baseVal.value/this.width}get verticalScaling(){return this.targetSVGDoc.height.baseVal.value/this.height}setScaling(t){this.targetSVGDoc.setAttribute("width",""+t*this.width),this.targetSVGDoc.setAttribute("height",""+t*this.height)}get clientWidth(){return this.targetSVGDoc.getBoundingClientRect().width}get clientHeight(){return this.targetSVGDoc.getBoundingClientRect().height}get horizontalClientScaling(){return this.clientWidth/this.width}get verticalClientScaling(){return this.clientHeight/this.height}get minClientX(){return this.targetSVGDoc.getBoundingClientRect().x}get minClientY(){return this.targetSVGDoc.getBoundingClientRect().y}fromClientX(t){return this.minX+(t-this.minClientX)/this.horizontalClientScaling}fromClientY(t){return this.minY+(t-this.minClientY)/this.verticalClientScaling}fromClientCoordinates(t,e){return[this.fromClientX(t),this.fromClientY(e)]}fromClientPoint(t){return{x:this.fromClientX(t.x),y:this.fromClientY(t.y)}}toClientX(t){return this.minClientX+this.horizontalClientScaling*(t-this.minX)}toClientY(t){return this.minClientY+this.verticalClientScaling*(t-this.minY)}toClientCoordinates(t,e){return[this.toClientX(t),this.toClientY(e)]}toClientPoint(t){return{x:this.toClientX(t.x),y:this.toClientY(t.y)}}}class d{constructor(t){this.targetSVGDoc=t}set(t){let e=this.targetSVGDoc.viewBox.baseVal;this.targetSVGDoc.setAttribute("width",t*e.width+"px"),this.targetSVGDoc.setAttribute("height",t*e.height+"px")}}class f{constructor(t){this.targetSVGDoc=t}get(){let t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.width/e.width}}class p{constructor(t){this.targetSVGDoc=t}get(){let t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.height/e.height}}function m(t){let e=t.parentNode;e&&e.appendChild(t)}function g(t){let e=t.parentNode;e&&e.prepend(t)}var y,b=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class v{constructor(t){y.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,y,t)}toString(){return b(this,y,"f").innerHTML}set(t){b(this,y,"f").innerHTML=t}}y=new WeakMap;var w,x=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class S{constructor(t){w.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,w,t)}toString(){return x(this,w,"f").outerHTML}set(t){let e=document.createElementNS("http://www.w3.org/2000/svg","svg");if(e.style.height="0px",document.body.append(e),e.innerHTML=t,!e.firstElementChild)throw new Error("Outer XML must encode an SVG element.");if(e.childNodes.length>1)throw new Error("Outer XML cannot encode multiple DOM nodes.");if(e.firstElementChild.tagName.toLowerCase()!=x(this,w,"f").tagName.toLowerCase())throw new Error("Outer XML must specify an SVG element with the same tag name as the target SVG element.");[...x(this,w,"f").attributes].forEach((t=>x(this,w,"f").removeAttribute(t.name))),[...e.firstElementChild.attributes].forEach((t=>x(this,w,"f").setAttribute(t.name,t.value))),x(this,w,"f").innerHTML=e.firstElementChild.innerHTML,e.remove()}}return w=new WeakMap,e})(),t.exports=e()},986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>h,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function c(t){return"object"==typeof t&&null!==t}function h(t){return Array.isArray(t)}function l(t){return h(t)&&0==t.length}function d(t){return h(t)&&t.length>0}function f(t){return h(t)&&t.every(n)}function p(t){return f(t)&&t.length>0}function m(t){return h(t)&&t.every(r)}function g(t){return h(t)&&t.every(i)}function y(t){return h(t)&&t.every(a)}function b(t){return y(t)&&t.length>0}return t.r(e),t.d(e,{isArray:()=>h,isEmptyArray:()=>l,isFiniteNumber:()=>r,isFiniteNumbersArray:()=>m,isNonEmptyArray:()=>d,isNonEmptyNumbersArray:()=>p,isNonEmptyStringsArray:()=>b,isNonFiniteNumber:()=>i,isNonFiniteNumbersArray:()=>g,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>c,isNullish:()=>u,isNumber:()=>n,isNumbersArray:()=>f,isPositiveFiniteNumber:()=>s,isString:()=>a,isStringsArray:()=>y}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Nucleobase:()=>Dn});var t={};n.r(t),n.d(t,{cx:()=>Bt,cy:()=>It,height:()=>Rt,rx:()=>jt,ry:()=>kt,width:()=>Ft,x:()=>Dt,y:()=>Lt});var e={};n.r(e),n.d(e,{from:()=>Xt,to:()=>Gt});var i={};n.r(i),n.d(i,{MorphArray:()=>Kt,height:()=>te,width:()=>Zt,x:()=>Qt,y:()=>Jt});var s={};n.r(s),n.d(s,{array:()=>Ce,clear:()=>Ee,move:()=>Te,plot:()=>Ae,size:()=>je});var o={};n.r(o),n.d(o,{amove:()=>an,ax:()=>sn,ay:()=>on,build:()=>un,center:()=>rn,cx:()=>en,cy:()=>nn,length:()=>Qe,move:()=>tn,plain:()=>Ke,x:()=>Je,y:()=>Ze});var a={};n.r(a),n.d(a,{dmove:()=>pn,dx:()=>mn,dy:()=>gn,height:()=>yn,move:()=>bn,size:()=>vn,width:()=>wn,x:()=>xn,y:()=>Sn});const u={},c=[];function h(t,e){if(Array.isArray(t))for(const n of t)h(n,e);else if("object"!=typeof t)d(Object.getOwnPropertyNames(e)),u[t]=Object.assign(u[t]||{},e);else for(const e in t)h(e,t[e])}function l(t){return u[t]||{}}function d(t){c.push(...t)}function f(t,e){let n;const r=t.length,i=[];for(n=0;n<r;n++)i.push(e(t[n]));return i}function p(t){return t%360*Math.PI/180}function m(t){return t.charAt(0).toUpperCase()+t.slice(1)}function g(t,e,n,r){return null!=e&&null!=n||(r=r||t.bbox(),null==e?e=r.width/r.height*n:null==n&&(n=r.height/r.width*e)),{width:e,height:n}}function y(t,e){const n=t.origin;let r=null!=t.ox?t.ox:null!=t.originX?t.originX:"center",i=null!=t.oy?t.oy:null!=t.originY?t.originY:"center";null!=n&&([r,i]=Array.isArray(n)?n:"object"==typeof n?[n.x,n.y]:[n,n]);const s="string"==typeof r,o="string"==typeof i;if(s||o){const{height:t,width:n,x:a,y:u}=e.bbox();s&&(r=r.includes("left")?a:r.includes("right")?a+n:a+n/2),o&&(i=i.includes("top")?u:i.includes("bottom")?u+t:u+t/2)}return[r,i]}const b=new Set(["desc","metadata","title"]),v=t=>b.has(t.nodeName),w=(t,e,n={})=>{const r={...e};for(const t in r)r[t].valueOf()===n[t]&&delete r[t];Object.keys(r).length?t.node.setAttribute("data-svgjs",JSON.stringify(r)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},x="http://www.w3.org/2000/svg",S="http://www.w3.org/2000/xmlns/",_="http://www.w3.org/1999/xlink",P={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};class M{}const N={},O="___SYMBOL___ROOT___";function C(t,e=x){return P.document.createElementNS(e,t)}function E(t,e=!1){if(t instanceof M)return t;if("object"==typeof t)return j(t);if(null==t)return new N[O];if("string"==typeof t&&"<"!==t.charAt(0))return j(P.document.querySelector(t));const n=e?P.document.createElement("div"):C("svg");return n.innerHTML=t,t=j(n.firstChild),n.removeChild(n.firstChild),t}function T(t,e){return e&&(e instanceof P.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:C(t)}function A(t){if(!t)return null;if(t.instance instanceof M)return t.instance;if("#document-fragment"===t.nodeName)return new N.Fragment(t);let e=m(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":N[e]||(e="Dom"),new N[e](t)}let j=A;function k(t,e=t.name,n=!1){return N[e]=t,n&&(N[O]=t),d(Object.getOwnPropertyNames(t.prototype)),t}let D=1e3;function L(t){return"Svgjs"+m(t)+D++}function B(t){for(let e=t.children.length-1;e>=0;e--)B(t.children[e]);return t.id?(t.id=L(t.nodeName),t):t}function I(t,e){let n,r;for(r=(t=Array.isArray(t)?t:[t]).length-1;r>=0;r--)for(n in e)t[r].prototype[n]=e[n]}function F(t){return function(...e){const n=e[e.length-1];return!n||n.constructor!==Object||n instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(n)}}h("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=E(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=E(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=E(t)).before(this),this},insertAfter:function(t){return(t=E(t)).after(this),this}});const R=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,V=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,q=/rgb\((\d+),(\d+),(\d+)\)/,z=/(#[a-z_][a-z0-9\-_]*)/i,X=/\)\s*,?\s*/,G=/\s/g,Y=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,H=/^rgb\(/,U=/^(\s+)?$/,W=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,$=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,K=/[\s,]+/,Q=/[MLHVCSQTAZ]/i;function J(t){const e=Math.round(t),n=Math.max(0,Math.min(255,e)).toString(16);return 1===n.length?"0"+n:n}function Z(t,e){for(let n=e.length;n--;)if(null==t[e[n]])return!1;return!0}function tt(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}h("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(K)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),h("Dom",{css:function(t,e){const n={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const e=t.split(/\s*:\s*/);n[e[0]]=e[1]})),n;if(arguments.length<2){if(Array.isArray(t)){for(const e of t){const t=e;n[e]=this.node.style.getPropertyValue(t)}return n}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const e in t)this.node.style.setProperty(e,null==t[e]||U.test(t[e])?"":t[e])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||U.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),h("Dom",{data:function(t,e,n){if(null==t)return this.data(f(function(t){let e;const n=t.length,r=[];for(e=0;e<n;e++)0===t[e].nodeName.indexOf("data-")&&r.push(t[e]);return r}(this.node.attributes),(t=>t.nodeName.slice(5))));if(t instanceof Array){const e={};for(const n of t)e[n]=this.data(n);return e}if("object"==typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===n||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),h("Dom",{remember:function(t,e){if("object"==typeof arguments[0])for(const e in t)this.remember(e,t[e]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class et{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof et||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(t="vibrant",e){const{random:n,round:r,sin:i,PI:s}=Math;if("vibrant"===t){const t=24*n()+57,e=38*n()+45,r=360*n();return new et(t,e,r,"lch")}if("sine"===t){const t=r(80*i(2*s*(e=null==e?n():e)/.5+.01)+150),o=r(50*i(2*s*e/.5+4.6)+200),a=r(100*i(2*s*e/.5+2.3)+150);return new et(t,o,a)}if("pastel"===t){const t=8*n()+86,e=17*n()+9,r=360*n();return new et(t,e,r,"lch")}if("dark"===t){const t=10+10*n(),e=50*n()+86,r=360*n();return new et(t,e,r,"lch")}if("rgb"===t){const t=255*n(),e=255*n(),r=255*n();return new et(t,e,r)}if("lab"===t){const t=100*n(),e=256*n()-128,r=256*n()-128;return new et(t,e,r,"lab")}if("grey"===t){const t=255*n();return new et(t,t,t)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(Y.test(t)||H.test(t))}cmyk(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.min(1-r,1-i,1-s);return 1===o?new et(0,0,0,1,"cmyk"):new et((1-r-o)/(1-o),(1-i-o)/(1-o),(1-s-o)/(1-o),o,"cmyk")}hsl(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.max(r,i,s),a=Math.min(r,i,s),u=(o+a)/2,c=o===a,h=o-a;return new et(360*(c?0:o===r?((i-s)/h+(i<s?6:0))/6:o===i?((s-r)/h+2)/6:o===s?((r-i)/h+4)/6:0),100*(c?0:u>.5?h/(2-o-a):h/(o+a)),100*u,"hsl")}init(t=0,e=0,n=0,r=0,i="rgb"){if(t=t||0,this.space)for(const t in this.space)delete this[this.space[t]];if("number"==typeof t)i="string"==typeof r?r:i,r="string"==typeof r?0:r,Object.assign(this,{_a:t,_b:e,_c:n,_d:r,space:i});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const n=function(t,e){const n=Z(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:Z(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:Z(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:Z(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:Z(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:Z(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return n.space=e||n.space,n}(t,e);Object.assign(this,n)}else if("string"==typeof t)if(H.test(t)){const e=t.replace(G,""),[n,r,i]=q.exec(e).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}else{if(!Y.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,n,r,i]=V.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map(e);Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}}const{_a:s,_b:o,_c:a,_d:u}=this,c="rgb"===this.space?{r:s,g:o,b:a}:"xyz"===this.space?{x:s,y:o,z:a}:"hsl"===this.space?{h:s,s:o,l:a}:"lab"===this.space?{l:s,a:o,b:a}:"lch"===this.space?{l:s,c:o,h:a}:"cmyk"===this.space?{c:s,m:o,y:a,k:u}:{};Object.assign(this,c)}lab(){const{x:t,y:e,z:n}=this.xyz();return new et(116*e-16,500*(t-e),200*(e-n),"lab")}lch(){const{l:t,a:e,b:n}=this.lab(),r=Math.sqrt(e**2+n**2);let i=180*Math.atan2(n,e)/Math.PI;return i<0&&(i*=-1,i=360-i),new et(t,r,i,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(t=this.space)||"xyz"===t||"lch"===t){let{x:t,y:e,z:n}=this;if("lab"===this.space||"lch"===this.space){let{l:r,a:i,b:s}=this;if("lch"===this.space){const{c:t,h:e}=this,n=Math.PI/180;i=t*Math.cos(n*e),s=t*Math.sin(n*e)}const o=(r+16)/116,a=i/500+o,u=o-s/200,c=16/116,h=.008856,l=7.787;t=.95047*(a**3>h?a**3:(a-c)/l),e=1*(o**3>h?o**3:(o-c)/l),n=1.08883*(u**3>h?u**3:(u-c)/l)}const r=3.2406*t+-1.5372*e+-.4986*n,i=-.9689*t+1.8758*e+.0415*n,s=.0557*t+-.204*e+1.057*n,o=Math.pow,a=.0031308,u=r>a?1.055*o(r,1/2.4)-.055:12.92*r,c=i>a?1.055*o(i,1/2.4)-.055:12.92*i,h=s>a?1.055*o(s,1/2.4)-.055:12.92*s;return new et(255*u,255*c,255*h)}if("hsl"===this.space){let{h:t,s:e,l:n}=this;if(t/=360,e/=100,n/=100,0===e)return n*=255,new et(n,n,n);const r=n<.5?n*(1+e):n+e-n*e,i=2*n-r,s=255*tt(i,r,t+1/3),o=255*tt(i,r,t),a=255*tt(i,r,t-1/3);return new et(s,o,a)}if("cmyk"===this.space){const{c:t,m:e,y:n,k:r}=this,i=255*(1-Math.min(1,t*(1-r)+r)),s=255*(1-Math.min(1,e*(1-r)+r)),o=255*(1-Math.min(1,n*(1-r)+r));return new et(i,s,o)}return this;var t}toArray(){const{_a:t,_b:e,_c:n,_d:r,space:i}=this;return[t,e,n,r,i]}toHex(){const[t,e,n]=this._clamped().map(J);return`#${t}${e}${n}`}toRgb(){const[t,e,n]=this._clamped();return`rgb(${t},${e},${n})`}toString(){return this.toHex()}xyz(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,a=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,u=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,c=(.4124*o+.3576*a+.1805*u)/.95047,h=(.2126*o+.7152*a+.0722*u)/1,l=(.0193*o+.1192*a+.9505*u)/1.08883,d=c>.008856?Math.pow(c,1/3):7.787*c+16/116,f=h>.008856?Math.pow(h,1/3):7.787*h+16/116,p=l>.008856?Math.pow(l,1/3):7.787*l+16/116;return new et(d,f,p,"xyz")}_clamped(){const{_a:t,_b:e,_c:n}=this.rgb(),{max:r,min:i,round:s}=Math;return[t,e,n].map((t=>r(0,i(s(t),255))))}}class nt{constructor(...t){this.init(...t)}clone(){return new nt(this)}init(t,e){const n=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==n.x?0:n.x,this.y=null==n.y?0:n.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){it.isMatrixLike(t)||(t=new it(t));const{x:e,y:n}=this;return this.x=t.a*e+t.c*n+t.e,this.y=t.b*e+t.d*n+t.f,this}}function rt(t,e,n){return Math.abs(e-t)<(n||1e-6)}class it{constructor(...t){this.init(...t)}static formatTransforms(t){const e="both"===t.flip||!0===t.flip,n=t.flip&&(e||"x"===t.flip)?-1:1,r=t.flip&&(e||"y"===t.flip)?-1:1,i=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,s=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,o=t.scale&&t.scale.length?t.scale[0]*n:isFinite(t.scale)?t.scale*n:isFinite(t.scaleX)?t.scaleX*n:n,a=t.scale&&t.scale.length?t.scale[1]*r:isFinite(t.scale)?t.scale*r:isFinite(t.scaleY)?t.scaleY*r:r,u=t.shear||0,c=t.rotate||t.theta||0,h=new nt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),l=h.x,d=h.y,f=new nt(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=f.x,m=f.y,g=new nt(t.translate||t.tx||t.translateX,t.ty||t.translateY),y=g.x,b=g.y,v=new nt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:o,scaleY:a,skewX:i,skewY:s,shear:u,theta:c,rx:v.x,ry:v.y,tx:y,ty:b,ox:l,oy:d,px:p,py:m}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,e,n){const r=t.a*e.a+t.c*e.b,i=t.b*e.a+t.d*e.b,s=t.a*e.c+t.c*e.d,o=t.b*e.c+t.d*e.d,a=t.e+t.a*e.e+t.c*e.f,u=t.f+t.b*e.e+t.d*e.f;return n.a=r,n.b=i,n.c=s,n.d=o,n.e=a,n.f=u,n}around(t,e,n){return this.clone().aroundO(t,e,n)}aroundO(t,e,n){const r=t||0,i=e||0;return this.translateO(-r,-i).lmultiplyO(n).translateO(r,i)}clone(){return new it(this)}decompose(t=0,e=0){const n=this.a,r=this.b,i=this.c,s=this.d,o=this.e,a=this.f,u=n*s-r*i,c=u>0?1:-1,h=c*Math.sqrt(n*n+r*r),l=Math.atan2(c*r,c*n),d=180/Math.PI*l,f=Math.cos(l),p=Math.sin(l),m=(n*i+r*s)/u,g=i*h/(m*n-r)||s*h/(m*r+n);return{scaleX:h,scaleY:g,shear:m,rotate:d,translateX:o-t+t*f*h+e*(m*f*h-p*g),translateY:a-e+t*p*h+e*(m*p*h+f*g),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;const e=new it(t);return rt(this.a,e.a)&&rt(this.b,e.b)&&rt(this.c,e.c)&&rt(this.d,e.d)&&rt(this.e,e.e)&&rt(this.f,e.f)}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}init(t){const e=it.fromArray([1,0,0,1,0,0]);return t=t instanceof Ot?t.matrixify():"string"==typeof t?it.fromArray(t.split(K).map(parseFloat)):Array.isArray(t)?it.fromArray(t):"object"==typeof t&&it.isMatrixLike(t)?t:"object"==typeof t?(new it).transform(t):6===arguments.length?it.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,e=this.b,n=this.c,r=this.d,i=this.e,s=this.f,o=t*r-e*n;if(!o)throw new Error("Cannot invert "+this);const a=r/o,u=-e/o,c=-n/o,h=t/o,l=-(a*i+c*s),d=-(u*i+h*s);return this.a=a,this.b=u,this.c=c,this.d=h,this.e=l,this.f=d,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const e=t instanceof it?t:new it(t);return it.matrixMultiply(e,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const e=t instanceof it?t:new it(t);return it.matrixMultiply(this,e,this)}rotate(t,e,n){return this.clone().rotateO(t,e,n)}rotateO(t,e=0,n=0){t=p(t);const r=Math.cos(t),i=Math.sin(t),{a:s,b:o,c:a,d:u,e:c,f:h}=this;return this.a=s*r-o*i,this.b=o*r+s*i,this.c=a*r-u*i,this.d=u*r+a*i,this.e=c*r-h*i+n*i-e*r+e,this.f=h*r+c*i-e*i-n*r+n,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t);const{a:i,b:s,c:o,d:a,e:u,f:c}=this;return this.a=i*t,this.b=s*e,this.c=o*t,this.d=a*e,this.e=u*t-n*t+n,this.f=c*e-r*e+r,this}shear(t,e,n){return this.clone().shearO(t,e,n)}shearO(t,e=0,n=0){const{a:r,b:i,c:s,d:o,e:a,f:u}=this;return this.a=r+i*t,this.c=s+o*t,this.e=a+u*t-n*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t),t=p(t),e=p(e);const i=Math.tan(t),s=Math.tan(e),{a:o,b:a,c:u,d:c,e:h,f:l}=this;return this.a=o+a*i,this.b=a+o*s,this.c=u+c*i,this.d=c+u*s,this.e=h+l*i-r*i,this.f=l+h*s-n*s,this}skewX(t,e,n){return this.skew(t,0,e,n)}skewY(t,e,n){return this.skew(0,t,e,n)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(it.isMatrixLike(t))return new it(t).multiplyO(this);const e=it.formatTransforms(t),{x:n,y:r}=new nt(e.ox,e.oy).transform(this),i=(new it).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-n,-r).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(n,r);if(isFinite(e.px)||isFinite(e.py)){const t=new nt(n,r).transform(i),s=isFinite(e.px)?e.px-t.x:0,o=isFinite(e.py)?e.py-t.y:0;i.translateO(s,o)}return i.translateO(e.tx,e.ty),i}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function st(){if(!st.nodes){const t=E().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;st.nodes={svg:t,path:e}}if(!st.nodes.svg.node.parentNode){const t=P.document.body||P.document.documentElement;st.nodes.svg.addTo(t)}return st.nodes}function ot(t){return!(t.width||t.height||t.x||t.y)}k(it,"Matrix");class at{constructor(...t){this.init(...t)}addOffset(){return this.x+=P.window.pageXOffset,this.y+=P.window.pageYOffset,new at(this)}init(t){return t="string"==typeof t?t.split(K).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return ot(this)}merge(t){const e=Math.min(this.x,t.x),n=Math.min(this.y,t.y),r=Math.max(this.x+this.width,t.x+t.width)-e,i=Math.max(this.y+this.height,t.y+t.height)-n;return new at(e,n,r,i)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof it||(t=new it(t));let e=1/0,n=-1/0,r=1/0,i=-1/0;return[new nt(this.x,this.y),new nt(this.x2,this.y),new nt(this.x,this.y2),new nt(this.x2,this.y2)].forEach((function(s){s=s.transform(t),e=Math.min(e,s.x),n=Math.max(n,s.x),r=Math.min(r,s.y),i=Math.max(i,s.y)})),new at(e,r,n-e,i-r)}}function ut(t,e,n){let r;try{if(r=e(t.node),ot(r)&&(i=t.node)!==P.document&&!(P.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===P.document}).call(P.document.documentElement,i))throw new Error("Element not in the dom")}catch(e){r=n(t)}var i;return r}h({viewbox:{viewbox(t,e,n,r){return null==t?new at(this.attr("viewBox")):this.attr("viewBox",new at(t,e,n,r))},zoom(t,e){let{width:n,height:r}=this.attr(["width","height"]);if((n||r)&&"string"!=typeof n&&"string"!=typeof r||(n=this.node.clientWidth,r=this.node.clientHeight),!n||!r)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const i=this.viewbox(),s=n/i.width,o=r/i.height,a=Math.min(s,o);if(null==t)return a;let u=a/t;u===1/0&&(u=Number.MAX_SAFE_INTEGER/100),e=e||new nt(n/2/s+i.x,r/2/o+i.y);const c=new at(i).transform(new it({scale:u,origin:e}));return this.viewbox(c)}}}),k(at,"Box");class ct extends Array{constructor(t=[],...e){if(super(t,...e),"number"==typeof t)return this;this.length=0,this.push(...t)}}const ht=ct;I([ct],{each(t,...e){return"function"==typeof t?this.map(((e,n,r)=>t.call(e,e,n,r))):this.map((n=>n[t](...e)))},toArray(){return Array.prototype.concat.apply([],this)}});const lt=["toArray","constructor","each"];function dt(t,e){return new ht(f((e||P.document).querySelectorAll(t),(function(t){return A(t)})))}ct.extend=function(t){t=t.reduce(((t,e)=>(lt.includes(e)||"_"===e[0]||(e in Array.prototype&&(t["$"+e]=Array.prototype[e]),t[e]=function(...t){return this.each(e,...t)}),t)),{}),I([ct],t)};let ft=0;const pt={};function mt(t){let e=t.getEventHolder();return e===P.window&&(e=pt),e.events||(e.events={}),e.events}function gt(t){return t.getEventTarget()}function yt(t,e,n,r,i){const s=n.bind(r||t),o=E(t),a=mt(o),u=gt(o);e=Array.isArray(e)?e:e.split(K),n._svgjsListenerId||(n._svgjsListenerId=++ft),e.forEach((function(t){const e=t.split(".")[0],r=t.split(".")[1]||"*";a[e]=a[e]||{},a[e][r]=a[e][r]||{},a[e][r][n._svgjsListenerId]=s,u.addEventListener(e,s,i||!1)}))}function bt(t,e,n,r){const i=E(t),s=mt(i),o=gt(i);("function"!=typeof n||(n=n._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(K)).forEach((function(t){const e=t&&t.split(".")[0],a=t&&t.split(".")[1];let u,c;if(n)s[e]&&s[e][a||"*"]&&(o.removeEventListener(e,s[e][a||"*"][n],r||!1),delete s[e][a||"*"][n]);else if(e&&a){if(s[e]&&s[e][a]){for(c in s[e][a])bt(o,[e,a].join("."),c);delete s[e][a]}}else if(a)for(t in s)for(u in s[t])a===u&&bt(o,[t,a].join("."));else if(e){if(s[e]){for(u in s[e])bt(o,[e,u].join("."));delete s[e]}}else{for(t in s)bt(o,t);!function(t){let e=t.getEventHolder();e===P.window&&(e=pt),e.events&&(e.events={})}(i)}}))}class vt extends M{addEventListener(){}dispatch(t,e,n){return function(t,e,n,r){const i=gt(t);return e instanceof P.window.Event||(e=new P.window.CustomEvent(e,{detail:n,cancelable:!0,...r})),i.dispatchEvent(e),e}(this,t,e,n)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const n=e[t.type];for(const e in n)for(const r in n[e])n[e][r](t);return!t.defaultPrevented}fire(t,e,n){return this.dispatch(t,e,n),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e,n){return bt(this,t,e,n),this}on(t,e,n,r){return yt(this,t,e,n,r),this}removeEventListener(){}}function wt(){}k(vt,"EventTarget");const xt={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class St extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(K).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}}class _t{constructor(...t){this.init(...t)}convert(t){return new _t(this.value,t)}divide(t){return t=new _t(t),new _t(this/t,this.unit||t.unit)}init(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(R))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof _t&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new _t(t),new _t(this-t,this.unit||t.unit)}plus(t){return t=new _t(t),new _t(this+t,this.unit||t.unit)}times(t){return t=new _t(t),new _t(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const Pt=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),Mt=[];class Nt extends vt{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return(t=E(t)).removeNamespace&&this.node instanceof P.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t,e){return E(t).put(this,e)}children(){return new ht(f(this.node.children,(function(t){return A(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,e=!0){this.writeDataToDom();let n=this.node.cloneNode(t);return e&&(n=B(n)),new this.constructor(n)}each(t,e){const n=this.children();let r,i;for(r=0,i=n.length;r<i;r++)t.apply(n[r],[r,n]),e&&n[r].each(t,e);return this}element(t,e){return this.put(new Nt(C(t),e))}first(){return A(this.node.firstChild)}get(t){return A(this.node.childNodes[t])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(t){return this.index(t)>=0}html(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=L(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return A(this.node.lastChild)}matches(t){const e=this.node,n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return n&&n.call(e,t)}parent(t){let e=this;if(!e.node.parentNode)return null;if(e=A(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=A(e.node.parentNode));return e}put(t,e){return t=E(t),this.add(t,e),t}putIn(t,e){return E(t).add(this,e)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=E(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e=null){const n=10**t,r=this.attr(e);for(const t in r)"number"==typeof r[t]&&(r[t]=Math.round(r[t]*n)/n);return this.attr(r),this}svg(t,e){return this.xml(t,e,x)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const e=this.parent();if(!e)return this.addTo(t);const n=e.index(this);return e.put(t,n).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();let n=this;if(null!=t){if(n=A(n.node.cloneNode(!0)),e){const e=t(n);if(n=e||n,!1===e)return""}n.each((function(){const e=t(this),n=e||this;!1===e?this.remove():e&&this!==n&&this.replace(n)}),!0)}return e?n.node.outerHTML:n.node.innerHTML}e=null!=e&&e;const r=C("wrapper",n),i=P.document.createDocumentFragment();r.innerHTML=t;for(let t=r.children.length;t--;)i.appendChild(r.firstElementChild);const s=this.parent();return e?this.replace(i)&&s:this.add(i)}}I(Nt,{attr:function(t,e,n){if(null==t){t={},e=this.node.attributes;for(const n of e)t[n.nodeName]=W.test(n.nodeValue)?parseFloat(n.nodeValue):n.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,e)=>(t[e]=this.attr(e),t)),{});if("object"==typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?xt[t]:W.test(e)?parseFloat(e):e;"number"==typeof(e=Mt.reduce(((e,n)=>n(t,e,this)),e))?e=new _t(e):Pt.has(t)&&et.isColor(e)?e=new et(e):e.constructor===Array&&(e=new St(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof n?this.node.setAttributeNS(n,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return dt(t,this.node)},findOne:function(t){return A(this.node.querySelector(t))}}),k(Nt,"Dom");class Ot extends Nt{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new _t(t).plus(this.x()))}dy(t=0){return this.y(new _t(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e="string"==typeof t;e||(t=E(t));const n=new ht;let r=this;for(;(r=r.parent())&&r.node!==P.document&&"#document-fragment"!==r.nodeName&&(n.push(r),e||r.node!==t.node)&&(!e||!r.matches(t));)if(r.node===this.root().node)return null;return n}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(z);return e?E(e[1]):null}root(){const t=this.parent(N[O]);return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const n=g(this,t,e);return this.width(new _t(n.width)).height(new _t(n.height))}width(t){return this.attr("width",t)}writeDataToDom(){return w(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}I(Ot,{bbox:function(){const t=ut(this,(t=>t.getBBox()),(t=>{try{const e=t.clone().addTo(st().svg).show(),n=e.node.getBBox();return e.remove(),n}catch(e){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${e.toString()}`)}}));return new at(t)},rbox:function(t){const e=ut(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),n=new at(e);return t?n.transform(t.screenCTM().inverseO()):n.addOffset()},inside:function(t,e){const n=this.bbox();return t>n.x&&e>n.y&&t<n.x+n.width&&e<n.y+n.height},point:function(t,e){return new nt(t,e).transformO(this.screenCTM().inverseO())},ctm:function(){return new it(this.node.getCTM())},screenCTM:function(){try{if("function"==typeof this.isRoot&&!this.isRoot()){const t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new it(e)}return new it(this.node.getScreenCTM())}catch(t){return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new it}}}),k(Ot,"Element");const Ct={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return"color"===e?t:t+"-"+e}};["fill","stroke"].forEach((function(t){const e={};let n;e[t]=function(e){if(void 0===e)return this.attr(t);if("string"==typeof e||e instanceof et||et.isRgb(e)||e instanceof Ot)this.attr(t,e);else for(n=Ct[t].length-1;n>=0;n--)null!=e[Ct[t][n]]&&this.attr(Ct.prefix(t,Ct[t][n]),e[Ct[t][n]]);return this},h(["Element","Runner"],e)})),h(["Element","Runner"],{matrix:function(t,e,n,r,i,s){return null==t?new it(this):this.attr("transform",new it(t,e,n,r,i,s))},rotate:function(t,e,n){return this.transform({rotate:t,ox:e,oy:n},!0)},skew:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:n},!0):this.transform({skew:[t,e],ox:n,oy:r},!0)},shear:function(t,e,n){return this.transform({shear:t,ox:e,oy:n},!0)},scale:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:n},!0):this.transform({scale:[t,e],ox:n,oy:r},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),h("radius",{radius:function(t,e=t){return"radialGradient"===(this._element||this).type?this.attr("r",new _t(t)):this.rx(t).ry(e)}}),h("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new nt(this.node.getPointAtLength(t))}}),h(["Element","Runner"],{font:function(t,e){if("object"==typeof t){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}}),h("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),h("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(X).slice(0,-1).map((function(t){const e=t.trim().split("(");return[e[0],e[1].split(K).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(it.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new it)},toParent:function(t,e){if(this===t)return this;if(v(this.node))return this.addTo(t,e);const n=this.screenCTM(),r=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(r.multiply(n)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){const e=new it(this).decompose();return null==t?e:e[t]}it.isMatrixLike(t)||(t={...t,origin:y(t,this)});const n=new it(!0===e?this:e||!1).transform(t);return this.attr("transform",n)}});class Et extends Ot{flatten(){return this.each((function(){if(this instanceof Et)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),e=t.index(this)){return e=-1===e?t.children().length:e,this.each((function(n,r){return r[r.length-n-1].toParent(t,e)})),this.remove()}}k(Et,"Container");class Tt extends Et{constructor(t,e=t){super(T("defs",t),e)}flatten(){return this}ungroup(){return this}}k(Tt,"Defs");class At extends Ot{}function jt(t){return this.attr("rx",t)}function kt(t){return this.attr("ry",t)}function Dt(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Lt(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Bt(t){return this.attr("cx",t)}function It(t){return this.attr("cy",t)}function Ft(t){return null==t?2*this.rx():this.rx(new _t(t).divide(2))}function Rt(t){return null==t?2*this.ry():this.ry(new _t(t).divide(2))}k(At,"Shape");class Vt extends At{constructor(t,e=t){super(T("ellipse",t),e)}size(t,e){const n=g(this,t,e);return this.rx(new _t(n.width).divide(2)).ry(new _t(n.height).divide(2))}}I(Vt,t),h("Container",{ellipse:F((function(t=0,e=t){return this.put(new Vt).size(t,e).move(0,0)}))}),k(Vt,"Ellipse");class qt extends Nt{constructor(t=P.document.createDocumentFragment()){super(t)}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){const t=new Nt(C("wrapper",n));return t.add(this.node.cloneNode(!0)),t.xml(!1,n)}return super.xml(t,!1,n)}}k(qt,"Fragment");const zt=qt;function Xt(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new _t(t),fy:new _t(e)}):this.attr({x1:new _t(t),y1:new _t(e)})}function Gt(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new _t(t),cy:new _t(e)}):this.attr({x2:new _t(t),y2:new _t(e)})}class Yt extends Et{constructor(t,e){super(T(t+"Gradient","string"==typeof t?null:t),e)}attr(t,e,n){return"transform"===t&&(t="gradientTransform"),super.attr(t,e,n)}bbox(){return new at}targets(){return dt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}I(Yt,e),h({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:F((function(t,e){return this.put(new Yt(t)).update(e)}))}}),k(Yt,"Gradient");class Ht extends Et{constructor(t,e=t){super(T("pattern",t),e)}attr(t,e,n){return"transform"===t&&(t="patternTransform"),super.attr(t,e,n)}bbox(){return new at}targets(){return dt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}h({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:F((function(t,e,n){return this.put(new Ht).update(n).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),k(Ht,"Pattern");class Ut extends At{constructor(t,e=t){super(T("image",t),e)}load(t,e){if(!t)return this;const n=new P.window.Image;return yt(n,"load",(function(t){const r=this.parent(Ht);0===this.width()&&0===this.height()&&this.size(n.width,n.height),r instanceof Ht&&0===r.width()&&0===r.height()&&r.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),yt(n,"load error",(function(){bt(n)})),this.attr("href",n.src=t,_)}}var Wt;Wt=function(t,e,n){return"fill"!==t&&"stroke"!==t||$.test(e)&&(e=n.root().defs().image(e)),e instanceof Ut&&(e=n.root().defs().pattern(0,0,(t=>{t.add(e)}))),e},Mt.push(Wt),h({Container:{image:F((function(t,e){return this.put(new Ut).size(0,0).load(t,e)}))}}),k(Ut,"Image");class $t extends St{bbox(){let t=-1/0,e=-1/0,n=1/0,r=1/0;return this.forEach((function(i){t=Math.max(i[0],t),e=Math.max(i[1],e),n=Math.min(i[0],n),r=Math.min(i[1],r)})),new at(n,r,t-n,e-r)}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let n=this.length-1;n>=0;n--)this[n]=[this[n][0]+t,this[n][1]+e];return this}parse(t=[0,0]){const e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(K).map(parseFloat)).length%2!=0&&t.pop();for(let n=0,r=t.length;n<r;n+=2)e.push([t[n],t[n+1]]);return e}size(t,e){let n;const r=this.bbox();for(n=this.length-1;n>=0;n--)r.width&&(this[n][0]=(this[n][0]-r.x)*t/r.width+r.x),r.height&&(this[n][1]=(this[n][1]-r.y)*e/r.height+r.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let e=0,n=this.length;e<n;e++)t.push(this[e].join(","));return t.join(" ")}transform(t){return this.clone().transformO(t)}transformO(t){it.isMatrixLike(t)||(t=new it(t));for(let e=this.length;e--;){const[n,r]=this[e];this[e][0]=t.a*n+t.c*r+t.e,this[e][1]=t.b*n+t.d*r+t.f}return this}}const Kt=$t;function Qt(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}function Jt(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}function Zt(t){const e=this.bbox();return null==t?e.width:this.size(t,e.height)}function te(t){const e=this.bbox();return null==t?e.height:this.size(e.width,t)}class ee extends At{constructor(t,e=t){super(T("line",t),e)}array(){return new $t([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(t,e){return this.attr(this.array().move(t,e).toLine())}plot(t,e,n,r){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:n,y2:r}:new $t(t).toLine(),this.attr(t))}size(t,e){const n=g(this,t,e);return this.attr(this.array().size(n.width,n.height).toLine())}}I(ee,i),h({Container:{line:F((function(...t){return ee.prototype.plot.apply(this.put(new ee),null!=t[0]?t:[0,0,0,0])}))}}),k(ee,"Line");class ne extends Et{constructor(t,e=t){super(T("marker",t),e)}height(t){return this.attr("markerHeight",t)}orient(t){return this.attr("orient",t)}ref(t,e){return this.attr("refX",t).attr("refY",e)}toString(){return"url(#"+this.id()+")"}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}width(t){return this.attr("markerWidth",t)}}function re(t,e){return function(n){return null==n?this[t]:(this[t]=n,e&&e.call(this),this)}}h({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:F((function(t,e,n){return this.put(new ne).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(n)}))},marker:{marker(t,e,n,r){let i=["marker"];return"all"!==t&&i.push(t),i=i.join("-"),t=arguments[1]instanceof ne?arguments[1]:this.defs().marker(e,n,r),this.attr(i,t)}}}),k(ne,"Marker");const ie={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,n,r){return function(i){return i<0?t>0?e/t*i:n>0?r/n*i:0:i>1?n<1?(1-r)/(1-n)*i+(r-n)/(1-n):t<1?(1-e)/(1-t)*i+(e-t)/(1-t):1:3*i*(1-i)**2*e+3*i**2*(1-i)*r+i**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let n=t;return"none"===e?--n:"both"===e&&++n,(r,i=!1)=>{let s=Math.floor(r*t);const o=r*s%1==0;return"start"!==e&&"both"!==e||++s,i&&o&&--s,r>=0&&s<0&&(s=0),r<=1&&s>n&&(s=n),s/n}}};class se{done(){return!1}}class oe extends se{constructor(t=">"){super(),this.ease=ie[t]||t}step(t,e,n){return"number"!=typeof t?n<1?t:e:t+(e-t)*this.ease(n)}}class ae extends se{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,n,r){return this.stepper(t,e,n,r)}}function ue(){const t=(this._duration||500)/1e3,e=this._overshoot||0,n=Math.PI,r=Math.log(e/100+1e-10),i=-r/Math.sqrt(n*n+r*r),s=3.9/(i*t);this.d=2*i*s,this.k=s*s}I(class extends ae{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;n>100&&(n=16),n/=1e3;const i=r.velocity||0,s=-this.d*i-this.k*(t-e),o=t+i*n+s*n*n/2;return r.velocity=i+s*n,r.done=Math.abs(e-o)+Math.abs(i)<.002,r.done?e:o}},{duration:re("_duration",ue),overshoot:re("_overshoot",ue)}),I(class extends ae{constructor(t=.1,e=.01,n=0,r=1e3){super(),this.p(t).i(e).d(n).windup(r)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;const i=e-t;let s=(r.integral||0)+i*n;const o=(i-(r.error||0))/n,a=this._windup;return!1!==a&&(s=Math.max(-a,Math.min(s,a))),r.error=i,r.integral=s,r.done=Math.abs(i)<.001,r.done?e:t+(this.P*i+this.I*s+this.D*o)}},{windup:re("_windup"),p:re("P"),i:re("I"),d:re("D")});const ce={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},he={M:function(t,e,n){return e.x=n.x=t[0],e.y=n.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,n){return e.x=n.x,e.y=n.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},le="mlhvqtcsaz".split("");for(let t=0,e=le.length;t<e;++t)he[le[t]]=function(t){return function(e,n,r){if("H"===t)e[0]=e[0]+n.x;else if("V"===t)e[0]=e[0]+n.y;else if("A"===t)e[5]=e[5]+n.x,e[6]=e[6]+n.y;else for(let t=0,r=e.length;t<r;++t)e[t]=e[t]+(t%2?n.y:n.x);return he[t](e,n,r)}}(le[t].toUpperCase());function de(t){return t.segment.length&&t.segment.length-1===ce[t.segment[0].toUpperCase()]}function fe(t,e){t.inNumber&&pe(t,!1);const n=Q.test(e);if(n)t.segment=[e];else{const e=t.lastCommand,n=e.toLowerCase(),r=e===n;t.segment=["m"===n?r?"l":"L":e]}return t.inSegment=!0,t.lastCommand=t.segment[0],n}function pe(t,e){if(!t.inNumber)throw new Error("Parser Error");t.number&&t.segment.push(parseFloat(t.number)),t.inNumber=e,t.number="",t.pointSeen=!1,t.hasExponent=!1,de(t)&&me(t)}function me(t){t.inSegment=!1,t.absolute&&(t.segment=function(t){const e=t.segment[0];return he[e](t.segment.slice(1),t.p,t.p0)}(t)),t.segments.push(t.segment)}function ge(t){if(!t.segment.length)return!1;const e="A"===t.segment[0].toUpperCase(),n=t.segment.length;return e&&(4===n||5===n)}function ye(t){return"E"===t.lastToken.toUpperCase()}const be=new Set([" ",",","\t","\n","\r","\f"]);class ve extends St{bbox(){return st().path.setAttribute("d",this.toString()),new at(st.nodes.path.getBBox())}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let n,r=this.length-1;r>=0;r--)n=this[r][0],"M"===n||"L"===n||"T"===n?(this[r][1]+=t,this[r][2]+=e):"H"===n?this[r][1]+=t:"V"===n?this[r][1]+=e:"C"===n||"S"===n||"Q"===n?(this[r][1]+=t,this[r][2]+=e,this[r][3]+=t,this[r][4]+=e,"C"===n&&(this[r][5]+=t,this[r][6]+=e)):"A"===n&&(this[r][6]+=t,this[r][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,e=!0){let n=0,r="";const i={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new nt,p:new nt};for(;i.lastToken=r,r=t.charAt(n++);)if(i.inSegment||!fe(i,r))if("."!==r)if(isNaN(parseInt(r)))if(be.has(r))i.inNumber&&pe(i,!1);else if("-"!==r&&"+"!==r)if("E"!==r.toUpperCase()){if(Q.test(r)){if(i.inNumber)pe(i,!1);else{if(!de(i))throw new Error("parser Error");me(i)}--n}}else i.number+=r,i.hasExponent=!0;else{if(i.inNumber&&!ye(i)){pe(i,!1),--n;continue}i.number+=r,i.inNumber=!0}else{if("0"===i.number||ge(i)){i.inNumber=!0,i.number=r,pe(i,!0);continue}i.inNumber=!0,i.number+=r}else{if(i.pointSeen||i.hasExponent){pe(i,!1),--n;continue}i.inNumber=!0,i.pointSeen=!0,i.number+=r}return i.inNumber&&pe(i,!1),i.inSegment&&de(i)&&me(i),i.segments}(t)}size(t,e){const n=this.bbox();let r,i;for(n.width=0===n.width?1:n.width,n.height=0===n.height?1:n.height,r=this.length-1;r>=0;r--)i=this[r][0],"M"===i||"L"===i||"T"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y):"H"===i?this[r][1]=(this[r][1]-n.x)*t/n.width+n.x:"V"===i?this[r][1]=(this[r][1]-n.y)*e/n.height+n.y:"C"===i||"S"===i||"Q"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y,this[r][3]=(this[r][3]-n.x)*t/n.width+n.x,this[r][4]=(this[r][4]-n.y)*e/n.height+n.y,"C"===i&&(this[r][5]=(this[r][5]-n.x)*t/n.width+n.x,this[r][6]=(this[r][6]-n.y)*e/n.height+n.y)):"A"===i&&(this[r][1]=this[r][1]*t/n.width,this[r][2]=this[r][2]*e/n.height,this[r][6]=(this[r][6]-n.x)*t/n.width+n.x,this[r][7]=(this[r][7]-n.y)*e/n.height+n.y);return this}toString(){return function(t){let e="";for(let n=0,r=t.length;n<r;n++)e+=t[n][0],null!=t[n][1]&&(e+=t[n][1],null!=t[n][2]&&(e+=" ",e+=t[n][2],null!=t[n][3]&&(e+=" ",e+=t[n][3],e+=" ",e+=t[n][4],null!=t[n][5]&&(e+=" ",e+=t[n][5],e+=" ",e+=t[n][6],null!=t[n][7]&&(e+=" ",e+=t[n][7])))));return e+" "}(this)}}const we=t=>{const e=typeof t;return"number"===e?_t:"string"===e?et.isColor(t)?et:K.test(t)?Q.test(t)?ve:St:R.test(t)?_t:Se:Ne.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?St:"object"===e?Me:Se};class xe{constructor(t){this._stepper=t||new oe("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(we(t));let e=new this._type(t);return this._type===et&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===Me&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}class Se{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}}class _e{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,_e.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}_e.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const Pe=(t,e)=>t[0]<e[0]?-1:t[0]>e[0]?1:0;class Me{constructor(...t){this.init(...t)}align(t){const e=this.values;for(let n=0,r=e.length;n<r;++n){if(e[n+1]===t[n+1]){if(e[n+1]===et&&t[n+7]!==e[n+7]){const e=t[n+7],r=new et(this.values.splice(n+3,5))[e]().toArray();this.values.splice(n+3,0,...r)}n+=e[n+2]+2;continue}if(!t[n+1])return this;const r=(new t[n+1]).toArray(),i=e[n+2]+3;e.splice(n,i,t[n],t[n+1],t[n+2],...r),n+=e[n+2]+2}return this}init(t){if(this.values=[],Array.isArray(t))return void(this.values=t.slice());t=t||{};const e=[];for(const n in t){const r=we(t[n]),i=new r(t[n]).toArray();e.push([n,r,i.length,...i])}return e.sort(Pe),this.values=e.reduce(((t,e)=>t.concat(e)),[]),this}toArray(){return this.values}valueOf(){const t={},e=this.values;for(;e.length;){const n=e.shift(),r=e.shift(),i=e.shift(),s=e.splice(0,i);t[n]=new r(s)}return t}}const Ne=[Se,_e,Me];class Oe extends At{constructor(t,e=t){super(T("path",t),e)}array(){return this._array||(this._array=new ve(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,e){return this.attr("d",this.array().move(t,e))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new ve(t))}size(t,e){const n=g(this,t,e);return this.attr("d",this.array().size(n.width,n.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}function Ce(){return this._array||(this._array=new $t(this.attr("points")))}function Ee(){return delete this._array,this}function Te(t,e){return this.attr("points",this.array().move(t,e))}function Ae(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new $t(t))}function je(t,e){const n=g(this,t,e);return this.attr("points",this.array().size(n.width,n.height))}Oe.prototype.MorphArray=ve,h({Container:{path:F((function(t){return this.put(new Oe).plot(t||new ve)}))}}),k(Oe,"Path");class ke extends At{constructor(t,e=t){super(T("polygon",t),e)}}h({Container:{polygon:F((function(t){return this.put(new ke).plot(t||new $t)}))}}),I(ke,i),I(ke,s),k(ke,"Polygon");class De extends At{constructor(t,e=t){super(T("polyline",t),e)}}h({Container:{polyline:F((function(t){return this.put(new De).plot(t||new $t)}))}}),I(De,i),I(De,s),k(De,"Polyline");class Le extends At{constructor(t,e=t){super(T("rect",t),e)}}I(Le,{rx:jt,ry:kt}),h({Container:{rect:F((function(t,e){return this.put(new Le).size(t,e)}))}}),k(Le,"Rect");class Be{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const e=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}const Ie={nextDraw:null,frames:new Be,timeouts:new Be,immediates:new Be,timer:()=>P.window.performance||P.window.Date,transforms:[],frame(t){const e=Ie.frames.push({run:t});return null===Ie.nextDraw&&(Ie.nextDraw=P.window.requestAnimationFrame(Ie._draw)),e},timeout(t,e){e=e||0;const n=Ie.timer().now()+e,r=Ie.timeouts.push({run:t,time:n});return null===Ie.nextDraw&&(Ie.nextDraw=P.window.requestAnimationFrame(Ie._draw)),r},immediate(t){const e=Ie.immediates.push(t);return null===Ie.nextDraw&&(Ie.nextDraw=P.window.requestAnimationFrame(Ie._draw)),e},cancelFrame(t){null!=t&&Ie.frames.remove(t)},clearTimeout(t){null!=t&&Ie.timeouts.remove(t)},cancelImmediate(t){null!=t&&Ie.immediates.remove(t)},_draw(t){let e=null;const n=Ie.timeouts.last();for(;(e=Ie.timeouts.shift())&&(t>=e.time?e.run():Ie.timeouts.push(e),e!==n););let r=null;const i=Ie.frames.last();for(;r!==i&&(r=Ie.frames.shift());)r.run(t);let s=null;for(;s=Ie.immediates.shift();)s();Ie.nextDraw=Ie.timeouts.first()||Ie.frames.first()?P.window.requestAnimationFrame(Ie._draw):null}},Fe=Ie,Re=function(t){const e=t.start,n=t.runner.duration();return{start:e,duration:n,end:e+n,runner:t.runner}},Ve=function(){const t=P.window;return(t.performance||t.Date).now()};class qe extends vt{constructor(t=Ve){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const e=this.speed();if(null==t)return this.speed(-e);const n=Math.abs(e);return this.speed(t?-n:n)}schedule(t,e,n){if(null==t)return this._runners.map(Re);let r=0;const i=this.getEndTime();if(e=e||0,null==n||"last"===n||"after"===n)r=i;else if("absolute"===n||"start"===n)r=e,e=0;else if("now"===n)r=this._time;else if("relative"===n){const n=this.getRunnerInfoById(t.id);n&&(r=n.start+e,e=0)}else{if("with-last"!==n)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();r=t?t.start:this._time}}t.unschedule(),t.timeline(this);const s=t.persist(),o={persist:null===s?this._persist:s,start:r+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(o),this._runners.sort(((t,e)=>t.start-e.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return Fe.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=Fe.frame(this._step)),this)}_stepFn(t=!1){const e=this._timeSource();let n=e-this._lastSourceTime;t&&(n=0);const r=this._speed*n+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=r,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let t=this._runners.length;t--;){const e=this._runners[t],n=e.runner;this._time-e.start<=0&&n.reset()}let i=!1;for(let t=0,e=this._runners.length;t<e;t++){const n=this._runners[t],s=n.runner;let o=r;const a=this._time-n.start;a<=0?i=!0:(a<o&&(o=a),s.active()&&(s.step(o).done?!0!==n.persist&&s.duration()-s.time()+this._time+n.persist<this._time&&(s.unschedule(),--t,--e):i=!0))}return i&&!(this._speed<0&&0===this._time)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}h({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new qe,this._timeline):(this._timeline=t,this)}}});class ze extends vt{constructor(t){super(),this.id=ze.id++,t="function"==typeof(t=null==t?400:t)?new ae(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof ae,this._stepper=this._isDeclarative?t:new oe,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new it,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,e,n){let r=1,i=!1,s=0;return e=e??0,n=n||"last","object"!=typeof(t=t??400)||t instanceof se||(e=t.delay??e,n=t.when??n,i=t.swing||i,r=t.times??r,s=t.wait??s,t=t.duration??400),{duration:t,delay:e,swing:i,times:r,wait:s,when:n}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(t,e,n){const r=ze.sanitise(t,e,n),i=new ze(r.duration);return this._timeline&&i.timeline(this._timeline),this._element&&i.element(this._element),i.loop(r).schedule(r.delay,r.when)}clearTransform(){return this.transforms=new it,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new oe(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,e,n){return"object"==typeof t&&(e=t.swing,n=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=n||0,!0===this._times&&(this._times=1/0),this}loops(t){const e=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/e),n=(this._time-t*e)/this._duration;return Math.min(t+n,this._times)}const n=t%1,r=e*Math.floor(t)+this._duration*n;return this.time(r)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,n=this._duration,r=this._wait,i=this._times,s=this._swing,o=this._reverse;let a;if(null==t){const t=function(t){const e=s*Math.floor(t%(2*(r+n))/(r+n)),i=e&&!o||!e&&o,a=Math.pow(-1,i)*(t%(r+n))/n+i;return Math.max(Math.min(a,1),0)},u=i*(r+n)-r;return a=e<=0?Math.round(t(1e-5)):e<u?t(e):Math.round(t(u-1e-5)),a}const u=Math.floor(this.loops()),c=s&&u%2==0;return a=u+(c&&!o||o&&c?t:1-t),this.loops(a)}progress(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}queue(t,e,n,r){return this._queue.push({initialiser:t||wt,runner:e||wt,retarget:n,isTransform:r,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted||(this.time(0),this._reseted=!0),this}reverse(t){return this._reverse=null==t?!this._reverse:t,this}schedule(t,e,n){if(t instanceof qe||(n=e,e=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,e,n),this}step(t){if(!this.enabled)return this;t=null==t?16:t,this._time+=t;const e=this.position(),n=this._lastPosition!==e&&this._time>=0;this._lastPosition=e;const r=this.duration(),i=this._lastTime<=0&&this._time>0,s=this._lastTime<r&&this._time>=r;this._lastTime=this._time,i&&this.fire("start",this);const o=this._isDeclarative;this.done=!o&&!s&&this._time>=r,this._reseted=!1;let a=!1;return(n||o)&&(this._initialise(n),this.transforms=new it,a=this._run(o?t:e),this.fire("step",this)),this.done=this.done||a&&o,s&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const e=t-this._time;return this.step(e),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let e=0,n=this._queue.length;e<n;++e){const n=this._queue[e],r=this._isDeclarative||!n.initialised&&t;t=!n.finished,r&&t&&(n.initialiser.call(this),n.initialised=!0)}}_rememberMorpher(t,e){if(this._history[t]={morpher:e,caller:this._queue[this._queue.length-1]},this._isDeclarative){const t=this.timeline();t&&t.play()}}_run(t){let e=!0;for(let n=0,r=this._queue.length;n<r;++n){const r=this._queue[n],i=r.runner.call(this,t);r.finished=r.finished||!0===i,e=e&&r.finished}return e}_tryRetarget(t,e,n){if(this._history[t]){if(!this._history[t].caller.initialised){const e=this._queue.indexOf(this._history[t].caller);return this._queue.splice(e,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget.call(this,e,n):this._history[t].morpher.to(e),this._history[t].caller.finished=!1;const r=this.timeline();return r&&r.play(),!0}return!1}}ze.id=0;class Xe{constructor(t=new it,e=-1,n=!0){this.transforms=t,this.id=e,this.done=n}clearTransformsFromQueue(){}}I([ze,Xe],{mergeWith(t){return new Xe(t.transforms.lmultiply(this.transforms),t.id)}});const Ge=(t,e)=>t.lmultiplyO(e),Ye=t=>t.transforms;function He(){const t=this._transformationRunners.runners.map(Ye).reduce(Ge,new it);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class Ue{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new Xe).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,e){const n=this.ids.indexOf(t+1);return this.ids.splice(n,1,t+1),this.runners.splice(n,1,e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let e=0;e<this.runners.length;++e){const n=this.runners[e];if(!(t&&n.done&&t.done)||n._timeline&&n._timeline._runnerIds.includes(n.id)||t._timeline&&t._timeline._runnerIds.includes(t.id))t=n;else{this.remove(n.id);const r=n.mergeWith(t);this.edit(t.id,r),t=r,--e}}return this}remove(t){const e=this.ids.indexOf(t+1);return this.ids.splice(e,1),this.runners.splice(e,1),this}}h({Element:{animate(t,e,n){const r=ze.sanitise(t,e,n),i=this.timeline();return new ze(r.duration).loop(r).element(this).timeline(i.play()).schedule(r.delay,r.when)},delay(t,e){return this.animate(0,t,e)},_clearTransformRunnersBefore(t){this._transformationRunners.clearBefore(t.id)},_currentTransform(t){return this._transformationRunners.runners.filter((e=>e.id<=t.id)).map(Ye).reduce(Ge,new it)},_addRunner(t){this._transformationRunners.add(t),Fe.cancelImmediate(this._frameId),this._frameId=Fe.immediate(He.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new Ue).add(new Xe(new it(this))))}}}),I(ze,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,n){if("string"==typeof e)return this.styleAttr(t,{[e]:n});let r=e;if(this._tryRetarget(t,r))return this;let i=new xe(this._stepper).to(r),s=Object.keys(r);return this.queue((function(){i=i.from(this.element()[t](s))}),(function(e){return this.element()[t](i.at(e).valueOf()),i.done()}),(function(e){const n=Object.keys(e),o=(a=s,n.filter((t=>!a.includes(t))));var a;if(o.length){const e=this.element()[t](o),n=new Me(i.from()).valueOf();Object.assign(n,e),i.from(n)}const u=new Me(i.to()).valueOf();Object.assign(u,e),i.to(u),s=n,r=e})),this._rememberMorpher(t,i),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let n=new xe(this._stepper).to(new _t(t));return this.queue((function(){n=n.from(this.element().zoom())}),(function(t){return this.element().zoom(n.at(t),e),n.done()}),(function(t,r){e=r,n.to(t)})),this._rememberMorpher("zoom",n),this},transform(t,e,n){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const r=it.isMatrixLike(t);n=null!=t.affine?t.affine:null!=n?n:!r;const i=new xe(this._stepper).type(n?_e:it);let s,o,a,u,c;return this.queue((function(){o=o||this.element(),s=s||y(t,o),c=new it(e?void 0:o),o._addRunner(this),e||o._clearTransformRunnersBefore(this)}),(function(h){e||this.clearTransform();const{x:l,y:d}=new nt(s).transform(o._currentTransform(this));let f=new it({...t,origin:[l,d]}),p=this._isDeclarative&&a?a:c;if(n){f=f.decompose(l,d),p=p.decompose(l,d);const t=f.rotate,e=p.rotate,n=[t-360,t,t+360],r=n.map((t=>Math.abs(t-e))),i=Math.min(...r),s=r.indexOf(i);f.rotate=n[s]}e&&(r||(f.rotate=t.rotate||0),this._isDeclarative&&u&&(p.rotate=u)),i.from(p),i.to(f);const m=i.at(h);return u=m.rotate,a=new it(m),this.addTransform(a),o._addRunner(this),i.done()}),(function(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(s=y(e,o)),t={...e,origin:s}}),!0),this._isDeclarative&&this._rememberMorpher("transform",i),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new _t(e),this._tryRetarget(t,e))return this;const n=new xe(this._stepper).to(e);let r=null;return this.queue((function(){r=this.element()[t](),n.from(r),n.to(r+e)}),(function(e){return this.element()[t](n.at(e)),n.done()}),(function(t){n.to(r+new _t(t))})),this._rememberMorpher(t,n),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const n=new xe(this._stepper).to(e);return this.queue((function(){n.from(this.element()[t]())}),(function(e){return this.element()[t](n.at(e)),n.done()})),this._rememberMorpher(t,n),this},_queueNumber(t,e){return this._queueObject(t,new _t(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let n;return t&&e||(n=this._element.bbox()),t||(t=n.width/n.height*e),e||(e=n.height/n.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,n,r){if(4===arguments.length)return this.plot([t,e,n,r]);if(this._tryRetarget("plot",t))return this;const i=new xe(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){i.from(this._element.array())}),(function(t){return this._element.plot(i.at(t)),i.done()})),this._rememberMorpher("plot",i),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,n,r){return this._queueObject("viewbox",new at(t,e,n,r))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),I(ze,{rx:jt,ry:kt,from:Xt,to:Gt}),k(ze,"Runner");class We extends Et{constructor(t,e=t){super(T("svg",t),e),this.namespace()}defs(){return this.isRoot()?A(this.node.querySelector("defs"))||this.put(new Tt):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof P.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:x,version:"1.1"}).attr("xmlns:xlink",_,S):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,S).attr("xmlns:svgjs",null,S)}root(){return this.isRoot()?this:super.root()}}h({Container:{nested:F((function(){return this.put(new We)}))}}),k(We,"Svg",!0);class $e extends Et{constructor(t,e=t){super(T("symbol",t),e)}}function Ke(t){return!1===this._build&&this.clear(),this.node.appendChild(P.document.createTextNode(t)),this}function Qe(){return this.node.getComputedTextLength()}function Je(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)}function Ze(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}function tn(t,e,n=this.bbox()){return this.x(t,n).y(e,n)}function en(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)}function nn(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)}function rn(t,e,n=this.bbox()){return this.cx(t,n).cy(e,n)}function sn(t){return this.attr("x",t)}function on(t){return this.attr("y",t)}function an(t,e){return this.ax(t).ay(e)}function un(t){return this._build=!!t,this}h({Container:{symbol:F((function(){return this.put(new $e)}))}}),k($e,"Symbol");class cn extends At{constructor(t,e=t){super(T("text",t),e),this.dom.leading=this.dom.leading??new _t(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new _t(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let e=0;const n=this.dom.leading;this.each((function(r){if(v(this.node))return;const i=P.window.getComputedStyle(this.node).getPropertyValue("font-size"),s=n*new _t(i);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?e+=s:(this.attr("dy",r?s+e:0),e=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new _t(t.leading||1.3),this}writeDataToDom(){return w(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const e=this.node.childNodes;let n=0;t="";for(let r=0,i=e.length;r<i;++r)"textPath"===e[r].nodeName||v(e[r])?0===r&&(n=r+1):(r!==n&&3!==e[r].nodeType&&!0===A(e[r]).dom.newLined&&(t+="\n"),t+=e[r].textContent);return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else for(let e=0,n=(t=(t+"").split("\n")).length;e<n;e++)this.newLine(t[e]);return this.build(!1).rebuild()}}I(cn,o),h({Container:{text:F((function(t=""){return this.put(new cn).text(t)})),plain:F((function(t=""){return this.put(new cn).plain(t)}))}}),k(cn,"Text");class hn extends At{constructor(t,e=t){super(T("tspan",t),e),this._build=!1}dx(t){return this.attr("dx",t)}dy(t){return this.attr("dy",t)}newLine(){this.dom.newLined=!0;const t=this.parent();if(!(t instanceof cn))return this;const e=t.index(this),n=P.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=t.dom.leading*new _t(n);return this.dy(e?r:0).attr("x",t.x())}text(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?(this.clear().build(!0),t.call(this,this),this.build(!1)):this.plain(t),this)}}I(hn,o),h({Tspan:{tspan:F((function(t=""){const e=new hn;return this._build||this.clear(),this.put(e).text(t)}))},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),k(hn,"Tspan");class ln extends At{constructor(t,e=t){super(T("circle",t),e)}radius(t){return this.attr("r",t)}rx(t){return this.attr("r",t)}ry(t){return this.rx(t)}size(t){return this.radius(new _t(t).divide(2))}}I(ln,{x:Dt,y:Lt,cx:Bt,cy:It,width:Ft,height:Rt}),h({Container:{circle:F((function(t=0){return this.put(new ln).size(t).move(0,0)}))}}),k(ln,"Circle");class dn extends Et{constructor(t,e=t){super(T("clipPath",t),e)}remove(){return this.targets().forEach((function(t){t.unclip()})),super.remove()}targets(){return dt("svg [clip-path*="+this.id()+"]")}}h({Container:{clip:F((function(){return this.defs().put(new dn)}))},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const e=t instanceof dn?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}}),k(dn,"ClipPath");class fn extends Ot{constructor(t,e=t){super(T("foreignObject",t),e)}}function pn(t,e){return this.children().forEach((n=>{let r;try{r=n.node instanceof P.window.SVGSVGElement?new at(n.attr(["x","y","width","height"])):n.bbox()}catch(t){return}const i=new it(n),s=i.translate(t,e).transform(i.inverse()),o=new nt(r.x,r.y).transform(s);n.move(o.x,o.y)})),this}function mn(t){return this.dmove(t,0)}function gn(t){return this.dmove(0,t)}function yn(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)}function bn(t=0,e=0,n=this.bbox()){const r=t-n.x,i=e-n.y;return this.dmove(r,i)}function vn(t,e,n=this.bbox()){const r=g(this,t,e,n),i=r.width/n.width,s=r.height/n.height;return this.children().forEach((t=>{const e=new nt(n).transform(new it(t).inverse());t.scale(i,s,e.x,e.y)})),this}function wn(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)}function xn(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)}function Sn(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}h({Container:{foreignObject:F((function(t,e){return this.put(new fn).size(t,e)}))}}),k(fn,"ForeignObject");class _n extends Et{constructor(t,e=t){super(T("g",t),e)}}I(_n,a),h({Container:{group:F((function(){return this.put(new _n)}))}}),k(_n,"G");class Pn extends Et{constructor(t,e=t){super(T("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,_)}}I(Pn,a),h({Container:{link:F((function(t){return this.put(new Pn).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const n=e.index(t);return e.add(this,n),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new Pn,this.wrap(e)),"function"==typeof t?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),k(Pn,"A");class Mn extends Et{constructor(t,e=t){super(T("mask",t),e)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return dt("svg [mask*="+this.id()+"]")}}h({Container:{mask:F((function(){return this.defs().put(new Mn)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof Mn?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),k(Mn,"Mask");class Nn extends Ot{constructor(t,e=t){super(T("stop",t),e)}update(t){return("number"==typeof t||t instanceof _t)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new _t(t.offset)),this}}h({Gradient:{stop:function(t,e,n){return this.put(new Nn).update(t,e,n)}}}),k(Nn,"Stop");class On extends Ot{constructor(t,e=t){super(T("style",t),e)}addText(t=""){return this.node.textContent+=t,this}font(t,e,n={}){return this.rule("@font-face",{fontFamily:t,src:e,...n})}rule(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;let n=t+"{";for(const t in e)n+=t.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))+":"+e[t]+";";return n+="}",n}(t,e))}}h("Dom",{style(t,e){return this.put(new On).rule(t,e)},fontface(t,e,n){return this.put(new On).font(t,e,n)}}),k(On,"Style");class Cn extends cn{constructor(t,e=t){super(T("textPath",t),e)}array(){const t=this.track();return t?t.array():null}plot(t){const e=this.track();let n=null;return e&&(n=e.plot(t)),null==t?n:this}track(){return this.reference("href")}}h({Container:{textPath:F((function(t,e){return t instanceof cn||(t=this.text(t)),t.path(e)}))},Text:{path:F((function(t,e=!0){const n=new Cn;let r;if(t instanceof Oe||(t=this.defs().path(t)),n.attr("href","#"+t,_),e)for(;r=this.node.firstChild;)n.node.appendChild(r);return this.put(n)})),textPath(){return this.findOne("textPath")}},Path:{text:F((function(t){return t instanceof cn||(t=(new cn).addTo(this.parent()).text(t)),t.path(this)})),targets(){return dt("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),Cn.prototype.MorphArray=ve,k(Cn,"TextPath");class En extends At{constructor(t,e=t){super(T("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,_)}}h({Container:{use:F((function(t,e){return this.put(new En).use(t,e)}))}}),k(En,"Use"),I([We,$e,Ut,Ht,ne],l("viewbox")),I([ee,De,ke,Oe],l("marker")),I(cn,l("Text")),I(Oe,l("Path")),I(Tt,l("Defs")),I([cn,hn],l("Tspan")),I([Le,Vt,Yt,ze],l("radius")),I(vt,l("EventTarget")),I(Nt,l("Dom")),I(Ot,l("Element")),I(At,l("Shape")),I([Et,zt],l("Container")),I(Yt,l("Gradient")),I(ze,l("Runner")),ht.extend([...new Set(c)]),function(t=[]){Ne.push(...[].concat(t))}([_t,et,at,it,St,$t,ve,nt]),I(Ne,{to(t){return(new xe).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,n,r,i){return this.fromArray(t.map((function(t,s){return r.step(t,e[s],n,i[s],i)})))}});var Tn=n(726),An=n(854),jn=n(731),kn=n(986);class Dn{static create(t){let e=document.createElementNS("http://www.w3.org/2000/svg","text");e.textContent=t;let n=new Dn(e);return n.assignUUID(),n.setAttributes(Dn.defaultAttributes),n}static deserialized(t,e){var n;if(!(0,An.isNonNullObject)(t))throw new Error("Saved base must be an object.");let r=null!==(n=t.id)&&void 0!==n?n:t.textId;if(!r)throw new Error("Missing base ID.");if(!(0,An.isString)(r))throw new Error("Base IDs must be strings.");let i=e.domNode.querySelector("#"+r);if(!i)throw new Error("Unable to find nucleobase DOM node.");if(!(i instanceof SVGTextElement))throw new Error("Nucleobase DOM node must be an SVG text element.");return new Dn(i)}constructor(t){this.domNode=t,this.centerPoint=new jn.CenterPoint(t)}serialized(){if(!this.id)throw new Error("Nucleobase ID is falsy.");return{id:this.id}}appendTo(t){t.appendChild(this.domNode)}remove(){this.domNode.remove()}isIn(t){return t.contains(this.domNode)&&t!==this.domNode}hasParent(){return!!this.domNode.parentNode}bringToFront(){(0,Tn.bringToFront)(this.domNode)}sendToBack(){(0,Tn.sendToBack)(this.domNode)}getAttribute(t){return this.domNode.getAttribute(t)}setAttribute(t,e){this.domNode.setAttribute(t,e)}setAttributes(t){try{new cn(this.domNode).attr(t)}catch(t){}}get id(){return this.domNode.id}assignUUID(){(0,Tn.assignUUID)(this.domNode)}get textContent(){return this.domNode.textContent}set textContent(t){this.domNode.textContent=t}get bbox(){return this.domNode.getBBox()}getCenterPoint(){return this.centerPoint}setCenterPoint(t){this.centerPoint.x=t.x,this.centerPoint.y=t.y}maintainingCenterPoint(t){let{x:e,y:n}=this.centerPoint;t(),this.centerPoint.x=e,this.centerPoint.y=n}get boundingClientRect(){return this.domNode.getBoundingClientRect()}get clientCenterPoint(){let t=this.domNode.getBoundingClientRect();return{x:(0,kn.mean)([t.left,t.right]),y:(0,kn.mean)([t.top,t.bottom])}}getClientCenterPoint(){return this.clientCenterPoint}}Dn.defaultAttributes={"font-family":"Arial","font-size":"9","font-weight":"700"},Dn.defaultAttributeNames=["font-family","font-size","font-weight"]})(),r})(),t.exports=e()},726:function(t){var e;e=()=>(()=>{var t={854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function c(t){return"object"==typeof t&&null!==t}function h(t){return Array.isArray(t)}function l(t){return h(t)&&0==t.length}function d(t){return h(t)&&t.length>0}function f(t){return h(t)&&t.every(n)}function p(t){return f(t)&&t.length>0}function m(t){return h(t)&&t.every(r)}function g(t){return h(t)&&t.every(i)}function y(t){return h(t)&&t.every(a)}function b(t){return y(t)&&t.length>0}return t.r(e),t.d(e,{isArray:()=>h,isEmptyArray:()=>l,isFiniteNumber:()=>r,isFiniteNumbersArray:()=>m,isNonEmptyArray:()=>d,isNonEmptyNumbersArray:()=>p,isNonEmptyStringsArray:()=>b,isNonFiniteNumber:()=>i,isNonFiniteNumbersArray:()=>g,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>c,isNullish:()=>u,isNumber:()=>n,isNumbersArray:()=>f,isPositiveFiniteNumber:()=>s,isString:()=>a,isStringsArray:()=>y}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";function t(t,e){for(let[n,r]of Object.entries(e))t.setAttribute(n,r)}n.r(r),n.d(r,{CoordinateSystem:()=>l,HorizontalClientScaling:()=>f,InnerXML:()=>v,OuterXML:()=>S,Scaling:()=>d,VerticalClientScaling:()=>p,assignUUID:()=>h,bringToFront:()=>m,isSVGGraphicsElement:()=>_,isSVGGraphicsElementsArray:()=>M,sendToBack:()=>g,setAttributes:()=>t});const e={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};var i,s=new Uint8Array(16);function o(){if(!i&&!(i="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return i(s)}for(var a=[],u=0;u<256;++u)a.push((u+256).toString(16).slice(1));const c=function(t,n,r){if(e.randomUUID&&!n&&!t)return e.randomUUID();var i=(t=t||{}).random||(t.rng||o)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,n){r=r||0;for(var s=0;s<16;++s)n[r+s]=i[s];return n}return function(t,e=0){return(a[t[e+0]]+a[t[e+1]]+a[t[e+2]]+a[t[e+3]]+"-"+a[t[e+4]]+a[t[e+5]]+"-"+a[t[e+6]]+a[t[e+7]]+"-"+a[t[e+8]]+a[t[e+9]]+"-"+a[t[e+10]]+a[t[e+11]]+a[t[e+12]]+a[t[e+13]]+a[t[e+14]]+a[t[e+15]]).toLowerCase()}(i)};function h(t){t.id="uuid-"+c()}class l{constructor(t){this.targetSVGDoc=t}get width(){return this.targetSVGDoc.viewBox.baseVal.width}get height(){return this.targetSVGDoc.viewBox.baseVal.height}get minX(){return this.targetSVGDoc.viewBox.baseVal.x}get maxX(){return this.minX+this.width}get minY(){return this.targetSVGDoc.viewBox.baseVal.y}get maxY(){return this.minY+this.height}get horizontalScaling(){return this.targetSVGDoc.width.baseVal.value/this.width}get verticalScaling(){return this.targetSVGDoc.height.baseVal.value/this.height}setScaling(t){this.targetSVGDoc.setAttribute("width",""+t*this.width),this.targetSVGDoc.setAttribute("height",""+t*this.height)}get clientWidth(){return this.targetSVGDoc.getBoundingClientRect().width}get clientHeight(){return this.targetSVGDoc.getBoundingClientRect().height}get horizontalClientScaling(){return this.clientWidth/this.width}get verticalClientScaling(){return this.clientHeight/this.height}get minClientX(){return this.targetSVGDoc.getBoundingClientRect().x}get minClientY(){return this.targetSVGDoc.getBoundingClientRect().y}fromClientX(t){return this.minX+(t-this.minClientX)/this.horizontalClientScaling}fromClientY(t){return this.minY+(t-this.minClientY)/this.verticalClientScaling}fromClientCoordinates(t,e){return[this.fromClientX(t),this.fromClientY(e)]}fromClientPoint(t){return{x:this.fromClientX(t.x),y:this.fromClientY(t.y)}}toClientX(t){return this.minClientX+this.horizontalClientScaling*(t-this.minX)}toClientY(t){return this.minClientY+this.verticalClientScaling*(t-this.minY)}toClientCoordinates(t,e){return[this.toClientX(t),this.toClientY(e)]}toClientPoint(t){return{x:this.toClientX(t.x),y:this.toClientY(t.y)}}}class d{constructor(t){this.targetSVGDoc=t}set(t){let e=this.targetSVGDoc.viewBox.baseVal;this.targetSVGDoc.setAttribute("width",t*e.width+"px"),this.targetSVGDoc.setAttribute("height",t*e.height+"px")}}class f{constructor(t){this.targetSVGDoc=t}get(){let t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.width/e.width}}class p{constructor(t){this.targetSVGDoc=t}get(){let t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.height/e.height}}function m(t){let e=t.parentNode;e&&e.appendChild(t)}function g(t){let e=t.parentNode;e&&e.prepend(t)}var y,b=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class v{constructor(t){y.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,y,t)}toString(){return b(this,y,"f").innerHTML}set(t){b(this,y,"f").innerHTML=t}}y=new WeakMap;var w,x=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class S{constructor(t){w.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,w,t)}toString(){return x(this,w,"f").outerHTML}set(t){let e=document.createElementNS("http://www.w3.org/2000/svg","svg");if(e.style.height="0px",document.body.append(e),e.innerHTML=t,!e.firstElementChild)throw new Error("Outer XML must encode an SVG element.");if(e.childNodes.length>1)throw new Error("Outer XML cannot encode multiple DOM nodes.");if(e.firstElementChild.tagName.toLowerCase()!=x(this,w,"f").tagName.toLowerCase())throw new Error("Outer XML must specify an SVG element with the same tag name as the target SVG element.");[...x(this,w,"f").attributes].forEach((t=>x(this,w,"f").removeAttribute(t.name))),[...e.firstElementChild.attributes].forEach((t=>x(this,w,"f").setAttribute(t.name,t.value))),x(this,w,"f").innerHTML=e.firstElementChild.innerHTML,e.remove()}}function _(t){return t instanceof SVGGraphicsElement}w=new WeakMap;var P=n(854);function M(t){return(0,P.isArray)(t)&&t.every(_)}})(),r})(),t.exports=e()},986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,flipAway:()=>v,isBetween:()=>h,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,normalizeAngle:()=>b,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}function b(t,e){void 0===e&&(e=-Math.PI);var n=t-e;return e+((n%=2*Math.PI)>=0?n:n+2*Math.PI)}function v(t,e){var n=(e=b(e,t))-t;return(n<Math.PI/2||n>3*Math.PI/2)&&(t+=Math.PI),t}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function c(t){return"object"==typeof t&&null!==t}function h(t){return Array.isArray(t)}function l(t){return h(t)&&0==t.length}function d(t){return h(t)&&t.length>0}function f(t){return h(t)&&t.every(n)}function p(t){return f(t)&&t.length>0}function m(t){return h(t)&&t.every(r)}function g(t){return h(t)&&t.every(i)}function y(t){return h(t)&&t.every(a)}function b(t){return y(t)&&t.length>0}return t.r(e),t.d(e,{isArray:()=>h,isEmptyArray:()=>l,isFiniteNumber:()=>r,isFiniteNumbersArray:()=>m,isNonEmptyArray:()=>d,isNonEmptyNumbersArray:()=>p,isNonEmptyStringsArray:()=>b,isNonFiniteNumber:()=>i,isNonFiniteNumbersArray:()=>g,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>c,isNullish:()=>u,isNumber:()=>n,isNumbersArray:()=>f,isPositiveFiniteNumber:()=>s,isString:()=>a,isStringsArray:()=>y}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{BaseOutline:()=>Wn.BaseOutline,DotBracketDrawer:()=>pr,Drawing:()=>cr,Nucleobase:()=>An.Nucleobase,SchemaDrawer:()=>wr,StraightBond:()=>Qn.StraightBond});var t={};n.r(t),n.d(t,{cx:()=>Bt,cy:()=>It,height:()=>Rt,rx:()=>jt,ry:()=>kt,width:()=>Ft,x:()=>Dt,y:()=>Lt});var e={};n.r(e),n.d(e,{from:()=>Xt,to:()=>Gt});var i={};n.r(i),n.d(i,{MorphArray:()=>Kt,height:()=>te,width:()=>Zt,x:()=>Qt,y:()=>Jt});var s={};n.r(s),n.d(s,{array:()=>Ce,clear:()=>Ee,move:()=>Te,plot:()=>Ae,size:()=>je});var o={};n.r(o),n.d(o,{amove:()=>an,ax:()=>sn,ay:()=>on,build:()=>un,center:()=>rn,cx:()=>en,cy:()=>nn,length:()=>Qe,move:()=>tn,plain:()=>Ke,x:()=>Je,y:()=>Ze});var a={};n.r(a),n.d(a,{dmove:()=>pn,dx:()=>mn,dy:()=>gn,height:()=>yn,move:()=>bn,size:()=>vn,width:()=>wn,x:()=>xn,y:()=>Sn});const u={},c=[];function h(t,e){if(Array.isArray(t))for(const n of t)h(n,e);else if("object"!=typeof t)d(Object.getOwnPropertyNames(e)),u[t]=Object.assign(u[t]||{},e);else for(const e in t)h(e,t[e])}function l(t){return u[t]||{}}function d(t){c.push(...t)}function f(t,e){let n;const r=t.length,i=[];for(n=0;n<r;n++)i.push(e(t[n]));return i}function p(t){return t%360*Math.PI/180}function m(t){return t.charAt(0).toUpperCase()+t.slice(1)}function g(t,e,n,r){return null!=e&&null!=n||(r=r||t.bbox(),null==e?e=r.width/r.height*n:null==n&&(n=r.height/r.width*e)),{width:e,height:n}}function y(t,e){const n=t.origin;let r=null!=t.ox?t.ox:null!=t.originX?t.originX:"center",i=null!=t.oy?t.oy:null!=t.originY?t.originY:"center";null!=n&&([r,i]=Array.isArray(n)?n:"object"==typeof n?[n.x,n.y]:[n,n]);const s="string"==typeof r,o="string"==typeof i;if(s||o){const{height:t,width:n,x:a,y:u}=e.bbox();s&&(r=r.includes("left")?a:r.includes("right")?a+n:a+n/2),o&&(i=i.includes("top")?u:i.includes("bottom")?u+t:u+t/2)}return[r,i]}const b=new Set(["desc","metadata","title"]),v=t=>b.has(t.nodeName),w=(t,e,n={})=>{const r={...e};for(const t in r)r[t].valueOf()===n[t]&&delete r[t];Object.keys(r).length?t.node.setAttribute("data-svgjs",JSON.stringify(r)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},x="http://www.w3.org/2000/svg",S="http://www.w3.org/2000/xmlns/",_="http://www.w3.org/1999/xlink",P={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};class M{}const N={},O="___SYMBOL___ROOT___";function C(t,e=x){return P.document.createElementNS(e,t)}function E(t,e=!1){if(t instanceof M)return t;if("object"==typeof t)return j(t);if(null==t)return new N[O];if("string"==typeof t&&"<"!==t.charAt(0))return j(P.document.querySelector(t));const n=e?P.document.createElement("div"):C("svg");return n.innerHTML=t,t=j(n.firstChild),n.removeChild(n.firstChild),t}function T(t,e){return e&&(e instanceof P.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:C(t)}function A(t){if(!t)return null;if(t.instance instanceof M)return t.instance;if("#document-fragment"===t.nodeName)return new N.Fragment(t);let e=m(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":N[e]||(e="Dom"),new N[e](t)}let j=A;function k(t,e=t.name,n=!1){return N[e]=t,n&&(N[O]=t),d(Object.getOwnPropertyNames(t.prototype)),t}let D=1e3;function L(t){return"Svgjs"+m(t)+D++}function B(t){for(let e=t.children.length-1;e>=0;e--)B(t.children[e]);return t.id?(t.id=L(t.nodeName),t):t}function I(t,e){let n,r;for(r=(t=Array.isArray(t)?t:[t]).length-1;r>=0;r--)for(n in e)t[r].prototype[n]=e[n]}function F(t){return function(...e){const n=e[e.length-1];return!n||n.constructor!==Object||n instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(n)}}h("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=E(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=E(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=E(t)).before(this),this},insertAfter:function(t){return(t=E(t)).after(this),this}});const R=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,V=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,q=/rgb\((\d+),(\d+),(\d+)\)/,z=/(#[a-z_][a-z0-9\-_]*)/i,X=/\)\s*,?\s*/,G=/\s/g,Y=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,H=/^rgb\(/,U=/^(\s+)?$/,W=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,$=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,K=/[\s,]+/,Q=/[MLHVCSQTAZ]/i;function J(t){const e=Math.round(t),n=Math.max(0,Math.min(255,e)).toString(16);return 1===n.length?"0"+n:n}function Z(t,e){for(let n=e.length;n--;)if(null==t[e[n]])return!1;return!0}function tt(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}h("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(K)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),h("Dom",{css:function(t,e){const n={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const e=t.split(/\s*:\s*/);n[e[0]]=e[1]})),n;if(arguments.length<2){if(Array.isArray(t)){for(const e of t){const t=e;n[e]=this.node.style.getPropertyValue(t)}return n}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const e in t)this.node.style.setProperty(e,null==t[e]||U.test(t[e])?"":t[e])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||U.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),h("Dom",{data:function(t,e,n){if(null==t)return this.data(f(function(t){let e;const n=t.length,r=[];for(e=0;e<n;e++)0===t[e].nodeName.indexOf("data-")&&r.push(t[e]);return r}(this.node.attributes),(t=>t.nodeName.slice(5))));if(t instanceof Array){const e={};for(const n of t)e[n]=this.data(n);return e}if("object"==typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===n||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),h("Dom",{remember:function(t,e){if("object"==typeof arguments[0])for(const e in t)this.remember(e,t[e]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class et{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof et||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(t="vibrant",e){const{random:n,round:r,sin:i,PI:s}=Math;if("vibrant"===t){const t=24*n()+57,e=38*n()+45,r=360*n();return new et(t,e,r,"lch")}if("sine"===t){const t=r(80*i(2*s*(e=null==e?n():e)/.5+.01)+150),o=r(50*i(2*s*e/.5+4.6)+200),a=r(100*i(2*s*e/.5+2.3)+150);return new et(t,o,a)}if("pastel"===t){const t=8*n()+86,e=17*n()+9,r=360*n();return new et(t,e,r,"lch")}if("dark"===t){const t=10+10*n(),e=50*n()+86,r=360*n();return new et(t,e,r,"lch")}if("rgb"===t){const t=255*n(),e=255*n(),r=255*n();return new et(t,e,r)}if("lab"===t){const t=100*n(),e=256*n()-128,r=256*n()-128;return new et(t,e,r,"lab")}if("grey"===t){const t=255*n();return new et(t,t,t)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(Y.test(t)||H.test(t))}cmyk(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.min(1-r,1-i,1-s);return 1===o?new et(0,0,0,1,"cmyk"):new et((1-r-o)/(1-o),(1-i-o)/(1-o),(1-s-o)/(1-o),o,"cmyk")}hsl(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.max(r,i,s),a=Math.min(r,i,s),u=(o+a)/2,c=o===a,h=o-a;return new et(360*(c?0:o===r?((i-s)/h+(i<s?6:0))/6:o===i?((s-r)/h+2)/6:o===s?((r-i)/h+4)/6:0),100*(c?0:u>.5?h/(2-o-a):h/(o+a)),100*u,"hsl")}init(t=0,e=0,n=0,r=0,i="rgb"){if(t=t||0,this.space)for(const t in this.space)delete this[this.space[t]];if("number"==typeof t)i="string"==typeof r?r:i,r="string"==typeof r?0:r,Object.assign(this,{_a:t,_b:e,_c:n,_d:r,space:i});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const n=function(t,e){const n=Z(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:Z(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:Z(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:Z(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:Z(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:Z(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return n.space=e||n.space,n}(t,e);Object.assign(this,n)}else if("string"==typeof t)if(H.test(t)){const e=t.replace(G,""),[n,r,i]=q.exec(e).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}else{if(!Y.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,n,r,i]=V.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map(e);Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}}const{_a:s,_b:o,_c:a,_d:u}=this,c="rgb"===this.space?{r:s,g:o,b:a}:"xyz"===this.space?{x:s,y:o,z:a}:"hsl"===this.space?{h:s,s:o,l:a}:"lab"===this.space?{l:s,a:o,b:a}:"lch"===this.space?{l:s,c:o,h:a}:"cmyk"===this.space?{c:s,m:o,y:a,k:u}:{};Object.assign(this,c)}lab(){const{x:t,y:e,z:n}=this.xyz();return new et(116*e-16,500*(t-e),200*(e-n),"lab")}lch(){const{l:t,a:e,b:n}=this.lab(),r=Math.sqrt(e**2+n**2);let i=180*Math.atan2(n,e)/Math.PI;return i<0&&(i*=-1,i=360-i),new et(t,r,i,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(t=this.space)||"xyz"===t||"lch"===t){let{x:t,y:e,z:n}=this;if("lab"===this.space||"lch"===this.space){let{l:r,a:i,b:s}=this;if("lch"===this.space){const{c:t,h:e}=this,n=Math.PI/180;i=t*Math.cos(n*e),s=t*Math.sin(n*e)}const o=(r+16)/116,a=i/500+o,u=o-s/200,c=16/116,h=.008856,l=7.787;t=.95047*(a**3>h?a**3:(a-c)/l),e=1*(o**3>h?o**3:(o-c)/l),n=1.08883*(u**3>h?u**3:(u-c)/l)}const r=3.2406*t+-1.5372*e+-.4986*n,i=-.9689*t+1.8758*e+.0415*n,s=.0557*t+-.204*e+1.057*n,o=Math.pow,a=.0031308,u=r>a?1.055*o(r,1/2.4)-.055:12.92*r,c=i>a?1.055*o(i,1/2.4)-.055:12.92*i,h=s>a?1.055*o(s,1/2.4)-.055:12.92*s;return new et(255*u,255*c,255*h)}if("hsl"===this.space){let{h:t,s:e,l:n}=this;if(t/=360,e/=100,n/=100,0===e)return n*=255,new et(n,n,n);const r=n<.5?n*(1+e):n+e-n*e,i=2*n-r,s=255*tt(i,r,t+1/3),o=255*tt(i,r,t),a=255*tt(i,r,t-1/3);return new et(s,o,a)}if("cmyk"===this.space){const{c:t,m:e,y:n,k:r}=this,i=255*(1-Math.min(1,t*(1-r)+r)),s=255*(1-Math.min(1,e*(1-r)+r)),o=255*(1-Math.min(1,n*(1-r)+r));return new et(i,s,o)}return this;var t}toArray(){const{_a:t,_b:e,_c:n,_d:r,space:i}=this;return[t,e,n,r,i]}toHex(){const[t,e,n]=this._clamped().map(J);return`#${t}${e}${n}`}toRgb(){const[t,e,n]=this._clamped();return`rgb(${t},${e},${n})`}toString(){return this.toHex()}xyz(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,a=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,u=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,c=(.4124*o+.3576*a+.1805*u)/.95047,h=(.2126*o+.7152*a+.0722*u)/1,l=(.0193*o+.1192*a+.9505*u)/1.08883,d=c>.008856?Math.pow(c,1/3):7.787*c+16/116,f=h>.008856?Math.pow(h,1/3):7.787*h+16/116,p=l>.008856?Math.pow(l,1/3):7.787*l+16/116;return new et(d,f,p,"xyz")}_clamped(){const{_a:t,_b:e,_c:n}=this.rgb(),{max:r,min:i,round:s}=Math;return[t,e,n].map((t=>r(0,i(s(t),255))))}}class nt{constructor(...t){this.init(...t)}clone(){return new nt(this)}init(t,e){const n=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==n.x?0:n.x,this.y=null==n.y?0:n.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){it.isMatrixLike(t)||(t=new it(t));const{x:e,y:n}=this;return this.x=t.a*e+t.c*n+t.e,this.y=t.b*e+t.d*n+t.f,this}}function rt(t,e,n){return Math.abs(e-t)<(n||1e-6)}class it{constructor(...t){this.init(...t)}static formatTransforms(t){const e="both"===t.flip||!0===t.flip,n=t.flip&&(e||"x"===t.flip)?-1:1,r=t.flip&&(e||"y"===t.flip)?-1:1,i=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,s=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,o=t.scale&&t.scale.length?t.scale[0]*n:isFinite(t.scale)?t.scale*n:isFinite(t.scaleX)?t.scaleX*n:n,a=t.scale&&t.scale.length?t.scale[1]*r:isFinite(t.scale)?t.scale*r:isFinite(t.scaleY)?t.scaleY*r:r,u=t.shear||0,c=t.rotate||t.theta||0,h=new nt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),l=h.x,d=h.y,f=new nt(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=f.x,m=f.y,g=new nt(t.translate||t.tx||t.translateX,t.ty||t.translateY),y=g.x,b=g.y,v=new nt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:o,scaleY:a,skewX:i,skewY:s,shear:u,theta:c,rx:v.x,ry:v.y,tx:y,ty:b,ox:l,oy:d,px:p,py:m}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,e,n){const r=t.a*e.a+t.c*e.b,i=t.b*e.a+t.d*e.b,s=t.a*e.c+t.c*e.d,o=t.b*e.c+t.d*e.d,a=t.e+t.a*e.e+t.c*e.f,u=t.f+t.b*e.e+t.d*e.f;return n.a=r,n.b=i,n.c=s,n.d=o,n.e=a,n.f=u,n}around(t,e,n){return this.clone().aroundO(t,e,n)}aroundO(t,e,n){const r=t||0,i=e||0;return this.translateO(-r,-i).lmultiplyO(n).translateO(r,i)}clone(){return new it(this)}decompose(t=0,e=0){const n=this.a,r=this.b,i=this.c,s=this.d,o=this.e,a=this.f,u=n*s-r*i,c=u>0?1:-1,h=c*Math.sqrt(n*n+r*r),l=Math.atan2(c*r,c*n),d=180/Math.PI*l,f=Math.cos(l),p=Math.sin(l),m=(n*i+r*s)/u,g=i*h/(m*n-r)||s*h/(m*r+n);return{scaleX:h,scaleY:g,shear:m,rotate:d,translateX:o-t+t*f*h+e*(m*f*h-p*g),translateY:a-e+t*p*h+e*(m*p*h+f*g),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;const e=new it(t);return rt(this.a,e.a)&&rt(this.b,e.b)&&rt(this.c,e.c)&&rt(this.d,e.d)&&rt(this.e,e.e)&&rt(this.f,e.f)}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}init(t){const e=it.fromArray([1,0,0,1,0,0]);return t=t instanceof Ot?t.matrixify():"string"==typeof t?it.fromArray(t.split(K).map(parseFloat)):Array.isArray(t)?it.fromArray(t):"object"==typeof t&&it.isMatrixLike(t)?t:"object"==typeof t?(new it).transform(t):6===arguments.length?it.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,e=this.b,n=this.c,r=this.d,i=this.e,s=this.f,o=t*r-e*n;if(!o)throw new Error("Cannot invert "+this);const a=r/o,u=-e/o,c=-n/o,h=t/o,l=-(a*i+c*s),d=-(u*i+h*s);return this.a=a,this.b=u,this.c=c,this.d=h,this.e=l,this.f=d,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const e=t instanceof it?t:new it(t);return it.matrixMultiply(e,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const e=t instanceof it?t:new it(t);return it.matrixMultiply(this,e,this)}rotate(t,e,n){return this.clone().rotateO(t,e,n)}rotateO(t,e=0,n=0){t=p(t);const r=Math.cos(t),i=Math.sin(t),{a:s,b:o,c:a,d:u,e:c,f:h}=this;return this.a=s*r-o*i,this.b=o*r+s*i,this.c=a*r-u*i,this.d=u*r+a*i,this.e=c*r-h*i+n*i-e*r+e,this.f=h*r+c*i-e*i-n*r+n,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t);const{a:i,b:s,c:o,d:a,e:u,f:c}=this;return this.a=i*t,this.b=s*e,this.c=o*t,this.d=a*e,this.e=u*t-n*t+n,this.f=c*e-r*e+r,this}shear(t,e,n){return this.clone().shearO(t,e,n)}shearO(t,e=0,n=0){const{a:r,b:i,c:s,d:o,e:a,f:u}=this;return this.a=r+i*t,this.c=s+o*t,this.e=a+u*t-n*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t),t=p(t),e=p(e);const i=Math.tan(t),s=Math.tan(e),{a:o,b:a,c:u,d:c,e:h,f:l}=this;return this.a=o+a*i,this.b=a+o*s,this.c=u+c*i,this.d=c+u*s,this.e=h+l*i-r*i,this.f=l+h*s-n*s,this}skewX(t,e,n){return this.skew(t,0,e,n)}skewY(t,e,n){return this.skew(0,t,e,n)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(it.isMatrixLike(t))return new it(t).multiplyO(this);const e=it.formatTransforms(t),{x:n,y:r}=new nt(e.ox,e.oy).transform(this),i=(new it).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-n,-r).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(n,r);if(isFinite(e.px)||isFinite(e.py)){const t=new nt(n,r).transform(i),s=isFinite(e.px)?e.px-t.x:0,o=isFinite(e.py)?e.py-t.y:0;i.translateO(s,o)}return i.translateO(e.tx,e.ty),i}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function st(){if(!st.nodes){const t=E().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;st.nodes={svg:t,path:e}}if(!st.nodes.svg.node.parentNode){const t=P.document.body||P.document.documentElement;st.nodes.svg.addTo(t)}return st.nodes}function ot(t){return!(t.width||t.height||t.x||t.y)}k(it,"Matrix");class at{constructor(...t){this.init(...t)}addOffset(){return this.x+=P.window.pageXOffset,this.y+=P.window.pageYOffset,new at(this)}init(t){return t="string"==typeof t?t.split(K).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return ot(this)}merge(t){const e=Math.min(this.x,t.x),n=Math.min(this.y,t.y),r=Math.max(this.x+this.width,t.x+t.width)-e,i=Math.max(this.y+this.height,t.y+t.height)-n;return new at(e,n,r,i)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof it||(t=new it(t));let e=1/0,n=-1/0,r=1/0,i=-1/0;return[new nt(this.x,this.y),new nt(this.x2,this.y),new nt(this.x,this.y2),new nt(this.x2,this.y2)].forEach((function(s){s=s.transform(t),e=Math.min(e,s.x),n=Math.max(n,s.x),r=Math.min(r,s.y),i=Math.max(i,s.y)})),new at(e,r,n-e,i-r)}}function ut(t,e,n){let r;try{if(r=e(t.node),ot(r)&&(i=t.node)!==P.document&&!(P.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===P.document}).call(P.document.documentElement,i))throw new Error("Element not in the dom")}catch(e){r=n(t)}var i;return r}h({viewbox:{viewbox(t,e,n,r){return null==t?new at(this.attr("viewBox")):this.attr("viewBox",new at(t,e,n,r))},zoom(t,e){let{width:n,height:r}=this.attr(["width","height"]);if((n||r)&&"string"!=typeof n&&"string"!=typeof r||(n=this.node.clientWidth,r=this.node.clientHeight),!n||!r)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const i=this.viewbox(),s=n/i.width,o=r/i.height,a=Math.min(s,o);if(null==t)return a;let u=a/t;u===1/0&&(u=Number.MAX_SAFE_INTEGER/100),e=e||new nt(n/2/s+i.x,r/2/o+i.y);const c=new at(i).transform(new it({scale:u,origin:e}));return this.viewbox(c)}}}),k(at,"Box");class ct extends Array{constructor(t=[],...e){if(super(t,...e),"number"==typeof t)return this;this.length=0,this.push(...t)}}const ht=ct;I([ct],{each(t,...e){return"function"==typeof t?this.map(((e,n,r)=>t.call(e,e,n,r))):this.map((n=>n[t](...e)))},toArray(){return Array.prototype.concat.apply([],this)}});const lt=["toArray","constructor","each"];function dt(t,e){return new ht(f((e||P.document).querySelectorAll(t),(function(t){return A(t)})))}ct.extend=function(t){t=t.reduce(((t,e)=>(lt.includes(e)||"_"===e[0]||(e in Array.prototype&&(t["$"+e]=Array.prototype[e]),t[e]=function(...t){return this.each(e,...t)}),t)),{}),I([ct],t)};let ft=0;const pt={};function mt(t){let e=t.getEventHolder();return e===P.window&&(e=pt),e.events||(e.events={}),e.events}function gt(t){return t.getEventTarget()}function yt(t,e,n,r,i){const s=n.bind(r||t),o=E(t),a=mt(o),u=gt(o);e=Array.isArray(e)?e:e.split(K),n._svgjsListenerId||(n._svgjsListenerId=++ft),e.forEach((function(t){const e=t.split(".")[0],r=t.split(".")[1]||"*";a[e]=a[e]||{},a[e][r]=a[e][r]||{},a[e][r][n._svgjsListenerId]=s,u.addEventListener(e,s,i||!1)}))}function bt(t,e,n,r){const i=E(t),s=mt(i),o=gt(i);("function"!=typeof n||(n=n._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(K)).forEach((function(t){const e=t&&t.split(".")[0],a=t&&t.split(".")[1];let u,c;if(n)s[e]&&s[e][a||"*"]&&(o.removeEventListener(e,s[e][a||"*"][n],r||!1),delete s[e][a||"*"][n]);else if(e&&a){if(s[e]&&s[e][a]){for(c in s[e][a])bt(o,[e,a].join("."),c);delete s[e][a]}}else if(a)for(t in s)for(u in s[t])a===u&&bt(o,[t,a].join("."));else if(e){if(s[e]){for(u in s[e])bt(o,[e,u].join("."));delete s[e]}}else{for(t in s)bt(o,t);!function(t){let e=t.getEventHolder();e===P.window&&(e=pt),e.events&&(e.events={})}(i)}}))}class vt extends M{addEventListener(){}dispatch(t,e,n){return function(t,e,n,r){const i=gt(t);return e instanceof P.window.Event||(e=new P.window.CustomEvent(e,{detail:n,cancelable:!0,...r})),i.dispatchEvent(e),e}(this,t,e,n)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const n=e[t.type];for(const e in n)for(const r in n[e])n[e][r](t);return!t.defaultPrevented}fire(t,e,n){return this.dispatch(t,e,n),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e,n){return bt(this,t,e,n),this}on(t,e,n,r){return yt(this,t,e,n,r),this}removeEventListener(){}}function wt(){}k(vt,"EventTarget");const xt={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class St extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(K).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}}class _t{constructor(...t){this.init(...t)}convert(t){return new _t(this.value,t)}divide(t){return t=new _t(t),new _t(this/t,this.unit||t.unit)}init(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(R))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof _t&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new _t(t),new _t(this-t,this.unit||t.unit)}plus(t){return t=new _t(t),new _t(this+t,this.unit||t.unit)}times(t){return t=new _t(t),new _t(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const Pt=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),Mt=[];class Nt extends vt{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return(t=E(t)).removeNamespace&&this.node instanceof P.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t,e){return E(t).put(this,e)}children(){return new ht(f(this.node.children,(function(t){return A(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,e=!0){this.writeDataToDom();let n=this.node.cloneNode(t);return e&&(n=B(n)),new this.constructor(n)}each(t,e){const n=this.children();let r,i;for(r=0,i=n.length;r<i;r++)t.apply(n[r],[r,n]),e&&n[r].each(t,e);return this}element(t,e){return this.put(new Nt(C(t),e))}first(){return A(this.node.firstChild)}get(t){return A(this.node.childNodes[t])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(t){return this.index(t)>=0}html(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=L(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return A(this.node.lastChild)}matches(t){const e=this.node,n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return n&&n.call(e,t)}parent(t){let e=this;if(!e.node.parentNode)return null;if(e=A(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=A(e.node.parentNode));return e}put(t,e){return t=E(t),this.add(t,e),t}putIn(t,e){return E(t).add(this,e)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=E(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e=null){const n=10**t,r=this.attr(e);for(const t in r)"number"==typeof r[t]&&(r[t]=Math.round(r[t]*n)/n);return this.attr(r),this}svg(t,e){return this.xml(t,e,x)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const e=this.parent();if(!e)return this.addTo(t);const n=e.index(this);return e.put(t,n).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();let n=this;if(null!=t){if(n=A(n.node.cloneNode(!0)),e){const e=t(n);if(n=e||n,!1===e)return""}n.each((function(){const e=t(this),n=e||this;!1===e?this.remove():e&&this!==n&&this.replace(n)}),!0)}return e?n.node.outerHTML:n.node.innerHTML}e=null!=e&&e;const r=C("wrapper",n),i=P.document.createDocumentFragment();r.innerHTML=t;for(let t=r.children.length;t--;)i.appendChild(r.firstElementChild);const s=this.parent();return e?this.replace(i)&&s:this.add(i)}}I(Nt,{attr:function(t,e,n){if(null==t){t={},e=this.node.attributes;for(const n of e)t[n.nodeName]=W.test(n.nodeValue)?parseFloat(n.nodeValue):n.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,e)=>(t[e]=this.attr(e),t)),{});if("object"==typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?xt[t]:W.test(e)?parseFloat(e):e;"number"==typeof(e=Mt.reduce(((e,n)=>n(t,e,this)),e))?e=new _t(e):Pt.has(t)&&et.isColor(e)?e=new et(e):e.constructor===Array&&(e=new St(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof n?this.node.setAttributeNS(n,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return dt(t,this.node)},findOne:function(t){return A(this.node.querySelector(t))}}),k(Nt,"Dom");class Ot extends Nt{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new _t(t).plus(this.x()))}dy(t=0){return this.y(new _t(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e="string"==typeof t;e||(t=E(t));const n=new ht;let r=this;for(;(r=r.parent())&&r.node!==P.document&&"#document-fragment"!==r.nodeName&&(n.push(r),e||r.node!==t.node)&&(!e||!r.matches(t));)if(r.node===this.root().node)return null;return n}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(z);return e?E(e[1]):null}root(){const t=this.parent(N[O]);return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const n=g(this,t,e);return this.width(new _t(n.width)).height(new _t(n.height))}width(t){return this.attr("width",t)}writeDataToDom(){return w(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}I(Ot,{bbox:function(){const t=ut(this,(t=>t.getBBox()),(t=>{try{const e=t.clone().addTo(st().svg).show(),n=e.node.getBBox();return e.remove(),n}catch(e){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${e.toString()}`)}}));return new at(t)},rbox:function(t){const e=ut(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),n=new at(e);return t?n.transform(t.screenCTM().inverseO()):n.addOffset()},inside:function(t,e){const n=this.bbox();return t>n.x&&e>n.y&&t<n.x+n.width&&e<n.y+n.height},point:function(t,e){return new nt(t,e).transformO(this.screenCTM().inverseO())},ctm:function(){return new it(this.node.getCTM())},screenCTM:function(){try{if("function"==typeof this.isRoot&&!this.isRoot()){const t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new it(e)}return new it(this.node.getScreenCTM())}catch(t){return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new it}}}),k(Ot,"Element");const Ct={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return"color"===e?t:t+"-"+e}};["fill","stroke"].forEach((function(t){const e={};let n;e[t]=function(e){if(void 0===e)return this.attr(t);if("string"==typeof e||e instanceof et||et.isRgb(e)||e instanceof Ot)this.attr(t,e);else for(n=Ct[t].length-1;n>=0;n--)null!=e[Ct[t][n]]&&this.attr(Ct.prefix(t,Ct[t][n]),e[Ct[t][n]]);return this},h(["Element","Runner"],e)})),h(["Element","Runner"],{matrix:function(t,e,n,r,i,s){return null==t?new it(this):this.attr("transform",new it(t,e,n,r,i,s))},rotate:function(t,e,n){return this.transform({rotate:t,ox:e,oy:n},!0)},skew:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:n},!0):this.transform({skew:[t,e],ox:n,oy:r},!0)},shear:function(t,e,n){return this.transform({shear:t,ox:e,oy:n},!0)},scale:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:n},!0):this.transform({scale:[t,e],ox:n,oy:r},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),h("radius",{radius:function(t,e=t){return"radialGradient"===(this._element||this).type?this.attr("r",new _t(t)):this.rx(t).ry(e)}}),h("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new nt(this.node.getPointAtLength(t))}}),h(["Element","Runner"],{font:function(t,e){if("object"==typeof t){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}}),h("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),h("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(X).slice(0,-1).map((function(t){const e=t.trim().split("(");return[e[0],e[1].split(K).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(it.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new it)},toParent:function(t,e){if(this===t)return this;if(v(this.node))return this.addTo(t,e);const n=this.screenCTM(),r=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(r.multiply(n)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){const e=new it(this).decompose();return null==t?e:e[t]}it.isMatrixLike(t)||(t={...t,origin:y(t,this)});const n=new it(!0===e?this:e||!1).transform(t);return this.attr("transform",n)}});class Et extends Ot{flatten(){return this.each((function(){if(this instanceof Et)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),e=t.index(this)){return e=-1===e?t.children().length:e,this.each((function(n,r){return r[r.length-n-1].toParent(t,e)})),this.remove()}}k(Et,"Container");class Tt extends Et{constructor(t,e=t){super(T("defs",t),e)}flatten(){return this}ungroup(){return this}}k(Tt,"Defs");class At extends Ot{}function jt(t){return this.attr("rx",t)}function kt(t){return this.attr("ry",t)}function Dt(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Lt(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Bt(t){return this.attr("cx",t)}function It(t){return this.attr("cy",t)}function Ft(t){return null==t?2*this.rx():this.rx(new _t(t).divide(2))}function Rt(t){return null==t?2*this.ry():this.ry(new _t(t).divide(2))}k(At,"Shape");class Vt extends At{constructor(t,e=t){super(T("ellipse",t),e)}size(t,e){const n=g(this,t,e);return this.rx(new _t(n.width).divide(2)).ry(new _t(n.height).divide(2))}}I(Vt,t),h("Container",{ellipse:F((function(t=0,e=t){return this.put(new Vt).size(t,e).move(0,0)}))}),k(Vt,"Ellipse");class qt extends Nt{constructor(t=P.document.createDocumentFragment()){super(t)}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){const t=new Nt(C("wrapper",n));return t.add(this.node.cloneNode(!0)),t.xml(!1,n)}return super.xml(t,!1,n)}}k(qt,"Fragment");const zt=qt;function Xt(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new _t(t),fy:new _t(e)}):this.attr({x1:new _t(t),y1:new _t(e)})}function Gt(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new _t(t),cy:new _t(e)}):this.attr({x2:new _t(t),y2:new _t(e)})}class Yt extends Et{constructor(t,e){super(T(t+"Gradient","string"==typeof t?null:t),e)}attr(t,e,n){return"transform"===t&&(t="gradientTransform"),super.attr(t,e,n)}bbox(){return new at}targets(){return dt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}I(Yt,e),h({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:F((function(t,e){return this.put(new Yt(t)).update(e)}))}}),k(Yt,"Gradient");class Ht extends Et{constructor(t,e=t){super(T("pattern",t),e)}attr(t,e,n){return"transform"===t&&(t="patternTransform"),super.attr(t,e,n)}bbox(){return new at}targets(){return dt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}h({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:F((function(t,e,n){return this.put(new Ht).update(n).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),k(Ht,"Pattern");class Ut extends At{constructor(t,e=t){super(T("image",t),e)}load(t,e){if(!t)return this;const n=new P.window.Image;return yt(n,"load",(function(t){const r=this.parent(Ht);0===this.width()&&0===this.height()&&this.size(n.width,n.height),r instanceof Ht&&0===r.width()&&0===r.height()&&r.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),yt(n,"load error",(function(){bt(n)})),this.attr("href",n.src=t,_)}}var Wt;Wt=function(t,e,n){return"fill"!==t&&"stroke"!==t||$.test(e)&&(e=n.root().defs().image(e)),e instanceof Ut&&(e=n.root().defs().pattern(0,0,(t=>{t.add(e)}))),e},Mt.push(Wt),h({Container:{image:F((function(t,e){return this.put(new Ut).size(0,0).load(t,e)}))}}),k(Ut,"Image");class $t extends St{bbox(){let t=-1/0,e=-1/0,n=1/0,r=1/0;return this.forEach((function(i){t=Math.max(i[0],t),e=Math.max(i[1],e),n=Math.min(i[0],n),r=Math.min(i[1],r)})),new at(n,r,t-n,e-r)}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let n=this.length-1;n>=0;n--)this[n]=[this[n][0]+t,this[n][1]+e];return this}parse(t=[0,0]){const e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(K).map(parseFloat)).length%2!=0&&t.pop();for(let n=0,r=t.length;n<r;n+=2)e.push([t[n],t[n+1]]);return e}size(t,e){let n;const r=this.bbox();for(n=this.length-1;n>=0;n--)r.width&&(this[n][0]=(this[n][0]-r.x)*t/r.width+r.x),r.height&&(this[n][1]=(this[n][1]-r.y)*e/r.height+r.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let e=0,n=this.length;e<n;e++)t.push(this[e].join(","));return t.join(" ")}transform(t){return this.clone().transformO(t)}transformO(t){it.isMatrixLike(t)||(t=new it(t));for(let e=this.length;e--;){const[n,r]=this[e];this[e][0]=t.a*n+t.c*r+t.e,this[e][1]=t.b*n+t.d*r+t.f}return this}}const Kt=$t;function Qt(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}function Jt(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}function Zt(t){const e=this.bbox();return null==t?e.width:this.size(t,e.height)}function te(t){const e=this.bbox();return null==t?e.height:this.size(e.width,t)}class ee extends At{constructor(t,e=t){super(T("line",t),e)}array(){return new $t([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(t,e){return this.attr(this.array().move(t,e).toLine())}plot(t,e,n,r){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:n,y2:r}:new $t(t).toLine(),this.attr(t))}size(t,e){const n=g(this,t,e);return this.attr(this.array().size(n.width,n.height).toLine())}}I(ee,i),h({Container:{line:F((function(...t){return ee.prototype.plot.apply(this.put(new ee),null!=t[0]?t:[0,0,0,0])}))}}),k(ee,"Line");class ne extends Et{constructor(t,e=t){super(T("marker",t),e)}height(t){return this.attr("markerHeight",t)}orient(t){return this.attr("orient",t)}ref(t,e){return this.attr("refX",t).attr("refY",e)}toString(){return"url(#"+this.id()+")"}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}width(t){return this.attr("markerWidth",t)}}function re(t,e){return function(n){return null==n?this[t]:(this[t]=n,e&&e.call(this),this)}}h({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:F((function(t,e,n){return this.put(new ne).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(n)}))},marker:{marker(t,e,n,r){let i=["marker"];return"all"!==t&&i.push(t),i=i.join("-"),t=arguments[1]instanceof ne?arguments[1]:this.defs().marker(e,n,r),this.attr(i,t)}}}),k(ne,"Marker");const ie={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,n,r){return function(i){return i<0?t>0?e/t*i:n>0?r/n*i:0:i>1?n<1?(1-r)/(1-n)*i+(r-n)/(1-n):t<1?(1-e)/(1-t)*i+(e-t)/(1-t):1:3*i*(1-i)**2*e+3*i**2*(1-i)*r+i**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let n=t;return"none"===e?--n:"both"===e&&++n,(r,i=!1)=>{let s=Math.floor(r*t);const o=r*s%1==0;return"start"!==e&&"both"!==e||++s,i&&o&&--s,r>=0&&s<0&&(s=0),r<=1&&s>n&&(s=n),s/n}}};class se{done(){return!1}}class oe extends se{constructor(t=">"){super(),this.ease=ie[t]||t}step(t,e,n){return"number"!=typeof t?n<1?t:e:t+(e-t)*this.ease(n)}}class ae extends se{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,n,r){return this.stepper(t,e,n,r)}}function ue(){const t=(this._duration||500)/1e3,e=this._overshoot||0,n=Math.PI,r=Math.log(e/100+1e-10),i=-r/Math.sqrt(n*n+r*r),s=3.9/(i*t);this.d=2*i*s,this.k=s*s}I(class extends ae{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;n>100&&(n=16),n/=1e3;const i=r.velocity||0,s=-this.d*i-this.k*(t-e),o=t+i*n+s*n*n/2;return r.velocity=i+s*n,r.done=Math.abs(e-o)+Math.abs(i)<.002,r.done?e:o}},{duration:re("_duration",ue),overshoot:re("_overshoot",ue)}),I(class extends ae{constructor(t=.1,e=.01,n=0,r=1e3){super(),this.p(t).i(e).d(n).windup(r)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;const i=e-t;let s=(r.integral||0)+i*n;const o=(i-(r.error||0))/n,a=this._windup;return!1!==a&&(s=Math.max(-a,Math.min(s,a))),r.error=i,r.integral=s,r.done=Math.abs(i)<.001,r.done?e:t+(this.P*i+this.I*s+this.D*o)}},{windup:re("_windup"),p:re("P"),i:re("I"),d:re("D")});const ce={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},he={M:function(t,e,n){return e.x=n.x=t[0],e.y=n.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,n){return e.x=n.x,e.y=n.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},le="mlhvqtcsaz".split("");for(let t=0,e=le.length;t<e;++t)he[le[t]]=function(t){return function(e,n,r){if("H"===t)e[0]=e[0]+n.x;else if("V"===t)e[0]=e[0]+n.y;else if("A"===t)e[5]=e[5]+n.x,e[6]=e[6]+n.y;else for(let t=0,r=e.length;t<r;++t)e[t]=e[t]+(t%2?n.y:n.x);return he[t](e,n,r)}}(le[t].toUpperCase());function de(t){return t.segment.length&&t.segment.length-1===ce[t.segment[0].toUpperCase()]}function fe(t,e){t.inNumber&&pe(t,!1);const n=Q.test(e);if(n)t.segment=[e];else{const e=t.lastCommand,n=e.toLowerCase(),r=e===n;t.segment=["m"===n?r?"l":"L":e]}return t.inSegment=!0,t.lastCommand=t.segment[0],n}function pe(t,e){if(!t.inNumber)throw new Error("Parser Error");t.number&&t.segment.push(parseFloat(t.number)),t.inNumber=e,t.number="",t.pointSeen=!1,t.hasExponent=!1,de(t)&&me(t)}function me(t){t.inSegment=!1,t.absolute&&(t.segment=function(t){const e=t.segment[0];return he[e](t.segment.slice(1),t.p,t.p0)}(t)),t.segments.push(t.segment)}function ge(t){if(!t.segment.length)return!1;const e="A"===t.segment[0].toUpperCase(),n=t.segment.length;return e&&(4===n||5===n)}function ye(t){return"E"===t.lastToken.toUpperCase()}const be=new Set([" ",",","\t","\n","\r","\f"]);class ve extends St{bbox(){return st().path.setAttribute("d",this.toString()),new at(st.nodes.path.getBBox())}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let n,r=this.length-1;r>=0;r--)n=this[r][0],"M"===n||"L"===n||"T"===n?(this[r][1]+=t,this[r][2]+=e):"H"===n?this[r][1]+=t:"V"===n?this[r][1]+=e:"C"===n||"S"===n||"Q"===n?(this[r][1]+=t,this[r][2]+=e,this[r][3]+=t,this[r][4]+=e,"C"===n&&(this[r][5]+=t,this[r][6]+=e)):"A"===n&&(this[r][6]+=t,this[r][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,e=!0){let n=0,r="";const i={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new nt,p:new nt};for(;i.lastToken=r,r=t.charAt(n++);)if(i.inSegment||!fe(i,r))if("."!==r)if(isNaN(parseInt(r)))if(be.has(r))i.inNumber&&pe(i,!1);else if("-"!==r&&"+"!==r)if("E"!==r.toUpperCase()){if(Q.test(r)){if(i.inNumber)pe(i,!1);else{if(!de(i))throw new Error("parser Error");me(i)}--n}}else i.number+=r,i.hasExponent=!0;else{if(i.inNumber&&!ye(i)){pe(i,!1),--n;continue}i.number+=r,i.inNumber=!0}else{if("0"===i.number||ge(i)){i.inNumber=!0,i.number=r,pe(i,!0);continue}i.inNumber=!0,i.number+=r}else{if(i.pointSeen||i.hasExponent){pe(i,!1),--n;continue}i.inNumber=!0,i.pointSeen=!0,i.number+=r}return i.inNumber&&pe(i,!1),i.inSegment&&de(i)&&me(i),i.segments}(t)}size(t,e){const n=this.bbox();let r,i;for(n.width=0===n.width?1:n.width,n.height=0===n.height?1:n.height,r=this.length-1;r>=0;r--)i=this[r][0],"M"===i||"L"===i||"T"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y):"H"===i?this[r][1]=(this[r][1]-n.x)*t/n.width+n.x:"V"===i?this[r][1]=(this[r][1]-n.y)*e/n.height+n.y:"C"===i||"S"===i||"Q"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y,this[r][3]=(this[r][3]-n.x)*t/n.width+n.x,this[r][4]=(this[r][4]-n.y)*e/n.height+n.y,"C"===i&&(this[r][5]=(this[r][5]-n.x)*t/n.width+n.x,this[r][6]=(this[r][6]-n.y)*e/n.height+n.y)):"A"===i&&(this[r][1]=this[r][1]*t/n.width,this[r][2]=this[r][2]*e/n.height,this[r][6]=(this[r][6]-n.x)*t/n.width+n.x,this[r][7]=(this[r][7]-n.y)*e/n.height+n.y);return this}toString(){return function(t){let e="";for(let n=0,r=t.length;n<r;n++)e+=t[n][0],null!=t[n][1]&&(e+=t[n][1],null!=t[n][2]&&(e+=" ",e+=t[n][2],null!=t[n][3]&&(e+=" ",e+=t[n][3],e+=" ",e+=t[n][4],null!=t[n][5]&&(e+=" ",e+=t[n][5],e+=" ",e+=t[n][6],null!=t[n][7]&&(e+=" ",e+=t[n][7])))));return e+" "}(this)}}const we=t=>{const e=typeof t;return"number"===e?_t:"string"===e?et.isColor(t)?et:K.test(t)?Q.test(t)?ve:St:R.test(t)?_t:Se:Ne.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?St:"object"===e?Me:Se};class xe{constructor(t){this._stepper=t||new oe("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(we(t));let e=new this._type(t);return this._type===et&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===Me&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}class Se{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}}class _e{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,_e.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}_e.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const Pe=(t,e)=>t[0]<e[0]?-1:t[0]>e[0]?1:0;class Me{constructor(...t){this.init(...t)}align(t){const e=this.values;for(let n=0,r=e.length;n<r;++n){if(e[n+1]===t[n+1]){if(e[n+1]===et&&t[n+7]!==e[n+7]){const e=t[n+7],r=new et(this.values.splice(n+3,5))[e]().toArray();this.values.splice(n+3,0,...r)}n+=e[n+2]+2;continue}if(!t[n+1])return this;const r=(new t[n+1]).toArray(),i=e[n+2]+3;e.splice(n,i,t[n],t[n+1],t[n+2],...r),n+=e[n+2]+2}return this}init(t){if(this.values=[],Array.isArray(t))return void(this.values=t.slice());t=t||{};const e=[];for(const n in t){const r=we(t[n]),i=new r(t[n]).toArray();e.push([n,r,i.length,...i])}return e.sort(Pe),this.values=e.reduce(((t,e)=>t.concat(e)),[]),this}toArray(){return this.values}valueOf(){const t={},e=this.values;for(;e.length;){const n=e.shift(),r=e.shift(),i=e.shift(),s=e.splice(0,i);t[n]=new r(s)}return t}}const Ne=[Se,_e,Me];class Oe extends At{constructor(t,e=t){super(T("path",t),e)}array(){return this._array||(this._array=new ve(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,e){return this.attr("d",this.array().move(t,e))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new ve(t))}size(t,e){const n=g(this,t,e);return this.attr("d",this.array().size(n.width,n.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}function Ce(){return this._array||(this._array=new $t(this.attr("points")))}function Ee(){return delete this._array,this}function Te(t,e){return this.attr("points",this.array().move(t,e))}function Ae(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new $t(t))}function je(t,e){const n=g(this,t,e);return this.attr("points",this.array().size(n.width,n.height))}Oe.prototype.MorphArray=ve,h({Container:{path:F((function(t){return this.put(new Oe).plot(t||new ve)}))}}),k(Oe,"Path");class ke extends At{constructor(t,e=t){super(T("polygon",t),e)}}h({Container:{polygon:F((function(t){return this.put(new ke).plot(t||new $t)}))}}),I(ke,i),I(ke,s),k(ke,"Polygon");class De extends At{constructor(t,e=t){super(T("polyline",t),e)}}h({Container:{polyline:F((function(t){return this.put(new De).plot(t||new $t)}))}}),I(De,i),I(De,s),k(De,"Polyline");class Le extends At{constructor(t,e=t){super(T("rect",t),e)}}I(Le,{rx:jt,ry:kt}),h({Container:{rect:F((function(t,e){return this.put(new Le).size(t,e)}))}}),k(Le,"Rect");class Be{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const e=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}const Ie={nextDraw:null,frames:new Be,timeouts:new Be,immediates:new Be,timer:()=>P.window.performance||P.window.Date,transforms:[],frame(t){const e=Ie.frames.push({run:t});return null===Ie.nextDraw&&(Ie.nextDraw=P.window.requestAnimationFrame(Ie._draw)),e},timeout(t,e){e=e||0;const n=Ie.timer().now()+e,r=Ie.timeouts.push({run:t,time:n});return null===Ie.nextDraw&&(Ie.nextDraw=P.window.requestAnimationFrame(Ie._draw)),r},immediate(t){const e=Ie.immediates.push(t);return null===Ie.nextDraw&&(Ie.nextDraw=P.window.requestAnimationFrame(Ie._draw)),e},cancelFrame(t){null!=t&&Ie.frames.remove(t)},clearTimeout(t){null!=t&&Ie.timeouts.remove(t)},cancelImmediate(t){null!=t&&Ie.immediates.remove(t)},_draw(t){let e=null;const n=Ie.timeouts.last();for(;(e=Ie.timeouts.shift())&&(t>=e.time?e.run():Ie.timeouts.push(e),e!==n););let r=null;const i=Ie.frames.last();for(;r!==i&&(r=Ie.frames.shift());)r.run(t);let s=null;for(;s=Ie.immediates.shift();)s();Ie.nextDraw=Ie.timeouts.first()||Ie.frames.first()?P.window.requestAnimationFrame(Ie._draw):null}},Fe=Ie,Re=function(t){const e=t.start,n=t.runner.duration();return{start:e,duration:n,end:e+n,runner:t.runner}},Ve=function(){const t=P.window;return(t.performance||t.Date).now()};class qe extends vt{constructor(t=Ve){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const e=this.speed();if(null==t)return this.speed(-e);const n=Math.abs(e);return this.speed(t?-n:n)}schedule(t,e,n){if(null==t)return this._runners.map(Re);let r=0;const i=this.getEndTime();if(e=e||0,null==n||"last"===n||"after"===n)r=i;else if("absolute"===n||"start"===n)r=e,e=0;else if("now"===n)r=this._time;else if("relative"===n){const n=this.getRunnerInfoById(t.id);n&&(r=n.start+e,e=0)}else{if("with-last"!==n)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();r=t?t.start:this._time}}t.unschedule(),t.timeline(this);const s=t.persist(),o={persist:null===s?this._persist:s,start:r+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(o),this._runners.sort(((t,e)=>t.start-e.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return Fe.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=Fe.frame(this._step)),this)}_stepFn(t=!1){const e=this._timeSource();let n=e-this._lastSourceTime;t&&(n=0);const r=this._speed*n+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=r,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let t=this._runners.length;t--;){const e=this._runners[t],n=e.runner;this._time-e.start<=0&&n.reset()}let i=!1;for(let t=0,e=this._runners.length;t<e;t++){const n=this._runners[t],s=n.runner;let o=r;const a=this._time-n.start;a<=0?i=!0:(a<o&&(o=a),s.active()&&(s.step(o).done?!0!==n.persist&&s.duration()-s.time()+this._time+n.persist<this._time&&(s.unschedule(),--t,--e):i=!0))}return i&&!(this._speed<0&&0===this._time)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}h({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new qe,this._timeline):(this._timeline=t,this)}}});class ze extends vt{constructor(t){super(),this.id=ze.id++,t="function"==typeof(t=null==t?400:t)?new ae(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof ae,this._stepper=this._isDeclarative?t:new oe,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new it,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,e,n){let r=1,i=!1,s=0;return e=e??0,n=n||"last","object"!=typeof(t=t??400)||t instanceof se||(e=t.delay??e,n=t.when??n,i=t.swing||i,r=t.times??r,s=t.wait??s,t=t.duration??400),{duration:t,delay:e,swing:i,times:r,wait:s,when:n}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(t,e,n){const r=ze.sanitise(t,e,n),i=new ze(r.duration);return this._timeline&&i.timeline(this._timeline),this._element&&i.element(this._element),i.loop(r).schedule(r.delay,r.when)}clearTransform(){return this.transforms=new it,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new oe(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,e,n){return"object"==typeof t&&(e=t.swing,n=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=n||0,!0===this._times&&(this._times=1/0),this}loops(t){const e=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/e),n=(this._time-t*e)/this._duration;return Math.min(t+n,this._times)}const n=t%1,r=e*Math.floor(t)+this._duration*n;return this.time(r)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,n=this._duration,r=this._wait,i=this._times,s=this._swing,o=this._reverse;let a;if(null==t){const t=function(t){const e=s*Math.floor(t%(2*(r+n))/(r+n)),i=e&&!o||!e&&o,a=Math.pow(-1,i)*(t%(r+n))/n+i;return Math.max(Math.min(a,1),0)},u=i*(r+n)-r;return a=e<=0?Math.round(t(1e-5)):e<u?t(e):Math.round(t(u-1e-5)),a}const u=Math.floor(this.loops()),c=s&&u%2==0;return a=u+(c&&!o||o&&c?t:1-t),this.loops(a)}progress(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}queue(t,e,n,r){return this._queue.push({initialiser:t||wt,runner:e||wt,retarget:n,isTransform:r,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted||(this.time(0),this._reseted=!0),this}reverse(t){return this._reverse=null==t?!this._reverse:t,this}schedule(t,e,n){if(t instanceof qe||(n=e,e=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,e,n),this}step(t){if(!this.enabled)return this;t=null==t?16:t,this._time+=t;const e=this.position(),n=this._lastPosition!==e&&this._time>=0;this._lastPosition=e;const r=this.duration(),i=this._lastTime<=0&&this._time>0,s=this._lastTime<r&&this._time>=r;this._lastTime=this._time,i&&this.fire("start",this);const o=this._isDeclarative;this.done=!o&&!s&&this._time>=r,this._reseted=!1;let a=!1;return(n||o)&&(this._initialise(n),this.transforms=new it,a=this._run(o?t:e),this.fire("step",this)),this.done=this.done||a&&o,s&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const e=t-this._time;return this.step(e),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let e=0,n=this._queue.length;e<n;++e){const n=this._queue[e],r=this._isDeclarative||!n.initialised&&t;t=!n.finished,r&&t&&(n.initialiser.call(this),n.initialised=!0)}}_rememberMorpher(t,e){if(this._history[t]={morpher:e,caller:this._queue[this._queue.length-1]},this._isDeclarative){const t=this.timeline();t&&t.play()}}_run(t){let e=!0;for(let n=0,r=this._queue.length;n<r;++n){const r=this._queue[n],i=r.runner.call(this,t);r.finished=r.finished||!0===i,e=e&&r.finished}return e}_tryRetarget(t,e,n){if(this._history[t]){if(!this._history[t].caller.initialised){const e=this._queue.indexOf(this._history[t].caller);return this._queue.splice(e,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget.call(this,e,n):this._history[t].morpher.to(e),this._history[t].caller.finished=!1;const r=this.timeline();return r&&r.play(),!0}return!1}}ze.id=0;class Xe{constructor(t=new it,e=-1,n=!0){this.transforms=t,this.id=e,this.done=n}clearTransformsFromQueue(){}}I([ze,Xe],{mergeWith(t){return new Xe(t.transforms.lmultiply(this.transforms),t.id)}});const Ge=(t,e)=>t.lmultiplyO(e),Ye=t=>t.transforms;function He(){const t=this._transformationRunners.runners.map(Ye).reduce(Ge,new it);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class Ue{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new Xe).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,e){const n=this.ids.indexOf(t+1);return this.ids.splice(n,1,t+1),this.runners.splice(n,1,e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let e=0;e<this.runners.length;++e){const n=this.runners[e];if(!(t&&n.done&&t.done)||n._timeline&&n._timeline._runnerIds.includes(n.id)||t._timeline&&t._timeline._runnerIds.includes(t.id))t=n;else{this.remove(n.id);const r=n.mergeWith(t);this.edit(t.id,r),t=r,--e}}return this}remove(t){const e=this.ids.indexOf(t+1);return this.ids.splice(e,1),this.runners.splice(e,1),this}}h({Element:{animate(t,e,n){const r=ze.sanitise(t,e,n),i=this.timeline();return new ze(r.duration).loop(r).element(this).timeline(i.play()).schedule(r.delay,r.when)},delay(t,e){return this.animate(0,t,e)},_clearTransformRunnersBefore(t){this._transformationRunners.clearBefore(t.id)},_currentTransform(t){return this._transformationRunners.runners.filter((e=>e.id<=t.id)).map(Ye).reduce(Ge,new it)},_addRunner(t){this._transformationRunners.add(t),Fe.cancelImmediate(this._frameId),this._frameId=Fe.immediate(He.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new Ue).add(new Xe(new it(this))))}}}),I(ze,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,n){if("string"==typeof e)return this.styleAttr(t,{[e]:n});let r=e;if(this._tryRetarget(t,r))return this;let i=new xe(this._stepper).to(r),s=Object.keys(r);return this.queue((function(){i=i.from(this.element()[t](s))}),(function(e){return this.element()[t](i.at(e).valueOf()),i.done()}),(function(e){const n=Object.keys(e),o=(a=s,n.filter((t=>!a.includes(t))));var a;if(o.length){const e=this.element()[t](o),n=new Me(i.from()).valueOf();Object.assign(n,e),i.from(n)}const u=new Me(i.to()).valueOf();Object.assign(u,e),i.to(u),s=n,r=e})),this._rememberMorpher(t,i),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let n=new xe(this._stepper).to(new _t(t));return this.queue((function(){n=n.from(this.element().zoom())}),(function(t){return this.element().zoom(n.at(t),e),n.done()}),(function(t,r){e=r,n.to(t)})),this._rememberMorpher("zoom",n),this},transform(t,e,n){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const r=it.isMatrixLike(t);n=null!=t.affine?t.affine:null!=n?n:!r;const i=new xe(this._stepper).type(n?_e:it);let s,o,a,u,c;return this.queue((function(){o=o||this.element(),s=s||y(t,o),c=new it(e?void 0:o),o._addRunner(this),e||o._clearTransformRunnersBefore(this)}),(function(h){e||this.clearTransform();const{x:l,y:d}=new nt(s).transform(o._currentTransform(this));let f=new it({...t,origin:[l,d]}),p=this._isDeclarative&&a?a:c;if(n){f=f.decompose(l,d),p=p.decompose(l,d);const t=f.rotate,e=p.rotate,n=[t-360,t,t+360],r=n.map((t=>Math.abs(t-e))),i=Math.min(...r),s=r.indexOf(i);f.rotate=n[s]}e&&(r||(f.rotate=t.rotate||0),this._isDeclarative&&u&&(p.rotate=u)),i.from(p),i.to(f);const m=i.at(h);return u=m.rotate,a=new it(m),this.addTransform(a),o._addRunner(this),i.done()}),(function(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(s=y(e,o)),t={...e,origin:s}}),!0),this._isDeclarative&&this._rememberMorpher("transform",i),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new _t(e),this._tryRetarget(t,e))return this;const n=new xe(this._stepper).to(e);let r=null;return this.queue((function(){r=this.element()[t](),n.from(r),n.to(r+e)}),(function(e){return this.element()[t](n.at(e)),n.done()}),(function(t){n.to(r+new _t(t))})),this._rememberMorpher(t,n),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const n=new xe(this._stepper).to(e);return this.queue((function(){n.from(this.element()[t]())}),(function(e){return this.element()[t](n.at(e)),n.done()})),this._rememberMorpher(t,n),this},_queueNumber(t,e){return this._queueObject(t,new _t(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let n;return t&&e||(n=this._element.bbox()),t||(t=n.width/n.height*e),e||(e=n.height/n.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,n,r){if(4===arguments.length)return this.plot([t,e,n,r]);if(this._tryRetarget("plot",t))return this;const i=new xe(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){i.from(this._element.array())}),(function(t){return this._element.plot(i.at(t)),i.done()})),this._rememberMorpher("plot",i),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,n,r){return this._queueObject("viewbox",new at(t,e,n,r))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),I(ze,{rx:jt,ry:kt,from:Xt,to:Gt}),k(ze,"Runner");class We extends Et{constructor(t,e=t){super(T("svg",t),e),this.namespace()}defs(){return this.isRoot()?A(this.node.querySelector("defs"))||this.put(new Tt):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof P.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:x,version:"1.1"}).attr("xmlns:xlink",_,S):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,S).attr("xmlns:svgjs",null,S)}root(){return this.isRoot()?this:super.root()}}h({Container:{nested:F((function(){return this.put(new We)}))}}),k(We,"Svg",!0);class $e extends Et{constructor(t,e=t){super(T("symbol",t),e)}}function Ke(t){return!1===this._build&&this.clear(),this.node.appendChild(P.document.createTextNode(t)),this}function Qe(){return this.node.getComputedTextLength()}function Je(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)}function Ze(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}function tn(t,e,n=this.bbox()){return this.x(t,n).y(e,n)}function en(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)}function nn(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)}function rn(t,e,n=this.bbox()){return this.cx(t,n).cy(e,n)}function sn(t){return this.attr("x",t)}function on(t){return this.attr("y",t)}function an(t,e){return this.ax(t).ay(e)}function un(t){return this._build=!!t,this}h({Container:{symbol:F((function(){return this.put(new $e)}))}}),k($e,"Symbol");class cn extends At{constructor(t,e=t){super(T("text",t),e),this.dom.leading=this.dom.leading??new _t(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new _t(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let e=0;const n=this.dom.leading;this.each((function(r){if(v(this.node))return;const i=P.window.getComputedStyle(this.node).getPropertyValue("font-size"),s=n*new _t(i);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?e+=s:(this.attr("dy",r?s+e:0),e=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new _t(t.leading||1.3),this}writeDataToDom(){return w(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const e=this.node.childNodes;let n=0;t="";for(let r=0,i=e.length;r<i;++r)"textPath"===e[r].nodeName||v(e[r])?0===r&&(n=r+1):(r!==n&&3!==e[r].nodeType&&!0===A(e[r]).dom.newLined&&(t+="\n"),t+=e[r].textContent);return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else for(let e=0,n=(t=(t+"").split("\n")).length;e<n;e++)this.newLine(t[e]);return this.build(!1).rebuild()}}I(cn,o),h({Container:{text:F((function(t=""){return this.put(new cn).text(t)})),plain:F((function(t=""){return this.put(new cn).plain(t)}))}}),k(cn,"Text");class hn extends At{constructor(t,e=t){super(T("tspan",t),e),this._build=!1}dx(t){return this.attr("dx",t)}dy(t){return this.attr("dy",t)}newLine(){this.dom.newLined=!0;const t=this.parent();if(!(t instanceof cn))return this;const e=t.index(this),n=P.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=t.dom.leading*new _t(n);return this.dy(e?r:0).attr("x",t.x())}text(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?(this.clear().build(!0),t.call(this,this),this.build(!1)):this.plain(t),this)}}I(hn,o),h({Tspan:{tspan:F((function(t=""){const e=new hn;return this._build||this.clear(),this.put(e).text(t)}))},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),k(hn,"Tspan");class ln extends At{constructor(t,e=t){super(T("circle",t),e)}radius(t){return this.attr("r",t)}rx(t){return this.attr("r",t)}ry(t){return this.rx(t)}size(t){return this.radius(new _t(t).divide(2))}}I(ln,{x:Dt,y:Lt,cx:Bt,cy:It,width:Ft,height:Rt}),h({Container:{circle:F((function(t=0){return this.put(new ln).size(t).move(0,0)}))}}),k(ln,"Circle");class dn extends Et{constructor(t,e=t){super(T("clipPath",t),e)}remove(){return this.targets().forEach((function(t){t.unclip()})),super.remove()}targets(){return dt("svg [clip-path*="+this.id()+"]")}}h({Container:{clip:F((function(){return this.defs().put(new dn)}))},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const e=t instanceof dn?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}}),k(dn,"ClipPath");class fn extends Ot{constructor(t,e=t){super(T("foreignObject",t),e)}}function pn(t,e){return this.children().forEach((n=>{let r;try{r=n.node instanceof P.window.SVGSVGElement?new at(n.attr(["x","y","width","height"])):n.bbox()}catch(t){return}const i=new it(n),s=i.translate(t,e).transform(i.inverse()),o=new nt(r.x,r.y).transform(s);n.move(o.x,o.y)})),this}function mn(t){return this.dmove(t,0)}function gn(t){return this.dmove(0,t)}function yn(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)}function bn(t=0,e=0,n=this.bbox()){const r=t-n.x,i=e-n.y;return this.dmove(r,i)}function vn(t,e,n=this.bbox()){const r=g(this,t,e,n),i=r.width/n.width,s=r.height/n.height;return this.children().forEach((t=>{const e=new nt(n).transform(new it(t).inverse());t.scale(i,s,e.x,e.y)})),this}function wn(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)}function xn(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)}function Sn(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}h({Container:{foreignObject:F((function(t,e){return this.put(new fn).size(t,e)}))}}),k(fn,"ForeignObject");class _n extends Et{constructor(t,e=t){super(T("g",t),e)}}I(_n,a),h({Container:{group:F((function(){return this.put(new _n)}))}}),k(_n,"G");class Pn extends Et{constructor(t,e=t){super(T("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,_)}}I(Pn,a),h({Container:{link:F((function(t){return this.put(new Pn).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const n=e.index(t);return e.add(this,n),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new Pn,this.wrap(e)),"function"==typeof t?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),k(Pn,"A");class Mn extends Et{constructor(t,e=t){super(T("mask",t),e)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return dt("svg [mask*="+this.id()+"]")}}h({Container:{mask:F((function(){return this.defs().put(new Mn)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof Mn?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),k(Mn,"Mask");class Nn extends Ot{constructor(t,e=t){super(T("stop",t),e)}update(t){return("number"==typeof t||t instanceof _t)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new _t(t.offset)),this}}h({Gradient:{stop:function(t,e,n){return this.put(new Nn).update(t,e,n)}}}),k(Nn,"Stop");class On extends Ot{constructor(t,e=t){super(T("style",t),e)}addText(t=""){return this.node.textContent+=t,this}font(t,e,n={}){return this.rule("@font-face",{fontFamily:t,src:e,...n})}rule(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;let n=t+"{";for(const t in e)n+=t.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))+":"+e[t]+";";return n+="}",n}(t,e))}}h("Dom",{style(t,e){return this.put(new On).rule(t,e)},fontface(t,e,n){return this.put(new On).font(t,e,n)}}),k(On,"Style");class Cn extends cn{constructor(t,e=t){super(T("textPath",t),e)}array(){const t=this.track();return t?t.array():null}plot(t){const e=this.track();let n=null;return e&&(n=e.plot(t)),null==t?n:this}track(){return this.reference("href")}}h({Container:{textPath:F((function(t,e){return t instanceof cn||(t=this.text(t)),t.path(e)}))},Text:{path:F((function(t,e=!0){const n=new Cn;let r;if(t instanceof Oe||(t=this.defs().path(t)),n.attr("href","#"+t,_),e)for(;r=this.node.firstChild;)n.node.appendChild(r);return this.put(n)})),textPath(){return this.findOne("textPath")}},Path:{text:F((function(t){return t instanceof cn||(t=(new cn).addTo(this.parent()).text(t)),t.path(this)})),targets(){return dt("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),Cn.prototype.MorphArray=ve,k(Cn,"TextPath");class En extends At{constructor(t,e=t){super(T("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,_)}}h({Container:{use:F((function(t,e){return this.put(new En).use(t,e)}))}}),k(En,"Use"),I([We,$e,Ut,Ht,ne],l("viewbox")),I([ee,De,ke,Oe],l("marker")),I(cn,l("Text")),I(Oe,l("Path")),I(Tt,l("Defs")),I([cn,hn],l("Tspan")),I([Le,Vt,Yt,ze],l("radius")),I(vt,l("EventTarget")),I(Nt,l("Dom")),I(Ot,l("Element")),I(At,l("Shape")),I([Et,zt],l("Container")),I(Yt,l("Gradient")),I(ze,l("Runner")),ht.extend([...new Set(c)]),function(t=[]){Ne.push(...[].concat(t))}([_t,et,at,it,St,$t,ve,nt]),I(Ne,{to(t){return(new xe).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,n,r,i){return this.fromArray(t.map((function(t,s){return r.step(t,e[s],n,i[s],i)})))}});var Tn=n(726),An=n(358);class jn{constructor(t,e){this.svgDoc=t,this.elements=e,new MutationObserver((t=>{t.some((t=>t.removedNodes.length>0))&&(this.elements=this.elements.filter((t=>this.svgDoc.contains(t.domNode))))})).observe(t,{childList:!0,subtree:!0})}}class kn{constructor(t,e){this.svgDoc=t,this.elementsDrawing=new jn(t,e)}get bases(){return this.elementsDrawing.elements}set bases(t){this.elementsDrawing.elements=t}append(t){t.appendTo(this.svgDoc),this.bases.push(t)}add(t){let e=An.Nucleobase.create(t);return this.append(e),e}}var Dn,Ln,Bn=n(661),In=n(742),Fn=function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n},Rn=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class Vn{constructor(t){this.domNode=t,Dn.set(this,void 0),Ln.set(this,void 0),Fn(this,Dn,new jn(t,[]),"f"),Fn(this,Ln,new MutationObserver((()=>{this.elements.forEach((t=>{this.domNode.contains(t.owner.domNode)||t.domNode.remove()}))})),"f"),Rn(this,Ln,"f").observe(t,{childList:!0,subtree:!0})}get elements(){return Rn(this,Dn,"f").elements}set elements(t){Rn(this,Dn,"f").elements=t}}Dn=new WeakMap,Ln=new WeakMap;var qn,zn,Xn=function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n},Gn=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class Yn{constructor(t){this.domNode=t,qn.set(this,void 0),Xn(this,qn,new Vn(t),"f")}get baseNumberings(){return Gn(this,qn,"f").elements}set baseNumberings(t){Gn(this,qn,"f").elements=t}number(t,e){let n=In.BaseNumbering.numbering(t,e);return this.domNode.insertBefore(n.domNode,t.domNode),Gn(this,qn,"f").elements.push(n),n}}qn=new WeakMap;class Hn{constructor(t){this.domNode=t,zn.set(this,void 0),Xn(this,zn,new Vn(t),"f")}get baseNumberingLines(){return Gn(this,zn,"f").elements}set baseNumberingLines(t){Gn(this,zn,"f").elements=t}connect(t){let e=In.BaseNumberingLine.connecting(t);return this.domNode.insertBefore(e.domNode,t.domNode),Gn(this,zn,"f").elements.push(e),e}}zn=new WeakMap;var Un,Wn=n(775),$n=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class Kn{constructor(t){this.domNode=t,Un.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,Un,new Vn(t))}get baseOutlines(){return $n(this,Un,"f").elements}set baseOutlines(t){$n(this,Un,"f").elements=t}append(t){this.domNode.append(t.domNode),this.baseOutlines.push(t)}outline(t){let e=Wn.BaseOutline.outlining(t);return t.domNode.insertAdjacentElement("beforebegin",e.domNode),this.baseOutlines.push(e),e}}Un=new WeakMap;var Qn=n(282);class Jn{constructor(t,e){this.svgDoc=t,this.elementsDrawing=new jn(t,e),new MutationObserver((()=>{this.bonds.forEach((t=>{this.svgDoc.contains(t.base1.domNode)&&this.svgDoc.contains(t.base2.domNode)||t.remove()}))})).observe(t,{childList:!0,subtree:!0})}get bonds(){return this.elementsDrawing.elements}set bonds(t){this.elementsDrawing.elements=t}}class Zn{constructor(t,e){this.svgDoc=t,this.defaultValues={attributes:{stroke:"#808080","stroke-width":"1"},basePadding1:6,basePadding2:6},this.bondsDrawing=new Jn(t,e)}get primaryBonds(){return this.bondsDrawing.bonds}set primaryBonds(t){this.bondsDrawing.bonds=t}append(t){t.appendTo(this.svgDoc),this.primaryBonds.push(t)}add(t,e){let n=Qn.StraightBond.between(t,e);return this.append(n),n.set(this.defaultValues),n}}class tr{constructor(t,e){this.svgDoc=t,this.defaultValues={attributes:{stroke:"#000000","stroke-width":"2"},basePadding1:6,basePadding2:6},this.bondsDrawing=new Jn(t,e)}get secondaryBonds(){return this.bondsDrawing.bonds}set secondaryBonds(t){this.bondsDrawing.bonds=t}append(t){t.appendTo(this.svgDoc),this.secondaryBonds.push(t)}add(t,e){let n=Qn.StraightBond.between(t,e);return this.append(n),n.set(this.defaultValues),n}}var er,nr,rr,ir,sr,or=n(854),ar=function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n},ur=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class cr{constructor(){er.add(this),nr.set(this,void 0),rr.set(this,void 0),ir.set(this,void 0),this.domNode=(new We).node,this.domNode.setAttribute("viewBox",`0 0 ${hr} ${lr}`),this.domNode.setAttribute("width",`${hr}`),this.domNode.setAttribute("height",`${lr}`),this.basesDrawing=new kn(this.domNode,[]),ar(this,nr,new Yn(this.domNode),"f"),ar(this,rr,new Hn(this.domNode),"f"),ar(this,ir,new Kn(this.domNode),"f"),this.primaryBondsDrawing=new Zn(this.domNode,[]),this.secondaryBondsDrawing=new tr(this.domNode,[])}get outerXML(){return this.domNode.outerHTML}set outerXML(t){new Tn.OuterXML(this.domNode).set(t)}get innerXML(){return this.domNode.innerHTML}set innerXML(t){new Tn.InnerXML(this.domNode).set(t)}appendTo(t){t.appendChild(this.domNode)}remove(){this.domNode.remove()}get minX(){return this.domNode.viewBox.baseVal.x}set minX(t){let e=this.maxX-t,n=this.horizontalScaling;this.domNode.setAttribute("viewBox",`${t} ${this.minY} ${e} ${this.height}`),this.domNode.setAttribute("width",(n*e).toString())}get maxX(){return this.minX+this.width}set maxX(t){let e=t-this.minX,n=this.horizontalScaling;this.domNode.setAttribute("viewBox",`${this.minX} ${this.minY} ${e} ${this.height}`),this.domNode.setAttribute("width",(n*e).toString())}get minY(){return this.domNode.viewBox.baseVal.y}set minY(t){let e=this.maxY-t,n=this.verticalScaling;this.domNode.setAttribute("viewBox",`${this.minX} ${t} ${this.width} ${e}`),this.domNode.setAttribute("height",(n*e).toString())}get maxY(){return this.minY+this.height}set maxY(t){let e=t-this.minY,n=this.verticalScaling;this.domNode.setAttribute("viewBox",`${this.minX} ${this.minY} ${this.width} ${e}`),this.domNode.setAttribute("height",(n*e).toString())}setBoundaries({minX:t,maxX:e,minY:n,maxY:r}){this.minX=t,this.maxX=e,this.minY=n,this.maxY=r}get width(){return this.domNode.viewBox.baseVal.width}set width(t){this.maxX=this.minX+t}get height(){return this.domNode.viewBox.baseVal.height}set height(t){this.maxY=this.minY+t}get horizontalScaling(){let t=this.width;return this.domNode.width.baseVal.value/t}set horizontalScaling(t){let e=this.width;this.domNode.setAttribute("width",(t*e).toString())}get verticalScaling(){let t=this.height;return this.domNode.height.baseVal.value/t}set verticalScaling(t){let e=this.height;this.domNode.setAttribute("height",(t*e).toString())}setScaling(t){this.horizontalScaling=t,this.verticalScaling=t}get horizontalClientScaling(){return new Tn.HorizontalClientScaling(this.domNode).get()}get verticalClientScaling(){return new Tn.VerticalClientScaling(this.domNode).get()}get bases(){return this.basesDrawing.bases}set bases(t){this.basesDrawing.bases=[...t]}appendBase(t){this.basesDrawing.append(t)}addBase(t){return this.basesDrawing.add(t)}number(t,e){let n=ur(this,nr,"f").number(t,e),r=ur(this,rr,"f").connect(n);return n.displacement.magnitude=10,r.direction=(0,Bn.outwardNormal)(t,...ur(this,er,"a",sr)),r.length=1.15*n.domNode.getBBox().height,[n,r]}get baseNumberings(){return ur(this,nr,"f").baseNumberings}set baseNumberings(t){ur(this,nr,"f").baseNumberings=[...t]}get baseNumberingLines(){return ur(this,rr,"f").baseNumberingLines}set baseNumberingLines(t){ur(this,rr,"f").baseNumberingLines=[...t]}get baseOutlines(){return ur(this,ir,"f").baseOutlines}set baseOutlines(t){ur(this,ir,"f").baseOutlines=[...t]}outlineBase(t){return ur(this,ir,"f").outline(t)}appendBaseOutline(t){ur(this,ir,"f").append(t)}get primaryBonds(){return this.primaryBondsDrawing.primaryBonds}set primaryBonds(t){this.primaryBondsDrawing.primaryBonds=[...t]}appendPrimaryBond(t){this.primaryBondsDrawing.append(t)}addPrimaryBond(t,e){return this.primaryBondsDrawing.add(t,e)}get secondaryBonds(){return this.secondaryBondsDrawing.secondaryBonds}set secondaryBonds(t){this.secondaryBondsDrawing.secondaryBonds=[...t]}appendSecondaryBond(t){this.secondaryBondsDrawing.append(t)}addSecondaryBond(t,e){return this.secondaryBondsDrawing.add(t,e)}rotate(t,e){let n=new Set(t);for(let t of this.baseNumberings)if(n.has(t.owner)){let n=In.BaseNumberingLine.unpadded(t);this.domNode.append(n.domNode),n.direction+=e,n.domNode.remove()}(0,Bn.rotate)(t,e)}get defaultValues(){let t=this.primaryBondsDrawing,e=this.secondaryBondsDrawing;return{get primaryBonds(){return t.defaultValues},set primaryBonds(e){t.defaultValues=e},get secondaryBonds(){return e.defaultValues},set secondaryBonds(t){e.defaultValues=t}}}get contentBBox(){return this.domNode.getBBox()}setPadding(t){let e=this.contentBBox;this.setBoundaries({minX:e.x-t,maxX:e.x+e.width+t,minY:e.y-t,maxY:e.y+e.height+t})}reset(){this.domNode.innerHTML="",this.basesDrawing.bases=[],ur(this,ir,"f").baseOutlines=[],this.primaryBondsDrawing.primaryBonds=[],this.secondaryBondsDrawing.secondaryBonds=[],[...this.domNode.attributes].forEach((t=>this.domNode.removeAttribute(t.name))),this.domNode.setAttribute("viewBox",`0 0 ${hr} ${lr}`),this.domNode.setAttribute("width",`${hr}`),this.domNode.setAttribute("height",`${lr}`)}serialized(){return{outerXML:this.outerXML,bases:[...this.bases].map((t=>t.serialized())),baseNumberings:[...this.baseNumberings].map((t=>t.serialized())),baseNumberingLines:[...this.baseNumberingLines].map((t=>t.serialized())),baseOutlines:[...this.baseOutlines].map((t=>t.serialized())),primaryBonds:[...this.primaryBonds].map((t=>t.serialized())),secondaryBonds:[...this.secondaryBonds].map((t=>t.serialized()))}}static deserialized(t){var e;let n=new cr,r=document.createElement("div");if(r.append(n.domNode),r.style.width="0px",r.style.height="0px",document.body.append(r),!(0,or.isNonNullObject)(t))throw new Error("Saved drawing must be an object.");let i=null!==(e=t.outerXML)&&void 0!==e?e:t.svg;if(!i)throw new Error("Saved drawing outer XML is missing.");if(!(0,or.isString)(i))throw new Error("Saved drawing outer XML must be a string.");n.outerXML=i;let s=n.domNode;(0,or.isArray)(t.bases)&&(n.bases=t.bases.map((t=>An.Nucleobase.deserialized(t,n))));let o=[...n.bases];(0,or.isArray)(t.baseNumberings)&&(n.baseNumberings=t.baseNumberings.map((t=>In.BaseNumbering.deserialized(t,{domNode:s,bases:o}))));let a=[...n.baseNumberings];return(0,or.isArray)(t.baseNumberingLines)&&(n.baseNumberingLines=t.baseNumberingLines.map((t=>In.BaseNumberingLine.deserialized(t,{domNode:s,baseNumberings:a})))),(0,or.isArray)(t.baseOutlines)&&(n.baseOutlines=t.baseOutlines.map((t=>Wn.BaseOutline.deserialized(t,n)))),(0,or.isArray)(t.primaryBonds)&&(n.primaryBonds=t.primaryBonds.map((t=>Qn.StraightBond.deserialized(t,n)))),(0,or.isArray)(t.secondaryBonds)&&(n.secondaryBonds=t.secondaryBonds.map((t=>Qn.StraightBond.deserialized(t,n)))),n.domNode.remove(),r.remove(),n}restore(t){let e=cr.deserialized(t),n=[...e.bases],r=[...e.baseNumberings],i=[...e.baseNumberingLines],s=[...e.baseOutlines],o=[...e.primaryBonds],a=[...e.secondaryBonds];this.reset(),[...this.domNode.attributes].forEach((t=>this.domNode.removeAttribute(t.name))),[...e.domNode.attributes].forEach((t=>this.domNode.setAttribute(t.name,t.value))),[...e.domNode.childNodes].forEach((t=>this.domNode.appendChild(t))),this.bases=n,this.baseNumberings=r,this.baseNumberingLines=i,this.baseOutlines=s,this.primaryBonds=o,this.secondaryBonds=a}}nr=new WeakMap,rr=new WeakMap,ir=new WeakMap,er=new WeakSet,sr=function(){return[[...this.bases],this.secondaryBondsDrawing.secondaryBonds.map((t=>t.basePair))]};const hr=250,lr=250;var dr=n(127),fr=n(986);class pr{constructor(t){this.targetDrawing=t}draw(t,e){let n=[...t].map((t=>this.targetDrawing.addBase(t)));(0,dr.consecutivePairs)(n).forEach((t=>this.targetDrawing.addPrimaryBond(...t)));let r=[...(0,dr.parseDotBracket)(n,e)];r.forEach((t=>this.targetDrawing.addSecondaryBond(...t))),n.forEach((t=>t.bringToFront()));let i=1.87*(0,fr.mean)(n.map((t=>t.bbox.height)));(0,Bn.untangle)(n,r,{spacing:i,basePairSpacing:i/2,hairpinLoopSpacing:i/2})}}var mr,gr,yr,br,vr=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class wr{constructor(t){mr.add(this),gr.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,gr,t)}draw(t){t.rnaComplexes.forEach((e=>{e.rnaMolecules.forEach((e=>{let n=e.sequence.map((e=>vr(this,mr,"m",yr).call(this,e,t))),r=(0,fr.mean)(n.map((t=>t.bbox.height)));vr(this,gr,"f").defaultValues.primaryBonds.attributes["stroke-width"]=""+.125*r,vr(this,gr,"f").defaultValues.primaryBonds.basePadding1=.6*r,vr(this,gr,"f").defaultValues.primaryBonds.basePadding2=.6*r,(0,dr.consecutivePairs)(n).forEach((t=>vr(this,gr,"f").addPrimaryBond(...t))),vr(this,gr,"f").defaultValues.secondaryBonds.attributes["stroke-width"]=""+.15*r,vr(this,gr,"f").defaultValues.secondaryBonds.basePadding1=.5*r,vr(this,gr,"f").defaultValues.secondaryBonds.basePadding2=.5*r,new Set(e.basePairs.map((t=>JSON.stringify(t)))).forEach((e=>vr(this,mr,"m",br).call(this,JSON.parse(e),n,t)))}))}))}}gr=new WeakMap,mr=new WeakSet,yr=function(t,e){let n=vr(this,gr,"f").addBase(t.residueName);return t.classes.forEach((t=>{e.classes.filter((e=>e.name==t)).forEach((t=>n.setAttributes(Object.assign(Object.assign({},t),{name:void 0}))))})),n.centerPoint.x=t.x,n.centerPoint.y=t.y,n},br=function(t,e,n){let r=e[t.residueIndex1],i=e[t.residueIndex2],s=vr(this,gr,"f").addSecondaryBond(r,i);return t.classes.forEach((t=>{n.classes.filter((e=>e.name==t)).forEach((t=>s.setAttributes(Object.assign(Object.assign({},t),{name:void 0}))))})),s}})(),r})(),t.exports=e()},274:function(t){var e;e=()=>(()=>{var t={139:function(t){var e;e=()=>(()=>{"use strict";var t={826:(t,e,n)=>{n.d(e,{A:()=>u,y:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,"._xow9qroX8E0n35EgMyS {\n cursor: grab;\n}\n\n._xow9qroX8E0n35EgMyS:active {\n cursor: grabbing;\n}\n",""]);var a="_xow9qroX8E0n35EgMyS";const u=o},314:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var o={};if(r)for(var a=0;a<this.length;a++){var u=this[a][0];null!=u&&(o[u]=!0)}for(var c=0;c<t.length;c++){var h=[].concat(t[c]);r&&o[h[0]]||(void 0!==s&&(void 0===h[5]||(h[1]="@layer".concat(h[5].length>0?" ".concat(h[5]):""," {").concat(h[1],"}")),h[5]=s),n&&(h[2]?(h[1]="@media ".concat(h[2]," {").concat(h[1],"}"),h[2]=n):h[2]=n),i&&(h[4]?(h[1]="@supports (".concat(h[4],") {").concat(h[1],"}"),h[4]=i):h[4]="".concat(i)),e.push(h))}},e}},601:t=>{t.exports=function(t){return t[1]}},72:t=>{var e=[];function n(t){for(var n=-1,r=0;r<e.length;r++)if(e[r].identifier===t){n=r;break}return n}function r(t,r){for(var s={},o=[],a=0;a<t.length;a++){var u=t[a],c=r.base?u[0]+r.base:u[0],h=s[c]||0,l="".concat(c," ").concat(h);s[c]=h+1;var d=n(l),f={css:u[1],media:u[2],sourceMap:u[3],supports:u[4],layer:u[5]};if(-1!==d)e[d].references++,e[d].updater(f);else{var p=i(f,r);r.byIndex=a,e.splice(a,0,{identifier:l,updater:p,references:1})}o.push(l)}return o}function i(t,e){var n=e.domAPI(e);return n.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,i){var s=r(t=t||[],i=i||{});return function(t){t=t||[];for(var o=0;o<s.length;o++){var a=n(s[o]);e[a].references--}for(var u=r(t,i),c=0;c<s.length;c++){var h=n(s[c]);0===e[h].references&&(e[h].updater(),e.splice(h,1))}s=u}}},659:t=>{var e={};t.exports=function(t,n){var r=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},540:t=>{t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},56:(t,e,n)=>{t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},825:t=>{t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var s=n.sourceMap;s&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleTagTransform(r,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},113:t=>{t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={id:r,exports:{}};return t[r](s,s.exports,n),s.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nc=void 0;var r={};n.r(r),n.d(r,{DragTranslater:()=>b});var i=n(72),s=n.n(i),o=n(825),a=n.n(o),u=n(659),c=n.n(u),h=n(56),l=n.n(h),d=n(540),f=n.n(d),p=n(113),m=n.n(p),g=n(826),y={};y.styleTagTransform=m(),y.setAttributes=l(),y.insert=c().bind(null,"head"),y.domAPI=a(),y.insertStyleElement=f(),s()(g.A,y),g.A&&g.A.locals&&g.A.locals;class b{constructor(t){this.targetForm=t,this.mouseIsDown=!1,this.interactionDepth="shallow",window.addEventListener("mousedown",(t=>this.handleMouseDown(t))),window.addEventListener("mousemove",(t=>this.handleMouseMove(t))),window.addEventListener("mouseup",(t=>this.handleMouseUp(t))),t.addEventListener("mouseover",(e=>{e.target!==t||t.classList.add(g.y)})),t.addEventListener("mouseout",(e=>{e.target!==t||t.classList.remove(g.y)}))}get currentTranslation(){let t=this.targetForm.getBoundingClientRect(),e=t.x,n=t.y,r=this.targetForm.style.translate;this.targetForm.style.translate="0px 0px";let i=this.targetForm.getBoundingClientRect(),s=i.x,o=i.y;return this.targetForm.style.translate=r,{x:e-s,y:n-o}}set currentTranslation(t){this.targetForm.style.translate=`${t.x}px ${t.y}px`}untranslate(){this.targetForm.style.translate="0px 0px"}handleMouseDown(t){this.lastMouseDown=t,this.mouseIsDown=!0}handleMouseMove(t){if(!this.mouseIsDown)return;if(!this.lastMouseDown)return;if(!(this.lastMouseDown.target instanceof Node))return;if("shallow"==this.interactionDepth){if(this.lastMouseDown.target!==this.targetForm)return}else if(!this.targetForm.contains(this.lastMouseDown.target))return;let e=this.currentTranslation;this.currentTranslation={x:e.x+t.movementX,y:e.y+t.movementY}}handleMouseUp(t){this.mouseIsDown=!1}}return r})(),t.exports=e()},855:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,D:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.TNFJKSo1tTnSxrFIxwf3 {\n position: absolute;\n right: 28px;\n top: 8px;\n\n width: 28px;\n height: 28px;\n\n border-radius: 1000px;\n\n border: 1px solid #aaaac2;\n box-shadow: none;\n\n outline: none;\n\n background-color: transparent;\n\n backdrop-filter: blur(25px);\n -webkit-backdrop-filter: blur(25px);\n\n font-family: "Open Sans", sans-serif;\n font-size: 14px;\n font-weight: 700;\n font-style: normal;\n color: black;\n\n cursor: pointer;\n}\n\n.TNFJKSo1tTnSxrFIxwf3:hover {\n border-color: #515165;\n}\n\n.TNFJKSo1tTnSxrFIxwf3:active {\n border-color: black;\n background-color: black;\n color: white;\n}\n',""]);var a="TNFJKSo1tTnSxrFIxwf3";const u=o},65:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>m,DD:()=>u,MY:()=>d,Qq:()=>h,UJ:()=>c,_R:()=>p,b0:()=>a,nf:()=>l,sp:()=>f});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.ZYdGdgwkUrd5xDEYPsq1 {\n position: absolute;\n top: 65px;\n right: 86px;\n\n\n width: 465px;\n height: 519px;\n\n border-radius: 16px;\n\n border: 1px solid #220536;\n\n padding: 24px 4px 50px 33px;\n\n background-color: #e2e2ff6e;\n\n backdrop-filter: blur(16px);\n -webkit-backdrop-filter: blur(16px);\n}\n\n.u4dcD60PpT8y1SFhMWew {\n margin: 0px;\n padding: 0px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 34px;\n font-weight: 700;\n font-style: normal;\n color: black;\n\n user-select: none;\n -webkit-user-select: none;\n\n pointer-events: none;\n}\n\n.evxJm3A2L6GZe89onKMA {\n margin: 24px 0px 0px 21px;\n\n display: flex;\n flex-direction: column;\n align-items: start;\n\n pointer-events: none;\n}\n\n.bG3GcCxxaGp_GfbI_8pL {\n margin: 0px;\n padding: 0px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 14px;\n font-weight: 400;\n font-style: normal;\n color: black;\n\n user-select: none;\n -webkit-user-select: none;\n}\n\n.w7V1Enuv_4HgmjYw2iV8 {\n color: rgb(28, 13, 219);\n font-weight: 600;\n\n pointer-events: auto;\n\n cursor: pointer;\n\n text-decoration: none;\n}\n\n.w7V1Enuv_4HgmjYw2iV8:hover {\n text-decoration: underline;\n}\n\n.EVEStoT75otrLkfIoofQ {\n margin-top: 35px;\n\n display: flex;\n flex-direction: column;\n gap: 8px;\n\n pointer-events: none;\n}\n\n.AOQpS6WyXjD5YLZQxBaN {\n margin-top: 43px;\n}\n\n.pJ39eQ0sanfBrB0gBcf3 {\n position: absolute;\n top: 13px;\n right: 17px;\n\n border: none;\n outline: none;\n\n padding: 3px 12px;\n border-radius: 3px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 16px;\n font-weight: 600;\n font-style: normal;\n color: #871414;\n\n pointer-events: auto;\n\n cursor: pointer;\n\n user-select: none;\n -webkit-user-select: none;\n\n background-color: transparent;\n}\n\n.pJ39eQ0sanfBrB0gBcf3:hover {\n background-color: #cab8d99c;\n}\n\n.pJ39eQ0sanfBrB0gBcf3:active {\n background-color: #aa8eba9e;\n}\n',""]);var a="ZYdGdgwkUrd5xDEYPsq1",u="u4dcD60PpT8y1SFhMWew",c="evxJm3A2L6GZe89onKMA",h="bG3GcCxxaGp_GfbI_8pL",l="w7V1Enuv_4HgmjYw2iV8",d="EVEStoT75otrLkfIoofQ",f="AOQpS6WyXjD5YLZQxBaN",p="pJ39eQ0sanfBrB0gBcf3";const m=o},314:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var o={};if(r)for(var a=0;a<this.length;a++){var u=this[a][0];null!=u&&(o[u]=!0)}for(var c=0;c<t.length;c++){var h=[].concat(t[c]);r&&o[h[0]]||(void 0!==s&&(void 0===h[5]||(h[1]="@layer".concat(h[5].length>0?" ".concat(h[5]):""," {").concat(h[1],"}")),h[5]=s),n&&(h[2]?(h[1]="@media ".concat(h[2]," {").concat(h[1],"}"),h[2]=n):h[2]=n),i&&(h[4]?(h[1]="@supports (".concat(h[4],") {").concat(h[1],"}"),h[4]=i):h[4]="".concat(i)),e.push(h))}},e}},601:t=>{"use strict";t.exports=function(t){return t[1]}},72:t=>{"use strict";var e=[];function n(t){for(var n=-1,r=0;r<e.length;r++)if(e[r].identifier===t){n=r;break}return n}function r(t,r){for(var s={},o=[],a=0;a<t.length;a++){var u=t[a],c=r.base?u[0]+r.base:u[0],h=s[c]||0,l="".concat(c," ").concat(h);s[c]=h+1;var d=n(l),f={css:u[1],media:u[2],sourceMap:u[3],supports:u[4],layer:u[5]};if(-1!==d)e[d].references++,e[d].updater(f);else{var p=i(f,r);r.byIndex=a,e.splice(a,0,{identifier:l,updater:p,references:1})}o.push(l)}return o}function i(t,e){var n=e.domAPI(e);return n.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,i){var s=r(t=t||[],i=i||{});return function(t){t=t||[];for(var o=0;o<s.length;o++){var a=n(s[o]);e[a].references--}for(var u=r(t,i),c=0;c<s.length;c++){var h=n(s[c]);0===e[h].references&&(e[h].updater(),e.splice(h,1))}s=u}}},659:t=>{"use strict";var e={};t.exports=function(t,n){var r=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},540:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},56:(t,e,n)=>{"use strict";t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},825:t=>{"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var s=n.sourceMap;s&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleTagTransform(r,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},113:t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={id:r,exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nc=void 0;var r={};return(()=>{"use strict";n.r(r),n.d(r,{AboutButton:()=>_,AboutForm:()=>b});var t=n(72),e=n.n(t),i=n(825),s=n.n(i),o=n(659),a=n.n(o),u=n(56),c=n.n(u),h=n(540),l=n.n(h),d=n(113),f=n.n(d),p=n(65),m={};m.styleTagTransform=f(),m.setAttributes=c(),m.insert=a().bind(null,"head"),m.domAPI=s(),m.insertStyleElement=l(),e()(p.Ay,m),p.Ay&&p.Ay.locals&&p.Ay.locals;var g,y=n(139);class b{constructor(){this.domNode=document.createElement("div"),g.set(this,void 0),this.domNode.classList.add(p.b0),this.domNode.append(function(){let t=document.createElement("p");return t.classList.add(p.DD),t.textContent="About",t}());let t=function(){let t=document.createElement("div");return t.classList.add(p.UJ),t}();this.domNode.append(t),t.append(v(w("RNAcanvas Code")," is developed by ",w("Silvec Biologics")," - an RNA company.")),t.append(function(){let t=v("Feel free to send any questions to..."),e=w("Email: "),n=function(){let t=document.createElement("a");return t.classList.add(p.nf),t.href="mailto:contact@rnacanvas.app",t.textContent="contact@rnacanvas.app",t}(),r=v(e,n),i=document.createElement("div");return i.classList.add(p.MY),i.append(t,r),i}()),t.append(function(){let t=v("Or ask the ",function(){let t=document.createElement("a");return t.classList.add(p.nf),t.href="https://chatgpt.com/g/g-jh8gXtvrC-rnacanvas-ai-assistant",t.textContent="RNAcanvas Custom GPT",t.target="_blank",t.rel="noreferrer noopener",t}(),".");return t.style.marginTop="27px",t}()),t.append(function(){let t=w("Nucleic Acids Research");t.style.fontStyle="italic";let e=v("Article in ",t,"."),n=w("DOI: "),r=function(){let t=document.createElement("a");return t.classList.add(p.nf),t.href="https://doi.org/10.1093/nar/gkad302",t.textContent="10.1093/nar/gkad302",t.target="_blank",t.rel="noreferrer noopener",t}(),i=v(n,r);i.style.marginTop="8px";let s=v("Citations are greatly appreciated!");s.style.marginTop="18px";let o=v("(If you use RNAcanvas Code to draw structures in publications.)");o.style.marginTop="8px";let a=document.createElement("div");return a.classList.add(p.sp),a.append(e,i,s,o),a}()),t.append(function(){let t=v("See the ",function(){let t=document.createElement("a");return t.classList.add(p.nf),t.href="https://pzhaojohnson.github.io/rnacanvas.code/",t.textContent="GitHub docs",t.target="_blank",t.rel="noreferrer noopener",t}()," for technical documentation regarding RNAcanvas Code.");return t.style.marginTop="43px",t}());let e=function(){let t=document.createElement("button");return t.classList.add(p._R),t.textContent="Close",t}();e.addEventListener("click",(()=>this.close())),this.domNode.append(e),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,g,new y.DragTranslater(this.domNode))}close(){this.domNode.remove()}appendTo(t){(function(t,e){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return e.get(t)})(this,g).untranslate(),t.appendChild(this.domNode)}}function v(...t){let e=document.createElement("p");return e.classList.add(p.Qq),e.append(...t),e}function w(t){let e=document.createElement("span");return e.textContent=t,e.style.fontWeight="700",e}g=new WeakMap;var x=n(855),S={};S.styleTagTransform=f(),S.setAttributes=c(),S.insert=a().bind(null,"head"),S.domAPI=s(),S.insertStyleElement=l(),e()(x.A,S),x.A&&x.A.locals&&x.A.locals;class _{constructor(){this.domNode=document.createElement("button"),this.domNode.classList.add(x.D),this.domNode.textContent="?"}}})(),r})(),t.exports=e()},628:function(t){var e;e=()=>(()=>{var t={661:function(t){var e;e=()=>(()=>{var t={127:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>h,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},369:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>h,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function c(t){return"object"==typeof t&&null!==t}function h(t){return Array.isArray(t)}function l(t){return h(t)&&t.every(n)}function d(t){return h(t)&&t.every(r)}function f(t){return h(t)&&t.every(i)}function p(t){return h(t)&&t.every(a)}return t.r(e),t.d(e,{isArray:()=>h,isFiniteNumber:()=>r,isFiniteNumbersArray:()=>d,isNonFiniteNumber:()=>i,isNonFiniteNumbersArray:()=>f,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>c,isNullish:()=>u,isNumber:()=>n,isNumbersArray:()=>l,isPositiveFiniteNumber:()=>s,isString:()=>a,isStringsArray:()=>p}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Linkers:()=>g,Stems:()=>m,areConflicting:()=>c,areCrossing:()=>d,areEqual:()=>a,areKnotless:()=>l,areStacked:()=>u,deepCopy:()=>i,knotless:()=>p,mountainPlotTraversal:()=>y,parseDotBracket:()=>b,sorted:()=>o});var t=n(854),e=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function i(n){return(0,t.isNumbersArray)(n)?e([],n,!0):n.map((function(t){return e([],t,!0)}))}var s=n(986);function o(t){var e=i(t);return e.forEach(s.sortNumbers),e.sort((function(t,e){return t[0]-e[0]})),e}function a(t,e){var n=i(t),r=i(e);return(0,s.sortNumbers)(n),(0,s.sortNumbers)(r),[0,1].every((function(t){return n[t]==r[t]}))}function u(t,e){var n=o([t,e]);return n[0][0]==n[1][0]-1&&n[0][1]==n[1][1]+1}function c(t,e){return(0,s.min)(t)==(0,s.min)(e)&&(0,s.max)(t)!=(0,s.max)(e)||(0,s.min)(t)!=(0,s.min)(e)&&(0,s.max)(t)==(0,s.max)(e)}function h(t){if(0==t.length)return[];for(var e=[],n=0;n<(0,s.max)(t.flat());n++)e.push(void 0);return t.forEach((function(t){e[t[0]-1]=t[1],e[t[1]-1]=t[0]})),e}function l(t){var e=h(t),n=[],r=!1;return e.forEach((function(t,e){var i=e+1;null==t||(i<t?n.push(i):i==t||n.pop()!=t&&(r=!0))})),!r}function d(t,e){return!l([t,e])}var f=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function p(t){var e=[],n=i(t);return n.sort((function(t,e){return Math.abs(t[0]-t[1])-Math.abs(e[0]-e[1])})),n.forEach((function(t){l(f(f([],e,!0),[t],!1))&&e.push(t)})),e}var m=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=this.targetStructure[1];if(0==t.length)return[];var e=o(t),n=[],r=[];return e.forEach((function(t){var e=0==r.length?null:r[r.length-1];!e||u(e,t)?r.push(t):(n.push(r),r=[t])})),n.push(r),n},t}(),g=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=(new(m.bind.apply(m,function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}([void 0],this.targetStructure,!1)))).get().flatMap((function(t){return[t.map(s.min),t.map(s.max)]}));t.forEach(s.sortNumbers),t.sort((function(t,e){return(0,s.min)(t)-(0,s.min)(e)}));for(var e=[],n=t.shift(),r=t.shift();n&&r;){for(var i=[],o=(0,s.max)(n),a=(0,s.min)(r),u=o;u<=a;u++)i.push(u);e.push(i),n=r,r=t.shift()}return e},t}();function y(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[0],r=t[1],i=h(r);if(!l(r))throw new Error("Pseudoknot(s) encountered.");var s=[],o=0;return n.forEach((function(t,e){var n=e+1,r=i[e];null==r?s.push(o):n<r?(s.push(o),o++):(n==r||o--,s.push(o))})),s}function b(t){var e=t.split(""),n=[".","(",")"];e.forEach((function(t){if(!n.includes(t))throw new Error('Unrecognized character in dot-bracket notation: "'.concat(t,'".'))}));var r=[],i=[];if(e.forEach((function(t,e){var n=e+1;if("("==t)i.push(n);else if(")"==t){var s=i.pop();if("number"!=typeof s)throw new Error("Unmatched downstream partner(s) in dot-bracket notation.");r.push([s,n])}})),i.length>0)throw new Error("Unmatched upstream partner(s) in dot-bracket notation.");return o(r)}})(),r})(),t.exports=e()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{FirstPairedBase:()=>e,LastPairedBase:()=>s,LeadingDanglingBases:()=>o,Linkers:()=>h,PositionPairs:()=>t,Stems:()=>c,TrailingDanglingBases:()=>a,consecutivePairs:()=>f,knotless:()=>l,parseDotBracket:()=>d});class t{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];return this.targetStructure[1].map((e=>[t.indexOf(e[0])+1,t.indexOf(e[1])+1]))}}class e{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0],e=this.targetStructure[1];if(0==e.length)throw new Error("There are no paired bases.");let n=e.flat(),r=t.findIndex((t=>n.includes(t)));if(r<0)throw new Error("No paired bases present in sequence.");return t[r]}}var i=n(986);class s{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0],e=this.targetStructure[1];if(0==e.length)throw new Error("There are no paired bases.");let n=e.flat().map((e=>t.indexOf(e)));if((0,i.max)(n)<0)throw new Error("No paired bases present in sequence.");return t[(0,i.max)(n)]}}class o{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];if(0==this.targetStructure[1].length)throw new Error("There are no paired bases.");let n=new e(...this.targetStructure).get(),r=t.indexOf(n);if(r<0)throw new Error("No paired bases present in sequence.");return t.slice(0,r)}}class a{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];if(0==this.targetStructure[1].length)throw new Error("There are no paired bases.");let e=new s(...this.targetStructure).get(),n=t.indexOf(e);if(n<0)throw new Error("No paired bases present in sequence.");return t.slice(n+1)}}var u=n(369);class c{constructor(...t){this.targetStructure=t}get(){let e=this.targetStructure[0],n=new t(...this.targetStructure).get();return new u.Stems(e,n).get().map((t=>t.map((t=>[e[t[0]-1],e[t[1]-1]]))))}}class h{constructor(...t){this.targetStructure=t}get(){let e=this.targetStructure[0],n=new t(...this.targetStructure).get();return new u.Linkers(e,n).get().map((t=>t.map((t=>e[t-1]))))}}function l(...e){let[n,r]=e,i=new t(...e).get();(0,u.areKnotless)(i)||(i=(0,u.knotless)(i));let s=i.map((t=>[n[t[0]-1],n[t[1]-1]]));return[[...n],s]}function d(t,e){if(e.length>t.length)throw new Error("Dot-bracket notation is longer than the sequence.");return[...(0,u.parseDotBracket)(e)].map((e=>{let n=e[0],r=e[1];return[t[n-1],t[r-1]]}))}function f(t){return t.length<2?[]:t.slice(0,-1).map(((e,n)=>[t[n],t[n+1]]))}})(),r})(),t.exports=e()},173:function(t){var e;e=()=>(()=>{var t={422:function(t){t.exports=(()=>{var t={138:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}return t.r(e),t.d(e,{average:()=>r,mean:()=>r,sum:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";function t(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.pow(Math.pow(n,2)+Math.pow(r,2),.5)}function e(t,e){return{x:e.x-t.x,y:e.y-t.y}}n.r(r),n.d(r,{centroid:()=>s,displacement:()=>e,distance:()=>t,midpoint:()=>o});var i=n(138);function s(t){return{x:(0,i.mean)(t.map((function(t){return t.x}))),y:(0,i.mean)(t.map((function(t){return t.y})))}}function o(t,e){return s([t,e])}})(),r})()},872:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{CircularSegment:()=>a,Semicircle:()=>e});var t=n(422),e=function(){function e(t){this.chord=t}return Object.defineProperty(e.prototype,"chordLength",{get:function(){return(0,t.distance)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcLength",{get:function(){return Math.PI*this.chordLength/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcAngle",{get:function(){return Math.PI},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleRadius",{get:function(){return this.chordLength/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleDiameter",{get:function(){return 2*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCircumference",{get:function(){return 2*Math.PI*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCenterPoint",{get:function(){return(0,t.midpoint)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),e}(),i=n(872),s=function(){function e(e,n){this.chord=e,this.moreProps=n;var r=n.arcLength,i=(0,t.distance)(e[0],e[1]);if(r<=i)throw new Error("Arc length is too small.");if(r>=Math.PI*i/2)throw new Error("Arc length is too big.");for(var s=Math.PI/2,o=0;o<20;o++)s-=(r/i*Math.sin(s)-s)/(r/i*Math.cos(s)-1);this.arcAngle=2*s}return Object.defineProperty(e.prototype,"chordLength",{get:function(){return(0,t.distance)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcLength",{get:function(){return this.moreProps.arcLength},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleRadius",{get:function(){return this.arcLength/this.arcAngle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleDiameter",{get:function(){return 2*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCircumference",{get:function(){return 2*Math.PI*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCenterPoint",{get:function(){var e=(0,i.direction)((0,t.displacement)(this.chord[0],this.chord[1]));e+=(Math.PI-this.arcAngle)/2;var n=this.parentCircleRadius;return{x:this.chord[0].x+n*Math.cos(e),y:this.chord[0].y+n*Math.sin(e)}},enumerable:!1,configurable:!0}),e}(),o=function(){function e(e,n){this.chord=e,this.moreProps=n;var r=n.arcLength,i=(0,t.distance)(e[0],e[1]);if(0==i)throw new Error("Chord length cannot be zero.");if(r<=Math.PI*i/2)throw new Error("Arc length is too small.");for(var s=Math.PI,o=0;o<20;o++)s-=(r/i*Math.sin(Math.PI-s)-s)/(-r/i*Math.cos(Math.PI-s)-1);this.arcAngle=2*s}return Object.defineProperty(e.prototype,"chordLength",{get:function(){return(0,t.distance)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcLength",{get:function(){return this.moreProps.arcLength},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleRadius",{get:function(){return this.arcLength/this.arcAngle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleDiameter",{get:function(){return 2*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCircumference",{get:function(){return 2*Math.PI*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCenterPoint",{get:function(){var e=(0,i.direction)((0,t.displacement)(this.chord[0],this.chord[1]));e-=(this.arcAngle-Math.PI)/2;var n=this.parentCircleRadius;return{x:this.chord[0].x+n*Math.cos(e),y:this.chord[0].y+n*Math.sin(e)}},enumerable:!1,configurable:!0}),e}(),a=function(){function n(n,r){this.chord=n,this.moreProps=r;var i=r.arcLength,a=(0,t.distance)(n[0],n[1]);if(a>0&&i<=a)throw new Error("Arc length is too small.");var u=a<.001&&i<.001,c=Math.PI*a/2,h=Math.abs(i-c)<.001;this.wrappedCircularSegment=u||h?new e(n):i<c?new s(n,{arcLength:i}):new o(n,{arcLength:i})}return Object.defineProperty(n.prototype,"chordLength",{get:function(){return this.wrappedCircularSegment.chordLength},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"arcLength",{get:function(){return this.moreProps.arcLength},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"arcAngle",{get:function(){return this.wrappedCircularSegment.arcAngle},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleRadius",{get:function(){return this.wrappedCircularSegment.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleDiameter",{get:function(){return this.wrappedCircularSegment.parentCircleDiameter},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleCircumference",{get:function(){return this.wrappedCircularSegment.parentCircleCircumference},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleCenterPoint",{get:function(){return this.wrappedCircularSegment.parentCircleCenterPoint},enumerable:!1,configurable:!0}),n}()})(),r})(),t.exports=e()},986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>h,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},456:function(t){var e;e=()=>(()=>{var t={277:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{Vector:()=>n});class n{static matching(t){return new n(t.x,t.y)}constructor(t,e){this.x=t,this.y=e}[Symbol.iterator](){return[this.x,this.y].values()}get magnitude(){return Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2))}get direction(){return Math.atan2(this.y,this.x)}}return e})(),t.exports=e()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Point:()=>e,RelativePoint:()=>h});var t=n(277);class e{static matching(t){return new e(t.x,t.y)}constructor(t,e){this.x=t,this.y=e}[Symbol.iterator](){return[this.x,this.y].values()}displacementTo(e){return new t.Vector(e.x-this.x,e.y-this.y)}displacementFrom(e){return new t.Vector(this.x-e.x,this.y-e.y)}distanceTo(t){return this.displacementTo(t).magnitude}distanceFrom(t){return this.distanceTo(t)}directionTo(t){return this.displacementTo(t).direction}directionFrom(t){return this.displacementFrom(t).direction}}var i,s,o,a,u,c=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class h{constructor(e){i.add(this),s.set(this,void 0),o.set(this,new t.Vector(0,0)),a.set(this,{move:[]}),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,s,e),e.addEventListener("move",(()=>c(this,i,"m",u).call(this,"move")))}get x(){return c(this,s,"f").x+c(this,o,"f").x}set x(t){c(this,o,"f").x=t-c(this,s,"f").x,c(this,i,"m",u).call(this,"move")}get y(){return c(this,s,"f").y+c(this,o,"f").y}set y(t){c(this,o,"f").y=t-c(this,s,"f").y,c(this,i,"m",u).call(this,"move")}addEventListener(t,e){c(this,a,"f")[t].push(e)}removeEventListener(t,e){c(this,a,"f")[t]=c(this,a,"f")[t].filter((t=>t!==e))}}s=new WeakMap,o=new WeakMap,a=new WeakMap,i=new WeakSet,u=function(t){c(this,a,"f")[t].forEach((t=>t()))}})(),r})(),t.exports=e()},725:function(t){t.exports=(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>d,average:()=>r,degrees:()=>m,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,radians:()=>g,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>f,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>p,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return Math.abs(t-e)<=n}function f(t){i(t),t.reverse()}function p(t){var e=o(t);return e.reverse(),e}function m(t){return t*(180/Math.PI)}function g(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function c(t){return"object"==typeof t&&null!==t}function h(t){return Array.isArray(t)}return t.r(e),t.d(e,{isArray:()=>h,isFiniteNumber:()=>r,isNonFiniteNumber:()=>i,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>c,isNullish:()=>u,isNumber:()=>n,isPositiveFiniteNumber:()=>s,isString:()=>a}),e})()},30:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.pow(Math.pow(t.x,2)+Math.pow(t.y,2),.5)}function r(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>r,magnitude:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{areWithin:()=>a,centroid:()=>f,deepCopy:()=>s,direction:()=>l,displaced:()=>c,displacement:()=>u,distance:()=>o,isFinitePoint:()=>i,isPoint:()=>e,midpoint:()=>p});var t=n(854);function e(e){return(0,t.isNonNullObject)(e)&&(0,t.isNumber)(e.x)&&(0,t.isNumber)(e.y)}function i(n){return e(n)&&(0,t.isFiniteNumber)(n.x)&&(0,t.isFiniteNumber)(n.y)}function s(t){return{x:t.x,y:t.y}}function o(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.pow(Math.pow(n,2)+Math.pow(r,2),.5)}function a(t,e,n){return o(t,e)<=n}function u(t,e){return{x:e.x-t.x,y:e.y-t.y}}function c(t,e){return{x:t.x+e.x,y:t.y+e.y}}var h=n(30);function l(t,e){return(0,h.direction)(u(t,e))}var d=n(986);function f(t){return{x:(0,d.mean)(t.map((function(t){return t.x}))),y:(0,d.mean)(t.map((function(t){return t.y})))}}function p(t,e){return f([t,e])}})(),r})()},369:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>h,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function c(t){return"object"==typeof t&&null!==t}function h(t){return Array.isArray(t)}function l(t){return h(t)&&t.every(n)}function d(t){return h(t)&&t.every(r)}function f(t){return h(t)&&t.every(i)}function p(t){return h(t)&&t.every(a)}return t.r(e),t.d(e,{isArray:()=>h,isFiniteNumber:()=>r,isFiniteNumbersArray:()=>d,isNonFiniteNumber:()=>i,isNonFiniteNumbersArray:()=>f,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>c,isNullish:()=>u,isNumber:()=>n,isNumbersArray:()=>l,isPositiveFiniteNumber:()=>s,isString:()=>a,isStringsArray:()=>p}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Linkers:()=>g,Stems:()=>m,areConflicting:()=>c,areCrossing:()=>d,areEqual:()=>a,areKnotless:()=>l,areStacked:()=>u,deepCopy:()=>i,knotless:()=>p,mountainPlotTraversal:()=>y,parseDotBracket:()=>b,sorted:()=>o});var t=n(854),e=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function i(n){return(0,t.isNumbersArray)(n)?e([],n,!0):n.map((function(t){return e([],t,!0)}))}var s=n(986);function o(t){var e=i(t);return e.forEach(s.sortNumbers),e.sort((function(t,e){return t[0]-e[0]})),e}function a(t,e){var n=i(t),r=i(e);return(0,s.sortNumbers)(n),(0,s.sortNumbers)(r),[0,1].every((function(t){return n[t]==r[t]}))}function u(t,e){var n=o([t,e]);return n[0][0]==n[1][0]-1&&n[0][1]==n[1][1]+1}function c(t,e){return(0,s.min)(t)==(0,s.min)(e)&&(0,s.max)(t)!=(0,s.max)(e)||(0,s.min)(t)!=(0,s.min)(e)&&(0,s.max)(t)==(0,s.max)(e)}function h(t){if(0==t.length)return[];for(var e=[],n=0;n<(0,s.max)(t.flat());n++)e.push(void 0);return t.forEach((function(t){e[t[0]-1]=t[1],e[t[1]-1]=t[0]})),e}function l(t){var e=h(t),n=[],r=!1;return e.forEach((function(t,e){var i=e+1;null==t||(i<t?n.push(i):i==t||n.pop()!=t&&(r=!0))})),!r}function d(t,e){return!l([t,e])}var f=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function p(t){var e=[],n=i(t);return n.sort((function(t,e){return Math.abs(t[0]-t[1])-Math.abs(e[0]-e[1])})),n.forEach((function(t){l(f(f([],e,!0),[t],!1))&&e.push(t)})),e}var m=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=this.targetStructure[1];if(0==t.length)return[];var e=o(t),n=[],r=[];return e.forEach((function(t){var e=0==r.length?null:r[r.length-1];!e||u(e,t)?r.push(t):(n.push(r),r=[t])})),n.push(r),n},t}(),g=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=(new(m.bind.apply(m,function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}([void 0],this.targetStructure,!1)))).get().flatMap((function(t){return[t.map(s.min),t.map(s.max)]}));t.forEach(s.sortNumbers),t.sort((function(t,e){return(0,s.min)(t)-(0,s.min)(e)}));for(var e=[],n=t.shift(),r=t.shift();n&&r;){for(var i=[],o=(0,s.max)(n),a=(0,s.min)(r),u=o;u<=a;u++)i.push(u);e.push(i),n=r,r=t.shift()}return e},t}();function y(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[0],r=t[1],i=h(r);if(!l(r))throw new Error("Pseudoknot(s) encountered.");var s=[],o=0;return n.forEach((function(t,e){var n=e+1,r=i[e];null==r?s.push(o):n<r?(s.push(o),o++):(n==r||o--,s.push(o))})),s}function b(t){var e=t.split(""),n=[".","(",")"];e.forEach((function(t){if(!n.includes(t))throw new Error('Unrecognized character in dot-bracket notation: "'.concat(t,'".'))}));var r=[],i=[];if(e.forEach((function(t,e){var n=e+1;if("("==t)i.push(n);else if(")"==t){var s=i.pop();if("number"!=typeof s)throw new Error("Unmatched downstream partner(s) in dot-bracket notation.");r.push([s,n])}})),i.length>0)throw new Error("Unmatched upstream partner(s) in dot-bracket notation.");return o(r)}})(),r})(),t.exports=e()},30:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.pow(Math.pow(t.x,2)+Math.pow(t.y,2),.5)}function r(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>r,magnitude:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Centroid:()=>s,Direction:()=>f,MaxCenterX:()=>u,MaxCenterY:()=>h,MinCenterX:()=>a,MinCenterY:()=>c,NucleobaseMock:()=>t,arrange:()=>N,circularize:()=>x,flipSelfX:()=>g,flipSelfY:()=>y,flipX:()=>p,flipY:()=>m,linearize:()=>b,rotate:()=>d,round:()=>_,shift:()=>e,stemmify:()=>w,straighten:()=>v,untangle:()=>L});class t{constructor(t){this.props=t}getCenterPoint(){return this.props.centerPoint}setCenterPoint(t){this.props.centerPoint=t}}function e(t,e){t.forEach((t=>{let n=t.getCenterPoint();t.setCenterPoint({x:n.x+e.x,y:n.y+e.y})}))}var i=n(725);class s{constructor(t){this.targetBases=t}get(){let t=this.targetBases.map((t=>t.getCenterPoint()));return(0,i.centroid)(t)}set(t){let n=this.get(),r=(0,i.displacement)(n,t);e(this.targetBases,r)}}var o=n(986);class a{constructor(t){this.targetBases=t}get(){return(0,o.min)(this.targetBases.map((t=>t.getCenterPoint().x)))}set(t){let n=this.get();e(this.targetBases,{x:t-n,y:0})}}class u{constructor(t){this.targetBases=t}get(){return(0,o.max)(this.targetBases.map((t=>t.getCenterPoint().x)))}set(t){let n=this.get();e(this.targetBases,{x:t-n,y:0})}}class c{constructor(t){this.targetBases=t}get(){return(0,o.min)(this.targetBases.map((t=>t.getCenterPoint().y)))}set(t){let n=this.get();e(this.targetBases,{x:0,y:t-n})}}class h{constructor(t){this.targetBases=t}get(){return(0,o.max)(this.targetBases.map((t=>t.getCenterPoint().y)))}set(t){let n=this.get();e(this.targetBases,{x:0,y:t-n})}}var l=n(30);function d(t,e){if(t.length<2)return;let n=t[0],r=t[t.length-1],s=(0,i.midpoint)(n.getCenterPoint(),r.getCenterPoint());t.forEach((t=>{let n=t.getCenterPoint(),r=(0,i.distance)(s,n),o=(0,l.direction)((0,i.displacement)(s,n));o+=e,t.setCenterPoint({x:s.x+r*Math.cos(o),y:s.y+r*Math.sin(o)})}))}class f{constructor(t){this.targetBases=t}get(){if(this.targetBases.length<2)return 0;let t=this.targetBases[0],e=this.targetBases[this.targetBases.length-1];return(0,l.direction)((0,i.displacement)(t.getCenterPoint(),e.getCenterPoint()))}set(t){let e=t-this.get();d(this.targetBases,e)}}function p(t){let e=new s(t).get().y;t.forEach((t=>{let n=t.getCenterPoint(),r=n.y-e;t.setCenterPoint({x:n.x,y:e-r})}))}function m(t){let e=new s(t).get().x;t.forEach((t=>{let n=t.getCenterPoint(),r=n.x-e;t.setCenterPoint({x:e-r,y:n.y})}))}function g(t){if(0==t.length)return;let n=t[0],{x:r,y:s}=n.getCenterPoint(),o={x:r,y:s},a=new f(t).get();d(t,-a),p(t),d(t,a),e(t,(0,i.displacement)(n.getCenterPoint(),o))}function y(t){let e=new s(t),{x:n,y:r}=e.get(),i=n,o=r,a=new f(t).get();d(t,-a),m(t),d(t,a),e.set({x:i,y:o})}function b(t,e){let{spacing:n}=e;if(t.length<2)return;let r=new f(t),i=r.get(),o=new s(t),{x:a,y:u}=o.get(),c={x:a,y:u};t.forEach(((t,e)=>{t.setCenterPoint({x:e*n,y:0})})),r.set(i),o.set(c)}function v(t){if(t.length<3)return;let e=t[0],n=t[t.length-1],r=[e.getCenterPoint(),n.getCenterPoint()],s=(0,i.distance)(r[0],r[1]),o=(0,l.direction)((0,i.displacement)(r[0],r[1])),a=s/(t.length-1),u=a*Math.cos(o),c=a*Math.sin(o),{x:h,y:d}=r[0];t.forEach((t=>{t.setCenterPoint({x:h,y:d}),h+=u,d+=c}))}function w(t,n){let{basePairLength:r,basePairSpacing:o}=n;if(t.length<2)return;let a=Math.ceil(t.length/2),u=t.slice(0,a),c=t.slice(a),h=new s(t),{x:l,y:p}=h.get(),m={x:l,y:p},g=new f(t).get();b(u,{spacing:o}),b(c,{spacing:o}),new f(u).set(-Math.PI/2),new f(c).set(Math.PI/2);let y=t[0],v=t[t.length-1];e(u,(0,i.displacement)(y.getCenterPoint(),{x:0,y:0})),e(c,(0,i.displacement)(v.getCenterPoint(),{x:r,y:0})),d(t,g),h.set(m)}function x(t,e){let{spacing:n,terminiGap:r}=e;if(t.length<2)return;let i=new s(t),{x:o,y:a}=i.get(),u=o,c=a,h=new f(t).get(),l=n*(t.length-1);l+=r,Math.abs(l)<1e-5&&(l=1e-5);let p=l/(2*Math.PI),m=Math.PI/2+2*Math.PI*(.5*r/l);t.forEach(((t,e)=>{let r=m+2*Math.PI*(e*n)/l;t.setCenterPoint({x:p*Math.cos(r),y:p*Math.sin(r)})})),d(t,h),i.set({x:u,y:c})}var S=n(173);function _(t,n){let{spacing:r}=n;if(t.length<3)return;let s=t[0],o=t[t.length-1],a=[s.getCenterPoint(),o.getCenterPoint()],u=(0,i.distance)(a[0],a[1]),c=r*(t.length-1);if(c-u<.001)return void v(t);if(u<.001){let{x:n,y:o}=s.getCenterPoint();return x(t,{spacing:r,terminiGap:u}),void e(t,(0,i.displacement)(s.getCenterPoint(),{x:n,y:o}))}let h=new S.CircularSegment(a,{arcLength:c}),d=h.parentCircleCenterPoint,f=h.parentCircleRadius,p=(0,l.direction)((0,i.displacement)(d,s.getCenterPoint())),m=h.arcAngle/(t.length-1);t.forEach((t=>{t.setCenterPoint({x:d.x+f*Math.cos(p),y:d.y+f*Math.sin(p)}),p+=m}))}var P=n(127),M=n(369);function N(t,n,r){var a,u,c;let{spacing:h}=r,l=null!==(a=r.basePairSpacing)&&void 0!==a?a:h,d=null!==(u=r.hairpinLoopSpacing)&&void 0!==u?u:h,p=null!==(c=r.terminiGap)&&void 0!==c?c:h,{x:m,y:g}=new s(t).get(),y={x:m,y:g},b=new f(t).get();[,n]=(0,P.knotless)(t,n);let v=new P.PositionPairs(t,n).get(),S=(0,M.mountainPlotTraversal)(t,v),N=t.filter(((t,e)=>0==S[e]));x(N,{spacing:h,terminiGap:p});let O=new P.Stems(t,n).get(),C=new Set(N),E=O.filter((t=>C.has(t[0][0]))),T=n=>{let r=n[0],{x:a,y:u}=new s(r).get(),c={x:a,y:u},p=new f(n[0]).get(),m=[...n.map((t=>t[0])),...n.map((t=>t[1])).reverse()];w(m,{basePairLength:h,basePairSpacing:l}),new f(m).set(p),e(m,(0,i.displacement)(new s(r).get(),c));let g=n[n.length-1],y=g.map((e=>t.indexOf(e))),b=t.filter(((t,e)=>(0,o.isBetweenExclusive)(e,(0,o.min)(y),(0,o.max)(y))&&S[e]==S[(0,o.min)(y)]+1)),v=new Set(b),x=O.filter((t=>v.has(t[0][0])));_([g[0],...b,g[1]],{spacing:x.length>0?h:d}),x.forEach((t=>T(t)))};E.forEach((t=>T(t))),new f(t).set(b),new s(t).set(y)}var O,C,E,T,A,j=n(456),k=function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n},D=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};function L(e,n,r){let i,{spacing:a}=r;if(0==e.length)return;if(0==n.length)return void function(t,e){let{spacing:n}=e,r=j.Point.matching(new s(t).get());x(t,{spacing:n,terminiGap:2*n}),new f(t).set(Math.PI/2),new s(t).set(r)}(e,r);[i,n]=(0,P.knotless)(e,n);let u=[...e],c=j.Point.matching(new s(u).get());e=[...e,new t({centerPoint:{x:0,y:0}})];let h=new I(e,n),l=h.loops;l.sort(((t,e)=>R(t,h)-R(e,h)));let p=l[0],m=(0,o.max)(p.linkers.map((t=>t.length))),g=p.linkers.flatMap((e=>[V(e),...Array.from({length:m-2}).map((()=>new t({centerPoint:{x:0,y:0}}))),q(e)]));if(x(g,{spacing:a,terminiGap:a}),d(g,-new f(g).get()),new s(g).set(c),p.linkers.forEach((t=>_(t,{spacing:a}))),p.emanatingStems.forEach((t=>B(t.bottomBasePair,h,r))),"outerStem"in p){let t=[p.outerStem.topBasePair[1],p.outerStem.topBasePair[0]],i=[...e.slice(h.indexOf(t[0])),...e.slice(0,h.indexOf(t[1])+1)],s=new Set(i);B(t,new I(i,n.filter((t=>t.every((t=>s.has(t)))))),r)}}function B(n,r,s){var a,u;let{spacing:c}=s,h=null!==(a=s.basePairSpacing)&&void 0!==a?a:c,l=null!==(u=s.hairpinLoopSpacing)&&void 0!==u?u:c,d=r.stems.find((t=>t.bottomBasePair[0]===n[0]));if(!d)throw new Error("Closing stem not found.");let f=j.Point.matching(n[0].getCenterPoint());w(d.bases,{basePairSpacing:h,basePairLength:c}),e(d.bases,(0,i.displacement)(n[0].getCenterPoint(),f));let p=r.loop(d.topBasePair);p.innerStems.length>0?function(n,r,s){let{spacing:a}=s,u=[r.indexOf(n[0]),r.indexOf(n[1])],c=r.loop(n).innerStems.flatMap((t=>t.bottomBasePair.map((t=>r.indexOf(t))))),h=(0,o.min)(c),l=(0,o.max)(c),d=r.sequence.filter(((t,e)=>e>=h&&e<=l&&r.mountainPlotTraversal[e]==r.mountainPlotTraversal[h]&&[e-1,e,e+1].some((t=>c.includes(t))))),f=(0,o.max)([d.length-2,h-(0,o.min)(u)-1,(0,o.max)(u)-l-1]);f=(0,o.max)([f,0]);let p=Array.from({length:f}).map((()=>new t({centerPoint:{x:0,y:0}}))),m=p.map((()=>new t({centerPoint:{x:0,y:0}}))),g=j.Point.matching(n[0].getCenterPoint());x([n[0],...p,...d,...m,n[1]],{spacing:a,terminiGap:a}),e([...n,...d],(0,i.displacement)(n[0].getCenterPoint(),g)),_(r.sequence.slice(u[0],h+1),{spacing:a}),_(r.sequence.slice(l,u[1]+1),{spacing:a})}(d.topBasePair,r,s):_(p.bases,{spacing:l}),p.innerStems.forEach((t=>B(t.bottomBasePair,r,s))),(0,P.consecutivePairs)(p.innerStems).map((([t,e])=>[t.bottomBasePair[1],...r.interveningBases(t.bottomBasePair[1],e.bottomBasePair[0]),e.bottomBasePair[0]])).filter((t=>t.length>=5)).forEach((t=>{let n=t.slice(1,-1),r=j.Point.matching(n[0].getCenterPoint());w(n,{basePairLength:(0,i.distance)(V(n).getCenterPoint(),q(n).getCenterPoint()),basePairSpacing:h}),n.length%2==0||_(function(t){if(t.length<3)throw new Error("The array has less than three items.");if(t.length%2==0)throw new Error("The array has an even number of items.");let e=Math.floor(t.length/2);return t.slice(e-1,e+2)}(n),{spacing:c}),e(n,(0,i.displacement)(n[0].getCenterPoint(),r))}))}class I{constructor(t,e){this.sequence=t,this.basePairs=e,O.set(this,void 0),C.set(this,void 0),E.set(this,void 0),T.set(this,void 0),k(this,O,new Map,"f"),this.sequence.forEach(((t,e)=>D(this,O,"f").set(t,e))),k(this,C,new Map,"f"),this.sequence.forEach(((t,e)=>D(this,C,"f").set(t,e+1))),k(this,E,new Map,"f"),this.basePairs.forEach((t=>D(this,E,"f").set(t[0],t[1]))),this.basePairs.forEach((t=>D(this,E,"f").set(t[1],t[0]))),k(this,T,this.basePairs.map((t=>[this.positionOf(t[0]),this.positionOf(t[1])])),"f"),this.mountainPlotTraversal=(0,M.mountainPlotTraversal)(this.sequence,D(this,T,"f")),this.stems=new P.Stems(this.sequence,this.basePairs).get().map((t=>new F(t)))}indexOf(t){let e=D(this,O,"f").get(t);if("number"!=typeof e)throw new Error("Base not found.");return e}positionOf(t){let e=D(this,C,"f").get(t);if("number"!=typeof e)throw new Error("Base not found.");return e}spannedBases(t){let e=this.indexOf(t[0]),n=this.indexOf(t[1]);return this.sequence.slice((0,o.min)([e,n])+1,(0,o.max)([e,n]))}numSpannedBases(t){return this.spannedBases(t).length}joinedBases(t){let e=this.indexOf(t[0]),n=this.indexOf(t[1]);return[...this.sequence.slice(0,(0,o.min)([e,n])+1),...this.sequence.slice((0,o.max)([e,n]))]}numJoinedBases(t){return this.joinedBases(t).length}interveningBases(t,e){let n=this.indexOf(t),r=this.indexOf(e);return this.sequence.slice((0,o.min)([n,r])+1,(0,o.max)([n,r]))}get loops(){return[this.outermostLoop,...this.stems.map((t=>this.loop(t.topBasePair)))]}loop(t){let e=[this.indexOf(t[0]),this.indexOf(t[1])],n=this.mountainPlotTraversal[e[0]]+1,r=this.spannedBases(t).filter((t=>this.mountainPlotTraversal[this.indexOf(t)]==n)),i=new Set(r),s=[t[0],...r,t[1]],o=this.stems.filter((t=>i.has(t.bottomBasePair[0]))),a=o,u=this.stems.find((e=>t.includes(e.topBasePair[0])));if(!u)throw new Error("Outer stem not found.");let c=(0,P.consecutivePairs)(o).map((([t,e])=>[t.bottomBasePair[1],...this.interveningBases(t.bottomBasePair[1],e.bottomBasePair[0]),e.bottomBasePair[0]]));return o.length>0&&(c.unshift([t[0],...this.interveningBases(t[0],V(o).bottomBasePair[0]),V(o).bottomBasePair[0]]),c.push([q(o).bottomBasePair[1],...this.interveningBases(q(o).bottomBasePair[1],t[1]),t[1]])),{bases:s,closingBasePair:t,outerStem:u,innerStems:o,emanatingStems:a,linkers:c}}get outermostLoop(){let t=this.stems.filter((t=>0==this.mountainPlotTraversal[this.indexOf(t.bottomBasePair[0])])),e=t,n=(0,P.consecutivePairs)(e).map((([t,e])=>[t.bottomBasePair[1],...this.interveningBases(t.bottomBasePair[1],e.bottomBasePair[0]),e.bottomBasePair[0]]));return e.length>0&&n.push([...this.sequence.slice(this.indexOf(q(e).bottomBasePair[1])),...this.sequence.slice(0,this.indexOf(V(e).bottomBasePair[0])+1)]),{stems:e,emanatingStems:t,linkers:n}}}O=new WeakMap,C=new WeakMap,E=new WeakMap,T=new WeakMap;class F{constructor(t){if(A.set(this,void 0),0==t.length)throw new Error("A stem must have at least one base-pair.");k(this,A,t,"f")}get bottomBasePair(){return V(D(this,A,"f"))}get topBasePair(){return q(D(this,A,"f"))}get side5(){return D(this,A,"f").map((t=>t[0]))}get side3(){let t=D(this,A,"f").map((t=>t[1]));return t.reverse(),t}get bases(){return[...this.side5,...this.side3]}}function R(t,e){let n=(0,o.max)(t.emanatingStems.map((t=>e.numSpannedBases(t.bottomBasePair))));return"closingBasePair"in t&&(n=(0,o.max)([n,e.numJoinedBases(t.closingBasePair)-2])),n}function V(t){if(0==t.length)throw new Error("The array is empty.");return t[0]}function q(t){if(0==t.length)throw new Error("The array is empty.");return t[t.length-1]}A=new WeakMap})(),r})(),t.exports=e()},139:function(t){var e;e=()=>(()=>{"use strict";var t={826:(t,e,n)=>{n.d(e,{A:()=>u,y:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,"._xow9qroX8E0n35EgMyS {\n cursor: grab;\n}\n\n._xow9qroX8E0n35EgMyS:active {\n cursor: grabbing;\n}\n",""]);var a="_xow9qroX8E0n35EgMyS";const u=o},314:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var o={};if(r)for(var a=0;a<this.length;a++){var u=this[a][0];null!=u&&(o[u]=!0)}for(var c=0;c<t.length;c++){var h=[].concat(t[c]);r&&o[h[0]]||(void 0!==s&&(void 0===h[5]||(h[1]="@layer".concat(h[5].length>0?" ".concat(h[5]):""," {").concat(h[1],"}")),h[5]=s),n&&(h[2]?(h[1]="@media ".concat(h[2]," {").concat(h[1],"}"),h[2]=n):h[2]=n),i&&(h[4]?(h[1]="@supports (".concat(h[4],") {").concat(h[1],"}"),h[4]=i):h[4]="".concat(i)),e.push(h))}},e}},601:t=>{t.exports=function(t){return t[1]}},72:t=>{var e=[];function n(t){for(var n=-1,r=0;r<e.length;r++)if(e[r].identifier===t){n=r;break}return n}function r(t,r){for(var s={},o=[],a=0;a<t.length;a++){var u=t[a],c=r.base?u[0]+r.base:u[0],h=s[c]||0,l="".concat(c," ").concat(h);s[c]=h+1;var d=n(l),f={css:u[1],media:u[2],sourceMap:u[3],supports:u[4],layer:u[5]};if(-1!==d)e[d].references++,e[d].updater(f);else{var p=i(f,r);r.byIndex=a,e.splice(a,0,{identifier:l,updater:p,references:1})}o.push(l)}return o}function i(t,e){var n=e.domAPI(e);return n.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,i){var s=r(t=t||[],i=i||{});return function(t){t=t||[];for(var o=0;o<s.length;o++){var a=n(s[o]);e[a].references--}for(var u=r(t,i),c=0;c<s.length;c++){var h=n(s[c]);0===e[h].references&&(e[h].updater(),e.splice(h,1))}s=u}}},659:t=>{var e={};t.exports=function(t,n){var r=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},540:t=>{t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},56:(t,e,n)=>{t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},825:t=>{t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var s=n.sourceMap;s&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleTagTransform(r,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},113:t=>{t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={id:r,exports:{}};return t[r](s,s.exports,n),s.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nc=void 0;var r={};n.r(r),n.d(r,{DragTranslater:()=>b});var i=n(72),s=n.n(i),o=n(825),a=n.n(o),u=n(659),c=n.n(u),h=n(56),l=n.n(h),d=n(540),f=n.n(d),p=n(113),m=n.n(p),g=n(826),y={};y.styleTagTransform=m(),y.setAttributes=l(),y.insert=c().bind(null,"head"),y.domAPI=a(),y.insertStyleElement=f(),s()(g.A,y),g.A&&g.A.locals&&g.A.locals;class b{constructor(t){this.targetForm=t,this.mouseIsDown=!1,this.interactionDepth="shallow",window.addEventListener("mousedown",(t=>this.handleMouseDown(t))),window.addEventListener("mousemove",(t=>this.handleMouseMove(t))),window.addEventListener("mouseup",(t=>this.handleMouseUp(t))),t.addEventListener("mouseover",(e=>{e.target!==t||t.classList.add(g.y)})),t.addEventListener("mouseout",(e=>{e.target!==t||t.classList.remove(g.y)}))}get currentTranslation(){let t=this.targetForm.getBoundingClientRect(),e=t.x,n=t.y,r=this.targetForm.style.translate;this.targetForm.style.translate="0px 0px";let i=this.targetForm.getBoundingClientRect(),s=i.x,o=i.y;return this.targetForm.style.translate=r,{x:e-s,y:n-o}}set currentTranslation(t){this.targetForm.style.translate=`${t.x}px ${t.y}px`}untranslate(){this.targetForm.style.translate="0px 0px"}handleMouseDown(t){this.lastMouseDown=t,this.mouseIsDown=!0}handleMouseMove(t){if(!this.mouseIsDown)return;if(!this.lastMouseDown)return;if(!(this.lastMouseDown.target instanceof Node))return;if("shallow"==this.interactionDepth){if(this.lastMouseDown.target!==this.targetForm)return}else if(!this.targetForm.contains(this.lastMouseDown.target))return;let e=this.currentTranslation;this.currentTranslation={x:e.x+t.movementX,y:e.y+t.movementY}}handleMouseUp(t){this.mouseIsDown=!1}}return r})(),t.exports=e()},986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>h,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},725:function(t){t.exports=(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>d,average:()=>r,degrees:()=>m,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,radians:()=>g,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>f,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>p,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return Math.abs(t-e)<=n}function f(t){i(t),t.reverse()}function p(t){var e=o(t);return e.reverse(),e}function m(t){return t*(180/Math.PI)}function g(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function c(t){return"object"==typeof t&&null!==t}function h(t){return Array.isArray(t)}return t.r(e),t.d(e,{isArray:()=>h,isFiniteNumber:()=>r,isNonFiniteNumber:()=>i,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>c,isNullish:()=>u,isNumber:()=>n,isPositiveFiniteNumber:()=>s,isString:()=>a}),e})()},30:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.pow(Math.pow(t.x,2)+Math.pow(t.y,2),.5)}function r(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>r,magnitude:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{areWithin:()=>a,centroid:()=>f,deepCopy:()=>s,direction:()=>l,displaced:()=>c,displacement:()=>u,distance:()=>o,isFinitePoint:()=>i,isPoint:()=>e,midpoint:()=>p});var t=n(854);function e(e){return(0,t.isNonNullObject)(e)&&(0,t.isNumber)(e.x)&&(0,t.isNumber)(e.y)}function i(n){return e(n)&&(0,t.isFiniteNumber)(n.x)&&(0,t.isFiniteNumber)(n.y)}function s(t){return{x:t.x,y:t.y}}function o(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.pow(Math.pow(n,2)+Math.pow(r,2),.5)}function a(t,e,n){return o(t,e)<=n}function u(t,e){return{x:e.x-t.x,y:e.y-t.y}}function c(t,e){return{x:t.x+e.x,y:t.y+e.y}}var h=n(30);function l(t,e){return(0,h.direction)(u(t,e))}var d=n(986);function f(t){return{x:(0,d.mean)(t.map((function(t){return t.x}))),y:(0,d.mean)(t.map((function(t){return t.y})))}}function p(t,e){return f([t,e])}})(),r})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function c(t){return"object"==typeof t&&null!==t}function h(t){return Array.isArray(t)}function l(t){return h(t)&&0==t.length}function d(t){return h(t)&&t.length>0}function f(t){return h(t)&&t.every(n)}function p(t){return f(t)&&t.length>0}function m(t){return h(t)&&t.every(r)}function g(t){return h(t)&&t.every(i)}function y(t){return h(t)&&t.every(a)}function b(t){return y(t)&&t.length>0}return t.r(e),t.d(e,{isArray:()=>h,isEmptyArray:()=>l,isFiniteNumber:()=>r,isFiniteNumbersArray:()=>m,isNonEmptyArray:()=>d,isNonEmptyNumbersArray:()=>p,isNonEmptyStringsArray:()=>b,isNonFiniteNumber:()=>i,isNonFiniteNumbersArray:()=>g,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>c,isNullish:()=>u,isNumber:()=>n,isNumbersArray:()=>f,isPositiveFiniteNumber:()=>s,isString:()=>a,isStringsArray:()=>y}),e})()},660:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>h,JI:()=>c,nn:()=>a,t0:()=>u});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,"@import url(https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap);"]),o.push([t.id,".jw6xcAPwHpTbyf4_SKFC {\n margin-top: 29px;\n\n display: block;\n}\n\n.QEOfY8APPfT4dMtiFt6o {\n position: absolute;\n\n top: 54px;\n right: 82px;\n left: 66px;\n bottom: 60px;\n\n max-width: 311px;\n max-height: 553px;\n margin-right: auto;\n\n overflow: auto;\n\n border: 1px solid #2b0744;\n border-radius: 15px;\n box-shadow: 0px 2px 16px rgba(0, 0, 0, 0.06);\n\n padding: 20px 0px 50px 32px;\n\n background-color: #f0f0ffc2;\n\n backdrop-filter: blur(8px);\n -webkit-backdrop-filter: blur(8px);\n}\n\n.kK_MqLhOkyrKMi9h7UXg .jw6xcAPwHpTbyf4_SKFC {\n display: none;\n}\n",""]);var a="jw6xcAPwHpTbyf4_SKFC",u="QEOfY8APPfT4dMtiFt6o",c="kK_MqLhOkyrKMi9h7UXg";const h=o},667:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>c,ML:()=>a,W5:()=>u});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.WNihwtKaVrQbyLljtVy7 {\n display: flex;\n flex-direction: row;\n align-items: center;\n}\n\n.X9F4MxqBx1g11R__XpPF {\n margin-left: 10px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 12px;\n font-weight: 700;\n font-style: normal;\n color: black;\n}\n',""]);var a="WNihwtKaVrQbyLljtVy7",u="X9F4MxqBx1g11R__XpPF";const c=o},882:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,b:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.QNds0QB68pNSdkS6_VtA {\n position: absolute;\n top: 13px;\n right: 17px;\n\n border: none;\n outline: none;\n\n padding: 3px 12px;\n border-radius: 3px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 16px;\n font-weight: 600;\n font-style: normal;\n color: #871414;\n\n cursor: pointer;\n\n pointer-events: auto;\n\n background-color: transparent;\n}\n\n.QNds0QB68pNSdkS6_VtA:hover {\n background-color: #cab8d99c;\n}\n\n.QNds0QB68pNSdkS6_VtA:active {\n background-color: #aa8eba9e;\n}\n',""]);var a="QNds0QB68pNSdkS6_VtA";const u=o},95:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,k:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.yjbAlhImuUj51RJfDTzk {\n margin: 0px;\n\n border: none;\n\n padding: 4px 32px 4px 32px;\n border-radius: 2px;\n\n /* use before pseudo-element for background */\n background-color: transparent;\n position: relative;\n isolation: isolate;\n\n font-family: "Open Sans", sans-serif;\n font-size: 12px;\n font-weight: 600;\n font-style: normal;\n color: white;\n\n cursor: pointer;\n\n pointer-events: auto;\n}\n\n.yjbAlhImuUj51RJfDTzk::before {\n content: "";\n\n position: absolute;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n\n border-radius: 2px;\n background-color: #0d0d82;\n box-shadow: 0 3px 3px rgba(213, 213, 255, 0.53);\n\n z-index: -1;\n}\n\n.yjbAlhImuUj51RJfDTzk:focus {\n outline: none;\n}\n\n.yjbAlhImuUj51RJfDTzk:hover::before {\n transform: scale(1.05);\n transition: transform 0.1s;\n}\n\n.yjbAlhImuUj51RJfDTzk:active::before {\n transform: scale(1);\n transition: transform 0s;\n}\n',""]);var a="yjbAlhImuUj51RJfDTzk";const u=o},284:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>c,oP:()=>a,ps:()=>u});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.giz4k0bsvRVjGqUbFrnw {\n margin-right: 1px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 12px;\n font-weight: 700;\n font-style: normal;\n color: black;\n}\n\n.KCO7RYM2lfygb0mgKjM2 {\n margin-top: 22px;\n\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 6px;\n}\n',""]);var a="giz4k0bsvRVjGqUbFrnw",u="KCO7RYM2lfygb0mgKjM2";const c=o},7:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,w:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.sAvvpQVOUFp11iP_95M9 {\n margin-top: 13px;\n margin-bottom: 0px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 26px;\n font-weight: 700;\n font-style: normal;\n color: black;\n\n user-select: none;\n -webkit-user-select: none;\n\n /**\n * So that the form can be dragged around while clicking on top of the header.\n */\n pointer-events: none;\n}\n',""]);var a="sAvvpQVOUFp11iP_95M9";const u=o},645:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,E:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.CUlsdtuZC4HUi_TGFoTy {\n margin: 0px;\n\n border: none;\n\n padding: 4px 12px;\n border-radius: 3px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 12px;\n font-weight: 700;\n font-style: normal;\n color: #06064a;\n\n background-color: rgba(219, 219, 255, 0.9);\n\n cursor: pointer;\n\n pointer-events: auto;\n}\n\n.CUlsdtuZC4HUi_TGFoTy:hover {\n background-color: rgba(175, 175, 255, 0.92);\n}\n\n.CUlsdtuZC4HUi_TGFoTy:active {\n background-color: rgba(147, 147, 255, 0.92);\n}\n\n.CUlsdtuZC4HUi_TGFoTy:focus {\n outline: none;\n}\n',""]);var a="CUlsdtuZC4HUi_TGFoTy";const u=o},501:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>d,D:()=>a,Ik:()=>h,Qs:()=>c,ho:()=>l,wx:()=>u});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.ygDsd40iuV10Vt4ZbW_H {}\n\n.zq0Gcw10IK1yZ0jthmnv {\n margin: 0px;\n\n border: none;\n box-shadow: none;\n outline: none;\n\n padding: 0px;\n\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 6px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 12px;\n font-weight: 700;\n font-style: normal;\n color: black;\n\n background-color: transparent;\n\n cursor: pointer;\n\n pointer-events: auto;\n\n text-decoration: none;\n}\n\n.zq0Gcw10IK1yZ0jthmnv:hover {\n text-decoration: underline;\n}\n\n.MTO3k3FJDGjcG1x6BN2J {\n margin: 10px 0px 0px 12px;\n\n display: flex;\n flex-direction: column;\n align-items: start;\n gap: 6px;\n\n visibility: collapse;\n max-height: 0px;\n}\n\n.KwtC5QHDvQB26eEDDLhN {\n margin-top: 30px;\n\n display: flex;\n flex-direction: column;\n align-items: start;\n}\n\n.mgMgtND1gJZ5ghlkd5La .MTO3k3FJDGjcG1x6BN2J {\n visibility: visible;\n max-height: none;\n}\n\n.mgMgtND1gJZ5ghlkd5La .ygDsd40iuV10Vt4ZbW_H {\n transform: rotate(90deg);\n}\n',""]);var a="ygDsd40iuV10Vt4ZbW_H",u="zq0Gcw10IK1yZ0jthmnv",c="MTO3k3FJDGjcG1x6BN2J",h="KwtC5QHDvQB26eEDDLhN",l="mgMgtND1gJZ5ghlkd5La";const d=o},592:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>c,JU:()=>u,bw:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.FTmP1CyPvejRjLRIPReA {\n font-weight: 700;\n color: black;\n}\n\n.eVQFFR1fsbH0AJeSXW8h {\n font-family: "Open Sans", sans-serif;\n font-size: 12px;\n font-weight: 600;\n font-style: normal;\n color: #1b1b1c;\n\n user-select: none;\n -webkit-user-select: none;\n}\n',""]);var a="FTmP1CyPvejRjLRIPReA",u="eVQFFR1fsbH0AJeSXW8h";const c=o},213:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,O:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,".XewFrRrRMBKmyTamv1OX {\n margin-left: 16px;\n\n border: none;\n border-radius: 4px;\n box-shadow: 0px 0px 10px #d4d4dd;\n\n outline: none;\n\n width: 32px;\n height: 32px;\n\n display: flex;\n flex-direction: row;\n align-items: center;\n justify-content: center;\n\n background-color: black;\n\n cursor: grab;\n\n pointer-events: auto;\n}\n\n.XewFrRrRMBKmyTamv1OX:hover {\n background-color: #404044;\n}\n\n.XewFrRrRMBKmyTamv1OX:active {\n background-color: #77777d;\n\n cursor: grabbing;\n}\n",""]);var a="XewFrRrRMBKmyTamv1OX";const u=o},61:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,_:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.UmFu1UlOQFScjilAm6UG {\n border: 1px solid #75758c;\n border-radius: 2px;\n\n outline: none;\n\n width: 78px;\n\n padding: 3px 6px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 12px;\n font-weight: 700;\n font-style: normal;\n color: black;\n\n pointer-events: auto;\n}\n\n.UmFu1UlOQFScjilAm6UG:hover {\n border-color: #0a0a0b;\n}\n\n.UmFu1UlOQFScjilAm6UG:focus {\n border-color: #0a0a0b;\n\n outline: none;\n}\n',""]);var a="UmFu1UlOQFScjilAm6UG";const u=o},713:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,k:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.ijR0HJEbMuBqwwunQNI8 {\n font-family: "Open Sans", sans-serif;\n font-size: 12px;\n font-weight: 700;\n font-style: normal;\n color: black;\n\n user-select: none;\n\n cursor: text;\n\n pointer-events: auto;\n}\n',""]);var a="ijR0HJEbMuBqwwunQNI8";const u=o},314:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var o={};if(r)for(var a=0;a<this.length;a++){var u=this[a][0];null!=u&&(o[u]=!0)}for(var c=0;c<t.length;c++){var h=[].concat(t[c]);r&&o[h[0]]||(void 0!==s&&(void 0===h[5]||(h[1]="@layer".concat(h[5].length>0?" ".concat(h[5]):""," {").concat(h[1],"}")),h[5]=s),n&&(h[2]?(h[1]="@media ".concat(h[2]," {").concat(h[1],"}"),h[2]=n):h[2]=n),i&&(h[4]?(h[1]="@supports (".concat(h[4],") {").concat(h[1],"}"),h[4]=i):h[4]="".concat(i)),e.push(h))}},e}},601:t=>{"use strict";t.exports=function(t){return t[1]}},692:function(t,e){var n;!function(e,n){"use strict";"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(e)}("undefined"!=typeof window?window:this,(function(r,i){"use strict";var s=[],o=Object.getPrototypeOf,a=s.slice,u=s.flat?function(t){return s.flat.call(t)}:function(t){return s.concat.apply([],t)},c=s.push,h=s.indexOf,l={},d=l.toString,f=l.hasOwnProperty,p=f.toString,m=p.call(Object),g={},y=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType&&"function"!=typeof t.item},b=function(t){return null!=t&&t===t.window},v=r.document,w={type:!0,src:!0,nonce:!0,noModule:!0};function x(t,e,n){var r,i,s=(n=n||v).createElement("script");if(s.text=t,e)for(r in w)(i=e[r]||e.getAttribute&&e.getAttribute(r))&&s.setAttribute(r,i);n.head.appendChild(s).parentNode.removeChild(s)}function S(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?l[d.call(t)]||"object":typeof t}var _="3.7.1",P=/HTML$/i,M=function(t,e){return new M.fn.init(t,e)};function N(t){var e=!!t&&"length"in t&&t.length,n=S(t);return!y(t)&&!b(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function O(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}M.fn=M.prototype={jquery:_,constructor:M,length:0,toArray:function(){return a.call(this)},get:function(t){return null==t?a.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=M.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return M.each(this,t)},map:function(t){return this.pushStack(M.map(this,(function(e,n){return t.call(e,n,e)})))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(M.grep(this,(function(t,e){return(e+1)%2})))},odd:function(){return this.pushStack(M.grep(this,(function(t,e){return e%2})))},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n<e?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:c,sort:s.sort,splice:s.splice},M.extend=M.fn.extend=function(){var t,e,n,r,i,s,o=arguments[0]||{},a=1,u=arguments.length,c=!1;for("boolean"==typeof o&&(c=o,o=arguments[a]||{},a++),"object"==typeof o||y(o)||(o={}),a===u&&(o=this,a--);a<u;a++)if(null!=(t=arguments[a]))for(e in t)r=t[e],"__proto__"!==e&&o!==r&&(c&&r&&(M.isPlainObject(r)||(i=Array.isArray(r)))?(n=o[e],s=i&&!Array.isArray(n)?[]:i||M.isPlainObject(n)?n:{},i=!1,o[e]=M.extend(c,s,r)):void 0!==r&&(o[e]=r));return o},M.extend({expando:"jQuery"+(_+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,n;return!(!t||"[object Object]"!==d.call(t)||(e=o(t))&&("function"!=typeof(n=f.call(e,"constructor")&&e.constructor)||p.call(n)!==m))},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e,n){x(t,{nonce:e&&e.nonce},n)},each:function(t,e){var n,r=0;if(N(t))for(n=t.length;r<n&&!1!==e.call(t[r],r,t[r]);r++);else for(r in t)if(!1===e.call(t[r],r,t[r]))break;return t},text:function(t){var e,n="",r=0,i=t.nodeType;if(!i)for(;e=t[r++];)n+=M.text(e);return 1===i||11===i?t.textContent:9===i?t.documentElement.textContent:3===i||4===i?t.nodeValue:n},makeArray:function(t,e){var n=e||[];return null!=t&&(N(Object(t))?M.merge(n,"string"==typeof t?[t]:t):c.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:h.call(e,t,n)},isXMLDoc:function(t){var e=t&&t.namespaceURI,n=t&&(t.ownerDocument||t).documentElement;return!P.test(e||n&&n.nodeName||"HTML")},merge:function(t,e){for(var n=+e.length,r=0,i=t.length;r<n;r++)t[i++]=e[r];return t.length=i,t},grep:function(t,e,n){for(var r=[],i=0,s=t.length,o=!n;i<s;i++)!e(t[i],i)!==o&&r.push(t[i]);return r},map:function(t,e,n){var r,i,s=0,o=[];if(N(t))for(r=t.length;s<r;s++)null!=(i=e(t[s],s,n))&&o.push(i);else for(s in t)null!=(i=e(t[s],s,n))&&o.push(i);return u(o)},guid:1,support:g}),"function"==typeof Symbol&&(M.fn[Symbol.iterator]=s[Symbol.iterator]),M.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(t,e){l["[object "+e+"]"]=e.toLowerCase()}));var C=s.pop,E=s.sort,T=s.splice,A="[\\x20\\t\\r\\n\\f]",j=new RegExp("^"+A+"+|((?:^|[^\\\\])(?:\\\\.)*)"+A+"+$","g");M.contains=function(t,e){var n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(t.contains?t.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))};var k=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function D(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t}M.escapeSelector=function(t){return(t+"").replace(k,D)};var L=v,B=c;!function(){var t,e,n,i,o,u,c,l,d,p,m=B,y=M.expando,b=0,v=0,w=tt(),x=tt(),S=tt(),_=tt(),P=function(t,e){return t===e&&(o=!0),0},N="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",k="(?:\\\\[\\da-fA-F]{1,6}"+A+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",D="\\["+A+"*("+k+")(?:"+A+"*([*^$|!~]?=)"+A+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+k+"))|)"+A+"*\\]",I=":("+k+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+D+")*)|.*)\\)|)",F=new RegExp(A+"+","g"),R=new RegExp("^"+A+"*,"+A+"*"),V=new RegExp("^"+A+"*([>+~]|"+A+")"+A+"*"),q=new RegExp(A+"|>"),z=new RegExp(I),X=new RegExp("^"+k+"$"),G={ID:new RegExp("^#("+k+")"),CLASS:new RegExp("^\\.("+k+")"),TAG:new RegExp("^("+k+"|[*])"),ATTR:new RegExp("^"+D),PSEUDO:new RegExp("^"+I),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+A+"*(even|odd|(([+-]|)(\\d*)n|)"+A+"*(?:([+-]|)"+A+"*(\\d+)|))"+A+"*\\)|)","i"),bool:new RegExp("^(?:"+N+")$","i"),needsContext:new RegExp("^"+A+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+A+"*((?:-\\d)?\\d*)"+A+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,H=/^h\d$/i,U=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,W=/[+~]/,$=new RegExp("\\\\[\\da-fA-F]{1,6}"+A+"?|\\\\([^\\r\\n\\f])","g"),K=function(t,e){var n="0x"+t.slice(1)-65536;return e||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},Q=function(){ut()},J=dt((function(t){return!0===t.disabled&&O(t,"fieldset")}),{dir:"parentNode",next:"legend"});try{m.apply(s=a.call(L.childNodes),L.childNodes),s[L.childNodes.length].nodeType}catch(t){m={apply:function(t,e){B.apply(t,a.call(e))},call:function(t){B.apply(t,a.call(arguments,1))}}}function Z(t,e,n,r){var i,s,o,a,c,h,f,p=e&&e.ownerDocument,b=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==b&&9!==b&&11!==b)return n;if(!r&&(ut(e),e=e||u,l)){if(11!==b&&(c=U.exec(t)))if(i=c[1]){if(9===b){if(!(o=e.getElementById(i)))return n;if(o.id===i)return m.call(n,o),n}else if(p&&(o=p.getElementById(i))&&Z.contains(e,o)&&o.id===i)return m.call(n,o),n}else{if(c[2])return m.apply(n,e.getElementsByTagName(t)),n;if((i=c[3])&&e.getElementsByClassName)return m.apply(n,e.getElementsByClassName(i)),n}if(!(_[t+" "]||d&&d.test(t))){if(f=t,p=e,1===b&&(q.test(t)||V.test(t))){for((p=W.test(t)&&at(e.parentNode)||e)==e&&g.scope||((a=e.getAttribute("id"))?a=M.escapeSelector(a):e.setAttribute("id",a=y)),s=(h=ht(t)).length;s--;)h[s]=(a?"#"+a:":scope")+" "+lt(h[s]);f=h.join(",")}try{return m.apply(n,p.querySelectorAll(f)),n}catch(e){_(t,!0)}finally{a===y&&e.removeAttribute("id")}}}return bt(t.replace(j,"$1"),e,n,r)}function tt(){var t=[];return function n(r,i){return t.push(r+" ")>e.cacheLength&&delete n[t.shift()],n[r+" "]=i}}function et(t){return t[y]=!0,t}function nt(t){var e=u.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function rt(t){return function(e){return O(e,"input")&&e.type===t}}function it(t){return function(e){return(O(e,"input")||O(e,"button"))&&e.type===t}}function st(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&J(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ot(t){return et((function(e){return e=+e,et((function(n,r){for(var i,s=t([],n.length,e),o=s.length;o--;)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))}))}))}function at(t){return t&&void 0!==t.getElementsByTagName&&t}function ut(t){var n,r=t?t.ownerDocument||t:L;return r!=u&&9===r.nodeType&&r.documentElement?(c=(u=r).documentElement,l=!M.isXMLDoc(u),p=c.matches||c.webkitMatchesSelector||c.msMatchesSelector,c.msMatchesSelector&&L!=u&&(n=u.defaultView)&&n.top!==n&&n.addEventListener("unload",Q),g.getById=nt((function(t){return c.appendChild(t).id=M.expando,!u.getElementsByName||!u.getElementsByName(M.expando).length})),g.disconnectedMatch=nt((function(t){return p.call(t,"*")})),g.scope=nt((function(){return u.querySelectorAll(":scope")})),g.cssHas=nt((function(){try{return u.querySelector(":has(*,:jqfake)"),!1}catch(t){return!0}})),g.getById?(e.filter.ID=function(t){var e=t.replace($,K);return function(t){return t.getAttribute("id")===e}},e.find.ID=function(t,e){if(void 0!==e.getElementById&&l){var n=e.getElementById(t);return n?[n]:[]}}):(e.filter.ID=function(t){var e=t.replace($,K);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},e.find.ID=function(t,e){if(void 0!==e.getElementById&&l){var n,r,i,s=e.getElementById(t);if(s){if((n=s.getAttributeNode("id"))&&n.value===t)return[s];for(i=e.getElementsByName(t),r=0;s=i[r++];)if((n=s.getAttributeNode("id"))&&n.value===t)return[s]}return[]}}),e.find.TAG=function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):e.querySelectorAll(t)},e.find.CLASS=function(t,e){if(void 0!==e.getElementsByClassName&&l)return e.getElementsByClassName(t)},d=[],nt((function(t){var e;c.appendChild(t).innerHTML="<a id='"+y+"' href='' disabled='disabled'></a><select id='"+y+"-\r\\' disabled='disabled'><option selected=''></option></select>",t.querySelectorAll("[selected]").length||d.push("\\["+A+"*(?:value|"+N+")"),t.querySelectorAll("[id~="+y+"-]").length||d.push("~="),t.querySelectorAll("a#"+y+"+*").length||d.push(".#.+[+~]"),t.querySelectorAll(":checked").length||d.push(":checked"),(e=u.createElement("input")).setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),c.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(e=u.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||d.push("\\["+A+"*name"+A+"*="+A+"*(?:''|\"\")")})),g.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),P=function(t,e){if(t===e)return o=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(1&(n=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!g.sortDetached&&e.compareDocumentPosition(t)===n?t===u||t.ownerDocument==L&&Z.contains(L,t)?-1:e===u||e.ownerDocument==L&&Z.contains(L,e)?1:i?h.call(i,t)-h.call(i,e):0:4&n?-1:1)},u):u}for(t in Z.matches=function(t,e){return Z(t,null,null,e)},Z.matchesSelector=function(t,e){if(ut(t),l&&!_[e+" "]&&(!d||!d.test(e)))try{var n=p.call(t,e);if(n||g.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){_(e,!0)}return Z(e,u,null,[t]).length>0},Z.contains=function(t,e){return(t.ownerDocument||t)!=u&&ut(t),M.contains(t,e)},Z.attr=function(t,n){(t.ownerDocument||t)!=u&&ut(t);var r=e.attrHandle[n.toLowerCase()],i=r&&f.call(e.attrHandle,n.toLowerCase())?r(t,n,!l):void 0;return void 0!==i?i:t.getAttribute(n)},Z.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},M.uniqueSort=function(t){var e,n=[],r=0,s=0;if(o=!g.sortStable,i=!g.sortStable&&a.call(t,0),E.call(t,P),o){for(;e=t[s++];)e===t[s]&&(r=n.push(s));for(;r--;)T.call(t,n[r],1)}return i=null,t},M.fn.uniqueSort=function(){return this.pushStack(M.uniqueSort(a.apply(this)))},e=M.expr={cacheLength:50,createPseudo:et,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace($,K),t[3]=(t[3]||t[4]||t[5]||"").replace($,K),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||Z.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&Z.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return G.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&z.test(n)&&(e=ht(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace($,K).toLowerCase();return"*"===t?function(){return!0}:function(t){return O(t,e)}},CLASS:function(t){var e=w[t+" "];return e||(e=new RegExp("(^|"+A+")"+t+"("+A+"|$)"))&&w(t,(function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,n){return function(r){var i=Z.attr(r,t);return null==i?"!="===e:!e||(i+="","="===e?i===n:"!="===e?i!==n:"^="===e?n&&0===i.indexOf(n):"*="===e?n&&i.indexOf(n)>-1:"$="===e?n&&i.slice(-n.length)===n:"~="===e?(" "+i.replace(F," ")+" ").indexOf(n)>-1:"|="===e&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,r,i){var s="nth"!==t.slice(0,3),o="last"!==t.slice(-4),a="of-type"===e;return 1===r&&0===i?function(t){return!!t.parentNode}:function(e,n,u){var c,h,l,d,f,p=s!==o?"nextSibling":"previousSibling",m=e.parentNode,g=a&&e.nodeName.toLowerCase(),v=!u&&!a,w=!1;if(m){if(s){for(;p;){for(l=e;l=l[p];)if(a?O(l,g):1===l.nodeType)return!1;f=p="only"===t&&!f&&"nextSibling"}return!0}if(f=[o?m.firstChild:m.lastChild],o&&v){for(w=(d=(c=(h=m[y]||(m[y]={}))[t]||[])[0]===b&&c[1])&&c[2],l=d&&m.childNodes[d];l=++d&&l&&l[p]||(w=d=0)||f.pop();)if(1===l.nodeType&&++w&&l===e){h[t]=[b,d,w];break}}else if(v&&(w=d=(c=(h=e[y]||(e[y]={}))[t]||[])[0]===b&&c[1]),!1===w)for(;(l=++d&&l&&l[p]||(w=d=0)||f.pop())&&(!(a?O(l,g):1===l.nodeType)||!++w||(v&&((h=l[y]||(l[y]={}))[t]=[b,w]),l!==e)););return(w-=i)===r||w%r==0&&w/r>=0}}},PSEUDO:function(t,n){var r,i=e.pseudos[t]||e.setFilters[t.toLowerCase()]||Z.error("unsupported pseudo: "+t);return i[y]?i(n):i.length>1?(r=[t,t,"",n],e.setFilters.hasOwnProperty(t.toLowerCase())?et((function(t,e){for(var r,s=i(t,n),o=s.length;o--;)t[r=h.call(t,s[o])]=!(e[r]=s[o])})):function(t){return i(t,0,r)}):i}},pseudos:{not:et((function(t){var e=[],n=[],r=yt(t.replace(j,"$1"));return r[y]?et((function(t,e,n,i){for(var s,o=r(t,null,i,[]),a=t.length;a--;)(s=o[a])&&(t[a]=!(e[a]=s))})):function(t,i,s){return e[0]=t,r(e,null,s,n),e[0]=null,!n.pop()}})),has:et((function(t){return function(e){return Z(t,e).length>0}})),contains:et((function(t){return t=t.replace($,K),function(e){return(e.textContent||M.text(e)).indexOf(t)>-1}})),lang:et((function(t){return X.test(t||"")||Z.error("unsupported lang: "+t),t=t.replace($,K).toLowerCase(),function(e){var n;do{if(n=l?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(t){var e=r.location&&r.location.hash;return e&&e.slice(1)===t.id},root:function(t){return t===c},focus:function(t){return t===function(){try{return u.activeElement}catch(t){}}()&&u.hasFocus()&&!!(t.type||t.href||~t.tabIndex)},enabled:st(!1),disabled:st(!0),checked:function(t){return O(t,"input")&&!!t.checked||O(t,"option")&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!e.pseudos.empty(t)},header:function(t){return H.test(t.nodeName)},input:function(t){return Y.test(t.nodeName)},button:function(t){return O(t,"input")&&"button"===t.type||O(t,"button")},text:function(t){var e;return O(t,"input")&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:ot((function(){return[0]})),last:ot((function(t,e){return[e-1]})),eq:ot((function(t,e,n){return[n<0?n+e:n]})),even:ot((function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t})),odd:ot((function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t})),lt:ot((function(t,e,n){var r;for(r=n<0?n+e:n>e?e:n;--r>=0;)t.push(r);return t})),gt:ot((function(t,e,n){for(var r=n<0?n+e:n;++r<e;)t.push(r);return t}))}},e.pseudos.nth=e.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})e.pseudos[t]=rt(t);for(t in{submit:!0,reset:!0})e.pseudos[t]=it(t);function ct(){}function ht(t,n){var r,i,s,o,a,u,c,h=x[t+" "];if(h)return n?0:h.slice(0);for(a=t,u=[],c=e.preFilter;a;){for(o in r&&!(i=R.exec(a))||(i&&(a=a.slice(i[0].length)||a),u.push(s=[])),r=!1,(i=V.exec(a))&&(r=i.shift(),s.push({value:r,type:i[0].replace(j," ")}),a=a.slice(r.length)),e.filter)!(i=G[o].exec(a))||c[o]&&!(i=c[o](i))||(r=i.shift(),s.push({value:r,type:o,matches:i}),a=a.slice(r.length));if(!r)break}return n?a.length:a?Z.error(t):x(t,u).slice(0)}function lt(t){for(var e=0,n=t.length,r="";e<n;e++)r+=t[e].value;return r}function dt(t,e,n){var r=e.dir,i=e.next,s=i||r,o=n&&"parentNode"===s,a=v++;return e.first?function(e,n,i){for(;e=e[r];)if(1===e.nodeType||o)return t(e,n,i);return!1}:function(e,n,u){var c,h,l=[b,a];if(u){for(;e=e[r];)if((1===e.nodeType||o)&&t(e,n,u))return!0}else for(;e=e[r];)if(1===e.nodeType||o)if(h=e[y]||(e[y]={}),i&&O(e,i))e=e[r]||e;else{if((c=h[s])&&c[0]===b&&c[1]===a)return l[2]=c[2];if(h[s]=l,l[2]=t(e,n,u))return!0}return!1}}function ft(t){return t.length>1?function(e,n,r){for(var i=t.length;i--;)if(!t[i](e,n,r))return!1;return!0}:t[0]}function pt(t,e,n,r,i){for(var s,o=[],a=0,u=t.length,c=null!=e;a<u;a++)(s=t[a])&&(n&&!n(s,r,i)||(o.push(s),c&&e.push(a)));return o}function mt(t,e,n,r,i,s){return r&&!r[y]&&(r=mt(r)),i&&!i[y]&&(i=mt(i,s)),et((function(s,o,a,u){var c,l,d,f,p=[],g=[],y=o.length,b=s||function(t,e,n){for(var r=0,i=e.length;r<i;r++)Z(t,e[r],n);return n}(e||"*",a.nodeType?[a]:a,[]),v=!t||!s&&e?b:pt(b,p,t,a,u);if(n?n(v,f=i||(s?t:y||r)?[]:o,a,u):f=v,r)for(c=pt(f,g),r(c,[],a,u),l=c.length;l--;)(d=c[l])&&(f[g[l]]=!(v[g[l]]=d));if(s){if(i||t){if(i){for(c=[],l=f.length;l--;)(d=f[l])&&c.push(v[l]=d);i(null,f=[],c,u)}for(l=f.length;l--;)(d=f[l])&&(c=i?h.call(s,d):p[l])>-1&&(s[c]=!(o[c]=d))}}else f=pt(f===o?f.splice(y,f.length):f),i?i(null,o,f,u):m.apply(o,f)}))}function gt(t){for(var r,i,s,o=t.length,a=e.relative[t[0].type],u=a||e.relative[" "],c=a?1:0,l=dt((function(t){return t===r}),u,!0),d=dt((function(t){return h.call(r,t)>-1}),u,!0),f=[function(t,e,i){var s=!a&&(i||e!=n)||((r=e).nodeType?l(t,e,i):d(t,e,i));return r=null,s}];c<o;c++)if(i=e.relative[t[c].type])f=[dt(ft(f),i)];else{if((i=e.filter[t[c].type].apply(null,t[c].matches))[y]){for(s=++c;s<o&&!e.relative[t[s].type];s++);return mt(c>1&&ft(f),c>1&&lt(t.slice(0,c-1).concat({value:" "===t[c-2].type?"*":""})).replace(j,"$1"),i,c<s&&gt(t.slice(c,s)),s<o&&gt(t=t.slice(s)),s<o&&lt(t))}f.push(i)}return ft(f)}function yt(t,r){var i,s=[],o=[],a=S[t+" "];if(!a){for(r||(r=ht(t)),i=r.length;i--;)(a=gt(r[i]))[y]?s.push(a):o.push(a);a=S(t,function(t,r){var i=r.length>0,s=t.length>0,o=function(o,a,c,h,d){var f,p,g,y=0,v="0",w=o&&[],x=[],S=n,_=o||s&&e.find.TAG("*",d),P=b+=null==S?1:Math.random()||.1,N=_.length;for(d&&(n=a==u||a||d);v!==N&&null!=(f=_[v]);v++){if(s&&f){for(p=0,a||f.ownerDocument==u||(ut(f),c=!l);g=t[p++];)if(g(f,a||u,c)){m.call(h,f);break}d&&(b=P)}i&&((f=!g&&f)&&y--,o&&w.push(f))}if(y+=v,i&&v!==y){for(p=0;g=r[p++];)g(w,x,a,c);if(o){if(y>0)for(;v--;)w[v]||x[v]||(x[v]=C.call(h));x=pt(x)}m.apply(h,x),d&&!o&&x.length>0&&y+r.length>1&&M.uniqueSort(h)}return d&&(b=P,n=S),w};return i?et(o):o}(o,s)),a.selector=t}return a}function bt(t,n,r,i){var s,o,a,u,c,h="function"==typeof t&&t,d=!i&&ht(t=h.selector||t);if(r=r||[],1===d.length){if((o=d[0]=d[0].slice(0)).length>2&&"ID"===(a=o[0]).type&&9===n.nodeType&&l&&e.relative[o[1].type]){if(!(n=(e.find.ID(a.matches[0].replace($,K),n)||[])[0]))return r;h&&(n=n.parentNode),t=t.slice(o.shift().value.length)}for(s=G.needsContext.test(t)?0:o.length;s--&&(a=o[s],!e.relative[u=a.type]);)if((c=e.find[u])&&(i=c(a.matches[0].replace($,K),W.test(o[0].type)&&at(n.parentNode)||n))){if(o.splice(s,1),!(t=i.length&&lt(o)))return m.apply(r,i),r;break}}return(h||yt(t,d))(i,n,!l,r,!n||W.test(t)&&at(n.parentNode)||n),r}ct.prototype=e.filters=e.pseudos,e.setFilters=new ct,g.sortStable=y.split("").sort(P).join("")===y,ut(),g.sortDetached=nt((function(t){return 1&t.compareDocumentPosition(u.createElement("fieldset"))})),M.find=Z,M.expr[":"]=M.expr.pseudos,M.unique=M.uniqueSort,Z.compile=yt,Z.select=bt,Z.setDocument=ut,Z.tokenize=ht,Z.escape=M.escapeSelector,Z.getText=M.text,Z.isXML=M.isXMLDoc,Z.selectors=M.expr,Z.support=M.support,Z.uniqueSort=M.uniqueSort}();var I=function(t,e,n){for(var r=[],i=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(i&&M(t).is(n))break;r.push(t)}return r},F=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},R=M.expr.match.needsContext,V=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function q(t,e,n){return y(e)?M.grep(t,(function(t,r){return!!e.call(t,r,t)!==n})):e.nodeType?M.grep(t,(function(t){return t===e!==n})):"string"!=typeof e?M.grep(t,(function(t){return h.call(e,t)>-1!==n})):M.filter(e,t,n)}M.filter=function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?M.find.matchesSelector(r,t)?[r]:[]:M.find.matches(t,M.grep(e,(function(t){return 1===t.nodeType})))},M.fn.extend({find:function(t){var e,n,r=this.length,i=this;if("string"!=typeof t)return this.pushStack(M(t).filter((function(){for(e=0;e<r;e++)if(M.contains(i[e],this))return!0})));for(n=this.pushStack([]),e=0;e<r;e++)M.find(t,i[e],n);return r>1?M.uniqueSort(n):n},filter:function(t){return this.pushStack(q(this,t||[],!1))},not:function(t){return this.pushStack(q(this,t||[],!0))},is:function(t){return!!q(this,"string"==typeof t&&R.test(t)?M(t):t||[],!1).length}});var z,X=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(M.fn.init=function(t,e,n){var r,i;if(!t)return this;if(n=n||z,"string"==typeof t){if(!(r="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:X.exec(t))||!r[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(r[1]){if(e=e instanceof M?e[0]:e,M.merge(this,M.parseHTML(r[1],e&&e.nodeType?e.ownerDocument||e:v,!0)),V.test(r[1])&&M.isPlainObject(e))for(r in e)y(this[r])?this[r](e[r]):this.attr(r,e[r]);return this}return(i=v.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):y(t)?void 0!==n.ready?n.ready(t):t(M):M.makeArray(t,this)}).prototype=M.fn,z=M(v);var G=/^(?:parents|prev(?:Until|All))/,Y={children:!0,contents:!0,next:!0,prev:!0};function H(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}M.fn.extend({has:function(t){var e=M(t,this),n=e.length;return this.filter((function(){for(var t=0;t<n;t++)if(M.contains(this,e[t]))return!0}))},closest:function(t,e){var n,r=0,i=this.length,s=[],o="string"!=typeof t&&M(t);if(!R.test(t))for(;r<i;r++)for(n=this[r];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(o?o.index(n)>-1:1===n.nodeType&&M.find.matchesSelector(n,t))){s.push(n);break}return this.pushStack(s.length>1?M.uniqueSort(s):s)},index:function(t){return t?"string"==typeof t?h.call(M(t),this[0]):h.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(M.uniqueSort(M.merge(this.get(),M(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),M.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return I(t,"parentNode")},parentsUntil:function(t,e,n){return I(t,"parentNode",n)},next:function(t){return H(t,"nextSibling")},prev:function(t){return H(t,"previousSibling")},nextAll:function(t){return I(t,"nextSibling")},prevAll:function(t){return I(t,"previousSibling")},nextUntil:function(t,e,n){return I(t,"nextSibling",n)},prevUntil:function(t,e,n){return I(t,"previousSibling",n)},siblings:function(t){return F((t.parentNode||{}).firstChild,t)},children:function(t){return F(t.firstChild)},contents:function(t){return null!=t.contentDocument&&o(t.contentDocument)?t.contentDocument:(O(t,"template")&&(t=t.content||t),M.merge([],t.childNodes))}},(function(t,e){M.fn[t]=function(n,r){var i=M.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=M.filter(r,i)),this.length>1&&(Y[t]||M.uniqueSort(i),G.test(t)&&i.reverse()),this.pushStack(i)}}));var U=/[^\x20\t\r\n\f]+/g;function W(t){return t}function $(t){throw t}function K(t,e,n,r){var i;try{t&&y(i=t.promise)?i.call(t).done(e).fail(n):t&&y(i=t.then)?i.call(t,e,n):e.apply(void 0,[t].slice(r))}catch(t){n.apply(void 0,[t])}}M.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return M.each(t.match(U)||[],(function(t,n){e[n]=!0})),e}(t):M.extend({},t);var e,n,r,i,s=[],o=[],a=-1,u=function(){for(i=i||t.once,r=e=!0;o.length;a=-1)for(n=o.shift();++a<s.length;)!1===s[a].apply(n[0],n[1])&&t.stopOnFalse&&(a=s.length,n=!1);t.memory||(n=!1),e=!1,i&&(s=n?[]:"")},c={add:function(){return s&&(n&&!e&&(a=s.length-1,o.push(n)),function e(n){M.each(n,(function(n,r){y(r)?t.unique&&c.has(r)||s.push(r):r&&r.length&&"string"!==S(r)&&e(r)}))}(arguments),n&&!e&&u()),this},remove:function(){return M.each(arguments,(function(t,e){for(var n;(n=M.inArray(e,s,n))>-1;)s.splice(n,1),n<=a&&a--})),this},has:function(t){return t?M.inArray(t,s)>-1:s.length>0},empty:function(){return s&&(s=[]),this},disable:function(){return i=o=[],s=n="",this},disabled:function(){return!s},lock:function(){return i=o=[],n||e||(s=n=""),this},locked:function(){return!!i},fireWith:function(t,n){return i||(n=[t,(n=n||[]).slice?n.slice():n],o.push(n),e||u()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},M.extend({Deferred:function(t){var e=[["notify","progress",M.Callbacks("memory"),M.Callbacks("memory"),2],["resolve","done",M.Callbacks("once memory"),M.Callbacks("once memory"),0,"resolved"],["reject","fail",M.Callbacks("once memory"),M.Callbacks("once memory"),1,"rejected"]],n="pending",i={state:function(){return n},always:function(){return s.done(arguments).fail(arguments),this},catch:function(t){return i.then(null,t)},pipe:function(){var t=arguments;return M.Deferred((function(n){M.each(e,(function(e,r){var i=y(t[r[4]])&&t[r[4]];s[r[1]]((function(){var t=i&&i.apply(this,arguments);t&&y(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[t]:arguments)}))})),t=null})).promise()},then:function(t,n,i){var s=0;function o(t,e,n,i){return function(){var a=this,u=arguments,c=function(){var r,c;if(!(t<s)){if((r=n.apply(a,u))===e.promise())throw new TypeError("Thenable self-resolution");c=r&&("object"==typeof r||"function"==typeof r)&&r.then,y(c)?i?c.call(r,o(s,e,W,i),o(s,e,$,i)):(s++,c.call(r,o(s,e,W,i),o(s,e,$,i),o(s,e,W,e.notifyWith))):(n!==W&&(a=void 0,u=[r]),(i||e.resolveWith)(a,u))}},h=i?c:function(){try{c()}catch(r){M.Deferred.exceptionHook&&M.Deferred.exceptionHook(r,h.error),t+1>=s&&(n!==$&&(a=void 0,u=[r]),e.rejectWith(a,u))}};t?h():(M.Deferred.getErrorHook?h.error=M.Deferred.getErrorHook():M.Deferred.getStackHook&&(h.error=M.Deferred.getStackHook()),r.setTimeout(h))}}return M.Deferred((function(r){e[0][3].add(o(0,r,y(i)?i:W,r.notifyWith)),e[1][3].add(o(0,r,y(t)?t:W)),e[2][3].add(o(0,r,y(n)?n:$))})).promise()},promise:function(t){return null!=t?M.extend(t,i):i}},s={};return M.each(e,(function(t,r){var o=r[2],a=r[5];i[r[1]]=o.add,a&&o.add((function(){n=a}),e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),o.add(r[3].fire),s[r[0]]=function(){return s[r[0]+"With"](this===s?void 0:this,arguments),this},s[r[0]+"With"]=o.fireWith})),i.promise(s),t&&t.call(s,s),s},when:function(t){var e=arguments.length,n=e,r=Array(n),i=a.call(arguments),s=M.Deferred(),o=function(t){return function(n){r[t]=this,i[t]=arguments.length>1?a.call(arguments):n,--e||s.resolveWith(r,i)}};if(e<=1&&(K(t,s.done(o(n)).resolve,s.reject,!e),"pending"===s.state()||y(i[n]&&i[n].then)))return s.then();for(;n--;)K(i[n],o(n),s.reject);return s.promise()}});var Q=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;M.Deferred.exceptionHook=function(t,e){r.console&&r.console.warn&&t&&Q.test(t.name)&&r.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},M.readyException=function(t){r.setTimeout((function(){throw t}))};var J=M.Deferred();function Z(){v.removeEventListener("DOMContentLoaded",Z),r.removeEventListener("load",Z),M.ready()}M.fn.ready=function(t){return J.then(t).catch((function(t){M.readyException(t)})),this},M.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--M.readyWait:M.isReady)||(M.isReady=!0,!0!==t&&--M.readyWait>0||J.resolveWith(v,[M]))}}),M.ready.then=J.then,"complete"===v.readyState||"loading"!==v.readyState&&!v.documentElement.doScroll?r.setTimeout(M.ready):(v.addEventListener("DOMContentLoaded",Z),r.addEventListener("load",Z));var tt=function(t,e,n,r,i,s,o){var a=0,u=t.length,c=null==n;if("object"===S(n))for(a in i=!0,n)tt(t,e,a,n[a],!0,s,o);else if(void 0!==r&&(i=!0,y(r)||(o=!0),c&&(o?(e.call(t,r),e=null):(c=e,e=function(t,e,n){return c.call(M(t),n)})),e))for(;a<u;a++)e(t[a],n,o?r:r.call(t[a],a,e(t[a],n)));return i?t:c?e.call(t):u?e(t[0],n):s},et=/^-ms-/,nt=/-([a-z])/g;function rt(t,e){return e.toUpperCase()}function it(t){return t.replace(et,"ms-").replace(nt,rt)}var st=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function ot(){this.expando=M.expando+ot.uid++}ot.uid=1,ot.prototype={cache:function(t){var e=t[this.expando];return e||(e={},st(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var r,i=this.cache(t);if("string"==typeof e)i[it(e)]=n;else for(r in e)i[it(r)]=e[r];return i},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][it(e)]},access:function(t,e,n){return void 0===e||e&&"string"==typeof e&&void 0===n?this.get(t,e):(this.set(t,e,n),void 0!==n?n:e)},remove:function(t,e){var n,r=t[this.expando];if(void 0!==r){if(void 0!==e){n=(e=Array.isArray(e)?e.map(it):(e=it(e))in r?[e]:e.match(U)||[]).length;for(;n--;)delete r[e[n]]}(void 0===e||M.isEmptyObject(r))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!M.isEmptyObject(e)}};var at=new ot,ut=new ot,ct=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ht=/[A-Z]/g;function lt(t,e,n){var r;if(void 0===n&&1===t.nodeType)if(r="data-"+e.replace(ht,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(r))){try{n=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:ct.test(t)?JSON.parse(t):t)}(n)}catch(t){}ut.set(t,e,n)}else n=void 0;return n}M.extend({hasData:function(t){return ut.hasData(t)||at.hasData(t)},data:function(t,e,n){return ut.access(t,e,n)},removeData:function(t,e){ut.remove(t,e)},_data:function(t,e,n){return at.access(t,e,n)},_removeData:function(t,e){at.remove(t,e)}}),M.fn.extend({data:function(t,e){var n,r,i,s=this[0],o=s&&s.attributes;if(void 0===t){if(this.length&&(i=ut.get(s),1===s.nodeType&&!at.get(s,"hasDataAttrs"))){for(n=o.length;n--;)o[n]&&0===(r=o[n].name).indexOf("data-")&&(r=it(r.slice(5)),lt(s,r,i[r]));at.set(s,"hasDataAttrs",!0)}return i}return"object"==typeof t?this.each((function(){ut.set(this,t)})):tt(this,(function(e){var n;if(s&&void 0===e)return void 0!==(n=ut.get(s,t))||void 0!==(n=lt(s,t))?n:void 0;this.each((function(){ut.set(this,t,e)}))}),null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each((function(){ut.remove(this,t)}))}}),M.extend({queue:function(t,e,n){var r;if(t)return e=(e||"fx")+"queue",r=at.get(t,e),n&&(!r||Array.isArray(n)?r=at.access(t,e,M.makeArray(n)):r.push(n)),r||[]},dequeue:function(t,e){e=e||"fx";var n=M.queue(t,e),r=n.length,i=n.shift(),s=M._queueHooks(t,e);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===e&&n.unshift("inprogress"),delete s.stop,i.call(t,(function(){M.dequeue(t,e)}),s)),!r&&s&&s.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return at.get(t,n)||at.access(t,n,{empty:M.Callbacks("once memory").add((function(){at.remove(t,[e+"queue",n])}))})}}),M.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?M.queue(this[0],t):void 0===e?this:this.each((function(){var n=M.queue(this,t,e);M._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&M.dequeue(this,t)}))},dequeue:function(t){return this.each((function(){M.dequeue(this,t)}))},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,r=1,i=M.Deferred(),s=this,o=this.length,a=function(){--r||i.resolveWith(s,[s])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";o--;)(n=at.get(s[o],t+"queueHooks"))&&n.empty&&(r++,n.empty.add(a));return a(),i.promise(e)}});var dt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ft=new RegExp("^(?:([+-])=|)("+dt+")([a-z%]*)$","i"),pt=["Top","Right","Bottom","Left"],mt=v.documentElement,gt=function(t){return M.contains(t.ownerDocument,t)},yt={composed:!0};mt.getRootNode&&(gt=function(t){return M.contains(t.ownerDocument,t)||t.getRootNode(yt)===t.ownerDocument});var bt=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&gt(t)&&"none"===M.css(t,"display")};function vt(t,e,n,r){var i,s,o=20,a=r?function(){return r.cur()}:function(){return M.css(t,e,"")},u=a(),c=n&&n[3]||(M.cssNumber[e]?"":"px"),h=t.nodeType&&(M.cssNumber[e]||"px"!==c&&+u)&&ft.exec(M.css(t,e));if(h&&h[3]!==c){for(u/=2,c=c||h[3],h=+u||1;o--;)M.style(t,e,h+c),(1-s)*(1-(s=a()/u||.5))<=0&&(o=0),h/=s;h*=2,M.style(t,e,h+c),n=n||[]}return n&&(h=+h||+u||0,i=n[1]?h+(n[1]+1)*n[2]:+n[2],r&&(r.unit=c,r.start=h,r.end=i)),i}var wt={};function xt(t){var e,n=t.ownerDocument,r=t.nodeName,i=wt[r];return i||(e=n.body.appendChild(n.createElement(r)),i=M.css(e,"display"),e.parentNode.removeChild(e),"none"===i&&(i="block"),wt[r]=i,i)}function St(t,e){for(var n,r,i=[],s=0,o=t.length;s<o;s++)(r=t[s]).style&&(n=r.style.display,e?("none"===n&&(i[s]=at.get(r,"display")||null,i[s]||(r.style.display="")),""===r.style.display&&bt(r)&&(i[s]=xt(r))):"none"!==n&&(i[s]="none",at.set(r,"display",n)));for(s=0;s<o;s++)null!=i[s]&&(t[s].style.display=i[s]);return t}M.fn.extend({show:function(){return St(this,!0)},hide:function(){return St(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each((function(){bt(this)?M(this).show():M(this).hide()}))}});var _t,Pt,Mt=/^(?:checkbox|radio)$/i,Nt=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Ot=/^$|^module$|\/(?:java|ecma)script/i;_t=v.createDocumentFragment().appendChild(v.createElement("div")),(Pt=v.createElement("input")).setAttribute("type","radio"),Pt.setAttribute("checked","checked"),Pt.setAttribute("name","t"),_t.appendChild(Pt),g.checkClone=_t.cloneNode(!0).cloneNode(!0).lastChild.checked,_t.innerHTML="<textarea>x</textarea>",g.noCloneChecked=!!_t.cloneNode(!0).lastChild.defaultValue,_t.innerHTML="<option></option>",g.option=!!_t.lastChild;var Ct={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function Et(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&O(t,e)?M.merge([t],n):n}function Tt(t,e){for(var n=0,r=t.length;n<r;n++)at.set(t[n],"globalEval",!e||at.get(e[n],"globalEval"))}Ct.tbody=Ct.tfoot=Ct.colgroup=Ct.caption=Ct.thead,Ct.th=Ct.td,g.option||(Ct.optgroup=Ct.option=[1,"<select multiple='multiple'>","</select>"]);var At=/<|&#?\w+;/;function jt(t,e,n,r,i){for(var s,o,a,u,c,h,l=e.createDocumentFragment(),d=[],f=0,p=t.length;f<p;f++)if((s=t[f])||0===s)if("object"===S(s))M.merge(d,s.nodeType?[s]:s);else if(At.test(s)){for(o=o||l.appendChild(e.createElement("div")),a=(Nt.exec(s)||["",""])[1].toLowerCase(),u=Ct[a]||Ct._default,o.innerHTML=u[1]+M.htmlPrefilter(s)+u[2],h=u[0];h--;)o=o.lastChild;M.merge(d,o.childNodes),(o=l.firstChild).textContent=""}else d.push(e.createTextNode(s));for(l.textContent="",f=0;s=d[f++];)if(r&&M.inArray(s,r)>-1)i&&i.push(s);else if(c=gt(s),o=Et(l.appendChild(s),"script"),c&&Tt(o),n)for(h=0;s=o[h++];)Ot.test(s.type||"")&&n.push(s);return l}var kt=/^([^.]*)(?:\.(.+)|)/;function Dt(){return!0}function Lt(){return!1}function Bt(t,e,n,r,i,s){var o,a;if("object"==typeof e){for(a in"string"!=typeof n&&(r=r||n,n=void 0),e)Bt(t,a,n,r,e[a],s);return t}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Lt;else if(!i)return t;return 1===s&&(o=i,i=function(t){return M().off(t),o.apply(this,arguments)},i.guid=o.guid||(o.guid=M.guid++)),t.each((function(){M.event.add(this,e,i,r,n)}))}function It(t,e,n){n?(at.set(t,e,!1),M.event.add(t,e,{namespace:!1,handler:function(t){var n,r=at.get(this,e);if(1&t.isTrigger&&this[e]){if(r)(M.event.special[e]||{}).delegateType&&t.stopPropagation();else if(r=a.call(arguments),at.set(this,e,r),this[e](),n=at.get(this,e),at.set(this,e,!1),r!==n)return t.stopImmediatePropagation(),t.preventDefault(),n}else r&&(at.set(this,e,M.event.trigger(r[0],r.slice(1),this)),t.stopPropagation(),t.isImmediatePropagationStopped=Dt)}})):void 0===at.get(t,e)&&M.event.add(t,e,Dt)}M.event={global:{},add:function(t,e,n,r,i){var s,o,a,u,c,h,l,d,f,p,m,g=at.get(t);if(st(t))for(n.handler&&(n=(s=n).handler,i=s.selector),i&&M.find.matchesSelector(mt,i),n.guid||(n.guid=M.guid++),(u=g.events)||(u=g.events=Object.create(null)),(o=g.handle)||(o=g.handle=function(e){return void 0!==M&&M.event.triggered!==e.type?M.event.dispatch.apply(t,arguments):void 0}),c=(e=(e||"").match(U)||[""]).length;c--;)f=m=(a=kt.exec(e[c])||[])[1],p=(a[2]||"").split(".").sort(),f&&(l=M.event.special[f]||{},f=(i?l.delegateType:l.bindType)||f,l=M.event.special[f]||{},h=M.extend({type:f,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&M.expr.match.needsContext.test(i),namespace:p.join(".")},s),(d=u[f])||((d=u[f]=[]).delegateCount=0,l.setup&&!1!==l.setup.call(t,r,p,o)||t.addEventListener&&t.addEventListener(f,o)),l.add&&(l.add.call(t,h),h.handler.guid||(h.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,h):d.push(h),M.event.global[f]=!0)},remove:function(t,e,n,r,i){var s,o,a,u,c,h,l,d,f,p,m,g=at.hasData(t)&&at.get(t);if(g&&(u=g.events)){for(c=(e=(e||"").match(U)||[""]).length;c--;)if(f=m=(a=kt.exec(e[c])||[])[1],p=(a[2]||"").split(".").sort(),f){for(l=M.event.special[f]||{},d=u[f=(r?l.delegateType:l.bindType)||f]||[],a=a[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=s=d.length;s--;)h=d[s],!i&&m!==h.origType||n&&n.guid!==h.guid||a&&!a.test(h.namespace)||r&&r!==h.selector&&("**"!==r||!h.selector)||(d.splice(s,1),h.selector&&d.delegateCount--,l.remove&&l.remove.call(t,h));o&&!d.length&&(l.teardown&&!1!==l.teardown.call(t,p,g.handle)||M.removeEvent(t,f,g.handle),delete u[f])}else for(f in u)M.event.remove(t,f+e[c],n,r,!0);M.isEmptyObject(u)&&at.remove(t,"handle events")}},dispatch:function(t){var e,n,r,i,s,o,a=new Array(arguments.length),u=M.event.fix(t),c=(at.get(this,"events")||Object.create(null))[u.type]||[],h=M.event.special[u.type]||{};for(a[0]=u,e=1;e<arguments.length;e++)a[e]=arguments[e];if(u.delegateTarget=this,!h.preDispatch||!1!==h.preDispatch.call(this,u)){for(o=M.event.handlers.call(this,u,c),e=0;(i=o[e++])&&!u.isPropagationStopped();)for(u.currentTarget=i.elem,n=0;(s=i.handlers[n++])&&!u.isImmediatePropagationStopped();)u.rnamespace&&!1!==s.namespace&&!u.rnamespace.test(s.namespace)||(u.handleObj=s,u.data=s.data,void 0!==(r=((M.event.special[s.origType]||{}).handle||s.handler).apply(i.elem,a))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()));return h.postDispatch&&h.postDispatch.call(this,u),u.result}},handlers:function(t,e){var n,r,i,s,o,a=[],u=e.delegateCount,c=t.target;if(u&&c.nodeType&&!("click"===t.type&&t.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==t.type||!0!==c.disabled)){for(s=[],o={},n=0;n<u;n++)void 0===o[i=(r=e[n]).selector+" "]&&(o[i]=r.needsContext?M(i,this).index(c)>-1:M.find(i,this,null,[c]).length),o[i]&&s.push(r);s.length&&a.push({elem:c,handlers:s})}return c=this,u<e.length&&a.push({elem:c,handlers:e.slice(u)}),a},addProp:function(t,e){Object.defineProperty(M.Event.prototype,t,{enumerable:!0,configurable:!0,get:y(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[M.expando]?t:new M.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return Mt.test(e.type)&&e.click&&O(e,"input")&&It(e,"click",!0),!1},trigger:function(t){var e=this||t;return Mt.test(e.type)&&e.click&&O(e,"input")&&It(e,"click"),!0},_default:function(t){var e=t.target;return Mt.test(e.type)&&e.click&&O(e,"input")&&at.get(e,"click")||O(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},M.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},M.Event=function(t,e){if(!(this instanceof M.Event))return new M.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?Dt:Lt,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&M.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[M.expando]=!0},M.Event.prototype={constructor:M.Event,isDefaultPrevented:Lt,isPropagationStopped:Lt,isImmediatePropagationStopped:Lt,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=Dt,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=Dt,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=Dt,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},M.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},M.event.addProp),M.each({focus:"focusin",blur:"focusout"},(function(t,e){function n(t){if(v.documentMode){var n=at.get(this,"handle"),r=M.event.fix(t);r.type="focusin"===t.type?"focus":"blur",r.isSimulated=!0,n(t),r.target===r.currentTarget&&n(r)}else M.event.simulate(e,t.target,M.event.fix(t))}M.event.special[t]={setup:function(){var r;if(It(this,t,!0),!v.documentMode)return!1;(r=at.get(this,e))||this.addEventListener(e,n),at.set(this,e,(r||0)+1)},trigger:function(){return It(this,t),!0},teardown:function(){var t;if(!v.documentMode)return!1;(t=at.get(this,e)-1)?at.set(this,e,t):(this.removeEventListener(e,n),at.remove(this,e))},_default:function(e){return at.get(e.target,t)},delegateType:e},M.event.special[e]={setup:function(){var r=this.ownerDocument||this.document||this,i=v.documentMode?this:r,s=at.get(i,e);s||(v.documentMode?this.addEventListener(e,n):r.addEventListener(t,n,!0)),at.set(i,e,(s||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=v.documentMode?this:r,s=at.get(i,e)-1;s?at.set(i,e,s):(v.documentMode?this.removeEventListener(e,n):r.removeEventListener(t,n,!0),at.remove(i,e))}}})),M.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(t,e){M.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,r=t.relatedTarget,i=t.handleObj;return r&&(r===this||M.contains(this,r))||(t.type=i.origType,n=i.handler.apply(this,arguments),t.type=e),n}}})),M.fn.extend({on:function(t,e,n,r){return Bt(this,t,e,n,r)},one:function(t,e,n,r){return Bt(this,t,e,n,r,1)},off:function(t,e,n){var r,i;if(t&&t.preventDefault&&t.handleObj)return r=t.handleObj,M(t.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof t){for(i in t)this.off(i,e,t[i]);return this}return!1!==e&&"function"!=typeof e||(n=e,e=void 0),!1===n&&(n=Lt),this.each((function(){M.event.remove(this,t,n,e)}))}});var Ft=/<script|<style|<link/i,Rt=/checked\s*(?:[^=]|=\s*.checked.)/i,Vt=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function qt(t,e){return O(t,"table")&&O(11!==e.nodeType?e:e.firstChild,"tr")&&M(t).children("tbody")[0]||t}function zt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Xt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Gt(t,e){var n,r,i,s,o,a;if(1===e.nodeType){if(at.hasData(t)&&(a=at.get(t).events))for(i in at.remove(e,"handle events"),a)for(n=0,r=a[i].length;n<r;n++)M.event.add(e,i,a[i][n]);ut.hasData(t)&&(s=ut.access(t),o=M.extend({},s),ut.set(e,o))}}function Yt(t,e){var n=e.nodeName.toLowerCase();"input"===n&&Mt.test(t.type)?e.checked=t.checked:"input"!==n&&"textarea"!==n||(e.defaultValue=t.defaultValue)}function Ht(t,e,n,r){e=u(e);var i,s,o,a,c,h,l=0,d=t.length,f=d-1,p=e[0],m=y(p);if(m||d>1&&"string"==typeof p&&!g.checkClone&&Rt.test(p))return t.each((function(i){var s=t.eq(i);m&&(e[0]=p.call(this,i,s.html())),Ht(s,e,n,r)}));if(d&&(s=(i=jt(e,t[0].ownerDocument,!1,t,r)).firstChild,1===i.childNodes.length&&(i=s),s||r)){for(a=(o=M.map(Et(i,"script"),zt)).length;l<d;l++)c=i,l!==f&&(c=M.clone(c,!0,!0),a&&M.merge(o,Et(c,"script"))),n.call(t[l],c,l);if(a)for(h=o[o.length-1].ownerDocument,M.map(o,Xt),l=0;l<a;l++)c=o[l],Ot.test(c.type||"")&&!at.access(c,"globalEval")&&M.contains(h,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?M._evalUrl&&!c.noModule&&M._evalUrl(c.src,{nonce:c.nonce||c.getAttribute("nonce")},h):x(c.textContent.replace(Vt,""),c,h))}return t}function Ut(t,e,n){for(var r,i=e?M.filter(e,t):t,s=0;null!=(r=i[s]);s++)n||1!==r.nodeType||M.cleanData(Et(r)),r.parentNode&&(n&&gt(r)&&Tt(Et(r,"script")),r.parentNode.removeChild(r));return t}M.extend({htmlPrefilter:function(t){return t},clone:function(t,e,n){var r,i,s,o,a=t.cloneNode(!0),u=gt(t);if(!(g.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||M.isXMLDoc(t)))for(o=Et(a),r=0,i=(s=Et(t)).length;r<i;r++)Yt(s[r],o[r]);if(e)if(n)for(s=s||Et(t),o=o||Et(a),r=0,i=s.length;r<i;r++)Gt(s[r],o[r]);else Gt(t,a);return(o=Et(a,"script")).length>0&&Tt(o,!u&&Et(t,"script")),a},cleanData:function(t){for(var e,n,r,i=M.event.special,s=0;void 0!==(n=t[s]);s++)if(st(n)){if(e=n[at.expando]){if(e.events)for(r in e.events)i[r]?M.event.remove(n,r):M.removeEvent(n,r,e.handle);n[at.expando]=void 0}n[ut.expando]&&(n[ut.expando]=void 0)}}}),M.fn.extend({detach:function(t){return Ut(this,t,!0)},remove:function(t){return Ut(this,t)},text:function(t){return tt(this,(function(t){return void 0===t?M.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)}))}),null,t,arguments.length)},append:function(){return Ht(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||qt(this,t).appendChild(t)}))},prepend:function(){return Ht(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=qt(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return Ht(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return Ht(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(M.cleanData(Et(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return M.clone(this,t,e)}))},html:function(t){return tt(this,(function(t){var e=this[0]||{},n=0,r=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Ft.test(t)&&!Ct[(Nt.exec(t)||["",""])[1].toLowerCase()]){t=M.htmlPrefilter(t);try{for(;n<r;n++)1===(e=this[n]||{}).nodeType&&(M.cleanData(Et(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)}),null,t,arguments.length)},replaceWith:function(){var t=[];return Ht(this,arguments,(function(e){var n=this.parentNode;M.inArray(this,t)<0&&(M.cleanData(Et(this)),n&&n.replaceChild(e,this))}),t)}}),M.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){M.fn[t]=function(t){for(var n,r=[],i=M(t),s=i.length-1,o=0;o<=s;o++)n=o===s?this:this.clone(!0),M(i[o])[e](n),c.apply(r,n.get());return this.pushStack(r)}}));var Wt=new RegExp("^("+dt+")(?!px)[a-z%]+$","i"),$t=/^--/,Kt=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=r),e.getComputedStyle(t)},Qt=function(t,e,n){var r,i,s={};for(i in e)s[i]=t.style[i],t.style[i]=e[i];for(i in r=n.call(t),e)t.style[i]=s[i];return r},Jt=new RegExp(pt.join("|"),"i");function Zt(t,e,n){var r,i,s,o,a=$t.test(e),u=t.style;return(n=n||Kt(t))&&(o=n.getPropertyValue(e)||n[e],a&&o&&(o=o.replace(j,"$1")||void 0),""!==o||gt(t)||(o=M.style(t,e)),!g.pixelBoxStyles()&&Wt.test(o)&&Jt.test(e)&&(r=u.width,i=u.minWidth,s=u.maxWidth,u.minWidth=u.maxWidth=u.width=o,o=n.width,u.width=r,u.minWidth=i,u.maxWidth=s)),void 0!==o?o+"":o}function te(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function t(){if(h){c.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",h.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",mt.appendChild(c).appendChild(h);var t=r.getComputedStyle(h);n="1%"!==t.top,u=12===e(t.marginLeft),h.style.right="60%",o=36===e(t.right),i=36===e(t.width),h.style.position="absolute",s=12===e(h.offsetWidth/3),mt.removeChild(c),h=null}}function e(t){return Math.round(parseFloat(t))}var n,i,s,o,a,u,c=v.createElement("div"),h=v.createElement("div");h.style&&(h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",g.clearCloneStyle="content-box"===h.style.backgroundClip,M.extend(g,{boxSizingReliable:function(){return t(),i},pixelBoxStyles:function(){return t(),o},pixelPosition:function(){return t(),n},reliableMarginLeft:function(){return t(),u},scrollboxSize:function(){return t(),s},reliableTrDimensions:function(){var t,e,n,i;return null==a&&(t=v.createElement("table"),e=v.createElement("tr"),n=v.createElement("div"),t.style.cssText="position:absolute;left:-11111px;border-collapse:separate",e.style.cssText="box-sizing:content-box;border:1px solid",e.style.height="1px",n.style.height="9px",n.style.display="block",mt.appendChild(t).appendChild(e).appendChild(n),i=r.getComputedStyle(e),a=parseInt(i.height,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10)===e.offsetHeight,mt.removeChild(t)),a}}))}();var ee=["Webkit","Moz","ms"],ne=v.createElement("div").style,re={};function ie(t){return M.cssProps[t]||re[t]||(t in ne?t:re[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=ee.length;n--;)if((t=ee[n]+e)in ne)return t}(t)||t)}var se=/^(none|table(?!-c[ea]).+)/,oe={position:"absolute",visibility:"hidden",display:"block"},ae={letterSpacing:"0",fontWeight:"400"};function ue(t,e,n){var r=ft.exec(e);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):e}function ce(t,e,n,r,i,s){var o="width"===e?1:0,a=0,u=0,c=0;if(n===(r?"border":"content"))return 0;for(;o<4;o+=2)"margin"===n&&(c+=M.css(t,n+pt[o],!0,i)),r?("content"===n&&(u-=M.css(t,"padding"+pt[o],!0,i)),"margin"!==n&&(u-=M.css(t,"border"+pt[o]+"Width",!0,i))):(u+=M.css(t,"padding"+pt[o],!0,i),"padding"!==n?u+=M.css(t,"border"+pt[o]+"Width",!0,i):a+=M.css(t,"border"+pt[o]+"Width",!0,i));return!r&&s>=0&&(u+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-s-u-a-.5))||0),u+c}function he(t,e,n){var r=Kt(t),i=(!g.boxSizingReliable()||n)&&"border-box"===M.css(t,"boxSizing",!1,r),s=i,o=Zt(t,e,r),a="offset"+e[0].toUpperCase()+e.slice(1);if(Wt.test(o)){if(!n)return o;o="auto"}return(!g.boxSizingReliable()&&i||!g.reliableTrDimensions()&&O(t,"tr")||"auto"===o||!parseFloat(o)&&"inline"===M.css(t,"display",!1,r))&&t.getClientRects().length&&(i="border-box"===M.css(t,"boxSizing",!1,r),(s=a in t)&&(o=t[a])),(o=parseFloat(o)||0)+ce(t,e,n||(i?"border":"content"),s,r,o)+"px"}function le(t,e,n,r,i){return new le.prototype.init(t,e,n,r,i)}M.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Zt(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(t,e,n,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var i,s,o,a=it(e),u=$t.test(e),c=t.style;if(u||(e=ie(a)),o=M.cssHooks[e]||M.cssHooks[a],void 0===n)return o&&"get"in o&&void 0!==(i=o.get(t,!1,r))?i:c[e];"string"==(s=typeof n)&&(i=ft.exec(n))&&i[1]&&(n=vt(t,e,i),s="number"),null!=n&&n==n&&("number"!==s||u||(n+=i&&i[3]||(M.cssNumber[a]?"":"px")),g.clearCloneStyle||""!==n||0!==e.indexOf("background")||(c[e]="inherit"),o&&"set"in o&&void 0===(n=o.set(t,n,r))||(u?c.setProperty(e,n):c[e]=n))}},css:function(t,e,n,r){var i,s,o,a=it(e);return $t.test(e)||(e=ie(a)),(o=M.cssHooks[e]||M.cssHooks[a])&&"get"in o&&(i=o.get(t,!0,n)),void 0===i&&(i=Zt(t,e,r)),"normal"===i&&e in ae&&(i=ae[e]),""===n||n?(s=parseFloat(i),!0===n||isFinite(s)?s||0:i):i}}),M.each(["height","width"],(function(t,e){M.cssHooks[e]={get:function(t,n,r){if(n)return!se.test(M.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?he(t,e,r):Qt(t,oe,(function(){return he(t,e,r)}))},set:function(t,n,r){var i,s=Kt(t),o=!g.scrollboxSize()&&"absolute"===s.position,a=(o||r)&&"border-box"===M.css(t,"boxSizing",!1,s),u=r?ce(t,e,r,a,s):0;return a&&o&&(u-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(s[e])-ce(t,e,"border",!1,s)-.5)),u&&(i=ft.exec(n))&&"px"!==(i[3]||"px")&&(t.style[e]=n,n=M.css(t,e)),ue(0,n,u)}}})),M.cssHooks.marginLeft=te(g.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(Zt(t,"marginLeft"))||t.getBoundingClientRect().left-Qt(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),M.each({margin:"",padding:"",border:"Width"},(function(t,e){M.cssHooks[t+e]={expand:function(n){for(var r=0,i={},s="string"==typeof n?n.split(" "):[n];r<4;r++)i[t+pt[r]+e]=s[r]||s[r-2]||s[0];return i}},"margin"!==t&&(M.cssHooks[t+e].set=ue)})),M.fn.extend({css:function(t,e){return tt(this,(function(t,e,n){var r,i,s={},o=0;if(Array.isArray(e)){for(r=Kt(t),i=e.length;o<i;o++)s[e[o]]=M.css(t,e[o],!1,r);return s}return void 0!==n?M.style(t,e,n):M.css(t,e)}),t,e,arguments.length>1)}}),M.Tween=le,le.prototype={constructor:le,init:function(t,e,n,r,i,s){this.elem=t,this.prop=n,this.easing=i||M.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=s||(M.cssNumber[n]?"":"px")},cur:function(){var t=le.propHooks[this.prop];return t&&t.get?t.get(this):le.propHooks._default.get(this)},run:function(t){var e,n=le.propHooks[this.prop];return this.options.duration?this.pos=e=M.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):le.propHooks._default.set(this),this}},le.prototype.init.prototype=le.prototype,le.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=M.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){M.fx.step[t.prop]?M.fx.step[t.prop](t):1!==t.elem.nodeType||!M.cssHooks[t.prop]&&null==t.elem.style[ie(t.prop)]?t.elem[t.prop]=t.now:M.style(t.elem,t.prop,t.now+t.unit)}}},le.propHooks.scrollTop=le.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},M.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},M.fx=le.prototype.init,M.fx.step={};var de,fe,pe=/^(?:toggle|show|hide)$/,me=/queueHooks$/;function ge(){fe&&(!1===v.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(ge):r.setTimeout(ge,M.fx.interval),M.fx.tick())}function ye(){return r.setTimeout((function(){de=void 0})),de=Date.now()}function be(t,e){var n,r=0,i={height:t};for(e=e?1:0;r<4;r+=2-e)i["margin"+(n=pt[r])]=i["padding"+n]=t;return e&&(i.opacity=i.width=t),i}function ve(t,e,n){for(var r,i=(we.tweeners[e]||[]).concat(we.tweeners["*"]),s=0,o=i.length;s<o;s++)if(r=i[s].call(n,e,t))return r}function we(t,e,n){var r,i,s=0,o=we.prefilters.length,a=M.Deferred().always((function(){delete u.elem})),u=function(){if(i)return!1;for(var e=de||ye(),n=Math.max(0,c.startTime+c.duration-e),r=1-(n/c.duration||0),s=0,o=c.tweens.length;s<o;s++)c.tweens[s].run(r);return a.notifyWith(t,[c,r,n]),r<1&&o?n:(o||a.notifyWith(t,[c,1,0]),a.resolveWith(t,[c]),!1)},c=a.promise({elem:t,props:M.extend({},e),opts:M.extend(!0,{specialEasing:{},easing:M.easing._default},n),originalProperties:e,originalOptions:n,startTime:de||ye(),duration:n.duration,tweens:[],createTween:function(e,n){var r=M.Tween(t,c.opts,e,n,c.opts.specialEasing[e]||c.opts.easing);return c.tweens.push(r),r},stop:function(e){var n=0,r=e?c.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)c.tweens[n].run(1);return e?(a.notifyWith(t,[c,1,0]),a.resolveWith(t,[c,e])):a.rejectWith(t,[c,e]),this}}),h=c.props;for(function(t,e){var n,r,i,s,o;for(n in t)if(i=e[r=it(n)],s=t[n],Array.isArray(s)&&(i=s[1],s=t[n]=s[0]),n!==r&&(t[r]=s,delete t[n]),(o=M.cssHooks[r])&&"expand"in o)for(n in s=o.expand(s),delete t[r],s)n in t||(t[n]=s[n],e[n]=i);else e[r]=i}(h,c.opts.specialEasing);s<o;s++)if(r=we.prefilters[s].call(c,t,h,c.opts))return y(r.stop)&&(M._queueHooks(c.elem,c.opts.queue).stop=r.stop.bind(r)),r;return M.map(h,ve,c),y(c.opts.start)&&c.opts.start.call(t,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),M.fx.timer(M.extend(u,{elem:t,anim:c,queue:c.opts.queue})),c}M.Animation=M.extend(we,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return vt(n.elem,t,ft.exec(e),n),n}]},tweener:function(t,e){y(t)?(e=t,t=["*"]):t=t.match(U);for(var n,r=0,i=t.length;r<i;r++)n=t[r],we.tweeners[n]=we.tweeners[n]||[],we.tweeners[n].unshift(e)},prefilters:[function(t,e,n){var r,i,s,o,a,u,c,h,l="width"in e||"height"in e,d=this,f={},p=t.style,m=t.nodeType&&bt(t),g=at.get(t,"fxshow");for(r in n.queue||(null==(o=M._queueHooks(t,"fx")).unqueued&&(o.unqueued=0,a=o.empty.fire,o.empty.fire=function(){o.unqueued||a()}),o.unqueued++,d.always((function(){d.always((function(){o.unqueued--,M.queue(t,"fx").length||o.empty.fire()}))}))),e)if(i=e[r],pe.test(i)){if(delete e[r],s=s||"toggle"===i,i===(m?"hide":"show")){if("show"!==i||!g||void 0===g[r])continue;m=!0}f[r]=g&&g[r]||M.style(t,r)}if((u=!M.isEmptyObject(e))||!M.isEmptyObject(f))for(r in l&&1===t.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],null==(c=g&&g.display)&&(c=at.get(t,"display")),"none"===(h=M.css(t,"display"))&&(c?h=c:(St([t],!0),c=t.style.display||c,h=M.css(t,"display"),St([t]))),("inline"===h||"inline-block"===h&&null!=c)&&"none"===M.css(t,"float")&&(u||(d.done((function(){p.display=c})),null==c&&(h=p.display,c="none"===h?"":h)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",d.always((function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}))),u=!1,f)u||(g?"hidden"in g&&(m=g.hidden):g=at.access(t,"fxshow",{display:c}),s&&(g.hidden=!m),m&&St([t],!0),d.done((function(){for(r in m||St([t]),at.remove(t,"fxshow"),f)M.style(t,r,f[r])}))),u=ve(m?g[r]:0,r,d),r in g||(g[r]=u.start,m&&(u.end=u.start,u.start=0))}],prefilter:function(t,e){e?we.prefilters.unshift(t):we.prefilters.push(t)}}),M.speed=function(t,e,n){var r=t&&"object"==typeof t?M.extend({},t):{complete:n||!n&&e||y(t)&&t,duration:t,easing:n&&e||e&&!y(e)&&e};return M.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in M.fx.speeds?r.duration=M.fx.speeds[r.duration]:r.duration=M.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){y(r.old)&&r.old.call(this),r.queue&&M.dequeue(this,r.queue)},r},M.fn.extend({fadeTo:function(t,e,n,r){return this.filter(bt).css("opacity",0).show().end().animate({opacity:e},t,n,r)},animate:function(t,e,n,r){var i=M.isEmptyObject(t),s=M.speed(e,n,r),o=function(){var e=we(this,M.extend({},t),s);(i||at.get(this,"finish"))&&e.stop(!0)};return o.finish=o,i||!1===s.queue?this.each(o):this.queue(s.queue,o)},stop:function(t,e,n){var r=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&this.queue(t||"fx",[]),this.each((function(){var e=!0,i=null!=t&&t+"queueHooks",s=M.timers,o=at.get(this);if(i)o[i]&&o[i].stop&&r(o[i]);else for(i in o)o[i]&&o[i].stop&&me.test(i)&&r(o[i]);for(i=s.length;i--;)s[i].elem!==this||null!=t&&s[i].queue!==t||(s[i].anim.stop(n),e=!1,s.splice(i,1));!e&&n||M.dequeue(this,t)}))},finish:function(t){return!1!==t&&(t=t||"fx"),this.each((function(){var e,n=at.get(this),r=n[t+"queue"],i=n[t+"queueHooks"],s=M.timers,o=r?r.length:0;for(n.finish=!0,M.queue(this,t,[]),i&&i.stop&&i.stop.call(this,!0),e=s.length;e--;)s[e].elem===this&&s[e].queue===t&&(s[e].anim.stop(!0),s.splice(e,1));for(e=0;e<o;e++)r[e]&&r[e].finish&&r[e].finish.call(this);delete n.finish}))}}),M.each(["toggle","show","hide"],(function(t,e){var n=M.fn[e];M.fn[e]=function(t,r,i){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(be(e,!0),t,r,i)}})),M.each({slideDown:be("show"),slideUp:be("hide"),slideToggle:be("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){M.fn[t]=function(t,n,r){return this.animate(e,t,n,r)}})),M.timers=[],M.fx.tick=function(){var t,e=0,n=M.timers;for(de=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||M.fx.stop(),de=void 0},M.fx.timer=function(t){M.timers.push(t),M.fx.start()},M.fx.interval=13,M.fx.start=function(){fe||(fe=!0,ge())},M.fx.stop=function(){fe=null},M.fx.speeds={slow:600,fast:200,_default:400},M.fn.delay=function(t,e){return t=M.fx&&M.fx.speeds[t]||t,e=e||"fx",this.queue(e,(function(e,n){var i=r.setTimeout(e,t);n.stop=function(){r.clearTimeout(i)}}))},function(){var t=v.createElement("input"),e=v.createElement("select").appendChild(v.createElement("option"));t.type="checkbox",g.checkOn=""!==t.value,g.optSelected=e.selected,(t=v.createElement("input")).value="t",t.type="radio",g.radioValue="t"===t.value}();var xe,Se=M.expr.attrHandle;M.fn.extend({attr:function(t,e){return tt(this,M.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each((function(){M.removeAttr(this,t)}))}}),M.extend({attr:function(t,e,n){var r,i,s=t.nodeType;if(3!==s&&8!==s&&2!==s)return void 0===t.getAttribute?M.prop(t,e,n):(1===s&&M.isXMLDoc(t)||(i=M.attrHooks[e.toLowerCase()]||(M.expr.match.bool.test(e)?xe:void 0)),void 0!==n?null===n?void M.removeAttr(t,e):i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:(t.setAttribute(e,n+""),n):i&&"get"in i&&null!==(r=i.get(t,e))?r:null==(r=M.find.attr(t,e))?void 0:r)},attrHooks:{type:{set:function(t,e){if(!g.radioValue&&"radio"===e&&O(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,r=0,i=e&&e.match(U);if(i&&1===t.nodeType)for(;n=i[r++];)t.removeAttribute(n)}}),xe={set:function(t,e,n){return!1===e?M.removeAttr(t,n):t.setAttribute(n,n),n}},M.each(M.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=Se[e]||M.find.attr;Se[e]=function(t,e,r){var i,s,o=e.toLowerCase();return r||(s=Se[o],Se[o]=i,i=null!=n(t,e,r)?o:null,Se[o]=s),i}}));var _e=/^(?:input|select|textarea|button)$/i,Pe=/^(?:a|area)$/i;function Me(t){return(t.match(U)||[]).join(" ")}function Ne(t){return t.getAttribute&&t.getAttribute("class")||""}function Oe(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(U)||[]}M.fn.extend({prop:function(t,e){return tt(this,M.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[M.propFix[t]||t]}))}}),M.extend({prop:function(t,e,n){var r,i,s=t.nodeType;if(3!==s&&8!==s&&2!==s)return 1===s&&M.isXMLDoc(t)||(e=M.propFix[e]||e,i=M.propHooks[e]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:t[e]=n:i&&"get"in i&&null!==(r=i.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){var e=M.find.attr(t,"tabindex");return e?parseInt(e,10):_e.test(t.nodeName)||Pe.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(M.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),M.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){M.propFix[this.toLowerCase()]=this})),M.fn.extend({addClass:function(t){var e,n,r,i,s,o;return y(t)?this.each((function(e){M(this).addClass(t.call(this,e,Ne(this)))})):(e=Oe(t)).length?this.each((function(){if(r=Ne(this),n=1===this.nodeType&&" "+Me(r)+" "){for(s=0;s<e.length;s++)i=e[s],n.indexOf(" "+i+" ")<0&&(n+=i+" ");o=Me(n),r!==o&&this.setAttribute("class",o)}})):this},removeClass:function(t){var e,n,r,i,s,o;return y(t)?this.each((function(e){M(this).removeClass(t.call(this,e,Ne(this)))})):arguments.length?(e=Oe(t)).length?this.each((function(){if(r=Ne(this),n=1===this.nodeType&&" "+Me(r)+" "){for(s=0;s<e.length;s++)for(i=e[s];n.indexOf(" "+i+" ")>-1;)n=n.replace(" "+i+" "," ");o=Me(n),r!==o&&this.setAttribute("class",o)}})):this:this.attr("class","")},toggleClass:function(t,e){var n,r,i,s,o=typeof t,a="string"===o||Array.isArray(t);return y(t)?this.each((function(n){M(this).toggleClass(t.call(this,n,Ne(this),e),e)})):"boolean"==typeof e&&a?e?this.addClass(t):this.removeClass(t):(n=Oe(t),this.each((function(){if(a)for(s=M(this),i=0;i<n.length;i++)r=n[i],s.hasClass(r)?s.removeClass(r):s.addClass(r);else void 0!==t&&"boolean"!==o||((r=Ne(this))&&at.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===t?"":at.get(this,"__className__")||""))})))},hasClass:function(t){var e,n,r=0;for(e=" "+t+" ";n=this[r++];)if(1===n.nodeType&&(" "+Me(Ne(n))+" ").indexOf(e)>-1)return!0;return!1}});var Ce=/\r/g;M.fn.extend({val:function(t){var e,n,r,i=this[0];return arguments.length?(r=y(t),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?t.call(this,n,M(this).val()):t)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=M.map(i,(function(t){return null==t?"":t+""}))),(e=M.valHooks[this.type]||M.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))}))):i?(e=M.valHooks[i.type]||M.valHooks[i.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(Ce,""):null==n?"":n:void 0}}),M.extend({valHooks:{option:{get:function(t){var e=M.find.attr(t,"value");return null!=e?e:Me(M.text(t))}},select:{get:function(t){var e,n,r,i=t.options,s=t.selectedIndex,o="select-one"===t.type,a=o?null:[],u=o?s+1:i.length;for(r=s<0?u:o?s:0;r<u;r++)if(((n=i[r]).selected||r===s)&&!n.disabled&&(!n.parentNode.disabled||!O(n.parentNode,"optgroup"))){if(e=M(n).val(),o)return e;a.push(e)}return a},set:function(t,e){for(var n,r,i=t.options,s=M.makeArray(e),o=i.length;o--;)((r=i[o]).selected=M.inArray(M.valHooks.option.get(r),s)>-1)&&(n=!0);return n||(t.selectedIndex=-1),s}}}}),M.each(["radio","checkbox"],(function(){M.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=M.inArray(M(t).val(),e)>-1}},g.checkOn||(M.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}));var Ee=r.location,Te={guid:Date.now()},Ae=/\?/;M.parseXML=function(t){var e,n;if(!t||"string"!=typeof t)return null;try{e=(new r.DOMParser).parseFromString(t,"text/xml")}catch(t){}return n=e&&e.getElementsByTagName("parsererror")[0],e&&!n||M.error("Invalid XML: "+(n?M.map(n.childNodes,(function(t){return t.textContent})).join("\n"):t)),e};var je=/^(?:focusinfocus|focusoutblur)$/,ke=function(t){t.stopPropagation()};M.extend(M.event,{trigger:function(t,e,n,i){var s,o,a,u,c,h,l,d,p=[n||v],m=f.call(t,"type")?t.type:t,g=f.call(t,"namespace")?t.namespace.split("."):[];if(o=d=a=n=n||v,3!==n.nodeType&&8!==n.nodeType&&!je.test(m+M.event.triggered)&&(m.indexOf(".")>-1&&(g=m.split("."),m=g.shift(),g.sort()),c=m.indexOf(":")<0&&"on"+m,(t=t[M.expando]?t:new M.Event(m,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=g.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),e=null==e?[t]:M.makeArray(e,[t]),l=M.event.special[m]||{},i||!l.trigger||!1!==l.trigger.apply(n,e))){if(!i&&!l.noBubble&&!b(n)){for(u=l.delegateType||m,je.test(u+m)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||v)&&p.push(a.defaultView||a.parentWindow||r)}for(s=0;(o=p[s++])&&!t.isPropagationStopped();)d=o,t.type=s>1?u:l.bindType||m,(h=(at.get(o,"events")||Object.create(null))[t.type]&&at.get(o,"handle"))&&h.apply(o,e),(h=c&&o[c])&&h.apply&&st(o)&&(t.result=h.apply(o,e),!1===t.result&&t.preventDefault());return t.type=m,i||t.isDefaultPrevented()||l._default&&!1!==l._default.apply(p.pop(),e)||!st(n)||c&&y(n[m])&&!b(n)&&((a=n[c])&&(n[c]=null),M.event.triggered=m,t.isPropagationStopped()&&d.addEventListener(m,ke),n[m](),t.isPropagationStopped()&&d.removeEventListener(m,ke),M.event.triggered=void 0,a&&(n[c]=a)),t.result}},simulate:function(t,e,n){var r=M.extend(new M.Event,n,{type:t,isSimulated:!0});M.event.trigger(r,null,e)}}),M.fn.extend({trigger:function(t,e){return this.each((function(){M.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return M.event.trigger(t,e,n,!0)}});var De=/\[\]$/,Le=/\r?\n/g,Be=/^(?:submit|button|image|reset|file)$/i,Ie=/^(?:input|select|textarea|keygen)/i;function Fe(t,e,n,r){var i;if(Array.isArray(e))M.each(e,(function(e,i){n||De.test(t)?r(t,i):Fe(t+"["+("object"==typeof i&&null!=i?e:"")+"]",i,n,r)}));else if(n||"object"!==S(e))r(t,e);else for(i in e)Fe(t+"["+i+"]",e[i],n,r)}M.param=function(t,e){var n,r=[],i=function(t,e){var n=y(e)?e():e;r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!M.isPlainObject(t))M.each(t,(function(){i(this.name,this.value)}));else for(n in t)Fe(n,t[n],e,i);return r.join("&")},M.fn.extend({serialize:function(){return M.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=M.prop(this,"elements");return t?M.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!M(this).is(":disabled")&&Ie.test(this.nodeName)&&!Be.test(t)&&(this.checked||!Mt.test(t))})).map((function(t,e){var n=M(this).val();return null==n?null:Array.isArray(n)?M.map(n,(function(t){return{name:e.name,value:t.replace(Le,"\r\n")}})):{name:e.name,value:n.replace(Le,"\r\n")}})).get()}});var Re=/%20/g,Ve=/#.*$/,qe=/([?&])_=[^&]*/,ze=/^(.*?):[ \t]*([^\r\n]*)$/gm,Xe=/^(?:GET|HEAD)$/,Ge=/^\/\//,Ye={},He={},Ue="*/".concat("*"),We=v.createElement("a");function $e(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,i=0,s=e.toLowerCase().match(U)||[];if(y(n))for(;r=s[i++];)"+"===r[0]?(r=r.slice(1)||"*",(t[r]=t[r]||[]).unshift(n)):(t[r]=t[r]||[]).push(n)}}function Ke(t,e,n,r){var i={},s=t===He;function o(a){var u;return i[a]=!0,M.each(t[a]||[],(function(t,a){var c=a(e,n,r);return"string"!=typeof c||s||i[c]?s?!(u=c):void 0:(e.dataTypes.unshift(c),o(c),!1)})),u}return o(e.dataTypes[0])||!i["*"]&&o("*")}function Qe(t,e){var n,r,i=M.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((i[n]?t:r||(r={}))[n]=e[n]);return r&&M.extend(!0,t,r),t}We.href=Ee.href,M.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ee.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Ee.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ue,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":M.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Qe(Qe(t,M.ajaxSettings),e):Qe(M.ajaxSettings,t)},ajaxPrefilter:$e(Ye),ajaxTransport:$e(He),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var n,i,s,o,a,u,c,h,l,d,f=M.ajaxSetup({},e),p=f.context||f,m=f.context&&(p.nodeType||p.jquery)?M(p):M.event,g=M.Deferred(),y=M.Callbacks("once memory"),b=f.statusCode||{},w={},x={},S="canceled",_={readyState:0,getResponseHeader:function(t){var e;if(c){if(!o)for(o={};e=ze.exec(s);)o[e[1].toLowerCase()+" "]=(o[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=o[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return c?s:null},setRequestHeader:function(t,e){return null==c&&(t=x[t.toLowerCase()]=x[t.toLowerCase()]||t,w[t]=e),this},overrideMimeType:function(t){return null==c&&(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(c)_.always(t[_.status]);else for(e in t)b[e]=[b[e],t[e]];return this},abort:function(t){var e=t||S;return n&&n.abort(e),P(0,e),this}};if(g.promise(_),f.url=((t||f.url||Ee.href)+"").replace(Ge,Ee.protocol+"//"),f.type=e.method||e.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(U)||[""],null==f.crossDomain){u=v.createElement("a");try{u.href=f.url,u.href=u.href,f.crossDomain=We.protocol+"//"+We.host!=u.protocol+"//"+u.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=M.param(f.data,f.traditional)),Ke(Ye,f,e,_),c)return _;for(l in(h=M.event&&f.global)&&0==M.active++&&M.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Xe.test(f.type),i=f.url.replace(Ve,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Re,"+")):(d=f.url.slice(i.length),f.data&&(f.processData||"string"==typeof f.data)&&(i+=(Ae.test(i)?"&":"?")+f.data,delete f.data),!1===f.cache&&(i=i.replace(qe,"$1"),d=(Ae.test(i)?"&":"?")+"_="+Te.guid+++d),f.url=i+d),f.ifModified&&(M.lastModified[i]&&_.setRequestHeader("If-Modified-Since",M.lastModified[i]),M.etag[i]&&_.setRequestHeader("If-None-Match",M.etag[i])),(f.data&&f.hasContent&&!1!==f.contentType||e.contentType)&&_.setRequestHeader("Content-Type",f.contentType),_.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Ue+"; q=0.01":""):f.accepts["*"]),f.headers)_.setRequestHeader(l,f.headers[l]);if(f.beforeSend&&(!1===f.beforeSend.call(p,_,f)||c))return _.abort();if(S="abort",y.add(f.complete),_.done(f.success),_.fail(f.error),n=Ke(He,f,e,_)){if(_.readyState=1,h&&m.trigger("ajaxSend",[_,f]),c)return _;f.async&&f.timeout>0&&(a=r.setTimeout((function(){_.abort("timeout")}),f.timeout));try{c=!1,n.send(w,P)}catch(t){if(c)throw t;P(-1,t)}}else P(-1,"No Transport");function P(t,e,o,u){var l,d,v,w,x,S=e;c||(c=!0,a&&r.clearTimeout(a),n=void 0,s=u||"",_.readyState=t>0?4:0,l=t>=200&&t<300||304===t,o&&(w=function(t,e,n){for(var r,i,s,o,a=t.contents,u=t.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){u.unshift(i);break}if(u[0]in n)s=u[0];else{for(i in n){if(!u[0]||t.converters[i+" "+u[0]]){s=i;break}o||(o=i)}s=s||o}if(s)return s!==u[0]&&u.unshift(s),n[s]}(f,_,o)),!l&&M.inArray("script",f.dataTypes)>-1&&M.inArray("json",f.dataTypes)<0&&(f.converters["text script"]=function(){}),w=function(t,e,n,r){var i,s,o,a,u,c={},h=t.dataTypes.slice();if(h[1])for(o in t.converters)c[o.toLowerCase()]=t.converters[o];for(s=h.shift();s;)if(t.responseFields[s]&&(n[t.responseFields[s]]=e),!u&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),u=s,s=h.shift())if("*"===s)s=u;else if("*"!==u&&u!==s){if(!(o=c[u+" "+s]||c["* "+s]))for(i in c)if((a=i.split(" "))[1]===s&&(o=c[u+" "+a[0]]||c["* "+a[0]])){!0===o?o=c[i]:!0!==c[i]&&(s=a[0],h.unshift(a[1]));break}if(!0!==o)if(o&&t.throws)e=o(e);else try{e=o(e)}catch(t){return{state:"parsererror",error:o?t:"No conversion from "+u+" to "+s}}}return{state:"success",data:e}}(f,w,_,l),l?(f.ifModified&&((x=_.getResponseHeader("Last-Modified"))&&(M.lastModified[i]=x),(x=_.getResponseHeader("etag"))&&(M.etag[i]=x)),204===t||"HEAD"===f.type?S="nocontent":304===t?S="notmodified":(S=w.state,d=w.data,l=!(v=w.error))):(v=S,!t&&S||(S="error",t<0&&(t=0))),_.status=t,_.statusText=(e||S)+"",l?g.resolveWith(p,[d,S,_]):g.rejectWith(p,[_,S,v]),_.statusCode(b),b=void 0,h&&m.trigger(l?"ajaxSuccess":"ajaxError",[_,f,l?d:v]),y.fireWith(p,[_,S]),h&&(m.trigger("ajaxComplete",[_,f]),--M.active||M.event.trigger("ajaxStop")))}return _},getJSON:function(t,e,n){return M.get(t,e,n,"json")},getScript:function(t,e){return M.get(t,void 0,e,"script")}}),M.each(["get","post"],(function(t,e){M[e]=function(t,n,r,i){return y(n)&&(i=i||r,r=n,n=void 0),M.ajax(M.extend({url:t,type:e,dataType:i,data:n,success:r},M.isPlainObject(t)&&t))}})),M.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),M._evalUrl=function(t,e,n){return M.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){M.globalEval(t,e,n)}})},M.fn.extend({wrapAll:function(t){var e;return this[0]&&(y(t)&&(t=t.call(this[0])),e=M(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t})).append(this)),this},wrapInner:function(t){return y(t)?this.each((function(e){M(this).wrapInner(t.call(this,e))})):this.each((function(){var e=M(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=y(t);return this.each((function(n){M(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){M(this).replaceWith(this.childNodes)})),this}}),M.expr.pseudos.hidden=function(t){return!M.expr.pseudos.visible(t)},M.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},M.ajaxSettings.xhr=function(){try{return new r.XMLHttpRequest}catch(t){}};var Je={0:200,1223:204},Ze=M.ajaxSettings.xhr();g.cors=!!Ze&&"withCredentials"in Ze,g.ajax=Ze=!!Ze,M.ajaxTransport((function(t){var e,n;if(g.cors||Ze&&!t.crossDomain)return{send:function(i,s){var o,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)a[o]=t.xhrFields[o];for(o in t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)a.setRequestHeader(o,i[o]);e=function(t){return function(){e&&(e=n=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?s(0,"error"):s(a.status,a.statusText):s(Je[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=e(),n=a.onerror=a.ontimeout=e("error"),void 0!==a.onabort?a.onabort=n:a.onreadystatechange=function(){4===a.readyState&&r.setTimeout((function(){e&&n()}))},e=e("abort");try{a.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}})),M.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),M.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return M.globalEval(t),t}}}),M.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),M.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(r,i){e=M("<script>").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&i("error"===t.type?404:200,t.type)}),v.head.appendChild(e[0])},abort:function(){n&&n()}}}));var tn,en=[],nn=/(=)\?(?=&|$)|\?\?/;M.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=en.pop()||M.expando+"_"+Te.guid++;return this[t]=!0,t}}),M.ajaxPrefilter("json jsonp",(function(t,e,n){var i,s,o,a=!1!==t.jsonp&&(nn.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&nn.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=y(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(nn,"$1"+i):!1!==t.jsonp&&(t.url+=(Ae.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return o||M.error(i+" was not called"),o[0]},t.dataTypes[0]="json",s=r[i],r[i]=function(){o=arguments},n.always((function(){void 0===s?M(r).removeProp(i):r[i]=s,t[i]&&(t.jsonpCallback=e.jsonpCallback,en.push(i)),o&&y(s)&&s(o[0]),o=s=void 0})),"script"})),g.createHTMLDocument=((tn=v.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===tn.childNodes.length),M.parseHTML=function(t,e,n){return"string"!=typeof t?[]:("boolean"==typeof e&&(n=e,e=!1),e||(g.createHTMLDocument?((r=(e=v.implementation.createHTMLDocument("")).createElement("base")).href=v.location.href,e.head.appendChild(r)):e=v),s=!n&&[],(i=V.exec(t))?[e.createElement(i[1])]:(i=jt([t],e,s),s&&s.length&&M(s).remove(),M.merge([],i.childNodes)));var r,i,s},M.fn.load=function(t,e,n){var r,i,s,o=this,a=t.indexOf(" ");return a>-1&&(r=Me(t.slice(a)),t=t.slice(0,a)),y(e)?(n=e,e=void 0):e&&"object"==typeof e&&(i="POST"),o.length>0&&M.ajax({url:t,type:i||"GET",dataType:"html",data:e}).done((function(t){s=arguments,o.html(r?M("<div>").append(M.parseHTML(t)).find(r):t)})).always(n&&function(t,e){o.each((function(){n.apply(this,s||[t.responseText,e,t])}))}),this},M.expr.pseudos.animated=function(t){return M.grep(M.timers,(function(e){return t===e.elem})).length},M.offset={setOffset:function(t,e,n){var r,i,s,o,a,u,c=M.css(t,"position"),h=M(t),l={};"static"===c&&(t.style.position="relative"),a=h.offset(),s=M.css(t,"top"),u=M.css(t,"left"),("absolute"===c||"fixed"===c)&&(s+u).indexOf("auto")>-1?(o=(r=h.position()).top,i=r.left):(o=parseFloat(s)||0,i=parseFloat(u)||0),y(e)&&(e=e.call(t,n,M.extend({},a))),null!=e.top&&(l.top=e.top-a.top+o),null!=e.left&&(l.left=e.left-a.left+i),"using"in e?e.using.call(t,l):h.css(l)}},M.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){M.offset.setOffset(this,t,e)}));var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,n,r=this[0],i={top:0,left:0};if("fixed"===M.css(r,"position"))e=r.getBoundingClientRect();else{for(e=this.offset(),n=r.ownerDocument,t=r.offsetParent||n.documentElement;t&&(t===n.body||t===n.documentElement)&&"static"===M.css(t,"position");)t=t.parentNode;t&&t!==r&&1===t.nodeType&&((i=M(t).offset()).top+=M.css(t,"borderTopWidth",!0),i.left+=M.css(t,"borderLeftWidth",!0))}return{top:e.top-i.top-M.css(r,"marginTop",!0),left:e.left-i.left-M.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&"static"===M.css(t,"position");)t=t.offsetParent;return t||mt}))}}),M.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var n="pageYOffset"===e;M.fn[t]=function(r){return tt(this,(function(t,r,i){var s;if(b(t)?s=t:9===t.nodeType&&(s=t.defaultView),void 0===i)return s?s[e]:t[r];s?s.scrollTo(n?s.pageXOffset:i,n?i:s.pageYOffset):t[r]=i}),t,r,arguments.length)}})),M.each(["top","left"],(function(t,e){M.cssHooks[e]=te(g.pixelPosition,(function(t,n){if(n)return n=Zt(t,e),Wt.test(n)?M(t).position()[e]+"px":n}))})),M.each({Height:"height",Width:"width"},(function(t,e){M.each({padding:"inner"+t,content:e,"":"outer"+t},(function(n,r){M.fn[r]=function(i,s){var o=arguments.length&&(n||"boolean"!=typeof i),a=n||(!0===i||!0===s?"margin":"border");return tt(this,(function(e,n,i){var s;return b(e)?0===r.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(s=e.documentElement,Math.max(e.body["scroll"+t],s["scroll"+t],e.body["offset"+t],s["offset"+t],s["client"+t])):void 0===i?M.css(e,n,a):M.style(e,n,i,a)}),e,o?i:void 0,o)}}))})),M.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){M.fn[e]=function(t){return this.on(e,t)}})),M.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,r){return this.on(e,t,n,r)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)},hover:function(t,e){return this.on("mouseenter",t).on("mouseleave",e||t)}}),M.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(t,e){M.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}));var rn=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;M.proxy=function(t,e){var n,r,i;if("string"==typeof e&&(n=t[e],e=t,t=n),y(t))return r=a.call(arguments,2),i=function(){return t.apply(e||this,r.concat(a.call(arguments)))},i.guid=t.guid=t.guid||M.guid++,i},M.holdReady=function(t){t?M.readyWait++:M.ready(!0)},M.isArray=Array.isArray,M.parseJSON=JSON.parse,M.nodeName=O,M.isFunction=y,M.isWindow=b,M.camelCase=it,M.type=S,M.now=Date.now,M.isNumeric=function(t){var e=M.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},M.trim=function(t){return null==t?"":(t+"").replace(rn,"$1")},void 0===(n=function(){return M}.apply(e,[]))||(t.exports=n);var sn=r.jQuery,on=r.$;return M.noConflict=function(t){return r.$===M&&(r.$=on),t&&r.jQuery===M&&(r.jQuery=sn),M},void 0===i&&(r.jQuery=r.$=M),M}))},72:t=>{"use strict";var e=[];function n(t){for(var n=-1,r=0;r<e.length;r++)if(e[r].identifier===t){n=r;break}return n}function r(t,r){for(var s={},o=[],a=0;a<t.length;a++){var u=t[a],c=r.base?u[0]+r.base:u[0],h=s[c]||0,l="".concat(c," ").concat(h);s[c]=h+1;var d=n(l),f={css:u[1],media:u[2],sourceMap:u[3],supports:u[4],layer:u[5]};if(-1!==d)e[d].references++,e[d].updater(f);else{var p=i(f,r);r.byIndex=a,e.splice(a,0,{identifier:l,updater:p,references:1})}o.push(l)}return o}function i(t,e){var n=e.domAPI(e);return n.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,i){var s=r(t=t||[],i=i||{});return function(t){t=t||[];for(var o=0;o<s.length;o++){var a=n(s[o]);e[a].references--}for(var u=r(t,i),c=0;c<s.length;c++){var h=n(s[c]);0===e[h].references&&(e[h].updater(),e.splice(h,1))}s=u}}},659:t=>{"use strict";var e={};t.exports=function(t,n){var r=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},540:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},56:(t,e,n)=>{"use strict";t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},825:t=>{"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var s=n.sourceMap;s&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleTagTransform(r,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},113:t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={id:r,exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nc=void 0;var r={};return(()=>{"use strict";n.r(r),n.d(r,{BasesLayoutForm:()=>Ir});var t={};n.r(t),n.d(t,{cx:()=>me,cy:()=>ge,height:()=>be,rx:()=>le,ry:()=>de,width:()=>ye,x:()=>fe,y:()=>pe});var e={};n.r(e),n.d(e,{from:()=>Se,to:()=>_e});var i={};n.r(i),n.d(i,{MorphArray:()=>Ee,height:()=>ke,width:()=>je,x:()=>Te,y:()=>Ae});var s={};n.r(s),n.d(s,{array:()=>un,clear:()=>cn,move:()=>hn,plot:()=>ln,size:()=>dn});var o={};n.r(o),n.d(o,{amove:()=>Vn,ax:()=>Fn,ay:()=>Rn,build:()=>qn,center:()=>In,cx:()=>Ln,cy:()=>Bn,length:()=>An,move:()=>Dn,plain:()=>Tn,x:()=>jn,y:()=>kn});var a={};n.r(a),n.d(a,{dmove:()=>Un,dx:()=>Wn,dy:()=>$n,height:()=>Kn,move:()=>Qn,size:()=>Jn,width:()=>Zn,x:()=>tr,y:()=>er});var u=n(692),c=n(72),h=n.n(c),l=n(825),d=n.n(l),f=n(659),p=n.n(f),m=n(56),g=n.n(m),y=n(540),b=n.n(y),v=n(113),w=n.n(v),x=n(660),S={};S.styleTagTransform=w(),S.setAttributes=g(),S.insert=p().bind(null,"head"),S.domAPI=d(),S.insertStyleElement=b(),h()(x.Ay,S),x.Ay&&x.Ay.locals&&x.Ay.locals;var _=n(7),P={};P.styleTagTransform=w(),P.setAttributes=g(),P.insert=p().bind(null,"head"),P.domAPI=d(),P.insertStyleElement=b(),h()(_.A,P),_.A&&_.A.locals&&_.A.locals;var M=n(592),N={};N.styleTagTransform=w(),N.setAttributes=g(),N.insert=p().bind(null,"head"),N.domAPI=d(),N.insertStyleElement=b(),h()(M.Ay,N),M.Ay&&M.Ay.locals&&M.Ay.locals;class O{constructor(t){this.selectedBases=t,this.numSpan=document.createElement("span"),u(this.numSpan).addClass(M.bw),this.trailingText=document.createElement("span"),this.domNode=document.createElement("p"),u(this.domNode).addClass(M.JU).append(this.numSpan,this.trailingText)}refresh(){let t=[...this.selectedBases].length;this.numSpan.textContent=t.toString(),this.trailingText.textContent=1==t?" base is selected.":" bases are selected."}}var C=n(667),E={};E.styleTagTransform=w(),E.setAttributes=g(),E.insert=p().bind(null,"head"),E.domAPI=d(),E.insertStyleElement=b(),h()(C.Ay,E),C.Ay&&C.Ay.locals&&C.Ay.locals;var T=n(61),A={};function j(){let t=document.createElement("input");return u(t).attr({type:"text"}).addClass(T._),t}A.styleTagTransform=w(),A.setAttributes=g(),A.insert=p().bind(null,"head"),A.domAPI=d(),A.insertStyleElement=b(),h()(T.A,A),T.A&&T.A.locals&&T.A.locals;var k=n(713),D={};function L(t,e){let n=document.createElement("label"),r=document.createElement("span");return u(r).append(t).css({paddingLeft:"8px"}),u(n).addClass(k.k).append(e,r),n}D.styleTagTransform=w(),D.setAttributes=g(),D.insert=p().bind(null,"head"),D.domAPI=d(),D.insertStyleElement=b(),h()(k.A,D),k.A&&k.A.locals&&k.A.locals;var B=n(661),I=n(854),F=n(986);class R{constructor(t,e,n){this.domNode=j(),this.coordinateName=t,this.selectedBases=e,this.options=n,this.domNode.addEventListener("blur",(()=>this.handleSubmit())),this.domNode.addEventListener("keyup",(t=>{"enter"==t.key.toLowerCase()&&this.handleSubmit()})),this.refresh()}refresh(){let t=new B.Centroid([...this.selectedBases]).get()[this.coordinateName];this.domNode.value=Number.parseFloat(t.toFixed(2)).toString()}handleSubmit(){var t,e;let n=Number.parseFloat(this.domNode.value);if(!(0,I.isFiniteNumber)(n))return;let r=new B.Centroid([...this.selectedBases]);(0,F.areWithin)(n,r.get()[this.coordinateName],.001)||(!(null===(t=this.options)||void 0===t?void 0:t.beforeMovingBases)||this.options.beforeMovingBases(),r.set({x:r.get().x,y:r.get().y,[this.coordinateName]:n}),!(null===(e=this.options)||void 0===e?void 0:e.afterMovingBases)||this.options.afterMovingBases())}}class V{constructor(t,e){this.selectedBases=t,this.centroidXInput=new R("x",t,e),this.centroidYInput=new R("y",t,e);let n=L("X",this.centroidXInput.domNode),r=L("Y",this.centroidYInput.domNode);u(r).css({marginTop:"11px"});let i=document.createElement("div");u(i).append(n,r).css({display:"flex",flexDirection:"column"});let s=document.createElement("p");u(s).addClass(C.W5).append("Center"),this.domNode=document.createElement("div"),u(this.domNode).addClass(C.ML).append(i,s)}refresh(){this.centroidXInput.refresh(),this.centroidYInput.refresh()}}const q={},z=[];function X(t,e){if(Array.isArray(t))for(const n of t)X(n,e);else if("object"!=typeof t)Y(Object.getOwnPropertyNames(e)),q[t]=Object.assign(q[t]||{},e);else for(const e in t)X(e,t[e])}function G(t){return q[t]||{}}function Y(t){z.push(...t)}function H(t,e){let n;const r=t.length,i=[];for(n=0;n<r;n++)i.push(e(t[n]));return i}function U(t){return t%360*Math.PI/180}function W(t){return t.charAt(0).toUpperCase()+t.slice(1)}function $(t,e,n,r){return null!=e&&null!=n||(r=r||t.bbox(),null==e?e=r.width/r.height*n:null==n&&(n=r.height/r.width*e)),{width:e,height:n}}function K(t,e){const n=t.origin;let r=null!=t.ox?t.ox:null!=t.originX?t.originX:"center",i=null!=t.oy?t.oy:null!=t.originY?t.originY:"center";null!=n&&([r,i]=Array.isArray(n)?n:"object"==typeof n?[n.x,n.y]:[n,n]);const s="string"==typeof r,o="string"==typeof i;if(s||o){const{height:t,width:n,x:a,y:u}=e.bbox();s&&(r=r.includes("left")?a:r.includes("right")?a+n:a+n/2),o&&(i=i.includes("top")?u:i.includes("bottom")?u+t:u+t/2)}return[r,i]}const Q=new Set(["desc","metadata","title"]),J=t=>Q.has(t.nodeName),Z=(t,e,n={})=>{const r={...e};for(const t in r)r[t].valueOf()===n[t]&&delete r[t];Object.keys(r).length?t.node.setAttribute("data-svgjs",JSON.stringify(r)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},tt="http://www.w3.org/2000/svg",et="http://www.w3.org/2000/xmlns/",nt="http://www.w3.org/1999/xlink",rt={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};class it{}const st={},ot="___SYMBOL___ROOT___";function at(t,e=tt){return rt.document.createElementNS(e,t)}function ut(t,e=!1){if(t instanceof it)return t;if("object"==typeof t)return lt(t);if(null==t)return new st[ot];if("string"==typeof t&&"<"!==t.charAt(0))return lt(rt.document.querySelector(t));const n=e?rt.document.createElement("div"):at("svg");return n.innerHTML=t,t=lt(n.firstChild),n.removeChild(n.firstChild),t}function ct(t,e){return e&&(e instanceof rt.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:at(t)}function ht(t){if(!t)return null;if(t.instance instanceof it)return t.instance;if("#document-fragment"===t.nodeName)return new st.Fragment(t);let e=W(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":st[e]||(e="Dom"),new st[e](t)}let lt=ht;function dt(t,e=t.name,n=!1){return st[e]=t,n&&(st[ot]=t),Y(Object.getOwnPropertyNames(t.prototype)),t}let ft=1e3;function pt(t){return"Svgjs"+W(t)+ft++}function mt(t){for(let e=t.children.length-1;e>=0;e--)mt(t.children[e]);return t.id?(t.id=pt(t.nodeName),t):t}function gt(t,e){let n,r;for(r=(t=Array.isArray(t)?t:[t]).length-1;r>=0;r--)for(n in e)t[r].prototype[n]=e[n]}function yt(t){return function(...e){const n=e[e.length-1];return!n||n.constructor!==Object||n instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(n)}}X("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=ut(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=ut(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=ut(t)).before(this),this},insertAfter:function(t){return(t=ut(t)).after(this),this}});const bt=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,vt=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,wt=/rgb\((\d+),(\d+),(\d+)\)/,xt=/(#[a-z_][a-z0-9\-_]*)/i,St=/\)\s*,?\s*/,_t=/\s/g,Pt=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,Mt=/^rgb\(/,Nt=/^(\s+)?$/,Ot=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Ct=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,Et=/[\s,]+/,Tt=/[MLHVCSQTAZ]/i;function At(t){const e=Math.round(t),n=Math.max(0,Math.min(255,e)).toString(16);return 1===n.length?"0"+n:n}function jt(t,e){for(let n=e.length;n--;)if(null==t[e[n]])return!1;return!0}function kt(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}X("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(Et)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),X("Dom",{css:function(t,e){const n={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const e=t.split(/\s*:\s*/);n[e[0]]=e[1]})),n;if(arguments.length<2){if(Array.isArray(t)){for(const e of t){const t=e;n[e]=this.node.style.getPropertyValue(t)}return n}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const e in t)this.node.style.setProperty(e,null==t[e]||Nt.test(t[e])?"":t[e])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||Nt.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),X("Dom",{data:function(t,e,n){if(null==t)return this.data(H(function(t){let e;const n=t.length,r=[];for(e=0;e<n;e++)0===t[e].nodeName.indexOf("data-")&&r.push(t[e]);return r}(this.node.attributes),(t=>t.nodeName.slice(5))));if(t instanceof Array){const e={};for(const n of t)e[n]=this.data(n);return e}if("object"==typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===n||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),X("Dom",{remember:function(t,e){if("object"==typeof arguments[0])for(const e in t)this.remember(e,t[e]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class Dt{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof Dt||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(t="vibrant",e){const{random:n,round:r,sin:i,PI:s}=Math;if("vibrant"===t){const t=24*n()+57,e=38*n()+45,r=360*n();return new Dt(t,e,r,"lch")}if("sine"===t){const t=r(80*i(2*s*(e=null==e?n():e)/.5+.01)+150),o=r(50*i(2*s*e/.5+4.6)+200),a=r(100*i(2*s*e/.5+2.3)+150);return new Dt(t,o,a)}if("pastel"===t){const t=8*n()+86,e=17*n()+9,r=360*n();return new Dt(t,e,r,"lch")}if("dark"===t){const t=10+10*n(),e=50*n()+86,r=360*n();return new Dt(t,e,r,"lch")}if("rgb"===t){const t=255*n(),e=255*n(),r=255*n();return new Dt(t,e,r)}if("lab"===t){const t=100*n(),e=256*n()-128,r=256*n()-128;return new Dt(t,e,r,"lab")}if("grey"===t){const t=255*n();return new Dt(t,t,t)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(Pt.test(t)||Mt.test(t))}cmyk(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.min(1-r,1-i,1-s);return 1===o?new Dt(0,0,0,1,"cmyk"):new Dt((1-r-o)/(1-o),(1-i-o)/(1-o),(1-s-o)/(1-o),o,"cmyk")}hsl(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.max(r,i,s),a=Math.min(r,i,s),u=(o+a)/2,c=o===a,h=o-a;return new Dt(360*(c?0:o===r?((i-s)/h+(i<s?6:0))/6:o===i?((s-r)/h+2)/6:o===s?((r-i)/h+4)/6:0),100*(c?0:u>.5?h/(2-o-a):h/(o+a)),100*u,"hsl")}init(t=0,e=0,n=0,r=0,i="rgb"){if(t=t||0,this.space)for(const t in this.space)delete this[this.space[t]];if("number"==typeof t)i="string"==typeof r?r:i,r="string"==typeof r?0:r,Object.assign(this,{_a:t,_b:e,_c:n,_d:r,space:i});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const n=function(t,e){const n=jt(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:jt(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:jt(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:jt(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:jt(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:jt(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return n.space=e||n.space,n}(t,e);Object.assign(this,n)}else if("string"==typeof t)if(Mt.test(t)){const e=t.replace(_t,""),[n,r,i]=wt.exec(e).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}else{if(!Pt.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,n,r,i]=vt.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map(e);Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}}const{_a:s,_b:o,_c:a,_d:u}=this,c="rgb"===this.space?{r:s,g:o,b:a}:"xyz"===this.space?{x:s,y:o,z:a}:"hsl"===this.space?{h:s,s:o,l:a}:"lab"===this.space?{l:s,a:o,b:a}:"lch"===this.space?{l:s,c:o,h:a}:"cmyk"===this.space?{c:s,m:o,y:a,k:u}:{};Object.assign(this,c)}lab(){const{x:t,y:e,z:n}=this.xyz();return new Dt(116*e-16,500*(t-e),200*(e-n),"lab")}lch(){const{l:t,a:e,b:n}=this.lab(),r=Math.sqrt(e**2+n**2);let i=180*Math.atan2(n,e)/Math.PI;return i<0&&(i*=-1,i=360-i),new Dt(t,r,i,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(t=this.space)||"xyz"===t||"lch"===t){let{x:t,y:e,z:n}=this;if("lab"===this.space||"lch"===this.space){let{l:r,a:i,b:s}=this;if("lch"===this.space){const{c:t,h:e}=this,n=Math.PI/180;i=t*Math.cos(n*e),s=t*Math.sin(n*e)}const o=(r+16)/116,a=i/500+o,u=o-s/200,c=16/116,h=.008856,l=7.787;t=.95047*(a**3>h?a**3:(a-c)/l),e=1*(o**3>h?o**3:(o-c)/l),n=1.08883*(u**3>h?u**3:(u-c)/l)}const r=3.2406*t+-1.5372*e+-.4986*n,i=-.9689*t+1.8758*e+.0415*n,s=.0557*t+-.204*e+1.057*n,o=Math.pow,a=.0031308,u=r>a?1.055*o(r,1/2.4)-.055:12.92*r,c=i>a?1.055*o(i,1/2.4)-.055:12.92*i,h=s>a?1.055*o(s,1/2.4)-.055:12.92*s;return new Dt(255*u,255*c,255*h)}if("hsl"===this.space){let{h:t,s:e,l:n}=this;if(t/=360,e/=100,n/=100,0===e)return n*=255,new Dt(n,n,n);const r=n<.5?n*(1+e):n+e-n*e,i=2*n-r,s=255*kt(i,r,t+1/3),o=255*kt(i,r,t),a=255*kt(i,r,t-1/3);return new Dt(s,o,a)}if("cmyk"===this.space){const{c:t,m:e,y:n,k:r}=this,i=255*(1-Math.min(1,t*(1-r)+r)),s=255*(1-Math.min(1,e*(1-r)+r)),o=255*(1-Math.min(1,n*(1-r)+r));return new Dt(i,s,o)}return this;var t}toArray(){const{_a:t,_b:e,_c:n,_d:r,space:i}=this;return[t,e,n,r,i]}toHex(){const[t,e,n]=this._clamped().map(At);return`#${t}${e}${n}`}toRgb(){const[t,e,n]=this._clamped();return`rgb(${t},${e},${n})`}toString(){return this.toHex()}xyz(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,a=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,u=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,c=(.4124*o+.3576*a+.1805*u)/.95047,h=(.2126*o+.7152*a+.0722*u)/1,l=(.0193*o+.1192*a+.9505*u)/1.08883,d=c>.008856?Math.pow(c,1/3):7.787*c+16/116,f=h>.008856?Math.pow(h,1/3):7.787*h+16/116,p=l>.008856?Math.pow(l,1/3):7.787*l+16/116;return new Dt(d,f,p,"xyz")}_clamped(){const{_a:t,_b:e,_c:n}=this.rgb(),{max:r,min:i,round:s}=Math;return[t,e,n].map((t=>r(0,i(s(t),255))))}}class Lt{constructor(...t){this.init(...t)}clone(){return new Lt(this)}init(t,e){const n=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==n.x?0:n.x,this.y=null==n.y?0:n.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){It.isMatrixLike(t)||(t=new It(t));const{x:e,y:n}=this;return this.x=t.a*e+t.c*n+t.e,this.y=t.b*e+t.d*n+t.f,this}}function Bt(t,e,n){return Math.abs(e-t)<(n||1e-6)}class It{constructor(...t){this.init(...t)}static formatTransforms(t){const e="both"===t.flip||!0===t.flip,n=t.flip&&(e||"x"===t.flip)?-1:1,r=t.flip&&(e||"y"===t.flip)?-1:1,i=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,s=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,o=t.scale&&t.scale.length?t.scale[0]*n:isFinite(t.scale)?t.scale*n:isFinite(t.scaleX)?t.scaleX*n:n,a=t.scale&&t.scale.length?t.scale[1]*r:isFinite(t.scale)?t.scale*r:isFinite(t.scaleY)?t.scaleY*r:r,u=t.shear||0,c=t.rotate||t.theta||0,h=new Lt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),l=h.x,d=h.y,f=new Lt(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=f.x,m=f.y,g=new Lt(t.translate||t.tx||t.translateX,t.ty||t.translateY),y=g.x,b=g.y,v=new Lt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:o,scaleY:a,skewX:i,skewY:s,shear:u,theta:c,rx:v.x,ry:v.y,tx:y,ty:b,ox:l,oy:d,px:p,py:m}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,e,n){const r=t.a*e.a+t.c*e.b,i=t.b*e.a+t.d*e.b,s=t.a*e.c+t.c*e.d,o=t.b*e.c+t.d*e.d,a=t.e+t.a*e.e+t.c*e.f,u=t.f+t.b*e.e+t.d*e.f;return n.a=r,n.b=i,n.c=s,n.d=o,n.e=a,n.f=u,n}around(t,e,n){return this.clone().aroundO(t,e,n)}aroundO(t,e,n){const r=t||0,i=e||0;return this.translateO(-r,-i).lmultiplyO(n).translateO(r,i)}clone(){return new It(this)}decompose(t=0,e=0){const n=this.a,r=this.b,i=this.c,s=this.d,o=this.e,a=this.f,u=n*s-r*i,c=u>0?1:-1,h=c*Math.sqrt(n*n+r*r),l=Math.atan2(c*r,c*n),d=180/Math.PI*l,f=Math.cos(l),p=Math.sin(l),m=(n*i+r*s)/u,g=i*h/(m*n-r)||s*h/(m*r+n);return{scaleX:h,scaleY:g,shear:m,rotate:d,translateX:o-t+t*f*h+e*(m*f*h-p*g),translateY:a-e+t*p*h+e*(m*p*h+f*g),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;const e=new It(t);return Bt(this.a,e.a)&&Bt(this.b,e.b)&&Bt(this.c,e.c)&&Bt(this.d,e.d)&&Bt(this.e,e.e)&&Bt(this.f,e.f)}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}init(t){const e=It.fromArray([1,0,0,1,0,0]);return t=t instanceof oe?t.matrixify():"string"==typeof t?It.fromArray(t.split(Et).map(parseFloat)):Array.isArray(t)?It.fromArray(t):"object"==typeof t&&It.isMatrixLike(t)?t:"object"==typeof t?(new It).transform(t):6===arguments.length?It.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,e=this.b,n=this.c,r=this.d,i=this.e,s=this.f,o=t*r-e*n;if(!o)throw new Error("Cannot invert "+this);const a=r/o,u=-e/o,c=-n/o,h=t/o,l=-(a*i+c*s),d=-(u*i+h*s);return this.a=a,this.b=u,this.c=c,this.d=h,this.e=l,this.f=d,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const e=t instanceof It?t:new It(t);return It.matrixMultiply(e,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const e=t instanceof It?t:new It(t);return It.matrixMultiply(this,e,this)}rotate(t,e,n){return this.clone().rotateO(t,e,n)}rotateO(t,e=0,n=0){t=U(t);const r=Math.cos(t),i=Math.sin(t),{a:s,b:o,c:a,d:u,e:c,f:h}=this;return this.a=s*r-o*i,this.b=o*r+s*i,this.c=a*r-u*i,this.d=u*r+a*i,this.e=c*r-h*i+n*i-e*r+e,this.f=h*r+c*i-e*i-n*r+n,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t);const{a:i,b:s,c:o,d:a,e:u,f:c}=this;return this.a=i*t,this.b=s*e,this.c=o*t,this.d=a*e,this.e=u*t-n*t+n,this.f=c*e-r*e+r,this}shear(t,e,n){return this.clone().shearO(t,e,n)}shearO(t,e=0,n=0){const{a:r,b:i,c:s,d:o,e:a,f:u}=this;return this.a=r+i*t,this.c=s+o*t,this.e=a+u*t-n*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t),t=U(t),e=U(e);const i=Math.tan(t),s=Math.tan(e),{a:o,b:a,c:u,d:c,e:h,f:l}=this;return this.a=o+a*i,this.b=a+o*s,this.c=u+c*i,this.d=c+u*s,this.e=h+l*i-r*i,this.f=l+h*s-n*s,this}skewX(t,e,n){return this.skew(t,0,e,n)}skewY(t,e,n){return this.skew(0,t,e,n)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(It.isMatrixLike(t))return new It(t).multiplyO(this);const e=It.formatTransforms(t),{x:n,y:r}=new Lt(e.ox,e.oy).transform(this),i=(new It).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-n,-r).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(n,r);if(isFinite(e.px)||isFinite(e.py)){const t=new Lt(n,r).transform(i),s=isFinite(e.px)?e.px-t.x:0,o=isFinite(e.py)?e.py-t.y:0;i.translateO(s,o)}return i.translateO(e.tx,e.ty),i}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function Ft(){if(!Ft.nodes){const t=ut().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;Ft.nodes={svg:t,path:e}}if(!Ft.nodes.svg.node.parentNode){const t=rt.document.body||rt.document.documentElement;Ft.nodes.svg.addTo(t)}return Ft.nodes}function Rt(t){return!(t.width||t.height||t.x||t.y)}dt(It,"Matrix");class Vt{constructor(...t){this.init(...t)}addOffset(){return this.x+=rt.window.pageXOffset,this.y+=rt.window.pageYOffset,new Vt(this)}init(t){return t="string"==typeof t?t.split(Et).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return Rt(this)}merge(t){const e=Math.min(this.x,t.x),n=Math.min(this.y,t.y),r=Math.max(this.x+this.width,t.x+t.width)-e,i=Math.max(this.y+this.height,t.y+t.height)-n;return new Vt(e,n,r,i)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof It||(t=new It(t));let e=1/0,n=-1/0,r=1/0,i=-1/0;return[new Lt(this.x,this.y),new Lt(this.x2,this.y),new Lt(this.x,this.y2),new Lt(this.x2,this.y2)].forEach((function(s){s=s.transform(t),e=Math.min(e,s.x),n=Math.max(n,s.x),r=Math.min(r,s.y),i=Math.max(i,s.y)})),new Vt(e,r,n-e,i-r)}}function qt(t,e,n){let r;try{if(r=e(t.node),Rt(r)&&(i=t.node)!==rt.document&&!(rt.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===rt.document}).call(rt.document.documentElement,i))throw new Error("Element not in the dom")}catch(e){r=n(t)}var i;return r}X({viewbox:{viewbox(t,e,n,r){return null==t?new Vt(this.attr("viewBox")):this.attr("viewBox",new Vt(t,e,n,r))},zoom(t,e){let{width:n,height:r}=this.attr(["width","height"]);if((n||r)&&"string"!=typeof n&&"string"!=typeof r||(n=this.node.clientWidth,r=this.node.clientHeight),!n||!r)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const i=this.viewbox(),s=n/i.width,o=r/i.height,a=Math.min(s,o);if(null==t)return a;let u=a/t;u===1/0&&(u=Number.MAX_SAFE_INTEGER/100),e=e||new Lt(n/2/s+i.x,r/2/o+i.y);const c=new Vt(i).transform(new It({scale:u,origin:e}));return this.viewbox(c)}}}),dt(Vt,"Box");class zt extends Array{constructor(t=[],...e){if(super(t,...e),"number"==typeof t)return this;this.length=0,this.push(...t)}}const Xt=zt;gt([zt],{each(t,...e){return"function"==typeof t?this.map(((e,n,r)=>t.call(e,e,n,r))):this.map((n=>n[t](...e)))},toArray(){return Array.prototype.concat.apply([],this)}});const Gt=["toArray","constructor","each"];function Yt(t,e){return new Xt(H((e||rt.document).querySelectorAll(t),(function(t){return ht(t)})))}zt.extend=function(t){t=t.reduce(((t,e)=>(Gt.includes(e)||"_"===e[0]||(e in Array.prototype&&(t["$"+e]=Array.prototype[e]),t[e]=function(...t){return this.each(e,...t)}),t)),{}),gt([zt],t)};let Ht=0;const Ut={};function Wt(t){let e=t.getEventHolder();return e===rt.window&&(e=Ut),e.events||(e.events={}),e.events}function $t(t){return t.getEventTarget()}function Kt(t,e,n,r,i){const s=n.bind(r||t),o=ut(t),a=Wt(o),u=$t(o);e=Array.isArray(e)?e:e.split(Et),n._svgjsListenerId||(n._svgjsListenerId=++Ht),e.forEach((function(t){const e=t.split(".")[0],r=t.split(".")[1]||"*";a[e]=a[e]||{},a[e][r]=a[e][r]||{},a[e][r][n._svgjsListenerId]=s,u.addEventListener(e,s,i||!1)}))}function Qt(t,e,n,r){const i=ut(t),s=Wt(i),o=$t(i);("function"!=typeof n||(n=n._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(Et)).forEach((function(t){const e=t&&t.split(".")[0],a=t&&t.split(".")[1];let u,c;if(n)s[e]&&s[e][a||"*"]&&(o.removeEventListener(e,s[e][a||"*"][n],r||!1),delete s[e][a||"*"][n]);else if(e&&a){if(s[e]&&s[e][a]){for(c in s[e][a])Qt(o,[e,a].join("."),c);delete s[e][a]}}else if(a)for(t in s)for(u in s[t])a===u&&Qt(o,[t,a].join("."));else if(e){if(s[e]){for(u in s[e])Qt(o,[e,u].join("."));delete s[e]}}else{for(t in s)Qt(o,t);!function(t){let e=t.getEventHolder();e===rt.window&&(e=Ut),e.events&&(e.events={})}(i)}}))}class Jt extends it{addEventListener(){}dispatch(t,e,n){return function(t,e,n,r){const i=$t(t);return e instanceof rt.window.Event||(e=new rt.window.CustomEvent(e,{detail:n,cancelable:!0,...r})),i.dispatchEvent(e),e}(this,t,e,n)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const n=e[t.type];for(const e in n)for(const r in n[e])n[e][r](t);return!t.defaultPrevented}fire(t,e,n){return this.dispatch(t,e,n),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e,n){return Qt(this,t,e,n),this}on(t,e,n,r){return Kt(this,t,e,n,r),this}removeEventListener(){}}function Zt(){}dt(Jt,"EventTarget");const te={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class ee extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(Et).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}}class ne{constructor(...t){this.init(...t)}convert(t){return new ne(this.value,t)}divide(t){return t=new ne(t),new ne(this/t,this.unit||t.unit)}init(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(bt))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof ne&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new ne(t),new ne(this-t,this.unit||t.unit)}plus(t){return t=new ne(t),new ne(this+t,this.unit||t.unit)}times(t){return t=new ne(t),new ne(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const re=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),ie=[];class se extends Jt{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return(t=ut(t)).removeNamespace&&this.node instanceof rt.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t,e){return ut(t).put(this,e)}children(){return new Xt(H(this.node.children,(function(t){return ht(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,e=!0){this.writeDataToDom();let n=this.node.cloneNode(t);return e&&(n=mt(n)),new this.constructor(n)}each(t,e){const n=this.children();let r,i;for(r=0,i=n.length;r<i;r++)t.apply(n[r],[r,n]),e&&n[r].each(t,e);return this}element(t,e){return this.put(new se(at(t),e))}first(){return ht(this.node.firstChild)}get(t){return ht(this.node.childNodes[t])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(t){return this.index(t)>=0}html(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=pt(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return ht(this.node.lastChild)}matches(t){const e=this.node,n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return n&&n.call(e,t)}parent(t){let e=this;if(!e.node.parentNode)return null;if(e=ht(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=ht(e.node.parentNode));return e}put(t,e){return t=ut(t),this.add(t,e),t}putIn(t,e){return ut(t).add(this,e)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=ut(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e=null){const n=10**t,r=this.attr(e);for(const t in r)"number"==typeof r[t]&&(r[t]=Math.round(r[t]*n)/n);return this.attr(r),this}svg(t,e){return this.xml(t,e,tt)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const e=this.parent();if(!e)return this.addTo(t);const n=e.index(this);return e.put(t,n).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();let n=this;if(null!=t){if(n=ht(n.node.cloneNode(!0)),e){const e=t(n);if(n=e||n,!1===e)return""}n.each((function(){const e=t(this),n=e||this;!1===e?this.remove():e&&this!==n&&this.replace(n)}),!0)}return e?n.node.outerHTML:n.node.innerHTML}e=null!=e&&e;const r=at("wrapper",n),i=rt.document.createDocumentFragment();r.innerHTML=t;for(let t=r.children.length;t--;)i.appendChild(r.firstElementChild);const s=this.parent();return e?this.replace(i)&&s:this.add(i)}}gt(se,{attr:function(t,e,n){if(null==t){t={},e=this.node.attributes;for(const n of e)t[n.nodeName]=Ot.test(n.nodeValue)?parseFloat(n.nodeValue):n.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,e)=>(t[e]=this.attr(e),t)),{});if("object"==typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?te[t]:Ot.test(e)?parseFloat(e):e;"number"==typeof(e=ie.reduce(((e,n)=>n(t,e,this)),e))?e=new ne(e):re.has(t)&&Dt.isColor(e)?e=new Dt(e):e.constructor===Array&&(e=new ee(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof n?this.node.setAttributeNS(n,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return Yt(t,this.node)},findOne:function(t){return ht(this.node.querySelector(t))}}),dt(se,"Dom");class oe extends se{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new ne(t).plus(this.x()))}dy(t=0){return this.y(new ne(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e="string"==typeof t;e||(t=ut(t));const n=new Xt;let r=this;for(;(r=r.parent())&&r.node!==rt.document&&"#document-fragment"!==r.nodeName&&(n.push(r),e||r.node!==t.node)&&(!e||!r.matches(t));)if(r.node===this.root().node)return null;return n}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(xt);return e?ut(e[1]):null}root(){const t=this.parent(st[ot]);return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const n=$(this,t,e);return this.width(new ne(n.width)).height(new ne(n.height))}width(t){return this.attr("width",t)}writeDataToDom(){return Z(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}gt(oe,{bbox:function(){const t=qt(this,(t=>t.getBBox()),(t=>{try{const e=t.clone().addTo(Ft().svg).show(),n=e.node.getBBox();return e.remove(),n}catch(e){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${e.toString()}`)}}));return new Vt(t)},rbox:function(t){const e=qt(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),n=new Vt(e);return t?n.transform(t.screenCTM().inverseO()):n.addOffset()},inside:function(t,e){const n=this.bbox();return t>n.x&&e>n.y&&t<n.x+n.width&&e<n.y+n.height},point:function(t,e){return new Lt(t,e).transformO(this.screenCTM().inverseO())},ctm:function(){return new It(this.node.getCTM())},screenCTM:function(){try{if("function"==typeof this.isRoot&&!this.isRoot()){const t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new It(e)}return new It(this.node.getScreenCTM())}catch(t){return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new It}}}),dt(oe,"Element");const ae={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return"color"===e?t:t+"-"+e}};["fill","stroke"].forEach((function(t){const e={};let n;e[t]=function(e){if(void 0===e)return this.attr(t);if("string"==typeof e||e instanceof Dt||Dt.isRgb(e)||e instanceof oe)this.attr(t,e);else for(n=ae[t].length-1;n>=0;n--)null!=e[ae[t][n]]&&this.attr(ae.prefix(t,ae[t][n]),e[ae[t][n]]);return this},X(["Element","Runner"],e)})),X(["Element","Runner"],{matrix:function(t,e,n,r,i,s){return null==t?new It(this):this.attr("transform",new It(t,e,n,r,i,s))},rotate:function(t,e,n){return this.transform({rotate:t,ox:e,oy:n},!0)},skew:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:n},!0):this.transform({skew:[t,e],ox:n,oy:r},!0)},shear:function(t,e,n){return this.transform({shear:t,ox:e,oy:n},!0)},scale:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:n},!0):this.transform({scale:[t,e],ox:n,oy:r},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),X("radius",{radius:function(t,e=t){return"radialGradient"===(this._element||this).type?this.attr("r",new ne(t)):this.rx(t).ry(e)}}),X("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new Lt(this.node.getPointAtLength(t))}}),X(["Element","Runner"],{font:function(t,e){if("object"==typeof t){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}}),X("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),X("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(St).slice(0,-1).map((function(t){const e=t.trim().split("(");return[e[0],e[1].split(Et).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(It.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new It)},toParent:function(t,e){if(this===t)return this;if(J(this.node))return this.addTo(t,e);const n=this.screenCTM(),r=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(r.multiply(n)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){const e=new It(this).decompose();return null==t?e:e[t]}It.isMatrixLike(t)||(t={...t,origin:K(t,this)});const n=new It(!0===e?this:e||!1).transform(t);return this.attr("transform",n)}});class ue extends oe{flatten(){return this.each((function(){if(this instanceof ue)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),e=t.index(this)){return e=-1===e?t.children().length:e,this.each((function(n,r){return r[r.length-n-1].toParent(t,e)})),this.remove()}}dt(ue,"Container");class ce extends ue{constructor(t,e=t){super(ct("defs",t),e)}flatten(){return this}ungroup(){return this}}dt(ce,"Defs");class he extends oe{}function le(t){return this.attr("rx",t)}function de(t){return this.attr("ry",t)}function fe(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function pe(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function me(t){return this.attr("cx",t)}function ge(t){return this.attr("cy",t)}function ye(t){return null==t?2*this.rx():this.rx(new ne(t).divide(2))}function be(t){return null==t?2*this.ry():this.ry(new ne(t).divide(2))}dt(he,"Shape");class ve extends he{constructor(t,e=t){super(ct("ellipse",t),e)}size(t,e){const n=$(this,t,e);return this.rx(new ne(n.width).divide(2)).ry(new ne(n.height).divide(2))}}gt(ve,t),X("Container",{ellipse:yt((function(t=0,e=t){return this.put(new ve).size(t,e).move(0,0)}))}),dt(ve,"Ellipse");class we extends se{constructor(t=rt.document.createDocumentFragment()){super(t)}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){const t=new se(at("wrapper",n));return t.add(this.node.cloneNode(!0)),t.xml(!1,n)}return super.xml(t,!1,n)}}dt(we,"Fragment");const xe=we;function Se(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new ne(t),fy:new ne(e)}):this.attr({x1:new ne(t),y1:new ne(e)})}function _e(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new ne(t),cy:new ne(e)}):this.attr({x2:new ne(t),y2:new ne(e)})}class Pe extends ue{constructor(t,e){super(ct(t+"Gradient","string"==typeof t?null:t),e)}attr(t,e,n){return"transform"===t&&(t="gradientTransform"),super.attr(t,e,n)}bbox(){return new Vt}targets(){return Yt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}gt(Pe,e),X({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:yt((function(t,e){return this.put(new Pe(t)).update(e)}))}}),dt(Pe,"Gradient");class Me extends ue{constructor(t,e=t){super(ct("pattern",t),e)}attr(t,e,n){return"transform"===t&&(t="patternTransform"),super.attr(t,e,n)}bbox(){return new Vt}targets(){return Yt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}X({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:yt((function(t,e,n){return this.put(new Me).update(n).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),dt(Me,"Pattern");class Ne extends he{constructor(t,e=t){super(ct("image",t),e)}load(t,e){if(!t)return this;const n=new rt.window.Image;return Kt(n,"load",(function(t){const r=this.parent(Me);0===this.width()&&0===this.height()&&this.size(n.width,n.height),r instanceof Me&&0===r.width()&&0===r.height()&&r.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),Kt(n,"load error",(function(){Qt(n)})),this.attr("href",n.src=t,nt)}}var Oe;Oe=function(t,e,n){return"fill"!==t&&"stroke"!==t||Ct.test(e)&&(e=n.root().defs().image(e)),e instanceof Ne&&(e=n.root().defs().pattern(0,0,(t=>{t.add(e)}))),e},ie.push(Oe),X({Container:{image:yt((function(t,e){return this.put(new Ne).size(0,0).load(t,e)}))}}),dt(Ne,"Image");class Ce extends ee{bbox(){let t=-1/0,e=-1/0,n=1/0,r=1/0;return this.forEach((function(i){t=Math.max(i[0],t),e=Math.max(i[1],e),n=Math.min(i[0],n),r=Math.min(i[1],r)})),new Vt(n,r,t-n,e-r)}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let n=this.length-1;n>=0;n--)this[n]=[this[n][0]+t,this[n][1]+e];return this}parse(t=[0,0]){const e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(Et).map(parseFloat)).length%2!=0&&t.pop();for(let n=0,r=t.length;n<r;n+=2)e.push([t[n],t[n+1]]);return e}size(t,e){let n;const r=this.bbox();for(n=this.length-1;n>=0;n--)r.width&&(this[n][0]=(this[n][0]-r.x)*t/r.width+r.x),r.height&&(this[n][1]=(this[n][1]-r.y)*e/r.height+r.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let e=0,n=this.length;e<n;e++)t.push(this[e].join(","));return t.join(" ")}transform(t){return this.clone().transformO(t)}transformO(t){It.isMatrixLike(t)||(t=new It(t));for(let e=this.length;e--;){const[n,r]=this[e];this[e][0]=t.a*n+t.c*r+t.e,this[e][1]=t.b*n+t.d*r+t.f}return this}}const Ee=Ce;function Te(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}function Ae(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}function je(t){const e=this.bbox();return null==t?e.width:this.size(t,e.height)}function ke(t){const e=this.bbox();return null==t?e.height:this.size(e.width,t)}class De extends he{constructor(t,e=t){super(ct("line",t),e)}array(){return new Ce([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(t,e){return this.attr(this.array().move(t,e).toLine())}plot(t,e,n,r){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:n,y2:r}:new Ce(t).toLine(),this.attr(t))}size(t,e){const n=$(this,t,e);return this.attr(this.array().size(n.width,n.height).toLine())}}gt(De,i),X({Container:{line:yt((function(...t){return De.prototype.plot.apply(this.put(new De),null!=t[0]?t:[0,0,0,0])}))}}),dt(De,"Line");class Le extends ue{constructor(t,e=t){super(ct("marker",t),e)}height(t){return this.attr("markerHeight",t)}orient(t){return this.attr("orient",t)}ref(t,e){return this.attr("refX",t).attr("refY",e)}toString(){return"url(#"+this.id()+")"}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}width(t){return this.attr("markerWidth",t)}}function Be(t,e){return function(n){return null==n?this[t]:(this[t]=n,e&&e.call(this),this)}}X({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:yt((function(t,e,n){return this.put(new Le).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(n)}))},marker:{marker(t,e,n,r){let i=["marker"];return"all"!==t&&i.push(t),i=i.join("-"),t=arguments[1]instanceof Le?arguments[1]:this.defs().marker(e,n,r),this.attr(i,t)}}}),dt(Le,"Marker");const Ie={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,n,r){return function(i){return i<0?t>0?e/t*i:n>0?r/n*i:0:i>1?n<1?(1-r)/(1-n)*i+(r-n)/(1-n):t<1?(1-e)/(1-t)*i+(e-t)/(1-t):1:3*i*(1-i)**2*e+3*i**2*(1-i)*r+i**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let n=t;return"none"===e?--n:"both"===e&&++n,(r,i=!1)=>{let s=Math.floor(r*t);const o=r*s%1==0;return"start"!==e&&"both"!==e||++s,i&&o&&--s,r>=0&&s<0&&(s=0),r<=1&&s>n&&(s=n),s/n}}};class Fe{done(){return!1}}class Re extends Fe{constructor(t=">"){super(),this.ease=Ie[t]||t}step(t,e,n){return"number"!=typeof t?n<1?t:e:t+(e-t)*this.ease(n)}}class Ve extends Fe{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,n,r){return this.stepper(t,e,n,r)}}function qe(){const t=(this._duration||500)/1e3,e=this._overshoot||0,n=Math.PI,r=Math.log(e/100+1e-10),i=-r/Math.sqrt(n*n+r*r),s=3.9/(i*t);this.d=2*i*s,this.k=s*s}gt(class extends Ve{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;n>100&&(n=16),n/=1e3;const i=r.velocity||0,s=-this.d*i-this.k*(t-e),o=t+i*n+s*n*n/2;return r.velocity=i+s*n,r.done=Math.abs(e-o)+Math.abs(i)<.002,r.done?e:o}},{duration:Be("_duration",qe),overshoot:Be("_overshoot",qe)}),gt(class extends Ve{constructor(t=.1,e=.01,n=0,r=1e3){super(),this.p(t).i(e).d(n).windup(r)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;const i=e-t;let s=(r.integral||0)+i*n;const o=(i-(r.error||0))/n,a=this._windup;return!1!==a&&(s=Math.max(-a,Math.min(s,a))),r.error=i,r.integral=s,r.done=Math.abs(i)<.001,r.done?e:t+(this.P*i+this.I*s+this.D*o)}},{windup:Be("_windup"),p:Be("P"),i:Be("I"),d:Be("D")});const ze={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},Xe={M:function(t,e,n){return e.x=n.x=t[0],e.y=n.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,n){return e.x=n.x,e.y=n.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},Ge="mlhvqtcsaz".split("");for(let t=0,e=Ge.length;t<e;++t)Xe[Ge[t]]=function(t){return function(e,n,r){if("H"===t)e[0]=e[0]+n.x;else if("V"===t)e[0]=e[0]+n.y;else if("A"===t)e[5]=e[5]+n.x,e[6]=e[6]+n.y;else for(let t=0,r=e.length;t<r;++t)e[t]=e[t]+(t%2?n.y:n.x);return Xe[t](e,n,r)}}(Ge[t].toUpperCase());function Ye(t){return t.segment.length&&t.segment.length-1===ze[t.segment[0].toUpperCase()]}function He(t,e){t.inNumber&&Ue(t,!1);const n=Tt.test(e);if(n)t.segment=[e];else{const e=t.lastCommand,n=e.toLowerCase(),r=e===n;t.segment=["m"===n?r?"l":"L":e]}return t.inSegment=!0,t.lastCommand=t.segment[0],n}function Ue(t,e){if(!t.inNumber)throw new Error("Parser Error");t.number&&t.segment.push(parseFloat(t.number)),t.inNumber=e,t.number="",t.pointSeen=!1,t.hasExponent=!1,Ye(t)&&We(t)}function We(t){t.inSegment=!1,t.absolute&&(t.segment=function(t){const e=t.segment[0];return Xe[e](t.segment.slice(1),t.p,t.p0)}(t)),t.segments.push(t.segment)}function $e(t){if(!t.segment.length)return!1;const e="A"===t.segment[0].toUpperCase(),n=t.segment.length;return e&&(4===n||5===n)}function Ke(t){return"E"===t.lastToken.toUpperCase()}const Qe=new Set([" ",",","\t","\n","\r","\f"]);class Je extends ee{bbox(){return Ft().path.setAttribute("d",this.toString()),new Vt(Ft.nodes.path.getBBox())}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let n,r=this.length-1;r>=0;r--)n=this[r][0],"M"===n||"L"===n||"T"===n?(this[r][1]+=t,this[r][2]+=e):"H"===n?this[r][1]+=t:"V"===n?this[r][1]+=e:"C"===n||"S"===n||"Q"===n?(this[r][1]+=t,this[r][2]+=e,this[r][3]+=t,this[r][4]+=e,"C"===n&&(this[r][5]+=t,this[r][6]+=e)):"A"===n&&(this[r][6]+=t,this[r][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,e=!0){let n=0,r="";const i={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new Lt,p:new Lt};for(;i.lastToken=r,r=t.charAt(n++);)if(i.inSegment||!He(i,r))if("."!==r)if(isNaN(parseInt(r)))if(Qe.has(r))i.inNumber&&Ue(i,!1);else if("-"!==r&&"+"!==r)if("E"!==r.toUpperCase()){if(Tt.test(r)){if(i.inNumber)Ue(i,!1);else{if(!Ye(i))throw new Error("parser Error");We(i)}--n}}else i.number+=r,i.hasExponent=!0;else{if(i.inNumber&&!Ke(i)){Ue(i,!1),--n;continue}i.number+=r,i.inNumber=!0}else{if("0"===i.number||$e(i)){i.inNumber=!0,i.number=r,Ue(i,!0);continue}i.inNumber=!0,i.number+=r}else{if(i.pointSeen||i.hasExponent){Ue(i,!1),--n;continue}i.inNumber=!0,i.pointSeen=!0,i.number+=r}return i.inNumber&&Ue(i,!1),i.inSegment&&Ye(i)&&We(i),i.segments}(t)}size(t,e){const n=this.bbox();let r,i;for(n.width=0===n.width?1:n.width,n.height=0===n.height?1:n.height,r=this.length-1;r>=0;r--)i=this[r][0],"M"===i||"L"===i||"T"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y):"H"===i?this[r][1]=(this[r][1]-n.x)*t/n.width+n.x:"V"===i?this[r][1]=(this[r][1]-n.y)*e/n.height+n.y:"C"===i||"S"===i||"Q"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y,this[r][3]=(this[r][3]-n.x)*t/n.width+n.x,this[r][4]=(this[r][4]-n.y)*e/n.height+n.y,"C"===i&&(this[r][5]=(this[r][5]-n.x)*t/n.width+n.x,this[r][6]=(this[r][6]-n.y)*e/n.height+n.y)):"A"===i&&(this[r][1]=this[r][1]*t/n.width,this[r][2]=this[r][2]*e/n.height,this[r][6]=(this[r][6]-n.x)*t/n.width+n.x,this[r][7]=(this[r][7]-n.y)*e/n.height+n.y);return this}toString(){return function(t){let e="";for(let n=0,r=t.length;n<r;n++)e+=t[n][0],null!=t[n][1]&&(e+=t[n][1],null!=t[n][2]&&(e+=" ",e+=t[n][2],null!=t[n][3]&&(e+=" ",e+=t[n][3],e+=" ",e+=t[n][4],null!=t[n][5]&&(e+=" ",e+=t[n][5],e+=" ",e+=t[n][6],null!=t[n][7]&&(e+=" ",e+=t[n][7])))));return e+" "}(this)}}const Ze=t=>{const e=typeof t;return"number"===e?ne:"string"===e?Dt.isColor(t)?Dt:Et.test(t)?Tt.test(t)?Je:ee:bt.test(t)?ne:en:on.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?ee:"object"===e?sn:en};class tn{constructor(t){this._stepper=t||new Re("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(Ze(t));let e=new this._type(t);return this._type===Dt&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===sn&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}class en{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}}class nn{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,nn.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}nn.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const rn=(t,e)=>t[0]<e[0]?-1:t[0]>e[0]?1:0;class sn{constructor(...t){this.init(...t)}align(t){const e=this.values;for(let n=0,r=e.length;n<r;++n){if(e[n+1]===t[n+1]){if(e[n+1]===Dt&&t[n+7]!==e[n+7]){const e=t[n+7],r=new Dt(this.values.splice(n+3,5))[e]().toArray();this.values.splice(n+3,0,...r)}n+=e[n+2]+2;continue}if(!t[n+1])return this;const r=(new t[n+1]).toArray(),i=e[n+2]+3;e.splice(n,i,t[n],t[n+1],t[n+2],...r),n+=e[n+2]+2}return this}init(t){if(this.values=[],Array.isArray(t))return void(this.values=t.slice());t=t||{};const e=[];for(const n in t){const r=Ze(t[n]),i=new r(t[n]).toArray();e.push([n,r,i.length,...i])}return e.sort(rn),this.values=e.reduce(((t,e)=>t.concat(e)),[]),this}toArray(){return this.values}valueOf(){const t={},e=this.values;for(;e.length;){const n=e.shift(),r=e.shift(),i=e.shift(),s=e.splice(0,i);t[n]=new r(s)}return t}}const on=[en,nn,sn];class an extends he{constructor(t,e=t){super(ct("path",t),e)}array(){return this._array||(this._array=new Je(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,e){return this.attr("d",this.array().move(t,e))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new Je(t))}size(t,e){const n=$(this,t,e);return this.attr("d",this.array().size(n.width,n.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}function un(){return this._array||(this._array=new Ce(this.attr("points")))}function cn(){return delete this._array,this}function hn(t,e){return this.attr("points",this.array().move(t,e))}function ln(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new Ce(t))}function dn(t,e){const n=$(this,t,e);return this.attr("points",this.array().size(n.width,n.height))}an.prototype.MorphArray=Je,X({Container:{path:yt((function(t){return this.put(new an).plot(t||new Je)}))}}),dt(an,"Path");class fn extends he{constructor(t,e=t){super(ct("polygon",t),e)}}X({Container:{polygon:yt((function(t){return this.put(new fn).plot(t||new Ce)}))}}),gt(fn,i),gt(fn,s),dt(fn,"Polygon");class pn extends he{constructor(t,e=t){super(ct("polyline",t),e)}}X({Container:{polyline:yt((function(t){return this.put(new pn).plot(t||new Ce)}))}}),gt(pn,i),gt(pn,s),dt(pn,"Polyline");class mn extends he{constructor(t,e=t){super(ct("rect",t),e)}}gt(mn,{rx:le,ry:de}),X({Container:{rect:yt((function(t,e){return this.put(new mn).size(t,e)}))}}),dt(mn,"Rect");class gn{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const e=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}const yn={nextDraw:null,frames:new gn,timeouts:new gn,immediates:new gn,timer:()=>rt.window.performance||rt.window.Date,transforms:[],frame(t){const e=yn.frames.push({run:t});return null===yn.nextDraw&&(yn.nextDraw=rt.window.requestAnimationFrame(yn._draw)),e},timeout(t,e){e=e||0;const n=yn.timer().now()+e,r=yn.timeouts.push({run:t,time:n});return null===yn.nextDraw&&(yn.nextDraw=rt.window.requestAnimationFrame(yn._draw)),r},immediate(t){const e=yn.immediates.push(t);return null===yn.nextDraw&&(yn.nextDraw=rt.window.requestAnimationFrame(yn._draw)),e},cancelFrame(t){null!=t&&yn.frames.remove(t)},clearTimeout(t){null!=t&&yn.timeouts.remove(t)},cancelImmediate(t){null!=t&&yn.immediates.remove(t)},_draw(t){let e=null;const n=yn.timeouts.last();for(;(e=yn.timeouts.shift())&&(t>=e.time?e.run():yn.timeouts.push(e),e!==n););let r=null;const i=yn.frames.last();for(;r!==i&&(r=yn.frames.shift());)r.run(t);let s=null;for(;s=yn.immediates.shift();)s();yn.nextDraw=yn.timeouts.first()||yn.frames.first()?rt.window.requestAnimationFrame(yn._draw):null}},bn=yn,vn=function(t){const e=t.start,n=t.runner.duration();return{start:e,duration:n,end:e+n,runner:t.runner}},wn=function(){const t=rt.window;return(t.performance||t.Date).now()};class xn extends Jt{constructor(t=wn){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const e=this.speed();if(null==t)return this.speed(-e);const n=Math.abs(e);return this.speed(t?-n:n)}schedule(t,e,n){if(null==t)return this._runners.map(vn);let r=0;const i=this.getEndTime();if(e=e||0,null==n||"last"===n||"after"===n)r=i;else if("absolute"===n||"start"===n)r=e,e=0;else if("now"===n)r=this._time;else if("relative"===n){const n=this.getRunnerInfoById(t.id);n&&(r=n.start+e,e=0)}else{if("with-last"!==n)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();r=t?t.start:this._time}}t.unschedule(),t.timeline(this);const s=t.persist(),o={persist:null===s?this._persist:s,start:r+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(o),this._runners.sort(((t,e)=>t.start-e.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return bn.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=bn.frame(this._step)),this)}_stepFn(t=!1){const e=this._timeSource();let n=e-this._lastSourceTime;t&&(n=0);const r=this._speed*n+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=r,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let t=this._runners.length;t--;){const e=this._runners[t],n=e.runner;this._time-e.start<=0&&n.reset()}let i=!1;for(let t=0,e=this._runners.length;t<e;t++){const n=this._runners[t],s=n.runner;let o=r;const a=this._time-n.start;a<=0?i=!0:(a<o&&(o=a),s.active()&&(s.step(o).done?!0!==n.persist&&s.duration()-s.time()+this._time+n.persist<this._time&&(s.unschedule(),--t,--e):i=!0))}return i&&!(this._speed<0&&0===this._time)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}X({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new xn,this._timeline):(this._timeline=t,this)}}});class Sn extends Jt{constructor(t){super(),this.id=Sn.id++,t="function"==typeof(t=null==t?400:t)?new Ve(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof Ve,this._stepper=this._isDeclarative?t:new Re,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new It,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,e,n){let r=1,i=!1,s=0;return e=e??0,n=n||"last","object"!=typeof(t=t??400)||t instanceof Fe||(e=t.delay??e,n=t.when??n,i=t.swing||i,r=t.times??r,s=t.wait??s,t=t.duration??400),{duration:t,delay:e,swing:i,times:r,wait:s,when:n}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(t,e,n){const r=Sn.sanitise(t,e,n),i=new Sn(r.duration);return this._timeline&&i.timeline(this._timeline),this._element&&i.element(this._element),i.loop(r).schedule(r.delay,r.when)}clearTransform(){return this.transforms=new It,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new Re(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,e,n){return"object"==typeof t&&(e=t.swing,n=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=n||0,!0===this._times&&(this._times=1/0),this}loops(t){const e=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/e),n=(this._time-t*e)/this._duration;return Math.min(t+n,this._times)}const n=t%1,r=e*Math.floor(t)+this._duration*n;return this.time(r)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,n=this._duration,r=this._wait,i=this._times,s=this._swing,o=this._reverse;let a;if(null==t){const t=function(t){const e=s*Math.floor(t%(2*(r+n))/(r+n)),i=e&&!o||!e&&o,a=Math.pow(-1,i)*(t%(r+n))/n+i;return Math.max(Math.min(a,1),0)},u=i*(r+n)-r;return a=e<=0?Math.round(t(1e-5)):e<u?t(e):Math.round(t(u-1e-5)),a}const u=Math.floor(this.loops()),c=s&&u%2==0;return a=u+(c&&!o||o&&c?t:1-t),this.loops(a)}progress(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}queue(t,e,n,r){return this._queue.push({initialiser:t||Zt,runner:e||Zt,retarget:n,isTransform:r,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted||(this.time(0),this._reseted=!0),this}reverse(t){return this._reverse=null==t?!this._reverse:t,this}schedule(t,e,n){if(t instanceof xn||(n=e,e=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,e,n),this}step(t){if(!this.enabled)return this;t=null==t?16:t,this._time+=t;const e=this.position(),n=this._lastPosition!==e&&this._time>=0;this._lastPosition=e;const r=this.duration(),i=this._lastTime<=0&&this._time>0,s=this._lastTime<r&&this._time>=r;this._lastTime=this._time,i&&this.fire("start",this);const o=this._isDeclarative;this.done=!o&&!s&&this._time>=r,this._reseted=!1;let a=!1;return(n||o)&&(this._initialise(n),this.transforms=new It,a=this._run(o?t:e),this.fire("step",this)),this.done=this.done||a&&o,s&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const e=t-this._time;return this.step(e),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let e=0,n=this._queue.length;e<n;++e){const n=this._queue[e],r=this._isDeclarative||!n.initialised&&t;t=!n.finished,r&&t&&(n.initialiser.call(this),n.initialised=!0)}}_rememberMorpher(t,e){if(this._history[t]={morpher:e,caller:this._queue[this._queue.length-1]},this._isDeclarative){const t=this.timeline();t&&t.play()}}_run(t){let e=!0;for(let n=0,r=this._queue.length;n<r;++n){const r=this._queue[n],i=r.runner.call(this,t);r.finished=r.finished||!0===i,e=e&&r.finished}return e}_tryRetarget(t,e,n){if(this._history[t]){if(!this._history[t].caller.initialised){const e=this._queue.indexOf(this._history[t].caller);return this._queue.splice(e,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget.call(this,e,n):this._history[t].morpher.to(e),this._history[t].caller.finished=!1;const r=this.timeline();return r&&r.play(),!0}return!1}}Sn.id=0;class _n{constructor(t=new It,e=-1,n=!0){this.transforms=t,this.id=e,this.done=n}clearTransformsFromQueue(){}}gt([Sn,_n],{mergeWith(t){return new _n(t.transforms.lmultiply(this.transforms),t.id)}});const Pn=(t,e)=>t.lmultiplyO(e),Mn=t=>t.transforms;function Nn(){const t=this._transformationRunners.runners.map(Mn).reduce(Pn,new It);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class On{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new _n).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,e){const n=this.ids.indexOf(t+1);return this.ids.splice(n,1,t+1),this.runners.splice(n,1,e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let e=0;e<this.runners.length;++e){const n=this.runners[e];if(!(t&&n.done&&t.done)||n._timeline&&n._timeline._runnerIds.includes(n.id)||t._timeline&&t._timeline._runnerIds.includes(t.id))t=n;else{this.remove(n.id);const r=n.mergeWith(t);this.edit(t.id,r),t=r,--e}}return this}remove(t){const e=this.ids.indexOf(t+1);return this.ids.splice(e,1),this.runners.splice(e,1),this}}X({Element:{animate(t,e,n){const r=Sn.sanitise(t,e,n),i=this.timeline();return new Sn(r.duration).loop(r).element(this).timeline(i.play()).schedule(r.delay,r.when)},delay(t,e){return this.animate(0,t,e)},_clearTransformRunnersBefore(t){this._transformationRunners.clearBefore(t.id)},_currentTransform(t){return this._transformationRunners.runners.filter((e=>e.id<=t.id)).map(Mn).reduce(Pn,new It)},_addRunner(t){this._transformationRunners.add(t),bn.cancelImmediate(this._frameId),this._frameId=bn.immediate(Nn.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new On).add(new _n(new It(this))))}}}),gt(Sn,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,n){if("string"==typeof e)return this.styleAttr(t,{[e]:n});let r=e;if(this._tryRetarget(t,r))return this;let i=new tn(this._stepper).to(r),s=Object.keys(r);return this.queue((function(){i=i.from(this.element()[t](s))}),(function(e){return this.element()[t](i.at(e).valueOf()),i.done()}),(function(e){const n=Object.keys(e),o=(a=s,n.filter((t=>!a.includes(t))));var a;if(o.length){const e=this.element()[t](o),n=new sn(i.from()).valueOf();Object.assign(n,e),i.from(n)}const u=new sn(i.to()).valueOf();Object.assign(u,e),i.to(u),s=n,r=e})),this._rememberMorpher(t,i),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let n=new tn(this._stepper).to(new ne(t));return this.queue((function(){n=n.from(this.element().zoom())}),(function(t){return this.element().zoom(n.at(t),e),n.done()}),(function(t,r){e=r,n.to(t)})),this._rememberMorpher("zoom",n),this},transform(t,e,n){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const r=It.isMatrixLike(t);n=null!=t.affine?t.affine:null!=n?n:!r;const i=new tn(this._stepper).type(n?nn:It);let s,o,a,u,c;return this.queue((function(){o=o||this.element(),s=s||K(t,o),c=new It(e?void 0:o),o._addRunner(this),e||o._clearTransformRunnersBefore(this)}),(function(h){e||this.clearTransform();const{x:l,y:d}=new Lt(s).transform(o._currentTransform(this));let f=new It({...t,origin:[l,d]}),p=this._isDeclarative&&a?a:c;if(n){f=f.decompose(l,d),p=p.decompose(l,d);const t=f.rotate,e=p.rotate,n=[t-360,t,t+360],r=n.map((t=>Math.abs(t-e))),i=Math.min(...r),s=r.indexOf(i);f.rotate=n[s]}e&&(r||(f.rotate=t.rotate||0),this._isDeclarative&&u&&(p.rotate=u)),i.from(p),i.to(f);const m=i.at(h);return u=m.rotate,a=new It(m),this.addTransform(a),o._addRunner(this),i.done()}),(function(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(s=K(e,o)),t={...e,origin:s}}),!0),this._isDeclarative&&this._rememberMorpher("transform",i),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new ne(e),this._tryRetarget(t,e))return this;const n=new tn(this._stepper).to(e);let r=null;return this.queue((function(){r=this.element()[t](),n.from(r),n.to(r+e)}),(function(e){return this.element()[t](n.at(e)),n.done()}),(function(t){n.to(r+new ne(t))})),this._rememberMorpher(t,n),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const n=new tn(this._stepper).to(e);return this.queue((function(){n.from(this.element()[t]())}),(function(e){return this.element()[t](n.at(e)),n.done()})),this._rememberMorpher(t,n),this},_queueNumber(t,e){return this._queueObject(t,new ne(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let n;return t&&e||(n=this._element.bbox()),t||(t=n.width/n.height*e),e||(e=n.height/n.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,n,r){if(4===arguments.length)return this.plot([t,e,n,r]);if(this._tryRetarget("plot",t))return this;const i=new tn(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){i.from(this._element.array())}),(function(t){return this._element.plot(i.at(t)),i.done()})),this._rememberMorpher("plot",i),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,n,r){return this._queueObject("viewbox",new Vt(t,e,n,r))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),gt(Sn,{rx:le,ry:de,from:Se,to:_e}),dt(Sn,"Runner");class Cn extends ue{constructor(t,e=t){super(ct("svg",t),e),this.namespace()}defs(){return this.isRoot()?ht(this.node.querySelector("defs"))||this.put(new ce):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof rt.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:tt,version:"1.1"}).attr("xmlns:xlink",nt,et):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,et).attr("xmlns:svgjs",null,et)}root(){return this.isRoot()?this:super.root()}}X({Container:{nested:yt((function(){return this.put(new Cn)}))}}),dt(Cn,"Svg",!0);class En extends ue{constructor(t,e=t){super(ct("symbol",t),e)}}function Tn(t){return!1===this._build&&this.clear(),this.node.appendChild(rt.document.createTextNode(t)),this}function An(){return this.node.getComputedTextLength()}function jn(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)}function kn(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}function Dn(t,e,n=this.bbox()){return this.x(t,n).y(e,n)}function Ln(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)}function Bn(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)}function In(t,e,n=this.bbox()){return this.cx(t,n).cy(e,n)}function Fn(t){return this.attr("x",t)}function Rn(t){return this.attr("y",t)}function Vn(t,e){return this.ax(t).ay(e)}function qn(t){return this._build=!!t,this}X({Container:{symbol:yt((function(){return this.put(new En)}))}}),dt(En,"Symbol");class zn extends he{constructor(t,e=t){super(ct("text",t),e),this.dom.leading=this.dom.leading??new ne(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new ne(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let e=0;const n=this.dom.leading;this.each((function(r){if(J(this.node))return;const i=rt.window.getComputedStyle(this.node).getPropertyValue("font-size"),s=n*new ne(i);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?e+=s:(this.attr("dy",r?s+e:0),e=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new ne(t.leading||1.3),this}writeDataToDom(){return Z(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const e=this.node.childNodes;let n=0;t="";for(let r=0,i=e.length;r<i;++r)"textPath"===e[r].nodeName||J(e[r])?0===r&&(n=r+1):(r!==n&&3!==e[r].nodeType&&!0===ht(e[r]).dom.newLined&&(t+="\n"),t+=e[r].textContent);return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else for(let e=0,n=(t=(t+"").split("\n")).length;e<n;e++)this.newLine(t[e]);return this.build(!1).rebuild()}}gt(zn,o),X({Container:{text:yt((function(t=""){return this.put(new zn).text(t)})),plain:yt((function(t=""){return this.put(new zn).plain(t)}))}}),dt(zn,"Text");class Xn extends he{constructor(t,e=t){super(ct("tspan",t),e),this._build=!1}dx(t){return this.attr("dx",t)}dy(t){return this.attr("dy",t)}newLine(){this.dom.newLined=!0;const t=this.parent();if(!(t instanceof zn))return this;const e=t.index(this),n=rt.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=t.dom.leading*new ne(n);return this.dy(e?r:0).attr("x",t.x())}text(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?(this.clear().build(!0),t.call(this,this),this.build(!1)):this.plain(t),this)}}gt(Xn,o),X({Tspan:{tspan:yt((function(t=""){const e=new Xn;return this._build||this.clear(),this.put(e).text(t)}))},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),dt(Xn,"Tspan");class Gn extends he{constructor(t,e=t){super(ct("circle",t),e)}radius(t){return this.attr("r",t)}rx(t){return this.attr("r",t)}ry(t){return this.rx(t)}size(t){return this.radius(new ne(t).divide(2))}}gt(Gn,{x:fe,y:pe,cx:me,cy:ge,width:ye,height:be}),X({Container:{circle:yt((function(t=0){return this.put(new Gn).size(t).move(0,0)}))}}),dt(Gn,"Circle");class Yn extends ue{constructor(t,e=t){super(ct("clipPath",t),e)}remove(){return this.targets().forEach((function(t){t.unclip()})),super.remove()}targets(){return Yt("svg [clip-path*="+this.id()+"]")}}X({Container:{clip:yt((function(){return this.defs().put(new Yn)}))},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const e=t instanceof Yn?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}}),dt(Yn,"ClipPath");class Hn extends oe{constructor(t,e=t){super(ct("foreignObject",t),e)}}function Un(t,e){return this.children().forEach((n=>{let r;try{r=n.node instanceof rt.window.SVGSVGElement?new Vt(n.attr(["x","y","width","height"])):n.bbox()}catch(t){return}const i=new It(n),s=i.translate(t,e).transform(i.inverse()),o=new Lt(r.x,r.y).transform(s);n.move(o.x,o.y)})),this}function Wn(t){return this.dmove(t,0)}function $n(t){return this.dmove(0,t)}function Kn(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)}function Qn(t=0,e=0,n=this.bbox()){const r=t-n.x,i=e-n.y;return this.dmove(r,i)}function Jn(t,e,n=this.bbox()){const r=$(this,t,e,n),i=r.width/n.width,s=r.height/n.height;return this.children().forEach((t=>{const e=new Lt(n).transform(new It(t).inverse());t.scale(i,s,e.x,e.y)})),this}function Zn(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)}function tr(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)}function er(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}X({Container:{foreignObject:yt((function(t,e){return this.put(new Hn).size(t,e)}))}}),dt(Hn,"ForeignObject");class nr extends ue{constructor(t,e=t){super(ct("g",t),e)}}gt(nr,a),X({Container:{group:yt((function(){return this.put(new nr)}))}}),dt(nr,"G");class rr extends ue{constructor(t,e=t){super(ct("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,nt)}}gt(rr,a),X({Container:{link:yt((function(t){return this.put(new rr).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const n=e.index(t);return e.add(this,n),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new rr,this.wrap(e)),"function"==typeof t?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),dt(rr,"A");class ir extends ue{constructor(t,e=t){super(ct("mask",t),e)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return Yt("svg [mask*="+this.id()+"]")}}X({Container:{mask:yt((function(){return this.defs().put(new ir)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof ir?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),dt(ir,"Mask");class sr extends oe{constructor(t,e=t){super(ct("stop",t),e)}update(t){return("number"==typeof t||t instanceof ne)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new ne(t.offset)),this}}X({Gradient:{stop:function(t,e,n){return this.put(new sr).update(t,e,n)}}}),dt(sr,"Stop");class or extends oe{constructor(t,e=t){super(ct("style",t),e)}addText(t=""){return this.node.textContent+=t,this}font(t,e,n={}){return this.rule("@font-face",{fontFamily:t,src:e,...n})}rule(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;let n=t+"{";for(const t in e)n+=t.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))+":"+e[t]+";";return n+="}",n}(t,e))}}X("Dom",{style(t,e){return this.put(new or).rule(t,e)},fontface(t,e,n){return this.put(new or).font(t,e,n)}}),dt(or,"Style");class ar extends zn{constructor(t,e=t){super(ct("textPath",t),e)}array(){const t=this.track();return t?t.array():null}plot(t){const e=this.track();let n=null;return e&&(n=e.plot(t)),null==t?n:this}track(){return this.reference("href")}}X({Container:{textPath:yt((function(t,e){return t instanceof zn||(t=this.text(t)),t.path(e)}))},Text:{path:yt((function(t,e=!0){const n=new ar;let r;if(t instanceof an||(t=this.defs().path(t)),n.attr("href","#"+t,nt),e)for(;r=this.node.firstChild;)n.node.appendChild(r);return this.put(n)})),textPath(){return this.findOne("textPath")}},Path:{text:yt((function(t){return t instanceof zn||(t=(new zn).addTo(this.parent()).text(t)),t.path(this)})),targets(){return Yt("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),ar.prototype.MorphArray=Je,dt(ar,"TextPath");class ur extends he{constructor(t,e=t){super(ct("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,nt)}}X({Container:{use:yt((function(t,e){return this.put(new ur).use(t,e)}))}}),dt(ur,"Use");const cr=ut;gt([Cn,En,Ne,Me,Le],G("viewbox")),gt([De,pn,fn,an],G("marker")),gt(zn,G("Text")),gt(an,G("Path")),gt(ce,G("Defs")),gt([zn,Xn],G("Tspan")),gt([mn,ve,Pe,Sn],G("radius")),gt(Jt,G("EventTarget")),gt(se,G("Dom")),gt(oe,G("Element")),gt(he,G("Shape")),gt([ue,xe],G("Container")),gt(Pe,G("Gradient")),gt(Sn,G("Runner")),Xt.extend([...new Set(z)]),function(t=[]){on.push(...[].concat(t))}([ne,Dt,Vt,It,ee,Ce,Je,Lt]),gt(on,{to(t){return(new tn).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,n,r,i){return this.fromArray(t.map((function(t,s){return r.step(t,e[s],n,i[s],i)})))}});var hr=n(501),lr={};lr.styleTagTransform=w(),lr.setAttributes=g(),lr.insert=p().bind(null,"head"),lr.domAPI=d(),lr.insertStyleElement=b(),h()(hr.Ay,lr),hr.Ay&&hr.Ay.locals&&hr.Ay.locals;const dr=["Left","Right","Top","Bottom"],fr={Left:B.MinCenterX,Right:B.MaxCenterX,Top:B.MinCenterY,Bottom:B.MaxCenterY};class pr{constructor(t,e,n){this.coordinateName=t,this.Coordinate=fr[t],this.selectedBases=e,this.options=n,this.domNode=j(),this.domNode.addEventListener("blur",(()=>this.handleSubmit())),this.domNode.addEventListener("keyup",(t=>{"enter"==t.key.toLowerCase()&&this.handleSubmit()}))}refresh(){let t=new(0,this.Coordinate)([...this.selectedBases]);this.domNode.value=Number.parseFloat(t.get().toFixed(2)).toString()}handleSubmit(){var t,e;let n=Number.parseFloat(this.domNode.value);if(!(0,I.isFiniteNumber)(n))return;let r=new(0,this.Coordinate)([...this.selectedBases]);(0,F.areWithin)(n,r.get(),.001)||(!(null===(t=this.options)||void 0===t?void 0:t.beforeMovingBases)||this.options.beforeMovingBases(),r.set(n),!(null===(e=this.options)||void 0===e?void 0:e.afterMovingBases)||this.options.afterMovingBases)}}class mr{constructor(t,e,n){this.coordinateInput=new pr(t,e,n),this.domNode=L(t,this.coordinateInput.domNode)}refresh(){this.coordinateInput.refresh()}}class gr{constructor(t,e){let n=function(){let t=document.createElement("button");return u(t).addClass(hr.wx).append(function(){let t=cr();return t.addClass(hr.D),t.viewbox(0,0,6,10).attr({width:"6px",height:"10px"}),t.path().attr("d","M 1 1 L 5 5 L 1 9").attr("stroke","black").attr("stroke-width",2).attr("stroke-linecap","round").attr("stroke-linejoin","round").attr("fill","none"),t.node}(),"More Coordinates"),t}(),r=document.createElement("div");this.fields=dr.map((n=>new mr(n,t,e))),u(r).addClass(hr.Qs).append(...this.fields.map((t=>t.domNode))),this.domNode=document.createElement("div"),u(this.domNode).addClass(hr.Ik),u(n).on("click",(()=>u(this.domNode).toggleClass(hr.ho))),u(this.domNode).append(n).append(r)}refresh(){this.fields.forEach((t=>t.refresh()))}}var yr=n(213),br={};br.styleTagTransform=w(),br.setAttributes=g(),br.insert=p().bind(null,"head"),br.domAPI=d(),br.insertStyleElement=b(),h()(yr.A,br),yr.A&&yr.A.locals&&yr.A.locals;var vr=n(725);class wr{constructor(t,e){this.domNode=document.createElement("button"),u(this.domNode).addClass(yr.O).append(function(){let t=cr();return t.viewbox(-3.5,-3.5,25,25).attr({width:"25px",height:"25px"}).css({transform:"rotate(45deg)"}),t.path().attr("d","M 17 9 A 8 8 270 1 1 9 1").attr("stroke","white").attr("stroke-width",1.5).attr("fill","none"),t.path().attr("d","M 9 -3 L 13 1 L 9 5 z").attr("stroke","white").attr("stroke-width",1).attr("fill","white"),t.node}());let n=!1,r=!1,i=0;this.domNode.addEventListener("mousedown",(e=>{n=!0;let r=[...t];if(r.length>0){let t=r[0],n=r[r.length-1];i=(0,vr.direction)((0,vr.midpoint)(t.getClientCenterPoint(),n.getClientCenterPoint()),{x:e.clientX,y:e.clientY})}})),window.addEventListener("mousemove",(s=>{if(n){let n=[...t];if(n.length>0){let t=n[0],o=n[n.length-1],a=(0,vr.direction)((0,vr.midpoint)(t.getClientCenterPoint(),o.getClientCenterPoint()),{x:s.clientX,y:s.clientY});r||!(null==e?void 0:e.beforeMovingBases)||e.beforeMovingBases(),(0,B.rotate)(n,a-i),r=!0,i=a}}})),window.addEventListener("mouseup",(()=>{n&&r&&(!(null==e?void 0:e.afterMovingBases)||e.afterMovingBases()),n=!1,r=!1}))}}const xr=String.fromCharCode(176);class Sr{constructor(t,e){this.selectedBases=t,this.options=e,this.domNode=j(),this.domNode.addEventListener("blur",(()=>this.handleSubmit())),this.domNode.addEventListener("keyup",(t=>{"enter"==t.key.toLowerCase()&&this.handleSubmit()}))}refresh(){let t=new B.Direction([...this.selectedBases]);this.domNode.value=Number.parseFloat((0,F.degrees)(t.get()).toFixed(2)).toString(),this.domNode.value+=xr}handleSubmit(){var t,e;let n=(0,F.radians)(Number.parseFloat(this.domNode.value));if(!(0,I.isFiniteNumber)(n))return;let r=new B.Direction([...this.selectedBases]);(0,F.areWithin)(n,r.get(),.001)||(!(null===(t=this.options)||void 0===t?void 0:t.beforeMovingBases)||this.options.beforeMovingBases(),r.set(n),!(null===(e=this.options)||void 0===e?void 0:e.afterMovingBases)||this.options.afterMovingBases())}}class _r{constructor(t,e){this.directionInput=new Sr(t,e);let n=L("Rotation",this.directionInput.domNode),r=new wr(t,e);this.domNode=document.createElement("div"),u(this.domNode).append(n).append(r.domNode).css({display:"flex",flexDirection:"row",alignItems:"center"}),u(this.domNode).css({marginTop:"33px"})}refresh(){this.directionInput.refresh()}}var Pr=n(284),Mr={};Mr.styleTagTransform=w(),Mr.setAttributes=g(),Mr.insert=p().bind(null,"head"),Mr.domAPI=d(),Mr.insertStyleElement=b(),h()(Pr.Ay,Mr),Pr.Ay&&Pr.Ay.locals&&Pr.Ay.locals;var Nr=n(645),Or={};function Cr(){let t=document.createElement("button");return u(t).addClass(Nr.E),t}Or.styleTagTransform=w(),Or.setAttributes=g(),Or.insert=p().bind(null,"head"),Or.domAPI=d(),Or.insertStyleElement=b(),h()(Nr.A,Or),Nr.A&&Nr.A.locals&&Nr.A.locals;var Er=n(95),Tr={};function Ar(){let t=document.createElement("button");return u(t).addClass(Er.k),t}function jr(){let t=j();t.value="0";let e="0";t.addEventListener("focus",(()=>e=t.value));let n=()=>{let n=Number.parseFloat(t.value);(0,I.isFiniteNumber)(n)||(t.value=e)};return t.addEventListener("blur",n),t.addEventListener("keyup",(t=>{"enter"==t.key.toLowerCase()&&n()})),t}Tr.styleTagTransform=w(),Tr.setAttributes=g(),Tr.insert=p().bind(null,"head"),Tr.domAPI=d(),Tr.insertStyleElement=b(),h()(Er.A,Tr),Er.A&&Er.A.locals&&Er.A.locals;class kr{constructor(t,e){let n=jr(),r=jr();n.value=10..toString(),r.value=20..toString();let i=L("Spacing",n),s=L("Termini Gap",r);u(i).css({margin:"14px 0px 0px 14px"}),u(s).css({margin:"10px 0px 0px 14px"});let o=Ar();u(o).text("Circularize"),u(o).on("click",(()=>{let i=Number.parseFloat(n.value),s=Number.parseFloat(r.value);i=(0,I.isFiniteNumber)(i)?i:10,s=(0,I.isFiniteNumber)(s)?s:20,!(null==e?void 0:e.beforeMovingBases)||e.beforeMovingBases(),(0,B.circularize)([...t],{spacing:i,terminiGap:s}),!(null==e?void 0:e.afterMovingBases)||e.afterMovingBases()})),this.domNode=document.createElement("div"),u(this.domNode).append(o).append(i).append(s).css({display:"flex",flexDirection:"column",alignItems:"start"}),u(this.domNode).css({marginTop:"55px"})}}var Dr=n(882),Lr={};Lr.styleTagTransform=w(),Lr.setAttributes=g(),Lr.insert=p().bind(null,"head"),Lr.domAPI=d(),Lr.insertStyleElement=b(),h()(Dr.A,Lr),Dr.A&&Dr.A.locals&&Dr.A.locals;var Br=n(139);class Ir{constructor(t,e,n){this.selectedBases=e;let r=new O(e),i=new V(e,n),s=new gr(e,n),o=new _r(e,n),a=function(t,e){let n=Cr(),r=Cr(),i=Cr(),s=Cr();u(n).text("X"),u(r).text("Y"),u(i).text("Self-X"),u(s).text("Self-Y"),u(n).on("click",(()=>{!(null==e?void 0:e.beforeMovingBases)||e.beforeMovingBases(),(0,B.flipX)([...t]),!(null==e?void 0:e.afterMovingBases)||e.afterMovingBases()})),u(r).on("click",(()=>{!(null==e?void 0:e.beforeMovingBases)||e.beforeMovingBases(),(0,B.flipY)([...t]),!(null==e?void 0:e.afterMovingBases)||e.afterMovingBases()})),u(i).on("click",(()=>{!(null==e?void 0:e.beforeMovingBases)||e.beforeMovingBases(),(0,B.flipSelfX)([...t]),!(null==e?void 0:e.afterMovingBases)||e.afterMovingBases()})),u(s).on("click",(()=>{!(null==e?void 0:e.beforeMovingBases)||e.beforeMovingBases(),(0,B.flipSelfY)([...t]),!(null==e?void 0:e.afterMovingBases)||e.afterMovingBases()}));let o=document.createElement("p");u(o).addClass(Pr.oP).text("Flip:");let a=document.createElement("div");return u(a).addClass(Pr.ps).append(o,n,r,i,s),a}(e,n),c=function(t,e){let n=jr();n.value=10..toString();let r=L("Spacing",n);u(r).css({margin:"14px 0px 0px 14px"});let i=Ar();i.textContent="Linearize",i.addEventListener("click",(()=>{let r=Number.parseFloat(n.value);r=(0,I.isFiniteNumber)(r)?r:10,!(null==e?void 0:e.beforeMovingBases)||e.beforeMovingBases(),(0,B.linearize)([...t],{spacing:r}),!(null==e?void 0:e.afterMovingBases)||e.afterMovingBases()}));let s=document.createElement("div");return u(s).append(i).append(r).css({display:"flex",flexDirection:"column",alignItems:"start"}),u(s).css({marginTop:"31px"}),s}(e,n),h=function(t,e){let n=Ar();return n.textContent="Straighten",u(n).css({marginTop:"35px"}),n.addEventListener("click",(()=>{!(null==e?void 0:e.beforeMovingBases)||e.beforeMovingBases(),(0,B.straighten)([...t]),!(null==e?void 0:e.afterMovingBases)||e.afterMovingBases()})),n}(e,n),l=new kr(e,n),d=function(t,e){let n=jr();n.value=10..toString();let r=L("Spacing",n);u(r).css({margin:"14px 0px 0px 14px"});let i=Ar();u(i).text("Round"),u(i).on("click",(()=>{let r=Number.parseFloat(n.value);r=(0,I.isFiniteNumber)(r)?r:10,!(null==e?void 0:e.beforeMovingBases)||e.beforeMovingBases(),(0,B.round)([...t],{spacing:r}),!(null==e?void 0:e.afterMovingBases)||e.afterMovingBases()}));let s=document.createElement("div");return u(s).append(i).append(r).css({display:"flex",flexDirection:"column",alignItems:"start"}),u(s).css({marginTop:"41px"}),s}(e,n),f=function(t,e){let n=jr(),r=jr();n.value=20..toString(),r.value=10..toString();let i=L("Base-Pair Length",n),s=L("Base-Pair Spacing",r);u(i).css({margin:"14px 0px 0px 14px"}),u(s).css({margin:"10px 0px 0px 14px"});let o=Ar();u(o).text("Stemmify"),u(o).on("click",(()=>{let i=Number.parseFloat(n.value),s=Number.parseFloat(r.value);i=(0,I.isFiniteNumber)(i)?i:20,s=(0,I.isFiniteNumber)(s)?s:10,!(null==e?void 0:e.beforeMovingBases)||e.beforeMovingBases(),(0,B.stemmify)([...t],{basePairLength:i,basePairSpacing:s}),!(null==e?void 0:e.afterMovingBases)||e.afterMovingBases()}));let a=document.createElement("div");return u(a).append(o).append(i).append(s).css({display:"flex",flexDirection:"column",alignItems:"start"}),u(a).css({marginTop:"41px"}),a}(e,n),p=function(t,e,n){let r=jr(),i=jr(),s=jr();r.value=20..toString(),i.value=10..toString(),s.value=10..toString();let o=L("Base-Pair Length",r),a=L("Base-Pair Spacing",i),c=L("Hairpin Loop Spacing",s);u(o).css({margin:"14px 0px 0px 14px"}),u(a).css({margin:"10px 0px 0px 14px"}),u(c).css({margin:"10px 0px 0px 14px"});let h=Ar();u(h).text("Untangle"),u(h).on("click",(()=>{let o=Number.parseFloat(r.value),a=Number.parseFloat(i.value),u=Number.parseFloat(s.value);o=(0,I.isFiniteNumber)(o)?o:20,a=(0,I.isFiniteNumber)(a)?a:10,u=(0,I.isFiniteNumber)(u)?u:10;let c=new Set([...e]),h=[...t.secondaryBonds].filter((t=>c.has(t.base1)&&c.has(t.base2))).map((t=>[t.base1,t.base2]));!(null==n?void 0:n.beforeMovingBases)||n.beforeMovingBases(),(0,B.untangle)([...e],h,{spacing:o,basePairSpacing:a,hairpinLoopSpacing:u}),!(null==n?void 0:n.afterMovingBases)||n.afterMovingBases()}));let l=document.createElement("div");return u(l).append(h).append(o).append(a).append(c).css({display:"flex",flexDirection:"column",alignItems:"start"}),u(l).css({marginTop:"41px"}),l}(t,e,n),m=document.createElement("div");u(m).addClass(x.nn),u(m).append(i.domNode).append(s.domNode).append(o.domNode).append(a).append(c).append(h).append(l.domNode).append(d).append(f).append(p);let g=document.createElement("div");u(g).append(r.domNode).append(m).css({margin:"24px 0px 0px 21px"}).css({pointerEvents:"none"}),this.domNode=document.createElement("div"),u(this.domNode).addClass(x.t0),u(this.domNode).append(function(){let t=document.createElement("p");return u(t).addClass(_.w).append("Bases Layout"),t}()).append(g),this.refreshableComponents=[r,i,s,o],new MutationObserver((()=>this.isOpen()?this.refresh():{})).observe(t.domNode,{attributes:!0,childList:!0,characterData:!0,subtree:!0}),e.addEventListener("change",(()=>this.isOpen()?this.refresh():{}));let y=function(){let t=document.createElement("button");return u(t).addClass(Dr.b).text("Close"),t}();u(y).on("click",(()=>this.close())),u(this.domNode).append(y),this.dragTranslater=new Br.DragTranslater(this.domNode)}refresh(){this.refreshableComponents.forEach((t=>t.refresh())),0==[...this.selectedBases].length?u(this.domNode).addClass(x.JI):u(this.domNode).removeClass(x.JI)}appendTo(t){this.refresh(),this.dragTranslater.untranslate(),t.appendChild(this.domNode)}remove(){this.domNode.remove()}isOpen(){return document.contains(this.domNode)}close(){this.domNode.remove()}}})(),r})(),t.exports=e()},963:function(t){var e;e=()=>(()=>{var t={726:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{CoordinateSystem:()=>c,HorizontalClientScaling:()=>l,Scaling:()=>h,VerticalClientScaling:()=>d,assignUUID:()=>u,bringToFront:()=>f,sendToBack:()=>p});const n={randomUUID:"undefined"!=typeof crypto&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};let r;const i=new Uint8Array(16);function s(){if(!r&&(r="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!r))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return r(i)}const o=[];for(let t=0;t<256;++t)o.push((t+256).toString(16).slice(1));const a=function(t,e,r){if(n.randomUUID&&!e&&!t)return n.randomUUID();const i=(t=t||{}).random||(t.rng||s)();if(i[6]=15&i[6]|64,i[8]=63&i[8]|128,e){r=r||0;for(let t=0;t<16;++t)e[r+t]=i[t];return e}return function(t,e=0){return o[t[e+0]]+o[t[e+1]]+o[t[e+2]]+o[t[e+3]]+"-"+o[t[e+4]]+o[t[e+5]]+"-"+o[t[e+6]]+o[t[e+7]]+"-"+o[t[e+8]]+o[t[e+9]]+"-"+o[t[e+10]]+o[t[e+11]]+o[t[e+12]]+o[t[e+13]]+o[t[e+14]]+o[t[e+15]]}(i)};function u(t){t.id="uuid-"+a()}var c=function(){function t(t){this.targetSVGDoc=t}return Object.defineProperty(t.prototype,"width",{get:function(){return this.targetSVGDoc.viewBox.baseVal.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"height",{get:function(){return this.targetSVGDoc.viewBox.baseVal.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minX",{get:function(){return this.targetSVGDoc.viewBox.baseVal.x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxX",{get:function(){return this.minX+this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minY",{get:function(){return this.targetSVGDoc.viewBox.baseVal.y},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"maxY",{get:function(){return this.minY+this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"horizontalScaling",{get:function(){return this.targetSVGDoc.width.baseVal.value/this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"verticalScaling",{get:function(){return this.targetSVGDoc.height.baseVal.value/this.height},enumerable:!1,configurable:!0}),t.prototype.setScaling=function(t){this.targetSVGDoc.setAttribute("width","".concat(t*this.width)),this.targetSVGDoc.setAttribute("height","".concat(t*this.height))},Object.defineProperty(t.prototype,"clientWidth",{get:function(){return this.targetSVGDoc.getBoundingClientRect().width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"clientHeight",{get:function(){return this.targetSVGDoc.getBoundingClientRect().height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"horizontalClientScaling",{get:function(){return this.clientWidth/this.width},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"verticalClientScaling",{get:function(){return this.clientHeight/this.height},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minClientX",{get:function(){return this.targetSVGDoc.getBoundingClientRect().x},enumerable:!1,configurable:!0}),Object.defineProperty(t.prototype,"minClientY",{get:function(){return this.targetSVGDoc.getBoundingClientRect().y},enumerable:!1,configurable:!0}),t.prototype.fromClientX=function(t){return this.minX+(t-this.minClientX)/this.horizontalClientScaling},t.prototype.fromClientY=function(t){return this.minY+(t-this.minClientY)/this.verticalClientScaling},t.prototype.fromClientCoordinates=function(t,e){return[this.fromClientX(t),this.fromClientY(e)]},t.prototype.fromClientPoint=function(t){return{x:this.fromClientX(t.x),y:this.fromClientY(t.y)}},t.prototype.toClientX=function(t){return this.minClientX+this.horizontalClientScaling*(t-this.minX)},t.prototype.toClientY=function(t){return this.minClientY+this.verticalClientScaling*(t-this.minY)},t.prototype.toClientCoordinates=function(t,e){return[this.toClientX(t),this.toClientY(e)]},t.prototype.toClientPoint=function(t){return{x:this.toClientX(t.x),y:this.toClientY(t.y)}},t}(),h=function(){function t(t){this.targetSVGDoc=t}return t.prototype.set=function(t){var e=this.targetSVGDoc.viewBox.baseVal;this.targetSVGDoc.setAttribute("width",t*e.width+"px"),this.targetSVGDoc.setAttribute("height",t*e.height+"px")},t}(),l=function(){function t(t){this.targetSVGDoc=t}return t.prototype.get=function(){var t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.width/e.width},t}(),d=function(){function t(t){this.targetSVGDoc=t}return t.prototype.get=function(){var t=this.targetSVGDoc.getBoundingClientRect(),e=this.targetSVGDoc.viewBox.baseVal;return t.height/e.height},t}();function f(t){var e=t.parentNode;e&&e.appendChild(t)}function p(t){var e=t.parentNode;e&&e.prepend(t)}return e})(),t.exports=e()},139:function(t){var e;e=()=>(()=>{"use strict";var t={826:(t,e,n)=>{n.d(e,{A:()=>u,y:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,"._xow9qroX8E0n35EgMyS {\n cursor: grab;\n}\n\n._xow9qroX8E0n35EgMyS:active {\n cursor: grabbing;\n}\n",""]);var a="_xow9qroX8E0n35EgMyS";const u=o},314:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var o={};if(r)for(var a=0;a<this.length;a++){var u=this[a][0];null!=u&&(o[u]=!0)}for(var c=0;c<t.length;c++){var h=[].concat(t[c]);r&&o[h[0]]||(void 0!==s&&(void 0===h[5]||(h[1]="@layer".concat(h[5].length>0?" ".concat(h[5]):""," {").concat(h[1],"}")),h[5]=s),n&&(h[2]?(h[1]="@media ".concat(h[2]," {").concat(h[1],"}"),h[2]=n):h[2]=n),i&&(h[4]?(h[1]="@supports (".concat(h[4],") {").concat(h[1],"}"),h[4]=i):h[4]="".concat(i)),e.push(h))}},e}},601:t=>{t.exports=function(t){return t[1]}},72:t=>{var e=[];function n(t){for(var n=-1,r=0;r<e.length;r++)if(e[r].identifier===t){n=r;break}return n}function r(t,r){for(var s={},o=[],a=0;a<t.length;a++){var u=t[a],c=r.base?u[0]+r.base:u[0],h=s[c]||0,l="".concat(c," ").concat(h);s[c]=h+1;var d=n(l),f={css:u[1],media:u[2],sourceMap:u[3],supports:u[4],layer:u[5]};if(-1!==d)e[d].references++,e[d].updater(f);else{var p=i(f,r);r.byIndex=a,e.splice(a,0,{identifier:l,updater:p,references:1})}o.push(l)}return o}function i(t,e){var n=e.domAPI(e);return n.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,i){var s=r(t=t||[],i=i||{});return function(t){t=t||[];for(var o=0;o<s.length;o++){var a=n(s[o]);e[a].references--}for(var u=r(t,i),c=0;c<s.length;c++){var h=n(s[c]);0===e[h].references&&(e[h].updater(),e.splice(h,1))}s=u}}},659:t=>{var e={};t.exports=function(t,n){var r=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},540:t=>{t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},56:(t,e,n)=>{t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},825:t=>{t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var s=n.sourceMap;s&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleTagTransform(r,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},113:t=>{t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={id:r,exports:{}};return t[r](s,s.exports,n),s.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nc=void 0;var r={};n.r(r),n.d(r,{DragTranslater:()=>b});var i=n(72),s=n.n(i),o=n(825),a=n.n(o),u=n(659),c=n.n(u),h=n(56),l=n.n(h),d=n(540),f=n.n(d),p=n(113),m=n.n(p),g=n(826),y={};y.styleTagTransform=m(),y.setAttributes=l(),y.insert=c().bind(null,"head"),y.domAPI=a(),y.insertStyleElement=f(),s()(g.A,y),g.A&&g.A.locals&&g.A.locals;class b{constructor(t){this.targetForm=t,this.mouseIsDown=!1,window.addEventListener("mousedown",(t=>this.handleMouseDown(t))),window.addEventListener("mousemove",(t=>this.handleMouseMove(t))),window.addEventListener("mouseup",(t=>this.handleMouseUp(t))),t.addEventListener("mouseover",(e=>{e.target!==t||t.classList.add(g.y)})),t.addEventListener("mouseout",(e=>{e.target!==t||t.classList.remove(g.y)}))}get currentTranslation(){let t=this.targetForm.getBoundingClientRect(),e=t.x,n=t.y,r=this.targetForm.style.translate;this.targetForm.style.translate="0px 0px";let i=this.targetForm.getBoundingClientRect(),s=i.x,o=i.y;return this.targetForm.style.translate=r,{x:e-s,y:n-o}}set currentTranslation(t){this.targetForm.style.translate=`${t.x}px ${t.y}px`}untranslate(){this.targetForm.style.translate="0px 0px"}handleMouseDown(t){this.lastMouseDown=t,this.mouseIsDown=!0}handleMouseMove(t){if(!this.mouseIsDown)return;if(!this.lastMouseDown)return;if(this.lastMouseDown.target!==this.targetForm)return;let e=this.currentTranslation;this.currentTranslation={x:e.x+t.movementX,y:e.y+t.movementY}}handleMouseUp(t){this.mouseIsDown=!1}}return r})(),t.exports=e()},106:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return t.map((t=>({v:t,priority:Math.random()}))).sort(((t,e)=>t.priority-e.priority)).map((({v:t})=>t))}function r(){return!(!document.activeElement||"textarea"!==document.activeElement.tagName.toLowerCase()&&(t=document.activeElement,"input"!==t.tagName.toLowerCase()||"text"!==(null===(e=t.getAttribute("type"))||void 0===e?void 0:e.toLowerCase())));var t,e}function i(){try{return window.navigator.platform.toLowerCase().includes("mac")}catch(t){return!1}}t.r(e),t.d(e,{DownloadableFile:()=>s,EventfulSet:()=>o,detectMac:()=>i,shuffled:()=>n,userIsTyping:()=>r});class s{constructor(t){this.textContent=t}downloadAs(t,e){let n=new File([this.textContent],t,{type:e.type}),r=URL.createObjectURL(n),i=document.createElement("a");i.href=r,i.download=n.name,document.body.appendChild(i),i.click(),i.remove(),URL.revokeObjectURL(r)}}class o{constructor(){this.eventListeners={change:[]},this.underlyingSet=new Set}[Symbol.iterator](){return this.underlyingSet.values()}includes(t){return this.underlyingSet.has(t)}include(t){return this.includes(t)}addAll(t){let e=[...t];0!=e.length&&(e.every((t=>this.includes(t)))||(e.forEach((t=>this.underlyingSet.add(t))),this.callEventListeners("change")))}removeAll(t){let e=[...t];0!=e.length&&(e.every((t=>!this.includes(t)))||(e.forEach((t=>this.underlyingSet.delete(t))),this.callEventListeners("change")))}clear(){0!=this.underlyingSet.size&&(this.underlyingSet.clear(),this.callEventListeners("change"))}addEventListener(t,e){this.eventListeners[t].push(e)}callEventListeners(t){this.eventListeners[t].forEach((t=>t()))}removeEventListener(t,e){this.eventListeners[t]=this.eventListeners[t].filter((t=>t!==e))}}return e})(),t.exports=e()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function c(t){return"object"==typeof t&&null!==t}function h(t){return Array.isArray(t)}return t.r(e),t.d(e,{isArray:()=>h,isFiniteNumber:()=>r,isNonFiniteNumber:()=>i,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>c,isNullish:()=>u,isNumber:()=>n,isPositiveFiniteNumber:()=>s,isString:()=>a}),e})()},882:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,_:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.dtn_hLksHXwRvJ0M59R_ {\n position: absolute;\n top: 13px;\n right: 17px;\n\n border: none;\n outline: none;\n\n padding: 3px 12px;\n border-radius: 3px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 16px;\n font-weight: 600;\n font-style: normal;\n color: #871414;\n\n cursor: pointer;\n\n pointer-events: auto;\n\n background-color: transparent;\n}\n\n.dtn_hLksHXwRvJ0M59R_:hover {\n background-color: #cab8d99c;\n}\n\n.dtn_hLksHXwRvJ0M59R_:active {\n background-color: #aa8eba9e;\n}\n',""]);var a="dtn_hLksHXwRvJ0M59R_";const u=o},95:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,c:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.YyJ8eoEyIwbdyanehYmH {\n margin: 0px;\n\n border: none;\n\n padding: 4px 32px 4px 32px;\n border-radius: 2px;\n\n background-color: transparent;\n position: relative;\n isolation: isolate;\n\n font-family: "Open Sans", sans-serif;\n font-size: 12px;\n font-weight: 600;\n font-style: normal;\n color: white;\n\n cursor: pointer;\n\n pointer-events: auto;\n}\n\n.YyJ8eoEyIwbdyanehYmH::before {\n content: "";\n\n position: absolute;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n\n border-radius: 2px;\n background-color: #0d0d82;\n box-shadow: 0 3px 3px rgba(213, 213, 255, 0.53);\n\n z-index: -1;\n}\n\n.YyJ8eoEyIwbdyanehYmH:focus {\n outline: none;\n}\n\n.YyJ8eoEyIwbdyanehYmH:hover::before {\n transform: scale(1.05);\n transition: transform 0.1s;\n}\n\n.YyJ8eoEyIwbdyanehYmH:active::before {\n transform: scale(1);\n transition: transform 0s;\n}\n',""]);var a="YyJ8eoEyIwbdyanehYmH";const u=o},207:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>c,KI:()=>u,Qb:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.eqwd6LjNjVo7cbB2sslX {\n display: flex;\n flex-direction: column;\n gap: 19px;\n\n pointer-events: none;\n}\n\n.CecElEP3VTnkYzKHER5v {\n margin: 0px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 12px;\n font-weight: 500;\n font-style: normal;\n color: black;\n\n user-select: none;\n -webkit-user-select: none;\n\n pointer-events: none;\n}\n',""]);var a="eqwd6LjNjVo7cbB2sslX",u="CecElEP3VTnkYzKHER5v";const c=o},628:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>c,UJ:()=>u,_:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,"@import url(https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap);"]),o.push([t.id,".m9YNkzvR4YB3Euwu47z5 {\n position: absolute;\n left: 107px;\n top: 77px;\n\n width: 325px;\n height: 483px;\n\n background-color: #f3f3ff;\n backdrop-filter: blur(8px);\n -webkit-backdrop-filter: blur(8px);\n\n border: 1px solid #2b0744;\n border-radius: 15px;\n box-shadow: 0px 2px 16px rgba(0, 0, 0, 0.06);\n\n padding: 20px 20px 50px 32px;\n}\n\n.CvIMEhOXh2baupQ8m23e {\n margin: 24px 0px 0px 21px;\n\n display: flex;\n flex-direction: column;\n align-items: start;\n\n pointer-events: none;\n}\n",""]);var a="m9YNkzvR4YB3Euwu47z5",u="CvIMEhOXh2baupQ8m23e";const c=o},7:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,w:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.hv1igDaLbKyl3ENzZqbE {\n margin-top: 13px;\n margin-bottom: 0px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 26px;\n font-weight: 700;\n font-style: normal;\n color: black;\n\n user-select: none;\n -webkit-user-select: none;\n\n pointer-events: none;\n}\n',""]);var a="hv1igDaLbKyl3ENzZqbE";const u=o},61:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,P:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.PHeCZIT2KeDbY1BMQVCY {\n border: 1px solid #75758c;\n border-radius: 2px;\n\n outline: none;\n\n width: 81px;\n\n padding: 3px 6px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 12px;\n font-weight: 700;\n font-style: normal;\n color: black;\n\n pointer-events: auto;\n}\n\n.PHeCZIT2KeDbY1BMQVCY:hover {\n border-color: #0a0a0b;\n}\n\n.PHeCZIT2KeDbY1BMQVCY:focus {\n border-color: #0a0a0b;\n\n outline: none;\n}\n',""]);var a="PHeCZIT2KeDbY1BMQVCY";const u=o},713:(t,e,n)=>{"use strict";n.d(e,{A:()=>u,u:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.Ue7na3s040s6OHle84cz {\n font-family: "Open Sans", sans-serif;\n font-size: 12px;\n font-weight: 700;\n font-style: normal;\n color: black;\n\n user-select: none;\n -webkit-user-select: none;\n\n cursor: text;\n\n pointer-events: auto;\n}\n',""]);var a="Ue7na3s040s6OHle84cz";const u=o},314:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var o={};if(r)for(var a=0;a<this.length;a++){var u=this[a][0];null!=u&&(o[u]=!0)}for(var c=0;c<t.length;c++){var h=[].concat(t[c]);r&&o[h[0]]||(void 0!==s&&(void 0===h[5]||(h[1]="@layer".concat(h[5].length>0?" ".concat(h[5]):""," {").concat(h[1],"}")),h[5]=s),n&&(h[2]?(h[1]="@media ".concat(h[2]," {").concat(h[1],"}"),h[2]=n):h[2]=n),i&&(h[4]?(h[1]="@supports (".concat(h[4],") {").concat(h[1],"}"),h[4]=i):h[4]="".concat(i)),e.push(h))}},e}},601:t=>{"use strict";t.exports=function(t){return t[1]}},72:t=>{"use strict";var e=[];function n(t){for(var n=-1,r=0;r<e.length;r++)if(e[r].identifier===t){n=r;break}return n}function r(t,r){for(var s={},o=[],a=0;a<t.length;a++){var u=t[a],c=r.base?u[0]+r.base:u[0],h=s[c]||0,l="".concat(c," ").concat(h);s[c]=h+1;var d=n(l),f={css:u[1],media:u[2],sourceMap:u[3],supports:u[4],layer:u[5]};if(-1!==d)e[d].references++,e[d].updater(f);else{var p=i(f,r);r.byIndex=a,e.splice(a,0,{identifier:l,updater:p,references:1})}o.push(l)}return o}function i(t,e){var n=e.domAPI(e);return n.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,i){var s=r(t=t||[],i=i||{});return function(t){t=t||[];for(var o=0;o<s.length;o++){var a=n(s[o]);e[a].references--}for(var u=r(t,i),c=0;c<s.length;c++){var h=n(s[c]);0===e[h].references&&(e[h].updater(),e.splice(h,1))}s=u}}},659:t=>{"use strict";var e={};t.exports=function(t,n){var r=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},540:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},56:(t,e,n)=>{"use strict";t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},825:t=>{"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var s=n.sourceMap;s&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleTagTransform(r,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},113:t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={id:r,exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nc=void 0;var r={};return(()=>{"use strict";n.r(r),n.d(r,{ExportForm:()=>q});var t=n(72),e=n.n(t),i=n(825),s=n.n(i),o=n(659),a=n.n(o),u=n(56),c=n.n(u),h=n(540),l=n.n(h),d=n(113),f=n.n(d),p=n(628),m={};m.styleTagTransform=f(),m.setAttributes=c(),m.insert=a().bind(null,"head"),m.domAPI=s(),m.insertStyleElement=l(),e()(p.Ay,m),p.Ay&&p.Ay.locals&&p.Ay.locals;var g=n(7),y={};y.styleTagTransform=f(),y.setAttributes=c(),y.insert=a().bind(null,"head"),y.domAPI=s(),y.insertStyleElement=l(),e()(g.A,y),g.A&&g.A.locals&&g.A.locals;var b=n(139),v=n(207),w={};function x(t){let e=document.createElement("span");return e.textContent=t,e.style.fontWeight="700",e}w.styleTagTransform=f(),w.setAttributes=c(),w.insert=a().bind(null,"head"),w.domAPI=s(),w.insertStyleElement=l(),e()(v.Ay,w),v.Ay&&v.Ay.locals&&v.Ay.locals;var S=n(61),_={};_.styleTagTransform=f(),_.setAttributes=c(),_.insert=a().bind(null,"head"),_.domAPI=s(),_.insertStyleElement=l(),e()(S.A,_),S.A&&S.A.locals&&S.A.locals;var P=n(854),M=n(713),N={};N.styleTagTransform=f(),N.setAttributes=c(),N.insert=a().bind(null,"head"),N.domAPI=s(),N.insertStyleElement=l(),e()(M.A,N),M.A&&M.A.locals&&M.A.locals;var O=n(95),C={};C.styleTagTransform=f(),C.setAttributes=c(),C.insert=a().bind(null,"head"),C.domAPI=s(),C.insertStyleElement=l(),e()(O.A,C),O.A&&O.A.locals&&O.A.locals;var E=n(882),T={};T.styleTagTransform=f(),T.setAttributes=c(),T.insert=a().bind(null,"head"),T.domAPI=s(),T.insertStyleElement=l(),e()(E.A,T),E.A&&E.A.locals&&E.A.locals;var A,j,k,D,L,B,I=n(106),F=n(726),R=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)},V=function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n};class q{constructor(t){A.add(this),this.targetApp=t,j.set(this,document.createElement("div")),k.set(this,void 0),D.set(this,1),L.set(this,void 0),R(this,j,"f").classList.add(p._),R(this,j,"f").append(function(){let t=document.createElement("p");return t.classList.add(g.w),t.textContent="Export",t}());let e=document.createElement("div");e.classList.add(p.UJ),R(this,j,"f").append(e),e.append(function(){let t=document.createElement("div");t.classList.add(v.Qb);let e=x("SVG"),n=x("Adobe Illustrator"),r=x("Inkscape"),i=document.createElement("p");i.classList.add(v.KI),i.append("Export the drawing as an ",e," image."),t.append(i);let s=document.createElement("p");return s.classList.add(v.KI),s.append("SVG images can be opened, edited further and converted to other image formats in applications such as ",n," and ",r,"."),t.append(s),t}()),V(this,k,function(){let t=function(){let t=document.createElement("input");return t.type="text",t.classList.add(S.P),t}();t.value="1";let e="1";t.addEventListener("focus",(()=>e=t.value));let n=()=>{let n=Number.parseFloat(t.value);(0,P.isPositiveFiniteNumber)(n)||(t.value=e)};return t.addEventListener("blur",n),t.addEventListener("keyup",(t=>{"enter"==t.key.toLowerCase()&&n()})),t}(),"f"),R(this,k,"f").value=`${R(this,D,"f")}`;let n=function(t,e){let n=document.createElement("span");n.append("Scaling"),n.style.paddingLeft="8px";let r=document.createElement("label");return r.classList.add(M.u),r.append(e,n),r}(0,R(this,k,"f"));n.style.marginTop="29px",e.append(n);let r=function(){let t=function(){let t=document.createElement("button");return t.classList.add(O.c),t}();return t.textContent="Export",t.style.marginTop="36px",t}();r.addEventListener("click",(()=>R(this,A,"m",B).call(this))),e.append(r);let i=function(){let t=document.createElement("button");return t.classList.add(E._),t.textContent="Close",t}();i.addEventListener("click",(()=>this.remove())),R(this,j,"f").append(i),V(this,L,new b.DragTranslater(R(this,j,"f")),"f")}appendTo(t){R(this,L,"f").untranslate(),t.appendChild(R(this,j,"f"))}remove(){R(this,j,"f").remove()}}j=new WeakMap,k=new WeakMap,D=new WeakMap,L=new WeakMap,A=new WeakSet,B=function(){let t=this.targetApp.drawing.domNode.cloneNode(!0),e=document.createElement("div");e.style.position="fixed",e.style.height="0px",document.body.append(e),e.append(t);let n=Number.parseFloat(R(this,k,"f").value);(0,P.isPositiveFiniteNumber)(n)||(n=R(this,D,"f")),new F.Scaling(t).set(n);let r=document.title?document.title:"Drawing";new I.DownloadableFile(t.outerHTML).downloadAs(r+".svg",{type:"text/plain"}),e.remove()}})(),r})(),t.exports=e()},725:function(t){t.exports=(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>d,average:()=>r,degrees:()=>m,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,radians:()=>g,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>f,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>p,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return Math.abs(t-e)<=n}function f(t){i(t),t.reverse()}function p(t){var e=o(t);return e.reverse(),e}function m(t){return t*(180/Math.PI)}function g(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function c(t){return"object"==typeof t&&null!==t}function h(t){return Array.isArray(t)}return t.r(e),t.d(e,{isArray:()=>h,isFiniteNumber:()=>r,isNonFiniteNumber:()=>i,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>c,isNullish:()=>u,isNumber:()=>n,isPositiveFiniteNumber:()=>s,isString:()=>a}),e})()},30:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.pow(Math.pow(t.x,2)+Math.pow(t.y,2),.5)}function r(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>r,magnitude:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{areWithin:()=>a,centroid:()=>f,deepCopy:()=>s,direction:()=>l,displaced:()=>c,displacement:()=>u,distance:()=>o,isFinitePoint:()=>i,isPoint:()=>e,midpoint:()=>p});var t=n(854);function e(e){return(0,t.isNonNullObject)(e)&&(0,t.isNumber)(e.x)&&(0,t.isNumber)(e.y)}function i(n){return e(n)&&(0,t.isFiniteNumber)(n.x)&&(0,t.isFiniteNumber)(n.y)}function s(t){return{x:t.x,y:t.y}}function o(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.pow(Math.pow(n,2)+Math.pow(r,2),.5)}function a(t,e,n){return o(t,e)<=n}function u(t,e){return{x:e.x-t.x,y:e.y-t.y}}function c(t,e){return{x:t.x+e.x,y:t.y+e.y}}var h=n(30);function l(t,e){return(0,h.direction)(u(t,e))}var d=n(986);function f(t){return{x:(0,d.mean)(t.map((function(t){return t.x}))),y:(0,d.mean)(t.map((function(t){return t.y})))}}function p(t,e){return f([t,e])}})(),r})()},925:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{HorizontalScrollbar:()=>r,HorizontalScrollbarThumb:()=>n,Scrollbars:()=>o,VerticalScrollbar:()=>s,VerticalScrollbarThumb:()=>i});class n{constructor(t){this.targetElement=t}get leftX(){return this.targetElement.scrollLeft}set leftX(t){this.targetElement.scrollLeft=t}get length(){let t=this.targetElement.scrollLeft;this.targetElement.scrollLeft=this.targetElement.scrollWidth;let e=this.targetElement.scrollWidth-this.targetElement.scrollLeft;return this.targetElement.scrollLeft=t,e}get rightX(){return this.leftX+this.length}set rightX(t){this.targetElement.scrollLeft=t-this.length}get centerX(){return(this.leftX+this.rightX)/2}set centerX(t){this.targetElement.scrollLeft=t-this.length/2}}class r{constructor(t){this.targetElement=t,this.thumb=new n(t)}}class i{constructor(t){this.targetElement=t}get topY(){return this.targetElement.scrollTop}set topY(t){this.targetElement.scrollTop=t}get length(){let t=this.targetElement.scrollTop;this.targetElement.scrollTop=this.targetElement.scrollHeight;let e=this.targetElement.scrollHeight-this.targetElement.scrollTop;return this.targetElement.scrollTop=t,e}get bottomY(){return this.topY+this.length}set bottomY(t){this.targetElement.scrollTop=t-this.length}get centerY(){return this.targetElement.scrollTop+this.length/2}set centerY(t){this.targetElement.scrollTop=t-this.length/2}}class s{constructor(t){this.targetElement=t,this.thumb=new i(t)}}class o{constructor(t){this.targetElement=t}center(){this.targetElement.scrollLeft=this.targetElement.scrollWidth,this.targetElement.scrollTop=this.targetElement.scrollHeight;let t=this.targetElement.scrollWidth-this.targetElement.scrollLeft,e=this.targetElement.scrollHeight-this.targetElement.scrollTop;this.targetElement.scrollLeft=this.targetElement.scrollWidth/2-t/2,this.targetElement.scrollTop=this.targetElement.scrollHeight/2-e/2}}return e})(),t.exports=e()},31:function(t){var e;e=()=>(()=>{var t={661:function(t){var e;e=()=>(()=>{var t={127:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>h,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},369:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>h,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function c(t){return"object"==typeof t&&null!==t}function h(t){return Array.isArray(t)}function l(t){return h(t)&&t.every(n)}function d(t){return h(t)&&t.every(r)}function f(t){return h(t)&&t.every(i)}function p(t){return h(t)&&t.every(a)}return t.r(e),t.d(e,{isArray:()=>h,isFiniteNumber:()=>r,isFiniteNumbersArray:()=>d,isNonFiniteNumber:()=>i,isNonFiniteNumbersArray:()=>f,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>c,isNullish:()=>u,isNumber:()=>n,isNumbersArray:()=>l,isPositiveFiniteNumber:()=>s,isString:()=>a,isStringsArray:()=>p}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Linkers:()=>g,Stems:()=>m,areConflicting:()=>c,areCrossing:()=>d,areEqual:()=>a,areKnotless:()=>l,areStacked:()=>u,deepCopy:()=>i,knotless:()=>p,mountainPlotTraversal:()=>y,parseDotBracket:()=>b,sorted:()=>o});var t=n(854),e=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function i(n){return(0,t.isNumbersArray)(n)?e([],n,!0):n.map((function(t){return e([],t,!0)}))}var s=n(986);function o(t){var e=i(t);return e.forEach(s.sortNumbers),e.sort((function(t,e){return t[0]-e[0]})),e}function a(t,e){var n=i(t),r=i(e);return(0,s.sortNumbers)(n),(0,s.sortNumbers)(r),[0,1].every((function(t){return n[t]==r[t]}))}function u(t,e){var n=o([t,e]);return n[0][0]==n[1][0]-1&&n[0][1]==n[1][1]+1}function c(t,e){return(0,s.min)(t)==(0,s.min)(e)&&(0,s.max)(t)!=(0,s.max)(e)||(0,s.min)(t)!=(0,s.min)(e)&&(0,s.max)(t)==(0,s.max)(e)}function h(t){if(0==t.length)return[];for(var e=[],n=0;n<(0,s.max)(t.flat());n++)e.push(void 0);return t.forEach((function(t){e[t[0]-1]=t[1],e[t[1]-1]=t[0]})),e}function l(t){var e=h(t),n=[],r=!1;return e.forEach((function(t,e){var i=e+1;null==t||(i<t?n.push(i):i==t||n.pop()!=t&&(r=!0))})),!r}function d(t,e){return!l([t,e])}var f=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function p(t){var e=[],n=i(t);return n.sort((function(t,e){return Math.abs(t[0]-t[1])-Math.abs(e[0]-e[1])})),n.forEach((function(t){l(f(f([],e,!0),[t],!1))&&e.push(t)})),e}var m=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=this.targetStructure[1];if(0==t.length)return[];var e=o(t),n=[],r=[];return e.forEach((function(t){var e=0==r.length?null:r[r.length-1];!e||u(e,t)?r.push(t):(n.push(r),r=[t])})),n.push(r),n},t}(),g=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=(new(m.bind.apply(m,function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}([void 0],this.targetStructure,!1)))).get().flatMap((function(t){return[t.map(s.min),t.map(s.max)]}));t.forEach(s.sortNumbers),t.sort((function(t,e){return(0,s.min)(t)-(0,s.min)(e)}));for(var e=[],n=t.shift(),r=t.shift();n&&r;){for(var i=[],o=(0,s.max)(n),a=(0,s.min)(r),u=o;u<=a;u++)i.push(u);e.push(i),n=r,r=t.shift()}return e},t}();function y(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[0],r=t[1],i=h(r);if(!l(r))throw new Error("Pseudoknot(s) encountered.");var s=[],o=0;return n.forEach((function(t,e){var n=e+1,r=i[e];null==r?s.push(o):n<r?(s.push(o),o++):(n==r||o--,s.push(o))})),s}function b(t){var e=t.split(""),n=[".","(",")"];e.forEach((function(t){if(!n.includes(t))throw new Error('Unrecognized character in dot-bracket notation: "'.concat(t,'".'))}));var r=[],i=[];if(e.forEach((function(t,e){var n=e+1;if("("==t)i.push(n);else if(")"==t){var s=i.pop();if("number"!=typeof s)throw new Error("Unmatched downstream partner(s) in dot-bracket notation.");r.push([s,n])}})),i.length>0)throw new Error("Unmatched upstream partner(s) in dot-bracket notation.");return o(r)}})(),r})(),t.exports=e()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{FirstPairedBase:()=>e,LastPairedBase:()=>s,LeadingDanglingBases:()=>o,Linkers:()=>h,PositionPairs:()=>t,Stems:()=>c,TrailingDanglingBases:()=>a,consecutivePairs:()=>f,knotless:()=>l,parseDotBracket:()=>d});class t{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];return this.targetStructure[1].map((e=>[t.indexOf(e[0])+1,t.indexOf(e[1])+1]))}}class e{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0],e=this.targetStructure[1];if(0==e.length)throw new Error("There are no paired bases.");let n=e.flat(),r=t.findIndex((t=>n.includes(t)));if(r<0)throw new Error("No paired bases present in sequence.");return t[r]}}var i=n(986);class s{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0],e=this.targetStructure[1];if(0==e.length)throw new Error("There are no paired bases.");let n=e.flat().map((e=>t.indexOf(e)));if((0,i.max)(n)<0)throw new Error("No paired bases present in sequence.");return t[(0,i.max)(n)]}}class o{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];if(0==this.targetStructure[1].length)throw new Error("There are no paired bases.");let n=new e(...this.targetStructure).get(),r=t.indexOf(n);if(r<0)throw new Error("No paired bases present in sequence.");return t.slice(0,r)}}class a{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];if(0==this.targetStructure[1].length)throw new Error("There are no paired bases.");let e=new s(...this.targetStructure).get(),n=t.indexOf(e);if(n<0)throw new Error("No paired bases present in sequence.");return t.slice(n+1)}}var u=n(369);class c{constructor(...t){this.targetStructure=t}get(){let e=this.targetStructure[0],n=new t(...this.targetStructure).get();return new u.Stems(e,n).get().map((t=>t.map((t=>[e[t[0]-1],e[t[1]-1]]))))}}class h{constructor(...t){this.targetStructure=t}get(){let e=this.targetStructure[0],n=new t(...this.targetStructure).get();return new u.Linkers(e,n).get().map((t=>t.map((t=>e[t-1]))))}}function l(...e){let[n,r]=e,i=new t(...e).get();(0,u.areKnotless)(i)||(i=(0,u.knotless)(i));let s=i.map((t=>[n[t[0]-1],n[t[1]-1]]));return[[...n],s]}function d(t,e){if(e.length>t.length)throw new Error("Dot-bracket notation is longer than the sequence.");return[...(0,u.parseDotBracket)(e)].map((e=>{let n=e[0],r=e[1];return[t[n-1],t[r-1]]}))}function f(t){return t.length<2?[]:t.slice(0,-1).map(((e,n)=>[t[n],t[n+1]]))}})(),r})(),t.exports=e()},173:function(t){var e;e=()=>(()=>{var t={422:function(t){t.exports=(()=>{var t={138:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}return t.r(e),t.d(e,{average:()=>r,mean:()=>r,sum:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";function t(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.pow(Math.pow(n,2)+Math.pow(r,2),.5)}function e(t,e){return{x:e.x-t.x,y:e.y-t.y}}n.r(r),n.d(r,{centroid:()=>s,displacement:()=>e,distance:()=>t,midpoint:()=>o});var i=n(138);function s(t){return{x:(0,i.mean)(t.map((function(t){return t.x}))),y:(0,i.mean)(t.map((function(t){return t.y})))}}function o(t,e){return s([t,e])}})(),r})()},872:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{CircularSegment:()=>a,Semicircle:()=>e});var t=n(422),e=function(){function e(t){this.chord=t}return Object.defineProperty(e.prototype,"chordLength",{get:function(){return(0,t.distance)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcLength",{get:function(){return Math.PI*this.chordLength/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcAngle",{get:function(){return Math.PI},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleRadius",{get:function(){return this.chordLength/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleDiameter",{get:function(){return 2*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCircumference",{get:function(){return 2*Math.PI*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCenterPoint",{get:function(){return(0,t.midpoint)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),e}(),i=n(872),s=function(){function e(e,n){this.chord=e,this.moreProps=n;var r=n.arcLength,i=(0,t.distance)(e[0],e[1]);if(r<=i)throw new Error("Arc length is too small.");if(r>=Math.PI*i/2)throw new Error("Arc length is too big.");for(var s=Math.PI/2,o=0;o<20;o++)s-=(r/i*Math.sin(s)-s)/(r/i*Math.cos(s)-1);this.arcAngle=2*s}return Object.defineProperty(e.prototype,"chordLength",{get:function(){return(0,t.distance)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcLength",{get:function(){return this.moreProps.arcLength},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleRadius",{get:function(){return this.arcLength/this.arcAngle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleDiameter",{get:function(){return 2*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCircumference",{get:function(){return 2*Math.PI*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCenterPoint",{get:function(){var e=(0,i.direction)((0,t.displacement)(this.chord[0],this.chord[1]));e+=(Math.PI-this.arcAngle)/2;var n=this.parentCircleRadius;return{x:this.chord[0].x+n*Math.cos(e),y:this.chord[0].y+n*Math.sin(e)}},enumerable:!1,configurable:!0}),e}(),o=function(){function e(e,n){this.chord=e,this.moreProps=n;var r=n.arcLength,i=(0,t.distance)(e[0],e[1]);if(0==i)throw new Error("Chord length cannot be zero.");if(r<=Math.PI*i/2)throw new Error("Arc length is too small.");for(var s=Math.PI,o=0;o<20;o++)s-=(r/i*Math.sin(Math.PI-s)-s)/(-r/i*Math.cos(Math.PI-s)-1);this.arcAngle=2*s}return Object.defineProperty(e.prototype,"chordLength",{get:function(){return(0,t.distance)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcLength",{get:function(){return this.moreProps.arcLength},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleRadius",{get:function(){return this.arcLength/this.arcAngle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleDiameter",{get:function(){return 2*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCircumference",{get:function(){return 2*Math.PI*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCenterPoint",{get:function(){var e=(0,i.direction)((0,t.displacement)(this.chord[0],this.chord[1]));e-=(this.arcAngle-Math.PI)/2;var n=this.parentCircleRadius;return{x:this.chord[0].x+n*Math.cos(e),y:this.chord[0].y+n*Math.sin(e)}},enumerable:!1,configurable:!0}),e}(),a=function(){function n(n,r){this.chord=n,this.moreProps=r;var i=r.arcLength,a=(0,t.distance)(n[0],n[1]);if(a>0&&i<=a)throw new Error("Arc length is too small.");var u=a<.001&&i<.001,c=Math.PI*a/2,h=Math.abs(i-c)<.001;this.wrappedCircularSegment=u||h?new e(n):i<c?new s(n,{arcLength:i}):new o(n,{arcLength:i})}return Object.defineProperty(n.prototype,"chordLength",{get:function(){return this.wrappedCircularSegment.chordLength},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"arcLength",{get:function(){return this.moreProps.arcLength},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"arcAngle",{get:function(){return this.wrappedCircularSegment.arcAngle},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleRadius",{get:function(){return this.wrappedCircularSegment.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleDiameter",{get:function(){return this.wrappedCircularSegment.parentCircleDiameter},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleCircumference",{get:function(){return this.wrappedCircularSegment.parentCircleCircumference},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleCenterPoint",{get:function(){return this.wrappedCircularSegment.parentCircleCenterPoint},enumerable:!1,configurable:!0}),n}()})(),r})(),t.exports=e()},986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>h,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},456:function(t){var e;e=()=>(()=>{var t={277:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{Vector:()=>n});class n{static matching(t){return new n(t.x,t.y)}constructor(t,e){this.x=t,this.y=e}[Symbol.iterator](){return[this.x,this.y].values()}get magnitude(){return Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2))}get direction(){return Math.atan2(this.y,this.x)}}return e})(),t.exports=e()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Point:()=>e,RelativePoint:()=>h});var t=n(277);class e{static matching(t){return new e(t.x,t.y)}constructor(t,e){this.x=t,this.y=e}[Symbol.iterator](){return[this.x,this.y].values()}displacementTo(e){return new t.Vector(e.x-this.x,e.y-this.y)}displacementFrom(e){return new t.Vector(this.x-e.x,this.y-e.y)}distanceTo(t){return this.displacementTo(t).magnitude}distanceFrom(t){return this.distanceTo(t)}directionTo(t){return this.displacementTo(t).direction}directionFrom(t){return this.displacementFrom(t).direction}}var i,s,o,a,u,c=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class h{constructor(e){i.add(this),s.set(this,void 0),o.set(this,new t.Vector(0,0)),a.set(this,{move:[]}),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,s,e),e.addEventListener("move",(()=>c(this,i,"m",u).call(this,"move")))}get x(){return c(this,s,"f").x+c(this,o,"f").x}set x(t){c(this,o,"f").x=t-c(this,s,"f").x,c(this,i,"m",u).call(this,"move")}get y(){return c(this,s,"f").y+c(this,o,"f").y}set y(t){c(this,o,"f").y=t-c(this,s,"f").y,c(this,i,"m",u).call(this,"move")}addEventListener(t,e){c(this,a,"f")[t].push(e)}removeEventListener(t,e){c(this,a,"f")[t]=c(this,a,"f")[t].filter((t=>t!==e))}}s=new WeakMap,o=new WeakMap,a=new WeakMap,i=new WeakSet,u=function(t){c(this,a,"f")[t].forEach((t=>t()))}})(),r})(),t.exports=e()},725:function(t){t.exports=(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>d,average:()=>r,degrees:()=>m,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,radians:()=>g,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>f,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>p,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return Math.abs(t-e)<=n}function f(t){i(t),t.reverse()}function p(t){var e=o(t);return e.reverse(),e}function m(t){return t*(180/Math.PI)}function g(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function c(t){return"object"==typeof t&&null!==t}function h(t){return Array.isArray(t)}return t.r(e),t.d(e,{isArray:()=>h,isFiniteNumber:()=>r,isNonFiniteNumber:()=>i,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>c,isNullish:()=>u,isNumber:()=>n,isPositiveFiniteNumber:()=>s,isString:()=>a}),e})()},30:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.pow(Math.pow(t.x,2)+Math.pow(t.y,2),.5)}function r(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>r,magnitude:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{areWithin:()=>a,centroid:()=>f,deepCopy:()=>s,direction:()=>l,displaced:()=>c,displacement:()=>u,distance:()=>o,isFinitePoint:()=>i,isPoint:()=>e,midpoint:()=>p});var t=n(854);function e(e){return(0,t.isNonNullObject)(e)&&(0,t.isNumber)(e.x)&&(0,t.isNumber)(e.y)}function i(n){return e(n)&&(0,t.isFiniteNumber)(n.x)&&(0,t.isFiniteNumber)(n.y)}function s(t){return{x:t.x,y:t.y}}function o(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.pow(Math.pow(n,2)+Math.pow(r,2),.5)}function a(t,e,n){return o(t,e)<=n}function u(t,e){return{x:e.x-t.x,y:e.y-t.y}}function c(t,e){return{x:t.x+e.x,y:t.y+e.y}}var h=n(30);function l(t,e){return(0,h.direction)(u(t,e))}var d=n(986);function f(t){return{x:(0,d.mean)(t.map((function(t){return t.x}))),y:(0,d.mean)(t.map((function(t){return t.y})))}}function p(t,e){return f([t,e])}})(),r})()},369:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>h,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function c(t){return"object"==typeof t&&null!==t}function h(t){return Array.isArray(t)}function l(t){return h(t)&&t.every(n)}function d(t){return h(t)&&t.every(r)}function f(t){return h(t)&&t.every(i)}function p(t){return h(t)&&t.every(a)}return t.r(e),t.d(e,{isArray:()=>h,isFiniteNumber:()=>r,isFiniteNumbersArray:()=>d,isNonFiniteNumber:()=>i,isNonFiniteNumbersArray:()=>f,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>c,isNullish:()=>u,isNumber:()=>n,isNumbersArray:()=>l,isPositiveFiniteNumber:()=>s,isString:()=>a,isStringsArray:()=>p}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Linkers:()=>g,Stems:()=>m,areConflicting:()=>c,areCrossing:()=>d,areEqual:()=>a,areKnotless:()=>l,areStacked:()=>u,deepCopy:()=>i,knotless:()=>p,mountainPlotTraversal:()=>y,parseDotBracket:()=>b,sorted:()=>o});var t=n(854),e=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function i(n){return(0,t.isNumbersArray)(n)?e([],n,!0):n.map((function(t){return e([],t,!0)}))}var s=n(986);function o(t){var e=i(t);return e.forEach(s.sortNumbers),e.sort((function(t,e){return t[0]-e[0]})),e}function a(t,e){var n=i(t),r=i(e);return(0,s.sortNumbers)(n),(0,s.sortNumbers)(r),[0,1].every((function(t){return n[t]==r[t]}))}function u(t,e){var n=o([t,e]);return n[0][0]==n[1][0]-1&&n[0][1]==n[1][1]+1}function c(t,e){return(0,s.min)(t)==(0,s.min)(e)&&(0,s.max)(t)!=(0,s.max)(e)||(0,s.min)(t)!=(0,s.min)(e)&&(0,s.max)(t)==(0,s.max)(e)}function h(t){if(0==t.length)return[];for(var e=[],n=0;n<(0,s.max)(t.flat());n++)e.push(void 0);return t.forEach((function(t){e[t[0]-1]=t[1],e[t[1]-1]=t[0]})),e}function l(t){var e=h(t),n=[],r=!1;return e.forEach((function(t,e){var i=e+1;null==t||(i<t?n.push(i):i==t||n.pop()!=t&&(r=!0))})),!r}function d(t,e){return!l([t,e])}var f=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function p(t){var e=[],n=i(t);return n.sort((function(t,e){return Math.abs(t[0]-t[1])-Math.abs(e[0]-e[1])})),n.forEach((function(t){l(f(f([],e,!0),[t],!1))&&e.push(t)})),e}var m=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=this.targetStructure[1];if(0==t.length)return[];var e=o(t),n=[],r=[];return e.forEach((function(t){var e=0==r.length?null:r[r.length-1];!e||u(e,t)?r.push(t):(n.push(r),r=[t])})),n.push(r),n},t}(),g=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=(new(m.bind.apply(m,function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}([void 0],this.targetStructure,!1)))).get().flatMap((function(t){return[t.map(s.min),t.map(s.max)]}));t.forEach(s.sortNumbers),t.sort((function(t,e){return(0,s.min)(t)-(0,s.min)(e)}));for(var e=[],n=t.shift(),r=t.shift();n&&r;){for(var i=[],o=(0,s.max)(n),a=(0,s.min)(r),u=o;u<=a;u++)i.push(u);e.push(i),n=r,r=t.shift()}return e},t}();function y(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[0],r=t[1],i=h(r);if(!l(r))throw new Error("Pseudoknot(s) encountered.");var s=[],o=0;return n.forEach((function(t,e){var n=e+1,r=i[e];null==r?s.push(o):n<r?(s.push(o),o++):(n==r||o--,s.push(o))})),s}function b(t){var e=t.split(""),n=[".","(",")"];e.forEach((function(t){if(!n.includes(t))throw new Error('Unrecognized character in dot-bracket notation: "'.concat(t,'".'))}));var r=[],i=[];if(e.forEach((function(t,e){var n=e+1;if("("==t)i.push(n);else if(")"==t){var s=i.pop();if("number"!=typeof s)throw new Error("Unmatched downstream partner(s) in dot-bracket notation.");r.push([s,n])}})),i.length>0)throw new Error("Unmatched upstream partner(s) in dot-bracket notation.");return o(r)}})(),r})(),t.exports=e()},30:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.pow(Math.pow(t.x,2)+Math.pow(t.y,2),.5)}function r(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>r,magnitude:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Centroid:()=>s,Direction:()=>f,MaxCenterX:()=>u,MaxCenterY:()=>h,MinCenterX:()=>a,MinCenterY:()=>c,NucleobaseMock:()=>t,arrange:()=>N,circularize:()=>x,flipSelfX:()=>g,flipSelfY:()=>y,flipX:()=>p,flipY:()=>m,linearize:()=>b,radialize:()=>F,rotate:()=>d,round:()=>_,shift:()=>e,stemmify:()=>w,straighten:()=>v});class t{constructor(t){this.props=t}getCenterPoint(){return this.props.centerPoint}setCenterPoint(t){this.props.centerPoint=t}}function e(t,e){t.forEach((t=>{let n=t.getCenterPoint();t.setCenterPoint({x:n.x+e.x,y:n.y+e.y})}))}var i=n(725);class s{constructor(t){this.targetBases=t}get(){let t=this.targetBases.map((t=>t.getCenterPoint()));return(0,i.centroid)(t)}set(t){let n=this.get(),r=(0,i.displacement)(n,t);e(this.targetBases,r)}}var o=n(986);class a{constructor(t){this.targetBases=t}get(){return(0,o.min)(this.targetBases.map((t=>t.getCenterPoint().x)))}set(t){let n=this.get();e(this.targetBases,{x:t-n,y:0})}}class u{constructor(t){this.targetBases=t}get(){return(0,o.max)(this.targetBases.map((t=>t.getCenterPoint().x)))}set(t){let n=this.get();e(this.targetBases,{x:t-n,y:0})}}class c{constructor(t){this.targetBases=t}get(){return(0,o.min)(this.targetBases.map((t=>t.getCenterPoint().y)))}set(t){let n=this.get();e(this.targetBases,{x:0,y:t-n})}}class h{constructor(t){this.targetBases=t}get(){return(0,o.max)(this.targetBases.map((t=>t.getCenterPoint().y)))}set(t){let n=this.get();e(this.targetBases,{x:0,y:t-n})}}var l=n(30);function d(t,e){if(t.length<2)return;let n=t[0],r=t[t.length-1],s=(0,i.midpoint)(n.getCenterPoint(),r.getCenterPoint());t.forEach((t=>{let n=t.getCenterPoint(),r=(0,i.distance)(s,n),o=(0,l.direction)((0,i.displacement)(s,n));o+=e,t.setCenterPoint({x:s.x+r*Math.cos(o),y:s.y+r*Math.sin(o)})}))}class f{constructor(t){this.targetBases=t}get(){if(this.targetBases.length<2)return 0;let t=this.targetBases[0],e=this.targetBases[this.targetBases.length-1];return(0,l.direction)((0,i.displacement)(t.getCenterPoint(),e.getCenterPoint()))}set(t){let e=t-this.get();d(this.targetBases,e)}}function p(t){let e=new s(t).get().y;t.forEach((t=>{let n=t.getCenterPoint(),r=n.y-e;t.setCenterPoint({x:n.x,y:e-r})}))}function m(t){let e=new s(t).get().x;t.forEach((t=>{let n=t.getCenterPoint(),r=n.x-e;t.setCenterPoint({x:e-r,y:n.y})}))}function g(t){if(0==t.length)return;let n=t[0],{x:r,y:s}=n.getCenterPoint(),o={x:r,y:s},a=new f(t).get();d(t,-a),p(t),d(t,a),e(t,(0,i.displacement)(n.getCenterPoint(),o))}function y(t){let e=new s(t),{x:n,y:r}=e.get(),i=n,o=r,a=new f(t).get();d(t,-a),m(t),d(t,a),e.set({x:i,y:o})}function b(t,e){let{spacing:n}=e;if(t.length<2)return;let r=new f(t),i=r.get(),o=new s(t),{x:a,y:u}=o.get(),c={x:a,y:u};t.forEach(((t,e)=>{t.setCenterPoint({x:e*n,y:0})})),r.set(i),o.set(c)}function v(t){if(t.length<3)return;let e=t[0],n=t[t.length-1],r=[e.getCenterPoint(),n.getCenterPoint()],s=(0,i.distance)(r[0],r[1]),o=(0,l.direction)((0,i.displacement)(r[0],r[1])),a=s/(t.length-1),u=a*Math.cos(o),c=a*Math.sin(o),{x:h,y:d}=r[0];t.forEach((t=>{t.setCenterPoint({x:h,y:d}),h+=u,d+=c}))}function w(t,n){let{basePairLength:r,basePairSpacing:o}=n;if(t.length<2)return;let a=Math.ceil(t.length/2),u=t.slice(0,a),c=t.slice(a),h=new s(t),{x:l,y:p}=h.get(),m={x:l,y:p},g=new f(t).get();b(u,{spacing:o}),b(c,{spacing:o}),new f(u).set(-Math.PI/2),new f(c).set(Math.PI/2);let y=t[0],v=t[t.length-1];e(u,(0,i.displacement)(y.getCenterPoint(),{x:0,y:0})),e(c,(0,i.displacement)(v.getCenterPoint(),{x:r,y:0})),d(t,g),h.set(m)}function x(t,e){let{spacing:n,terminiGap:r}=e;if(t.length<2)return;let i=new s(t),{x:o,y:a}=i.get(),u=o,c=a,h=new f(t).get(),l=n*(t.length-1);l+=r,Math.abs(l)<1e-5&&(l=1e-5);let p=l/(2*Math.PI),m=Math.PI/2+2*Math.PI*(.5*r/l);t.forEach(((t,e)=>{let r=m+2*Math.PI*(e*n)/l;t.setCenterPoint({x:p*Math.cos(r),y:p*Math.sin(r)})})),d(t,h),i.set({x:u,y:c})}var S=n(173);function _(t,n){let{spacing:r}=n;if(t.length<3)return;let s=t[0],o=t[t.length-1],a=[s.getCenterPoint(),o.getCenterPoint()],u=(0,i.distance)(a[0],a[1]),c=r*(t.length-1);if(c-u<.001)return void v(t);if(u<.001){let{x:n,y:o}=s.getCenterPoint();return x(t,{spacing:r,terminiGap:u}),void e(t,(0,i.displacement)(s.getCenterPoint(),{x:n,y:o}))}let h=new S.CircularSegment(a,{arcLength:c}),d=h.parentCircleCenterPoint,f=h.parentCircleRadius,p=(0,l.direction)((0,i.displacement)(d,s.getCenterPoint())),m=h.arcAngle/(t.length-1);t.forEach((t=>{t.setCenterPoint({x:d.x+f*Math.cos(p),y:d.y+f*Math.sin(p)}),p+=m}))}var P=n(127),M=n(369);function N(t,n,r){var a,u,c;let{spacing:h}=r,l=null!==(a=r.basePairSpacing)&&void 0!==a?a:h,d=null!==(u=r.hairpinLoopSpacing)&&void 0!==u?u:h,p=null!==(c=r.terminiGap)&&void 0!==c?c:h,{x:m,y:g}=new s(t).get(),y={x:m,y:g},b=new f(t).get();[,n]=(0,P.knotless)(t,n);let v=new P.PositionPairs(t,n).get(),S=(0,M.mountainPlotTraversal)(t,v),N=t.filter(((t,e)=>0==S[e]));x(N,{spacing:h,terminiGap:p});let O=new P.Stems(t,n).get(),C=new Set(N),E=O.filter((t=>C.has(t[0][0]))),T=n=>{let r=n[0],{x:a,y:u}=new s(r).get(),c={x:a,y:u},p=new f(n[0]).get(),m=[...n.map((t=>t[0])),...n.map((t=>t[1])).reverse()];w(m,{basePairLength:h,basePairSpacing:l}),new f(m).set(p),e(m,(0,i.displacement)(new s(r).get(),c));let g=n[n.length-1],y=g.map((e=>t.indexOf(e))),b=t.filter(((t,e)=>(0,o.isBetweenExclusive)(e,(0,o.min)(y),(0,o.max)(y))&&S[e]==S[(0,o.min)(y)]+1)),v=new Set(b),x=O.filter((t=>v.has(t[0][0])));_([g[0],...b,g[1]],{spacing:x.length>0?h:d}),x.forEach((t=>T(t)))};E.forEach((t=>T(t))),new f(t).set(b),new s(t).set(y)}var O=n(456);class C{static from(t){return{to:e=>({inclusive:()=>{let n=e-t+1;return Array.from({length:n},((e,n)=>t+n))}})}}}class E{static of(...t){let[e,n]=t,r=new P.PositionPairs(...t).get();r=(0,M.sorted)(r);let i=r.map((t=>t.map((t=>t-1)))),s=[],a=0;return e.forEach(((t,e)=>{let n=i.find((t=>t.includes(e)));n&&e==(0,o.min)(n)?(s.push(a),a+=1):n&&e==(0,o.max)(n)?(a-=1,s.push(a)):s.push(a)})),s}}class T{constructor(...t){let[e,n]=t;this.rawForm=t,this.mountainPlotTraversal=E.of(...t),this.positionPairs=new P.PositionPairs(...t).get(),this.indexPairs=this.positionPairs.map((t=>[t[0]-1,t[1]-1])),this.pairedBases=new Set(n.flat()),this.pairedIndices=new Set(e.map(((t,e)=>({b:t,i:e}))).filter((t=>this.pairedBases.has(t.b))).map((t=>t.i)))}[Symbol.iterator](){return this.rawForm.values()}get sequence(){return this.rawForm[0]}get basePairs(){return this.rawForm[1]}}class A{static correspondingTo(t){return{in:e=>t.map((t=>e.sequence.indexOf(t)))}}}class j{static composedOf(t){if(0==t.length)throw new Error("All stems must have at least one base-pair.");let n=t[0],r=t[t.length-1],s=t.map((t=>t[0])),o=t.map((t=>t[1])).reverse(),a=n[0],u=n[1],c=[...s,...o];return{[Symbol.iterator]:()=>t.values(),bottomBasePair:n,topBasePair:r,side5:s,side3:o,flat:()=>c,firstBase:a,lastBase:u,stemmify:()=>({with:t=>{let{basePairLength:n,basePairSpacing:r}=t,s=O.Point.matching(a.getCenterPoint());w(c,{basePairLength:n,basePairSpacing:r}),e(c,(0,i.displacement)(a.getCenterPoint(),s))}})}}}class k{static in(t){return{[Symbol.iterator]:()=>new P.Stems(t.sequence,t.basePairs).get().map((t=>j.composedOf(t))).values()}}}class D{static composedOf(t){if(t.length<2)throw new Error("Linkers must have at least two bases.");let n=t[0],r=t[t.length-1],s=t.slice(1,-1);return{in:o=>{let a=o.sequence.indexOf(n),u=o.sequence.indexOf(r),c=C.from(a).to(u).inclusive(),h=!!o.indexPairs.find((t=>t.includes(a)&&t.includes(u))),l=c.every((t=>0==o.mountainPlotTraversal[t])),d=1==new Set(c.map((t=>o.mountainPlotTraversal[t]))).size&&!h;return{[Symbol.iterator]:()=>t.values(),indices:c,firstBase:n,lastBase:r,firstIndex:a,lastIndex:u,unpairedBases:{[Symbol.iterator]:()=>s.values(),stemmify:()=>({with:t=>{let{spacing:n}=t;if(s.length<3)return;let r=s[0],o=s[s.length-1],a=O.Point.matching(r.getCenterPoint());w(s,{basePairLength:(0,i.distance)(r.getCenterPoint(),o.getCenterPoint()),basePairSpacing:n}),e(s,(0,i.displacement)(r.getCenterPoint(),a))}})},get middleThreeUnpairedBases(){if(s.length<3)throw new Error("This linker has less than three unpaired bases.");if(s.length%2==0)throw new Error("This linker has an even number of unpaired bases.");let t=Math.floor(s.length/2);return[s[t-1],s[t],s[t+1]]},isHairpinLoop:()=>h,isInOutermostLoop:()=>l,isBetweenSiblingStems:()=>d,round:()=>({with:e=>{let{spacing:n}=e;_(t,{spacing:n})}})}}}}}class L{static in(t){let e=new P.Linkers(t.sequence,t.basePairs).get().map((e=>D.composedOf(e).in(t)));return{[Symbol.iterator]:()=>e.values(),thatAreHairpinLoops:{[Symbol.iterator]:()=>e.filter((t=>t.isHairpinLoop())).values()},inOutermostLoop:{[Symbol.iterator]:()=>e.filter((t=>t.isInOutermostLoop())).values()},notInOutermostLoop:{[Symbol.iterator]:()=>e.filter((t=>!t.isInOutermostLoop())).values(),betweenSiblingStems:{[Symbol.iterator]:()=>e.filter((t=>!t.isInOutermostLoop())).filter((t=>t.isBetweenSiblingStems())).values()}},notBetweenSiblingStems:{[Symbol.iterator]:()=>e.filter((t=>!t.isBetweenSiblingStems())).values()}}}}class B{static closedBy(n){return{in:r=>{let s=n.topBasePair,a=A.correspondingTo(s).in(r),u=(0,o.min)(a),c=r.sequence.filter(((t,e)=>e>(0,o.min)(a)&&e<(0,o.max)(a)&&r.mountainPlotTraversal[e]==r.mountainPlotTraversal[u]+1)),h=c.map((t=>r.sequence.indexOf(t))),l=c.filter((t=>r.pairedBases.has(t))),d=h.filter((t=>r.pairedIndices.has(t))),f=[s[0],...c,s[1]];return{[Symbol.iterator]:()=>f.values(),parentStructure:r,closingStem:n,closingBasePair:s,closingIndexPair:a,enclosedBases:c,enclosedIndices:h,enclosedPairedBases:l,enclosedPairedIndices:d,get platform(){if(0==d.length)throw new Error("This loop does not have a platform.");let n=(0,o.min)(d),u=(0,o.max)(d),c=r.sequence.filter(((t,e)=>e>=n&&e<=u&&h.includes(e)&&[e-1,e,e+1].some((t=>d.includes(t)))));return{[Symbol.iterator]:()=>c.values(),firstIndex:n,lastIndex:u,arch:()=>({with:r=>{let{spacing:h}=r,l=(0,o.max)([c.length-2,n-(0,o.min)(a)-1,(0,o.max)(a)-u-1,0]),d=C.from(1).to(l).inclusive().map((()=>new t({centerPoint:{x:0,y:0}}))),f=d.map((()=>new t({centerPoint:{x:0,y:0}}))),p=O.Point.matching(s[0].getCenterPoint());x([s[0],...d,...c,...f,s[1]],{spacing:h,terminiGap:h}),e([...s,...c],(0,i.displacement)(s[0].getCenterPoint(),p))}})}}}}}}}class I{static of(t){let e=t.sequence.filter(((e,n)=>0==t.mountainPlotTraversal[n]));return{[Symbol.iterator]:()=>e.values()}}}function F(t,e,n){var r;let{spacing:i,basePairSpacing:o}=n,a=null!==(r=n.hairpinLoopSpacing)&&void 0!==r?r:i,u=new T(t,e);if(t.length<2)return;if(0==e.length)return void x(t,{spacing:i,terminiGap:2*i});let c=O.Point.matching(new s(t).get()),h=new f(t).get(),l=k.in(u),d=L.in(u);x([...I.of(u)],{spacing:i,terminiGap:2*i});let p=[...l].map((t=>B.closedBy(t).in(u)));p.filter((t=>t.enclosedPairedBases.length>0)).forEach((t=>{t.closingStem.stemmify().with({basePairLength:i,basePairSpacing:o}),t.platform.arch().with({spacing:i}),t.closingStem.stemmify().with({basePairLength:i,basePairSpacing:o})})),p.filter((t=>0==t.enclosedPairedBases.length)).forEach((t=>t.closingStem.stemmify().with({basePairLength:i,basePairSpacing:o}))),[...d.notBetweenSiblingStems].forEach((t=>t.round().with({spacing:i}))),[...d.thatAreHairpinLoops].forEach((t=>t.round().with({spacing:a}))),[...d.notInOutermostLoop.betweenSiblingStems].filter((t=>[...t.unpairedBases].length>=3)).forEach((t=>{t.unpairedBases.stemmify().with({spacing:i}),[...t.unpairedBases].length%2!=0&&_(t.middleThreeUnpairedBases,{spacing:i})})),new f(t).set(h),new s(t).set(c)}})(),r})(),t.exports=e()},139:function(t){var e;e=()=>(()=>{"use strict";var t={826:(t,e,n)=>{n.d(e,{A:()=>u,y:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,"._xow9qroX8E0n35EgMyS {\n cursor: grab;\n}\n\n._xow9qroX8E0n35EgMyS:active {\n cursor: grabbing;\n}\n",""]);var a="_xow9qroX8E0n35EgMyS";const u=o},314:t=>{t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var o={};if(r)for(var a=0;a<this.length;a++){var u=this[a][0];null!=u&&(o[u]=!0)}for(var c=0;c<t.length;c++){var h=[].concat(t[c]);r&&o[h[0]]||(void 0!==s&&(void 0===h[5]||(h[1]="@layer".concat(h[5].length>0?" ".concat(h[5]):""," {").concat(h[1],"}")),h[5]=s),n&&(h[2]?(h[1]="@media ".concat(h[2]," {").concat(h[1],"}"),h[2]=n):h[2]=n),i&&(h[4]?(h[1]="@supports (".concat(h[4],") {").concat(h[1],"}"),h[4]=i):h[4]="".concat(i)),e.push(h))}},e}},601:t=>{t.exports=function(t){return t[1]}},72:t=>{var e=[];function n(t){for(var n=-1,r=0;r<e.length;r++)if(e[r].identifier===t){n=r;break}return n}function r(t,r){for(var s={},o=[],a=0;a<t.length;a++){var u=t[a],c=r.base?u[0]+r.base:u[0],h=s[c]||0,l="".concat(c," ").concat(h);s[c]=h+1;var d=n(l),f={css:u[1],media:u[2],sourceMap:u[3],supports:u[4],layer:u[5]};if(-1!==d)e[d].references++,e[d].updater(f);else{var p=i(f,r);r.byIndex=a,e.splice(a,0,{identifier:l,updater:p,references:1})}o.push(l)}return o}function i(t,e){var n=e.domAPI(e);return n.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,i){var s=r(t=t||[],i=i||{});return function(t){t=t||[];for(var o=0;o<s.length;o++){var a=n(s[o]);e[a].references--}for(var u=r(t,i),c=0;c<s.length;c++){var h=n(s[c]);0===e[h].references&&(e[h].updater(),e.splice(h,1))}s=u}}},659:t=>{var e={};t.exports=function(t,n){var r=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},540:t=>{t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},56:(t,e,n)=>{t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},825:t=>{t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var s=n.sourceMap;s&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleTagTransform(r,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},113:t=>{t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={id:r,exports:{}};return t[r](s,s.exports,n),s.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nc=void 0;var r={};n.r(r),n.d(r,{DragTranslater:()=>b});var i=n(72),s=n.n(i),o=n(825),a=n.n(o),u=n(659),c=n.n(u),h=n(56),l=n.n(h),d=n(540),f=n.n(d),p=n(113),m=n.n(p),g=n(826),y={};y.styleTagTransform=m(),y.setAttributes=l(),y.insert=c().bind(null,"head"),y.domAPI=a(),y.insertStyleElement=f(),s()(g.A,y),g.A&&g.A.locals&&g.A.locals;class b{constructor(t){this.targetForm=t,this.mouseIsDown=!1,this.interactionDepth="shallow",window.addEventListener("mousedown",(t=>this.handleMouseDown(t))),window.addEventListener("mousemove",(t=>this.handleMouseMove(t))),window.addEventListener("mouseup",(t=>this.handleMouseUp(t))),t.addEventListener("mouseover",(e=>{e.target!==t||t.classList.add(g.y)})),t.addEventListener("mouseout",(e=>{e.target!==t||t.classList.remove(g.y)}))}get currentTranslation(){let t=this.targetForm.getBoundingClientRect(),e=t.x,n=t.y,r=this.targetForm.style.translate;this.targetForm.style.translate="0px 0px";let i=this.targetForm.getBoundingClientRect(),s=i.x,o=i.y;return this.targetForm.style.translate=r,{x:e-s,y:n-o}}set currentTranslation(t){this.targetForm.style.translate=`${t.x}px ${t.y}px`}untranslate(){this.targetForm.style.translate="0px 0px"}handleMouseDown(t){this.lastMouseDown=t,this.mouseIsDown=!0}handleMouseMove(t){if(!this.mouseIsDown)return;if(!this.lastMouseDown)return;if(!(this.lastMouseDown.target instanceof Node))return;if("shallow"==this.interactionDepth){if(this.lastMouseDown.target!==this.targetForm)return}else if(!this.targetForm.contains(this.lastMouseDown.target))return;let e=this.currentTranslation;this.currentTranslation={x:e.x+t.movementX,y:e.y+t.movementY}}handleMouseUp(t){this.mouseIsDown=!1}}return r})(),t.exports=e()},986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,flipAway:()=>v,isBetween:()=>h,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,normalizeAngle:()=>b,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}function b(t,e){void 0===e&&(e=-Math.PI);var n=t-e;return e+((n%=2*Math.PI)>=0?n:n+2*Math.PI)}function v(t,e){var n=(e=b(e,t))-t;return(n<Math.PI/2||n>3*Math.PI/2)&&(t+=Math.PI),t}return e})()},725:function(t){t.exports=(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>d,average:()=>r,degrees:()=>m,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,radians:()=>g,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>f,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>p,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return Math.abs(t-e)<=n}function f(t){i(t),t.reverse()}function p(t){var e=o(t);return e.reverse(),e}function m(t){return t*(180/Math.PI)}function g(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function c(t){return"object"==typeof t&&null!==t}function h(t){return Array.isArray(t)}return t.r(e),t.d(e,{isArray:()=>h,isFiniteNumber:()=>r,isNonFiniteNumber:()=>i,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>c,isNullish:()=>u,isNumber:()=>n,isPositiveFiniteNumber:()=>s,isString:()=>a}),e})()},30:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.pow(Math.pow(t.x,2)+Math.pow(t.y,2),.5)}function r(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>r,magnitude:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{areWithin:()=>a,centroid:()=>f,deepCopy:()=>s,direction:()=>l,displaced:()=>c,displacement:()=>u,distance:()=>o,isFinitePoint:()=>i,isPoint:()=>e,midpoint:()=>p});var t=n(854);function e(e){return(0,t.isNonNullObject)(e)&&(0,t.isNumber)(e.x)&&(0,t.isNumber)(e.y)}function i(n){return e(n)&&(0,t.isFiniteNumber)(n.x)&&(0,t.isFiniteNumber)(n.y)}function s(t){return{x:t.x,y:t.y}}function o(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.pow(Math.pow(n,2)+Math.pow(r,2),.5)}function a(t,e,n){return o(t,e)<=n}function u(t,e){return{x:e.x-t.x,y:e.y-t.y}}function c(t,e){return{x:t.x+e.x,y:t.y+e.y}}var h=n(30);function l(t,e){return(0,h.direction)(u(t,e))}var d=n(986);function f(t){return{x:(0,d.mean)(t.map((function(t){return t.x}))),y:(0,d.mean)(t.map((function(t){return t.y})))}}function p(t,e){return f([t,e])}})(),r})()},106:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return t.map((t=>({v:t,priority:Math.random()}))).sort(((t,e)=>t.priority-e.priority)).map((({v:t})=>t))}function r(){return!(!document.activeElement||"textarea"!==document.activeElement.tagName.toLowerCase()&&(t=document.activeElement,"input"!==t.tagName.toLowerCase()||"text"!==(null===(e=t.getAttribute("type"))||void 0===e?void 0:e.toLowerCase())));var t,e}t.r(e),t.d(e,{DownloadableFile:()=>h,EventfulSet:()=>l,FiniteStack:()=>y,KeyBinding:()=>u,detectMac:()=>c,isBeingInteractedWith:()=>s,isURL:()=>b,shuffled:()=>n,userIsTyping:()=>r});let i=new Set;function s(t){return t===document.body||i.has(t)}window.addEventListener("mousedown",(t=>{if(!(t.target instanceof Node))return void(i=new Set);i=new Set;let e=t.target;for(i.add(e);e.parentNode&&!i.has(e.parentNode);)i.add(e.parentNode),e=e.parentNode}));var o,a=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class u{constructor(t,e,n){this.key=t,this.scope=void 0,o.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,o,n),window.addEventListener("keydown",(n=>{var i,u,c;n.key.toUpperCase()===t.toUpperCase()&&(void 0===(null===(i=a(this,o,"f"))||void 0===i?void 0:i.shiftKey)||a(this,o,"f").shiftKey==n.shiftKey)&&(void 0===(null===(u=a(this,o,"f"))||void 0===u?void 0:u.ctrlKey)||a(this,o,"f").ctrlKey==n.ctrlKey)&&(void 0===(null===(c=a(this,o,"f"))||void 0===c?void 0:c.metaKey)||a(this,o,"f").metaKey==n.metaKey)&&!r()&&this.scope&&s(this.scope)&&(n.preventDefault(),e())}),{passive:!1})}}function c(){try{return window.navigator.platform.toLowerCase().includes("mac")}catch(t){return!1}}o=new WeakMap;class h{constructor(t){this.textContent=t}downloadAs(t,e){let n=new File([this.textContent],t,{type:e.type}),r=URL.createObjectURL(n),i=document.createElement("a");i.href=r,i.download=n.name,document.body.appendChild(i),i.click(),i.remove(),URL.revokeObjectURL(r)}}class l{constructor(){this.eventListeners={change:[]},this.underlyingSet=new Set}[Symbol.iterator](){return this.underlyingSet.values()}includes(t){return this.underlyingSet.has(t)}include(t){return this.includes(t)}addAll(t){let e=[...t];0!=e.length&&(e.every((t=>this.includes(t)))||(e.forEach((t=>this.underlyingSet.add(t))),this.callEventListeners("change")))}removeAll(t){let e=[...t];0!=e.length&&(e.every((t=>!this.includes(t)))||(e.forEach((t=>this.underlyingSet.delete(t))),this.callEventListeners("change")))}clear(){0!=this.underlyingSet.size&&(this.underlyingSet.clear(),this.callEventListeners("change"))}addEventListener(t,e){this.eventListeners[t].push(e)}callEventListeners(t){this.eventListeners[t].forEach((t=>t()))}removeEventListener(t,e){this.eventListeners[t]=this.eventListeners[t].filter((t=>t!==e))}}var d,f,p,m,g=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class y{constructor(t){d.add(this),this.maxSize=t,f.set(this,[]),p.set(this,{change:[]})}get size(){return g(this,f,"f").length}isEmpty(){return 0==this.size}empty(){0!=this.size&&(function(t,e){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,[])}(this,f),g(this,d,"m",m).call(this,"change"))}peek(){if(0==this.size)throw new Error("The stack is empty.");return g(this,f,"f")[g(this,f,"f").length-1]}push(t){g(this,f,"f").push(t),this.size>this.maxSize&&g(this,f,"f").shift(),g(this,d,"m",m).call(this,"change")}pop(){if(0==this.size)throw new Error("The stack is empty.");let t=g(this,f,"f").pop();return g(this,d,"m",m).call(this,"change"),t}addEventListener(t,e){g(this,p,"f")[t].push(e)}removeEventListener(t,e){g(this,p,"f")[t]=g(this,p,"f")[t].filter((t=>t!==e))}}function b(t){try{return new URL(t),!0}catch(t){return!1}}return f=new WeakMap,p=new WeakMap,d=new WeakSet,m=function(t){g(this,p,"f")[t].forEach((t=>t()))},e})(),t.exports=e()},277:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{Vector:()=>n});class n{static matching(t){return new n(t.x,t.y)}constructor(t,e){this.x=t,this.y=e}[Symbol.iterator](){return[this.x,this.y].values()}get magnitude(){return Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2))}set magnitude(t){let e=this.direction;this.x=t*Math.cos(e),this.y=t*Math.sin(e)}get direction(){return Math.atan2(this.y,this.x)}set direction(t){let e=this.magnitude;this.x=e*Math.cos(t),this.y=e*Math.sin(t)}}return e})(),t.exports=e()},914:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>l,Ks:()=>h,Qs:()=>c,Y2:()=>a,YL:()=>u});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.XE6d9JaUR7gBeuo1hGrQ {\n margin: 0px 0px 0px 2px;\n\n position: relative;\n}\n\n.XE6d9JaUR7gBeuo1hGrQ:hover .pgxJRNaPK6uSZiw4arh4 {\n display: block;\n}\n\n.pgxJRNaPK6uSZiw4arh4 {\n position: absolute;\n\n height: 44px;\n\n background-color: black;\n\n top: -78px;\n left: -53px;\n\n border-radius: 6px;\n\n padding: 0px 19px 0px 20px;\n\n box-shadow: 0px 0px 6px #d9d9e724;\n\n animation: lDZ0B7DVfKOe65F_S8jM 1.5s;\n\n display: none;\n}\n\n@keyframes lDZ0B7DVfKOe65F_S8jM {\n 0% {\n opacity: 0;\n }\n 66.6% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n.pgxJRNaPK6uSZiw4arh4:before {\n content: "";\n position: absolute;\n\n border-style: solid;\n border-color: black transparent transparent transparent;\n border-width: 18px 9px;\n\n top: 100%;\n left: 79px;\n}\n\n.m14cYk4OpYR3o23eADlL {\n height: 100%;\n\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: 7px;\n}\n\n._o20VkXvkmRP_hEMvjjJ {\n margin: 0px;\n padding: 0px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 11px;\n font-weight: 600;\n font-style: normal;\n color: white;\n\n text-wrap: nowrap;\n\n user-select: none;\n -webkit-user-select: none;\n\n pointer-events: none;\n}\n',""]);var a="XE6d9JaUR7gBeuo1hGrQ",u="pgxJRNaPK6uSZiw4arh4",c="m14cYk4OpYR3o23eADlL",h="_o20VkXvkmRP_hEMvjjJ";const l=o},82:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>d,Ks:()=>l,Qs:()=>h,YL:()=>u,k$:()=>a,n8:()=>c});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.I86pVX4E9S9go_Vovuyj {\n position: relative;\n\n display: flex;\n flex-direction: column;\n gap: 2px;\n\n pointer-events: auto;\n\n user-select: none;\n -webkit-user-select: none;\n\n cursor: grab;\n}\n\n.I86pVX4E9S9go_Vovuyj:hover .lvX4rYV0xi5GXtvJJIpB {\n display: block;\n}\n\n.I86pVX4E9S9go_Vovuyj:active {\n cursor: grabbing;\n}\n\n.rv0lXZv5mI3svueh2PmW {\n width: 11px;\n height: 1px;\n background-color: white;\n\n user-select: none;\n -webkit-user-select: none;\n}\n\n.lvX4rYV0xi5GXtvJJIpB {\n position: absolute;\n\n height: 44px;\n\n background-color: black;\n\n top: -78px;\n left: -40px;\n\n border-radius: 6px;\n\n padding: 0px 19px 0px 20px;\n\n box-shadow: 0px 0px 6px #d9d9e724;\n\n animation: kaEyn9fcwCG2XXWfpJ4G 1.5s;\n\n display: none;\n}\n\n@keyframes kaEyn9fcwCG2XXWfpJ4G {\n 0% {\n opacity: 0;\n }\n 66.6% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n.lvX4rYV0xi5GXtvJJIpB:before {\n content: "";\n position: absolute;\n\n border-style: solid;\n border-color: black transparent transparent transparent;\n border-width: 18px 9px;\n\n top: 100%;\n left: 37px;\n}\n\n.tI9xH2JJ7cozP4zMw2Dc {\n height: 100%;\n\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: 7px;\n}\n\n.hbGjiGP5SoNMEFdawcSn {\n margin: 0px;\n padding: 0px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 11px;\n font-weight: 600;\n font-style: normal;\n color: white;\n\n text-wrap: nowrap;\n\n user-select: none;\n -webkit-user-select: none;\n\n pointer-events: none;\n}\n',""]);var a="I86pVX4E9S9go_Vovuyj",u="lvX4rYV0xi5GXtvJJIpB",c="rv0lXZv5mI3svueh2PmW",h="tI9xH2JJ7cozP4zMw2Dc",l="hbGjiGP5SoNMEFdawcSn";const d=o},334:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>l,Kf:()=>a,Ks:()=>h,Qs:()=>c,YL:()=>u});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.CzzhBhgZzQogFHbjzh2V {\n margin: 0px 0px 0px 8px;\n\n position: relative;\n}\n\n.CzzhBhgZzQogFHbjzh2V:hover .k_CxH7PUZnnM6a4FtVii {\n display: block;\n}\n\n.k_CxH7PUZnnM6a4FtVii {\n position: absolute;\n\n height: 44px;\n\n background-color: black;\n\n top: -78px;\n left: -53px;\n\n border-radius: 6px;\n\n padding: 0px 19px 0px 20px;\n\n box-shadow: 0px 0px 6px #d9d9e724;\n\n animation: bSs43cx3hrfySANawEJQ 1.5s;\n\n display: none;\n}\n\n@keyframes bSs43cx3hrfySANawEJQ {\n 0% {\n opacity: 0;\n }\n 66.6% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n.k_CxH7PUZnnM6a4FtVii:before {\n content: "";\n position: absolute;\n\n border-style: solid;\n border-color: black transparent transparent transparent;\n border-width: 18px 9px;\n\n top: 100%;\n left: 79px;\n}\n\n.duGGlhAdkw37B2eRtf7X {\n height: 100%;\n\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: 7px;\n}\n\n._sH5DcTJC4c7AwzkpWb9 {\n margin: 0px;\n padding: 0px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 11px;\n font-weight: 600;\n font-style: normal;\n color: white;\n\n text-wrap: nowrap;\n\n user-select: none;\n -webkit-user-select: none;\n\n pointer-events: none;\n}\n',""]);var a="CzzhBhgZzQogFHbjzh2V",u="k_CxH7PUZnnM6a4FtVii",c="duGGlhAdkw37B2eRtf7X",h="_sH5DcTJC4c7AwzkpWb9";const l=o},608:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>f,Ks:()=>d,Qs:()=>l,YL:()=>u,kZ:()=>h,kn:()=>a,vk:()=>c});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.hTPpjbRyTqBoIMLts_ia {\n margin: 0px 0px 0px 15px;\n\n position: relative;\n}\n\n.hTPpjbRyTqBoIMLts_ia:hover .JwYfDztp8DNEauk_0I0V {\n display: block;\n}\n\n.LtKYp2iaWIlZLXHxGhmp {\n cursor: pointer;\n}\n\n.KvHw5FUdaen54SpIDyD4 {\n cursor: grab;\n}\n\n.KvHw5FUdaen54SpIDyD4:active {\n cursor: grabbing;\n}\n\n.JwYfDztp8DNEauk_0I0V {\n position: absolute;\n\n height: 44px;\n\n background-color: black;\n\n top: -73px;\n left: -17px;\n\n border-radius: 6px;\n\n padding: 0px 20px 0px 20px;\n\n box-shadow: 0px 0px 6px #d9d9e724;\n\n animation: S2bh0qgCMt48suzCtblA 1.5s;\n\n display: none;\n}\n\n@keyframes S2bh0qgCMt48suzCtblA {\n 0% {\n opacity: 0;\n }\n 66.6% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n.JwYfDztp8DNEauk_0I0V:before {\n content: "";\n position: absolute;\n\n border-style: solid;\n border-color: black transparent transparent transparent;\n border-width: 18px 9px;\n\n top: 100%;\n left: 28px;\n}\n\n.rSrG4GLL5z1V6_7RnaDU {\n height: 100%;\n\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: 7px;\n}\n\n.I_EXzKVsQQTlg868Lu0N {\n margin: 0px;\n padding: 0px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 11px;\n font-weight: 600;\n font-style: normal;\n color: white;\n\n text-wrap: nowrap;\n\n user-select: none;\n -webkit-user-select: none;\n\n pointer-events: none;\n}\n',""]);var a="hTPpjbRyTqBoIMLts_ia",u="JwYfDztp8DNEauk_0I0V",c="LtKYp2iaWIlZLXHxGhmp",h="KvHw5FUdaen54SpIDyD4",l="rSrG4GLL5z1V6_7RnaDU",d="I_EXzKVsQQTlg868Lu0N";const f=o},213:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>f,Ks:()=>d,Qs:()=>l,YL:()=>u,kZ:()=>h,nj:()=>a,x6:()=>c});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.t7iwx4NB8G7MjjaXddYK {\n margin: 0px 0px 0px 12px;\n\n position: relative;\n}\n\n.t7iwx4NB8G7MjjaXddYK:hover .Jg4dfA5QmDZsJhbnySjo {\n display: block;\n}\n\n.RxNYNEnFo5m9z9DqpIBr {\n padding: 4px 6px;\n}\n\n.OGRnGaTawL1xAmNc3Ms0 {\n cursor: grab;\n}\n\n.OGRnGaTawL1xAmNc3Ms0:active {\n cursor: grabbing;\n}\n\n.Jg4dfA5QmDZsJhbnySjo {\n position: absolute;\n\n height: 44px;\n\n background-color: black;\n\n top: -73px;\n left: -20px;\n\n border-radius: 6px;\n\n padding: 0px 20px 0px 20px;\n\n box-shadow: 0px 0px 6px #d9d9e724;\n\n animation: gwiB7ChybLI0ZzY9V7qm 1.5s;\n\n display: none;\n}\n\n@keyframes gwiB7ChybLI0ZzY9V7qm {\n 0% {\n opacity: 0;\n }\n 66.6% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n.Jg4dfA5QmDZsJhbnySjo:before {\n content: "";\n position: absolute;\n\n border-style: solid;\n border-color: black transparent transparent transparent;\n border-width: 18px 9px;\n\n top: 100%;\n left: 29px;\n}\n\n.pf4xRdYItnMZD3wtdsKG {\n height: 100%;\n\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: 7px;\n}\n\n._3DSIKGnVANAdNQ_R7Br {\n margin: 0px;\n padding: 0px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 11px;\n font-weight: 600;\n font-style: normal;\n color: white;\n\n text-wrap: nowrap;\n\n user-select: none;\n -webkit-user-select: none;\n\n pointer-events: none;\n}\n',""]);var a="t7iwx4NB8G7MjjaXddYK",u="Jg4dfA5QmDZsJhbnySjo",c="RxNYNEnFo5m9z9DqpIBr",h="OGRnGaTawL1xAmNc3Ms0",l="pf4xRdYItnMZD3wtdsKG",d="_3DSIKGnVANAdNQ_R7Br";const f=o},73:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>f,Ks:()=>d,Qs:()=>l,YL:()=>u,kZ:()=>h,sD:()=>a,vk:()=>c});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.n8swJ_hfeK_b0SxqMqlu {\n margin: 0px 0px 0px 15px;\n\n position: relative;\n}\n\n.n8swJ_hfeK_b0SxqMqlu:hover .MGIHaXaB6xVW_AGXQu6I {\n display: block;\n}\n\n.Q0nShE2G7kSiDWldFTbr {\n cursor: pointer;\n}\n\n.OqzEjFlIs6wiXWVD77kb {\n cursor: grab;\n}\n\n.OqzEjFlIs6wiXWVD77kb:active {\n cursor: grabbing;\n}\n\n.MGIHaXaB6xVW_AGXQu6I {\n position: absolute;\n\n height: 44px;\n\n background-color: black;\n\n top: -73px;\n left: -20px;\n\n border-radius: 6px;\n\n padding: 0px 20px 0px 20px;\n\n box-shadow: 0px 0px 6px #d9d9e724;\n\n animation: AcPbYKwzq5tWmIopb3Th 1.5s;\n\n display: none;\n}\n\n@keyframes AcPbYKwzq5tWmIopb3Th {\n 0% {\n opacity: 0;\n }\n 66.6% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n.MGIHaXaB6xVW_AGXQu6I:before {\n content: "";\n position: absolute;\n\n border-style: solid;\n border-color: black transparent transparent transparent;\n border-width: 18px 9px;\n\n top: 100%;\n left: 29px;\n}\n\n.CKQTRzZjpmjL4hBLT_XA {\n height: 100%;\n\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: 7px;\n}\n\n.ViWXSnwAvYqh1w6RwKIv {\n margin: 0px;\n padding: 0px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 11px;\n font-weight: 600;\n font-style: normal;\n color: white;\n\n text-wrap: nowrap;\n\n user-select: none;\n -webkit-user-select: none;\n\n pointer-events: none;\n}\n',""]);var a="n8swJ_hfeK_b0SxqMqlu",u="MGIHaXaB6xVW_AGXQu6I",c="Q0nShE2G7kSiDWldFTbr",h="OqzEjFlIs6wiXWVD77kb",l="CKQTRzZjpmjL4hBLT_XA",d="ViWXSnwAvYqh1w6RwKIv";const f=o},158:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>f,Ks:()=>d,Qs:()=>l,YL:()=>u,c8:()=>a,kZ:()=>h,x6:()=>c});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.POnaFWRdzslXsm7ObsOu {\n margin: 0px 0px 0px 12px;\n\n position: relative;\n}\n\n.POnaFWRdzslXsm7ObsOu:hover .T5I1UUcHjGPyq1dV61cg {\n display: block;\n}\n\n.iE6m5T5RGI3qiifOMV5B {\n padding: 4px 6px;\n}\n\n.TqgYwrvMBqBixVvUzMTg {\n cursor: grab;\n}\n\n.TqgYwrvMBqBixVvUzMTg:active {\n cursor: grabbing;\n}\n\n.T5I1UUcHjGPyq1dV61cg {\n position: absolute;\n\n height: 44px;\n\n background-color: black;\n\n top: -73px;\n left: -20px;\n\n border-radius: 6px;\n\n padding: 0px 20px 0px 20px;\n\n box-shadow: 0px 0px 6px #d9d9e724;\n\n animation: K04IpiY0PLp1mvLBclmC 1.5s;\n\n display: none;\n}\n\n@keyframes K04IpiY0PLp1mvLBclmC {\n 0% {\n opacity: 0;\n }\n 66.6% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n.T5I1UUcHjGPyq1dV61cg:before {\n content: "";\n position: absolute;\n\n border-style: solid;\n border-color: black transparent transparent transparent;\n border-width: 18px 9px;\n\n top: 100%;\n left: 29px;\n}\n\n.I9wXE03ihpeVph1RKs7Y {\n height: 100%;\n\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: 7px;\n}\n\n.nNmFlqMm9psYpZ1160lt {\n margin: 0px;\n padding: 0px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 11px;\n font-weight: 600;\n font-style: normal;\n color: white;\n\n text-wrap: nowrap;\n\n user-select: none;\n -webkit-user-select: none;\n\n pointer-events: none;\n}\n',""]);var a="POnaFWRdzslXsm7ObsOu",u="T5I1UUcHjGPyq1dV61cg",c="iE6m5T5RGI3qiifOMV5B",h="TqgYwrvMBqBixVvUzMTg",l="I9wXE03ihpeVph1RKs7Y",d="nNmFlqMm9psYpZ1160lt";const f=o},719:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>u,KE:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,"@import url(https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&display=swap);"]),o.push([t.id,".aVj2i1vL0xgitnRSSmmQ {\n position: absolute;\n left: 60px;\n bottom: 15px;\n\n height: 45px;\n padding: 0px 15px 0px 15px;\n\n background-color: black;\n\n border-radius: 4px;\n box-shadow: 0 0 12px #1a1a1c36;\n\n display: flex;\n flex-direction: row;\n align-items: center;\n\n user-select: none;\n -webkit-user-select: none;\n}\n\n.oPxkjdqN4ZRO1ANdcCzU {\n display: flex;\n flex-direction: row;\n align-items: center;\n gap: 10px;\n}\n",""]);var a="aVj2i1vL0xgitnRSSmmQ";const u=o},427:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>c,Sn:()=>u,Zp:()=>a});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'._0hggm2dHh3QTYDEyHHjb {\n display: flex;\n padding: 6px 16px;\n\n background-color: black;\n\n font-family: "Open Sans", sans-serif;\n font-size: 11px;\n font-weight: 500;\n font-style: normal;\n color: white;\n\n border: none;\n border-radius: 3px;\n\n outline: none;\n\n opacity: 0.6;\n\n user-select: none;\n -webkit-user-select: none;\n}\n\n.TwZWGqDmzCdm6bwdLClx {\n opacity: 1;\n}\n\n.TwZWGqDmzCdm6bwdLClx:hover {\n background-color: rgb(50, 50, 56);\n}\n\n.TwZWGqDmzCdm6bwdLClx:active {\n background-color: rgb(66, 66, 73);\n}\n',""]);var a="_0hggm2dHh3QTYDEyHHjb",u="TwZWGqDmzCdm6bwdLClx";const c=o},419:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>l,Ks:()=>h,LM:()=>a,Qs:()=>c,YL:()=>u});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.gl2UvT5ADtlPYRrx898n {\n border-radius: 1000px;\n\n display: flex;\n\n background-color: transparent;\n isolation: isolate;\n\n user-select: none;\n -webkit-user-select: none;\n\n cursor: pointer;\n}\n\n.gl2UvT5ADtlPYRrx898n:hover .hbZV36Fii59DXDaGOO42 {\n display: block;\n}\n\n.gl2UvT5ADtlPYRrx898n::before {\n content: "";\n\n position: absolute;\n top: 0px;\n right: 0px;\n bottom: 0px;\n left: 0px;\n\n border-radius: 1000px;\n background-color: black;\n box-shadow: 0 0 12px #23232533;\n\n z-index: -1;\n}\n\n.gl2UvT5ADtlPYRrx898n:hover::before {\n transform: scale(1.166);\n transition: transform 0.1s;\n}\n\n.gl2UvT5ADtlPYRrx898n:active::before {\n transform: scale(1);\n transition: transform 0s;\n}\n\n.hbZV36Fii59DXDaGOO42 {\n position: absolute;\n\n height: 44px;\n\n background-color: black;\n\n top: -70px;\n left: -7px;\n\n border-radius: 6px;\n\n padding: 0px 20px 0px 20px;\n\n box-shadow: 0px 0px 6px #d9d9e724;\n\n animation: dM2XEhlT326syXUhKuE9 1.5s;\n\n display: none;\n}\n\n@keyframes dM2XEhlT326syXUhKuE9 {\n 0% {\n opacity: 0;\n }\n 66.6% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n.hbZV36Fii59DXDaGOO42:before {\n content: "";\n position: absolute;\n\n border-style: solid;\n border-color: black transparent transparent transparent;\n border-width: 18px 9px;\n\n top: 100%;\n left: 14px;\n}\n\n._W7Bk8bxqXgGVCTAjMPS {\n height: 100%;\n\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: 7px;\n}\n\n.qHcaLV1pFaAUgsXGzbBe {\n margin: 0px;\n padding: 0px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 11px;\n font-weight: 600;\n font-style: normal;\n color: white;\n\n text-wrap: nowrap;\n\n user-select: none;\n -webkit-user-select: none;\n\n pointer-events: none;\n}\n',""]);var a="gl2UvT5ADtlPYRrx898n",u="hbZV36Fii59DXDaGOO42",c="_W7Bk8bxqXgGVCTAjMPS",h="qHcaLV1pFaAUgsXGzbBe";const l=o},598:(t,e,n)=>{"use strict";n.d(e,{Ay:()=>f,Ks:()=>d,Qs:()=>l,YL:()=>u,kZ:()=>h,ke:()=>a,vk:()=>c});var r=n(601),i=n.n(r),s=n(314),o=n.n(s)()(i());o.push([t.id,'.sadwgi29Ung5HNAFx7YM {\n margin: 0px 0px 0px 15px;\n\n position: relative;\n}\n\n.sadwgi29Ung5HNAFx7YM:hover .XcEAvpSU04LNbDs2ww1l {\n display: block;\n}\n\n.JgPRhtfDBuYvLRMIrREz {\n cursor: pointer;\n}\n\n.jYRSO6hUjT11kDav_PJZ {\n cursor: grab;\n}\n\n.jYRSO6hUjT11kDav_PJZ:active {\n cursor: grabbing;\n}\n\n.XcEAvpSU04LNbDs2ww1l {\n position: absolute;\n\n height: 44px;\n\n background-color: black;\n\n top: -73px;\n left: -17px;\n\n border-radius: 6px;\n\n padding: 0px 20px 0px 20px;\n\n box-shadow: 0px 0px 6px #d9d9e724;\n\n animation: PPRJKBEyGbRgN3Ycj7tD 1.5s;\n\n display: none;\n}\n\n@keyframes PPRJKBEyGbRgN3Ycj7tD {\n 0% {\n opacity: 0;\n }\n 66.6% {\n opacity: 0;\n }\n 100% {\n opacity: 1;\n }\n}\n\n.XcEAvpSU04LNbDs2ww1l:before {\n content: "";\n position: absolute;\n\n border-style: solid;\n border-color: black transparent transparent transparent;\n border-width: 18px 9px;\n\n top: 100%;\n left: 28px;\n}\n\n.FLbyvtXku_SxP5upvpUc {\n height: 100%;\n\n display: flex;\n flex-direction: column;\n justify-content: center;\n gap: 7px;\n}\n\n.zIiQnqnx7PTSHeUz1gUv {\n margin: 0px;\n padding: 0px;\n\n font-family: "Open Sans", sans-serif;\n font-size: 11px;\n font-weight: 600;\n font-style: normal;\n color: white;\n\n text-wrap: nowrap;\n\n user-select: none;\n -webkit-user-select: none;\n\n pointer-events: none;\n}\n',""]);var a="sadwgi29Ung5HNAFx7YM",u="XcEAvpSU04LNbDs2ww1l",c="JgPRhtfDBuYvLRMIrREz",h="jYRSO6hUjT11kDav_PJZ",l="FLbyvtXku_SxP5upvpUc",d="zIiQnqnx7PTSHeUz1gUv";const f=o},314:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var n="",r=void 0!==e[5];return e[4]&&(n+="@supports (".concat(e[4],") {")),e[2]&&(n+="@media ".concat(e[2]," {")),r&&(n+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),n+=t(e),r&&(n+="}"),e[2]&&(n+="}"),e[4]&&(n+="}"),n})).join("")},e.i=function(t,n,r,i,s){"string"==typeof t&&(t=[[null,t,void 0]]);var o={};if(r)for(var a=0;a<this.length;a++){var u=this[a][0];null!=u&&(o[u]=!0)}for(var c=0;c<t.length;c++){var h=[].concat(t[c]);r&&o[h[0]]||(void 0!==s&&(void 0===h[5]||(h[1]="@layer".concat(h[5].length>0?" ".concat(h[5]):""," {").concat(h[1],"}")),h[5]=s),n&&(h[2]?(h[1]="@media ".concat(h[2]," {").concat(h[1],"}"),h[2]=n):h[2]=n),i&&(h[4]?(h[1]="@supports (".concat(h[4],") {").concat(h[1],"}"),h[4]=i):h[4]="".concat(i)),e.push(h))}},e}},601:t=>{"use strict";t.exports=function(t){return t[1]}},72:t=>{"use strict";var e=[];function n(t){for(var n=-1,r=0;r<e.length;r++)if(e[r].identifier===t){n=r;break}return n}function r(t,r){for(var s={},o=[],a=0;a<t.length;a++){var u=t[a],c=r.base?u[0]+r.base:u[0],h=s[c]||0,l="".concat(c," ").concat(h);s[c]=h+1;var d=n(l),f={css:u[1],media:u[2],sourceMap:u[3],supports:u[4],layer:u[5]};if(-1!==d)e[d].references++,e[d].updater(f);else{var p=i(f,r);r.byIndex=a,e.splice(a,0,{identifier:l,updater:p,references:1})}o.push(l)}return o}function i(t,e){var n=e.domAPI(e);return n.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;n.update(t=e)}else n.remove()}}t.exports=function(t,i){var s=r(t=t||[],i=i||{});return function(t){t=t||[];for(var o=0;o<s.length;o++){var a=n(s[o]);e[a].references--}for(var u=r(t,i),c=0;c<s.length;c++){var h=n(s[c]);0===e[h].references&&(e[h].updater(),e.splice(h,1))}s=u}}},659:t=>{"use strict";var e={};t.exports=function(t,n){var r=function(t){if(void 0===e[t]){var n=document.querySelector(t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}(t);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(n)}},540:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},56:(t,e,n)=>{"use strict";t.exports=function(t){var e=n.nc;e&&t.setAttribute("nonce",e)}},825:t=>{"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(n){!function(t,e,n){var r="";n.supports&&(r+="@supports (".concat(n.supports,") {")),n.media&&(r+="@media ".concat(n.media," {"));var i=void 0!==n.layer;i&&(r+="@layer".concat(n.layer.length>0?" ".concat(n.layer):""," {")),r+=n.css,i&&(r+="}"),n.media&&(r+="}"),n.supports&&(r+="}");var s=n.sourceMap;s&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleTagTransform(r,t,e.options)}(e,t,n)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},113:t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={id:r,exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.nc=void 0;var r={};return(()=>{"use strict";n.r(r),n.d(r,{Toolbar:()=>Qe,ToolbarToggle:()=>Ts});var t={};n.r(t),n.d(t,{cx:()=>Er,cy:()=>Tr,height:()=>jr,rx:()=>Mr,ry:()=>Nr,width:()=>Ar,x:()=>Or,y:()=>Cr});var e={};n.r(e),n.d(e,{from:()=>Br,to:()=>Ir});var i={};n.r(i),n.d(i,{MorphArray:()=>Xr,height:()=>Ur,width:()=>Hr,x:()=>Gr,y:()=>Yr});var s={};n.r(s),n.d(s,{array:()=>xi,clear:()=>Si,move:()=>_i,plot:()=>Pi,size:()=>Mi});var o={};n.r(o),n.d(o,{amove:()=>Zi,ax:()=>Qi,ay:()=>Ji,build:()=>ts,center:()=>Ki,cx:()=>Wi,cy:()=>$i,length:()=>Gi,move:()=>Ui,plain:()=>Xi,x:()=>Yi,y:()=>Hi});var a={};n.r(a),n.d(a,{dmove:()=>os,dx:()=>as,dy:()=>us,height:()=>cs,move:()=>hs,size:()=>ls,width:()=>ds,x:()=>fs,y:()=>ps});var u=n(72),c=n.n(u),h=n(825),l=n.n(h),d=n(659),f=n.n(d),p=n(56),m=n.n(p),g=n(540),y=n.n(g),b=n(113),v=n.n(b),w=n(719),x={};x.styleTagTransform=v(),x.setAttributes=m(),x.insert=f().bind(null,"head"),x.domAPI=l(),x.insertStyleElement=y(),c()(w.Ay,x),w.Ay&&w.Ay.locals&&w.Ay.locals;var S=n(82),_={};_.styleTagTransform=v(),_.setAttributes=m(),_.insert=f().bind(null,"head"),_.domAPI=l(),_.insertStyleElement=y(),c()(S.Ay,_),S.Ay&&S.Ay.locals&&S.Ay.locals;var P=n(106);function M(){let t=document.createElement("div");return t.classList.add(S.n8),t}let N=(0,P.detectMac)()?"Control-click":"Right-click";var O=n(73),C={};C.styleTagTransform=v(),C.setAttributes=m(),C.insert=f().bind(null,"head"),C.domAPI=l(),C.insertStyleElement=y(),c()(O.Ay,C),O.Ay&&O.Ay.locals&&O.Ay.locals;var E=n(427),T={};T.styleTagTransform=v(),T.setAttributes=m(),T.insert=f().bind(null,"head"),T.domAPI=l(),T.insertStyleElement=y(),c()(E.Ay,T),E.Ay&&E.Ay.locals&&E.Ay.locals;class A{constructor(t){this.domNode=document.createElement("button"),this.domNode.classList.add(E.Zp,E.Sn),this.domNode.append(t),this.domNode.addEventListener("mousedown",(t=>{this.isEnabled()&&(!function(t){return"mousedown"==t.type&&((0,P.detectMac)()?0==t.button&&!t.ctrlKey:0==t.button)}(t)||t.stopPropagation())}))}disable(){this.domNode.classList.remove(E.Sn)}enable(){this.domNode.classList.add(E.Sn)}isDisabled(){return!this.domNode.classList.contains(E.Sn)}isEnabled(){return!this.isDisabled()}}var j,k,D,L,B,I,F,R,V,q,z=n(986),X=function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n},G=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class Y{constructor(t){j.add(this),this.domNode=document.createElement("div"),k.set(this,void 0),D.set(this,void 0),L.set(this,void 0),B.set(this,[]),X(this,L,t,"f"),this.domNode.classList.add(O.sD);let e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttribute("viewBox","0 0 24 24"),e.setAttribute("width","24"),e.setAttribute("height","24");let n=document.createElementNS("http://www.w3.org/2000/svg","path");n.setAttribute("d","M 8 20 v -8 h -4 l 8 -8 l 8 8 h -4 v 8 z"),n.setAttribute("stroke","white"),n.setAttribute("stroke-width","1"),n.setAttribute("fill","none"),e.append(n),X(this,k,new A(e),"f"),G(this,k,"f").domNode.classList.add(O.vk),G(this,k,"f").domNode.addEventListener("click",(()=>this.press())),G(this,k,"f").domNode.style.padding="4px 6px",this.domNode.append(G(this,k,"f").domNode),X(this,D,new H,"f"),this.domNode.append(G(this,D,"f").domNode),this.domNode.style.borderRadius=G(this,k,"f").domNode.style.borderRadius,G(this,B,"f").push(new P.KeyBinding("I",(()=>this.press()),{ctrlKey:!1})),G(this,B,"f").forEach((t=>t.scope=this.domNode)),t.selectedBases.addEventListener("change",(()=>G(this,j,"m",V).call(this))),G(this,j,"m",V).call(this)}isDisabled(){return G(this,k,"f").isDisabled()}press(){if(this.isDisabled())return;let t=[...G(this,L,"f").drawing.bases],e=[...G(this,L,"f").selectedBases];if(e.length<2)return;let n=e.map((e=>t.indexOf(e))),r=t.slice((0,z.min)(n),(0,z.max)(n)+1);G(this,L,"f").selectedBases.addAll(r)}get keyBindings(){return[...G(this,B,"f")]}}k=new WeakMap,D=new WeakMap,L=new WeakMap,B=new WeakMap,j=new WeakSet,I=function(){G(this,k,"f").disable(),G(this,k,"f").domNode.classList.remove(O.vk),G(this,k,"f").domNode.classList.add(O.kZ)},F=function(){G(this,k,"f").enable(),G(this,k,"f").domNode.classList.add(O.vk),G(this,k,"f").domNode.classList.remove(O.kZ)},R=function(){let t=[...G(this,L,"f").drawing.bases],e=[...G(this,L,"f").selectedBases],n=e.map((e=>t.indexOf(e))),r=(0,z.min)(n),i=(0,z.max)(n);0==e.length?G(this,D,"f").textContent="No bases are selected.":1==e.length?G(this,D,"f").textContent="At least two bases must be selected.":i-r+1==e.length?G(this,D,"f").textContent="There are no intervening bases to select.":G(this,D,"f").textContent="Select intervening bases between those already selected. The Shift key can also be held while dragging-to-select bases. [ I ]"},V=function(){let t=[...G(this,L,"f").drawing.bases],e=[...G(this,L,"f").selectedBases],n=e.map((e=>t.indexOf(e))),r=(0,z.min)(n),i=(0,z.max)(n);0==e.length||1==e.length||i-r+1==e.length?G(this,j,"m",I).call(this):G(this,j,"m",F).call(this),G(this,j,"m",R).call(this)};class H{constructor(){this.domNode=document.createElement("div"),q.set(this,void 0),X(this,q,document.createElement("p"),"f"),G(this,q,"f").classList.add(O.Ks);let t=document.createElement("div");t.classList.add(O.Qs),t.append(G(this,q,"f")),this.domNode.classList.add(O.YL),this.domNode.append(t)}get textContent(){return G(this,q,"f").textContent}set textContent(t){G(this,q,"f").textContent=t}}q=new WeakMap;var U=n(158),W={};W.styleTagTransform=v(),W.setAttributes=m(),W.insert=f().bind(null,"head"),W.domAPI=l(),W.insertStyleElement=y(),c()(U.Ay,W),U.Ay&&U.Ay.locals&&U.Ay.locals;var $,K,Q,J,Z,tt,et,nt,rt,it,st,ot,at,ut,ct=n(661),ht=function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n},lt=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class dt{constructor(t){$.add(this),this.domNode=document.createElement("div"),K.set(this,void 0),Q.set(this,void 0),J.set(this,void 0),Z.set(this,!1),tt.set(this,!1),ht(this,J,t,"f"),this.domNode.classList.add(U.c8);let e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttribute("viewBox","0 0 24 24"),e.setAttribute("width","24"),e.setAttribute("height","24");let n=document.createElementNS("http://www.w3.org/2000/svg","path");n.setAttribute("d","M 12 12 v 7 h -3 l 3 3 l 3 -3 h -3 v -7 v -7 h -3 l 3 -3 l 3 3 h -3 v 7 h -7 v 3 l -3 -3 l 3 -3 v 3 h 7 h 7 v -3 l 3 3 l -3 3 v -3 h -7 z"),n.setAttribute("stroke","white"),n.setAttribute("stroke-width","1"),n.setAttribute("fill","white"),e.append(n),ht(this,K,new A(e),"f"),lt(this,K,"f").domNode.classList.add(U.x6,U.kZ),this.domNode.append(lt(this,K,"f").domNode),lt(this,K,"f").domNode.addEventListener("mousedown",(t=>lt(this,$,"m",st).call(this,t))),window.addEventListener("mousemove",(t=>lt(this,$,"m",ot).call(this,t))),window.addEventListener("mouseup",(()=>lt(this,$,"m",at).call(this))),this.domNode.style.borderRadius=lt(this,K,"f").domNode.style.borderRadius,ht(this,Q,new ft,"f"),this.domNode.append(lt(this,Q,"f").domNode),t.selectedBases.addEventListener("change",(()=>lt(this,$,"m",it).call(this))),lt(this,$,"m",it).call(this)}isDisabled(){return lt(this,K,"f").isDisabled()}}K=new WeakMap,Q=new WeakMap,J=new WeakMap,Z=new WeakMap,tt=new WeakMap,$=new WeakSet,et=function(){lt(this,K,"f").disable()},nt=function(){lt(this,K,"f").enable()},rt=function(){let t=[...lt(this,J,"f").selectedBases].length;lt(this,Q,"f").textContent=0==t?"No bases are selected.":1==t?"Shift base.":"Shift bases."},it=function(){0==[...lt(this,J,"f").selectedBases].length?lt(this,$,"m",et).call(this):lt(this,$,"m",nt).call(this),lt(this,$,"m",rt).call(this)},st=function(t){this.isDisabled()||0==t.button&&((0,P.detectMac)()&&t.ctrlKey||(ht(this,Z,!0,"f"),ht(this,tt,!1,"f")))},ot=function(t){if(!lt(this,Z,"f"))return;let e=lt(this,J,"f").drawing.horizontalClientScaling,n=lt(this,J,"f").drawing.verticalClientScaling;Number.isFinite(e)||(e=1),Number.isFinite(n)||(n=1),lt(this,tt,"f")||lt(this,J,"f").beforeDragging(),(0,ct.shift)([...lt(this,J,"f").selectedBases],{x:t.movementX/e,y:t.movementY/n}),ht(this,tt,!0,"f")},at=function(){ht(this,Z,!1,"f"),lt(this,tt,"f")&&lt(this,J,"f").afterDragging()};class ft{constructor(){ut.set(this,void 0),ht(this,ut,document.createElement("p"),"f"),lt(this,ut,"f").classList.add(U.Ks);let t=document.createElement("div");t.classList.add(U.Qs),t.append(lt(this,ut,"f")),this.domNode=document.createElement("div"),this.domNode.classList.add(U.YL),this.domNode.append(t)}get textContent(){return lt(this,ut,"f").textContent}set textContent(t){lt(this,ut,"f").textContent=t}}ut=new WeakMap;var pt=n(213),mt={};mt.styleTagTransform=v(),mt.setAttributes=m(),mt.insert=f().bind(null,"head"),mt.domAPI=l(),mt.insertStyleElement=y(),c()(pt.Ay,mt),pt.Ay&&pt.Ay.locals&&pt.Ay.locals;var gt,yt,bt,vt,wt,xt,St,_t,Pt,Mt,Nt,Ot,Ct,Et,Tt=n(725),At=function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n},jt=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class kt{constructor(t){gt.add(this),this.domNode=document.createElement("div"),yt.set(this,void 0),bt.set(this,void 0),vt.set(this,void 0),wt.set(this,!1),xt.set(this,!1),At(this,vt,t,"f"),this.domNode.classList.add(pt.nj);let e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttribute("viewBox","0 0 24 24"),e.setAttribute("width","24"),e.setAttribute("height","24"),e.innerHTML='\n <path\n d="M 18 18 A 6 6 0 1 1 6, 6"\n stroke="white" stroke-width="1" fill="none"\n ></path>\n <path\n d="M 6 18 A 6 6 0 1 1 18, 6"\n stroke="white"l stroke-width="1" fill="none"\n ></path>\n <path\n d="M 18 6 l 3 -3 v 6 h -6 z"\n stroke="white" stroke-width="1" fill="white"\n ></path>\n ',At(this,yt,new A(e),"f"),jt(this,yt,"f").domNode.classList.add(pt.x6,pt.kZ),this.domNode.append(jt(this,yt,"f").domNode),jt(this,yt,"f").domNode.addEventListener("mousedown",(t=>jt(this,gt,"m",Nt).call(this,t))),window.addEventListener("mousemove",(t=>jt(this,gt,"m",Ot).call(this,t))),window.addEventListener("mouseup",(()=>jt(this,gt,"m",Ct).call(this))),this.domNode.style.borderRadius=jt(this,yt,"f").domNode.style.borderRadius,At(this,bt,new Dt,"f"),this.domNode.append(jt(this,bt,"f").domNode),t.selectedBases.addEventListener("change",(()=>jt(this,gt,"m",Mt).call(this))),jt(this,gt,"m",Mt).call(this)}isDisabled(){return jt(this,yt,"f").isDisabled()}}yt=new WeakMap,bt=new WeakMap,vt=new WeakMap,wt=new WeakMap,xt=new WeakMap,gt=new WeakSet,St=function(){jt(this,yt,"f").disable()},_t=function(){jt(this,yt,"f").enable()},Pt=function(){let t=[...jt(this,vt,"f").selectedBases].length;jt(this,bt,"f").textContent=0==t?"No bases are selected.":1==t?"At least two bases must be selected.":"Rotate bases."},Mt=function(){let t=[...jt(this,vt,"f").selectedBases].length;0==t||1==t?jt(this,gt,"m",St).call(this):jt(this,gt,"m",_t).call(this),jt(this,gt,"m",Pt).call(this)},Nt=function(t){this.isDisabled()||0==t.button&&((0,P.detectMac)()&&t.ctrlKey||(At(this,wt,!0,"f"),At(this,xt,!1,"f")))},Ot=function(t){if(!jt(this,wt,"f"))return;let e=[...jt(this,vt,"f").drawing.bases],n=new Set(jt(this,vt,"f").selectedBases),r=e.filter((t=>n.has(t)));if(r.length<2)return;let i=r[0],s=r[r.length-1],o=(0,Tt.midpoint)(i.clientCenterPoint,s.clientCenterPoint),a={x:t.clientX,y:t.clientY},u={x:a.x-t.movementX,y:a.y-t.movementY},c=(0,Tt.direction)(o,a),h=(0,Tt.direction)(o,u);jt(this,xt,"f")||jt(this,vt,"f").beforeDragging(),jt(this,vt,"f").drawing.rotate(r,c-h),At(this,xt,!0,"f")},Ct=function(){At(this,wt,!1,"f"),jt(this,xt,"f")&&jt(this,vt,"f").afterDragging()};class Dt{constructor(){Et.set(this,void 0),At(this,Et,document.createElement("p"),"f"),jt(this,Et,"f").classList.add(pt.Ks);let t=document.createElement("div");t.classList.add(pt.Qs),t.append(jt(this,Et,"f")),this.domNode=document.createElement("div"),this.domNode.classList.add(pt.YL),this.domNode.append(t)}get textContent(){return jt(this,Et,"f").textContent}set textContent(t){jt(this,Et,"f").textContent=t}}Et=new WeakMap;var Lt=n(334),Bt={};Bt.styleTagTransform=v(),Bt.setAttributes=m(),Bt.insert=f().bind(null,"head"),Bt.domAPI=l(),Bt.insertStyleElement=y(),c()(Lt.Ay,Bt),Lt.Ay&&Lt.Ay.locals&&Lt.Ay.locals;var It,Ft,Rt,Vt,qt,zt,Xt,Gt=function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n},Yt=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class Ht{constructor(t){It.add(this),Ft.set(this,void 0),Rt.set(this,void 0),Vt.set(this,void 0),qt.set(this,[]),Gt(this,Vt,t,"f"),Gt(this,Ft,new A("Layout"),"f"),Yt(this,Ft,"f").domNode.addEventListener("click",(()=>this.press())),Yt(this,Ft,"f").domNode.style.cursor="pointer",Gt(this,Rt,new Ut,"f"),this.domNode=document.createElement("div"),this.domNode.classList.add(Lt.Kf),this.domNode.append(Yt(this,Ft,"f").domNode,Yt(this,Rt,"f").domNode),this.domNode.style.borderRadius=Yt(this,Ft,"f").domNode.style.borderRadius,Yt(this,qt,"f").push(new P.KeyBinding("L",(()=>this.press()))),Yt(this,qt,"f").forEach((t=>t.scope=this.domNode)),Yt(this,It,"m",zt).call(this)}press(){Yt(this,Vt,"f").openForm(Yt(this,Vt,"f").forms.layout)}get keyBindings(){return[...Yt(this,qt,"f")]}}Ft=new WeakMap,Rt=new WeakMap,Vt=new WeakMap,qt=new WeakMap,It=new WeakSet,zt=function(){Yt(this,Rt,"f").textContent="Open the Layout form. [ L ]"};class Ut{constructor(){Xt.set(this,void 0),Gt(this,Xt,document.createElement("p"),"f"),Yt(this,Xt,"f").classList.add(Lt.Ks);let t=document.createElement("div");t.classList.add(Lt.Qs),t.append(Yt(this,Xt,"f")),this.domNode=document.createElement("div"),this.domNode.classList.add(Lt.YL),this.domNode.append(t)}get textContent(){return Yt(this,Xt,"f").textContent}set textContent(t){Yt(this,Xt,"f").textContent=t}}Xt=new WeakMap;var Wt=n(598),$t={};$t.styleTagTransform=v(),$t.setAttributes=m(),$t.insert=f().bind(null,"head"),$t.domAPI=l(),$t.insertStyleElement=y(),c()(Wt.Ay,$t),Wt.Ay&&Wt.Ay.locals&&Wt.Ay.locals;var Kt,Qt,Jt,Zt,te,ee,ne,re,ie,se,oe=function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n},ae=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class ue{constructor(t){Kt.add(this),this.domNode=document.createElement("div"),Qt.set(this,void 0),Jt.set(this,void 0),Zt.set(this,void 0),te.set(this,[]),oe(this,Zt,t,"f"),this.domNode.classList.add(Wt.ke);let e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttribute("viewBox","0 0 24 24"),e.setAttribute("width","24"),e.setAttribute("height","24"),e.innerHTML='\n <path\n d="M 10 18 H 16 A 6 6 0 1 0 16 6 h -10"\n stroke="white" stroke-width="1" fill="none"\n ></path>\n <path\n d="M 6 6 v -4 l -4 4 l 4 4 v -4 z"\n stroke="white" stroke-width="1" fill="white"\n ></path>\n ',oe(this,Qt,new A(e),"f"),ae(this,Qt,"f").domNode.classList.add(Wt.vk),ae(this,Qt,"f").domNode.addEventListener("click",(()=>this.press())),ae(this,Qt,"f").domNode.style.padding="4px 6px",this.domNode.append(ae(this,Qt,"f").domNode),oe(this,Jt,new ce,"f"),this.domNode.append(ae(this,Jt,"f").domNode),this.domNode.style.borderRadius=ae(this,Qt,"f").domNode.style.borderRadius,ae(this,te,"f").push(new P.KeyBinding("Z",(()=>this.press()),{ctrlKey:!0,shiftKey:!1})),ae(this,te,"f").push(new P.KeyBinding("Z",(()=>this.press()),{metaKey:!0,shiftKey:!1})),ae(this,te,"f").forEach((t=>t.scope=this.domNode)),t.undoStack.addEventListener("change",(()=>ae(this,Kt,"m",ie).call(this))),ae(this,Kt,"m",ie).call(this)}isDisabled(){return ae(this,Qt,"f").isDisabled()}press(){this.isDisabled()||ae(this,Zt,"f").undoStack.isEmpty()||ae(this,Zt,"f").undo()}get keyBindings(){return[...ae(this,te,"f")]}}Qt=new WeakMap,Jt=new WeakMap,Zt=new WeakMap,te=new WeakMap,Kt=new WeakSet,ee=function(){ae(this,Qt,"f").disable(),ae(this,Qt,"f").domNode.classList.remove(Wt.vk),ae(this,Qt,"f").domNode.classList.add(Wt.kZ)},ne=function(){ae(this,Qt,"f").enable(),ae(this,Qt,"f").domNode.classList.add(Wt.vk),ae(this,Qt,"f").domNode.classList.remove(Wt.kZ)},re=function(){let t=(0,P.detectMac)()?"[ ⌘ Z ]":"[ Ctrl+Z ]";ae(this,Zt,"f").undoStack.isEmpty()?ae(this,Jt,"f").textContent="Can't undo.":ae(this,Jt,"f").textContent=`Undo. ${t}`},ie=function(){ae(this,Zt,"f").undoStack.isEmpty()?ae(this,Kt,"m",ee).call(this):ae(this,Kt,"m",ne).call(this),ae(this,Kt,"m",re).call(this)};class ce{constructor(){this.domNode=document.createElement("div"),se.set(this,void 0),oe(this,se,document.createElement("p"),"f"),ae(this,se,"f").classList.add(Wt.Ks);let t=document.createElement("div");t.classList.add(Wt.Qs),t.append(ae(this,se,"f")),this.domNode.classList.add(Wt.YL),this.domNode.append(t)}get textContent(){return ae(this,se,"f").textContent}set textContent(t){ae(this,se,"f").textContent=t}}se=new WeakMap;var he=n(608),le={};le.styleTagTransform=v(),le.setAttributes=m(),le.insert=f().bind(null,"head"),le.domAPI=l(),le.insertStyleElement=y(),c()(he.Ay,le),he.Ay&&he.Ay.locals&&he.Ay.locals;var de,fe,pe,me,ge,ye,be,ve,we,xe,Se=function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n},_e=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class Pe{constructor(t){de.add(this),this.domNode=document.createElement("div"),fe.set(this,void 0),pe.set(this,void 0),me.set(this,void 0),ge.set(this,[]),Se(this,me,t,"f"),this.domNode.classList.add(he.kn);let e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttribute("viewBox","0 0 24 24"),e.setAttribute("width","24"),e.setAttribute("height","24"),e.innerHTML='\n <path\n d="M 14 18 H 8 A 6 6 0 1 1 8 6 h 10"\n stroke="white" stroke-width="1" fill="none"\n ></path>\n <path\n d="M 18 6 v -4 l 4 4 l -4 4 v -4 z"\n stroke="white" stroke-width="1" fill="white"\n ></path>\n ',Se(this,fe,new A(e),"f"),_e(this,fe,"f").domNode.classList.add(he.vk),_e(this,fe,"f").domNode.addEventListener("click",(()=>this.press())),_e(this,fe,"f").domNode.style.padding="4px 6px",this.domNode.append(_e(this,fe,"f").domNode),Se(this,pe,new Me,"f"),this.domNode.append(_e(this,pe,"f").domNode),this.domNode.style.borderRadius=_e(this,fe,"f").domNode.style.borderRadius,_e(this,ge,"f").push(new P.KeyBinding("Z",(()=>this.press()),{ctrlKey:!0,shiftKey:!0})),_e(this,ge,"f").push(new P.KeyBinding("Z",(()=>this.press()),{metaKey:!0,shiftKey:!0})),_e(this,ge,"f").forEach((t=>t.scope=this.domNode)),t.redoStack.addEventListener("change",(()=>_e(this,de,"m",we).call(this))),_e(this,de,"m",we).call(this)}isDisabled(){return _e(this,fe,"f").isDisabled()}press(){this.isDisabled()||_e(this,me,"f").redoStack.isEmpty()||_e(this,me,"f").redo()}get keyBindings(){return[..._e(this,ge,"f")]}}fe=new WeakMap,pe=new WeakMap,me=new WeakMap,ge=new WeakMap,de=new WeakSet,ye=function(){_e(this,fe,"f").disable(),_e(this,fe,"f").domNode.classList.remove(he.vk),_e(this,fe,"f").domNode.classList.add(he.kZ)},be=function(){_e(this,fe,"f").enable(),_e(this,fe,"f").domNode.classList.add(he.vk),_e(this,fe,"f").domNode.classList.remove(he.kZ)},ve=function(){let t=(0,P.detectMac)()?"[ ⇧ ⌘ Z ]":"[ Shift+Ctrl+Z ]";_e(this,me,"f").redoStack.isEmpty()?_e(this,pe,"f").textContent="Can't redo.":_e(this,pe,"f").textContent=`Redo. ${t}`},we=function(){_e(this,me,"f").redoStack.isEmpty()?_e(this,de,"m",ye).call(this):_e(this,de,"m",be).call(this),_e(this,de,"m",ve).call(this)};class Me{constructor(){this.domNode=document.createElement("div"),xe.set(this,void 0),Se(this,xe,document.createElement("p"),"f"),_e(this,xe,"f").classList.add(he.Ks);let t=document.createElement("div");t.classList.add(he.Qs),t.append(_e(this,xe,"f")),this.domNode.classList.add(he.YL),this.domNode.append(t)}get textContent(){return _e(this,xe,"f").textContent}set textContent(t){_e(this,xe,"f").textContent=t}}xe=new WeakMap;var Ne=n(914),Oe={};Oe.styleTagTransform=v(),Oe.setAttributes=m(),Oe.insert=f().bind(null,"head"),Oe.domAPI=l(),Oe.insertStyleElement=y(),c()(Ne.Ay,Oe),Ne.Ay&&Ne.Ay.locals&&Ne.Ay.locals;var Ce,Ee,Te,Ae,je,ke,De,Le=function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n},Be=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class Ie{constructor(t){Ce.add(this),Ee.set(this,void 0),Te.set(this,void 0),Ae.set(this,void 0),je.set(this,[]),Le(this,Ae,t,"f"),Le(this,Ee,new A("Export"),"f"),Be(this,Ee,"f").domNode.addEventListener("click",(()=>this.press())),Be(this,Ee,"f").domNode.style.cursor="pointer",Le(this,Te,new Fe,"f"),this.domNode=document.createElement("div"),this.domNode.classList.add(Ne.Y2),this.domNode.append(Be(this,Ee,"f").domNode,Be(this,Te,"f").domNode),this.domNode.style.borderRadius=Be(this,Ee,"f").domNode.style.borderRadius,Be(this,je,"f").push(new P.KeyBinding("E",(()=>this.press()))),Be(this,je,"f").forEach((t=>t.scope=this.domNode)),Be(this,Ce,"m",ke).call(this)}press(){Be(this,Ae,"f").openForm(Be(this,Ae,"f").forms.export)}get keyBindings(){return[...Be(this,je,"f")]}}Ee=new WeakMap,Te=new WeakMap,Ae=new WeakMap,je=new WeakMap,Ce=new WeakSet,ke=function(){Be(this,Te,"f").textContent="Open the Export form. [ E ]"};class Fe{constructor(){De.set(this,void 0),Le(this,De,document.createElement("p"),"f"),Be(this,De,"f").classList.add(Ne.Ks);let t=document.createElement("div");t.classList.add(Ne.Qs),t.append(Be(this,De,"f")),this.domNode=document.createElement("div"),this.domNode.classList.add(Ne.YL),this.domNode.append(t)}get textContent(){return Be(this,De,"f").textContent}set textContent(t){Be(this,De,"f").textContent=t}}De=new WeakMap;var Re,Ve,qe,ze,Xe,Ge,Ye,He,Ue=n(139),We=n(277),$e=function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n},Ke=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class Qe{constructor(t){this.domNode=document.createElement("div"),Re.set(this,void 0),Ve.set(this,void 0),qe.set(this,void 0),ze.set(this,void 0),Xe.set(this,void 0),Ge.set(this,void 0),Ye.set(this,void 0),He.set(this,void 0),$e(this,Re,t,"f"),this.domNode.classList.add(w.KE),this.domNode.appendChild(function(){let t=document.createElement("div");return t.classList.add(S.k$),t.append(M(),M(),M(),M(),M(),M(),M(),M()),t.append(function(){let t=document.createElement("div");t.classList.add(S.YL);let e=document.createElement("div");e.classList.add(S.Qs),t.append(e);let n=`${N} when dragging to avoid pressing buttons.`,r=document.createElement("p");return r.classList.add(S.Ks),r.textContent=`Anywhere along the Toolbar can be dragged. ${n}`,e.append(r),t}()),t}()),$e(this,Ve,new Y(t),"f"),this.domNode.append(Ke(this,Ve,"f").domNode),$e(this,qe,new dt(t),"f"),this.domNode.append(Ke(this,qe,"f").domNode),$e(this,ze,new kt(t),"f"),this.domNode.append(Ke(this,ze,"f").domNode),$e(this,Xe,new Ht(t),"f"),this.domNode.append(Ke(this,Xe,"f").domNode),$e(this,Ge,new ue(t),"f"),this.domNode.append(Ke(this,Ge,"f").domNode),$e(this,Ye,new Pe(t),"f"),this.domNode.append(Ke(this,Ye,"f").domNode),$e(this,He,new Ie(t),"f"),this.domNode.append(Ke(this,He,"f").domNode),this.dragTranslater=new Ue.DragTranslater(this.domNode),this.dragTranslater.interactionDepth="deep",this.domNode.oncontextmenu=()=>!1,[...this.keyBindings].forEach((t=>t.scope=this.domNode))}appendTo(t){t.appendChild(this.domNode)}remove(){this.domNode.remove()}reposition(){this.dragTranslater.untranslate()}get displacement(){return We.Vector.matching(this.dragTranslater.currentTranslation)}hide(){this.domNode.style.visibility="hidden"}unhide(){this.domNode.style.visibility="visible"}isHidden(){return["hidden","collapse"].includes(this.domNode.style.visibility)}get keyBindings(){return[...Ke(this,Ve,"f").keyBindings,...Ke(this,Ge,"f").keyBindings,...Ke(this,Ye,"f").keyBindings,...Ke(this,Xe,"f").keyBindings,...Ke(this,He,"f").keyBindings]}}Re=new WeakMap,Ve=new WeakMap,qe=new WeakMap,ze=new WeakMap,Xe=new WeakMap,Ge=new WeakMap,Ye=new WeakMap,He=new WeakMap;var Je=n(419),Ze={};Ze.styleTagTransform=v(),Ze.setAttributes=m(),Ze.insert=f().bind(null,"head"),Ze.domAPI=l(),Ze.insertStyleElement=y(),c()(Je.Ay,Ze),Je.Ay&&Je.Ay.locals&&Je.Ay.locals;const tn={},en=[];function nn(t,e){if(Array.isArray(t))for(const n of t)nn(n,e);else if("object"!=typeof t)sn(Object.getOwnPropertyNames(e)),tn[t]=Object.assign(tn[t]||{},e);else for(const e in t)nn(e,t[e])}function rn(t){return tn[t]||{}}function sn(t){en.push(...t)}function on(t,e){let n;const r=t.length,i=[];for(n=0;n<r;n++)i.push(e(t[n]));return i}function an(t){return t%360*Math.PI/180}function un(t){return t.charAt(0).toUpperCase()+t.slice(1)}function cn(t,e,n,r){return null!=e&&null!=n||(r=r||t.bbox(),null==e?e=r.width/r.height*n:null==n&&(n=r.height/r.width*e)),{width:e,height:n}}function hn(t,e){const n=t.origin;let r=null!=t.ox?t.ox:null!=t.originX?t.originX:"center",i=null!=t.oy?t.oy:null!=t.originY?t.originY:"center";null!=n&&([r,i]=Array.isArray(n)?n:"object"==typeof n?[n.x,n.y]:[n,n]);const s="string"==typeof r,o="string"==typeof i;if(s||o){const{height:t,width:n,x:a,y:u}=e.bbox();s&&(r=r.includes("left")?a:r.includes("right")?a+n:a+n/2),o&&(i=i.includes("top")?u:i.includes("bottom")?u+t:u+t/2)}return[r,i]}const ln=new Set(["desc","metadata","title"]),dn=t=>ln.has(t.nodeName),fn=(t,e,n={})=>{const r={...e};for(const t in r)r[t].valueOf()===n[t]&&delete r[t];Object.keys(r).length?t.node.setAttribute("data-svgjs",JSON.stringify(r)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},pn="http://www.w3.org/2000/svg",mn="http://www.w3.org/2000/xmlns/",gn="http://www.w3.org/1999/xlink",yn={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};class bn{}const vn={},wn="___SYMBOL___ROOT___";function xn(t,e=pn){return yn.document.createElementNS(e,t)}function Sn(t,e=!1){if(t instanceof bn)return t;if("object"==typeof t)return Mn(t);if(null==t)return new vn[wn];if("string"==typeof t&&"<"!==t.charAt(0))return Mn(yn.document.querySelector(t));const n=e?yn.document.createElement("div"):xn("svg");return n.innerHTML=t,t=Mn(n.firstChild),n.removeChild(n.firstChild),t}function _n(t,e){return e&&(e instanceof yn.window.Node||e.ownerDocument&&e instanceof e.ownerDocument.defaultView.Node)?e:xn(t)}function Pn(t){if(!t)return null;if(t.instance instanceof bn)return t.instance;if("#document-fragment"===t.nodeName)return new vn.Fragment(t);let e=un(t.nodeName||"Dom");return"LinearGradient"===e||"RadialGradient"===e?e="Gradient":vn[e]||(e="Dom"),new vn[e](t)}let Mn=Pn;function Nn(t,e=t.name,n=!1){return vn[e]=t,n&&(vn[wn]=t),sn(Object.getOwnPropertyNames(t.prototype)),t}let On=1e3;function Cn(t){return"Svgjs"+un(t)+On++}function En(t){for(let e=t.children.length-1;e>=0;e--)En(t.children[e]);return t.id?(t.id=Cn(t.nodeName),t):t}function Tn(t,e){let n,r;for(r=(t=Array.isArray(t)?t:[t]).length-1;r>=0;r--)for(n in e)t[r].prototype[n]=e[n]}function An(t){return function(...e){const n=e[e.length-1];return!n||n.constructor!==Object||n instanceof Array?t.apply(this,e):t.apply(this,e.slice(0,-1)).attr(n)}}nn("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=Sn(t)).remove();const e=this.position();return this.parent().add(t,e),this},after:function(t){(t=Sn(t)).remove();const e=this.position();return this.parent().add(t,e+1),this},insertBefore:function(t){return(t=Sn(t)).before(this),this},insertAfter:function(t){return(t=Sn(t)).after(this),this}});const jn=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,kn=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Dn=/rgb\((\d+),(\d+),(\d+)\)/,Ln=/(#[a-z_][a-z0-9\-_]*)/i,Bn=/\)\s*,?\s*/,In=/\s/g,Fn=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,Rn=/^rgb\(/,Vn=/^(\s+)?$/,qn=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,zn=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,Xn=/[\s,]+/,Gn=/[MLHVCSQTAZ]/i;function Yn(t){const e=Math.round(t),n=Math.max(0,Math.min(255,e)).toString(16);return 1===n.length?"0"+n:n}function Hn(t,e){for(let n=e.length;n--;)if(null==t[e[n]])return!1;return!0}function Un(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t}nn("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(Xn)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const e=this.classes();e.push(t),this.attr("class",e.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(e){return e!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),nn("Dom",{css:function(t,e){const n={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const e=t.split(/\s*:\s*/);n[e[0]]=e[1]})),n;if(arguments.length<2){if(Array.isArray(t)){for(const e of t){const t=e;n[e]=this.node.style.getPropertyValue(t)}return n}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const e in t)this.node.style.setProperty(e,null==t[e]||Vn.test(t[e])?"":t[e])}return 2===arguments.length&&this.node.style.setProperty(t,null==e||Vn.test(e)?"":e),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),nn("Dom",{data:function(t,e,n){if(null==t)return this.data(on(function(t){let e;const n=t.length,r=[];for(e=0;e<n;e++)0===t[e].nodeName.indexOf("data-")&&r.push(t[e]);return r}(this.node.attributes),(t=>t.nodeName.slice(5))));if(t instanceof Array){const e={};for(const n of t)e[n]=this.data(n);return e}if("object"==typeof t)for(e in t)this.data(e,t[e]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(e){return this.attr("data-"+t)}else this.attr("data-"+t,null===e?null:!0===n||"string"==typeof e||"number"==typeof e?e:JSON.stringify(e));return this}}),nn("Dom",{remember:function(t,e){if("object"==typeof arguments[0])for(const e in t)this.remember(e,t[e]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=e}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class Wn{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof Wn||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(t="vibrant",e){const{random:n,round:r,sin:i,PI:s}=Math;if("vibrant"===t){const t=24*n()+57,e=38*n()+45,r=360*n();return new Wn(t,e,r,"lch")}if("sine"===t){const t=r(80*i(2*s*(e=null==e?n():e)/.5+.01)+150),o=r(50*i(2*s*e/.5+4.6)+200),a=r(100*i(2*s*e/.5+2.3)+150);return new Wn(t,o,a)}if("pastel"===t){const t=8*n()+86,e=17*n()+9,r=360*n();return new Wn(t,e,r,"lch")}if("dark"===t){const t=10+10*n(),e=50*n()+86,r=360*n();return new Wn(t,e,r,"lch")}if("rgb"===t){const t=255*n(),e=255*n(),r=255*n();return new Wn(t,e,r)}if("lab"===t){const t=100*n(),e=256*n()-128,r=256*n()-128;return new Wn(t,e,r,"lab")}if("grey"===t){const t=255*n();return new Wn(t,t,t)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(Fn.test(t)||Rn.test(t))}cmyk(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.min(1-r,1-i,1-s);return 1===o?new Wn(0,0,0,1,"cmyk"):new Wn((1-r-o)/(1-o),(1-i-o)/(1-o),(1-s-o)/(1-o),o,"cmyk")}hsl(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=Math.max(r,i,s),a=Math.min(r,i,s),u=(o+a)/2,c=o===a,h=o-a;return new Wn(360*(c?0:o===r?((i-s)/h+(i<s?6:0))/6:o===i?((s-r)/h+2)/6:o===s?((r-i)/h+4)/6:0),100*(c?0:u>.5?h/(2-o-a):h/(o+a)),100*u,"hsl")}init(t=0,e=0,n=0,r=0,i="rgb"){if(t=t||0,this.space)for(const t in this.space)delete this[this.space[t]];if("number"==typeof t)i="string"==typeof r?r:i,r="string"==typeof r?0:r,Object.assign(this,{_a:t,_b:e,_c:n,_d:r,space:i});else if(t instanceof Array)this.space=e||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const n=function(t,e){const n=Hn(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:Hn(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:Hn(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:Hn(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:Hn(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:Hn(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return n.space=e||n.space,n}(t,e);Object.assign(this,n)}else if("string"==typeof t)if(Rn.test(t)){const e=t.replace(In,""),[n,r,i]=Dn.exec(e).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}else{if(!Fn.test(t))throw Error("Unsupported string format, can't construct Color");{const e=t=>parseInt(t,16),[,n,r,i]=kn.exec(function(t){return 4===t.length?["#",t.substring(1,2),t.substring(1,2),t.substring(2,3),t.substring(2,3),t.substring(3,4),t.substring(3,4)].join(""):t}(t)).map(e);Object.assign(this,{_a:n,_b:r,_c:i,_d:0,space:"rgb"})}}const{_a:s,_b:o,_c:a,_d:u}=this,c="rgb"===this.space?{r:s,g:o,b:a}:"xyz"===this.space?{x:s,y:o,z:a}:"hsl"===this.space?{h:s,s:o,l:a}:"lab"===this.space?{l:s,a:o,b:a}:"lch"===this.space?{l:s,c:o,h:a}:"cmyk"===this.space?{c:s,m:o,y:a,k:u}:{};Object.assign(this,c)}lab(){const{x:t,y:e,z:n}=this.xyz();return new Wn(116*e-16,500*(t-e),200*(e-n),"lab")}lch(){const{l:t,a:e,b:n}=this.lab(),r=Math.sqrt(e**2+n**2);let i=180*Math.atan2(n,e)/Math.PI;return i<0&&(i*=-1,i=360-i),new Wn(t,r,i,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(t=this.space)||"xyz"===t||"lch"===t){let{x:t,y:e,z:n}=this;if("lab"===this.space||"lch"===this.space){let{l:r,a:i,b:s}=this;if("lch"===this.space){const{c:t,h:e}=this,n=Math.PI/180;i=t*Math.cos(n*e),s=t*Math.sin(n*e)}const o=(r+16)/116,a=i/500+o,u=o-s/200,c=16/116,h=.008856,l=7.787;t=.95047*(a**3>h?a**3:(a-c)/l),e=1*(o**3>h?o**3:(o-c)/l),n=1.08883*(u**3>h?u**3:(u-c)/l)}const r=3.2406*t+-1.5372*e+-.4986*n,i=-.9689*t+1.8758*e+.0415*n,s=.0557*t+-.204*e+1.057*n,o=Math.pow,a=.0031308,u=r>a?1.055*o(r,1/2.4)-.055:12.92*r,c=i>a?1.055*o(i,1/2.4)-.055:12.92*i,h=s>a?1.055*o(s,1/2.4)-.055:12.92*s;return new Wn(255*u,255*c,255*h)}if("hsl"===this.space){let{h:t,s:e,l:n}=this;if(t/=360,e/=100,n/=100,0===e)return n*=255,new Wn(n,n,n);const r=n<.5?n*(1+e):n+e-n*e,i=2*n-r,s=255*Un(i,r,t+1/3),o=255*Un(i,r,t),a=255*Un(i,r,t-1/3);return new Wn(s,o,a)}if("cmyk"===this.space){const{c:t,m:e,y:n,k:r}=this,i=255*(1-Math.min(1,t*(1-r)+r)),s=255*(1-Math.min(1,e*(1-r)+r)),o=255*(1-Math.min(1,n*(1-r)+r));return new Wn(i,s,o)}return this;var t}toArray(){const{_a:t,_b:e,_c:n,_d:r,space:i}=this;return[t,e,n,r,i]}toHex(){const[t,e,n]=this._clamped().map(Yn);return`#${t}${e}${n}`}toRgb(){const[t,e,n]=this._clamped();return`rgb(${t},${e},${n})`}toString(){return this.toHex()}xyz(){const{_a:t,_b:e,_c:n}=this.rgb(),[r,i,s]=[t,e,n].map((t=>t/255)),o=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,a=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,u=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,c=(.4124*o+.3576*a+.1805*u)/.95047,h=(.2126*o+.7152*a+.0722*u)/1,l=(.0193*o+.1192*a+.9505*u)/1.08883,d=c>.008856?Math.pow(c,1/3):7.787*c+16/116,f=h>.008856?Math.pow(h,1/3):7.787*h+16/116,p=l>.008856?Math.pow(l,1/3):7.787*l+16/116;return new Wn(d,f,p,"xyz")}_clamped(){const{_a:t,_b:e,_c:n}=this.rgb(),{max:r,min:i,round:s}=Math;return[t,e,n].map((t=>r(0,i(s(t),255))))}}class $n{constructor(...t){this.init(...t)}clone(){return new $n(this)}init(t,e){const n=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:e};return this.x=null==n.x?0:n.x,this.y=null==n.y?0:n.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){Qn.isMatrixLike(t)||(t=new Qn(t));const{x:e,y:n}=this;return this.x=t.a*e+t.c*n+t.e,this.y=t.b*e+t.d*n+t.f,this}}function Kn(t,e,n){return Math.abs(e-t)<(n||1e-6)}class Qn{constructor(...t){this.init(...t)}static formatTransforms(t){const e="both"===t.flip||!0===t.flip,n=t.flip&&(e||"x"===t.flip)?-1:1,r=t.flip&&(e||"y"===t.flip)?-1:1,i=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,s=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,o=t.scale&&t.scale.length?t.scale[0]*n:isFinite(t.scale)?t.scale*n:isFinite(t.scaleX)?t.scaleX*n:n,a=t.scale&&t.scale.length?t.scale[1]*r:isFinite(t.scale)?t.scale*r:isFinite(t.scaleY)?t.scaleY*r:r,u=t.shear||0,c=t.rotate||t.theta||0,h=new $n(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),l=h.x,d=h.y,f=new $n(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=f.x,m=f.y,g=new $n(t.translate||t.tx||t.translateX,t.ty||t.translateY),y=g.x,b=g.y,v=new $n(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:o,scaleY:a,skewX:i,skewY:s,shear:u,theta:c,rx:v.x,ry:v.y,tx:y,ty:b,ox:l,oy:d,px:p,py:m}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,e,n){const r=t.a*e.a+t.c*e.b,i=t.b*e.a+t.d*e.b,s=t.a*e.c+t.c*e.d,o=t.b*e.c+t.d*e.d,a=t.e+t.a*e.e+t.c*e.f,u=t.f+t.b*e.e+t.d*e.f;return n.a=r,n.b=i,n.c=s,n.d=o,n.e=a,n.f=u,n}around(t,e,n){return this.clone().aroundO(t,e,n)}aroundO(t,e,n){const r=t||0,i=e||0;return this.translateO(-r,-i).lmultiplyO(n).translateO(r,i)}clone(){return new Qn(this)}decompose(t=0,e=0){const n=this.a,r=this.b,i=this.c,s=this.d,o=this.e,a=this.f,u=n*s-r*i,c=u>0?1:-1,h=c*Math.sqrt(n*n+r*r),l=Math.atan2(c*r,c*n),d=180/Math.PI*l,f=Math.cos(l),p=Math.sin(l),m=(n*i+r*s)/u,g=i*h/(m*n-r)||s*h/(m*r+n);return{scaleX:h,scaleY:g,shear:m,rotate:d,translateX:o-t+t*f*h+e*(m*f*h-p*g),translateY:a-e+t*p*h+e*(m*p*h+f*g),originX:t,originY:e,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;const e=new Qn(t);return Kn(this.a,e.a)&&Kn(this.b,e.b)&&Kn(this.c,e.c)&&Kn(this.d,e.d)&&Kn(this.e,e.e)&&Kn(this.f,e.f)}flip(t,e){return this.clone().flipO(t,e)}flipO(t,e){return"x"===t?this.scaleO(-1,1,e,0):"y"===t?this.scaleO(1,-1,0,e):this.scaleO(-1,-1,t,e||t)}init(t){const e=Qn.fromArray([1,0,0,1,0,0]);return t=t instanceof wr?t.matrixify():"string"==typeof t?Qn.fromArray(t.split(Xn).map(parseFloat)):Array.isArray(t)?Qn.fromArray(t):"object"==typeof t&&Qn.isMatrixLike(t)?t:"object"==typeof t?(new Qn).transform(t):6===arguments.length?Qn.fromArray([].slice.call(arguments)):e,this.a=null!=t.a?t.a:e.a,this.b=null!=t.b?t.b:e.b,this.c=null!=t.c?t.c:e.c,this.d=null!=t.d?t.d:e.d,this.e=null!=t.e?t.e:e.e,this.f=null!=t.f?t.f:e.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,e=this.b,n=this.c,r=this.d,i=this.e,s=this.f,o=t*r-e*n;if(!o)throw new Error("Cannot invert "+this);const a=r/o,u=-e/o,c=-n/o,h=t/o,l=-(a*i+c*s),d=-(u*i+h*s);return this.a=a,this.b=u,this.c=c,this.d=h,this.e=l,this.f=d,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const e=t instanceof Qn?t:new Qn(t);return Qn.matrixMultiply(e,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const e=t instanceof Qn?t:new Qn(t);return Qn.matrixMultiply(this,e,this)}rotate(t,e,n){return this.clone().rotateO(t,e,n)}rotateO(t,e=0,n=0){t=an(t);const r=Math.cos(t),i=Math.sin(t),{a:s,b:o,c:a,d:u,e:c,f:h}=this;return this.a=s*r-o*i,this.b=o*r+s*i,this.c=a*r-u*i,this.d=u*r+a*i,this.e=c*r-h*i+n*i-e*r+e,this.f=h*r+c*i-e*i-n*r+n,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t);const{a:i,b:s,c:o,d:a,e:u,f:c}=this;return this.a=i*t,this.b=s*e,this.c=o*t,this.d=a*e,this.e=u*t-n*t+n,this.f=c*e-r*e+r,this}shear(t,e,n){return this.clone().shearO(t,e,n)}shearO(t,e=0,n=0){const{a:r,b:i,c:s,d:o,e:a,f:u}=this;return this.a=r+i*t,this.c=s+o*t,this.e=a+u*t-n*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,e=t,n=0,r=0){3===arguments.length&&(r=n,n=e,e=t),t=an(t),e=an(e);const i=Math.tan(t),s=Math.tan(e),{a:o,b:a,c:u,d:c,e:h,f:l}=this;return this.a=o+a*i,this.b=a+o*s,this.c=u+c*i,this.d=c+u*s,this.e=h+l*i-r*i,this.f=l+h*s-n*s,this}skewX(t,e,n){return this.skew(t,0,e,n)}skewY(t,e,n){return this.skew(0,t,e,n)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(Qn.isMatrixLike(t))return new Qn(t).multiplyO(this);const e=Qn.formatTransforms(t),{x:n,y:r}=new $n(e.ox,e.oy).transform(this),i=(new Qn).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-n,-r).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(n,r);if(isFinite(e.px)||isFinite(e.py)){const t=new $n(n,r).transform(i),s=isFinite(e.px)?e.px-t.x:0,o=isFinite(e.py)?e.py-t.y:0;i.translateO(s,o)}return i.translateO(e.tx,e.ty),i}translate(t,e){return this.clone().translateO(t,e)}translateO(t,e){return this.e+=t||0,this.f+=e||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function Jn(){if(!Jn.nodes){const t=Sn().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const e=t.path().node;Jn.nodes={svg:t,path:e}}if(!Jn.nodes.svg.node.parentNode){const t=yn.document.body||yn.document.documentElement;Jn.nodes.svg.addTo(t)}return Jn.nodes}function Zn(t){return!(t.width||t.height||t.x||t.y)}Nn(Qn,"Matrix");class tr{constructor(...t){this.init(...t)}addOffset(){return this.x+=yn.window.pageXOffset,this.y+=yn.window.pageYOffset,new tr(this)}init(t){return t="string"==typeof t?t.split(Xn).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return Zn(this)}merge(t){const e=Math.min(this.x,t.x),n=Math.min(this.y,t.y),r=Math.max(this.x+this.width,t.x+t.width)-e,i=Math.max(this.y+this.height,t.y+t.height)-n;return new tr(e,n,r,i)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof Qn||(t=new Qn(t));let e=1/0,n=-1/0,r=1/0,i=-1/0;return[new $n(this.x,this.y),new $n(this.x2,this.y),new $n(this.x,this.y2),new $n(this.x2,this.y2)].forEach((function(s){s=s.transform(t),e=Math.min(e,s.x),n=Math.max(n,s.x),r=Math.min(r,s.y),i=Math.max(i,s.y)})),new tr(e,r,n-e,i-r)}}function er(t,e,n){let r;try{if(r=e(t.node),Zn(r)&&(i=t.node)!==yn.document&&!(yn.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===yn.document}).call(yn.document.documentElement,i))throw new Error("Element not in the dom")}catch(e){r=n(t)}var i;return r}nn({viewbox:{viewbox(t,e,n,r){return null==t?new tr(this.attr("viewBox")):this.attr("viewBox",new tr(t,e,n,r))},zoom(t,e){let{width:n,height:r}=this.attr(["width","height"]);if((n||r)&&"string"!=typeof n&&"string"!=typeof r||(n=this.node.clientWidth,r=this.node.clientHeight),!n||!r)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const i=this.viewbox(),s=n/i.width,o=r/i.height,a=Math.min(s,o);if(null==t)return a;let u=a/t;u===1/0&&(u=Number.MAX_SAFE_INTEGER/100),e=e||new $n(n/2/s+i.x,r/2/o+i.y);const c=new tr(i).transform(new Qn({scale:u,origin:e}));return this.viewbox(c)}}}),Nn(tr,"Box");class nr extends Array{constructor(t=[],...e){if(super(t,...e),"number"==typeof t)return this;this.length=0,this.push(...t)}}const rr=nr;Tn([nr],{each(t,...e){return"function"==typeof t?this.map(((e,n,r)=>t.call(e,e,n,r))):this.map((n=>n[t](...e)))},toArray(){return Array.prototype.concat.apply([],this)}});const ir=["toArray","constructor","each"];function sr(t,e){return new rr(on((e||yn.document).querySelectorAll(t),(function(t){return Pn(t)})))}nr.extend=function(t){t=t.reduce(((t,e)=>(ir.includes(e)||"_"===e[0]||(e in Array.prototype&&(t["$"+e]=Array.prototype[e]),t[e]=function(...t){return this.each(e,...t)}),t)),{}),Tn([nr],t)};let or=0;const ar={};function ur(t){let e=t.getEventHolder();return e===yn.window&&(e=ar),e.events||(e.events={}),e.events}function cr(t){return t.getEventTarget()}function hr(t,e,n,r,i){const s=n.bind(r||t),o=Sn(t),a=ur(o),u=cr(o);e=Array.isArray(e)?e:e.split(Xn),n._svgjsListenerId||(n._svgjsListenerId=++or),e.forEach((function(t){const e=t.split(".")[0],r=t.split(".")[1]||"*";a[e]=a[e]||{},a[e][r]=a[e][r]||{},a[e][r][n._svgjsListenerId]=s,u.addEventListener(e,s,i||!1)}))}function lr(t,e,n,r){const i=Sn(t),s=ur(i),o=cr(i);("function"!=typeof n||(n=n._svgjsListenerId))&&(e=Array.isArray(e)?e:(e||"").split(Xn)).forEach((function(t){const e=t&&t.split(".")[0],a=t&&t.split(".")[1];let u,c;if(n)s[e]&&s[e][a||"*"]&&(o.removeEventListener(e,s[e][a||"*"][n],r||!1),delete s[e][a||"*"][n]);else if(e&&a){if(s[e]&&s[e][a]){for(c in s[e][a])lr(o,[e,a].join("."),c);delete s[e][a]}}else if(a)for(t in s)for(u in s[t])a===u&&lr(o,[t,a].join("."));else if(e){if(s[e]){for(u in s[e])lr(o,[e,u].join("."));delete s[e]}}else{for(t in s)lr(o,t);!function(t){let e=t.getEventHolder();e===yn.window&&(e=ar),e.events&&(e.events={})}(i)}}))}class dr extends bn{addEventListener(){}dispatch(t,e,n){return function(t,e,n,r){const i=cr(t);return e instanceof yn.window.Event||(e=new yn.window.CustomEvent(e,{detail:n,cancelable:!0,...r})),i.dispatchEvent(e),e}(this,t,e,n)}dispatchEvent(t){const e=this.getEventHolder().events;if(!e)return!0;const n=e[t.type];for(const e in n)for(const r in n[e])n[e][r](t);return!t.defaultPrevented}fire(t,e,n){return this.dispatch(t,e,n),this}getEventHolder(){return this}getEventTarget(){return this}off(t,e,n){return lr(this,t,e,n),this}on(t,e,n,r){return hr(this,t,e,n,r),this}removeEventListener(){}}function fr(){}Nn(dr,"EventTarget");const pr={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class mr extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(Xn).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}}class gr{constructor(...t){this.init(...t)}convert(t){return new gr(this.value,t)}divide(t){return t=new gr(t),new gr(this/t,this.unit||t.unit)}init(t,e){return e=Array.isArray(t)?t[1]:e,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=e||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(e=t.match(jn))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):t instanceof gr&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new gr(t),new gr(this-t,this.unit||t.unit)}plus(t){return t=new gr(t),new gr(this+t,this.unit||t.unit)}times(t){return t=new gr(t),new gr(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const yr=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),br=[];class vr extends dr{constructor(t,e){super(),this.node=t,this.type=t.nodeName,e&&t!==e&&this.attr(e)}add(t,e){return(t=Sn(t)).removeNamespace&&this.node instanceof yn.window.SVGElement&&t.removeNamespace(),null==e?this.node.appendChild(t.node):t.node!==this.node.childNodes[e]&&this.node.insertBefore(t.node,this.node.childNodes[e]),this}addTo(t,e){return Sn(t).put(this,e)}children(){return new rr(on(this.node.children,(function(t){return Pn(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,e=!0){this.writeDataToDom();let n=this.node.cloneNode(t);return e&&(n=En(n)),new this.constructor(n)}each(t,e){const n=this.children();let r,i;for(r=0,i=n.length;r<i;r++)t.apply(n[r],[r,n]),e&&n[r].each(t,e);return this}element(t,e){return this.put(new vr(xn(t),e))}first(){return Pn(this.node.firstChild)}get(t){return Pn(this.node.childNodes[t])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(t){return this.index(t)>=0}html(t,e){return this.xml(t,e,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=Cn(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return Pn(this.node.lastChild)}matches(t){const e=this.node,n=e.matches||e.matchesSelector||e.msMatchesSelector||e.mozMatchesSelector||e.webkitMatchesSelector||e.oMatchesSelector||null;return n&&n.call(e,t)}parent(t){let e=this;if(!e.node.parentNode)return null;if(e=Pn(e.node.parentNode),!t)return e;do{if("string"==typeof t?e.matches(t):e instanceof t)return e}while(e=Pn(e.node.parentNode));return e}put(t,e){return t=Sn(t),this.add(t,e),t}putIn(t,e){return Sn(t).add(this,e)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=Sn(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,e=null){const n=10**t,r=this.attr(e);for(const t in r)"number"==typeof r[t]&&(r[t]=Math.round(r[t]*n)/n);return this.attr(r),this}svg(t,e){return this.xml(t,e,pn)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const e=this.parent();if(!e)return this.addTo(t);const n=e.index(this);return e.put(t,n).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){e=null==e||e,this.writeDataToDom();let n=this;if(null!=t){if(n=Pn(n.node.cloneNode(!0)),e){const e=t(n);if(n=e||n,!1===e)return""}n.each((function(){const e=t(this),n=e||this;!1===e?this.remove():e&&this!==n&&this.replace(n)}),!0)}return e?n.node.outerHTML:n.node.innerHTML}e=null!=e&&e;const r=xn("wrapper",n),i=yn.document.createDocumentFragment();r.innerHTML=t;for(let t=r.children.length;t--;)i.appendChild(r.firstElementChild);const s=this.parent();return e?this.replace(i)&&s:this.add(i)}}Tn(vr,{attr:function(t,e,n){if(null==t){t={},e=this.node.attributes;for(const n of e)t[n.nodeName]=qn.test(n.nodeValue)?parseFloat(n.nodeValue):n.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,e)=>(t[e]=this.attr(e),t)),{});if("object"==typeof t&&t.constructor===Object)for(e in t)this.attr(e,t[e]);else if(null===e)this.node.removeAttribute(t);else{if(null==e)return null==(e=this.node.getAttribute(t))?pr[t]:qn.test(e)?parseFloat(e):e;"number"==typeof(e=br.reduce(((e,n)=>n(t,e,this)),e))?e=new gr(e):yr.has(t)&&Wn.isColor(e)?e=new Wn(e):e.constructor===Array&&(e=new mr(e)),"leading"===t?this.leading&&this.leading(e):"string"==typeof n?this.node.setAttributeNS(n,t,e.toString()):this.node.setAttribute(t,e.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return sr(t,this.node)},findOne:function(t){return Pn(this.node.querySelector(t))}}),Nn(vr,"Dom");class wr extends vr{constructor(t,e){super(t,e),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,e){return this.cx(t).cy(e)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,e){return this.dx(t).dy(e)}dx(t=0){return this.x(new gr(t).plus(this.x()))}dy(t=0){return this.y(new gr(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,e){return this.x(t).y(e)}parents(t=this.root()){const e="string"==typeof t;e||(t=Sn(t));const n=new rr;let r=this;for(;(r=r.parent())&&r.node!==yn.document&&"#document-fragment"!==r.nodeName&&(n.push(r),e||r.node!==t.node)&&(!e||!r.matches(t));)if(r.node===this.root().node)return null;return n}reference(t){if(!(t=this.attr(t)))return null;const e=(t+"").match(Ln);return e?Sn(e[1]):null}root(){const t=this.parent(vn[wn]);return t&&t.root()}setData(t){return this.dom=t,this}size(t,e){const n=cn(this,t,e);return this.width(new gr(n.width)).height(new gr(n.height))}width(t){return this.attr("width",t)}writeDataToDom(){return fn(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}Tn(wr,{bbox:function(){const t=er(this,(t=>t.getBBox()),(t=>{try{const e=t.clone().addTo(Jn().svg).show(),n=e.node.getBBox();return e.remove(),n}catch(e){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${e.toString()}`)}}));return new tr(t)},rbox:function(t){const e=er(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),n=new tr(e);return t?n.transform(t.screenCTM().inverseO()):n.addOffset()},inside:function(t,e){const n=this.bbox();return t>n.x&&e>n.y&&t<n.x+n.width&&e<n.y+n.height},point:function(t,e){return new $n(t,e).transformO(this.screenCTM().inverseO())},ctm:function(){return new Qn(this.node.getCTM())},screenCTM:function(){try{if("function"==typeof this.isRoot&&!this.isRoot()){const t=this.rect(1,1),e=t.node.getScreenCTM();return t.remove(),new Qn(e)}return new Qn(this.node.getScreenCTM())}catch(t){return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new Qn}}}),Nn(wr,"Element");const xr={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,e){return"color"===e?t:t+"-"+e}};["fill","stroke"].forEach((function(t){const e={};let n;e[t]=function(e){if(void 0===e)return this.attr(t);if("string"==typeof e||e instanceof Wn||Wn.isRgb(e)||e instanceof wr)this.attr(t,e);else for(n=xr[t].length-1;n>=0;n--)null!=e[xr[t][n]]&&this.attr(xr.prefix(t,xr[t][n]),e[xr[t][n]]);return this},nn(["Element","Runner"],e)})),nn(["Element","Runner"],{matrix:function(t,e,n,r,i,s){return null==t?new Qn(this):this.attr("transform",new Qn(t,e,n,r,i,s))},rotate:function(t,e,n){return this.transform({rotate:t,ox:e,oy:n},!0)},skew:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:e,oy:n},!0):this.transform({skew:[t,e],ox:n,oy:r},!0)},shear:function(t,e,n){return this.transform({shear:t,ox:e,oy:n},!0)},scale:function(t,e,n,r){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:e,oy:n},!0):this.transform({scale:[t,e],ox:n,oy:r},!0)},translate:function(t,e){return this.transform({translate:[t,e]},!0)},relative:function(t,e){return this.transform({relative:[t,e]},!0)},flip:function(t="both",e="center"){return-1==="xybothtrue".indexOf(t)&&(e=t,t="both"),this.transform({flip:t,origin:e},!0)},opacity:function(t){return this.attr("opacity",t)}}),nn("radius",{radius:function(t,e=t){return"radialGradient"===(this._element||this).type?this.attr("r",new gr(t)):this.rx(t).ry(e)}}),nn("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new $n(this.node.getPointAtLength(t))}}),nn(["Element","Runner"],{font:function(t,e){if("object"==typeof t){for(e in t)this.font(e,t[e]);return this}return"leading"===t?this.leading(e):"anchor"===t?this.attr("text-anchor",e):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,e):this.attr(t,e)}}),nn("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,e){return t[e]=function(t){return null===t?this.off(e):this.on(e,t),this},t}),{})),nn("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(Bn).slice(0,-1).map((function(t){const e=t.trim().split("(");return[e[0],e[1].split(Xn).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,e){return"matrix"===e[0]?t.lmultiply(Qn.fromArray(e[1])):t[e[0]].apply(t,e[1])}),new Qn)},toParent:function(t,e){if(this===t)return this;if(dn(this.node))return this.addTo(t,e);const n=this.screenCTM(),r=t.screenCTM().inverse();return this.addTo(t,e).untransform().transform(r.multiply(n)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,e){if(null==t||"string"==typeof t){const e=new Qn(this).decompose();return null==t?e:e[t]}Qn.isMatrixLike(t)||(t={...t,origin:hn(t,this)});const n=new Qn(!0===e?this:e||!1).transform(t);return this.attr("transform",n)}});class Sr extends wr{flatten(){return this.each((function(){if(this instanceof Sr)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),e=t.index(this)){return e=-1===e?t.children().length:e,this.each((function(n,r){return r[r.length-n-1].toParent(t,e)})),this.remove()}}Nn(Sr,"Container");class _r extends Sr{constructor(t,e=t){super(_n("defs",t),e)}flatten(){return this}ungroup(){return this}}Nn(_r,"Defs");class Pr extends wr{}function Mr(t){return this.attr("rx",t)}function Nr(t){return this.attr("ry",t)}function Or(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Cr(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Er(t){return this.attr("cx",t)}function Tr(t){return this.attr("cy",t)}function Ar(t){return null==t?2*this.rx():this.rx(new gr(t).divide(2))}function jr(t){return null==t?2*this.ry():this.ry(new gr(t).divide(2))}Nn(Pr,"Shape");class kr extends Pr{constructor(t,e=t){super(_n("ellipse",t),e)}size(t,e){const n=cn(this,t,e);return this.rx(new gr(n.width).divide(2)).ry(new gr(n.height).divide(2))}}Tn(kr,t),nn("Container",{ellipse:An((function(t=0,e=t){return this.put(new kr).size(t,e).move(0,0)}))}),Nn(kr,"Ellipse");class Dr extends vr{constructor(t=yn.document.createDocumentFragment()){super(t)}xml(t,e,n){if("boolean"==typeof t&&(n=e,e=t,t=null),null==t||"function"==typeof t){const t=new vr(xn("wrapper",n));return t.add(this.node.cloneNode(!0)),t.xml(!1,n)}return super.xml(t,!1,n)}}Nn(Dr,"Fragment");const Lr=Dr;function Br(t,e){return"radialGradient"===(this._element||this).type?this.attr({fx:new gr(t),fy:new gr(e)}):this.attr({x1:new gr(t),y1:new gr(e)})}function Ir(t,e){return"radialGradient"===(this._element||this).type?this.attr({cx:new gr(t),cy:new gr(e)}):this.attr({x2:new gr(t),y2:new gr(e)})}class Fr extends Sr{constructor(t,e){super(_n(t+"Gradient","string"==typeof t?null:t),e)}attr(t,e,n){return"transform"===t&&(t="gradientTransform"),super.attr(t,e,n)}bbox(){return new tr}targets(){return sr("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}Tn(Fr,e),nn({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:An((function(t,e){return this.put(new Fr(t)).update(e)}))}}),Nn(Fr,"Gradient");class Rr extends Sr{constructor(t,e=t){super(_n("pattern",t),e)}attr(t,e,n){return"transform"===t&&(t="patternTransform"),super.attr(t,e,n)}bbox(){return new tr}targets(){return sr("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}nn({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:An((function(t,e,n){return this.put(new Rr).update(n).attr({x:0,y:0,width:t,height:e,patternUnits:"userSpaceOnUse"})}))}}),Nn(Rr,"Pattern");class Vr extends Pr{constructor(t,e=t){super(_n("image",t),e)}load(t,e){if(!t)return this;const n=new yn.window.Image;return hr(n,"load",(function(t){const r=this.parent(Rr);0===this.width()&&0===this.height()&&this.size(n.width,n.height),r instanceof Rr&&0===r.width()&&0===r.height()&&r.size(this.width(),this.height()),"function"==typeof e&&e.call(this,t)}),this),hr(n,"load error",(function(){lr(n)})),this.attr("href",n.src=t,gn)}}var qr;qr=function(t,e,n){return"fill"!==t&&"stroke"!==t||zn.test(e)&&(e=n.root().defs().image(e)),e instanceof Vr&&(e=n.root().defs().pattern(0,0,(t=>{t.add(e)}))),e},br.push(qr),nn({Container:{image:An((function(t,e){return this.put(new Vr).size(0,0).load(t,e)}))}}),Nn(Vr,"Image");class zr extends mr{bbox(){let t=-1/0,e=-1/0,n=1/0,r=1/0;return this.forEach((function(i){t=Math.max(i[0],t),e=Math.max(i[1],e),n=Math.min(i[0],n),r=Math.min(i[1],r)})),new tr(n,r,t-n,e-r)}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let n=this.length-1;n>=0;n--)this[n]=[this[n][0]+t,this[n][1]+e];return this}parse(t=[0,0]){const e=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(Xn).map(parseFloat)).length%2!=0&&t.pop();for(let n=0,r=t.length;n<r;n+=2)e.push([t[n],t[n+1]]);return e}size(t,e){let n;const r=this.bbox();for(n=this.length-1;n>=0;n--)r.width&&(this[n][0]=(this[n][0]-r.x)*t/r.width+r.x),r.height&&(this[n][1]=(this[n][1]-r.y)*e/r.height+r.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let e=0,n=this.length;e<n;e++)t.push(this[e].join(","));return t.join(" ")}transform(t){return this.clone().transformO(t)}transformO(t){Qn.isMatrixLike(t)||(t=new Qn(t));for(let e=this.length;e--;){const[n,r]=this[e];this[e][0]=t.a*n+t.c*r+t.e,this[e][1]=t.b*n+t.d*r+t.f}return this}}const Xr=zr;function Gr(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}function Yr(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}function Hr(t){const e=this.bbox();return null==t?e.width:this.size(t,e.height)}function Ur(t){const e=this.bbox();return null==t?e.height:this.size(e.width,t)}class Wr extends Pr{constructor(t,e=t){super(_n("line",t),e)}array(){return new zr([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(t,e){return this.attr(this.array().move(t,e).toLine())}plot(t,e,n,r){return null==t?this.array():(t=void 0!==e?{x1:t,y1:e,x2:n,y2:r}:new zr(t).toLine(),this.attr(t))}size(t,e){const n=cn(this,t,e);return this.attr(this.array().size(n.width,n.height).toLine())}}Tn(Wr,i),nn({Container:{line:An((function(...t){return Wr.prototype.plot.apply(this.put(new Wr),null!=t[0]?t:[0,0,0,0])}))}}),Nn(Wr,"Line");class $r extends Sr{constructor(t,e=t){super(_n("marker",t),e)}height(t){return this.attr("markerHeight",t)}orient(t){return this.attr("orient",t)}ref(t,e){return this.attr("refX",t).attr("refY",e)}toString(){return"url(#"+this.id()+")"}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}width(t){return this.attr("markerWidth",t)}}function Kr(t,e){return function(n){return null==n?this[t]:(this[t]=n,e&&e.call(this),this)}}nn({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:An((function(t,e,n){return this.put(new $r).size(t,e).ref(t/2,e/2).viewbox(0,0,t,e).attr("orient","auto").update(n)}))},marker:{marker(t,e,n,r){let i=["marker"];return"all"!==t&&i.push(t),i=i.join("-"),t=arguments[1]instanceof $r?arguments[1]:this.defs().marker(e,n,r),this.attr(i,t)}}}),Nn($r,"Marker");const Qr={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,e,n,r){return function(i){return i<0?t>0?e/t*i:n>0?r/n*i:0:i>1?n<1?(1-r)/(1-n)*i+(r-n)/(1-n):t<1?(1-e)/(1-t)*i+(e-t)/(1-t):1:3*i*(1-i)**2*e+3*i**2*(1-i)*r+i**3}},steps:function(t,e="end"){e=e.split("-").reverse()[0];let n=t;return"none"===e?--n:"both"===e&&++n,(r,i=!1)=>{let s=Math.floor(r*t);const o=r*s%1==0;return"start"!==e&&"both"!==e||++s,i&&o&&--s,r>=0&&s<0&&(s=0),r<=1&&s>n&&(s=n),s/n}}};class Jr{done(){return!1}}class Zr extends Jr{constructor(t=">"){super(),this.ease=Qr[t]||t}step(t,e,n){return"number"!=typeof t?n<1?t:e:t+(e-t)*this.ease(n)}}class ti extends Jr{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,e,n,r){return this.stepper(t,e,n,r)}}function ei(){const t=(this._duration||500)/1e3,e=this._overshoot||0,n=Math.PI,r=Math.log(e/100+1e-10),i=-r/Math.sqrt(n*n+r*r),s=3.9/(i*t);this.d=2*i*s,this.k=s*s}Tn(class extends ti{constructor(t=500,e=0){super(),this.duration(t).overshoot(e)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;n>100&&(n=16),n/=1e3;const i=r.velocity||0,s=-this.d*i-this.k*(t-e),o=t+i*n+s*n*n/2;return r.velocity=i+s*n,r.done=Math.abs(e-o)+Math.abs(i)<.002,r.done?e:o}},{duration:Kr("_duration",ei),overshoot:Kr("_overshoot",ei)}),Tn(class extends ti{constructor(t=.1,e=.01,n=0,r=1e3){super(),this.p(t).i(e).d(n).windup(r)}step(t,e,n,r){if("string"==typeof t)return t;if(r.done=n===1/0,n===1/0)return e;if(0===n)return t;const i=e-t;let s=(r.integral||0)+i*n;const o=(i-(r.error||0))/n,a=this._windup;return!1!==a&&(s=Math.max(-a,Math.min(s,a))),r.error=i,r.integral=s,r.done=Math.abs(i)<.001,r.done?e:t+(this.P*i+this.I*s+this.D*o)}},{windup:Kr("_windup"),p:Kr("P"),i:Kr("I"),d:Kr("D")});const ni={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},ri={M:function(t,e,n){return e.x=n.x=t[0],e.y=n.y=t[1],["M",e.x,e.y]},L:function(t,e){return e.x=t[0],e.y=t[1],["L",t[0],t[1]]},H:function(t,e){return e.x=t[0],["H",t[0]]},V:function(t,e){return e.y=t[0],["V",t[0]]},C:function(t,e){return e.x=t[4],e.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,e){return e.x=t[2],e.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,e){return e.x=t[2],e.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,e){return e.x=t[0],e.y=t[1],["T",t[0],t[1]]},Z:function(t,e,n){return e.x=n.x,e.y=n.y,["Z"]},A:function(t,e){return e.x=t[5],e.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},ii="mlhvqtcsaz".split("");for(let t=0,e=ii.length;t<e;++t)ri[ii[t]]=function(t){return function(e,n,r){if("H"===t)e[0]=e[0]+n.x;else if("V"===t)e[0]=e[0]+n.y;else if("A"===t)e[5]=e[5]+n.x,e[6]=e[6]+n.y;else for(let t=0,r=e.length;t<r;++t)e[t]=e[t]+(t%2?n.y:n.x);return ri[t](e,n,r)}}(ii[t].toUpperCase());function si(t){return t.segment.length&&t.segment.length-1===ni[t.segment[0].toUpperCase()]}function oi(t,e){t.inNumber&&ai(t,!1);const n=Gn.test(e);if(n)t.segment=[e];else{const e=t.lastCommand,n=e.toLowerCase(),r=e===n;t.segment=["m"===n?r?"l":"L":e]}return t.inSegment=!0,t.lastCommand=t.segment[0],n}function ai(t,e){if(!t.inNumber)throw new Error("Parser Error");t.number&&t.segment.push(parseFloat(t.number)),t.inNumber=e,t.number="",t.pointSeen=!1,t.hasExponent=!1,si(t)&&ui(t)}function ui(t){t.inSegment=!1,t.absolute&&(t.segment=function(t){const e=t.segment[0];return ri[e](t.segment.slice(1),t.p,t.p0)}(t)),t.segments.push(t.segment)}function ci(t){if(!t.segment.length)return!1;const e="A"===t.segment[0].toUpperCase(),n=t.segment.length;return e&&(4===n||5===n)}function hi(t){return"E"===t.lastToken.toUpperCase()}const li=new Set([" ",",","\t","\n","\r","\f"]);class di extends mr{bbox(){return Jn().path.setAttribute("d",this.toString()),new tr(Jn.nodes.path.getBBox())}move(t,e){const n=this.bbox();if(t-=n.x,e-=n.y,!isNaN(t)&&!isNaN(e))for(let n,r=this.length-1;r>=0;r--)n=this[r][0],"M"===n||"L"===n||"T"===n?(this[r][1]+=t,this[r][2]+=e):"H"===n?this[r][1]+=t:"V"===n?this[r][1]+=e:"C"===n||"S"===n||"Q"===n?(this[r][1]+=t,this[r][2]+=e,this[r][3]+=t,this[r][4]+=e,"C"===n&&(this[r][5]+=t,this[r][6]+=e)):"A"===n&&(this[r][6]+=t,this[r][7]+=e);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,e=!0){let n=0,r="";const i={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:e,p0:new $n,p:new $n};for(;i.lastToken=r,r=t.charAt(n++);)if(i.inSegment||!oi(i,r))if("."!==r)if(isNaN(parseInt(r)))if(li.has(r))i.inNumber&&ai(i,!1);else if("-"!==r&&"+"!==r)if("E"!==r.toUpperCase()){if(Gn.test(r)){if(i.inNumber)ai(i,!1);else{if(!si(i))throw new Error("parser Error");ui(i)}--n}}else i.number+=r,i.hasExponent=!0;else{if(i.inNumber&&!hi(i)){ai(i,!1),--n;continue}i.number+=r,i.inNumber=!0}else{if("0"===i.number||ci(i)){i.inNumber=!0,i.number=r,ai(i,!0);continue}i.inNumber=!0,i.number+=r}else{if(i.pointSeen||i.hasExponent){ai(i,!1),--n;continue}i.inNumber=!0,i.pointSeen=!0,i.number+=r}return i.inNumber&&ai(i,!1),i.inSegment&&si(i)&&ui(i),i.segments}(t)}size(t,e){const n=this.bbox();let r,i;for(n.width=0===n.width?1:n.width,n.height=0===n.height?1:n.height,r=this.length-1;r>=0;r--)i=this[r][0],"M"===i||"L"===i||"T"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y):"H"===i?this[r][1]=(this[r][1]-n.x)*t/n.width+n.x:"V"===i?this[r][1]=(this[r][1]-n.y)*e/n.height+n.y:"C"===i||"S"===i||"Q"===i?(this[r][1]=(this[r][1]-n.x)*t/n.width+n.x,this[r][2]=(this[r][2]-n.y)*e/n.height+n.y,this[r][3]=(this[r][3]-n.x)*t/n.width+n.x,this[r][4]=(this[r][4]-n.y)*e/n.height+n.y,"C"===i&&(this[r][5]=(this[r][5]-n.x)*t/n.width+n.x,this[r][6]=(this[r][6]-n.y)*e/n.height+n.y)):"A"===i&&(this[r][1]=this[r][1]*t/n.width,this[r][2]=this[r][2]*e/n.height,this[r][6]=(this[r][6]-n.x)*t/n.width+n.x,this[r][7]=(this[r][7]-n.y)*e/n.height+n.y);return this}toString(){return function(t){let e="";for(let n=0,r=t.length;n<r;n++)e+=t[n][0],null!=t[n][1]&&(e+=t[n][1],null!=t[n][2]&&(e+=" ",e+=t[n][2],null!=t[n][3]&&(e+=" ",e+=t[n][3],e+=" ",e+=t[n][4],null!=t[n][5]&&(e+=" ",e+=t[n][5],e+=" ",e+=t[n][6],null!=t[n][7]&&(e+=" ",e+=t[n][7])))));return e+" "}(this)}}const fi=t=>{const e=typeof t;return"number"===e?gr:"string"===e?Wn.isColor(t)?Wn:Xn.test(t)?Gn.test(t)?di:mr:jn.test(t)?gr:mi:vi.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?mr:"object"===e?bi:mi};class pi{constructor(t){this._stepper=t||new Zr("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,e){return t&&e}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(fi(t));let e=new this._type(t);return this._type===Wn&&(e=this._to?e[this._to[4]]():this._from?e[this._from[4]]():e),this._type===bi&&(e=this._to?e.align(this._to):this._from?e.align(this._from):e),e=e.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(e.length)).map(Object).map((function(t){return t.done=!0,t})),e}}class mi{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}}class gi{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,gi.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}gi.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const yi=(t,e)=>t[0]<e[0]?-1:t[0]>e[0]?1:0;class bi{constructor(...t){this.init(...t)}align(t){const e=this.values;for(let n=0,r=e.length;n<r;++n){if(e[n+1]===t[n+1]){if(e[n+1]===Wn&&t[n+7]!==e[n+7]){const e=t[n+7],r=new Wn(this.values.splice(n+3,5))[e]().toArray();this.values.splice(n+3,0,...r)}n+=e[n+2]+2;continue}if(!t[n+1])return this;const r=(new t[n+1]).toArray(),i=e[n+2]+3;e.splice(n,i,t[n],t[n+1],t[n+2],...r),n+=e[n+2]+2}return this}init(t){if(this.values=[],Array.isArray(t))return void(this.values=t.slice());t=t||{};const e=[];for(const n in t){const r=fi(t[n]),i=new r(t[n]).toArray();e.push([n,r,i.length,...i])}return e.sort(yi),this.values=e.reduce(((t,e)=>t.concat(e)),[]),this}toArray(){return this.values}valueOf(){const t={},e=this.values;for(;e.length;){const n=e.shift(),r=e.shift(),i=e.shift(),s=e.splice(0,i);t[n]=new r(s)}return t}}const vi=[mi,gi,bi];class wi extends Pr{constructor(t,e=t){super(_n("path",t),e)}array(){return this._array||(this._array=new di(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,e){return this.attr("d",this.array().move(t,e))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new di(t))}size(t,e){const n=cn(this,t,e);return this.attr("d",this.array().size(n.width,n.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}function xi(){return this._array||(this._array=new zr(this.attr("points")))}function Si(){return delete this._array,this}function _i(t,e){return this.attr("points",this.array().move(t,e))}function Pi(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new zr(t))}function Mi(t,e){const n=cn(this,t,e);return this.attr("points",this.array().size(n.width,n.height))}wi.prototype.MorphArray=di,nn({Container:{path:An((function(t){return this.put(new wi).plot(t||new di)}))}}),Nn(wi,"Path");class Ni extends Pr{constructor(t,e=t){super(_n("polygon",t),e)}}nn({Container:{polygon:An((function(t){return this.put(new Ni).plot(t||new zr)}))}}),Tn(Ni,i),Tn(Ni,s),Nn(Ni,"Polygon");class Oi extends Pr{constructor(t,e=t){super(_n("polyline",t),e)}}nn({Container:{polyline:An((function(t){return this.put(new Oi).plot(t||new zr)}))}}),Tn(Oi,i),Tn(Oi,s),Nn(Oi,"Polyline");class Ci extends Pr{constructor(t,e=t){super(_n("rect",t),e)}}Tn(Ci,{rx:Mr,ry:Nr}),nn({Container:{rect:An((function(t,e){return this.put(new Ci).size(t,e)}))}}),Nn(Ci,"Rect");class Ei{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const e=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(e.prev=this._last,this._last.next=e,this._last=e):(this._last=e,this._first=e),e}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}const Ti={nextDraw:null,frames:new Ei,timeouts:new Ei,immediates:new Ei,timer:()=>yn.window.performance||yn.window.Date,transforms:[],frame(t){const e=Ti.frames.push({run:t});return null===Ti.nextDraw&&(Ti.nextDraw=yn.window.requestAnimationFrame(Ti._draw)),e},timeout(t,e){e=e||0;const n=Ti.timer().now()+e,r=Ti.timeouts.push({run:t,time:n});return null===Ti.nextDraw&&(Ti.nextDraw=yn.window.requestAnimationFrame(Ti._draw)),r},immediate(t){const e=Ti.immediates.push(t);return null===Ti.nextDraw&&(Ti.nextDraw=yn.window.requestAnimationFrame(Ti._draw)),e},cancelFrame(t){null!=t&&Ti.frames.remove(t)},clearTimeout(t){null!=t&&Ti.timeouts.remove(t)},cancelImmediate(t){null!=t&&Ti.immediates.remove(t)},_draw(t){let e=null;const n=Ti.timeouts.last();for(;(e=Ti.timeouts.shift())&&(t>=e.time?e.run():Ti.timeouts.push(e),e!==n););let r=null;const i=Ti.frames.last();for(;r!==i&&(r=Ti.frames.shift());)r.run(t);let s=null;for(;s=Ti.immediates.shift();)s();Ti.nextDraw=Ti.timeouts.first()||Ti.frames.first()?yn.window.requestAnimationFrame(Ti._draw):null}},Ai=Ti,ji=function(t){const e=t.start,n=t.runner.duration();return{start:e,duration:n,end:e+n,runner:t.runner}},ki=function(){const t=yn.window;return(t.performance||t.Date).now()};class Di extends dr{constructor(t=ki){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),e=t?t.runner.duration():0;return(t?t.start:this._time)+e}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const e=this.speed();if(null==t)return this.speed(-e);const n=Math.abs(e);return this.speed(t?-n:n)}schedule(t,e,n){if(null==t)return this._runners.map(ji);let r=0;const i=this.getEndTime();if(e=e||0,null==n||"last"===n||"after"===n)r=i;else if("absolute"===n||"start"===n)r=e,e=0;else if("now"===n)r=this._time;else if("relative"===n){const n=this.getRunnerInfoById(t.id);n&&(r=n.start+e,e=0)}else{if("with-last"!==n)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();r=t?t.start:this._time}}t.unschedule(),t.timeline(this);const s=t.persist(),o={persist:null===s?this._persist:s,start:r+e,runner:t};return this._lastRunnerId=t.id,this._runners.push(o),this._runners.sort(((t,e)=>t.start-e.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const e=this._runnerIds.indexOf(t.id);return e<0||(this._runners.splice(e,1),this._runnerIds.splice(e,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return Ai.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=Ai.frame(this._step)),this)}_stepFn(t=!1){const e=this._timeSource();let n=e-this._lastSourceTime;t&&(n=0);const r=this._speed*n+(this._time-this._lastStepTime);this._lastSourceTime=e,t||(this._time+=r,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let t=this._runners.length;t--;){const e=this._runners[t],n=e.runner;this._time-e.start<=0&&n.reset()}let i=!1;for(let t=0,e=this._runners.length;t<e;t++){const n=this._runners[t],s=n.runner;let o=r;const a=this._time-n.start;a<=0?i=!0:(a<o&&(o=a),s.active()&&(s.step(o).done?!0!==n.persist&&s.duration()-s.time()+this._time+n.persist<this._time&&(s.unschedule(),--t,--e):i=!0))}return i&&!(this._speed<0&&0===this._time)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}nn({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new Di,this._timeline):(this._timeline=t,this)}}});class Li extends dr{constructor(t){super(),this.id=Li.id++,t="function"==typeof(t=null==t?400:t)?new ti(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof ti,this._stepper=this._isDeclarative?t:new Zr,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new Qn,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,e,n){let r=1,i=!1,s=0;return e=e??0,n=n||"last","object"!=typeof(t=t??400)||t instanceof Jr||(e=t.delay??e,n=t.when??n,i=t.swing||i,r=t.times??r,s=t.wait??s,t=t.duration??400),{duration:t,delay:e,swing:i,times:r,wait:s,when:n}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(t,e,n){const r=Li.sanitise(t,e,n),i=new Li(r.duration);return this._timeline&&i.timeline(this._timeline),this._element&&i.element(this._element),i.loop(r).schedule(r.delay,r.when)}clearTransform(){return this.transforms=new Qn,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new Zr(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,e,n){return"object"==typeof t&&(e=t.swing,n=t.wait,t=t.times),this._times=t||1/0,this._swing=e||!1,this._wait=n||0,!0===this._times&&(this._times=1/0),this}loops(t){const e=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/e),n=(this._time-t*e)/this._duration;return Math.min(t+n,this._times)}const n=t%1,r=e*Math.floor(t)+this._duration*n;return this.time(r)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const e=this._time,n=this._duration,r=this._wait,i=this._times,s=this._swing,o=this._reverse;let a;if(null==t){const t=function(t){const e=s*Math.floor(t%(2*(r+n))/(r+n)),i=e&&!o||!e&&o,a=Math.pow(-1,i)*(t%(r+n))/n+i;return Math.max(Math.min(a,1),0)},u=i*(r+n)-r;return a=e<=0?Math.round(t(1e-5)):e<u?t(e):Math.round(t(u-1e-5)),a}const u=Math.floor(this.loops()),c=s&&u%2==0;return a=u+(c&&!o||o&&c?t:1-t),this.loops(a)}progress(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}queue(t,e,n,r){return this._queue.push({initialiser:t||fr,runner:e||fr,retarget:n,isTransform:r,initialised:!1,finished:!1}),this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted||(this.time(0),this._reseted=!0),this}reverse(t){return this._reverse=null==t?!this._reverse:t,this}schedule(t,e,n){if(t instanceof Di||(n=e,e=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,e,n),this}step(t){if(!this.enabled)return this;t=null==t?16:t,this._time+=t;const e=this.position(),n=this._lastPosition!==e&&this._time>=0;this._lastPosition=e;const r=this.duration(),i=this._lastTime<=0&&this._time>0,s=this._lastTime<r&&this._time>=r;this._lastTime=this._time,i&&this.fire("start",this);const o=this._isDeclarative;this.done=!o&&!s&&this._time>=r,this._reseted=!1;let a=!1;return(n||o)&&(this._initialise(n),this.transforms=new Qn,a=this._run(o?t:e),this.fire("step",this)),this.done=this.done||a&&o,s&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const e=t-this._time;return this.step(e),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let e=0,n=this._queue.length;e<n;++e){const n=this._queue[e],r=this._isDeclarative||!n.initialised&&t;t=!n.finished,r&&t&&(n.initialiser.call(this),n.initialised=!0)}}_rememberMorpher(t,e){if(this._history[t]={morpher:e,caller:this._queue[this._queue.length-1]},this._isDeclarative){const t=this.timeline();t&&t.play()}}_run(t){let e=!0;for(let n=0,r=this._queue.length;n<r;++n){const r=this._queue[n],i=r.runner.call(this,t);r.finished=r.finished||!0===i,e=e&&r.finished}return e}_tryRetarget(t,e,n){if(this._history[t]){if(!this._history[t].caller.initialised){const e=this._queue.indexOf(this._history[t].caller);return this._queue.splice(e,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget.call(this,e,n):this._history[t].morpher.to(e),this._history[t].caller.finished=!1;const r=this.timeline();return r&&r.play(),!0}return!1}}Li.id=0;class Bi{constructor(t=new Qn,e=-1,n=!0){this.transforms=t,this.id=e,this.done=n}clearTransformsFromQueue(){}}Tn([Li,Bi],{mergeWith(t){return new Bi(t.transforms.lmultiply(this.transforms),t.id)}});const Ii=(t,e)=>t.lmultiplyO(e),Fi=t=>t.transforms;function Ri(){const t=this._transformationRunners.runners.map(Fi).reduce(Ii,new Qn);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class Vi{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const e=t.id+1;return this.runners.push(t),this.ids.push(e),this}clearBefore(t){const e=this.ids.indexOf(t+1)||1;return this.ids.splice(0,e,0),this.runners.splice(0,e,new Bi).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,e){const n=this.ids.indexOf(t+1);return this.ids.splice(n,1,t+1),this.runners.splice(n,1,e),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let e=0;e<this.runners.length;++e){const n=this.runners[e];if(!(t&&n.done&&t.done)||n._timeline&&n._timeline._runnerIds.includes(n.id)||t._timeline&&t._timeline._runnerIds.includes(t.id))t=n;else{this.remove(n.id);const r=n.mergeWith(t);this.edit(t.id,r),t=r,--e}}return this}remove(t){const e=this.ids.indexOf(t+1);return this.ids.splice(e,1),this.runners.splice(e,1),this}}nn({Element:{animate(t,e,n){const r=Li.sanitise(t,e,n),i=this.timeline();return new Li(r.duration).loop(r).element(this).timeline(i.play()).schedule(r.delay,r.when)},delay(t,e){return this.animate(0,t,e)},_clearTransformRunnersBefore(t){this._transformationRunners.clearBefore(t.id)},_currentTransform(t){return this._transformationRunners.runners.filter((e=>e.id<=t.id)).map(Fi).reduce(Ii,new Qn)},_addRunner(t){this._transformationRunners.add(t),Ai.cancelImmediate(this._frameId),this._frameId=Ai.immediate(Ri.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new Vi).add(new Bi(new Qn(this))))}}}),Tn(Li,{attr(t,e){return this.styleAttr("attr",t,e)},css(t,e){return this.styleAttr("css",t,e)},styleAttr(t,e,n){if("string"==typeof e)return this.styleAttr(t,{[e]:n});let r=e;if(this._tryRetarget(t,r))return this;let i=new pi(this._stepper).to(r),s=Object.keys(r);return this.queue((function(){i=i.from(this.element()[t](s))}),(function(e){return this.element()[t](i.at(e).valueOf()),i.done()}),(function(e){const n=Object.keys(e),o=(a=s,n.filter((t=>!a.includes(t))));var a;if(o.length){const e=this.element()[t](o),n=new bi(i.from()).valueOf();Object.assign(n,e),i.from(n)}const u=new bi(i.to()).valueOf();Object.assign(u,e),i.to(u),s=n,r=e})),this._rememberMorpher(t,i),this},zoom(t,e){if(this._tryRetarget("zoom",t,e))return this;let n=new pi(this._stepper).to(new gr(t));return this.queue((function(){n=n.from(this.element().zoom())}),(function(t){return this.element().zoom(n.at(t),e),n.done()}),(function(t,r){e=r,n.to(t)})),this._rememberMorpher("zoom",n),this},transform(t,e,n){if(e=t.relative||e,this._isDeclarative&&!e&&this._tryRetarget("transform",t))return this;const r=Qn.isMatrixLike(t);n=null!=t.affine?t.affine:null!=n?n:!r;const i=new pi(this._stepper).type(n?gi:Qn);let s,o,a,u,c;return this.queue((function(){o=o||this.element(),s=s||hn(t,o),c=new Qn(e?void 0:o),o._addRunner(this),e||o._clearTransformRunnersBefore(this)}),(function(h){e||this.clearTransform();const{x:l,y:d}=new $n(s).transform(o._currentTransform(this));let f=new Qn({...t,origin:[l,d]}),p=this._isDeclarative&&a?a:c;if(n){f=f.decompose(l,d),p=p.decompose(l,d);const t=f.rotate,e=p.rotate,n=[t-360,t,t+360],r=n.map((t=>Math.abs(t-e))),i=Math.min(...r),s=r.indexOf(i);f.rotate=n[s]}e&&(r||(f.rotate=t.rotate||0),this._isDeclarative&&u&&(p.rotate=u)),i.from(p),i.to(f);const m=i.at(h);return u=m.rotate,a=new Qn(m),this.addTransform(a),o._addRunner(this),i.done()}),(function(e){(e.origin||"center").toString()!==(t.origin||"center").toString()&&(s=hn(e,o)),t={...e,origin:s}}),!0),this._isDeclarative&&this._rememberMorpher("transform",i),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,e){return this.dx(t).dy(e)},_queueNumberDelta(t,e){if(e=new gr(e),this._tryRetarget(t,e))return this;const n=new pi(this._stepper).to(e);let r=null;return this.queue((function(){r=this.element()[t](),n.from(r),n.to(r+e)}),(function(e){return this.element()[t](n.at(e)),n.done()}),(function(t){n.to(r+new gr(t))})),this._rememberMorpher(t,n),this},_queueObject(t,e){if(this._tryRetarget(t,e))return this;const n=new pi(this._stepper).to(e);return this.queue((function(){n.from(this.element()[t]())}),(function(e){return this.element()[t](n.at(e)),n.done()})),this._rememberMorpher(t,n),this},_queueNumber(t,e){return this._queueObject(t,new gr(e))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,e){return this.x(t).y(e)},amove(t,e){return this.ax(t).ay(e)},center(t,e){return this.cx(t).cy(e)},size(t,e){let n;return t&&e||(n=this._element.bbox()),t||(t=n.width/n.height*e),e||(e=n.height/n.width*t),this.width(t).height(e)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,e,n,r){if(4===arguments.length)return this.plot([t,e,n,r]);if(this._tryRetarget("plot",t))return this;const i=new pi(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){i.from(this._element.array())}),(function(t){return this._element.plot(i.at(t)),i.done()})),this._rememberMorpher("plot",i),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,e,n,r){return this._queueObject("viewbox",new tr(t,e,n,r))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),Tn(Li,{rx:Mr,ry:Nr,from:Br,to:Ir}),Nn(Li,"Runner");class qi extends Sr{constructor(t,e=t){super(_n("svg",t),e),this.namespace()}defs(){return this.isRoot()?Pn(this.node.querySelector("defs"))||this.put(new _r):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof yn.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:pn,version:"1.1"}).attr("xmlns:xlink",gn,mn):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,mn).attr("xmlns:svgjs",null,mn)}root(){return this.isRoot()?this:super.root()}}nn({Container:{nested:An((function(){return this.put(new qi)}))}}),Nn(qi,"Svg",!0);class zi extends Sr{constructor(t,e=t){super(_n("symbol",t),e)}}function Xi(t){return!1===this._build&&this.clear(),this.node.appendChild(yn.document.createTextNode(t)),this}function Gi(){return this.node.getComputedTextLength()}function Yi(t,e=this.bbox()){return null==t?e.x:this.attr("x",this.attr("x")+t-e.x)}function Hi(t,e=this.bbox()){return null==t?e.y:this.attr("y",this.attr("y")+t-e.y)}function Ui(t,e,n=this.bbox()){return this.x(t,n).y(e,n)}function Wi(t,e=this.bbox()){return null==t?e.cx:this.attr("x",this.attr("x")+t-e.cx)}function $i(t,e=this.bbox()){return null==t?e.cy:this.attr("y",this.attr("y")+t-e.cy)}function Ki(t,e,n=this.bbox()){return this.cx(t,n).cy(e,n)}function Qi(t){return this.attr("x",t)}function Ji(t){return this.attr("y",t)}function Zi(t,e){return this.ax(t).ay(e)}function ts(t){return this._build=!!t,this}nn({Container:{symbol:An((function(){return this.put(new zi)}))}}),Nn(zi,"Symbol");class es extends Pr{constructor(t,e=t){super(_n("text",t),e),this.dom.leading=this.dom.leading??new gr(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new gr(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let e=0;const n=this.dom.leading;this.each((function(r){if(dn(this.node))return;const i=yn.window.getComputedStyle(this.node).getPropertyValue("font-size"),s=n*new gr(i);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?e+=s:(this.attr("dy",r?s+e:0),e=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new gr(t.leading||1.3),this}writeDataToDom(){return fn(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const e=this.node.childNodes;let n=0;t="";for(let r=0,i=e.length;r<i;++r)"textPath"===e[r].nodeName||dn(e[r])?0===r&&(n=r+1):(r!==n&&3!==e[r].nodeType&&!0===Pn(e[r]).dom.newLined&&(t+="\n"),t+=e[r].textContent);return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else for(let e=0,n=(t=(t+"").split("\n")).length;e<n;e++)this.newLine(t[e]);return this.build(!1).rebuild()}}Tn(es,o),nn({Container:{text:An((function(t=""){return this.put(new es).text(t)})),plain:An((function(t=""){return this.put(new es).plain(t)}))}}),Nn(es,"Text");class ns extends Pr{constructor(t,e=t){super(_n("tspan",t),e),this._build=!1}dx(t){return this.attr("dx",t)}dy(t){return this.attr("dy",t)}newLine(){this.dom.newLined=!0;const t=this.parent();if(!(t instanceof es))return this;const e=t.index(this),n=yn.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=t.dom.leading*new gr(n);return this.dy(e?r:0).attr("x",t.x())}text(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?(this.clear().build(!0),t.call(this,this),this.build(!1)):this.plain(t),this)}}Tn(ns,o),nn({Tspan:{tspan:An((function(t=""){const e=new ns;return this._build||this.clear(),this.put(e).text(t)}))},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),Nn(ns,"Tspan");class rs extends Pr{constructor(t,e=t){super(_n("circle",t),e)}radius(t){return this.attr("r",t)}rx(t){return this.attr("r",t)}ry(t){return this.rx(t)}size(t){return this.radius(new gr(t).divide(2))}}Tn(rs,{x:Or,y:Cr,cx:Er,cy:Tr,width:Ar,height:jr}),nn({Container:{circle:An((function(t=0){return this.put(new rs).size(t).move(0,0)}))}}),Nn(rs,"Circle");class is extends Sr{constructor(t,e=t){super(_n("clipPath",t),e)}remove(){return this.targets().forEach((function(t){t.unclip()})),super.remove()}targets(){return sr("svg [clip-path*="+this.id()+"]")}}nn({Container:{clip:An((function(){return this.defs().put(new is)}))},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const e=t instanceof is?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+e.id()+")")},unclip(){return this.attr("clip-path",null)}}}),Nn(is,"ClipPath");class ss extends wr{constructor(t,e=t){super(_n("foreignObject",t),e)}}function os(t,e){return this.children().forEach((n=>{let r;try{r=n.node instanceof yn.window.SVGSVGElement?new tr(n.attr(["x","y","width","height"])):n.bbox()}catch(t){return}const i=new Qn(n),s=i.translate(t,e).transform(i.inverse()),o=new $n(r.x,r.y).transform(s);n.move(o.x,o.y)})),this}function as(t){return this.dmove(t,0)}function us(t){return this.dmove(0,t)}function cs(t,e=this.bbox()){return null==t?e.height:this.size(e.width,t,e)}function hs(t=0,e=0,n=this.bbox()){const r=t-n.x,i=e-n.y;return this.dmove(r,i)}function ls(t,e,n=this.bbox()){const r=cn(this,t,e,n),i=r.width/n.width,s=r.height/n.height;return this.children().forEach((t=>{const e=new $n(n).transform(new Qn(t).inverse());t.scale(i,s,e.x,e.y)})),this}function ds(t,e=this.bbox()){return null==t?e.width:this.size(t,e.height,e)}function fs(t,e=this.bbox()){return null==t?e.x:this.move(t,e.y,e)}function ps(t,e=this.bbox()){return null==t?e.y:this.move(e.x,t,e)}nn({Container:{foreignObject:An((function(t,e){return this.put(new ss).size(t,e)}))}}),Nn(ss,"ForeignObject");class ms extends Sr{constructor(t,e=t){super(_n("g",t),e)}}Tn(ms,a),nn({Container:{group:An((function(){return this.put(new ms)}))}}),Nn(ms,"G");class gs extends Sr{constructor(t,e=t){super(_n("a",t),e)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,gn)}}Tn(gs,a),nn({Container:{link:An((function(t){return this.put(new gs).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const e=t.parent();if(!e)return this.remove();const n=e.index(t);return e.add(this,n),t.remove(),this},linkTo(t){let e=this.linker();return e||(e=new gs,this.wrap(e)),"function"==typeof t?t.call(e,e):e.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),Nn(gs,"A");class ys extends Sr{constructor(t,e=t){super(_n("mask",t),e)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return sr("svg [mask*="+this.id()+"]")}}nn({Container:{mask:An((function(){return this.defs().put(new ys)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const e=t instanceof ys?t:this.parent().mask().add(t);return this.attr("mask","url(#"+e.id()+")")},unmask(){return this.attr("mask",null)}}}),Nn(ys,"Mask");class bs extends wr{constructor(t,e=t){super(_n("stop",t),e)}update(t){return("number"==typeof t||t instanceof gr)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new gr(t.offset)),this}}nn({Gradient:{stop:function(t,e,n){return this.put(new bs).update(t,e,n)}}}),Nn(bs,"Stop");class vs extends wr{constructor(t,e=t){super(_n("style",t),e)}addText(t=""){return this.node.textContent+=t,this}font(t,e,n={}){return this.rule("@font-face",{fontFamily:t,src:e,...n})}rule(t,e){return this.addText(function(t,e){if(!t)return"";if(!e)return t;let n=t+"{";for(const t in e)n+=t.replace(/([A-Z])/g,(function(t,e){return"-"+e.toLowerCase()}))+":"+e[t]+";";return n+="}",n}(t,e))}}nn("Dom",{style(t,e){return this.put(new vs).rule(t,e)},fontface(t,e,n){return this.put(new vs).font(t,e,n)}}),Nn(vs,"Style");class ws extends es{constructor(t,e=t){super(_n("textPath",t),e)}array(){const t=this.track();return t?t.array():null}plot(t){const e=this.track();let n=null;return e&&(n=e.plot(t)),null==t?n:this}track(){return this.reference("href")}}nn({Container:{textPath:An((function(t,e){return t instanceof es||(t=this.text(t)),t.path(e)}))},Text:{path:An((function(t,e=!0){const n=new ws;let r;if(t instanceof wi||(t=this.defs().path(t)),n.attr("href","#"+t,gn),e)for(;r=this.node.firstChild;)n.node.appendChild(r);return this.put(n)})),textPath(){return this.findOne("textPath")}},Path:{text:An((function(t){return t instanceof es||(t=(new es).addTo(this.parent()).text(t)),t.path(this)})),targets(){return sr("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),ws.prototype.MorphArray=di,Nn(ws,"TextPath");class xs extends Pr{constructor(t,e=t){super(_n("use",t),e)}use(t,e){return this.attr("href",(e||"")+"#"+t,gn)}}nn({Container:{use:An((function(t,e){return this.put(new xs).use(t,e)}))}}),Nn(xs,"Use"),Tn([qi,zi,Vr,Rr,$r],rn("viewbox")),Tn([Wr,Oi,Ni,wi],rn("marker")),Tn(es,rn("Text")),Tn(wi,rn("Path")),Tn(_r,rn("Defs")),Tn([es,ns],rn("Tspan")),Tn([Ci,kr,Fr,Li],rn("radius")),Tn(dr,rn("EventTarget")),Tn(vr,rn("Dom")),Tn(wr,rn("Element")),Tn(Pr,rn("Shape")),Tn([Sr,Lr],rn("Container")),Tn(Fr,rn("Gradient")),Tn(Li,rn("Runner")),rr.extend([...new Set(en)]),function(t=[]){vi.push(...[].concat(t))}([gr,Wn,tr,Qn,mr,zr,di,$n]),Tn(vi,{to(t){return(new pi).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,e,n,r,i){return this.fromArray(t.map((function(t,s){return r.step(t,e[s],n,i[s],i)})))}});var Ss,_s,Ps,Ms,Ns,Os,Cs=function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n},Es=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class Ts{constructor(t){Ss.add(this),this.domNode=document.createElement("div"),_s.set(this,void 0),Ps.set(this,void 0),Ms.set(this,void 0),Cs(this,Ms,t,"f"),this.domNode.classList.add(Je.LM);let e=new qi;e.attr({width:"30",height:"30"}),e.viewbox(0,0,30,30),e.circle().attr({r:"4",cx:"15",cy:"15",stroke:"white","stroke-width":"0",fill:"white"}),e.attr("style","user-select: none; -webkit-user-select: none;"),e.addTo(this.domNode),this.domNode.addEventListener("click",(()=>this.press())),Cs(this,_s,new As,"f"),this.domNode.append(Es(this,_s,"f").domNode),this.domNode.addEventListener("mouseover",(()=>Es(this,Ss,"m",Ns).call(this))),Es(this,Ss,"m",Ns).call(this)}press(){Es(this,Ms,"f").toolbar.isHidden()?Es(this,Ms,"f").toolbar.unhide():0==Es(this,Ms,"f").toolbar.displacement.magnitude?Es(this,Ms,"f").toolbar.hide():Es(this,Ms,"f").toolbar.reposition(),Es(this,Ss,"m",Ns).call(this)}get boundKey(){return Es(this,Ps,"f")}set boundKey(t){Cs(this,Ps,t,"f"),Es(this,Ss,"m",Ns).call(this)}hide(){this.domNode.style.visibility="hidden"}unhide(){this.domNode.style.visibility="visible"}isHidden(){return["hidden","collapse"].includes(this.domNode.style.visibility)}}_s=new WeakMap,Ps=new WeakMap,Ms=new WeakMap,Ss=new WeakSet,Ns=function(){let t=this.boundKey?`[ ${this.boundKey} ]`:"";Es(this,Ms,"f").toolbar.isHidden()?Es(this,_s,"f").textContent=`Unhide the Toolbar. ${t}`:0==Es(this,Ms,"f").toolbar.displacement.magnitude?Es(this,_s,"f").textContent=`Hide the Toolbar. ${t}`:Es(this,_s,"f").textContent=`Reposition the Toolbar. ${t}`};class As{constructor(){Os.set(this,void 0),Cs(this,Os,document.createElement("p"),"f"),Es(this,Os,"f").classList.add(Je.Ks);let t=document.createElement("div");t.classList.add(Je.Qs),t.append(Es(this,Os,"f")),this.domNode=document.createElement("div"),this.domNode.classList.add(Je.YL),this.domNode.append(t)}get textContent(){return Es(this,Os,"f").textContent}set textContent(t){Es(this,Os,"f").textContent=t}}Os=new WeakMap})(),r})(),t.exports=e()},106:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return t.map((t=>({v:t,priority:Math.random()}))).sort(((t,e)=>t.priority-e.priority)).map((({v:t})=>t))}function r(){return!(!document.activeElement||"textarea"!==document.activeElement.tagName.toLowerCase()&&(t=document.activeElement,"input"!==t.tagName.toLowerCase()||"text"!==(null===(e=t.getAttribute("type"))||void 0===e?void 0:e.toLowerCase())));var t,e}t.r(e),t.d(e,{DownloadableFile:()=>h,EventfulSet:()=>l,FiniteStack:()=>y,KeyBinding:()=>u,detectMacOS:()=>c,isBeingInteractedWith:()=>s,isURL:()=>b,shuffled:()=>n,userIsTyping:()=>r});let i=new Set;function s(t){return t===document.body||i.has(t)}window.addEventListener("mousedown",(t=>{if(!(t.target instanceof Node))return void(i=new Set);i=new Set;let e=t.target;for(i.add(e);e.parentNode&&!i.has(e.parentNode);)i.add(e.parentNode),e=e.parentNode}));var o,a=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class u{constructor(t,e,n){this.key=t,this.scope=void 0,o.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,o,n),window.addEventListener("keydown",(n=>{var i,u,c,h;n.key.toUpperCase()===t.toUpperCase()&&(void 0===(null===(i=a(this,o,"f"))||void 0===i?void 0:i.altKey)||a(this,o,"f").altKey==n.altKey)&&(void 0===(null===(u=a(this,o,"f"))||void 0===u?void 0:u.shiftKey)||a(this,o,"f").shiftKey==n.shiftKey)&&(void 0===(null===(c=a(this,o,"f"))||void 0===c?void 0:c.ctrlKey)||a(this,o,"f").ctrlKey==n.ctrlKey)&&(void 0===(null===(h=a(this,o,"f"))||void 0===h?void 0:h.metaKey)||a(this,o,"f").metaKey==n.metaKey)&&!r()&&this.scope&&s(this.scope)&&(n.preventDefault(),e())}),{passive:!1})}}function c(){try{return window.navigator.platform.toLowerCase().includes("mac")}catch(t){return!1}}o=new WeakMap;class h{constructor(t){this.textContent=t}downloadAs(t,e){let n=new File([this.textContent],t,{type:e.type}),r=URL.createObjectURL(n),i=document.createElement("a");i.href=r,i.download=n.name,document.body.appendChild(i),i.click(),i.remove(),URL.revokeObjectURL(r)}}class l{constructor(){this.eventListeners={change:[]},this.underlyingSet=new Set}[Symbol.iterator](){return this.underlyingSet.values()}includes(t){return this.underlyingSet.has(t)}include(t){return this.includes(t)}addAll(t){let e=[...t];0!=e.length&&(e.every((t=>this.includes(t)))||(e.forEach((t=>this.underlyingSet.add(t))),this.callEventListeners("change")))}removeAll(t){let e=[...t];0!=e.length&&(e.every((t=>!this.includes(t)))||(e.forEach((t=>this.underlyingSet.delete(t))),this.callEventListeners("change")))}clear(){0!=this.underlyingSet.size&&(this.underlyingSet.clear(),this.callEventListeners("change"))}addEventListener(t,e){this.eventListeners[t].push(e)}callEventListeners(t){this.eventListeners[t].forEach((t=>t()))}removeEventListener(t,e){this.eventListeners[t]=this.eventListeners[t].filter((t=>t!==e))}}var d,f,p,m,g=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class y{constructor(t){d.add(this),this.maxSize=t,f.set(this,[]),p.set(this,{change:[]})}get size(){return g(this,f,"f").length}isEmpty(){return 0==this.size}empty(){0!=this.size&&(function(t,e){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,[])}(this,f),g(this,d,"m",m).call(this,"change"))}peek(){if(0==this.size)throw new Error("The stack is empty.");return g(this,f,"f")[g(this,f,"f").length-1]}push(t){g(this,f,"f").push(t),this.size>this.maxSize&&g(this,f,"f").shift(),g(this,d,"m",m).call(this,"change")}pop(){if(0==this.size)throw new Error("The stack is empty.");let t=g(this,f,"f").pop();return g(this,d,"m",m).call(this,"change"),t}addEventListener(t,e){g(this,p,"f")[t].push(e)}removeEventListener(t,e){g(this,p,"f")[t]=g(this,p,"f")[t].filter((t=>t!==e))}}function b(t){try{return new URL(t),!0}catch(t){return!1}}return f=new WeakMap,p=new WeakMap,d=new WeakSet,m=function(t){g(this,p,"f")[t].forEach((t=>t()))},e})(),t.exports=e()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function c(t){return"object"==typeof t&&null!==t}function h(t){return Array.isArray(t)}function l(t){return h(t)&&0==t.length}function d(t){return h(t)&&t.length>0}function f(t){return h(t)&&t.every(n)}function p(t){return f(t)&&t.length>0}function m(t){return h(t)&&t.every(r)}function g(t){return h(t)&&t.every(i)}function y(t){return h(t)&&t.every(a)}function b(t){return y(t)&&t.length>0}return t.r(e),t.d(e,{isArray:()=>h,isEmptyArray:()=>l,isFiniteNumber:()=>r,isFiniteNumbersArray:()=>m,isNonEmptyArray:()=>d,isNonEmptyNumbersArray:()=>p,isNonEmptyStringsArray:()=>b,isNonFiniteNumber:()=>i,isNonFiniteNumbersArray:()=>g,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>c,isNullish:()=>u,isNumber:()=>n,isNumbersArray:()=>f,isPositiveFiniteNumber:()=>s,isString:()=>a,isStringsArray:()=>y}),e})()},692:function(t,e){var n;!function(e,n){"use strict";"object"==typeof t.exports?t.exports=e.document?n(e,!0):function(t){if(!t.document)throw new Error("jQuery requires a window with a document");return n(t)}:n(e)}("undefined"!=typeof window?window:this,(function(r,i){"use strict";var s=[],o=Object.getPrototypeOf,a=s.slice,u=s.flat?function(t){return s.flat.call(t)}:function(t){return s.concat.apply([],t)},c=s.push,h=s.indexOf,l={},d=l.toString,f=l.hasOwnProperty,p=f.toString,m=p.call(Object),g={},y=function(t){return"function"==typeof t&&"number"!=typeof t.nodeType&&"function"!=typeof t.item},b=function(t){return null!=t&&t===t.window},v=r.document,w={type:!0,src:!0,nonce:!0,noModule:!0};function x(t,e,n){var r,i,s=(n=n||v).createElement("script");if(s.text=t,e)for(r in w)(i=e[r]||e.getAttribute&&e.getAttribute(r))&&s.setAttribute(r,i);n.head.appendChild(s).parentNode.removeChild(s)}function S(t){return null==t?t+"":"object"==typeof t||"function"==typeof t?l[d.call(t)]||"object":typeof t}var _="3.7.1",P=/HTML$/i,M=function(t,e){return new M.fn.init(t,e)};function N(t){var e=!!t&&"length"in t&&t.length,n=S(t);return!y(t)&&!b(t)&&("array"===n||0===e||"number"==typeof e&&e>0&&e-1 in t)}function O(t,e){return t.nodeName&&t.nodeName.toLowerCase()===e.toLowerCase()}M.fn=M.prototype={jquery:_,constructor:M,length:0,toArray:function(){return a.call(this)},get:function(t){return null==t?a.call(this):t<0?this[t+this.length]:this[t]},pushStack:function(t){var e=M.merge(this.constructor(),t);return e.prevObject=this,e},each:function(t){return M.each(this,t)},map:function(t){return this.pushStack(M.map(this,(function(e,n){return t.call(e,n,e)})))},slice:function(){return this.pushStack(a.apply(this,arguments))},first:function(){return this.eq(0)},last:function(){return this.eq(-1)},even:function(){return this.pushStack(M.grep(this,(function(t,e){return(e+1)%2})))},odd:function(){return this.pushStack(M.grep(this,(function(t,e){return e%2})))},eq:function(t){var e=this.length,n=+t+(t<0?e:0);return this.pushStack(n>=0&&n<e?[this[n]]:[])},end:function(){return this.prevObject||this.constructor()},push:c,sort:s.sort,splice:s.splice},M.extend=M.fn.extend=function(){var t,e,n,r,i,s,o=arguments[0]||{},a=1,u=arguments.length,c=!1;for("boolean"==typeof o&&(c=o,o=arguments[a]||{},a++),"object"==typeof o||y(o)||(o={}),a===u&&(o=this,a--);a<u;a++)if(null!=(t=arguments[a]))for(e in t)r=t[e],"__proto__"!==e&&o!==r&&(c&&r&&(M.isPlainObject(r)||(i=Array.isArray(r)))?(n=o[e],s=i&&!Array.isArray(n)?[]:i||M.isPlainObject(n)?n:{},i=!1,o[e]=M.extend(c,s,r)):void 0!==r&&(o[e]=r));return o},M.extend({expando:"jQuery"+(_+Math.random()).replace(/\D/g,""),isReady:!0,error:function(t){throw new Error(t)},noop:function(){},isPlainObject:function(t){var e,n;return!(!t||"[object Object]"!==d.call(t)||(e=o(t))&&("function"!=typeof(n=f.call(e,"constructor")&&e.constructor)||p.call(n)!==m))},isEmptyObject:function(t){var e;for(e in t)return!1;return!0},globalEval:function(t,e,n){x(t,{nonce:e&&e.nonce},n)},each:function(t,e){var n,r=0;if(N(t))for(n=t.length;r<n&&!1!==e.call(t[r],r,t[r]);r++);else for(r in t)if(!1===e.call(t[r],r,t[r]))break;return t},text:function(t){var e,n="",r=0,i=t.nodeType;if(!i)for(;e=t[r++];)n+=M.text(e);return 1===i||11===i?t.textContent:9===i?t.documentElement.textContent:3===i||4===i?t.nodeValue:n},makeArray:function(t,e){var n=e||[];return null!=t&&(N(Object(t))?M.merge(n,"string"==typeof t?[t]:t):c.call(n,t)),n},inArray:function(t,e,n){return null==e?-1:h.call(e,t,n)},isXMLDoc:function(t){var e=t&&t.namespaceURI,n=t&&(t.ownerDocument||t).documentElement;return!P.test(e||n&&n.nodeName||"HTML")},merge:function(t,e){for(var n=+e.length,r=0,i=t.length;r<n;r++)t[i++]=e[r];return t.length=i,t},grep:function(t,e,n){for(var r=[],i=0,s=t.length,o=!n;i<s;i++)!e(t[i],i)!==o&&r.push(t[i]);return r},map:function(t,e,n){var r,i,s=0,o=[];if(N(t))for(r=t.length;s<r;s++)null!=(i=e(t[s],s,n))&&o.push(i);else for(s in t)null!=(i=e(t[s],s,n))&&o.push(i);return u(o)},guid:1,support:g}),"function"==typeof Symbol&&(M.fn[Symbol.iterator]=s[Symbol.iterator]),M.each("Boolean Number String Function Array Date RegExp Object Error Symbol".split(" "),(function(t,e){l["[object "+e+"]"]=e.toLowerCase()}));var C=s.pop,E=s.sort,T=s.splice,A="[\\x20\\t\\r\\n\\f]",j=new RegExp("^"+A+"+|((?:^|[^\\\\])(?:\\\\.)*)"+A+"+$","g");M.contains=function(t,e){var n=e&&e.parentNode;return t===n||!(!n||1!==n.nodeType||!(t.contains?t.contains(n):t.compareDocumentPosition&&16&t.compareDocumentPosition(n)))};var k=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\x80-\uFFFF\w-]/g;function D(t,e){return e?"\0"===t?"�":t.slice(0,-1)+"\\"+t.charCodeAt(t.length-1).toString(16)+" ":"\\"+t}M.escapeSelector=function(t){return(t+"").replace(k,D)};var L=v,B=c;!function(){var t,e,n,i,o,u,c,l,d,p,m=B,y=M.expando,b=0,v=0,w=tt(),x=tt(),S=tt(),_=tt(),P=function(t,e){return t===e&&(o=!0),0},N="checked|selected|async|autofocus|autoplay|controls|defer|disabled|hidden|ismap|loop|multiple|open|readonly|required|scoped",k="(?:\\\\[\\da-fA-F]{1,6}"+A+"?|\\\\[^\\r\\n\\f]|[\\w-]|[^\0-\\x7f])+",D="\\["+A+"*("+k+")(?:"+A+"*([*^$|!~]?=)"+A+"*(?:'((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\"|("+k+"))|)"+A+"*\\]",I=":("+k+")(?:\\((('((?:\\\\.|[^\\\\'])*)'|\"((?:\\\\.|[^\\\\\"])*)\")|((?:\\\\.|[^\\\\()[\\]]|"+D+")*)|.*)\\)|)",F=new RegExp(A+"+","g"),R=new RegExp("^"+A+"*,"+A+"*"),V=new RegExp("^"+A+"*([>+~]|"+A+")"+A+"*"),q=new RegExp(A+"|>"),z=new RegExp(I),X=new RegExp("^"+k+"$"),G={ID:new RegExp("^#("+k+")"),CLASS:new RegExp("^\\.("+k+")"),TAG:new RegExp("^("+k+"|[*])"),ATTR:new RegExp("^"+D),PSEUDO:new RegExp("^"+I),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+A+"*(even|odd|(([+-]|)(\\d*)n|)"+A+"*(?:([+-]|)"+A+"*(\\d+)|))"+A+"*\\)|)","i"),bool:new RegExp("^(?:"+N+")$","i"),needsContext:new RegExp("^"+A+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+A+"*((?:-\\d)?\\d*)"+A+"*\\)|)(?=[^-]|$)","i")},Y=/^(?:input|select|textarea|button)$/i,H=/^h\d$/i,U=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,W=/[+~]/,$=new RegExp("\\\\[\\da-fA-F]{1,6}"+A+"?|\\\\([^\\r\\n\\f])","g"),K=function(t,e){var n="0x"+t.slice(1)-65536;return e||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},Q=function(){ut()},J=dt((function(t){return!0===t.disabled&&O(t,"fieldset")}),{dir:"parentNode",next:"legend"});try{m.apply(s=a.call(L.childNodes),L.childNodes),s[L.childNodes.length].nodeType}catch(t){m={apply:function(t,e){B.apply(t,a.call(e))},call:function(t){B.apply(t,a.call(arguments,1))}}}function Z(t,e,n,r){var i,s,o,a,c,h,f,p=e&&e.ownerDocument,b=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==b&&9!==b&&11!==b)return n;if(!r&&(ut(e),e=e||u,l)){if(11!==b&&(c=U.exec(t)))if(i=c[1]){if(9===b){if(!(o=e.getElementById(i)))return n;if(o.id===i)return m.call(n,o),n}else if(p&&(o=p.getElementById(i))&&Z.contains(e,o)&&o.id===i)return m.call(n,o),n}else{if(c[2])return m.apply(n,e.getElementsByTagName(t)),n;if((i=c[3])&&e.getElementsByClassName)return m.apply(n,e.getElementsByClassName(i)),n}if(!(_[t+" "]||d&&d.test(t))){if(f=t,p=e,1===b&&(q.test(t)||V.test(t))){for((p=W.test(t)&&at(e.parentNode)||e)==e&&g.scope||((a=e.getAttribute("id"))?a=M.escapeSelector(a):e.setAttribute("id",a=y)),s=(h=ht(t)).length;s--;)h[s]=(a?"#"+a:":scope")+" "+lt(h[s]);f=h.join(",")}try{return m.apply(n,p.querySelectorAll(f)),n}catch(e){_(t,!0)}finally{a===y&&e.removeAttribute("id")}}}return bt(t.replace(j,"$1"),e,n,r)}function tt(){var t=[];return function n(r,i){return t.push(r+" ")>e.cacheLength&&delete n[t.shift()],n[r+" "]=i}}function et(t){return t[y]=!0,t}function nt(t){var e=u.createElement("fieldset");try{return!!t(e)}catch(t){return!1}finally{e.parentNode&&e.parentNode.removeChild(e),e=null}}function rt(t){return function(e){return O(e,"input")&&e.type===t}}function it(t){return function(e){return(O(e,"input")||O(e,"button"))&&e.type===t}}function st(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&J(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ot(t){return et((function(e){return e=+e,et((function(n,r){for(var i,s=t([],n.length,e),o=s.length;o--;)n[i=s[o]]&&(n[i]=!(r[i]=n[i]))}))}))}function at(t){return t&&void 0!==t.getElementsByTagName&&t}function ut(t){var n,r=t?t.ownerDocument||t:L;return r!=u&&9===r.nodeType&&r.documentElement?(c=(u=r).documentElement,l=!M.isXMLDoc(u),p=c.matches||c.webkitMatchesSelector||c.msMatchesSelector,c.msMatchesSelector&&L!=u&&(n=u.defaultView)&&n.top!==n&&n.addEventListener("unload",Q),g.getById=nt((function(t){return c.appendChild(t).id=M.expando,!u.getElementsByName||!u.getElementsByName(M.expando).length})),g.disconnectedMatch=nt((function(t){return p.call(t,"*")})),g.scope=nt((function(){return u.querySelectorAll(":scope")})),g.cssHas=nt((function(){try{return u.querySelector(":has(*,:jqfake)"),!1}catch(t){return!0}})),g.getById?(e.filter.ID=function(t){var e=t.replace($,K);return function(t){return t.getAttribute("id")===e}},e.find.ID=function(t,e){if(void 0!==e.getElementById&&l){var n=e.getElementById(t);return n?[n]:[]}}):(e.filter.ID=function(t){var e=t.replace($,K);return function(t){var n=void 0!==t.getAttributeNode&&t.getAttributeNode("id");return n&&n.value===e}},e.find.ID=function(t,e){if(void 0!==e.getElementById&&l){var n,r,i,s=e.getElementById(t);if(s){if((n=s.getAttributeNode("id"))&&n.value===t)return[s];for(i=e.getElementsByName(t),r=0;s=i[r++];)if((n=s.getAttributeNode("id"))&&n.value===t)return[s]}return[]}}),e.find.TAG=function(t,e){return void 0!==e.getElementsByTagName?e.getElementsByTagName(t):e.querySelectorAll(t)},e.find.CLASS=function(t,e){if(void 0!==e.getElementsByClassName&&l)return e.getElementsByClassName(t)},d=[],nt((function(t){var e;c.appendChild(t).innerHTML="<a id='"+y+"' href='' disabled='disabled'></a><select id='"+y+"-\r\\' disabled='disabled'><option selected=''></option></select>",t.querySelectorAll("[selected]").length||d.push("\\["+A+"*(?:value|"+N+")"),t.querySelectorAll("[id~="+y+"-]").length||d.push("~="),t.querySelectorAll("a#"+y+"+*").length||d.push(".#.+[+~]"),t.querySelectorAll(":checked").length||d.push(":checked"),(e=u.createElement("input")).setAttribute("type","hidden"),t.appendChild(e).setAttribute("name","D"),c.appendChild(t).disabled=!0,2!==t.querySelectorAll(":disabled").length&&d.push(":enabled",":disabled"),(e=u.createElement("input")).setAttribute("name",""),t.appendChild(e),t.querySelectorAll("[name='']").length||d.push("\\["+A+"*name"+A+"*="+A+"*(?:''|\"\")")})),g.cssHas||d.push(":has"),d=d.length&&new RegExp(d.join("|")),P=function(t,e){if(t===e)return o=!0,0;var n=!t.compareDocumentPosition-!e.compareDocumentPosition;return n||(1&(n=(t.ownerDocument||t)==(e.ownerDocument||e)?t.compareDocumentPosition(e):1)||!g.sortDetached&&e.compareDocumentPosition(t)===n?t===u||t.ownerDocument==L&&Z.contains(L,t)?-1:e===u||e.ownerDocument==L&&Z.contains(L,e)?1:i?h.call(i,t)-h.call(i,e):0:4&n?-1:1)},u):u}for(t in Z.matches=function(t,e){return Z(t,null,null,e)},Z.matchesSelector=function(t,e){if(ut(t),l&&!_[e+" "]&&(!d||!d.test(e)))try{var n=p.call(t,e);if(n||g.disconnectedMatch||t.document&&11!==t.document.nodeType)return n}catch(t){_(e,!0)}return Z(e,u,null,[t]).length>0},Z.contains=function(t,e){return(t.ownerDocument||t)!=u&&ut(t),M.contains(t,e)},Z.attr=function(t,n){(t.ownerDocument||t)!=u&&ut(t);var r=e.attrHandle[n.toLowerCase()],i=r&&f.call(e.attrHandle,n.toLowerCase())?r(t,n,!l):void 0;return void 0!==i?i:t.getAttribute(n)},Z.error=function(t){throw new Error("Syntax error, unrecognized expression: "+t)},M.uniqueSort=function(t){var e,n=[],r=0,s=0;if(o=!g.sortStable,i=!g.sortStable&&a.call(t,0),E.call(t,P),o){for(;e=t[s++];)e===t[s]&&(r=n.push(s));for(;r--;)T.call(t,n[r],1)}return i=null,t},M.fn.uniqueSort=function(){return this.pushStack(M.uniqueSort(a.apply(this)))},e=M.expr={cacheLength:50,createPseudo:et,match:G,attrHandle:{},find:{},relative:{">":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(t){return t[1]=t[1].replace($,K),t[3]=(t[3]||t[4]||t[5]||"").replace($,K),"~="===t[2]&&(t[3]=" "+t[3]+" "),t.slice(0,4)},CHILD:function(t){return t[1]=t[1].toLowerCase(),"nth"===t[1].slice(0,3)?(t[3]||Z.error(t[0]),t[4]=+(t[4]?t[5]+(t[6]||1):2*("even"===t[3]||"odd"===t[3])),t[5]=+(t[7]+t[8]||"odd"===t[3])):t[3]&&Z.error(t[0]),t},PSEUDO:function(t){var e,n=!t[6]&&t[2];return G.CHILD.test(t[0])?null:(t[3]?t[2]=t[4]||t[5]||"":n&&z.test(n)&&(e=ht(n,!0))&&(e=n.indexOf(")",n.length-e)-n.length)&&(t[0]=t[0].slice(0,e),t[2]=n.slice(0,e)),t.slice(0,3))}},filter:{TAG:function(t){var e=t.replace($,K).toLowerCase();return"*"===t?function(){return!0}:function(t){return O(t,e)}},CLASS:function(t){var e=w[t+" "];return e||(e=new RegExp("(^|"+A+")"+t+"("+A+"|$)"))&&w(t,(function(t){return e.test("string"==typeof t.className&&t.className||void 0!==t.getAttribute&&t.getAttribute("class")||"")}))},ATTR:function(t,e,n){return function(r){var i=Z.attr(r,t);return null==i?"!="===e:!e||(i+="","="===e?i===n:"!="===e?i!==n:"^="===e?n&&0===i.indexOf(n):"*="===e?n&&i.indexOf(n)>-1:"$="===e?n&&i.slice(-n.length)===n:"~="===e?(" "+i.replace(F," ")+" ").indexOf(n)>-1:"|="===e&&(i===n||i.slice(0,n.length+1)===n+"-"))}},CHILD:function(t,e,n,r,i){var s="nth"!==t.slice(0,3),o="last"!==t.slice(-4),a="of-type"===e;return 1===r&&0===i?function(t){return!!t.parentNode}:function(e,n,u){var c,h,l,d,f,p=s!==o?"nextSibling":"previousSibling",m=e.parentNode,g=a&&e.nodeName.toLowerCase(),v=!u&&!a,w=!1;if(m){if(s){for(;p;){for(l=e;l=l[p];)if(a?O(l,g):1===l.nodeType)return!1;f=p="only"===t&&!f&&"nextSibling"}return!0}if(f=[o?m.firstChild:m.lastChild],o&&v){for(w=(d=(c=(h=m[y]||(m[y]={}))[t]||[])[0]===b&&c[1])&&c[2],l=d&&m.childNodes[d];l=++d&&l&&l[p]||(w=d=0)||f.pop();)if(1===l.nodeType&&++w&&l===e){h[t]=[b,d,w];break}}else if(v&&(w=d=(c=(h=e[y]||(e[y]={}))[t]||[])[0]===b&&c[1]),!1===w)for(;(l=++d&&l&&l[p]||(w=d=0)||f.pop())&&(!(a?O(l,g):1===l.nodeType)||!++w||(v&&((h=l[y]||(l[y]={}))[t]=[b,w]),l!==e)););return(w-=i)===r||w%r==0&&w/r>=0}}},PSEUDO:function(t,n){var r,i=e.pseudos[t]||e.setFilters[t.toLowerCase()]||Z.error("unsupported pseudo: "+t);return i[y]?i(n):i.length>1?(r=[t,t,"",n],e.setFilters.hasOwnProperty(t.toLowerCase())?et((function(t,e){for(var r,s=i(t,n),o=s.length;o--;)t[r=h.call(t,s[o])]=!(e[r]=s[o])})):function(t){return i(t,0,r)}):i}},pseudos:{not:et((function(t){var e=[],n=[],r=yt(t.replace(j,"$1"));return r[y]?et((function(t,e,n,i){for(var s,o=r(t,null,i,[]),a=t.length;a--;)(s=o[a])&&(t[a]=!(e[a]=s))})):function(t,i,s){return e[0]=t,r(e,null,s,n),e[0]=null,!n.pop()}})),has:et((function(t){return function(e){return Z(t,e).length>0}})),contains:et((function(t){return t=t.replace($,K),function(e){return(e.textContent||M.text(e)).indexOf(t)>-1}})),lang:et((function(t){return X.test(t||"")||Z.error("unsupported lang: "+t),t=t.replace($,K).toLowerCase(),function(e){var n;do{if(n=l?e.lang:e.getAttribute("xml:lang")||e.getAttribute("lang"))return(n=n.toLowerCase())===t||0===n.indexOf(t+"-")}while((e=e.parentNode)&&1===e.nodeType);return!1}})),target:function(t){var e=r.location&&r.location.hash;return e&&e.slice(1)===t.id},root:function(t){return t===c},focus:function(t){return t===function(){try{return u.activeElement}catch(t){}}()&&u.hasFocus()&&!!(t.type||t.href||~t.tabIndex)},enabled:st(!1),disabled:st(!0),checked:function(t){return O(t,"input")&&!!t.checked||O(t,"option")&&!!t.selected},selected:function(t){return t.parentNode&&t.parentNode.selectedIndex,!0===t.selected},empty:function(t){for(t=t.firstChild;t;t=t.nextSibling)if(t.nodeType<6)return!1;return!0},parent:function(t){return!e.pseudos.empty(t)},header:function(t){return H.test(t.nodeName)},input:function(t){return Y.test(t.nodeName)},button:function(t){return O(t,"input")&&"button"===t.type||O(t,"button")},text:function(t){var e;return O(t,"input")&&"text"===t.type&&(null==(e=t.getAttribute("type"))||"text"===e.toLowerCase())},first:ot((function(){return[0]})),last:ot((function(t,e){return[e-1]})),eq:ot((function(t,e,n){return[n<0?n+e:n]})),even:ot((function(t,e){for(var n=0;n<e;n+=2)t.push(n);return t})),odd:ot((function(t,e){for(var n=1;n<e;n+=2)t.push(n);return t})),lt:ot((function(t,e,n){var r;for(r=n<0?n+e:n>e?e:n;--r>=0;)t.push(r);return t})),gt:ot((function(t,e,n){for(var r=n<0?n+e:n;++r<e;)t.push(r);return t}))}},e.pseudos.nth=e.pseudos.eq,{radio:!0,checkbox:!0,file:!0,password:!0,image:!0})e.pseudos[t]=rt(t);for(t in{submit:!0,reset:!0})e.pseudos[t]=it(t);function ct(){}function ht(t,n){var r,i,s,o,a,u,c,h=x[t+" "];if(h)return n?0:h.slice(0);for(a=t,u=[],c=e.preFilter;a;){for(o in r&&!(i=R.exec(a))||(i&&(a=a.slice(i[0].length)||a),u.push(s=[])),r=!1,(i=V.exec(a))&&(r=i.shift(),s.push({value:r,type:i[0].replace(j," ")}),a=a.slice(r.length)),e.filter)!(i=G[o].exec(a))||c[o]&&!(i=c[o](i))||(r=i.shift(),s.push({value:r,type:o,matches:i}),a=a.slice(r.length));if(!r)break}return n?a.length:a?Z.error(t):x(t,u).slice(0)}function lt(t){for(var e=0,n=t.length,r="";e<n;e++)r+=t[e].value;return r}function dt(t,e,n){var r=e.dir,i=e.next,s=i||r,o=n&&"parentNode"===s,a=v++;return e.first?function(e,n,i){for(;e=e[r];)if(1===e.nodeType||o)return t(e,n,i);return!1}:function(e,n,u){var c,h,l=[b,a];if(u){for(;e=e[r];)if((1===e.nodeType||o)&&t(e,n,u))return!0}else for(;e=e[r];)if(1===e.nodeType||o)if(h=e[y]||(e[y]={}),i&&O(e,i))e=e[r]||e;else{if((c=h[s])&&c[0]===b&&c[1]===a)return l[2]=c[2];if(h[s]=l,l[2]=t(e,n,u))return!0}return!1}}function ft(t){return t.length>1?function(e,n,r){for(var i=t.length;i--;)if(!t[i](e,n,r))return!1;return!0}:t[0]}function pt(t,e,n,r,i){for(var s,o=[],a=0,u=t.length,c=null!=e;a<u;a++)(s=t[a])&&(n&&!n(s,r,i)||(o.push(s),c&&e.push(a)));return o}function mt(t,e,n,r,i,s){return r&&!r[y]&&(r=mt(r)),i&&!i[y]&&(i=mt(i,s)),et((function(s,o,a,u){var c,l,d,f,p=[],g=[],y=o.length,b=s||function(t,e,n){for(var r=0,i=e.length;r<i;r++)Z(t,e[r],n);return n}(e||"*",a.nodeType?[a]:a,[]),v=!t||!s&&e?b:pt(b,p,t,a,u);if(n?n(v,f=i||(s?t:y||r)?[]:o,a,u):f=v,r)for(c=pt(f,g),r(c,[],a,u),l=c.length;l--;)(d=c[l])&&(f[g[l]]=!(v[g[l]]=d));if(s){if(i||t){if(i){for(c=[],l=f.length;l--;)(d=f[l])&&c.push(v[l]=d);i(null,f=[],c,u)}for(l=f.length;l--;)(d=f[l])&&(c=i?h.call(s,d):p[l])>-1&&(s[c]=!(o[c]=d))}}else f=pt(f===o?f.splice(y,f.length):f),i?i(null,o,f,u):m.apply(o,f)}))}function gt(t){for(var r,i,s,o=t.length,a=e.relative[t[0].type],u=a||e.relative[" "],c=a?1:0,l=dt((function(t){return t===r}),u,!0),d=dt((function(t){return h.call(r,t)>-1}),u,!0),f=[function(t,e,i){var s=!a&&(i||e!=n)||((r=e).nodeType?l(t,e,i):d(t,e,i));return r=null,s}];c<o;c++)if(i=e.relative[t[c].type])f=[dt(ft(f),i)];else{if((i=e.filter[t[c].type].apply(null,t[c].matches))[y]){for(s=++c;s<o&&!e.relative[t[s].type];s++);return mt(c>1&&ft(f),c>1&&lt(t.slice(0,c-1).concat({value:" "===t[c-2].type?"*":""})).replace(j,"$1"),i,c<s&&gt(t.slice(c,s)),s<o&&gt(t=t.slice(s)),s<o&&lt(t))}f.push(i)}return ft(f)}function yt(t,r){var i,s=[],o=[],a=S[t+" "];if(!a){for(r||(r=ht(t)),i=r.length;i--;)(a=gt(r[i]))[y]?s.push(a):o.push(a);a=S(t,function(t,r){var i=r.length>0,s=t.length>0,o=function(o,a,c,h,d){var f,p,g,y=0,v="0",w=o&&[],x=[],S=n,_=o||s&&e.find.TAG("*",d),P=b+=null==S?1:Math.random()||.1,N=_.length;for(d&&(n=a==u||a||d);v!==N&&null!=(f=_[v]);v++){if(s&&f){for(p=0,a||f.ownerDocument==u||(ut(f),c=!l);g=t[p++];)if(g(f,a||u,c)){m.call(h,f);break}d&&(b=P)}i&&((f=!g&&f)&&y--,o&&w.push(f))}if(y+=v,i&&v!==y){for(p=0;g=r[p++];)g(w,x,a,c);if(o){if(y>0)for(;v--;)w[v]||x[v]||(x[v]=C.call(h));x=pt(x)}m.apply(h,x),d&&!o&&x.length>0&&y+r.length>1&&M.uniqueSort(h)}return d&&(b=P,n=S),w};return i?et(o):o}(o,s)),a.selector=t}return a}function bt(t,n,r,i){var s,o,a,u,c,h="function"==typeof t&&t,d=!i&&ht(t=h.selector||t);if(r=r||[],1===d.length){if((o=d[0]=d[0].slice(0)).length>2&&"ID"===(a=o[0]).type&&9===n.nodeType&&l&&e.relative[o[1].type]){if(!(n=(e.find.ID(a.matches[0].replace($,K),n)||[])[0]))return r;h&&(n=n.parentNode),t=t.slice(o.shift().value.length)}for(s=G.needsContext.test(t)?0:o.length;s--&&(a=o[s],!e.relative[u=a.type]);)if((c=e.find[u])&&(i=c(a.matches[0].replace($,K),W.test(o[0].type)&&at(n.parentNode)||n))){if(o.splice(s,1),!(t=i.length&&lt(o)))return m.apply(r,i),r;break}}return(h||yt(t,d))(i,n,!l,r,!n||W.test(t)&&at(n.parentNode)||n),r}ct.prototype=e.filters=e.pseudos,e.setFilters=new ct,g.sortStable=y.split("").sort(P).join("")===y,ut(),g.sortDetached=nt((function(t){return 1&t.compareDocumentPosition(u.createElement("fieldset"))})),M.find=Z,M.expr[":"]=M.expr.pseudos,M.unique=M.uniqueSort,Z.compile=yt,Z.select=bt,Z.setDocument=ut,Z.tokenize=ht,Z.escape=M.escapeSelector,Z.getText=M.text,Z.isXML=M.isXMLDoc,Z.selectors=M.expr,Z.support=M.support,Z.uniqueSort=M.uniqueSort}();var I=function(t,e,n){for(var r=[],i=void 0!==n;(t=t[e])&&9!==t.nodeType;)if(1===t.nodeType){if(i&&M(t).is(n))break;r.push(t)}return r},F=function(t,e){for(var n=[];t;t=t.nextSibling)1===t.nodeType&&t!==e&&n.push(t);return n},R=M.expr.match.needsContext,V=/^<([a-z][^\/\0>:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function q(t,e,n){return y(e)?M.grep(t,(function(t,r){return!!e.call(t,r,t)!==n})):e.nodeType?M.grep(t,(function(t){return t===e!==n})):"string"!=typeof e?M.grep(t,(function(t){return h.call(e,t)>-1!==n})):M.filter(e,t,n)}M.filter=function(t,e,n){var r=e[0];return n&&(t=":not("+t+")"),1===e.length&&1===r.nodeType?M.find.matchesSelector(r,t)?[r]:[]:M.find.matches(t,M.grep(e,(function(t){return 1===t.nodeType})))},M.fn.extend({find:function(t){var e,n,r=this.length,i=this;if("string"!=typeof t)return this.pushStack(M(t).filter((function(){for(e=0;e<r;e++)if(M.contains(i[e],this))return!0})));for(n=this.pushStack([]),e=0;e<r;e++)M.find(t,i[e],n);return r>1?M.uniqueSort(n):n},filter:function(t){return this.pushStack(q(this,t||[],!1))},not:function(t){return this.pushStack(q(this,t||[],!0))},is:function(t){return!!q(this,"string"==typeof t&&R.test(t)?M(t):t||[],!1).length}});var z,X=/^(?:\s*(<[\w\W]+>)[^>]*|#([\w-]+))$/;(M.fn.init=function(t,e,n){var r,i;if(!t)return this;if(n=n||z,"string"==typeof t){if(!(r="<"===t[0]&&">"===t[t.length-1]&&t.length>=3?[null,t,null]:X.exec(t))||!r[1]&&e)return!e||e.jquery?(e||n).find(t):this.constructor(e).find(t);if(r[1]){if(e=e instanceof M?e[0]:e,M.merge(this,M.parseHTML(r[1],e&&e.nodeType?e.ownerDocument||e:v,!0)),V.test(r[1])&&M.isPlainObject(e))for(r in e)y(this[r])?this[r](e[r]):this.attr(r,e[r]);return this}return(i=v.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return t.nodeType?(this[0]=t,this.length=1,this):y(t)?void 0!==n.ready?n.ready(t):t(M):M.makeArray(t,this)}).prototype=M.fn,z=M(v);var G=/^(?:parents|prev(?:Until|All))/,Y={children:!0,contents:!0,next:!0,prev:!0};function H(t,e){for(;(t=t[e])&&1!==t.nodeType;);return t}M.fn.extend({has:function(t){var e=M(t,this),n=e.length;return this.filter((function(){for(var t=0;t<n;t++)if(M.contains(this,e[t]))return!0}))},closest:function(t,e){var n,r=0,i=this.length,s=[],o="string"!=typeof t&&M(t);if(!R.test(t))for(;r<i;r++)for(n=this[r];n&&n!==e;n=n.parentNode)if(n.nodeType<11&&(o?o.index(n)>-1:1===n.nodeType&&M.find.matchesSelector(n,t))){s.push(n);break}return this.pushStack(s.length>1?M.uniqueSort(s):s)},index:function(t){return t?"string"==typeof t?h.call(M(t),this[0]):h.call(this,t.jquery?t[0]:t):this[0]&&this[0].parentNode?this.first().prevAll().length:-1},add:function(t,e){return this.pushStack(M.uniqueSort(M.merge(this.get(),M(t,e))))},addBack:function(t){return this.add(null==t?this.prevObject:this.prevObject.filter(t))}}),M.each({parent:function(t){var e=t.parentNode;return e&&11!==e.nodeType?e:null},parents:function(t){return I(t,"parentNode")},parentsUntil:function(t,e,n){return I(t,"parentNode",n)},next:function(t){return H(t,"nextSibling")},prev:function(t){return H(t,"previousSibling")},nextAll:function(t){return I(t,"nextSibling")},prevAll:function(t){return I(t,"previousSibling")},nextUntil:function(t,e,n){return I(t,"nextSibling",n)},prevUntil:function(t,e,n){return I(t,"previousSibling",n)},siblings:function(t){return F((t.parentNode||{}).firstChild,t)},children:function(t){return F(t.firstChild)},contents:function(t){return null!=t.contentDocument&&o(t.contentDocument)?t.contentDocument:(O(t,"template")&&(t=t.content||t),M.merge([],t.childNodes))}},(function(t,e){M.fn[t]=function(n,r){var i=M.map(this,e,n);return"Until"!==t.slice(-5)&&(r=n),r&&"string"==typeof r&&(i=M.filter(r,i)),this.length>1&&(Y[t]||M.uniqueSort(i),G.test(t)&&i.reverse()),this.pushStack(i)}}));var U=/[^\x20\t\r\n\f]+/g;function W(t){return t}function $(t){throw t}function K(t,e,n,r){var i;try{t&&y(i=t.promise)?i.call(t).done(e).fail(n):t&&y(i=t.then)?i.call(t,e,n):e.apply(void 0,[t].slice(r))}catch(t){n.apply(void 0,[t])}}M.Callbacks=function(t){t="string"==typeof t?function(t){var e={};return M.each(t.match(U)||[],(function(t,n){e[n]=!0})),e}(t):M.extend({},t);var e,n,r,i,s=[],o=[],a=-1,u=function(){for(i=i||t.once,r=e=!0;o.length;a=-1)for(n=o.shift();++a<s.length;)!1===s[a].apply(n[0],n[1])&&t.stopOnFalse&&(a=s.length,n=!1);t.memory||(n=!1),e=!1,i&&(s=n?[]:"")},c={add:function(){return s&&(n&&!e&&(a=s.length-1,o.push(n)),function e(n){M.each(n,(function(n,r){y(r)?t.unique&&c.has(r)||s.push(r):r&&r.length&&"string"!==S(r)&&e(r)}))}(arguments),n&&!e&&u()),this},remove:function(){return M.each(arguments,(function(t,e){for(var n;(n=M.inArray(e,s,n))>-1;)s.splice(n,1),n<=a&&a--})),this},has:function(t){return t?M.inArray(t,s)>-1:s.length>0},empty:function(){return s&&(s=[]),this},disable:function(){return i=o=[],s=n="",this},disabled:function(){return!s},lock:function(){return i=o=[],n||e||(s=n=""),this},locked:function(){return!!i},fireWith:function(t,n){return i||(n=[t,(n=n||[]).slice?n.slice():n],o.push(n),e||u()),this},fire:function(){return c.fireWith(this,arguments),this},fired:function(){return!!r}};return c},M.extend({Deferred:function(t){var e=[["notify","progress",M.Callbacks("memory"),M.Callbacks("memory"),2],["resolve","done",M.Callbacks("once memory"),M.Callbacks("once memory"),0,"resolved"],["reject","fail",M.Callbacks("once memory"),M.Callbacks("once memory"),1,"rejected"]],n="pending",i={state:function(){return n},always:function(){return s.done(arguments).fail(arguments),this},catch:function(t){return i.then(null,t)},pipe:function(){var t=arguments;return M.Deferred((function(n){M.each(e,(function(e,r){var i=y(t[r[4]])&&t[r[4]];s[r[1]]((function(){var t=i&&i.apply(this,arguments);t&&y(t.promise)?t.promise().progress(n.notify).done(n.resolve).fail(n.reject):n[r[0]+"With"](this,i?[t]:arguments)}))})),t=null})).promise()},then:function(t,n,i){var s=0;function o(t,e,n,i){return function(){var a=this,u=arguments,c=function(){var r,c;if(!(t<s)){if((r=n.apply(a,u))===e.promise())throw new TypeError("Thenable self-resolution");c=r&&("object"==typeof r||"function"==typeof r)&&r.then,y(c)?i?c.call(r,o(s,e,W,i),o(s,e,$,i)):(s++,c.call(r,o(s,e,W,i),o(s,e,$,i),o(s,e,W,e.notifyWith))):(n!==W&&(a=void 0,u=[r]),(i||e.resolveWith)(a,u))}},h=i?c:function(){try{c()}catch(r){M.Deferred.exceptionHook&&M.Deferred.exceptionHook(r,h.error),t+1>=s&&(n!==$&&(a=void 0,u=[r]),e.rejectWith(a,u))}};t?h():(M.Deferred.getErrorHook?h.error=M.Deferred.getErrorHook():M.Deferred.getStackHook&&(h.error=M.Deferred.getStackHook()),r.setTimeout(h))}}return M.Deferred((function(r){e[0][3].add(o(0,r,y(i)?i:W,r.notifyWith)),e[1][3].add(o(0,r,y(t)?t:W)),e[2][3].add(o(0,r,y(n)?n:$))})).promise()},promise:function(t){return null!=t?M.extend(t,i):i}},s={};return M.each(e,(function(t,r){var o=r[2],a=r[5];i[r[1]]=o.add,a&&o.add((function(){n=a}),e[3-t][2].disable,e[3-t][3].disable,e[0][2].lock,e[0][3].lock),o.add(r[3].fire),s[r[0]]=function(){return s[r[0]+"With"](this===s?void 0:this,arguments),this},s[r[0]+"With"]=o.fireWith})),i.promise(s),t&&t.call(s,s),s},when:function(t){var e=arguments.length,n=e,r=Array(n),i=a.call(arguments),s=M.Deferred(),o=function(t){return function(n){r[t]=this,i[t]=arguments.length>1?a.call(arguments):n,--e||s.resolveWith(r,i)}};if(e<=1&&(K(t,s.done(o(n)).resolve,s.reject,!e),"pending"===s.state()||y(i[n]&&i[n].then)))return s.then();for(;n--;)K(i[n],o(n),s.reject);return s.promise()}});var Q=/^(Eval|Internal|Range|Reference|Syntax|Type|URI)Error$/;M.Deferred.exceptionHook=function(t,e){r.console&&r.console.warn&&t&&Q.test(t.name)&&r.console.warn("jQuery.Deferred exception: "+t.message,t.stack,e)},M.readyException=function(t){r.setTimeout((function(){throw t}))};var J=M.Deferred();function Z(){v.removeEventListener("DOMContentLoaded",Z),r.removeEventListener("load",Z),M.ready()}M.fn.ready=function(t){return J.then(t).catch((function(t){M.readyException(t)})),this},M.extend({isReady:!1,readyWait:1,ready:function(t){(!0===t?--M.readyWait:M.isReady)||(M.isReady=!0,!0!==t&&--M.readyWait>0||J.resolveWith(v,[M]))}}),M.ready.then=J.then,"complete"===v.readyState||"loading"!==v.readyState&&!v.documentElement.doScroll?r.setTimeout(M.ready):(v.addEventListener("DOMContentLoaded",Z),r.addEventListener("load",Z));var tt=function(t,e,n,r,i,s,o){var a=0,u=t.length,c=null==n;if("object"===S(n))for(a in i=!0,n)tt(t,e,a,n[a],!0,s,o);else if(void 0!==r&&(i=!0,y(r)||(o=!0),c&&(o?(e.call(t,r),e=null):(c=e,e=function(t,e,n){return c.call(M(t),n)})),e))for(;a<u;a++)e(t[a],n,o?r:r.call(t[a],a,e(t[a],n)));return i?t:c?e.call(t):u?e(t[0],n):s},et=/^-ms-/,nt=/-([a-z])/g;function rt(t,e){return e.toUpperCase()}function it(t){return t.replace(et,"ms-").replace(nt,rt)}var st=function(t){return 1===t.nodeType||9===t.nodeType||!+t.nodeType};function ot(){this.expando=M.expando+ot.uid++}ot.uid=1,ot.prototype={cache:function(t){var e=t[this.expando];return e||(e={},st(t)&&(t.nodeType?t[this.expando]=e:Object.defineProperty(t,this.expando,{value:e,configurable:!0}))),e},set:function(t,e,n){var r,i=this.cache(t);if("string"==typeof e)i[it(e)]=n;else for(r in e)i[it(r)]=e[r];return i},get:function(t,e){return void 0===e?this.cache(t):t[this.expando]&&t[this.expando][it(e)]},access:function(t,e,n){return void 0===e||e&&"string"==typeof e&&void 0===n?this.get(t,e):(this.set(t,e,n),void 0!==n?n:e)},remove:function(t,e){var n,r=t[this.expando];if(void 0!==r){if(void 0!==e){n=(e=Array.isArray(e)?e.map(it):(e=it(e))in r?[e]:e.match(U)||[]).length;for(;n--;)delete r[e[n]]}(void 0===e||M.isEmptyObject(r))&&(t.nodeType?t[this.expando]=void 0:delete t[this.expando])}},hasData:function(t){var e=t[this.expando];return void 0!==e&&!M.isEmptyObject(e)}};var at=new ot,ut=new ot,ct=/^(?:\{[\w\W]*\}|\[[\w\W]*\])$/,ht=/[A-Z]/g;function lt(t,e,n){var r;if(void 0===n&&1===t.nodeType)if(r="data-"+e.replace(ht,"-$&").toLowerCase(),"string"==typeof(n=t.getAttribute(r))){try{n=function(t){return"true"===t||"false"!==t&&("null"===t?null:t===+t+""?+t:ct.test(t)?JSON.parse(t):t)}(n)}catch(t){}ut.set(t,e,n)}else n=void 0;return n}M.extend({hasData:function(t){return ut.hasData(t)||at.hasData(t)},data:function(t,e,n){return ut.access(t,e,n)},removeData:function(t,e){ut.remove(t,e)},_data:function(t,e,n){return at.access(t,e,n)},_removeData:function(t,e){at.remove(t,e)}}),M.fn.extend({data:function(t,e){var n,r,i,s=this[0],o=s&&s.attributes;if(void 0===t){if(this.length&&(i=ut.get(s),1===s.nodeType&&!at.get(s,"hasDataAttrs"))){for(n=o.length;n--;)o[n]&&0===(r=o[n].name).indexOf("data-")&&(r=it(r.slice(5)),lt(s,r,i[r]));at.set(s,"hasDataAttrs",!0)}return i}return"object"==typeof t?this.each((function(){ut.set(this,t)})):tt(this,(function(e){var n;if(s&&void 0===e)return void 0!==(n=ut.get(s,t))||void 0!==(n=lt(s,t))?n:void 0;this.each((function(){ut.set(this,t,e)}))}),null,e,arguments.length>1,null,!0)},removeData:function(t){return this.each((function(){ut.remove(this,t)}))}}),M.extend({queue:function(t,e,n){var r;if(t)return e=(e||"fx")+"queue",r=at.get(t,e),n&&(!r||Array.isArray(n)?r=at.access(t,e,M.makeArray(n)):r.push(n)),r||[]},dequeue:function(t,e){e=e||"fx";var n=M.queue(t,e),r=n.length,i=n.shift(),s=M._queueHooks(t,e);"inprogress"===i&&(i=n.shift(),r--),i&&("fx"===e&&n.unshift("inprogress"),delete s.stop,i.call(t,(function(){M.dequeue(t,e)}),s)),!r&&s&&s.empty.fire()},_queueHooks:function(t,e){var n=e+"queueHooks";return at.get(t,n)||at.access(t,n,{empty:M.Callbacks("once memory").add((function(){at.remove(t,[e+"queue",n])}))})}}),M.fn.extend({queue:function(t,e){var n=2;return"string"!=typeof t&&(e=t,t="fx",n--),arguments.length<n?M.queue(this[0],t):void 0===e?this:this.each((function(){var n=M.queue(this,t,e);M._queueHooks(this,t),"fx"===t&&"inprogress"!==n[0]&&M.dequeue(this,t)}))},dequeue:function(t){return this.each((function(){M.dequeue(this,t)}))},clearQueue:function(t){return this.queue(t||"fx",[])},promise:function(t,e){var n,r=1,i=M.Deferred(),s=this,o=this.length,a=function(){--r||i.resolveWith(s,[s])};for("string"!=typeof t&&(e=t,t=void 0),t=t||"fx";o--;)(n=at.get(s[o],t+"queueHooks"))&&n.empty&&(r++,n.empty.add(a));return a(),i.promise(e)}});var dt=/[+-]?(?:\d*\.|)\d+(?:[eE][+-]?\d+|)/.source,ft=new RegExp("^(?:([+-])=|)("+dt+")([a-z%]*)$","i"),pt=["Top","Right","Bottom","Left"],mt=v.documentElement,gt=function(t){return M.contains(t.ownerDocument,t)},yt={composed:!0};mt.getRootNode&&(gt=function(t){return M.contains(t.ownerDocument,t)||t.getRootNode(yt)===t.ownerDocument});var bt=function(t,e){return"none"===(t=e||t).style.display||""===t.style.display&&gt(t)&&"none"===M.css(t,"display")};function vt(t,e,n,r){var i,s,o=20,a=r?function(){return r.cur()}:function(){return M.css(t,e,"")},u=a(),c=n&&n[3]||(M.cssNumber[e]?"":"px"),h=t.nodeType&&(M.cssNumber[e]||"px"!==c&&+u)&&ft.exec(M.css(t,e));if(h&&h[3]!==c){for(u/=2,c=c||h[3],h=+u||1;o--;)M.style(t,e,h+c),(1-s)*(1-(s=a()/u||.5))<=0&&(o=0),h/=s;h*=2,M.style(t,e,h+c),n=n||[]}return n&&(h=+h||+u||0,i=n[1]?h+(n[1]+1)*n[2]:+n[2],r&&(r.unit=c,r.start=h,r.end=i)),i}var wt={};function xt(t){var e,n=t.ownerDocument,r=t.nodeName,i=wt[r];return i||(e=n.body.appendChild(n.createElement(r)),i=M.css(e,"display"),e.parentNode.removeChild(e),"none"===i&&(i="block"),wt[r]=i,i)}function St(t,e){for(var n,r,i=[],s=0,o=t.length;s<o;s++)(r=t[s]).style&&(n=r.style.display,e?("none"===n&&(i[s]=at.get(r,"display")||null,i[s]||(r.style.display="")),""===r.style.display&&bt(r)&&(i[s]=xt(r))):"none"!==n&&(i[s]="none",at.set(r,"display",n)));for(s=0;s<o;s++)null!=i[s]&&(t[s].style.display=i[s]);return t}M.fn.extend({show:function(){return St(this,!0)},hide:function(){return St(this)},toggle:function(t){return"boolean"==typeof t?t?this.show():this.hide():this.each((function(){bt(this)?M(this).show():M(this).hide()}))}});var _t,Pt,Mt=/^(?:checkbox|radio)$/i,Nt=/<([a-z][^\/\0>\x20\t\r\n\f]*)/i,Ot=/^$|^module$|\/(?:java|ecma)script/i;_t=v.createDocumentFragment().appendChild(v.createElement("div")),(Pt=v.createElement("input")).setAttribute("type","radio"),Pt.setAttribute("checked","checked"),Pt.setAttribute("name","t"),_t.appendChild(Pt),g.checkClone=_t.cloneNode(!0).cloneNode(!0).lastChild.checked,_t.innerHTML="<textarea>x</textarea>",g.noCloneChecked=!!_t.cloneNode(!0).lastChild.defaultValue,_t.innerHTML="<option></option>",g.option=!!_t.lastChild;var Ct={thead:[1,"<table>","</table>"],col:[2,"<table><colgroup>","</colgroup></table>"],tr:[2,"<table><tbody>","</tbody></table>"],td:[3,"<table><tbody><tr>","</tr></tbody></table>"],_default:[0,"",""]};function Et(t,e){var n;return n=void 0!==t.getElementsByTagName?t.getElementsByTagName(e||"*"):void 0!==t.querySelectorAll?t.querySelectorAll(e||"*"):[],void 0===e||e&&O(t,e)?M.merge([t],n):n}function Tt(t,e){for(var n=0,r=t.length;n<r;n++)at.set(t[n],"globalEval",!e||at.get(e[n],"globalEval"))}Ct.tbody=Ct.tfoot=Ct.colgroup=Ct.caption=Ct.thead,Ct.th=Ct.td,g.option||(Ct.optgroup=Ct.option=[1,"<select multiple='multiple'>","</select>"]);var At=/<|&#?\w+;/;function jt(t,e,n,r,i){for(var s,o,a,u,c,h,l=e.createDocumentFragment(),d=[],f=0,p=t.length;f<p;f++)if((s=t[f])||0===s)if("object"===S(s))M.merge(d,s.nodeType?[s]:s);else if(At.test(s)){for(o=o||l.appendChild(e.createElement("div")),a=(Nt.exec(s)||["",""])[1].toLowerCase(),u=Ct[a]||Ct._default,o.innerHTML=u[1]+M.htmlPrefilter(s)+u[2],h=u[0];h--;)o=o.lastChild;M.merge(d,o.childNodes),(o=l.firstChild).textContent=""}else d.push(e.createTextNode(s));for(l.textContent="",f=0;s=d[f++];)if(r&&M.inArray(s,r)>-1)i&&i.push(s);else if(c=gt(s),o=Et(l.appendChild(s),"script"),c&&Tt(o),n)for(h=0;s=o[h++];)Ot.test(s.type||"")&&n.push(s);return l}var kt=/^([^.]*)(?:\.(.+)|)/;function Dt(){return!0}function Lt(){return!1}function Bt(t,e,n,r,i,s){var o,a;if("object"==typeof e){for(a in"string"!=typeof n&&(r=r||n,n=void 0),e)Bt(t,a,n,r,e[a],s);return t}if(null==r&&null==i?(i=n,r=n=void 0):null==i&&("string"==typeof n?(i=r,r=void 0):(i=r,r=n,n=void 0)),!1===i)i=Lt;else if(!i)return t;return 1===s&&(o=i,i=function(t){return M().off(t),o.apply(this,arguments)},i.guid=o.guid||(o.guid=M.guid++)),t.each((function(){M.event.add(this,e,i,r,n)}))}function It(t,e,n){n?(at.set(t,e,!1),M.event.add(t,e,{namespace:!1,handler:function(t){var n,r=at.get(this,e);if(1&t.isTrigger&&this[e]){if(r)(M.event.special[e]||{}).delegateType&&t.stopPropagation();else if(r=a.call(arguments),at.set(this,e,r),this[e](),n=at.get(this,e),at.set(this,e,!1),r!==n)return t.stopImmediatePropagation(),t.preventDefault(),n}else r&&(at.set(this,e,M.event.trigger(r[0],r.slice(1),this)),t.stopPropagation(),t.isImmediatePropagationStopped=Dt)}})):void 0===at.get(t,e)&&M.event.add(t,e,Dt)}M.event={global:{},add:function(t,e,n,r,i){var s,o,a,u,c,h,l,d,f,p,m,g=at.get(t);if(st(t))for(n.handler&&(n=(s=n).handler,i=s.selector),i&&M.find.matchesSelector(mt,i),n.guid||(n.guid=M.guid++),(u=g.events)||(u=g.events=Object.create(null)),(o=g.handle)||(o=g.handle=function(e){return void 0!==M&&M.event.triggered!==e.type?M.event.dispatch.apply(t,arguments):void 0}),c=(e=(e||"").match(U)||[""]).length;c--;)f=m=(a=kt.exec(e[c])||[])[1],p=(a[2]||"").split(".").sort(),f&&(l=M.event.special[f]||{},f=(i?l.delegateType:l.bindType)||f,l=M.event.special[f]||{},h=M.extend({type:f,origType:m,data:r,handler:n,guid:n.guid,selector:i,needsContext:i&&M.expr.match.needsContext.test(i),namespace:p.join(".")},s),(d=u[f])||((d=u[f]=[]).delegateCount=0,l.setup&&!1!==l.setup.call(t,r,p,o)||t.addEventListener&&t.addEventListener(f,o)),l.add&&(l.add.call(t,h),h.handler.guid||(h.handler.guid=n.guid)),i?d.splice(d.delegateCount++,0,h):d.push(h),M.event.global[f]=!0)},remove:function(t,e,n,r,i){var s,o,a,u,c,h,l,d,f,p,m,g=at.hasData(t)&&at.get(t);if(g&&(u=g.events)){for(c=(e=(e||"").match(U)||[""]).length;c--;)if(f=m=(a=kt.exec(e[c])||[])[1],p=(a[2]||"").split(".").sort(),f){for(l=M.event.special[f]||{},d=u[f=(r?l.delegateType:l.bindType)||f]||[],a=a[2]&&new RegExp("(^|\\.)"+p.join("\\.(?:.*\\.|)")+"(\\.|$)"),o=s=d.length;s--;)h=d[s],!i&&m!==h.origType||n&&n.guid!==h.guid||a&&!a.test(h.namespace)||r&&r!==h.selector&&("**"!==r||!h.selector)||(d.splice(s,1),h.selector&&d.delegateCount--,l.remove&&l.remove.call(t,h));o&&!d.length&&(l.teardown&&!1!==l.teardown.call(t,p,g.handle)||M.removeEvent(t,f,g.handle),delete u[f])}else for(f in u)M.event.remove(t,f+e[c],n,r,!0);M.isEmptyObject(u)&&at.remove(t,"handle events")}},dispatch:function(t){var e,n,r,i,s,o,a=new Array(arguments.length),u=M.event.fix(t),c=(at.get(this,"events")||Object.create(null))[u.type]||[],h=M.event.special[u.type]||{};for(a[0]=u,e=1;e<arguments.length;e++)a[e]=arguments[e];if(u.delegateTarget=this,!h.preDispatch||!1!==h.preDispatch.call(this,u)){for(o=M.event.handlers.call(this,u,c),e=0;(i=o[e++])&&!u.isPropagationStopped();)for(u.currentTarget=i.elem,n=0;(s=i.handlers[n++])&&!u.isImmediatePropagationStopped();)u.rnamespace&&!1!==s.namespace&&!u.rnamespace.test(s.namespace)||(u.handleObj=s,u.data=s.data,void 0!==(r=((M.event.special[s.origType]||{}).handle||s.handler).apply(i.elem,a))&&!1===(u.result=r)&&(u.preventDefault(),u.stopPropagation()));return h.postDispatch&&h.postDispatch.call(this,u),u.result}},handlers:function(t,e){var n,r,i,s,o,a=[],u=e.delegateCount,c=t.target;if(u&&c.nodeType&&!("click"===t.type&&t.button>=1))for(;c!==this;c=c.parentNode||this)if(1===c.nodeType&&("click"!==t.type||!0!==c.disabled)){for(s=[],o={},n=0;n<u;n++)void 0===o[i=(r=e[n]).selector+" "]&&(o[i]=r.needsContext?M(i,this).index(c)>-1:M.find(i,this,null,[c]).length),o[i]&&s.push(r);s.length&&a.push({elem:c,handlers:s})}return c=this,u<e.length&&a.push({elem:c,handlers:e.slice(u)}),a},addProp:function(t,e){Object.defineProperty(M.Event.prototype,t,{enumerable:!0,configurable:!0,get:y(e)?function(){if(this.originalEvent)return e(this.originalEvent)}:function(){if(this.originalEvent)return this.originalEvent[t]},set:function(e){Object.defineProperty(this,t,{enumerable:!0,configurable:!0,writable:!0,value:e})}})},fix:function(t){return t[M.expando]?t:new M.Event(t)},special:{load:{noBubble:!0},click:{setup:function(t){var e=this||t;return Mt.test(e.type)&&e.click&&O(e,"input")&&It(e,"click",!0),!1},trigger:function(t){var e=this||t;return Mt.test(e.type)&&e.click&&O(e,"input")&&It(e,"click"),!0},_default:function(t){var e=t.target;return Mt.test(e.type)&&e.click&&O(e,"input")&&at.get(e,"click")||O(e,"a")}},beforeunload:{postDispatch:function(t){void 0!==t.result&&t.originalEvent&&(t.originalEvent.returnValue=t.result)}}}},M.removeEvent=function(t,e,n){t.removeEventListener&&t.removeEventListener(e,n)},M.Event=function(t,e){if(!(this instanceof M.Event))return new M.Event(t,e);t&&t.type?(this.originalEvent=t,this.type=t.type,this.isDefaultPrevented=t.defaultPrevented||void 0===t.defaultPrevented&&!1===t.returnValue?Dt:Lt,this.target=t.target&&3===t.target.nodeType?t.target.parentNode:t.target,this.currentTarget=t.currentTarget,this.relatedTarget=t.relatedTarget):this.type=t,e&&M.extend(this,e),this.timeStamp=t&&t.timeStamp||Date.now(),this[M.expando]=!0},M.Event.prototype={constructor:M.Event,isDefaultPrevented:Lt,isPropagationStopped:Lt,isImmediatePropagationStopped:Lt,isSimulated:!1,preventDefault:function(){var t=this.originalEvent;this.isDefaultPrevented=Dt,t&&!this.isSimulated&&t.preventDefault()},stopPropagation:function(){var t=this.originalEvent;this.isPropagationStopped=Dt,t&&!this.isSimulated&&t.stopPropagation()},stopImmediatePropagation:function(){var t=this.originalEvent;this.isImmediatePropagationStopped=Dt,t&&!this.isSimulated&&t.stopImmediatePropagation(),this.stopPropagation()}},M.each({altKey:!0,bubbles:!0,cancelable:!0,changedTouches:!0,ctrlKey:!0,detail:!0,eventPhase:!0,metaKey:!0,pageX:!0,pageY:!0,shiftKey:!0,view:!0,char:!0,code:!0,charCode:!0,key:!0,keyCode:!0,button:!0,buttons:!0,clientX:!0,clientY:!0,offsetX:!0,offsetY:!0,pointerId:!0,pointerType:!0,screenX:!0,screenY:!0,targetTouches:!0,toElement:!0,touches:!0,which:!0},M.event.addProp),M.each({focus:"focusin",blur:"focusout"},(function(t,e){function n(t){if(v.documentMode){var n=at.get(this,"handle"),r=M.event.fix(t);r.type="focusin"===t.type?"focus":"blur",r.isSimulated=!0,n(t),r.target===r.currentTarget&&n(r)}else M.event.simulate(e,t.target,M.event.fix(t))}M.event.special[t]={setup:function(){var r;if(It(this,t,!0),!v.documentMode)return!1;(r=at.get(this,e))||this.addEventListener(e,n),at.set(this,e,(r||0)+1)},trigger:function(){return It(this,t),!0},teardown:function(){var t;if(!v.documentMode)return!1;(t=at.get(this,e)-1)?at.set(this,e,t):(this.removeEventListener(e,n),at.remove(this,e))},_default:function(e){return at.get(e.target,t)},delegateType:e},M.event.special[e]={setup:function(){var r=this.ownerDocument||this.document||this,i=v.documentMode?this:r,s=at.get(i,e);s||(v.documentMode?this.addEventListener(e,n):r.addEventListener(t,n,!0)),at.set(i,e,(s||0)+1)},teardown:function(){var r=this.ownerDocument||this.document||this,i=v.documentMode?this:r,s=at.get(i,e)-1;s?at.set(i,e,s):(v.documentMode?this.removeEventListener(e,n):r.removeEventListener(t,n,!0),at.remove(i,e))}}})),M.each({mouseenter:"mouseover",mouseleave:"mouseout",pointerenter:"pointerover",pointerleave:"pointerout"},(function(t,e){M.event.special[t]={delegateType:e,bindType:e,handle:function(t){var n,r=t.relatedTarget,i=t.handleObj;return r&&(r===this||M.contains(this,r))||(t.type=i.origType,n=i.handler.apply(this,arguments),t.type=e),n}}})),M.fn.extend({on:function(t,e,n,r){return Bt(this,t,e,n,r)},one:function(t,e,n,r){return Bt(this,t,e,n,r,1)},off:function(t,e,n){var r,i;if(t&&t.preventDefault&&t.handleObj)return r=t.handleObj,M(t.delegateTarget).off(r.namespace?r.origType+"."+r.namespace:r.origType,r.selector,r.handler),this;if("object"==typeof t){for(i in t)this.off(i,e,t[i]);return this}return!1!==e&&"function"!=typeof e||(n=e,e=void 0),!1===n&&(n=Lt),this.each((function(){M.event.remove(this,t,n,e)}))}});var Ft=/<script|<style|<link/i,Rt=/checked\s*(?:[^=]|=\s*.checked.)/i,Vt=/^\s*<!\[CDATA\[|\]\]>\s*$/g;function qt(t,e){return O(t,"table")&&O(11!==e.nodeType?e:e.firstChild,"tr")&&M(t).children("tbody")[0]||t}function zt(t){return t.type=(null!==t.getAttribute("type"))+"/"+t.type,t}function Xt(t){return"true/"===(t.type||"").slice(0,5)?t.type=t.type.slice(5):t.removeAttribute("type"),t}function Gt(t,e){var n,r,i,s,o,a;if(1===e.nodeType){if(at.hasData(t)&&(a=at.get(t).events))for(i in at.remove(e,"handle events"),a)for(n=0,r=a[i].length;n<r;n++)M.event.add(e,i,a[i][n]);ut.hasData(t)&&(s=ut.access(t),o=M.extend({},s),ut.set(e,o))}}function Yt(t,e){var n=e.nodeName.toLowerCase();"input"===n&&Mt.test(t.type)?e.checked=t.checked:"input"!==n&&"textarea"!==n||(e.defaultValue=t.defaultValue)}function Ht(t,e,n,r){e=u(e);var i,s,o,a,c,h,l=0,d=t.length,f=d-1,p=e[0],m=y(p);if(m||d>1&&"string"==typeof p&&!g.checkClone&&Rt.test(p))return t.each((function(i){var s=t.eq(i);m&&(e[0]=p.call(this,i,s.html())),Ht(s,e,n,r)}));if(d&&(s=(i=jt(e,t[0].ownerDocument,!1,t,r)).firstChild,1===i.childNodes.length&&(i=s),s||r)){for(a=(o=M.map(Et(i,"script"),zt)).length;l<d;l++)c=i,l!==f&&(c=M.clone(c,!0,!0),a&&M.merge(o,Et(c,"script"))),n.call(t[l],c,l);if(a)for(h=o[o.length-1].ownerDocument,M.map(o,Xt),l=0;l<a;l++)c=o[l],Ot.test(c.type||"")&&!at.access(c,"globalEval")&&M.contains(h,c)&&(c.src&&"module"!==(c.type||"").toLowerCase()?M._evalUrl&&!c.noModule&&M._evalUrl(c.src,{nonce:c.nonce||c.getAttribute("nonce")},h):x(c.textContent.replace(Vt,""),c,h))}return t}function Ut(t,e,n){for(var r,i=e?M.filter(e,t):t,s=0;null!=(r=i[s]);s++)n||1!==r.nodeType||M.cleanData(Et(r)),r.parentNode&&(n&&gt(r)&&Tt(Et(r,"script")),r.parentNode.removeChild(r));return t}M.extend({htmlPrefilter:function(t){return t},clone:function(t,e,n){var r,i,s,o,a=t.cloneNode(!0),u=gt(t);if(!(g.noCloneChecked||1!==t.nodeType&&11!==t.nodeType||M.isXMLDoc(t)))for(o=Et(a),r=0,i=(s=Et(t)).length;r<i;r++)Yt(s[r],o[r]);if(e)if(n)for(s=s||Et(t),o=o||Et(a),r=0,i=s.length;r<i;r++)Gt(s[r],o[r]);else Gt(t,a);return(o=Et(a,"script")).length>0&&Tt(o,!u&&Et(t,"script")),a},cleanData:function(t){for(var e,n,r,i=M.event.special,s=0;void 0!==(n=t[s]);s++)if(st(n)){if(e=n[at.expando]){if(e.events)for(r in e.events)i[r]?M.event.remove(n,r):M.removeEvent(n,r,e.handle);n[at.expando]=void 0}n[ut.expando]&&(n[ut.expando]=void 0)}}}),M.fn.extend({detach:function(t){return Ut(this,t,!0)},remove:function(t){return Ut(this,t)},text:function(t){return tt(this,(function(t){return void 0===t?M.text(this):this.empty().each((function(){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||(this.textContent=t)}))}),null,t,arguments.length)},append:function(){return Ht(this,arguments,(function(t){1!==this.nodeType&&11!==this.nodeType&&9!==this.nodeType||qt(this,t).appendChild(t)}))},prepend:function(){return Ht(this,arguments,(function(t){if(1===this.nodeType||11===this.nodeType||9===this.nodeType){var e=qt(this,t);e.insertBefore(t,e.firstChild)}}))},before:function(){return Ht(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this)}))},after:function(){return Ht(this,arguments,(function(t){this.parentNode&&this.parentNode.insertBefore(t,this.nextSibling)}))},empty:function(){for(var t,e=0;null!=(t=this[e]);e++)1===t.nodeType&&(M.cleanData(Et(t,!1)),t.textContent="");return this},clone:function(t,e){return t=null!=t&&t,e=null==e?t:e,this.map((function(){return M.clone(this,t,e)}))},html:function(t){return tt(this,(function(t){var e=this[0]||{},n=0,r=this.length;if(void 0===t&&1===e.nodeType)return e.innerHTML;if("string"==typeof t&&!Ft.test(t)&&!Ct[(Nt.exec(t)||["",""])[1].toLowerCase()]){t=M.htmlPrefilter(t);try{for(;n<r;n++)1===(e=this[n]||{}).nodeType&&(M.cleanData(Et(e,!1)),e.innerHTML=t);e=0}catch(t){}}e&&this.empty().append(t)}),null,t,arguments.length)},replaceWith:function(){var t=[];return Ht(this,arguments,(function(e){var n=this.parentNode;M.inArray(this,t)<0&&(M.cleanData(Et(this)),n&&n.replaceChild(e,this))}),t)}}),M.each({appendTo:"append",prependTo:"prepend",insertBefore:"before",insertAfter:"after",replaceAll:"replaceWith"},(function(t,e){M.fn[t]=function(t){for(var n,r=[],i=M(t),s=i.length-1,o=0;o<=s;o++)n=o===s?this:this.clone(!0),M(i[o])[e](n),c.apply(r,n.get());return this.pushStack(r)}}));var Wt=new RegExp("^("+dt+")(?!px)[a-z%]+$","i"),$t=/^--/,Kt=function(t){var e=t.ownerDocument.defaultView;return e&&e.opener||(e=r),e.getComputedStyle(t)},Qt=function(t,e,n){var r,i,s={};for(i in e)s[i]=t.style[i],t.style[i]=e[i];for(i in r=n.call(t),e)t.style[i]=s[i];return r},Jt=new RegExp(pt.join("|"),"i");function Zt(t,e,n){var r,i,s,o,a=$t.test(e),u=t.style;return(n=n||Kt(t))&&(o=n.getPropertyValue(e)||n[e],a&&o&&(o=o.replace(j,"$1")||void 0),""!==o||gt(t)||(o=M.style(t,e)),!g.pixelBoxStyles()&&Wt.test(o)&&Jt.test(e)&&(r=u.width,i=u.minWidth,s=u.maxWidth,u.minWidth=u.maxWidth=u.width=o,o=n.width,u.width=r,u.minWidth=i,u.maxWidth=s)),void 0!==o?o+"":o}function te(t,e){return{get:function(){if(!t())return(this.get=e).apply(this,arguments);delete this.get}}}!function(){function t(){if(h){c.style.cssText="position:absolute;left:-11111px;width:60px;margin-top:1px;padding:0;border:0",h.style.cssText="position:relative;display:block;box-sizing:border-box;overflow:scroll;margin:auto;border:1px;padding:1px;width:60%;top:1%",mt.appendChild(c).appendChild(h);var t=r.getComputedStyle(h);n="1%"!==t.top,u=12===e(t.marginLeft),h.style.right="60%",o=36===e(t.right),i=36===e(t.width),h.style.position="absolute",s=12===e(h.offsetWidth/3),mt.removeChild(c),h=null}}function e(t){return Math.round(parseFloat(t))}var n,i,s,o,a,u,c=v.createElement("div"),h=v.createElement("div");h.style&&(h.style.backgroundClip="content-box",h.cloneNode(!0).style.backgroundClip="",g.clearCloneStyle="content-box"===h.style.backgroundClip,M.extend(g,{boxSizingReliable:function(){return t(),i},pixelBoxStyles:function(){return t(),o},pixelPosition:function(){return t(),n},reliableMarginLeft:function(){return t(),u},scrollboxSize:function(){return t(),s},reliableTrDimensions:function(){var t,e,n,i;return null==a&&(t=v.createElement("table"),e=v.createElement("tr"),n=v.createElement("div"),t.style.cssText="position:absolute;left:-11111px;border-collapse:separate",e.style.cssText="box-sizing:content-box;border:1px solid",e.style.height="1px",n.style.height="9px",n.style.display="block",mt.appendChild(t).appendChild(e).appendChild(n),i=r.getComputedStyle(e),a=parseInt(i.height,10)+parseInt(i.borderTopWidth,10)+parseInt(i.borderBottomWidth,10)===e.offsetHeight,mt.removeChild(t)),a}}))}();var ee=["Webkit","Moz","ms"],ne=v.createElement("div").style,re={};function ie(t){return M.cssProps[t]||re[t]||(t in ne?t:re[t]=function(t){for(var e=t[0].toUpperCase()+t.slice(1),n=ee.length;n--;)if((t=ee[n]+e)in ne)return t}(t)||t)}var se=/^(none|table(?!-c[ea]).+)/,oe={position:"absolute",visibility:"hidden",display:"block"},ae={letterSpacing:"0",fontWeight:"400"};function ue(t,e,n){var r=ft.exec(e);return r?Math.max(0,r[2]-(n||0))+(r[3]||"px"):e}function ce(t,e,n,r,i,s){var o="width"===e?1:0,a=0,u=0,c=0;if(n===(r?"border":"content"))return 0;for(;o<4;o+=2)"margin"===n&&(c+=M.css(t,n+pt[o],!0,i)),r?("content"===n&&(u-=M.css(t,"padding"+pt[o],!0,i)),"margin"!==n&&(u-=M.css(t,"border"+pt[o]+"Width",!0,i))):(u+=M.css(t,"padding"+pt[o],!0,i),"padding"!==n?u+=M.css(t,"border"+pt[o]+"Width",!0,i):a+=M.css(t,"border"+pt[o]+"Width",!0,i));return!r&&s>=0&&(u+=Math.max(0,Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-s-u-a-.5))||0),u+c}function he(t,e,n){var r=Kt(t),i=(!g.boxSizingReliable()||n)&&"border-box"===M.css(t,"boxSizing",!1,r),s=i,o=Zt(t,e,r),a="offset"+e[0].toUpperCase()+e.slice(1);if(Wt.test(o)){if(!n)return o;o="auto"}return(!g.boxSizingReliable()&&i||!g.reliableTrDimensions()&&O(t,"tr")||"auto"===o||!parseFloat(o)&&"inline"===M.css(t,"display",!1,r))&&t.getClientRects().length&&(i="border-box"===M.css(t,"boxSizing",!1,r),(s=a in t)&&(o=t[a])),(o=parseFloat(o)||0)+ce(t,e,n||(i?"border":"content"),s,r,o)+"px"}function le(t,e,n,r,i){return new le.prototype.init(t,e,n,r,i)}M.extend({cssHooks:{opacity:{get:function(t,e){if(e){var n=Zt(t,"opacity");return""===n?"1":n}}}},cssNumber:{animationIterationCount:!0,aspectRatio:!0,borderImageSlice:!0,columnCount:!0,flexGrow:!0,flexShrink:!0,fontWeight:!0,gridArea:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnStart:!0,gridRow:!0,gridRowEnd:!0,gridRowStart:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,scale:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeMiterlimit:!0,strokeOpacity:!0},cssProps:{},style:function(t,e,n,r){if(t&&3!==t.nodeType&&8!==t.nodeType&&t.style){var i,s,o,a=it(e),u=$t.test(e),c=t.style;if(u||(e=ie(a)),o=M.cssHooks[e]||M.cssHooks[a],void 0===n)return o&&"get"in o&&void 0!==(i=o.get(t,!1,r))?i:c[e];"string"==(s=typeof n)&&(i=ft.exec(n))&&i[1]&&(n=vt(t,e,i),s="number"),null!=n&&n==n&&("number"!==s||u||(n+=i&&i[3]||(M.cssNumber[a]?"":"px")),g.clearCloneStyle||""!==n||0!==e.indexOf("background")||(c[e]="inherit"),o&&"set"in o&&void 0===(n=o.set(t,n,r))||(u?c.setProperty(e,n):c[e]=n))}},css:function(t,e,n,r){var i,s,o,a=it(e);return $t.test(e)||(e=ie(a)),(o=M.cssHooks[e]||M.cssHooks[a])&&"get"in o&&(i=o.get(t,!0,n)),void 0===i&&(i=Zt(t,e,r)),"normal"===i&&e in ae&&(i=ae[e]),""===n||n?(s=parseFloat(i),!0===n||isFinite(s)?s||0:i):i}}),M.each(["height","width"],(function(t,e){M.cssHooks[e]={get:function(t,n,r){if(n)return!se.test(M.css(t,"display"))||t.getClientRects().length&&t.getBoundingClientRect().width?he(t,e,r):Qt(t,oe,(function(){return he(t,e,r)}))},set:function(t,n,r){var i,s=Kt(t),o=!g.scrollboxSize()&&"absolute"===s.position,a=(o||r)&&"border-box"===M.css(t,"boxSizing",!1,s),u=r?ce(t,e,r,a,s):0;return a&&o&&(u-=Math.ceil(t["offset"+e[0].toUpperCase()+e.slice(1)]-parseFloat(s[e])-ce(t,e,"border",!1,s)-.5)),u&&(i=ft.exec(n))&&"px"!==(i[3]||"px")&&(t.style[e]=n,n=M.css(t,e)),ue(0,n,u)}}})),M.cssHooks.marginLeft=te(g.reliableMarginLeft,(function(t,e){if(e)return(parseFloat(Zt(t,"marginLeft"))||t.getBoundingClientRect().left-Qt(t,{marginLeft:0},(function(){return t.getBoundingClientRect().left})))+"px"})),M.each({margin:"",padding:"",border:"Width"},(function(t,e){M.cssHooks[t+e]={expand:function(n){for(var r=0,i={},s="string"==typeof n?n.split(" "):[n];r<4;r++)i[t+pt[r]+e]=s[r]||s[r-2]||s[0];return i}},"margin"!==t&&(M.cssHooks[t+e].set=ue)})),M.fn.extend({css:function(t,e){return tt(this,(function(t,e,n){var r,i,s={},o=0;if(Array.isArray(e)){for(r=Kt(t),i=e.length;o<i;o++)s[e[o]]=M.css(t,e[o],!1,r);return s}return void 0!==n?M.style(t,e,n):M.css(t,e)}),t,e,arguments.length>1)}}),M.Tween=le,le.prototype={constructor:le,init:function(t,e,n,r,i,s){this.elem=t,this.prop=n,this.easing=i||M.easing._default,this.options=e,this.start=this.now=this.cur(),this.end=r,this.unit=s||(M.cssNumber[n]?"":"px")},cur:function(){var t=le.propHooks[this.prop];return t&&t.get?t.get(this):le.propHooks._default.get(this)},run:function(t){var e,n=le.propHooks[this.prop];return this.options.duration?this.pos=e=M.easing[this.easing](t,this.options.duration*t,0,1,this.options.duration):this.pos=e=t,this.now=(this.end-this.start)*e+this.start,this.options.step&&this.options.step.call(this.elem,this.now,this),n&&n.set?n.set(this):le.propHooks._default.set(this),this}},le.prototype.init.prototype=le.prototype,le.propHooks={_default:{get:function(t){var e;return 1!==t.elem.nodeType||null!=t.elem[t.prop]&&null==t.elem.style[t.prop]?t.elem[t.prop]:(e=M.css(t.elem,t.prop,""))&&"auto"!==e?e:0},set:function(t){M.fx.step[t.prop]?M.fx.step[t.prop](t):1!==t.elem.nodeType||!M.cssHooks[t.prop]&&null==t.elem.style[ie(t.prop)]?t.elem[t.prop]=t.now:M.style(t.elem,t.prop,t.now+t.unit)}}},le.propHooks.scrollTop=le.propHooks.scrollLeft={set:function(t){t.elem.nodeType&&t.elem.parentNode&&(t.elem[t.prop]=t.now)}},M.easing={linear:function(t){return t},swing:function(t){return.5-Math.cos(t*Math.PI)/2},_default:"swing"},M.fx=le.prototype.init,M.fx.step={};var de,fe,pe=/^(?:toggle|show|hide)$/,me=/queueHooks$/;function ge(){fe&&(!1===v.hidden&&r.requestAnimationFrame?r.requestAnimationFrame(ge):r.setTimeout(ge,M.fx.interval),M.fx.tick())}function ye(){return r.setTimeout((function(){de=void 0})),de=Date.now()}function be(t,e){var n,r=0,i={height:t};for(e=e?1:0;r<4;r+=2-e)i["margin"+(n=pt[r])]=i["padding"+n]=t;return e&&(i.opacity=i.width=t),i}function ve(t,e,n){for(var r,i=(we.tweeners[e]||[]).concat(we.tweeners["*"]),s=0,o=i.length;s<o;s++)if(r=i[s].call(n,e,t))return r}function we(t,e,n){var r,i,s=0,o=we.prefilters.length,a=M.Deferred().always((function(){delete u.elem})),u=function(){if(i)return!1;for(var e=de||ye(),n=Math.max(0,c.startTime+c.duration-e),r=1-(n/c.duration||0),s=0,o=c.tweens.length;s<o;s++)c.tweens[s].run(r);return a.notifyWith(t,[c,r,n]),r<1&&o?n:(o||a.notifyWith(t,[c,1,0]),a.resolveWith(t,[c]),!1)},c=a.promise({elem:t,props:M.extend({},e),opts:M.extend(!0,{specialEasing:{},easing:M.easing._default},n),originalProperties:e,originalOptions:n,startTime:de||ye(),duration:n.duration,tweens:[],createTween:function(e,n){var r=M.Tween(t,c.opts,e,n,c.opts.specialEasing[e]||c.opts.easing);return c.tweens.push(r),r},stop:function(e){var n=0,r=e?c.tweens.length:0;if(i)return this;for(i=!0;n<r;n++)c.tweens[n].run(1);return e?(a.notifyWith(t,[c,1,0]),a.resolveWith(t,[c,e])):a.rejectWith(t,[c,e]),this}}),h=c.props;for(function(t,e){var n,r,i,s,o;for(n in t)if(i=e[r=it(n)],s=t[n],Array.isArray(s)&&(i=s[1],s=t[n]=s[0]),n!==r&&(t[r]=s,delete t[n]),(o=M.cssHooks[r])&&"expand"in o)for(n in s=o.expand(s),delete t[r],s)n in t||(t[n]=s[n],e[n]=i);else e[r]=i}(h,c.opts.specialEasing);s<o;s++)if(r=we.prefilters[s].call(c,t,h,c.opts))return y(r.stop)&&(M._queueHooks(c.elem,c.opts.queue).stop=r.stop.bind(r)),r;return M.map(h,ve,c),y(c.opts.start)&&c.opts.start.call(t,c),c.progress(c.opts.progress).done(c.opts.done,c.opts.complete).fail(c.opts.fail).always(c.opts.always),M.fx.timer(M.extend(u,{elem:t,anim:c,queue:c.opts.queue})),c}M.Animation=M.extend(we,{tweeners:{"*":[function(t,e){var n=this.createTween(t,e);return vt(n.elem,t,ft.exec(e),n),n}]},tweener:function(t,e){y(t)?(e=t,t=["*"]):t=t.match(U);for(var n,r=0,i=t.length;r<i;r++)n=t[r],we.tweeners[n]=we.tweeners[n]||[],we.tweeners[n].unshift(e)},prefilters:[function(t,e,n){var r,i,s,o,a,u,c,h,l="width"in e||"height"in e,d=this,f={},p=t.style,m=t.nodeType&&bt(t),g=at.get(t,"fxshow");for(r in n.queue||(null==(o=M._queueHooks(t,"fx")).unqueued&&(o.unqueued=0,a=o.empty.fire,o.empty.fire=function(){o.unqueued||a()}),o.unqueued++,d.always((function(){d.always((function(){o.unqueued--,M.queue(t,"fx").length||o.empty.fire()}))}))),e)if(i=e[r],pe.test(i)){if(delete e[r],s=s||"toggle"===i,i===(m?"hide":"show")){if("show"!==i||!g||void 0===g[r])continue;m=!0}f[r]=g&&g[r]||M.style(t,r)}if((u=!M.isEmptyObject(e))||!M.isEmptyObject(f))for(r in l&&1===t.nodeType&&(n.overflow=[p.overflow,p.overflowX,p.overflowY],null==(c=g&&g.display)&&(c=at.get(t,"display")),"none"===(h=M.css(t,"display"))&&(c?h=c:(St([t],!0),c=t.style.display||c,h=M.css(t,"display"),St([t]))),("inline"===h||"inline-block"===h&&null!=c)&&"none"===M.css(t,"float")&&(u||(d.done((function(){p.display=c})),null==c&&(h=p.display,c="none"===h?"":h)),p.display="inline-block")),n.overflow&&(p.overflow="hidden",d.always((function(){p.overflow=n.overflow[0],p.overflowX=n.overflow[1],p.overflowY=n.overflow[2]}))),u=!1,f)u||(g?"hidden"in g&&(m=g.hidden):g=at.access(t,"fxshow",{display:c}),s&&(g.hidden=!m),m&&St([t],!0),d.done((function(){for(r in m||St([t]),at.remove(t,"fxshow"),f)M.style(t,r,f[r])}))),u=ve(m?g[r]:0,r,d),r in g||(g[r]=u.start,m&&(u.end=u.start,u.start=0))}],prefilter:function(t,e){e?we.prefilters.unshift(t):we.prefilters.push(t)}}),M.speed=function(t,e,n){var r=t&&"object"==typeof t?M.extend({},t):{complete:n||!n&&e||y(t)&&t,duration:t,easing:n&&e||e&&!y(e)&&e};return M.fx.off?r.duration=0:"number"!=typeof r.duration&&(r.duration in M.fx.speeds?r.duration=M.fx.speeds[r.duration]:r.duration=M.fx.speeds._default),null!=r.queue&&!0!==r.queue||(r.queue="fx"),r.old=r.complete,r.complete=function(){y(r.old)&&r.old.call(this),r.queue&&M.dequeue(this,r.queue)},r},M.fn.extend({fadeTo:function(t,e,n,r){return this.filter(bt).css("opacity",0).show().end().animate({opacity:e},t,n,r)},animate:function(t,e,n,r){var i=M.isEmptyObject(t),s=M.speed(e,n,r),o=function(){var e=we(this,M.extend({},t),s);(i||at.get(this,"finish"))&&e.stop(!0)};return o.finish=o,i||!1===s.queue?this.each(o):this.queue(s.queue,o)},stop:function(t,e,n){var r=function(t){var e=t.stop;delete t.stop,e(n)};return"string"!=typeof t&&(n=e,e=t,t=void 0),e&&this.queue(t||"fx",[]),this.each((function(){var e=!0,i=null!=t&&t+"queueHooks",s=M.timers,o=at.get(this);if(i)o[i]&&o[i].stop&&r(o[i]);else for(i in o)o[i]&&o[i].stop&&me.test(i)&&r(o[i]);for(i=s.length;i--;)s[i].elem!==this||null!=t&&s[i].queue!==t||(s[i].anim.stop(n),e=!1,s.splice(i,1));!e&&n||M.dequeue(this,t)}))},finish:function(t){return!1!==t&&(t=t||"fx"),this.each((function(){var e,n=at.get(this),r=n[t+"queue"],i=n[t+"queueHooks"],s=M.timers,o=r?r.length:0;for(n.finish=!0,M.queue(this,t,[]),i&&i.stop&&i.stop.call(this,!0),e=s.length;e--;)s[e].elem===this&&s[e].queue===t&&(s[e].anim.stop(!0),s.splice(e,1));for(e=0;e<o;e++)r[e]&&r[e].finish&&r[e].finish.call(this);delete n.finish}))}}),M.each(["toggle","show","hide"],(function(t,e){var n=M.fn[e];M.fn[e]=function(t,r,i){return null==t||"boolean"==typeof t?n.apply(this,arguments):this.animate(be(e,!0),t,r,i)}})),M.each({slideDown:be("show"),slideUp:be("hide"),slideToggle:be("toggle"),fadeIn:{opacity:"show"},fadeOut:{opacity:"hide"},fadeToggle:{opacity:"toggle"}},(function(t,e){M.fn[t]=function(t,n,r){return this.animate(e,t,n,r)}})),M.timers=[],M.fx.tick=function(){var t,e=0,n=M.timers;for(de=Date.now();e<n.length;e++)(t=n[e])()||n[e]!==t||n.splice(e--,1);n.length||M.fx.stop(),de=void 0},M.fx.timer=function(t){M.timers.push(t),M.fx.start()},M.fx.interval=13,M.fx.start=function(){fe||(fe=!0,ge())},M.fx.stop=function(){fe=null},M.fx.speeds={slow:600,fast:200,_default:400},M.fn.delay=function(t,e){return t=M.fx&&M.fx.speeds[t]||t,e=e||"fx",this.queue(e,(function(e,n){var i=r.setTimeout(e,t);n.stop=function(){r.clearTimeout(i)}}))},function(){var t=v.createElement("input"),e=v.createElement("select").appendChild(v.createElement("option"));t.type="checkbox",g.checkOn=""!==t.value,g.optSelected=e.selected,(t=v.createElement("input")).value="t",t.type="radio",g.radioValue="t"===t.value}();var xe,Se=M.expr.attrHandle;M.fn.extend({attr:function(t,e){return tt(this,M.attr,t,e,arguments.length>1)},removeAttr:function(t){return this.each((function(){M.removeAttr(this,t)}))}}),M.extend({attr:function(t,e,n){var r,i,s=t.nodeType;if(3!==s&&8!==s&&2!==s)return void 0===t.getAttribute?M.prop(t,e,n):(1===s&&M.isXMLDoc(t)||(i=M.attrHooks[e.toLowerCase()]||(M.expr.match.bool.test(e)?xe:void 0)),void 0!==n?null===n?void M.removeAttr(t,e):i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:(t.setAttribute(e,n+""),n):i&&"get"in i&&null!==(r=i.get(t,e))?r:null==(r=M.find.attr(t,e))?void 0:r)},attrHooks:{type:{set:function(t,e){if(!g.radioValue&&"radio"===e&&O(t,"input")){var n=t.value;return t.setAttribute("type",e),n&&(t.value=n),e}}}},removeAttr:function(t,e){var n,r=0,i=e&&e.match(U);if(i&&1===t.nodeType)for(;n=i[r++];)t.removeAttribute(n)}}),xe={set:function(t,e,n){return!1===e?M.removeAttr(t,n):t.setAttribute(n,n),n}},M.each(M.expr.match.bool.source.match(/\w+/g),(function(t,e){var n=Se[e]||M.find.attr;Se[e]=function(t,e,r){var i,s,o=e.toLowerCase();return r||(s=Se[o],Se[o]=i,i=null!=n(t,e,r)?o:null,Se[o]=s),i}}));var _e=/^(?:input|select|textarea|button)$/i,Pe=/^(?:a|area)$/i;function Me(t){return(t.match(U)||[]).join(" ")}function Ne(t){return t.getAttribute&&t.getAttribute("class")||""}function Oe(t){return Array.isArray(t)?t:"string"==typeof t&&t.match(U)||[]}M.fn.extend({prop:function(t,e){return tt(this,M.prop,t,e,arguments.length>1)},removeProp:function(t){return this.each((function(){delete this[M.propFix[t]||t]}))}}),M.extend({prop:function(t,e,n){var r,i,s=t.nodeType;if(3!==s&&8!==s&&2!==s)return 1===s&&M.isXMLDoc(t)||(e=M.propFix[e]||e,i=M.propHooks[e]),void 0!==n?i&&"set"in i&&void 0!==(r=i.set(t,n,e))?r:t[e]=n:i&&"get"in i&&null!==(r=i.get(t,e))?r:t[e]},propHooks:{tabIndex:{get:function(t){var e=M.find.attr(t,"tabindex");return e?parseInt(e,10):_e.test(t.nodeName)||Pe.test(t.nodeName)&&t.href?0:-1}}},propFix:{for:"htmlFor",class:"className"}}),g.optSelected||(M.propHooks.selected={get:function(t){var e=t.parentNode;return e&&e.parentNode&&e.parentNode.selectedIndex,null},set:function(t){var e=t.parentNode;e&&(e.selectedIndex,e.parentNode&&e.parentNode.selectedIndex)}}),M.each(["tabIndex","readOnly","maxLength","cellSpacing","cellPadding","rowSpan","colSpan","useMap","frameBorder","contentEditable"],(function(){M.propFix[this.toLowerCase()]=this})),M.fn.extend({addClass:function(t){var e,n,r,i,s,o;return y(t)?this.each((function(e){M(this).addClass(t.call(this,e,Ne(this)))})):(e=Oe(t)).length?this.each((function(){if(r=Ne(this),n=1===this.nodeType&&" "+Me(r)+" "){for(s=0;s<e.length;s++)i=e[s],n.indexOf(" "+i+" ")<0&&(n+=i+" ");o=Me(n),r!==o&&this.setAttribute("class",o)}})):this},removeClass:function(t){var e,n,r,i,s,o;return y(t)?this.each((function(e){M(this).removeClass(t.call(this,e,Ne(this)))})):arguments.length?(e=Oe(t)).length?this.each((function(){if(r=Ne(this),n=1===this.nodeType&&" "+Me(r)+" "){for(s=0;s<e.length;s++)for(i=e[s];n.indexOf(" "+i+" ")>-1;)n=n.replace(" "+i+" "," ");o=Me(n),r!==o&&this.setAttribute("class",o)}})):this:this.attr("class","")},toggleClass:function(t,e){var n,r,i,s,o=typeof t,a="string"===o||Array.isArray(t);return y(t)?this.each((function(n){M(this).toggleClass(t.call(this,n,Ne(this),e),e)})):"boolean"==typeof e&&a?e?this.addClass(t):this.removeClass(t):(n=Oe(t),this.each((function(){if(a)for(s=M(this),i=0;i<n.length;i++)r=n[i],s.hasClass(r)?s.removeClass(r):s.addClass(r);else void 0!==t&&"boolean"!==o||((r=Ne(this))&&at.set(this,"__className__",r),this.setAttribute&&this.setAttribute("class",r||!1===t?"":at.get(this,"__className__")||""))})))},hasClass:function(t){var e,n,r=0;for(e=" "+t+" ";n=this[r++];)if(1===n.nodeType&&(" "+Me(Ne(n))+" ").indexOf(e)>-1)return!0;return!1}});var Ce=/\r/g;M.fn.extend({val:function(t){var e,n,r,i=this[0];return arguments.length?(r=y(t),this.each((function(n){var i;1===this.nodeType&&(null==(i=r?t.call(this,n,M(this).val()):t)?i="":"number"==typeof i?i+="":Array.isArray(i)&&(i=M.map(i,(function(t){return null==t?"":t+""}))),(e=M.valHooks[this.type]||M.valHooks[this.nodeName.toLowerCase()])&&"set"in e&&void 0!==e.set(this,i,"value")||(this.value=i))}))):i?(e=M.valHooks[i.type]||M.valHooks[i.nodeName.toLowerCase()])&&"get"in e&&void 0!==(n=e.get(i,"value"))?n:"string"==typeof(n=i.value)?n.replace(Ce,""):null==n?"":n:void 0}}),M.extend({valHooks:{option:{get:function(t){var e=M.find.attr(t,"value");return null!=e?e:Me(M.text(t))}},select:{get:function(t){var e,n,r,i=t.options,s=t.selectedIndex,o="select-one"===t.type,a=o?null:[],u=o?s+1:i.length;for(r=s<0?u:o?s:0;r<u;r++)if(((n=i[r]).selected||r===s)&&!n.disabled&&(!n.parentNode.disabled||!O(n.parentNode,"optgroup"))){if(e=M(n).val(),o)return e;a.push(e)}return a},set:function(t,e){for(var n,r,i=t.options,s=M.makeArray(e),o=i.length;o--;)((r=i[o]).selected=M.inArray(M.valHooks.option.get(r),s)>-1)&&(n=!0);return n||(t.selectedIndex=-1),s}}}}),M.each(["radio","checkbox"],(function(){M.valHooks[this]={set:function(t,e){if(Array.isArray(e))return t.checked=M.inArray(M(t).val(),e)>-1}},g.checkOn||(M.valHooks[this].get=function(t){return null===t.getAttribute("value")?"on":t.value})}));var Ee=r.location,Te={guid:Date.now()},Ae=/\?/;M.parseXML=function(t){var e,n;if(!t||"string"!=typeof t)return null;try{e=(new r.DOMParser).parseFromString(t,"text/xml")}catch(t){}return n=e&&e.getElementsByTagName("parsererror")[0],e&&!n||M.error("Invalid XML: "+(n?M.map(n.childNodes,(function(t){return t.textContent})).join("\n"):t)),e};var je=/^(?:focusinfocus|focusoutblur)$/,ke=function(t){t.stopPropagation()};M.extend(M.event,{trigger:function(t,e,n,i){var s,o,a,u,c,h,l,d,p=[n||v],m=f.call(t,"type")?t.type:t,g=f.call(t,"namespace")?t.namespace.split("."):[];if(o=d=a=n=n||v,3!==n.nodeType&&8!==n.nodeType&&!je.test(m+M.event.triggered)&&(m.indexOf(".")>-1&&(g=m.split("."),m=g.shift(),g.sort()),c=m.indexOf(":")<0&&"on"+m,(t=t[M.expando]?t:new M.Event(m,"object"==typeof t&&t)).isTrigger=i?2:3,t.namespace=g.join("."),t.rnamespace=t.namespace?new RegExp("(^|\\.)"+g.join("\\.(?:.*\\.|)")+"(\\.|$)"):null,t.result=void 0,t.target||(t.target=n),e=null==e?[t]:M.makeArray(e,[t]),l=M.event.special[m]||{},i||!l.trigger||!1!==l.trigger.apply(n,e))){if(!i&&!l.noBubble&&!b(n)){for(u=l.delegateType||m,je.test(u+m)||(o=o.parentNode);o;o=o.parentNode)p.push(o),a=o;a===(n.ownerDocument||v)&&p.push(a.defaultView||a.parentWindow||r)}for(s=0;(o=p[s++])&&!t.isPropagationStopped();)d=o,t.type=s>1?u:l.bindType||m,(h=(at.get(o,"events")||Object.create(null))[t.type]&&at.get(o,"handle"))&&h.apply(o,e),(h=c&&o[c])&&h.apply&&st(o)&&(t.result=h.apply(o,e),!1===t.result&&t.preventDefault());return t.type=m,i||t.isDefaultPrevented()||l._default&&!1!==l._default.apply(p.pop(),e)||!st(n)||c&&y(n[m])&&!b(n)&&((a=n[c])&&(n[c]=null),M.event.triggered=m,t.isPropagationStopped()&&d.addEventListener(m,ke),n[m](),t.isPropagationStopped()&&d.removeEventListener(m,ke),M.event.triggered=void 0,a&&(n[c]=a)),t.result}},simulate:function(t,e,n){var r=M.extend(new M.Event,n,{type:t,isSimulated:!0});M.event.trigger(r,null,e)}}),M.fn.extend({trigger:function(t,e){return this.each((function(){M.event.trigger(t,e,this)}))},triggerHandler:function(t,e){var n=this[0];if(n)return M.event.trigger(t,e,n,!0)}});var De=/\[\]$/,Le=/\r?\n/g,Be=/^(?:submit|button|image|reset|file)$/i,Ie=/^(?:input|select|textarea|keygen)/i;function Fe(t,e,n,r){var i;if(Array.isArray(e))M.each(e,(function(e,i){n||De.test(t)?r(t,i):Fe(t+"["+("object"==typeof i&&null!=i?e:"")+"]",i,n,r)}));else if(n||"object"!==S(e))r(t,e);else for(i in e)Fe(t+"["+i+"]",e[i],n,r)}M.param=function(t,e){var n,r=[],i=function(t,e){var n=y(e)?e():e;r[r.length]=encodeURIComponent(t)+"="+encodeURIComponent(null==n?"":n)};if(null==t)return"";if(Array.isArray(t)||t.jquery&&!M.isPlainObject(t))M.each(t,(function(){i(this.name,this.value)}));else for(n in t)Fe(n,t[n],e,i);return r.join("&")},M.fn.extend({serialize:function(){return M.param(this.serializeArray())},serializeArray:function(){return this.map((function(){var t=M.prop(this,"elements");return t?M.makeArray(t):this})).filter((function(){var t=this.type;return this.name&&!M(this).is(":disabled")&&Ie.test(this.nodeName)&&!Be.test(t)&&(this.checked||!Mt.test(t))})).map((function(t,e){var n=M(this).val();return null==n?null:Array.isArray(n)?M.map(n,(function(t){return{name:e.name,value:t.replace(Le,"\r\n")}})):{name:e.name,value:n.replace(Le,"\r\n")}})).get()}});var Re=/%20/g,Ve=/#.*$/,qe=/([?&])_=[^&]*/,ze=/^(.*?):[ \t]*([^\r\n]*)$/gm,Xe=/^(?:GET|HEAD)$/,Ge=/^\/\//,Ye={},He={},Ue="*/".concat("*"),We=v.createElement("a");function $e(t){return function(e,n){"string"!=typeof e&&(n=e,e="*");var r,i=0,s=e.toLowerCase().match(U)||[];if(y(n))for(;r=s[i++];)"+"===r[0]?(r=r.slice(1)||"*",(t[r]=t[r]||[]).unshift(n)):(t[r]=t[r]||[]).push(n)}}function Ke(t,e,n,r){var i={},s=t===He;function o(a){var u;return i[a]=!0,M.each(t[a]||[],(function(t,a){var c=a(e,n,r);return"string"!=typeof c||s||i[c]?s?!(u=c):void 0:(e.dataTypes.unshift(c),o(c),!1)})),u}return o(e.dataTypes[0])||!i["*"]&&o("*")}function Qe(t,e){var n,r,i=M.ajaxSettings.flatOptions||{};for(n in e)void 0!==e[n]&&((i[n]?t:r||(r={}))[n]=e[n]);return r&&M.extend(!0,t,r),t}We.href=Ee.href,M.extend({active:0,lastModified:{},etag:{},ajaxSettings:{url:Ee.href,type:"GET",isLocal:/^(?:about|app|app-storage|.+-extension|file|res|widget):$/.test(Ee.protocol),global:!0,processData:!0,async:!0,contentType:"application/x-www-form-urlencoded; charset=UTF-8",accepts:{"*":Ue,text:"text/plain",html:"text/html",xml:"application/xml, text/xml",json:"application/json, text/javascript"},contents:{xml:/\bxml\b/,html:/\bhtml/,json:/\bjson\b/},responseFields:{xml:"responseXML",text:"responseText",json:"responseJSON"},converters:{"* text":String,"text html":!0,"text json":JSON.parse,"text xml":M.parseXML},flatOptions:{url:!0,context:!0}},ajaxSetup:function(t,e){return e?Qe(Qe(t,M.ajaxSettings),e):Qe(M.ajaxSettings,t)},ajaxPrefilter:$e(Ye),ajaxTransport:$e(He),ajax:function(t,e){"object"==typeof t&&(e=t,t=void 0),e=e||{};var n,i,s,o,a,u,c,h,l,d,f=M.ajaxSetup({},e),p=f.context||f,m=f.context&&(p.nodeType||p.jquery)?M(p):M.event,g=M.Deferred(),y=M.Callbacks("once memory"),b=f.statusCode||{},w={},x={},S="canceled",_={readyState:0,getResponseHeader:function(t){var e;if(c){if(!o)for(o={};e=ze.exec(s);)o[e[1].toLowerCase()+" "]=(o[e[1].toLowerCase()+" "]||[]).concat(e[2]);e=o[t.toLowerCase()+" "]}return null==e?null:e.join(", ")},getAllResponseHeaders:function(){return c?s:null},setRequestHeader:function(t,e){return null==c&&(t=x[t.toLowerCase()]=x[t.toLowerCase()]||t,w[t]=e),this},overrideMimeType:function(t){return null==c&&(f.mimeType=t),this},statusCode:function(t){var e;if(t)if(c)_.always(t[_.status]);else for(e in t)b[e]=[b[e],t[e]];return this},abort:function(t){var e=t||S;return n&&n.abort(e),P(0,e),this}};if(g.promise(_),f.url=((t||f.url||Ee.href)+"").replace(Ge,Ee.protocol+"//"),f.type=e.method||e.type||f.method||f.type,f.dataTypes=(f.dataType||"*").toLowerCase().match(U)||[""],null==f.crossDomain){u=v.createElement("a");try{u.href=f.url,u.href=u.href,f.crossDomain=We.protocol+"//"+We.host!=u.protocol+"//"+u.host}catch(t){f.crossDomain=!0}}if(f.data&&f.processData&&"string"!=typeof f.data&&(f.data=M.param(f.data,f.traditional)),Ke(Ye,f,e,_),c)return _;for(l in(h=M.event&&f.global)&&0==M.active++&&M.event.trigger("ajaxStart"),f.type=f.type.toUpperCase(),f.hasContent=!Xe.test(f.type),i=f.url.replace(Ve,""),f.hasContent?f.data&&f.processData&&0===(f.contentType||"").indexOf("application/x-www-form-urlencoded")&&(f.data=f.data.replace(Re,"+")):(d=f.url.slice(i.length),f.data&&(f.processData||"string"==typeof f.data)&&(i+=(Ae.test(i)?"&":"?")+f.data,delete f.data),!1===f.cache&&(i=i.replace(qe,"$1"),d=(Ae.test(i)?"&":"?")+"_="+Te.guid+++d),f.url=i+d),f.ifModified&&(M.lastModified[i]&&_.setRequestHeader("If-Modified-Since",M.lastModified[i]),M.etag[i]&&_.setRequestHeader("If-None-Match",M.etag[i])),(f.data&&f.hasContent&&!1!==f.contentType||e.contentType)&&_.setRequestHeader("Content-Type",f.contentType),_.setRequestHeader("Accept",f.dataTypes[0]&&f.accepts[f.dataTypes[0]]?f.accepts[f.dataTypes[0]]+("*"!==f.dataTypes[0]?", "+Ue+"; q=0.01":""):f.accepts["*"]),f.headers)_.setRequestHeader(l,f.headers[l]);if(f.beforeSend&&(!1===f.beforeSend.call(p,_,f)||c))return _.abort();if(S="abort",y.add(f.complete),_.done(f.success),_.fail(f.error),n=Ke(He,f,e,_)){if(_.readyState=1,h&&m.trigger("ajaxSend",[_,f]),c)return _;f.async&&f.timeout>0&&(a=r.setTimeout((function(){_.abort("timeout")}),f.timeout));try{c=!1,n.send(w,P)}catch(t){if(c)throw t;P(-1,t)}}else P(-1,"No Transport");function P(t,e,o,u){var l,d,v,w,x,S=e;c||(c=!0,a&&r.clearTimeout(a),n=void 0,s=u||"",_.readyState=t>0?4:0,l=t>=200&&t<300||304===t,o&&(w=function(t,e,n){for(var r,i,s,o,a=t.contents,u=t.dataTypes;"*"===u[0];)u.shift(),void 0===r&&(r=t.mimeType||e.getResponseHeader("Content-Type"));if(r)for(i in a)if(a[i]&&a[i].test(r)){u.unshift(i);break}if(u[0]in n)s=u[0];else{for(i in n){if(!u[0]||t.converters[i+" "+u[0]]){s=i;break}o||(o=i)}s=s||o}if(s)return s!==u[0]&&u.unshift(s),n[s]}(f,_,o)),!l&&M.inArray("script",f.dataTypes)>-1&&M.inArray("json",f.dataTypes)<0&&(f.converters["text script"]=function(){}),w=function(t,e,n,r){var i,s,o,a,u,c={},h=t.dataTypes.slice();if(h[1])for(o in t.converters)c[o.toLowerCase()]=t.converters[o];for(s=h.shift();s;)if(t.responseFields[s]&&(n[t.responseFields[s]]=e),!u&&r&&t.dataFilter&&(e=t.dataFilter(e,t.dataType)),u=s,s=h.shift())if("*"===s)s=u;else if("*"!==u&&u!==s){if(!(o=c[u+" "+s]||c["* "+s]))for(i in c)if((a=i.split(" "))[1]===s&&(o=c[u+" "+a[0]]||c["* "+a[0]])){!0===o?o=c[i]:!0!==c[i]&&(s=a[0],h.unshift(a[1]));break}if(!0!==o)if(o&&t.throws)e=o(e);else try{e=o(e)}catch(t){return{state:"parsererror",error:o?t:"No conversion from "+u+" to "+s}}}return{state:"success",data:e}}(f,w,_,l),l?(f.ifModified&&((x=_.getResponseHeader("Last-Modified"))&&(M.lastModified[i]=x),(x=_.getResponseHeader("etag"))&&(M.etag[i]=x)),204===t||"HEAD"===f.type?S="nocontent":304===t?S="notmodified":(S=w.state,d=w.data,l=!(v=w.error))):(v=S,!t&&S||(S="error",t<0&&(t=0))),_.status=t,_.statusText=(e||S)+"",l?g.resolveWith(p,[d,S,_]):g.rejectWith(p,[_,S,v]),_.statusCode(b),b=void 0,h&&m.trigger(l?"ajaxSuccess":"ajaxError",[_,f,l?d:v]),y.fireWith(p,[_,S]),h&&(m.trigger("ajaxComplete",[_,f]),--M.active||M.event.trigger("ajaxStop")))}return _},getJSON:function(t,e,n){return M.get(t,e,n,"json")},getScript:function(t,e){return M.get(t,void 0,e,"script")}}),M.each(["get","post"],(function(t,e){M[e]=function(t,n,r,i){return y(n)&&(i=i||r,r=n,n=void 0),M.ajax(M.extend({url:t,type:e,dataType:i,data:n,success:r},M.isPlainObject(t)&&t))}})),M.ajaxPrefilter((function(t){var e;for(e in t.headers)"content-type"===e.toLowerCase()&&(t.contentType=t.headers[e]||"")})),M._evalUrl=function(t,e,n){return M.ajax({url:t,type:"GET",dataType:"script",cache:!0,async:!1,global:!1,converters:{"text script":function(){}},dataFilter:function(t){M.globalEval(t,e,n)}})},M.fn.extend({wrapAll:function(t){var e;return this[0]&&(y(t)&&(t=t.call(this[0])),e=M(t,this[0].ownerDocument).eq(0).clone(!0),this[0].parentNode&&e.insertBefore(this[0]),e.map((function(){for(var t=this;t.firstElementChild;)t=t.firstElementChild;return t})).append(this)),this},wrapInner:function(t){return y(t)?this.each((function(e){M(this).wrapInner(t.call(this,e))})):this.each((function(){var e=M(this),n=e.contents();n.length?n.wrapAll(t):e.append(t)}))},wrap:function(t){var e=y(t);return this.each((function(n){M(this).wrapAll(e?t.call(this,n):t)}))},unwrap:function(t){return this.parent(t).not("body").each((function(){M(this).replaceWith(this.childNodes)})),this}}),M.expr.pseudos.hidden=function(t){return!M.expr.pseudos.visible(t)},M.expr.pseudos.visible=function(t){return!!(t.offsetWidth||t.offsetHeight||t.getClientRects().length)},M.ajaxSettings.xhr=function(){try{return new r.XMLHttpRequest}catch(t){}};var Je={0:200,1223:204},Ze=M.ajaxSettings.xhr();g.cors=!!Ze&&"withCredentials"in Ze,g.ajax=Ze=!!Ze,M.ajaxTransport((function(t){var e,n;if(g.cors||Ze&&!t.crossDomain)return{send:function(i,s){var o,a=t.xhr();if(a.open(t.type,t.url,t.async,t.username,t.password),t.xhrFields)for(o in t.xhrFields)a[o]=t.xhrFields[o];for(o in t.mimeType&&a.overrideMimeType&&a.overrideMimeType(t.mimeType),t.crossDomain||i["X-Requested-With"]||(i["X-Requested-With"]="XMLHttpRequest"),i)a.setRequestHeader(o,i[o]);e=function(t){return function(){e&&(e=n=a.onload=a.onerror=a.onabort=a.ontimeout=a.onreadystatechange=null,"abort"===t?a.abort():"error"===t?"number"!=typeof a.status?s(0,"error"):s(a.status,a.statusText):s(Je[a.status]||a.status,a.statusText,"text"!==(a.responseType||"text")||"string"!=typeof a.responseText?{binary:a.response}:{text:a.responseText},a.getAllResponseHeaders()))}},a.onload=e(),n=a.onerror=a.ontimeout=e("error"),void 0!==a.onabort?a.onabort=n:a.onreadystatechange=function(){4===a.readyState&&r.setTimeout((function(){e&&n()}))},e=e("abort");try{a.send(t.hasContent&&t.data||null)}catch(t){if(e)throw t}},abort:function(){e&&e()}}})),M.ajaxPrefilter((function(t){t.crossDomain&&(t.contents.script=!1)})),M.ajaxSetup({accepts:{script:"text/javascript, application/javascript, application/ecmascript, application/x-ecmascript"},contents:{script:/\b(?:java|ecma)script\b/},converters:{"text script":function(t){return M.globalEval(t),t}}}),M.ajaxPrefilter("script",(function(t){void 0===t.cache&&(t.cache=!1),t.crossDomain&&(t.type="GET")})),M.ajaxTransport("script",(function(t){var e,n;if(t.crossDomain||t.scriptAttrs)return{send:function(r,i){e=M("<script>").attr(t.scriptAttrs||{}).prop({charset:t.scriptCharset,src:t.url}).on("load error",n=function(t){e.remove(),n=null,t&&i("error"===t.type?404:200,t.type)}),v.head.appendChild(e[0])},abort:function(){n&&n()}}}));var tn,en=[],nn=/(=)\?(?=&|$)|\?\?/;M.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var t=en.pop()||M.expando+"_"+Te.guid++;return this[t]=!0,t}}),M.ajaxPrefilter("json jsonp",(function(t,e,n){var i,s,o,a=!1!==t.jsonp&&(nn.test(t.url)?"url":"string"==typeof t.data&&0===(t.contentType||"").indexOf("application/x-www-form-urlencoded")&&nn.test(t.data)&&"data");if(a||"jsonp"===t.dataTypes[0])return i=t.jsonpCallback=y(t.jsonpCallback)?t.jsonpCallback():t.jsonpCallback,a?t[a]=t[a].replace(nn,"$1"+i):!1!==t.jsonp&&(t.url+=(Ae.test(t.url)?"&":"?")+t.jsonp+"="+i),t.converters["script json"]=function(){return o||M.error(i+" was not called"),o[0]},t.dataTypes[0]="json",s=r[i],r[i]=function(){o=arguments},n.always((function(){void 0===s?M(r).removeProp(i):r[i]=s,t[i]&&(t.jsonpCallback=e.jsonpCallback,en.push(i)),o&&y(s)&&s(o[0]),o=s=void 0})),"script"})),g.createHTMLDocument=((tn=v.implementation.createHTMLDocument("").body).innerHTML="<form></form><form></form>",2===tn.childNodes.length),M.parseHTML=function(t,e,n){return"string"!=typeof t?[]:("boolean"==typeof e&&(n=e,e=!1),e||(g.createHTMLDocument?((r=(e=v.implementation.createHTMLDocument("")).createElement("base")).href=v.location.href,e.head.appendChild(r)):e=v),s=!n&&[],(i=V.exec(t))?[e.createElement(i[1])]:(i=jt([t],e,s),s&&s.length&&M(s).remove(),M.merge([],i.childNodes)));var r,i,s},M.fn.load=function(t,e,n){var r,i,s,o=this,a=t.indexOf(" ");return a>-1&&(r=Me(t.slice(a)),t=t.slice(0,a)),y(e)?(n=e,e=void 0):e&&"object"==typeof e&&(i="POST"),o.length>0&&M.ajax({url:t,type:i||"GET",dataType:"html",data:e}).done((function(t){s=arguments,o.html(r?M("<div>").append(M.parseHTML(t)).find(r):t)})).always(n&&function(t,e){o.each((function(){n.apply(this,s||[t.responseText,e,t])}))}),this},M.expr.pseudos.animated=function(t){return M.grep(M.timers,(function(e){return t===e.elem})).length},M.offset={setOffset:function(t,e,n){var r,i,s,o,a,u,c=M.css(t,"position"),h=M(t),l={};"static"===c&&(t.style.position="relative"),a=h.offset(),s=M.css(t,"top"),u=M.css(t,"left"),("absolute"===c||"fixed"===c)&&(s+u).indexOf("auto")>-1?(o=(r=h.position()).top,i=r.left):(o=parseFloat(s)||0,i=parseFloat(u)||0),y(e)&&(e=e.call(t,n,M.extend({},a))),null!=e.top&&(l.top=e.top-a.top+o),null!=e.left&&(l.left=e.left-a.left+i),"using"in e?e.using.call(t,l):h.css(l)}},M.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each((function(e){M.offset.setOffset(this,t,e)}));var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var t,e,n,r=this[0],i={top:0,left:0};if("fixed"===M.css(r,"position"))e=r.getBoundingClientRect();else{for(e=this.offset(),n=r.ownerDocument,t=r.offsetParent||n.documentElement;t&&(t===n.body||t===n.documentElement)&&"static"===M.css(t,"position");)t=t.parentNode;t&&t!==r&&1===t.nodeType&&((i=M(t).offset()).top+=M.css(t,"borderTopWidth",!0),i.left+=M.css(t,"borderLeftWidth",!0))}return{top:e.top-i.top-M.css(r,"marginTop",!0),left:e.left-i.left-M.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map((function(){for(var t=this.offsetParent;t&&"static"===M.css(t,"position");)t=t.offsetParent;return t||mt}))}}),M.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},(function(t,e){var n="pageYOffset"===e;M.fn[t]=function(r){return tt(this,(function(t,r,i){var s;if(b(t)?s=t:9===t.nodeType&&(s=t.defaultView),void 0===i)return s?s[e]:t[r];s?s.scrollTo(n?s.pageXOffset:i,n?i:s.pageYOffset):t[r]=i}),t,r,arguments.length)}})),M.each(["top","left"],(function(t,e){M.cssHooks[e]=te(g.pixelPosition,(function(t,n){if(n)return n=Zt(t,e),Wt.test(n)?M(t).position()[e]+"px":n}))})),M.each({Height:"height",Width:"width"},(function(t,e){M.each({padding:"inner"+t,content:e,"":"outer"+t},(function(n,r){M.fn[r]=function(i,s){var o=arguments.length&&(n||"boolean"!=typeof i),a=n||(!0===i||!0===s?"margin":"border");return tt(this,(function(e,n,i){var s;return b(e)?0===r.indexOf("outer")?e["inner"+t]:e.document.documentElement["client"+t]:9===e.nodeType?(s=e.documentElement,Math.max(e.body["scroll"+t],s["scroll"+t],e.body["offset"+t],s["offset"+t],s["client"+t])):void 0===i?M.css(e,n,a):M.style(e,n,i,a)}),e,o?i:void 0,o)}}))})),M.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],(function(t,e){M.fn[e]=function(t){return this.on(e,t)}})),M.fn.extend({bind:function(t,e,n){return this.on(t,null,e,n)},unbind:function(t,e){return this.off(t,null,e)},delegate:function(t,e,n,r){return this.on(e,t,n,r)},undelegate:function(t,e,n){return 1===arguments.length?this.off(t,"**"):this.off(e,t||"**",n)},hover:function(t,e){return this.on("mouseenter",t).on("mouseleave",e||t)}}),M.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),(function(t,e){M.fn[e]=function(t,n){return arguments.length>0?this.on(e,null,t,n):this.trigger(e)}}));var rn=/^[\s\uFEFF\xA0]+|([^\s\uFEFF\xA0])[\s\uFEFF\xA0]+$/g;M.proxy=function(t,e){var n,r,i;if("string"==typeof e&&(n=t[e],e=t,t=n),y(t))return r=a.call(arguments,2),i=function(){return t.apply(e||this,r.concat(a.call(arguments)))},i.guid=t.guid=t.guid||M.guid++,i},M.holdReady=function(t){t?M.readyWait++:M.ready(!0)},M.isArray=Array.isArray,M.parseJSON=JSON.parse,M.nodeName=O,M.isFunction=y,M.isWindow=b,M.camelCase=it,M.type=S,M.now=Date.now,M.isNumeric=function(t){var e=M.type(t);return("number"===e||"string"===e)&&!isNaN(t-parseFloat(t))},M.trim=function(t){return null==t?"":(t+"").replace(rn,"$1")},void 0===(n=function(){return M}.apply(e,[]))||(t.exports=n);var sn=r.jQuery,on=r.$;return M.noConflict=function(t){return r.$===M&&(r.$=on),t&&r.jQuery===M&&(r.jQuery=sn),M},void 0===i&&(r.jQuery=r.$=M),M}))}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return n.d(e,{a:e}),e},n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{RNAcanvas:()=>F});var t=n(662),e=n(298),i=n(925);class s{constructor(){this.domNode=document.createElement("div"),this.domNode.style.overflow="auto",this.domNode.style.scrollbarGutter="stable";let t=document.createElement("div"),e=document.createElement("div"),n=document.createElement("div");t.style.flexGrow="1",e.style.flexGrow="0",n.style.flexGrow="1",this.domNode.style.display="flex",this.domNode.style.flexDirection="column",this.domNode.append(t,e,n);let r=document.createElement("div"),s=document.createElement("div"),o=document.createElement("div");r.style.flexGrow="1",s.style.flexGrow="0",o.style.flexGrow="1",e.style.display="flex",e.style.flexDirection="row",e.append(r,s,o);let a=document.createElement("div");this.contentContainer=document.createElement("div");let u=document.createElement("div");a.style.flexGrow="1",this.contentContainer.style.flexGrow="0",u.style.flexGrow="1",s.style.display="flex",s.style.flexDirection="column",s.append(a,this.contentContainer,u),this.horizontalScrollbar=new i.HorizontalScrollbar(this.domNode),this.verticalScrollbar=new i.VerticalScrollbar(this.domNode),this.scrollbars=new i.Scrollbars(this.domNode)}appendTo(t){t.appendChild(this.domNode)}remove(){this.domNode.remove()}append(t){this.contentContainer.append(t)}get style(){return this.domNode.style}}var o=n(725),a=n(854);class u{constructor(t,e,n){this.targetDrawing=t,this.horizontalScrollbar=e,this.verticalScrollbar=n}get centerPoint(){return{x:this.horizontalScrollbar.thumb.centerX/this.targetDrawing.horizontalScaling+this.targetDrawing.minX,y:this.verticalScrollbar.thumb.centerY/this.targetDrawing.verticalScaling+this.targetDrawing.minY}}set centerPoint(t){this.horizontalScrollbar.thumb.centerX=this.targetDrawing.horizontalScaling*(t.x-this.targetDrawing.minX),this.verticalScrollbar.thumb.centerY=this.targetDrawing.verticalScaling*(t.y-this.targetDrawing.minY)}fitToContent(){let t=this.targetDrawing.contentBBox;this.targetDrawing.setScaling(.9*Math.min(this.horizontalScrollbar.thumb.length/t.width,this.verticalScrollbar.thumb.length/t.height)),this.centerPoint={x:t.x+t.width/2,y:t.y+t.height/2}}serialized(){return{centerPoint:this.centerPoint}}restore(t){if(!(0,a.isNonNullObject)(t))throw new Error("Previous state must be an object.");(0,o.isFinitePoint)(t.centerPoint)&&(this.centerPoint=t.centerPoint)}}var c,h=n(106),l=n(460),d=n(524),f=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class p{constructor(t){this.targetApp=t,c.set(this,void 0),window.addEventListener("mousedown",(t=>function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return e.set(t,n),n}(this,c,t))),window.addEventListener("keydown",(e=>{(e.ctrlKey||e.metaKey)&&"A"===e.key.toUpperCase()&&f(this,c,"f")&&f(this,c,"f").target instanceof Node&&t.domNode.contains(f(this,c,"f").target)&&((0,h.userIsTyping)()||(e.preventDefault(),t.selectAll()))}),{passive:!1})}}c=new WeakMap;var m,g,y,b=n(124),v=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class w{constructor(t){m.add(this),this.formsContainer=t,this.formsContainer.addEventListener("mousedown",(t=>{let e=v(this,m,"m",g).call(this,t);!e||v(this,m,"m",y).call(this,e)})),this.formsContainer.addEventListener("focusin",(t=>{let e=v(this,m,"m",g).call(this,t);!e||v(this,m,"m",y).call(this,e)}))}}m=new WeakSet,g=function(t){if(!(t.target instanceof Node))return;let e=t.target;return[...this.formsContainer.childNodes].find((t=>e===t||t.contains(e)))},y=function(t){t!==this.formsContainer.lastChild&&this.formsContainer.appendChild(t)};var x,S,_,P,M,N,O,C=n(628),E=n(963),T=n(274),A=n(31),j=n(692),k=n.n(j),D=n(726),L=function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n},B=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};function I(t){return t instanceof SVGGraphicsElement}class F{constructor(){x.set(this,void 0),this.selectedSVGElements=new h.EventfulSet,S.set(this,void 0),_.set(this,void 0),P.set(this,void 0),M.set(this,document.createElement("div")),this.toolbarContainer=document.createElement("div"),N.set(this,new h.FiniteStack(50)),O.set(this,new h.FiniteStack(50)),this.domNode=document.createElement("div"),this.domNode.style.background="repeating-conic-gradient(#eee 0% 25%, white 0% 50%) 50% / 20px 20px",this.boundingBox=document.createElement("div"),this.domNode.appendChild(this.boundingBox),this.boundingBox.style.width="100%",this.boundingBox.style.height="100%",this.boundingBox.style.overflow="hidden",this.boundingBox.style.position="relative",this.drawingScrollContainer=new s,this.drawingScrollContainer.style.width="100%",this.drawingScrollContainer.style.height="100%",this.drawingScrollContainer.appendTo(this.boundingBox),this.stackedDrawingsContainer=document.createElement("div"),this.stackedDrawingsContainer.style.position="relative",this.drawingScrollContainer.append(this.stackedDrawingsContainer),this.drawing=new t.Drawing,k()(this.drawing.domNode).css({backgroundColor:"white"}),k()(this.drawing.domNode).css({userSelect:"none",webkitUserSelect:"none"}),k()(this.drawing.domNode).css({cursor:"default"}),this.invertedPrimaryBondsHider=new e.InvertedStraightBondsHider({[Symbol.iterator]:()=>[...this.drawing.primaryBonds].values()},this.drawing.domNode),this.overlaidDrawing=new t.Drawing,this.overlaidDrawing.domNode.style.position="absolute",this.overlaidDrawing.domNode.style.top="0px",this.overlaidDrawing.domNode.style.left="0px",this.overlaidDrawing.domNode.style.pointerEvents="none",new MutationObserver((()=>{this.overlaidDrawing.setBoundaries(this.drawing),this.overlaidDrawing.horizontalScaling=this.drawing.horizontalScaling,this.overlaidDrawing.verticalScaling=this.drawing.verticalScaling})).observe(this.drawing.domNode,{attributes:!0}),this.stackedDrawingsContainer.append(this.drawing.domNode,this.overlaidDrawing.domNode),this.drawingView=new u(this.drawing,this.horizontalDrawingScrollbar,this.verticalDrawingScrollbar),this.pinchToScaleFeature=new l.PinchToScaleFeature(this.drawing.domNode),this.pinchToScaleFeature.horizontalScrollbar=this.horizontalDrawingScrollbar,this.pinchToScaleFeature.verticalScrollbar=this.verticalDrawingScrollbar,this.pinchToScaleFeature.interactionScope=this.domNode,this.pinchToScaleFeature.beforeScaling=()=>this.hideOverlaidDrawing(),this.pinchToScaleFeature.afterScaling=()=>this.unhideOverlaidDrawing(),this.selectedSVGElementHighlightings=new d.LiveSVGElementHighlightings(this.selectedSVGElements,this.drawing.domNode),this.selectedSVGElementHighlightings.appendTo(this.overlaidDrawing.domNode),this.clickSelectTool=new l.ClickSelectTool(this.drawing.domNode,this.selectedSVGElements),this.selectingRect=new l.SelectingRect(this.drawing.domNode,this.selectedSVGElements),this.selectingRect.appendTo(this.overlaidDrawing.domNode),this.ctrlASelector=new p({domNode:this.domNode,selectAll:()=>this.selectAll()}),this.selectedBases=new b.SelectedBases(this.drawing,this.selectedSVGElements),this.consecutiveBasesSelectingTool=new b.ConsecutiveBasesSelectingTool(this.drawing,this.selectedBases),this.draggingTool=new b.DraggingTool(this.drawing,{svgElements:this.selectedSVGElements,bases:this.selectedBases,baseNumberings:this.selectedBaseNumberings},{beforeDragging:()=>this.beforeDragging(),afterDragging:()=>this.afterDragging()}),this.formsContainer=document.createElement("div"),this.boundingBox.appendChild(this.formsContainer),L(this,S,new w(this.formsContainer),"f"),this.layoutForm=new C.BasesLayoutForm(this.drawing,this.selectedBases,{beforeMovingBases:()=>this.beforeDragging(),afterMovingBases:()=>this.afterDragging()}),this.exportForm=new E.ExportForm({drawing:this.drawing}),L(this,_,new T.AboutForm,"f"),L(this,P,new T.AboutButton,"f"),B(this,P,"f").domNode.addEventListener("click",(()=>this.openForm(B(this,_,"f")))),B(this,M,"f").append(B(this,P,"f").domNode),this.boundingBox.append(B(this,M,"f")),this.dotBracketDrawer=new t.DotBracketDrawer(this.drawing),L(this,x,new t.SchemaDrawer(this.drawing),"f"),this.toolbar=new A.Toolbar({drawing:this.drawing,selectedBases:this.selectedBases,beforeDragging:()=>this.beforeDragging(),afterDragging:()=>this.afterDragging(),undo:()=>this.undo(),redo:()=>this.redo(),undoStack:this.undoStack,redoStack:this.redoStack,forms:{layout:this.layoutForm,export:this.exportForm},openForm:t=>this.openForm(t)}),this.toolbar.appendTo(this.toolbarContainer),this.boundingBox.append(this.toolbarContainer),[...this.toolbar.keyBindings].forEach((t=>t.scope=this.domNode));let n=new A.ToolbarToggle({toolbar:this.toolbar});k()(n.domNode).css({position:"absolute",bottom:"22.5px",left:"15px"});let r=new h.KeyBinding("T",(()=>n.press()));r.scope=this.domNode,n.boundKey=r.key;let i=document.createElement("div");i.append(n.domNode),this.boundingBox.append(i)}appendTo(t){t.appendChild(this.domNode)}remove(){this.domNode.remove()}get horizontalDrawingScrollbar(){return this.drawingScrollContainer.horizontalScrollbar}get verticalDrawingScrollbar(){return this.drawingScrollContainer.verticalScrollbar}get drawingScrollbars(){return this.drawingScrollContainer.scrollbars}hideOverlaidDrawing(){this.overlaidDrawing.domNode.style.visibility="hidden"}unhideOverlaidDrawing(){this.overlaidDrawing.domNode.style.visibility="visible"}drawDotBracket(t,e){this.dotBracketDrawer.draw(t,e)}drawSchema(t){B(this,x,"f").draw(t)}isBeingInteractedWith(){return(0,h.isBeingInteractedWith)(this.domNode)}get selectedSVGElement(){let t=[...this.selectedSVGElements];if(1==t.length)return t[0];throw t.length>1?new Error("More than one SVG element is selected."):new Error("No SVG elements are selected.")}selectAll(){this.selectedSVGElements.addAll([...this.drawing.domNode.children].filter(I))}get selectedBase(){let t=[...this.selectedBases];if(1==t.length)return t[0];throw t.length>1?new Error("More than one base is selected."):new Error("No bases are selected.")}get selectedBaseNumberings(){let t=()=>{let t=new Set(this.selectedSVGElements);return[...this.drawing.baseNumberings].filter((e=>t.has(e.domNode)))};return{[Symbol.iterator]:()=>t().values()}}openForm(t){t instanceof Node?this.formsContainer.appendChild(t):t.appendTo(this.formsContainer)}get style(){return this.domNode.style}serialized(){return{drawing:this.drawing.serialized(),selectedSVGElementIDs:[...this.selectedSVGElements].map((t=>t.id)),drawingView:this.drawingView.serialized()}}restore(t){if(!(0,a.isNonNullObject)(t))throw new Error("Previous app state must be an object.");if(!t.drawing)throw new Error("Previous app state is missing a drawing.");this.drawing.restore(t.drawing);let e=((0,a.isStringsArray)(t.selectedSVGElementIDs)?t.selectedSVGElementIDs:[]).map((t=>this.drawing.domNode.querySelector("#"+t)));if(this.selectedSVGElements.clear(),!(0,D.isSVGGraphicsElementsArray)(e)||this.selectedSVGElements.addAll(e),t.drawingView)try{this.drawingView.restore(t.drawingView)}catch(t){console.warn(t)}}pushUndoStack(){B(this,O,"f").empty(),B(this,N,"f").push(this.serialized())}canUndo(){return B(this,N,"f").size>0}undo(){let t=this.serialized();this.restore(B(this,N,"f").pop()),B(this,O,"f").push(t)}get undoStack(){return{isEmpty:()=>B(this,N,"f").isEmpty(),addEventListener:(t,e)=>B(this,N,"f").addEventListener(t,e),removeEventListener:(t,e)=>B(this,N,"f").removeEventListener(t,e)}}canRedo(){return B(this,O,"f").size>0}redo(){let t=this.serialized();this.restore(B(this,O,"f").pop()),B(this,N,"f").push(t)}get redoStack(){return{isEmpty:()=>B(this,O,"f").isEmpty(),addEventListener:(t,e)=>B(this,O,"f").addEventListener(t,e),removeEventListener:(t,e)=>B(this,O,"f").removeEventListener(t,e)}}beforeEdit(){try{this.pushUndoStack()}catch(t){console.warn(t)}}afterEdit(){}beforeDragging(){this.beforeEdit(),this.hideOverlaidDrawing()}afterDragging(){this.unhideOverlaidDrawing()}}x=new WeakMap,S=new WeakMap,_=new WeakMap,P=new WeakMap,M=new WeakMap,N=new WeakMap,O=new WeakMap})(),r})(),t.exports=e()},127:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>h,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,normalizeAngle:()=>b,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}function b(t,e){void 0===e&&(e=-Math.PI);var n=t-e;return e+((n%=2*Math.PI)>=0?n:n+2*Math.PI)}return e})()},369:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>h,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function c(t){return"object"==typeof t&&null!==t}function h(t){return Array.isArray(t)}function l(t){return h(t)&&t.every(n)}function d(t){return h(t)&&t.every(r)}function f(t){return h(t)&&t.every(i)}function p(t){return h(t)&&t.every(a)}return t.r(e),t.d(e,{isArray:()=>h,isFiniteNumber:()=>r,isFiniteNumbersArray:()=>d,isNonFiniteNumber:()=>i,isNonFiniteNumbersArray:()=>f,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>c,isNullish:()=>u,isNumber:()=>n,isNumbersArray:()=>l,isPositiveFiniteNumber:()=>s,isString:()=>a,isStringsArray:()=>p}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Linkers:()=>g,Stems:()=>m,areConflicting:()=>c,areCrossing:()=>d,areEqual:()=>a,areKnotless:()=>l,areStacked:()=>u,deepCopy:()=>i,knotless:()=>p,mountainPlotTraversal:()=>y,parseDotBracket:()=>b,sorted:()=>o});var t=n(854),e=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function i(n){return(0,t.isNumbersArray)(n)?e([],n,!0):n.map((function(t){return e([],t,!0)}))}var s=n(986);function o(t){var e=i(t);return e.forEach(s.sortNumbers),e.sort((function(t,e){return t[0]-e[0]})),e}function a(t,e){var n=i(t),r=i(e);return(0,s.sortNumbers)(n),(0,s.sortNumbers)(r),[0,1].every((function(t){return n[t]==r[t]}))}function u(t,e){var n=o([t,e]);return n[0][0]==n[1][0]-1&&n[0][1]==n[1][1]+1}function c(t,e){return(0,s.min)(t)==(0,s.min)(e)&&(0,s.max)(t)!=(0,s.max)(e)||(0,s.min)(t)!=(0,s.min)(e)&&(0,s.max)(t)==(0,s.max)(e)}function h(t){if(0==t.length)return[];for(var e=[],n=0;n<(0,s.max)(t.flat());n++)e.push(void 0);return t.forEach((function(t){e[t[0]-1]=t[1],e[t[1]-1]=t[0]})),e}function l(t){var e=h(t),n=[],r=!1;return e.forEach((function(t,e){var i=e+1;null==t||(i<t?n.push(i):i==t||n.pop()!=t&&(r=!0))})),!r}function d(t,e){return!l([t,e])}var f=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function p(t){var e=[],n=i(t);return n.sort((function(t,e){return Math.abs(t[0]-t[1])-Math.abs(e[0]-e[1])})),n.forEach((function(t){l(f(f([],e,!0),[t],!1))&&e.push(t)})),e}var m=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=this.targetStructure[1];if(0==t.length)return[];var e=o(t),n=[],r=[];return e.forEach((function(t){var e=0==r.length?null:r[r.length-1];!e||u(e,t)?r.push(t):(n.push(r),r=[t])})),n.push(r),n},t}(),g=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=(new(m.bind.apply(m,function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}([void 0],this.targetStructure,!1)))).get().flatMap((function(t){return[t.map(s.min),t.map(s.max)]}));t.forEach(s.sortNumbers),t.sort((function(t,e){return(0,s.min)(t)-(0,s.min)(e)}));for(var e=[],n=t.shift(),r=t.shift();n&&r;){for(var i=[],o=(0,s.max)(n),a=(0,s.min)(r),u=o;u<=a;u++)i.push(u);e.push(i),n=r,r=t.shift()}return e},t}();function y(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[0],r=t[1],i=h(r);if(!l(r))throw new Error("Pseudoknot(s) encountered.");var s=[],o=0;return n.forEach((function(t,e){var n=e+1,r=i[e];null==r?s.push(o):n<r?(s.push(o),o++):(n==r||o--,s.push(o))})),s}function b(t){var e=t.split(""),n=[".","(",")"];e.forEach((function(t){if(!n.includes(t))throw new Error('Unrecognized character in dot-bracket notation: "'.concat(t,'".'))}));var r=[],i=[];if(e.forEach((function(t,e){var n=e+1;if("("==t)i.push(n);else if(")"==t){var s=i.pop();if("number"!=typeof s)throw new Error("Unmatched downstream partner(s) in dot-bracket notation.");r.push([s,n])}})),i.length>0)throw new Error("Unmatched upstream partner(s) in dot-bracket notation.");return o(r)}})(),r})(),t.exports=e()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";function t(t,e){if(!e.includes(t))throw new Error("The given base is not present in the provided base-pair.");return t===e[0]?e[1]:e[0]}n.r(r),n.d(r,{FirstPairedBase:()=>i,LastPairedBase:()=>o,LeadingDanglingBases:()=>a,Linkers:()=>l,PositionPairs:()=>e,Stems:()=>h,TrailingDanglingBases:()=>u,consecutivePairs:()=>p,knotless:()=>d,other:()=>t,parseDotBracket:()=>f});class e{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];return this.targetStructure[1].map((e=>[t.indexOf(e[0])+1,t.indexOf(e[1])+1]))}}class i{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0],e=this.targetStructure[1];if(0==e.length)throw new Error("There are no paired bases.");let n=e.flat(),r=t.findIndex((t=>n.includes(t)));if(r<0)throw new Error("No paired bases present in sequence.");return t[r]}}var s=n(986);class o{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0],e=this.targetStructure[1];if(0==e.length)throw new Error("There are no paired bases.");let n=e.flat().map((e=>t.indexOf(e)));if((0,s.max)(n)<0)throw new Error("No paired bases present in sequence.");return t[(0,s.max)(n)]}}class a{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];if(0==this.targetStructure[1].length)throw new Error("There are no paired bases.");let e=new i(...this.targetStructure).get(),n=t.indexOf(e);if(n<0)throw new Error("No paired bases present in sequence.");return t.slice(0,n)}}class u{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];if(0==this.targetStructure[1].length)throw new Error("There are no paired bases.");let e=new o(...this.targetStructure).get(),n=t.indexOf(e);if(n<0)throw new Error("No paired bases present in sequence.");return t.slice(n+1)}}var c=n(369);class h{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0],n=new e(...this.targetStructure).get();return new c.Stems(t,n).get().map((e=>e.map((e=>[t[e[0]-1],t[e[1]-1]]))))}}class l{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0],n=new e(...this.targetStructure).get();return new c.Linkers(t,n).get().map((e=>e.map((e=>t[e-1]))))}}function d(...t){let[n,r]=t,i=new e(...t).get();(0,c.areKnotless)(i)||(i=(0,c.knotless)(i));let s=i.map((t=>[n[t[0]-1],n[t[1]-1]]));return[[...n],s]}function f(t,e){if(e.length>t.length)throw new Error("Dot-bracket notation is longer than the sequence.");return[...(0,c.parseDotBracket)(e)].map((e=>{let n=e[0],r=e[1];return[t[n-1],t[r-1]]}))}function p(t){return t.length<2?[]:t.slice(0,-1).map(((e,n)=>[t[n],t[n+1]]))}})(),r})(),t.exports=e()},661:function(t){var e;e=()=>(()=>{var t={127:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>h,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,normalizeAngle:()=>b,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}function b(t,e){void 0===e&&(e=-Math.PI);var n=t-e;return e+((n%=2*Math.PI)>=0?n:n+2*Math.PI)}return e})()},369:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>h,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function c(t){return"object"==typeof t&&null!==t}function h(t){return Array.isArray(t)}function l(t){return h(t)&&t.every(n)}function d(t){return h(t)&&t.every(r)}function f(t){return h(t)&&t.every(i)}function p(t){return h(t)&&t.every(a)}return t.r(e),t.d(e,{isArray:()=>h,isFiniteNumber:()=>r,isFiniteNumbersArray:()=>d,isNonFiniteNumber:()=>i,isNonFiniteNumbersArray:()=>f,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>c,isNullish:()=>u,isNumber:()=>n,isNumbersArray:()=>l,isPositiveFiniteNumber:()=>s,isString:()=>a,isStringsArray:()=>p}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Linkers:()=>g,Stems:()=>m,areConflicting:()=>c,areCrossing:()=>d,areEqual:()=>a,areKnotless:()=>l,areStacked:()=>u,deepCopy:()=>i,knotless:()=>p,mountainPlotTraversal:()=>y,parseDotBracket:()=>b,sorted:()=>o});var t=n(854),e=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function i(n){return(0,t.isNumbersArray)(n)?e([],n,!0):n.map((function(t){return e([],t,!0)}))}var s=n(986);function o(t){var e=i(t);return e.forEach(s.sortNumbers),e.sort((function(t,e){return t[0]-e[0]})),e}function a(t,e){var n=i(t),r=i(e);return(0,s.sortNumbers)(n),(0,s.sortNumbers)(r),[0,1].every((function(t){return n[t]==r[t]}))}function u(t,e){var n=o([t,e]);return n[0][0]==n[1][0]-1&&n[0][1]==n[1][1]+1}function c(t,e){return(0,s.min)(t)==(0,s.min)(e)&&(0,s.max)(t)!=(0,s.max)(e)||(0,s.min)(t)!=(0,s.min)(e)&&(0,s.max)(t)==(0,s.max)(e)}function h(t){if(0==t.length)return[];for(var e=[],n=0;n<(0,s.max)(t.flat());n++)e.push(void 0);return t.forEach((function(t){e[t[0]-1]=t[1],e[t[1]-1]=t[0]})),e}function l(t){var e=h(t),n=[],r=!1;return e.forEach((function(t,e){var i=e+1;null==t||(i<t?n.push(i):i==t||n.pop()!=t&&(r=!0))})),!r}function d(t,e){return!l([t,e])}var f=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function p(t){var e=[],n=i(t);return n.sort((function(t,e){return Math.abs(t[0]-t[1])-Math.abs(e[0]-e[1])})),n.forEach((function(t){l(f(f([],e,!0),[t],!1))&&e.push(t)})),e}var m=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=this.targetStructure[1];if(0==t.length)return[];var e=o(t),n=[],r=[];return e.forEach((function(t){var e=0==r.length?null:r[r.length-1];!e||u(e,t)?r.push(t):(n.push(r),r=[t])})),n.push(r),n},t}(),g=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=(new(m.bind.apply(m,function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}([void 0],this.targetStructure,!1)))).get().flatMap((function(t){return[t.map(s.min),t.map(s.max)]}));t.forEach(s.sortNumbers),t.sort((function(t,e){return(0,s.min)(t)-(0,s.min)(e)}));for(var e=[],n=t.shift(),r=t.shift();n&&r;){for(var i=[],o=(0,s.max)(n),a=(0,s.min)(r),u=o;u<=a;u++)i.push(u);e.push(i),n=r,r=t.shift()}return e},t}();function y(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[0],r=t[1],i=h(r);if(!l(r))throw new Error("Pseudoknot(s) encountered.");var s=[],o=0;return n.forEach((function(t,e){var n=e+1,r=i[e];null==r?s.push(o):n<r?(s.push(o),o++):(n==r||o--,s.push(o))})),s}function b(t){var e=t.split(""),n=[".","(",")"];e.forEach((function(t){if(!n.includes(t))throw new Error('Unrecognized character in dot-bracket notation: "'.concat(t,'".'))}));var r=[],i=[];if(e.forEach((function(t,e){var n=e+1;if("("==t)i.push(n);else if(")"==t){var s=i.pop();if("number"!=typeof s)throw new Error("Unmatched downstream partner(s) in dot-bracket notation.");r.push([s,n])}})),i.length>0)throw new Error("Unmatched upstream partner(s) in dot-bracket notation.");return o(r)}})(),r})(),t.exports=e()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";function t(t,e){if(!e.includes(t))throw new Error("The given base is not present in the provided base-pair.");return t===e[0]?e[1]:e[0]}n.r(r),n.d(r,{FirstPairedBase:()=>i,LastPairedBase:()=>o,LeadingDanglingBases:()=>a,Linkers:()=>l,PositionPairs:()=>e,Stems:()=>h,TrailingDanglingBases:()=>u,consecutivePairs:()=>p,knotless:()=>d,other:()=>t,parseDotBracket:()=>f});class e{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];return this.targetStructure[1].map((e=>[t.indexOf(e[0])+1,t.indexOf(e[1])+1]))}}class i{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0],e=this.targetStructure[1];if(0==e.length)throw new Error("There are no paired bases.");let n=e.flat(),r=t.findIndex((t=>n.includes(t)));if(r<0)throw new Error("No paired bases present in sequence.");return t[r]}}var s=n(986);class o{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0],e=this.targetStructure[1];if(0==e.length)throw new Error("There are no paired bases.");let n=e.flat().map((e=>t.indexOf(e)));if((0,s.max)(n)<0)throw new Error("No paired bases present in sequence.");return t[(0,s.max)(n)]}}class a{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];if(0==this.targetStructure[1].length)throw new Error("There are no paired bases.");let e=new i(...this.targetStructure).get(),n=t.indexOf(e);if(n<0)throw new Error("No paired bases present in sequence.");return t.slice(0,n)}}class u{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0];if(0==this.targetStructure[1].length)throw new Error("There are no paired bases.");let e=new o(...this.targetStructure).get(),n=t.indexOf(e);if(n<0)throw new Error("No paired bases present in sequence.");return t.slice(n+1)}}var c=n(369);class h{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0],n=new e(...this.targetStructure).get();return new c.Stems(t,n).get().map((e=>e.map((e=>[t[e[0]-1],t[e[1]-1]]))))}}class l{constructor(...t){this.targetStructure=t}get(){let t=this.targetStructure[0],n=new e(...this.targetStructure).get();return new c.Linkers(t,n).get().map((e=>e.map((e=>t[e-1]))))}}function d(...t){let[n,r]=t,i=new e(...t).get();(0,c.areKnotless)(i)||(i=(0,c.knotless)(i));let s=i.map((t=>[n[t[0]-1],n[t[1]-1]]));return[[...n],s]}function f(t,e){if(e.length>t.length)throw new Error("Dot-bracket notation is longer than the sequence.");return[...(0,c.parseDotBracket)(e)].map((e=>{let n=e[0],r=e[1];return[t[n-1],t[r-1]]}))}function p(t){return t.length<2?[]:t.slice(0,-1).map(((e,n)=>[t[n],t[n+1]]))}})(),r})(),t.exports=e()},173:function(t){var e;e=()=>(()=>{var t={422:function(t){t.exports=(()=>{var t={138:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}return t.r(e),t.d(e,{average:()=>r,mean:()=>r,sum:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";function t(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.pow(Math.pow(n,2)+Math.pow(r,2),.5)}function e(t,e){return{x:e.x-t.x,y:e.y-t.y}}n.r(r),n.d(r,{centroid:()=>s,displacement:()=>e,distance:()=>t,midpoint:()=>o});var i=n(138);function s(t){return{x:(0,i.mean)(t.map((function(t){return t.x}))),y:(0,i.mean)(t.map((function(t){return t.y})))}}function o(t,e){return s([t,e])}})(),r})()},872:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{CircularSegment:()=>a,Semicircle:()=>e});var t=n(422),e=function(){function e(t){this.chord=t}return Object.defineProperty(e.prototype,"chordLength",{get:function(){return(0,t.distance)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcLength",{get:function(){return Math.PI*this.chordLength/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcAngle",{get:function(){return Math.PI},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleRadius",{get:function(){return this.chordLength/2},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleDiameter",{get:function(){return 2*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCircumference",{get:function(){return 2*Math.PI*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCenterPoint",{get:function(){return(0,t.midpoint)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),e}(),i=n(872),s=function(){function e(e,n){this.chord=e,this.moreProps=n;var r=n.arcLength,i=(0,t.distance)(e[0],e[1]);if(r<=i)throw new Error("Arc length is too small.");if(r>=Math.PI*i/2)throw new Error("Arc length is too big.");for(var s=Math.PI/2,o=0;o<20;o++)s-=(r/i*Math.sin(s)-s)/(r/i*Math.cos(s)-1);this.arcAngle=2*s}return Object.defineProperty(e.prototype,"chordLength",{get:function(){return(0,t.distance)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcLength",{get:function(){return this.moreProps.arcLength},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleRadius",{get:function(){return this.arcLength/this.arcAngle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleDiameter",{get:function(){return 2*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCircumference",{get:function(){return 2*Math.PI*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCenterPoint",{get:function(){var e=(0,i.direction)((0,t.displacement)(this.chord[0],this.chord[1]));e+=(Math.PI-this.arcAngle)/2;var n=this.parentCircleRadius;return{x:this.chord[0].x+n*Math.cos(e),y:this.chord[0].y+n*Math.sin(e)}},enumerable:!1,configurable:!0}),e}(),o=function(){function e(e,n){this.chord=e,this.moreProps=n;var r=n.arcLength,i=(0,t.distance)(e[0],e[1]);if(0==i)throw new Error("Chord length cannot be zero.");if(r<=Math.PI*i/2)throw new Error("Arc length is too small.");for(var s=Math.PI,o=0;o<20;o++)s-=(r/i*Math.sin(Math.PI-s)-s)/(-r/i*Math.cos(Math.PI-s)-1);this.arcAngle=2*s}return Object.defineProperty(e.prototype,"chordLength",{get:function(){return(0,t.distance)(this.chord[0],this.chord[1])},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"arcLength",{get:function(){return this.moreProps.arcLength},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleRadius",{get:function(){return this.arcLength/this.arcAngle},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleDiameter",{get:function(){return 2*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCircumference",{get:function(){return 2*Math.PI*this.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"parentCircleCenterPoint",{get:function(){var e=(0,i.direction)((0,t.displacement)(this.chord[0],this.chord[1]));e-=(this.arcAngle-Math.PI)/2;var n=this.parentCircleRadius;return{x:this.chord[0].x+n*Math.cos(e),y:this.chord[0].y+n*Math.sin(e)}},enumerable:!1,configurable:!0}),e}(),a=function(){function n(n,r){this.chord=n,this.moreProps=r;var i=r.arcLength,a=(0,t.distance)(n[0],n[1]);if(a>0&&i<=a)throw new Error("Arc length is too small.");var u=a<.001&&i<.001,c=Math.PI*a/2,h=Math.abs(i-c)<.001;this.wrappedCircularSegment=u||h?new e(n):i<c?new s(n,{arcLength:i}):new o(n,{arcLength:i})}return Object.defineProperty(n.prototype,"chordLength",{get:function(){return this.wrappedCircularSegment.chordLength},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"arcLength",{get:function(){return this.moreProps.arcLength},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"arcAngle",{get:function(){return this.wrappedCircularSegment.arcAngle},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleRadius",{get:function(){return this.wrappedCircularSegment.parentCircleRadius},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleDiameter",{get:function(){return this.wrappedCircularSegment.parentCircleDiameter},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleCircumference",{get:function(){return this.wrappedCircularSegment.parentCircleCircumference},enumerable:!1,configurable:!0}),Object.defineProperty(n.prototype,"parentCircleCenterPoint",{get:function(){return this.wrappedCircularSegment.parentCircleCenterPoint},enumerable:!1,configurable:!0}),n}()})(),r})(),t.exports=e()},986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,flipAway:()=>v,isBetween:()=>h,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,normalizeAngle:()=>b,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}function b(t,e){void 0===e&&(e=-Math.PI);var n=t-e;return e+((n%=2*Math.PI)>=0?n:n+2*Math.PI)}function v(t,e){var n=(e=b(e,t))-t;return(n<Math.PI/2||n>3*Math.PI/2)&&(t+=Math.PI),t}return e})()},456:function(t){var e;e=()=>(()=>{var t={277:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{Vector:()=>n});class n{static matching(t){return new n(t.x,t.y)}constructor(t,e){this.x=t,this.y=e}[Symbol.iterator](){return[this.x,this.y].values()}get magnitude(){return Math.sqrt(Math.pow(this.x,2)+Math.pow(this.y,2))}get direction(){return Math.atan2(this.y,this.x)}}return e})(),t.exports=e()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Point:()=>e,RelativePoint:()=>h});var t=n(277);class e{static matching(t){return new e(t.x,t.y)}constructor(t,e){this.x=t,this.y=e}[Symbol.iterator](){return[this.x,this.y].values()}displacementTo(e){return new t.Vector(e.x-this.x,e.y-this.y)}displacementFrom(e){return new t.Vector(this.x-e.x,this.y-e.y)}distanceTo(t){return this.displacementTo(t).magnitude}distanceFrom(t){return this.distanceTo(t)}directionTo(t){return this.displacementTo(t).direction}directionFrom(t){return this.displacementFrom(t).direction}}var i,s,o,a,u,c=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class h{constructor(e){i.add(this),s.set(this,void 0),o.set(this,new t.Vector(0,0)),a.set(this,{move:[]}),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,s,e),e.addEventListener("move",(()=>c(this,i,"m",u).call(this,"move")))}get x(){return c(this,s,"f").x+c(this,o,"f").x}set x(t){c(this,o,"f").x=t-c(this,s,"f").x,c(this,i,"m",u).call(this,"move")}get y(){return c(this,s,"f").y+c(this,o,"f").y}set y(t){c(this,o,"f").y=t-c(this,s,"f").y,c(this,i,"m",u).call(this,"move")}addEventListener(t,e){c(this,a,"f")[t].push(e)}removeEventListener(t,e){c(this,a,"f")[t]=c(this,a,"f")[t].filter((t=>t!==e))}}s=new WeakMap,o=new WeakMap,a=new WeakMap,i=new WeakSet,u=function(t){c(this,a,"f")[t].forEach((t=>t()))}})(),r})(),t.exports=e()},725:function(t){t.exports=(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>d,average:()=>r,degrees:()=>m,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,radians:()=>g,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>f,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>p,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return Math.abs(t-e)<=n}function f(t){i(t),t.reverse()}function p(t){var e=o(t);return e.reverse(),e}function m(t){return t*(180/Math.PI)}function g(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function c(t){return"object"==typeof t&&null!==t}function h(t){return Array.isArray(t)}return t.r(e),t.d(e,{isArray:()=>h,isFiniteNumber:()=>r,isNonFiniteNumber:()=>i,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>c,isNullish:()=>u,isNumber:()=>n,isPositiveFiniteNumber:()=>s,isString:()=>a}),e})()},30:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.pow(Math.pow(t.x,2)+Math.pow(t.y,2),.5)}function r(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>r,magnitude:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{areWithin:()=>a,centroid:()=>f,deepCopy:()=>s,direction:()=>l,displaced:()=>c,displacement:()=>u,distance:()=>o,isFinitePoint:()=>i,isPoint:()=>e,midpoint:()=>p});var t=n(854);function e(e){return(0,t.isNonNullObject)(e)&&(0,t.isNumber)(e.x)&&(0,t.isNumber)(e.y)}function i(n){return e(n)&&(0,t.isFiniteNumber)(n.x)&&(0,t.isFiniteNumber)(n.y)}function s(t){return{x:t.x,y:t.y}}function o(t,e){var n=e.x-t.x,r=e.y-t.y;return Math.pow(Math.pow(n,2)+Math.pow(r,2),.5)}function a(t,e,n){return o(t,e)<=n}function u(t,e){return{x:e.x-t.x,y:e.y-t.y}}function c(t,e){return{x:t.x+e.x,y:t.y+e.y}}var h=n(30);function l(t,e){return(0,h.direction)(u(t,e))}var d=n(986);function f(t){return{x:(0,d.mean)(t.map((function(t){return t.x}))),y:(0,d.mean)(t.map((function(t){return t.y})))}}function p(t,e){return f([t,e])}})(),r})()},369:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,isBetween:()=>h,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}return e})()},854:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return"number"==typeof t}function r(t){return n(t)&&Number.isFinite(t)}function i(t){return n(t)&&!Number.isFinite(t)}function s(t){return r(t)&&t>0}function o(t){return r(t)&&t>=0}function a(t){return"string"==typeof t}function u(t){return null==t}function c(t){return"object"==typeof t&&null!==t}function h(t){return Array.isArray(t)}function l(t){return h(t)&&t.every(n)}function d(t){return h(t)&&t.every(r)}function f(t){return h(t)&&t.every(i)}function p(t){return h(t)&&t.every(a)}return t.r(e),t.d(e,{isArray:()=>h,isFiniteNumber:()=>r,isFiniteNumbersArray:()=>d,isNonFiniteNumber:()=>i,isNonFiniteNumbersArray:()=>f,isNonNegativeFiniteNumber:()=>o,isNonNullObject:()=>c,isNullish:()=>u,isNumber:()=>n,isNumbersArray:()=>l,isPositiveFiniteNumber:()=>s,isString:()=>a,isStringsArray:()=>p}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Linkers:()=>g,Stems:()=>m,areConflicting:()=>c,areCrossing:()=>d,areEqual:()=>a,areKnotless:()=>l,areStacked:()=>u,deepCopy:()=>i,knotless:()=>p,mountainPlotTraversal:()=>y,parseDotBracket:()=>b,sorted:()=>o});var t=n(854),e=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function i(n){return(0,t.isNumbersArray)(n)?e([],n,!0):n.map((function(t){return e([],t,!0)}))}var s=n(986);function o(t){var e=i(t);return e.forEach(s.sortNumbers),e.sort((function(t,e){return t[0]-e[0]})),e}function a(t,e){var n=i(t),r=i(e);return(0,s.sortNumbers)(n),(0,s.sortNumbers)(r),[0,1].every((function(t){return n[t]==r[t]}))}function u(t,e){var n=o([t,e]);return n[0][0]==n[1][0]-1&&n[0][1]==n[1][1]+1}function c(t,e){return(0,s.min)(t)==(0,s.min)(e)&&(0,s.max)(t)!=(0,s.max)(e)||(0,s.min)(t)!=(0,s.min)(e)&&(0,s.max)(t)==(0,s.max)(e)}function h(t){if(0==t.length)return[];for(var e=[],n=0;n<(0,s.max)(t.flat());n++)e.push(void 0);return t.forEach((function(t){e[t[0]-1]=t[1],e[t[1]-1]=t[0]})),e}function l(t){var e=h(t),n=[],r=!1;return e.forEach((function(t,e){var i=e+1;null==t||(i<t?n.push(i):i==t||n.pop()!=t&&(r=!0))})),!r}function d(t,e){return!l([t,e])}var f=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function p(t){var e=[],n=i(t);return n.sort((function(t,e){return Math.abs(t[0]-t[1])-Math.abs(e[0]-e[1])})),n.forEach((function(t){l(f(f([],e,!0),[t],!1))&&e.push(t)})),e}var m=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=this.targetStructure[1];if(0==t.length)return[];var e=o(t),n=[],r=[];return e.forEach((function(t){var e=0==r.length?null:r[r.length-1];!e||u(e,t)?r.push(t):(n.push(r),r=[t])})),n.push(r),n},t}(),g=function(){function t(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];this.targetStructure=t}return t.prototype.get=function(){var t=(new(m.bind.apply(m,function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))}([void 0],this.targetStructure,!1)))).get().flatMap((function(t){return[t.map(s.min),t.map(s.max)]}));t.forEach(s.sortNumbers),t.sort((function(t,e){return(0,s.min)(t)-(0,s.min)(e)}));for(var e=[],n=t.shift(),r=t.shift();n&&r;){for(var i=[],o=(0,s.max)(n),a=(0,s.min)(r),u=o;u<=a;u++)i.push(u);e.push(i),n=r,r=t.shift()}return e},t}();function y(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[0],r=t[1],i=h(r);if(!l(r))throw new Error("Pseudoknot(s) encountered.");var s=[],o=0;return n.forEach((function(t,e){var n=e+1,r=i[e];null==r?s.push(o):n<r?(s.push(o),o++):(n==r||o--,s.push(o))})),s}function b(t){var e=t.split(""),n=[".","(",")"];e.forEach((function(t){if(!n.includes(t))throw new Error('Unrecognized character in dot-bracket notation: "'.concat(t,'".'))}));var r=[],i=[];if(e.forEach((function(t,e){var n=e+1;if("("==t)i.push(n);else if(")"==t){var s=i.pop();if("number"!=typeof s)throw new Error("Unmatched downstream partner(s) in dot-bracket notation.");r.push([s,n])}})),i.length>0)throw new Error("Unmatched upstream partner(s) in dot-bracket notation.");return o(r)}})(),r})(),t.exports=e()},30:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return Math.pow(Math.pow(t.x,2)+Math.pow(t.y,2),.5)}function r(t){return Math.atan2(t.y,t.x)}return t.r(e),t.d(e,{direction:()=>r,magnitude:()=>n}),e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Centroid:()=>s,Direction:()=>f,MaxCenterX:()=>u,MaxCenterY:()=>h,MinCenterX:()=>a,MinCenterY:()=>c,NucleobaseMock:()=>t,arrange:()=>C,circularize:()=>P,flipSelfX:()=>g,flipSelfY:()=>y,flipX:()=>p,flipY:()=>m,linearize:()=>x,outwardNormal:()=>w,rotate:()=>d,round:()=>N,shift:()=>e,stemmify:()=>_,straighten:()=>S,tangent:()=>b,untangle:()=>I});class t{constructor(t){this.props=t}getCenterPoint(){return this.props.centerPoint}setCenterPoint(t){this.props.centerPoint=t}}function e(t,e){t.forEach((t=>{let n=t.getCenterPoint();t.setCenterPoint({x:n.x+e.x,y:n.y+e.y})}))}var i=n(725);class s{constructor(t){this.targetBases=t}get(){let t=this.targetBases.map((t=>t.getCenterPoint()));return(0,i.centroid)(t)}set(t){let n=this.get(),r=(0,i.displacement)(n,t);e(this.targetBases,r)}}var o=n(986);class a{constructor(t){this.targetBases=t}get(){return(0,o.min)(this.targetBases.map((t=>t.getCenterPoint().x)))}set(t){let n=this.get();e(this.targetBases,{x:t-n,y:0})}}class u{constructor(t){this.targetBases=t}get(){return(0,o.max)(this.targetBases.map((t=>t.getCenterPoint().x)))}set(t){let n=this.get();e(this.targetBases,{x:t-n,y:0})}}class c{constructor(t){this.targetBases=t}get(){return(0,o.min)(this.targetBases.map((t=>t.getCenterPoint().y)))}set(t){let n=this.get();e(this.targetBases,{x:0,y:t-n})}}class h{constructor(t){this.targetBases=t}get(){return(0,o.max)(this.targetBases.map((t=>t.getCenterPoint().y)))}set(t){let n=this.get();e(this.targetBases,{x:0,y:t-n})}}var l=n(30);function d(t,e){if(t.length<2)return;let n=t[0],r=t[t.length-1],s=(0,i.midpoint)(n.getCenterPoint(),r.getCenterPoint());t.forEach((t=>{let n=t.getCenterPoint(),r=(0,i.distance)(s,n),o=(0,l.direction)((0,i.displacement)(s,n));o+=e,t.setCenterPoint({x:s.x+r*Math.cos(o),y:s.y+r*Math.sin(o)})}))}class f{constructor(t){this.targetBases=t}get(){if(this.targetBases.length<2)return 0;let t=this.targetBases[0],e=this.targetBases[this.targetBases.length-1];return(0,l.direction)((0,i.displacement)(t.getCenterPoint(),e.getCenterPoint()))}set(t){let e=t-this.get();d(this.targetBases,e)}}function p(t){let e=new s(t).get().y;t.forEach((t=>{let n=t.getCenterPoint(),r=n.y-e;t.setCenterPoint({x:n.x,y:e-r})}))}function m(t){let e=new s(t).get().x;t.forEach((t=>{let n=t.getCenterPoint(),r=n.x-e;t.setCenterPoint({x:e-r,y:n.y})}))}function g(t){if(0==t.length)return;let n=t[0],{x:r,y:s}=n.getCenterPoint(),o={x:r,y:s},a=new f(t).get();d(t,-a),p(t),d(t,a),e(t,(0,i.displacement)(n.getCenterPoint(),o))}function y(t){let e=new s(t),{x:n,y:r}=e.get(),i=n,o=r,a=new f(t).get();d(t,-a),m(t),d(t,a),e.set({x:i,y:o})}function b(t,e){let n=e.indexOf(t);if(-1==n)throw new Error("The target base is not present in the parent sequence.");let r=n-1,i=n+2;return r=Math.max(r,0),new f(e.slice(r,i)).get()}var v=n(127);function w(t,...e){var n;let r=e[0],s=null!==(n=e[1])&&void 0!==n?n:[],a=b(t,r)+Math.PI/2,u=r.indexOf(t);if(u<0)throw new Error("The target base is not present in the provided structure.");if(r.length>1&&u<r.length-1){let e=r[u+1];a=(0,o.flipAway)(a,(0,i.direction)(t.getCenterPoint(),e.getCenterPoint()))}let c=s.find((e=>e.includes(t)));return c&&(a=(0,o.flipAway)(a,(0,i.direction)(t.getCenterPoint(),(0,v.other)(t,c).getCenterPoint()))),a}function x(t,e){let{spacing:n}=e;if(t.length<2)return;let r=new f(t),i=r.get(),o=new s(t),{x:a,y:u}=o.get(),c={x:a,y:u};t.forEach(((t,e)=>{t.setCenterPoint({x:e*n,y:0})})),r.set(i),o.set(c)}function S(t){if(t.length<3)return;let e=t[0],n=t[t.length-1],r=[e.getCenterPoint(),n.getCenterPoint()],s=(0,i.distance)(r[0],r[1]),o=(0,l.direction)((0,i.displacement)(r[0],r[1])),a=s/(t.length-1),u=a*Math.cos(o),c=a*Math.sin(o),{x:h,y:d}=r[0];t.forEach((t=>{t.setCenterPoint({x:h,y:d}),h+=u,d+=c}))}function _(t,n){let{basePairLength:r,basePairSpacing:o}=n;if(t.length<2)return;let a=Math.ceil(t.length/2),u=t.slice(0,a),c=t.slice(a),h=new s(t),{x:l,y:p}=h.get(),m={x:l,y:p},g=new f(t).get();x(u,{spacing:o}),x(c,{spacing:o}),new f(u).set(-Math.PI/2),new f(c).set(Math.PI/2);let y=t[0],b=t[t.length-1];e(u,(0,i.displacement)(y.getCenterPoint(),{x:0,y:0})),e(c,(0,i.displacement)(b.getCenterPoint(),{x:r,y:0})),d(t,g),h.set(m)}function P(t,e){let{spacing:n,terminiGap:r}=e;if(t.length<2)return;let i=new s(t),{x:o,y:a}=i.get(),u=o,c=a,h=new f(t).get(),l=n*(t.length-1);l+=r,Math.abs(l)<1e-5&&(l=1e-5);let p=l/(2*Math.PI),m=Math.PI/2+2*Math.PI*(.5*r/l);t.forEach(((t,e)=>{let r=m+2*Math.PI*(e*n)/l;t.setCenterPoint({x:p*Math.cos(r),y:p*Math.sin(r)})})),d(t,h),i.set({x:u,y:c})}var M=n(173);function N(t,n){let{spacing:r}=n;if(t.length<3)return;let s=t[0],o=t[t.length-1],a=[s.getCenterPoint(),o.getCenterPoint()],u=(0,i.distance)(a[0],a[1]),c=r*(t.length-1);if(c-u<.001)return void S(t);if(u<.001){let{x:n,y:o}=s.getCenterPoint();return P(t,{spacing:r,terminiGap:u}),void e(t,(0,i.displacement)(s.getCenterPoint(),{x:n,y:o}))}let h=new M.CircularSegment(a,{arcLength:c}),d=h.parentCircleCenterPoint,f=h.parentCircleRadius,p=(0,l.direction)((0,i.displacement)(d,s.getCenterPoint())),m=h.arcAngle/(t.length-1);t.forEach((t=>{t.setCenterPoint({x:d.x+f*Math.cos(p),y:d.y+f*Math.sin(p)}),p+=m}))}var O=n(369);function C(t,n,r){var a,u,c;let{spacing:h}=r,l=null!==(a=r.basePairSpacing)&&void 0!==a?a:h,d=null!==(u=r.hairpinLoopSpacing)&&void 0!==u?u:h,p=null!==(c=r.terminiGap)&&void 0!==c?c:h,{x:m,y:g}=new s(t).get(),y={x:m,y:g},b=new f(t).get();[,n]=(0,v.knotless)(t,n);let w=new v.PositionPairs(t,n).get(),x=(0,O.mountainPlotTraversal)(t,w),S=t.filter(((t,e)=>0==x[e]));P(S,{spacing:h,terminiGap:p});let M=new v.Stems(t,n).get(),C=new Set(S),E=M.filter((t=>C.has(t[0][0]))),T=n=>{let r=n[0],{x:a,y:u}=new s(r).get(),c={x:a,y:u},p=new f(n[0]).get(),m=[...n.map((t=>t[0])),...n.map((t=>t[1])).reverse()];_(m,{basePairLength:h,basePairSpacing:l}),new f(m).set(p),e(m,(0,i.displacement)(new s(r).get(),c));let g=n[n.length-1],y=g.map((e=>t.indexOf(e))),b=t.filter(((t,e)=>(0,o.isBetweenExclusive)(e,(0,o.min)(y),(0,o.max)(y))&&x[e]==x[(0,o.min)(y)]+1)),v=new Set(b),w=M.filter((t=>v.has(t[0][0])));N([g[0],...b,g[1]],{spacing:w.length>0?h:d}),w.forEach((t=>T(t)))};E.forEach((t=>T(t))),new f(t).set(b),new s(t).set(y)}var E,T,A,j,k,D=n(456),L=function(t,e,n,r,i){if("m"===r)throw new TypeError("Private method is not writable");if("a"===r&&!i)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof e?t!==e||!i:!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===r?i.call(t,n):i?i.value=n:e.set(t,n),n},B=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};function I(e,n,r){let i,{spacing:a}=r;if(0==e.length)return;if(0==n.length)return void function(t,e){let{spacing:n}=e,r=D.Point.matching(new s(t).get());P(t,{spacing:n,terminiGap:2*n}),new f(t).set(Math.PI/2),new s(t).set(r)}(e,r);[i,n]=(0,v.knotless)(e,n);let u=[...e],c=D.Point.matching(new s(u).get());e=[...e,new t({centerPoint:{x:0,y:0}})];let h=new R(e,n),l=h.loops;l.sort(((t,e)=>q(t,h)-q(e,h)));let p=l[0],m=(0,o.max)(p.linkers.map((t=>t.length))),g=p.linkers.flatMap((e=>[z(e),...Array.from({length:m-2}).map((()=>new t({centerPoint:{x:0,y:0}}))),X(e)]));if(P(g,{spacing:a,terminiGap:a}),d(g,-new f(g).get()),new s(g).set(c),p.linkers.forEach((t=>N(t,{spacing:a}))),p.emanatingStems.forEach((t=>F(t.bottomBasePair,h,r))),"outerStem"in p){let t=[p.outerStem.topBasePair[1],p.outerStem.topBasePair[0]],i=[...e.slice(h.indexOf(t[0])),...e.slice(0,h.indexOf(t[1])+1)],s=new Set(i);F(t,new R(i,n.filter((t=>t.every((t=>s.has(t)))))),r)}}function F(n,r,s){var a,u;let{spacing:c}=s,h=null!==(a=s.basePairSpacing)&&void 0!==a?a:c,l=null!==(u=s.hairpinLoopSpacing)&&void 0!==u?u:c,d=r.stems.find((t=>t.bottomBasePair[0]===n[0]));if(!d)throw new Error("Closing stem not found.");let f=D.Point.matching(n[0].getCenterPoint());_(d.bases,{basePairSpacing:h,basePairLength:c}),e(d.bases,(0,i.displacement)(n[0].getCenterPoint(),f));let p=r.loop(d.topBasePair);p.innerStems.length>0?function(n,r,s){let{spacing:a}=s,u=[r.indexOf(n[0]),r.indexOf(n[1])],c=r.loop(n).innerStems.flatMap((t=>t.bottomBasePair.map((t=>r.indexOf(t))))),h=(0,o.min)(c),l=(0,o.max)(c),d=r.sequence.filter(((t,e)=>e>=h&&e<=l&&r.mountainPlotTraversal[e]==r.mountainPlotTraversal[h]&&[e-1,e,e+1].some((t=>c.includes(t))))),f=(0,o.max)([d.length-2,h-(0,o.min)(u)-1,(0,o.max)(u)-l-1]);f=(0,o.max)([f,0]);let p=Array.from({length:f}).map((()=>new t({centerPoint:{x:0,y:0}}))),m=p.map((()=>new t({centerPoint:{x:0,y:0}}))),g=D.Point.matching(n[0].getCenterPoint());P([n[0],...p,...d,...m,n[1]],{spacing:a,terminiGap:a}),e([...n,...d],(0,i.displacement)(n[0].getCenterPoint(),g)),N(r.sequence.slice(u[0],h+1),{spacing:a}),N(r.sequence.slice(l,u[1]+1),{spacing:a})}(d.topBasePair,r,s):N(p.bases,{spacing:l}),p.innerStems.forEach((t=>F(t.bottomBasePair,r,s))),(0,v.consecutivePairs)(p.innerStems).map((([t,e])=>[t.bottomBasePair[1],...r.interveningBases(t.bottomBasePair[1],e.bottomBasePair[0]),e.bottomBasePair[0]])).filter((t=>t.length>=5)).forEach((t=>{let n=t.slice(1,-1),r=D.Point.matching(n[0].getCenterPoint());_(n,{basePairLength:(0,i.distance)(z(n).getCenterPoint(),X(n).getCenterPoint()),basePairSpacing:h}),n.length%2==0||N(function(t){if(t.length<3)throw new Error("The array has less than three items.");if(t.length%2==0)throw new Error("The array has an even number of items.");let e=Math.floor(t.length/2);return t.slice(e-1,e+2)}(n),{spacing:c}),e(n,(0,i.displacement)(n[0].getCenterPoint(),r))}))}class R{constructor(t,e){this.sequence=t,this.basePairs=e,E.set(this,void 0),T.set(this,void 0),A.set(this,void 0),j.set(this,void 0),L(this,E,new Map,"f"),this.sequence.forEach(((t,e)=>B(this,E,"f").set(t,e))),L(this,T,new Map,"f"),this.sequence.forEach(((t,e)=>B(this,T,"f").set(t,e+1))),L(this,A,new Map,"f"),this.basePairs.forEach((t=>B(this,A,"f").set(t[0],t[1]))),this.basePairs.forEach((t=>B(this,A,"f").set(t[1],t[0]))),L(this,j,this.basePairs.map((t=>[this.positionOf(t[0]),this.positionOf(t[1])])),"f"),this.mountainPlotTraversal=(0,O.mountainPlotTraversal)(this.sequence,B(this,j,"f")),this.stems=new v.Stems(this.sequence,this.basePairs).get().map((t=>new V(t)))}indexOf(t){let e=B(this,E,"f").get(t);if("number"!=typeof e)throw new Error("Base not found.");return e}positionOf(t){let e=B(this,T,"f").get(t);if("number"!=typeof e)throw new Error("Base not found.");return e}spannedBases(t){let e=this.indexOf(t[0]),n=this.indexOf(t[1]);return this.sequence.slice((0,o.min)([e,n])+1,(0,o.max)([e,n]))}numSpannedBases(t){return this.spannedBases(t).length}joinedBases(t){let e=this.indexOf(t[0]),n=this.indexOf(t[1]);return[...this.sequence.slice(0,(0,o.min)([e,n])+1),...this.sequence.slice((0,o.max)([e,n]))]}numJoinedBases(t){return this.joinedBases(t).length}interveningBases(t,e){let n=this.indexOf(t),r=this.indexOf(e);return this.sequence.slice((0,o.min)([n,r])+1,(0,o.max)([n,r]))}get loops(){return[this.outermostLoop,...this.stems.map((t=>this.loop(t.topBasePair)))]}loop(t){let e=[this.indexOf(t[0]),this.indexOf(t[1])],n=this.mountainPlotTraversal[e[0]]+1,r=this.spannedBases(t).filter((t=>this.mountainPlotTraversal[this.indexOf(t)]==n)),i=new Set(r),s=[t[0],...r,t[1]],o=this.stems.filter((t=>i.has(t.bottomBasePair[0]))),a=o,u=this.stems.find((e=>t.includes(e.topBasePair[0])));if(!u)throw new Error("Outer stem not found.");let c=(0,v.consecutivePairs)(o).map((([t,e])=>[t.bottomBasePair[1],...this.interveningBases(t.bottomBasePair[1],e.bottomBasePair[0]),e.bottomBasePair[0]]));return o.length>0&&(c.unshift([t[0],...this.interveningBases(t[0],z(o).bottomBasePair[0]),z(o).bottomBasePair[0]]),c.push([X(o).bottomBasePair[1],...this.interveningBases(X(o).bottomBasePair[1],t[1]),t[1]])),{bases:s,closingBasePair:t,outerStem:u,innerStems:o,emanatingStems:a,linkers:c}}get outermostLoop(){let t=this.stems.filter((t=>0==this.mountainPlotTraversal[this.indexOf(t.bottomBasePair[0])])),e=t,n=(0,v.consecutivePairs)(e).map((([t,e])=>[t.bottomBasePair[1],...this.interveningBases(t.bottomBasePair[1],e.bottomBasePair[0]),e.bottomBasePair[0]]));return e.length>0&&n.push([...this.sequence.slice(this.indexOf(X(e).bottomBasePair[1])),...this.sequence.slice(0,this.indexOf(z(e).bottomBasePair[0])+1)]),{stems:e,emanatingStems:t,linkers:n}}}E=new WeakMap,T=new WeakMap,A=new WeakMap,j=new WeakMap;class V{constructor(t){if(k.set(this,void 0),0==t.length)throw new Error("A stem must have at least one base-pair.");L(this,k,t,"f")}get bottomBasePair(){return z(B(this,k,"f"))}get topBasePair(){return X(B(this,k,"f"))}get side5(){return B(this,k,"f").map((t=>t[0]))}get side3(){let t=B(this,k,"f").map((t=>t[1]));return t.reverse(),t}get bases(){return[...this.side5,...this.side3]}}function q(t,e){let n=(0,o.max)(t.emanatingStems.map((t=>e.numSpannedBases(t.bottomBasePair))));return"closingBasePair"in t&&(n=(0,o.max)([n,e.numJoinedBases(t.closingBasePair)-2])),n}function z(t){if(0==t.length)throw new Error("The array is empty.");return t[0]}function X(t){if(0==t.length)throw new Error("The array is empty.");return t[t.length-1]}k=new WeakMap})(),r})(),t.exports=e()},645:function(t){var e;e=()=>(()=>{var t={986:function(t){t.exports=(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){var e=0;return t.forEach((function(t){return e+=t})),e}function r(t){return n(t)/t.length}function i(t){t.sort((function(t,e){return t-e}))}t.r(e),t.d(e,{areWithin:()=>f,average:()=>r,clamp:()=>d,degrees:()=>g,flipAway:()=>v,isBetween:()=>h,isBetweenExclusive:()=>l,isBetweenInclusive:()=>h,max:()=>c,mean:()=>r,median:()=>a,min:()=>u,normalizeAngle:()=>b,radians:()=>y,sortNumbers:()=>i,sortNumbersAscending:()=>i,sortNumbersDescending:()=>p,sortedNumbers:()=>o,sortedNumbersAscending:()=>o,sortedNumbersDescending:()=>m,sum:()=>n});var s=function(t,e,n){if(n||2===arguments.length)for(var r,i=0,s=e.length;i<s;i++)!r&&i in e||(r||(r=Array.prototype.slice.call(e,0,i)),r[i]=e[i]);return t.concat(r||Array.prototype.slice.call(e))};function o(t){var e=s([],t,!0);return i(e),e}function a(t){if(0==t.length)return NaN;var e=o(t);if(e.length%2!=0)return e[Math.floor(e.length/2)];var n=e.length/2,i=n-1;return r([e[n],e[i]])}function u(t){if(0==t.length)return 1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.min(e,t)})),e}function c(t){if(0==t.length)return-1/0;var e=t[0];return t.slice(1).forEach((function(t){e=Math.max(e,t)})),e}function h(t,e,n){return t>=e&&t<=n}function l(t,e,n){return t>e&&t<n}function d(t,e,n){return t<e?e:t>n?n:t}function f(t,e,n){return Math.abs(t-e)<=n}function p(t){i(t),t.reverse()}function m(t){var e=o(t);return e.reverse(),e}function g(t){return t*(180/Math.PI)}function y(t){return t*(Math.PI/180)}function b(t,e){void 0===e&&(e=-Math.PI);var n=t-e;return e+((n%=2*Math.PI)>=0?n:n+2*Math.PI)}function v(t,e){var n=(e=b(e,t))-t;return(n<Math.PI/2||n>3*Math.PI/2)&&(t+=Math.PI),t}return e})()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{Box:()=>e});var t=n(986);class e{static bounding(n){let r=n.map((t=>e.matching(t))),i=(0,t.min)(r.map((t=>t.left))),s=(0,t.min)(r.map((t=>t.top))),o=(0,t.max)(r.map((t=>t.right)))-i,a=(0,t.max)(r.map((t=>t.bottom)))-s;return new e(i,s,o,a)}static matching(t){let{x:n,y:r,width:i,height:s}=t;return new e(n,r,i,s)}constructor(t,e,n,r){this.x=t,this.y=e,this.width=n,this.height=r}get centerX(){return this.minX+this.width/2}get centerY(){return this.minY+this.height/2}get minX(){return this.x}get minY(){return this.y}get maxX(){return this.minX+this.width}get maxY(){return this.minY+this.height}get top(){return this.minY}get right(){return this.maxX}get bottom(){return this.maxY}get left(){return this.minX}isBoundedBy(t){let n=e.matching(t);return this.minX>=n.minX&&this.minY>=n.minY&&this.maxX<=n.maxX&&this.maxY<=n.maxY}padded(t,n){return"number"!=typeof n&&(n=t),new e(this.x-t,this.y-n,this.width+2*t,this.height+2*n)}peripheralPoint(t){let e=this.width/2,n=this.height/2,r=Math.pow(Math.pow(e,2)+Math.pow(n,2),.5),i=this.centerX+r*Math.cos(t),s=this.centerY+r*Math.sin(t),o=r;return Math.abs(this.centerX-i)>e&&(o=Math.abs(e/Math.cos(t)),o=Number.isFinite(o)?o:n),Math.abs(this.centerY-s)>n&&(o=Math.abs(n/Math.sin(t)),o=Number.isFinite(o)?o:e),{x:this.centerX+o*Math.cos(t),y:this.centerY+o*Math.sin(t)}}}})(),r})(),t.exports=e()},819:function(t){var e;e=()=>(()=>{var t={106:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return t.map((t=>({v:t,priority:Math.random()}))).sort(((t,e)=>t.priority-e.priority)).map((({v:t})=>t))}function r(){return!(!document.activeElement||"textarea"!==document.activeElement.tagName.toLowerCase()&&(t=document.activeElement,"input"!==t.tagName.toLowerCase()||"text"!==(null===(e=t.getAttribute("type"))||void 0===e?void 0:e.toLowerCase())));var t,e}t.r(e),t.d(e,{DownloadableFile:()=>h,EventfulSet:()=>l,FiniteStack:()=>y,KeyBinding:()=>u,detectMacOS:()=>c,isBeingInteractedWith:()=>s,isURL:()=>b,shuffled:()=>n,userIsTyping:()=>r});let i=new Set;function s(t){return t===document.body||i.has(t)}window.addEventListener("mousedown",(t=>{if(!(t.target instanceof Node))return void(i=new Set);i=new Set;let e=t.target;for(i.add(e);e.parentNode&&!i.has(e.parentNode);)i.add(e.parentNode),e=e.parentNode}));var o,a=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class u{constructor(t,e,n){this.key=t,this.scope=void 0,o.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,o,n),window.addEventListener("keydown",(n=>{var i,u,c,h;n.key.toUpperCase()===t.toUpperCase()&&(void 0===(null===(i=a(this,o,"f"))||void 0===i?void 0:i.altKey)||a(this,o,"f").altKey==n.altKey)&&(void 0===(null===(u=a(this,o,"f"))||void 0===u?void 0:u.shiftKey)||a(this,o,"f").shiftKey==n.shiftKey)&&(void 0===(null===(c=a(this,o,"f"))||void 0===c?void 0:c.ctrlKey)||a(this,o,"f").ctrlKey==n.ctrlKey)&&(void 0===(null===(h=a(this,o,"f"))||void 0===h?void 0:h.metaKey)||a(this,o,"f").metaKey==n.metaKey)&&!r()&&this.scope&&s(this.scope)&&(n.preventDefault(),e())}),{passive:!1})}}function c(){try{return window.navigator.platform.toLowerCase().includes("mac")}catch(t){return!1}}o=new WeakMap;class h{constructor(t){this.textContent=t}downloadAs(t,e){let n=new File([this.textContent],t,{type:e.type}),r=URL.createObjectURL(n),i=document.createElement("a");i.href=r,i.download=n.name,document.body.appendChild(i),i.click(),i.remove(),URL.revokeObjectURL(r)}}class l{constructor(){this.eventListeners={change:[]},this.underlyingSet=new Set}[Symbol.iterator](){return this.underlyingSet.values()}includes(t){return this.underlyingSet.has(t)}include(t){return this.includes(t)}addAll(t){let e=[...t];0!=e.length&&(e.every((t=>this.includes(t)))||(e.forEach((t=>this.underlyingSet.add(t))),this.callEventListeners("change")))}removeAll(t){let e=[...t];0!=e.length&&(e.every((t=>!this.includes(t)))||(e.forEach((t=>this.underlyingSet.delete(t))),this.callEventListeners("change")))}clear(){0!=this.underlyingSet.size&&(this.underlyingSet.clear(),this.callEventListeners("change"))}addEventListener(t,e){this.eventListeners[t].push(e)}callEventListeners(t){this.eventListeners[t].forEach((t=>t()))}removeEventListener(t,e){this.eventListeners[t]=this.eventListeners[t].filter((t=>t!==e))}}var d,f,p,m,g=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class y{constructor(t){d.add(this),this.maxSize=t,f.set(this,[]),p.set(this,{change:[]})}get size(){return g(this,f,"f").length}isEmpty(){return 0==this.size}empty(){0!=this.size&&(function(t,e){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,[])}(this,f),g(this,d,"m",m).call(this,"change"))}peek(){if(0==this.size)throw new Error("The stack is empty.");return g(this,f,"f")[g(this,f,"f").length-1]}push(t){g(this,f,"f").push(t),this.size>this.maxSize&&g(this,f,"f").shift(),g(this,d,"m",m).call(this,"change")}pop(){if(0==this.size)throw new Error("The stack is empty.");let t=g(this,f,"f").pop();return g(this,d,"m",m).call(this,"change"),t}addEventListener(t,e){g(this,p,"f")[t].push(e)}removeEventListener(t,e){g(this,p,"f")[t]=g(this,p,"f")[t].filter((t=>t!==e))}}function b(t){try{return new URL(t),!0}catch(t){return!1}}return f=new WeakMap,p=new WeakMap,d=new WeakSet,m=function(t){g(this,p,"f")[t].forEach((t=>t()))},e})(),t.exports=e()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}n.d=(t,e)=>{for(var r in e)n.o(e,r)&&!n.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},n.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})};var r={};return(()=>{"use strict";n.r(r),n.d(r,{URLParamsHandler:()=>s});var t,e=n(106),i=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class s{constructor(e){t.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,t,e)}handle(n){return r=this,o=function*(){let r=n.get("sequence"),s=n.get("dot_bracket");if(r){i(this,t,"f").drawDotBracket(r,null!=s?s:"");let e=[...i(this,t,"f").drawing.bases];e.slice(0,e.length-20).forEach(((e,n)=>{let r=n+1;r%20!=0||i(this,t,"f").drawing.number(e,r)})),e.length>0&&i(this,t,"f").drawing.number(e[0],1),e.length>=4&&i(this,t,"f").drawing.number(e[e.length-1],e.length),i(this,t,"f").drawing.setPadding(1e3),i(this,t,"f").drawingView.fitToContent()}let o=n.get("schema");if(o)if((0,e.isURL)(o))try{let e=yield fetch(o),n=yield e.text();i(this,t,"f").drawSchema(JSON.parse(n)),i(this,t,"f").drawing.setPadding(1e3),i(this,t,"f").drawingView.fitToContent()}catch(t){console.warn(t),console.warn("Unable to draw schema.")}else console.warn("Schema URL parameter must be a valid URL.")},new((s=void 0)||(s=Promise))((function(t,e){function n(t){try{a(o.next(t))}catch(t){e(t)}}function i(t){try{a(o.throw(t))}catch(t){e(t)}}function a(e){var r;e.done?t(e.value):(r=e.value,r instanceof s?r:new s((function(t){t(r)}))).then(n,i)}a((o=o.apply(r,[])).next())}));var r,s,o}}t=new WeakMap})(),r})(),t.exports=e()},106:function(t){var e;e=()=>(()=>{"use strict";var t={d:(e,n)=>{for(var r in n)t.o(n,r)&&!t.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:n[r]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};function n(t){return t.map((t=>({v:t,priority:Math.random()}))).sort(((t,e)=>t.priority-e.priority)).map((({v:t})=>t))}function r(){return!(!document.activeElement||"textarea"!==document.activeElement.tagName.toLowerCase()&&(t=document.activeElement,"input"!==t.tagName.toLowerCase()||"text"!==(null===(e=t.getAttribute("type"))||void 0===e?void 0:e.toLowerCase())));var t,e}t.r(e),t.d(e,{DownloadableFile:()=>h,EventfulSet:()=>l,FiniteStack:()=>y,KeyBinding:()=>u,detectMacOS:()=>c,isBeingInteractedWith:()=>s,isURL:()=>b,shuffled:()=>n,userIsTyping:()=>r});let i=new Set;function s(t){return t===document.body||i.has(t)}window.addEventListener("mousedown",(t=>{if(!(t.target instanceof Node))return void(i=new Set);i=new Set;let e=t.target;for(i.add(e);e.parentNode&&!i.has(e.parentNode);)i.add(e.parentNode),e=e.parentNode}));var o,a=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class u{constructor(t,e,n){this.key=t,this.scope=void 0,o.set(this,void 0),function(t,e,n){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,n)}(this,o,n),window.addEventListener("keydown",(n=>{var i,u,c,h;n.key.toUpperCase()===t.toUpperCase()&&(void 0===(null===(i=a(this,o,"f"))||void 0===i?void 0:i.altKey)||a(this,o,"f").altKey==n.altKey)&&(void 0===(null===(u=a(this,o,"f"))||void 0===u?void 0:u.shiftKey)||a(this,o,"f").shiftKey==n.shiftKey)&&(void 0===(null===(c=a(this,o,"f"))||void 0===c?void 0:c.ctrlKey)||a(this,o,"f").ctrlKey==n.ctrlKey)&&(void 0===(null===(h=a(this,o,"f"))||void 0===h?void 0:h.metaKey)||a(this,o,"f").metaKey==n.metaKey)&&!r()&&this.scope&&s(this.scope)&&(n.preventDefault(),e())}),{passive:!1})}}function c(){try{return window.navigator.platform.toLowerCase().includes("mac")}catch(t){return!1}}o=new WeakMap;class h{constructor(t){this.textContent=t}downloadAs(t,e){let n=new File([this.textContent],t,{type:e.type}),r=URL.createObjectURL(n),i=document.createElement("a");i.href=r,i.download=n.name,document.body.appendChild(i),i.click(),i.remove(),URL.revokeObjectURL(r)}}class l{constructor(){this.eventListeners={change:[]},this.underlyingSet=new Set}[Symbol.iterator](){return this.underlyingSet.values()}includes(t){return this.underlyingSet.has(t)}include(t){return this.includes(t)}addAll(t){let e=[...t];0!=e.length&&(e.every((t=>this.includes(t)))||(e.forEach((t=>this.underlyingSet.add(t))),this.callEventListeners("change")))}removeAll(t){let e=[...t];0!=e.length&&(e.every((t=>!this.includes(t)))||(e.forEach((t=>this.underlyingSet.delete(t))),this.callEventListeners("change")))}clear(){0!=this.underlyingSet.size&&(this.underlyingSet.clear(),this.callEventListeners("change"))}addEventListener(t,e){this.eventListeners[t].push(e)}callEventListeners(t){this.eventListeners[t].forEach((t=>t()))}removeEventListener(t,e){this.eventListeners[t]=this.eventListeners[t].filter((t=>t!==e))}}var d,f,p,m,g=function(t,e,n,r){if("a"===n&&!r)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof e?t!==e||!r:!e.has(t))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===n?r:"a"===n?r.call(t):r?r.value:e.get(t)};class y{constructor(t){d.add(this),this.maxSize=t,f.set(this,[]),p.set(this,{change:[]})}get size(){return g(this,f,"f").length}isEmpty(){return 0==this.size}empty(){0!=this.size&&(function(t,e){if("function"==typeof e||!e.has(t))throw new TypeError("Cannot write private member to an object whose class did not declare it");e.set(t,[])}(this,f),g(this,d,"m",m).call(this,"change"))}peek(){if(0==this.size)throw new Error("The stack is empty.");return g(this,f,"f")[g(this,f,"f").length-1]}push(t){g(this,f,"f").push(t),this.size>this.maxSize&&g(this,f,"f").shift(),g(this,d,"m",m).call(this,"change")}pop(){if(0==this.size)throw new Error("The stack is empty.");let t=g(this,f,"f").pop();return g(this,d,"m",m).call(this,"change"),t}addEventListener(t,e){g(this,p,"f")[t].push(e)}removeEventListener(t,e){g(this,p,"f")[t]=g(this,p,"f")[t].filter((t=>t!==e))}}function b(t){try{return new URL(t),!0}catch(t){return!1}}return f=new WeakMap,p=new WeakMap,d=new WeakSet,m=function(t){g(this,p,"f")[t].forEach((t=>t()))},e})(),t.exports=e()}},e={};function n(r){var i=e[r];if(void 0!==i)return i.exports;var s=e[r]={exports:{}};return t[r].call(s.exports,s,s.exports,n),s.exports}(()=>{"use strict";const t="7.3.1";var e=n(443),r=n(127),i=n(661),s=n(645),o=n(106),a=n(819);document.body.style.margin="0px",document.body.style.padding="0px";let u=new e.RNAcanvas;u.domNode.style.width="100vw",u.domNode.style.height="100vh",u.appendTo(document.body),window.VERSION=t,window.docs=function(){window.open("https://pzhaojohnson.github.io/rnacanvas.code/","_blank")},window.assistant=function(){window.open("https://chatgpt.com/g/g-jh8gXtvrC-rnacanvas-ai-assistant","_blank")},window.app=u,window.consecutivePairs=r.consecutivePairs,window.parseDotBracket=r.parseDotBracket,window.Centroid=i.Centroid,window.Direction=i.Direction,window.shift=i.shift,window.rotate=i.rotate,window.flipX=i.flipX,window.flipY=i.flipY,window.flipSelfX=i.flipSelfX,window.flipSelfY=i.flipSelfY,window.straighten=i.straighten,window.linearize=i.linearize,window.stemmify=i.stemmify,window.circularize=i.circularize,window.round=i.round,window.untangle=i.untangle,window.Box=s.Box,window.DownloadableFile=o.DownloadableFile;try{let t=new URL(document.URL);new a.URLParamsHandler(u).handle(t.searchParams)}catch(t){console.warn(t),console.warn("Unable to process URL parameters.")}console.log(`%cWelcome to RNAcanvas Code! (v${t})`,"font-weight: bold;"),console.log("%cA code-centric way of drawing nucleic acid structures...","font-weight: bold;"),console.log("%cUse the docs() function to open the documentation for the app in a new tab.","font-weight: bold;"),console.log("%cUse the assistant() function to open the RNAcanvas AI assistant in a new tab.","font-weight: bold;")})()})();